Elamur Groupants⌕
☰

math-deriv-rules

The groupant beside math/src/deriv.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
product_quotientproduct_quotientpartial source derived modelproduct_quotient
power_casespower_casespartial source derived modelpower_cases
chain_dispatchchain_dispatchpartial source derived modelchain_dispatch
step_prefixstep_prefixpartial source derived modelstep_prefix

Model text

descriptant

math-deriv-rules

derive checks target absence then arithmetic/chain rules. Steps append during recursion and survive errors. Inverse fibers remain nonunique/domain-dependent. Repeated has/simplify/clones dominate work, no integration or bounded output size guarantee.

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

approximant

Scoped forward and cost

derive checks target absence then arithmetic/chain rules. Steps append during recursion and survive errors. Inverse fibers remain nonunique/domain-dependent. Repeated has/simplify/clones dominate work, no integration or bounded output size guarantee.

No executable percent surrogate claimed.

invariant

Scoped invariant

derive checks target absence then arithmetic/chain rules. Steps append during recursion and survive errors. Inverse fibers remain nonunique/domain-dependent. Repeated has/simplify/clones dominate work, no integration or bounded output size guarantee.

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

models

Source-scoped typed relations

behavior_complement

A target-dependent unsupported call excludes Ok; the same unknown call without target excludes Err and returns0 because absence test wins. Rule construction never consults a numeric sample to decide supportedness.

reverse_reconstruction

Derivative1 admits x+c for any target-free constant expression c on admitted domains. Returned simplified tree and steps do not recover c, original syntax or lost domain conditions.

product_quotient

Constant factor branches derive only variable-dependent operand. General product is a'b+ab'; quotient uses(a'b-ab')/b² unless denominator is target-free, then a'/b.

power_cases

Target-free exponent uses k*a^(k-1)a'; target-free base uses a^bln(a)b'; otherwise a^b(b'ln(a)+ba'/a). Validity depends on mathematical domain not stored in E.

chain_dispatch

For one-argument call derive inner first, then select supported outer derivative. Unsupported outer can error after inner steps. Multiple-argument calls reject unless target absence already returned0.

step_prefix

Sum/product/power steps append before recursive child work, and no rollback occurs on Err. A step list is a prefix trace, not proof that every displayed rule completed successfully.

tests

Evidence

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

derive checks target absence then arithmetic/chain rules. Steps append during recursion and survive errors. Inverse fibers remain nonunique/domain-dependent. Repeated has/simplify/clones dominate work, no integration or bounded output size guarantee.

This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/math/src/deriv.rs.groupant/rules.groupant/