world-treeread-schemas
The groupant beside world/src/treeread.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.
Facts
Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.
Components
| component | label | where |
|---|---|---|
| approximant | partial source model | forward |
| ast | partial | ../syntax.json |
| composition | partial source model | composition |
| cost | partial source model | cost |
| descriptant | partial source model | epoch-memory |
| invariant | partial source model | invariant |
| tests | partial source model | checks |
Obernants
The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.
| id | type | label | where |
|---|---|---|---|
world-treeread-schemas-behavior-complement | behavior_complement | partial source model | behavior-complement |
world-treeread-schemas-reverse-reconstruction | reverse_reconstruction | partial source model | reverse-reconstruction |
world-treeread-schemas-boundary | constraint_relation | partial source model | boundary |
Model text
forward
Scope: same_thing, answer and answer_reading. Thing compatibility is nonempty equality, trailing-s removal or substring inclusion. Select first applicable branch in order comparison, part/whole, total, rate, each, left, change. Total sums plain quantities; each uses two values and positive exact divisor; left starts with first equality and applies gains/losses, ignoring other effects.
invariant
In bounded safe arithmetic, total is additive and each has no rounding. Negative left balance refuses. Branch priority is observable: rate multiplication wins over each division. Comparison and whole exclude question quantities but other branches may include them.
cost
Scans are linear in quantity count apart from tag matching with nested string comparisons; reason construction scales with rendered operands. No dynamic-programming or training work is introduced.
behavior-complement
Each cannot return for zero small operand or nondivisibility when no earlier branch matches. Left cannot answer with only one eligible quantity. Empty reading/default question yields None. These restrictions are conditioned on prior-branch exclusion.
reverse-reconstruction
Within ordered two-value domain 0..8 with total=true and no rates/comparisons, scalar eight has nine antecedents. Reason strings further restrict operands but not unused Q fields. None includes both missing evidence and blocked arithmetic; do not identify a unique cause from None.
boundary
Rust structural Q equality excludes all equal copies in some filters; first-match/tie behavior depends on order. Overflow is outside the bounded domain. Substring unit compatibility is deliberately coarse and admits pineapple/apple.
composition
The schema child consumes actual ordered reading plus original text for part/whole cues. Numerical branch correctness is insufficient to establish correct parsing, units, holders or story meaning.
checks
81 total oracle cases, nine-member sum fiber, 169 each pairs plus rate-priority fixture, and 343 gain/loss ledgers exercise production answer_reading. Total sum-to-product mutation must fail the sum oracle.
epoch-memory
2026-10-30: independent finite unit-count/divisibility/balance observations. Refactoring exposes supplied reading only; public answer retains read. No general arithmetic overflow or full task-quality proof, and no approximate replacement.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/world/src/treeread.rs.groupant/schemas.groupant/