---
title: "world-school-scenario-assessment-fold-residues"
description: "Mova code model of world/src/school.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/world/src/school.rs.groupant/scenario-assessment.groupant/fold-residues.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/world/src/school.rs.groupant/scenario-assessment.groupant/fold-residues.groupant/>

# 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

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`world/src/school.rs`](https://github.com/ElamurAI/mova-free/blob/main/world/src/school.rs)
- **source SHA-256:** `06aaec6f562c2acc…`
- **covers:** folds=0 returns None. Otherwise ungrouped result is (index*p[repeat mod 5]+repeat) mod folds in u128. Grouped result is (hash XOR wrapping64(repeat*C)) mod folds; index is ignored. (bytes 146884–147340)
- **part of:** [world-school-scenario-assessment](https://md.groupants.elamur.ai/free/en/mova/world/src/school.rs.groupant/scenario-assessment.groupant/)
- **repository folder:** [`world/src/school.rs.groupant/scenario-assessment.groupant/fold-residues.groupant`](https://github.com/ElamurAI/mova-free/tree/main/world/src/school.rs.groupant/scenario-assessment.groupant/fold-residues.groupant)
- **repository commit:** `855da7bd4a7b`

> **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](#forward) |
| **ast** | partial | `../../syntax.json` |
| **composition** | partial source model | [composition](#composition) |
| **cost** | partial source model | [cost](#cost) |
| **descriptant** | partial source model | [epoch-memory](#epoch-memory) |
| **invariant** | partial source model | [invariant](#invariant) |
| **tests** | partial source model | [checks](#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-school-scenario-assessment-fold-residues-behavior-complement` | behavior_complement | partial source model | [behavior-complement](#behavior-complement) |
| `world-school-scenario-assessment-fold-residues-reverse-reconstruction` | reverse_reconstruction | partial source model | [reverse-reconstruction](#reverse-reconstruction) |
| `world-school-scenario-assessment-fold-residues-partition_membership` | set_relation | partial source model | [partition_membership](#partition-membership) |
| `world-school-scenario-assessment-fold-residues-affine_collapse` | domain_boundary | partial source model | [affine_collapse](#affine-collapse) |
| `world-school-scenario-assessment-fold-residues-repeat_wrap` | arithmetic_boundary | partial source model | [repeat_wrap](#repeat-wrap) |
| `world-school-scenario-assessment-fold-residues-group_information` | information_loss | partial source model | [group_information](#group-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 (index*p[repeat mod 5]+repeat) mod folds in u128. Grouped result is (hash XOR wrapping64(repeat*C)) 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 repeat*C is explicitly wrapping u64 before XOR; ungrouped index*p 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.
