Elamur GroupantsโŒ•
โ˜ฐ

math-steps

The groupant beside math/src/steps.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
stack_conservationstack_conservationpartial source derived modelstack_conservation
numeric_domainnumeric_domainpartial source derived modelnumeric_domain
adapter_semanticsadapter_semanticspartial source derived modeladapter_semantics
environment_boundaryenvironment_boundarypartial source derived modelenvironment_boundary

Parts

Model text

descriptant

math-steps

Text-order transition search, gold adapters and question binding.

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

prepare truncates aligned quantities/descriptions. SHIFT/SKIP consume input, Reduce/Far combine top with distance1..3 after legal guards. Beam tries20 action forms for <=3N+2 rounds, final filter finite nonnegative near-integer. Oracle uses disjoint 64-bit leaf masks.

Domain

Valid replay actions, aligned arrays and n<=64 are required. Each Shift/Skip advances next; reduction lowers stack length. ACTIONS increments; environment knobs affect features/search. Exact tree evaluation differs from f64 search.

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

Valid replay actions, aligned arrays and n<=64 are required. Each Shift/Skip advances next; reduction lowers stack length. ACTIONS increments; environment knobs affect features/search. Exact tree evaluation differs from f64 search.

Cost

For B beam,N numbers,F features,C clone size: O(N*(BF+20BC+20B log(20B))) plus feature generation. Gold parsing O(tokens*N + exact rational work); no benchmark.

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

composition

Scoped composition

Text-order transition search, gold adapters and question binding.

prepare truncates aligned quantities/descriptions. SHIFT/SKIP consume input, Reduce/Far combine top with distance1..3 after legal guards. Beam tries20 action forms for <=3N+2 rounds, final filter finite nonnegative near-integer. Oracle uses disjoint 64-bit leaf masks.

describe uses en annotation and arith quantities; Prob is consumed by qworld and deduct. Oracle/replay joins trees to actions; exact_answer checks rational values separately from f64 search. Adapter acceptance does not imply search reachability.

models

Typed relations

behavior_complement

Oracle excludes repeated leaves; calculators reject mismatched declared exact values. legal excludes zero division/negative subtraction. Direct replay trusts caller and can panic. Python-subset parser does not execute Python.

reverse_reconstruction

One tree can have multiple valid reduction schedules/unused skipped inputs. Scalar answers and index-erasing shape are many-to-one. Greedy duplicate-valued leaf matching cannot recover original occurrence uniquely.

stack_conservation

Valid prefix stack length=Shift count-Reduce/Far count; representative=max text index.

numeric_domain

Final1e-6 f64 near-integer filter is distinct from exact_answer rational value.

adapter_semantics

Calculator prefers latest previous result value; Python // is converted to rational /, not floor.

environment_boundary

UNITHARD,NOLEX,MAXVIOL,VOTE_T,VOTES,IGNORE_V environment values are part of behavior.

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 steps::wave28::calculator_validation_and_script_bounds ... ok
test steps::wave28::equation_oracle_and_exact_replay ... 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.

No annotation/describe, nonempty beam training, binding training, environment variation or corpus. Private synthetic Prob, oracle/replay, equation/calculator/script parsing and empty predict exercised.

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/steps.rs.groupant/