---
title: "math-deriv-simplification — Mova code model"
description: "Mova code model of math/src/deriv.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/math/src/deriv.rs.groupant/simplification.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/math/src/deriv.rs.groupant/simplification.groupant/>

# math-deriv-simplification

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

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`math/src/deriv.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/deriv.rs)
- **source SHA-256:** `0ea96ef4d7df85aa…`
- **covers:** simplify folds constants and identities, bounded integer powers with zero-negative guard.0/x and0*x erase singularities; different-domain trees share outputs. No domain-preserving guarantee; recursive reconstruction includes rational arithmetic. (bytes 605–2373)
- **part of:** [math-deriv](https://md.groupants.elamur.ai/free/en/mova/math/src/deriv.rs.groupant/)
- **repository folder:** [`math/src/deriv.rs.groupant/simplification.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/deriv.rs.groupant/simplification.groupant)
- **repository commit:** `48f2e6f74146`

> **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](#approximant) |
| **ast** | partial | `../syntax.json` |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [tests](#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](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `power_guard` | power_guard | partial source derived model | [power_guard](#power-guard) |
| `rewrite_order` | rewrite_order | partial source derived model | [rewrite_order](#rewrite-order) |
| `negation_rule` | negation_rule | partial source derived model | [negation_rule](#negation-rule) |
| `call_boundary` | call_boundary | partial source derived model | [call_boundary](#call-boundary) |

## Model text


### descriptant

#### math-deriv-simplification

simplify folds constants and identities, bounded integer powers with zero-negative guard.0/x and0*x erase singularities; different-domain trees share outputs. No domain-preserving guarantee; recursive reconstruction includes rational arithmetic.

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

### approximant

#### Scoped forward and cost

simplify folds constants and identities, bounded integer powers with zero-negative guard.0/x and0*x erase singularities; different-domain trees share outputs. No domain-preserving guarantee; recursive reconstruction includes rational arithmetic.

No executable percent surrogate claimed.

### invariant

#### Scoped invariant

simplify folds constants and identities, bounded integer powers with zero-negative guard.0/x and0*x erase singularities; different-domain trees share outputs. No domain-preserving guarantee; recursive reconstruction includes rational arithmetic.

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

### models

## Source-scoped typed relations

### behavior_complement

Simplification of numeric add/sub/mul must return exact Q arithmetic, and division constant-fold only if denominator nonzero. However later0/x identity does permit0/0->0; domain preservation is explicitly excluded.

### reverse_reconstruction

Output0 admits Num0, x*0 and0/0; their original definedness differs. Output x admits x+0, x*1, x^1 and x itself, so simplified AST cannot reconstruct source or domain.

### power_guard

Constant power folding requires integral exponent fitting i64 with |k|<=64 and excludes zero base with negative exponent. Subsequent power-zero identity returns1; MIN abs remains unchecked edge.

### rewrite_order

Children simplify first, then numeric folding, then identities. Hence a compound child can become numeric before parent dispatch; this is recursive local rewriting, not polynomial canonicalization.

### negation_rule

Neg(Num x) folds sign; Neg(Neg b) unwraps b; other negations remain. Multiplication by left -1 rewrites to Neg, while symmetric right -1 has no matching dedicated identity.

### call_boundary

Calls only simplify arguments and preserve function/arity; no evaluation or domain checking is performed. Division/multiplication zero rewrites can erase unsupported or undefined calls.

### tests

#### Evidence

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

simplify folds constants and identities, bounded integer powers with zero-negative guard.0/x and0*x erase singularities; different-domain trees share outputs. No domain-preserving guarantee; recursive reconstruction includes rational arithmetic.
