Elamur GroupantsโŒ•
โ˜ฐ

math-lex

The groupant beside math/src/lex.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
approximantpartialapproximant
astpartialsyntax.json
compositionpartialcomposition
descriptantpresentdescriptant
invariantpartialinvariant
testsexecuted bounded checkstests

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
behavior_complementbehavior_complementpartial source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
unit_transportunit_transportpartial source derived modelunit_transport
build_boundarybuild_boundarypartial source derived modelbuild_boundary
case_boundarycase_boundarypartial source derived modelcase_boundary
category_partitioncategory_partitionpartial source derived modelcategory_partition

Model text

descriptant

math-lex

Exact mathematical lexical enums and UnitW transport.

Epoch 2026-10-31: source-derived partial model; prospective hypotheses retained before changes. Existing behavior unchanged except test helper path extraction. New bounded fixtures avoid annotated text/model/corpus/teacher paths. Child scopes use the parent syntax projection; lexical AST has no macro expansion or semantic resolution. Numeric thresholds and adapter differences are observations, not mathematical correctness proofs.

approximant

Forward relation

Scalar UnitW variants map Mono::of; Kmh/Mph/Ms map distance per time. Generated lookup exact; understand::lx performs lowercase normalization.

Domain

Enum mapping preserves scale/dimension; OUT_DIR include is not expanded in lexical AST. No runtime I/O.

Executable approximant gap

No useful measured percentage surrogate is supplied for these categorical parse/search/effect observations. Supported future caps are 1%, 2%, 5%, 10% only, requiring an explicit metric and reference comparison. No speed or accuracy guarantee follows.

invariant

Invariants and cost

Enum mapping preserves scale/dimension; OUT_DIR include is not expanded in lexical AST. No runtime I/O.

Cost

Constant enum dispatch; generated match byte comparisons/compiler strategy and Mono construction costs unmeasured.

Allocation failure, deep recursion, malformed public structures and universal numerical bounds are not verified.

composition

Scoped composition

Exact mathematical lexical enums and UnitW transport.

Scalar UnitW variants map Mono::of; Kmh/Mph/Ms map distance per time. Generated lookup exact; understand::lx performs lowercase normalization.

build.rs generates lookup from lexicon data; understand::lx lowercases then read_number/read_unit consumes enum distinctions; UnitW::mono delegates dimensional scale representation.

models

Typed relations

behavior_complement

Unknown exact lookup returns None; tested MILES differs from miles, not a universal claim about uppercase keys.

reverse_reconstruction

Lex preimage consists of generated synonyms; inverse Mono requires restricting to enum table, cannot recover spelling.

unit_transport

Kmh=km/h,Mph=mi/h,Ms=m/s; remaining variants singleton Mono.

build_boundary

lookup generated in OUT_DIR at build, AST does not macro-expand it.

case_boundary

understand lowercases, direct lookup does not.

category_partition

Num,Frac,Times,Unit,Scale,Pct,Op,Fn,Kw separate roles; classification is not evaluation.

tests

Source execution evidence

Safe command: cargo test -p math --lib wave28 -- --test-threads=1

Named outcomes (twice debug, twice release; sorted names equal; exits0):

test lex::wave28::exact_lookup_and_speed_dimensions ... ok

One compiled assertion control for this source: compilation0, false expectation test101, exact byte restore, focused positive rerun0. These are actual source assertions, not copied implementations or semantic proof. Controls ran before rustfmt-only test-block formatting.

Selected lookup spellings and speed/scalar mappings only; generated lookup not exhaustively enumerated.

Strict math lib Clippy reports113 pre-existing production lints. No executable percentage surrogate, speed claim, model/corpus/teacher/GPU/full-school or held-out execution.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/math/src/lex.rs.groupant/