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
| component | label | where |
|---|---|---|
| approximant | partial | approximant |
| ast | partial | ../syntax.json |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | executed bounded checks | 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 |
absence_priority | absence_priority | partial source derived model | absence_priority |
affine_join | affine_join | partial source derived model | affine_join |
variable_coordinate | variable_coordinate | partial source derived model | variable_coordinate |
failure_effect | failure_effect | partial source derived model | failure_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/