Elamur GroupantsβŒ•
☰

math-qread-affine-one-pass-images

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

componentlabelwhere
approximantpartialForward
astpartial../../syntax.json
costpartialCost
descriptantpresentEpoch
invariantpartialInvariant
testsbounded actual helper checksTests

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.

idtypelabelwhere
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
depth_interventiondepth_interventionpartial source derived modeldepth_intervention
sorted_rounding_ordersorted_rounding_orderpartial source derived modelsorted_rounding_order
unknown_leaf_cutunknown_leaf_cutpartial source derived modelunknown_leaf_cut
unmapped_identityunmapped_identitypartial source derived modelunmapped_identity

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

Start at constant-only Lin. Visit original keys in sorted order. Replace key k by sol[k] scaled by its original coefficient if present, otherwise by var(k); each insertion passes through add pruning. Newly introduced keys are not revisited in the same call. unknowns returns keys below LEAF.

Invariant

Substitution does not recursively close the solution map. Output constants include weighted solution constants; unsolved input keys remain unless canceled or pruned.

Cost

For original support K, sum the costs of K successive add calls over accumulated support and each replacement support, including ordered maps and cloning. Output support can grow beyond K.

behavior_complement

For sol(0)=var1 and sol(1)=leaf0, one subst(var0) excludes leaf0 and returns var1. A key exactly LEAF cannot be reported by unknowns.

reverse_reconstruction

Output var1 admits unsubstituted var1 and var0 with sol0=var1. Given sol, input expressions whose one-pass weighted images combine to the output are compatible; kernel terms and pruning prevent unique recovery.

depth_intervention

Applying subst twice to var0 with the chain0β†’1β†’LEAF yields LEAF, while one call yields1. Number of calls is part of the observation horizon.

sorted_rounding_order

BTreeMap traversal fixes original-key order. Every replacement adds into the evolving map, so rounding/pruning can differ from an ideal simultaneous exact sum.

unknown_leaf_cut

Keys0..LEAF-1 are unknowns, LEAF and above leaves regardless of coefficient or external leaf validity. unknowns is a coordinate classifier, not bounds validation.

unmapped_identity

With no solution entry, var(k) is inserted at the original coefficient. This preserves unresolved variables subject to pruning; the result does not certify solvability.

Tests

Actual helper fixture: qread::wave34::sparse_projection_and_single_substitution. 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/affine.groupant/one-pass-images.groupant/