math-lexicon-build
The groupant beside math/build.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
Read lexicon.tsv; skip column-zero comments/blank lines; require3 columns then unique form then known class. Emit match arms in input order and fallback None. frac parses signed i64; zero denominator accepted, mult/times discard denominator. Output written only after all rows processed.
Epoch 2026-10-31: prospective model before bounded synthetic tests; production behavior unchanged. Fraction helper and ordinary Cargo build exercised; malformed TSV generation pipeline not injected.
approximant
Forward relation
Read lexicon.tsv; skip column-zero comments/blank lines; require3 columns then unique form then known class. Emit match arms in input order and fallback None. frac parses signed i64; zero denominator accepted, mult/times discard denominator. Output written only after all rows processed.
Domain: UTF-8 TSV and writable OUT_DIR; empty TSV emits fallback only.
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
Duplicate or unknown class excludes completed output for that invocation. Zero denominator not excluded; invalid enum identifier can fail later compilation.
Ordering: Read→columns→duplicates→class→OUT_DIR→write. Duplicate with invalid class reports duplicate first.
Cost: O(bytes) plus expected form hash work, O(bytes) storage. Integer parsing rejects out-of-range; filesystem/allocation panics.
composition
Composition and epoch memory
Generated source included by lex.rs; compiler there validates enum identifiers.
Fraction helper and ordinary Cargo build exercised; malformed TSV generation pipeline not injected.
Partial syntax and finite tests do not establish all caller assumptions.
models
behavior_complement
Duplicate or unknown class excludes completed output for that invocation. Zero denominator not excluded; invalid enum identifier can fail later compilation.
reverse_reconstruction
Generated Num(n,d) admits alternate integer spellings. mult/times collapse denominators. Comments and blank lines lost; TSV not uniquely recoverable.
failure_precedence
Read→columns→duplicates→class→OUT_DIR→write. Duplicate with invalid class reports duplicate first.
representation_transport
Generated source included by lex.rs; compiler there validates enum identifiers.
resource_boundary
O(bytes) plus expected form hash work, O(bytes) storage. Integer parsing rejects out-of-range; filesystem/allocation panics.
domain_boundary
UTF-8 TSV and writable OUT_DIR; empty TSV emits fallback only.
tests
Evidence, 2026-10-31
Selected actual-source checks: rustc --test math/build.rs: wave28::fraction_syntax. Exact commands, numeric statuses, normalized outcomes, compiled assertion controls and restoration receipts are in the external wave28 mathcontrol run.
Fraction helper and ordinary Cargo build exercised; malformed TSV generation pipeline not injected.
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/build.rs.groupant/