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
| 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 |
product_quotient | product_quotient | partial source derived model | product_quotient |
power_cases | power_cases | partial source derived model | power_cases |
chain_dispatch | chain_dispatch | partial source derived model | chain_dispatch |
step_prefix | step_prefix | partial source derived model | step_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/