math-qread-constraints-temporal-fold
The groupant beside math/src/qread.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 | Forward |
| ast | partial | ../../syntax.json |
| cost | partial | Cost |
| descriptant | present | Epoch |
| invariant | partial | Invariant |
| tests | bounded actual helper checks | Tests |
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 |
|---|---|---|---|
behavior_complement | behavior_complement | partial source derived model | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
set_add_equivalence | set_add_equivalence | partial source derived model | set_add_equivalence |
outside_owner_projection | outside_owner_projection | partial source derived model | outside_owner_projection |
future_condition_influence | future_condition_influence | partial source derived model | future_condition_influence |
subtraction_cancellation | subtraction_cancellation | partial source derived model | subtraction_cancellation |
Model text
Scope
Source-derived bounded relation for the manifest byte interval. All relations observe one invocation and its stated state effects. Valid caller structures and finite values where specified are premises. No universal proof, percentage-error surrogate or production replacement is claimed.
Forward
At depth<3 and with a named owner, inspect the full event list for direct facts and applicable owner relations; reject moved-after-relation histories. Otherwise initialize an optional unknown from initial_ev and any told Is state, then fold events matching owner/thing/time, excluding Is/Rel and outside events for owner=None. Set and Add both add; Sub subtracts.
Invariant
Only the final fold filters t<=upto. Relation/direct/initial-state decisions use the full history. Derived events are not excluded from this fold. Depth bounds relation recursion but not event count.
Cost
O(E) full scans per relation level, at most depth3 recursive relation exploration with bounded branching, plus affine additions for selected events. Cost includes support growth and predicate evaluation, not just event count.
behavior_complement
For all-owner fold, outside entries cannot contribute. A Sub cannot add its quantity. Set does not overwrite prior totals here. Excluding all future influence would be false because branch decisions inspect all history.
reverse_reconstruction
A folded expression may arise from Set(a), Add(a), or multiple canceled events. A visible initial unknown at early upto can arise because a later Is exists; output alone cannot reconstruct a time-prefix history.
set_add_equivalence
Within the accumulation branch, Set and Add share st.unwrap_or_default().add(val,1). They differ upstream in initial/relation decisions; local equality is not global interchangeability.
outside_owner_projection
outside suppresses events only for owner=None. Querying the named outside owner may include them, so all-owner sum need not equal sum over every named owner.
future_condition_influence
A first Add with class not make gains initial unknown1000+k when any matching Is exists, even after upto. Fixture constructs this finite counterexample to prefix causality.
subtraction_cancellation
Set(a),Sub(b),Set(b) yields a through coefficient cancellation; at cutoff before the final Set it yields a-b. Direct fixture exercises both boundaries.
Tests
Actual helper fixture: qread::wave34::state_fold_and_ordered_solver. See file-root wave34-evidence.md for named profile/control receipts. Complement relations above are exclusions, not merely test lists; inverse relations retain compatible antecedents. Unexecuted paths remain source-derived.
Epoch
2026-10-31 wave34: new descendant refining the existing parent; prior parent descriptions and evidence retained as historical snapshots. Production code is unchanged; inline synthetic tests add bounded observations.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/math/src/qread.rs.groupant/constraints.groupant/temporal-fold.groupant/