---
title: "retention-digest-reuse — Mova code model"
description: "Mova code model of world/src/knowledge/retention.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/world/src/knowledge/retention.rs.groupant/material.groupant/digest-reuse.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/knowledge/retention.rs.groupant/material.groupant/digest-reuse.groupant/>

# retention-digest-reuse

The groupant beside world/src/knowledge/retention.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/knowledge/retention.rs`](https://github.com/ElamurAI/mova-free/blob/main/world/src/knowledge/retention.rs)
- **source SHA-256:** `89715719216c1a94…`
- **covers:** Least compatible teaching-digest witness (bytes 10523–10902)
- **part of:** [retention-material](https://md.groupants.elamur.ai/free/en/mova/world/src/knowledge/retention.rs.groupant/material.groupant/)
- **repository folder:** [`world/src/knowledge/retention.rs.groupant/material.groupant/digest-reuse.groupant`](https://github.com/ElamurAI/mova-free/tree/main/world/src/knowledge/retention.rs.groupant/material.groupant/digest-reuse.groupant)
- **repository commit:** `48f2e6f74146`

> **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** | source derived partial | [forward](#forward) |
| **ast** | partial | `../../syntax.json` |
| **cost** | prospective source cost | [cost](#cost) |
| **descriptant** | present | [epoch-memory](#epoch-memory) |
| **invariant** | source derived partial | [invariant](#invariant) |
| **tests** | bounded named actual code | [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 |
|---|---|---|---|
| `retention-digest-reuse-complement` | behavior_complement | source derived inner bound | [behavior-complement](#behavior-complement) |
| `retention-digest-reuse-preimage` | reverse_reconstruction | partial relational specification | [reverse-reconstruction](#reverse-reconstruction) |
| `retention-digest-reuse-number-substitution` | identity_projection | source derived partial | [number-substitution](#number-substitution) |
| `retention-digest-reuse-least-witness` | ordered_selection | source derived partial | [least-witness](#least-witness) |
| `retention-digest-reuse-assessment-separation` | noninterference | source derived partial | [assessment-separation](#assessment-separation) |
| `retention-digest-reuse-query-only` | state_effect_relation | source derived partial | [query-only](#query-only) |

## Model text


Subject: `world/src/knowledge/retention.rs` at manifest source SHA. Horizon: one terminating call or explicitly named load prefix on finite synthetic inputs, pinned dependencies and ordinary allocation/I/O. This is a source-derived partial model; finite tests do not establish universal correspondence.

### forward

Reject foreign course before scanning. Iterate retained ledger in ascending key order; serialize/hash (course,key,explain,facts,exercises) for each key and return the first equality. Exhaustion returns None. This is a read-only lookup, not learning or reservation.

### invariant

Some(n) names an existing matching ledger key with no earlier match. Placeholder lesson number and assessment fields are not digest inputs; exercise labels and option order are included.

### cost

For m examined entries and teaching serialization bytes B, O(m*B) serialization/hash and O(B) temporary bytes; early exit cuts m. No memoization or optimization claimed.

### behavior-complement

Type: behavior_complement. In state/lesson/result transitions, exclude successful cross-course lookup, Some(n) for a nonmatching or absent key, and a later key when an earlier match exists. Assessment-only edits cannot change matching membership with teaching fields fixed.

### reverse-reconstruction

Type: reverse_reconstruction. Some(n) requires matching course, digest equality at n, and inequality at every smaller key; later ledger rows are arbitrary. All placeholder n/title/file/test/exam values remain possible. None means no key matches. Hash equality does not uniquely recover teaching strings without additional assumptions.

### number-substitution

Type: identity_projection. Each stored key replaces the candidate placeholder number in the digest; otherwise identical teaching can be discovered at several retained IDs. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### least-witness

Type: ordered_selection. BTreeMap key order, not insertion order, resolves multiple matches. Deleting the least matching key reveals the next compatible antecedent. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### assessment-separation

Type: noninterference. Tests/exams, file/title/level/stars and placeholder number do not enter T_key. Exercises do, including gold labels; this is teaching/assessment separation rather than blanket label independence. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### query-only

Type: state_effect_relation. No student fields or ledger entries mutate during reuse. A returned number is evidence of hash membership, not a fresh-process retention-quality score. Domain and fixed-source assumptions are those above; this is a source-derived constraint, checked only by the bounded named oracle where applicable.

### parent-interaction

Material parent composes read-only reuse and separate frontier queries; callers choose reuse versus allocation. Course guard precedes per-key hashing, first match prevents later serialization; no train/read is called.

### checks

`knowledge::retention::tests::oracle_reuse_fiber_selects_smallest_of_multiple_antecedents` directly executes this helper or its containing load/reuse path with literal expected results. Full source and selected test body reviewed; no implementation-copy oracle. Exact names, profile repetitions and mutation receipts are recorded in the wave34 evidence summary. These are finite synthetic witnesses; unobserved cases and opaque dependencies remain gaps.

### epoch-memory

2026-10-31 wave34: prospective relations saved before test additions. Production bytes preserved. This new finer scope retains its parent's earlier models and history. Shared partial syntax is generated twice and compared; no semantic AST or solver claimed. No teacher, corpus, model loading, successful examination, training or lesson replay is credited as persistent knowledge.
