math-solution-memory-templates
The groupant beside math/src/memory.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 | approximant |
| ast | partial | ../syntax.json |
| composition | partial | composition |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | partial bounded evidence | 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 |
failure_precedence | failure_precedence | partial source derived model | failure_precedence |
representation_transport | representation_transport | partial source derived model | representation_transport |
resource_boundary | resource_boundary | partial source derived model | resource_boundary |
domain_boundary | domain_boundary | partial source derived model | domain_boundary |
Model text
descriptant
Source-bound description
Scan digit literals outside identifier context; map JSON values recursively except metadata keys; make_template rejects0/1 and requires every question index used after first-equal matching. instantiate replaces #index with parenthesized number, rejects missing index. Skeleton LCS returns0 empty/>400.
Epoch 2026-10-31: prospective model before bounded synthetic tests; production behavior unchanged. Source scope bytes[8324,13674). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.
approximant
Forward relation
Scan digit literals outside identifier context; map JSON values recursively except metadata keys; make_template rejects0/1 and requires every question index used after first-equal matching. instantiate replaces #index with parenthesized number, rejects missing index. Skeleton LCS returns0 empty/>400.
Domain: JSON values and text number extraction semantics; metadata strings bypass replacement, including why/domain/option.
Executable Rust approximant unsupported: categorical/effect observations have no useful percentage metric yet. Future caps1/2/5/10% only; no automatic substitution.
invariant
Invariant and cost
Missing target slot excludes Some instantiate; incomplete or zero/one source excludes template; length>400 excludes positive LCS score.
Ordering: Question-number rejection→remove root id/option→recursive substitution→completeness; instantiate scans indices then returns only when all resolved.
Cost: JSON/text traversal plus literal-to-question matching; LCS O(a*b) memory/time capped400; character vectors allocated per string.
composition
Composition and epoch memory
run_c compares skeleton before substitution then executes real plan; no substitution correctness follows from similarity.
Source scope bytes[8324,13674). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.
Partial syntax and finite tests do not establish all caller assumptions.
models
behavior_complement
Missing target slot excludes Some instantiate; incomplete or zero/one source excludes template; length>400 excludes positive LCS score.
reverse_reconstruction
Template+numbers does not recover JSON numeric type or root id/option. Duplicate equal source numbers cause first-slot aliasing; source wording not recoverable from skeleton.
failure_precedence
Question-number rejection→remove root id/option→recursive substitution→completeness; instantiate scans indices then returns only when all resolved.
representation_transport
run_c compares skeleton before substitution then executes real plan; no substitution correctness follows from similarity.
resource_boundary
JSON/text traversal plus literal-to-question matching; LCS O(a*b) memory/time capped400; character vectors allocated per string.
domain_boundary
JSON values and text number extraction semantics; metadata strings bypass replacement, including why/domain/option.
tests
Evidence, 2026-10-31
Selected actual-source checks: cargo test -p math --lib memory::. Exact commands, numeric statuses, normalized outcomes, compiled assertion controls and restoration receipts are in the external wave28 mathcontrol run.
Source scope bytes[8324,13674). No external memory load/generalization. load drops malformed lines and read errors; learned accuracy unmeasured. Not every branch in this fragment executed.
No live teacher/API, trained model, corpus/held-out, GPU, DB or expensive benchmark run. Parent syntax generated twice identically. Scope remains partial.
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/math/src/memory.rs.groupant/templates.groupant/