Elamur GroupantsโŒ•
โ˜ฐ

math-linsys-linear

The groupant beside math/src/linsys.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
astpartial../syntax.json
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
absence_priorityabsence_prioritypartial source derived modelabsence_priority
affine_joinaffine_joinpartial source derived modelaffine_join
variable_coordinatevariable_coordinatepartial source derived modelvariable_coordinate
failure_effectfailure_effectpartial source derived modelfailure_effect

Model text

descriptant

math-linsys-linear

linear_form maps supported syntax to affine Q coefficients after selected-variable absence test; constant calc eval may mutate Env. Products need a constant operand, division constant nonzero denominator. Coefficients do not recover syntax. Traversal/vector costs compose with constant evaluation.

Epoch 2026-10-31: complete source read, parent AST reused; partial finite evidence only.

approximant

Scoped forward and cost

linear_form maps supported syntax to affine Q coefficients after selected-variable absence test; constant calc eval may mutate Env. Products need a constant operand, division constant nonzero denominator. Coefficients do not recover syntax. Traversal/vector costs compose with constant evaluation.

No executable percent surrogate claimed.

invariant

Scoped invariant

linear_form maps supported syntax to affine Q coefficients after selected-variable absence test; constant calc eval may mutate Env. Products need a constant operand, division constant nonzero denominator. Coefficients do not recover syntax. Traversal/vector costs compose with constant evaluation.

Source range[392,2640) bound by manifest digest. Parent domain applies, not arbitrary public states.

models

Source-scoped typed relations

behavior_complement

Selected-variable product with both nonzero coefficient vectors excludes an affine result; division by a variable denominator excludes success before the denominator-zero constant check.

reverse_reconstruction

Coefficient vector c and constant k admit all supported syntax representing sum c_ix_i+k, e.g x+x and2x. Variable-free expressions can share coefficients while leaving different calc Env effects.

absence_priority

Collect free variable spellings first; no selected name means eval entire subtree through calc, requiring V::Q. Unsupported syntax can still be admitted when constant relative to selected vars.

affine_join

Add/sub combine coefficients and constants componentwise. For multiplication one side must have all-zero coefficients, scaling the other's vector and constant. Division scales by reciprocal constant denominator.

variable_coordinate

E::Var selects the first matching vars index and places1 there; duplicates in vars therefore do not represent distinct coordinates. Caller should supply distinct names.

failure_effect

Recursive left branch may evaluate constants/change Env before right error. Conversion returns String without rollback; callers cannot infer unchanged Env from Err.

tests

Evidence

See ../tests.md for actual checks and source mutant; this fragment adds no runtime test.

linear_form maps supported syntax to affine Q coefficients after selected-variable absence test; constant calc eval may mutate Env. Products need a constant operand, division constant nonzero denominator. Coefficients do not recover syntax. Traversal/vector costs compose with constant evaluation.

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