Elamur Groupants⌕
☰

world-school-scenario-assessment-fold-residues

The groupant beside world/src/school.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
approximantpartial source modelforward
astpartial../../syntax.json
compositionpartial source modelcomposition
costpartial source modelcost
descriptantpartial source modelepoch-memory
invariantpartial source modelinvariant
testspartial source modelchecks

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
world-school-scenario-assessment-fold-residues-behavior-complementbehavior_complementpartial source modelbehavior-complement
world-school-scenario-assessment-fold-residues-reverse-reconstructionreverse_reconstructionpartial source modelreverse-reconstruction
world-school-scenario-assessment-fold-residues-partition_membershipset_relationpartial source modelpartition_membership
world-school-scenario-assessment-fold-residues-affine_collapsedomain_boundarypartial source modelaffine_collapse
world-school-scenario-assessment-fold-residues-repeat_wraparithmetic_boundarypartial source modelrepeat_wrap
world-school-scenario-assessment-fold-residues-group_informationinformation_losspartial source modelgroup_information

Model text

Wave34, 2026-10-31. Source-bound helper model; no universal proof or approximation-error certificate. Historical parent epoch remains intact.

forward

folds=0 returns None. Otherwise ungrouped result is (indexp[repeat mod 5]+repeat) mod folds in u128. Grouped result is (hash XOR wrapping64(repeatC)) mod folds; index is ignored.

invariant

Result lies in [0,folds) and equal group hashes stay together for fixed repeat/folds. Composite folds with noncoprime p may have empty residues. Hash grouping cannot prove semantic nonleakage.

cost

Constant arithmetic, no allocation; native word sizes and widening are part of the model.

composition

cross_check_k applies the same helper to row selection for both learn !=fold and check ==fold. No dataset or training is executed; helper membership does not certify the provenance of hashed text or extra training rows.

behavior-complement

Exclude Some for zero folds, out-of-range residues for positive folds, or different folds for identical hash/repeat/folds at different indices. Do not exclude empty folds when gcd(p,folds)>1.

reverse-reconstruction

Ungrouped observed j admits indices solving p*i ≡ j-repeat mod folds; if gcd divides the RHS there are gcd residue classes, otherwise none. Grouped fiber is all hashes whose XOR-mixed value has residue j; zero-fold None admits every index/hash/repeat.

partition_membership

For one positive fold count, equality with the returned residue defines exactly one check partition and folds-1 learn partitions per row.

affine_collapse

repeat=1 uses multiplier7; folds=7 makes all ungrouped indices return1. A partition assignment invariant is weaker than balanced coverage.

repeat_wrap

Grouped repeatC is explicitly wrapping u64 before XOR; ungrouped indexp uses u128. Debug and release must agree at machine-word edges.

group_information

Equal hash enforces co-location but distinct texts may collide; fold alone cannot reconstruct a hash, index or source record.

checks

Exact world library selections: school::wave12_models::assessment_partition_has_exactly_one_check_fold. Current repeated debug/release outcomes and compiled controls are in the root sidecar wave34-evidence.md. Only these supplied-input tests are current evidence; older parent module-wide receipts are historical. Macro bodies remain opaque.

epoch-memory

Prospective model saved before edits. This epoch deepens one existing node rather than renaming it. Production implementation unchanged; tests add helper-boundary observations where stated. No live lessons, frozen suites, model loading, teacher or network. Read-only symbolic relations are broader than the finite native domain.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/world/src/school.rs.groupant/scenario-assessment.groupant/fold-residues.groupant/