---
title: "math-calc-checks-residue-fibers — Mova code model"
description: "Mova code model of math/src/calc.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/math/src/calc.rs.groupant/checks.groupant/residue-fibers.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/calc.rs.groupant/checks.groupant/residue-fibers.groupant/>

# math-calc-checks-residue-fibers

The groupant beside math/src/calc.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/calc.rs`](https://github.com/ElamurAI/mova-free/blob/main/math/src/calc.rs)
- **source SHA-256:** `81be7f264f451792…`
- **covers:** Integer literals/variables are reduced modulo P61. Negation and add/sub/mul combine residues. Power evaluates exponent exactly in a fresh Env cloned from vars, rejects negative/noninteger exponents, then square-and-multiplies over exponent bits. Factorial uses the operand residue as its argument and rejects residue>2M. (bytes 58669–60501)
- **part of:** [math-calc-checks](https://md.groupants.elamur.ai/free/en/mova/math/src/calc.rs.groupant/checks.groupant/)
- **repository folder:** [`math/src/calc.rs.groupant/checks.groupant/residue-fibers.groupant`](https://github.com/ElamurAI/mova-free/tree/main/math/src/calc.rs.groupant/checks.groupant/residue-fibers.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 | [Forward](#forward) |
| **ast** | partial | `../../syntax.json` |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Epoch](#epoch) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | bounded actual helper 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) |
| `collision_class` | collision_class | partial source derived model | [collision_class](#collision-class) |
| `exponent_environment` | exponent_environment | partial source derived model | [exponent_environment](#exponent-environment) |
| `factorial_argument_loss` | factorial_argument_loss | partial source derived model | [factorial_argument_loss](#factorial-argument-loss) |
| `signed_residue` | signed_residue | partial source derived model | [signed_residue](#signed-residue) |

## Model text


### Scope

Source-derived bounded relation for the manifest byte interval. All relations observe one invocation and its stated state effects. Valid caller structures and finite values where specified are premises. No universal proof, percentage-error surrogate or production replacement is claimed.

### Forward

Integer literals/variables are reduced modulo P61. Negation and add/sub/mul combine residues. Power evaluates exponent exactly in a fresh Env cloned from vars, rejects negative/noninteger exponents, then square-and-multiplies over exponent bits. Factorial uses the operand residue as its argument and rejects residue>2M.

### Invariant

Every Some residue lies in [0,P61). Correct factorial interpretation requires original operand a natural number below P61, with supported residue cap. None means unavailable, not a disproved result.

### Cost

Tree traversal plus big-integer reduction cost. Power adds exponent evaluation and O(bit_length(exponent)) modular multiplications; factorial performs residue-argument multiplications up to2M. Fresh Env clones variable values.

### behavior_complement

Supported subtraction 7-9 excludes residue2; unsupported rational literal or Div excludes Some. Equal residues do not exclude integers differing by P61.

### reverse_reconstruction

Observed r represents claimed integer class {r+k*P61:k integer}; many syntax trees and environments inhabit each class. An observed None admits unsupported syntax, exponent failure, negative exponent or factorial cap.

### collision_class

independent(Num7,result7+P61) passes its modular check. This concrete compatible error shows that a passing certificate is a residue observation, not exact answer equality.

### exponent_environment

Exponent eval uses a fresh default Limits and vars.clone; effects do not propagate to the caller's vars. Availability depends on that separate evaluation and exact integer conversion.

### factorial_argument_loss

The operand is reduced before factorial. Source-derived example original P61+1 maps to1! though true factorial is0 mod P61. No huge factorial is executed; bound the admitted operand domain.

### signed_residue

Negative literals and subtraction normalize through nonnegative residue arithmetic. For -2+5 output3; for7-9 outputP61-2. Oracle compares literal residues with those exact constants.

### Tests

Actual helper fixture: `calc::wave34::fingerprint_congruence_and_unavailable_domains`. See file-root wave34-evidence.md for named profile/control receipts. Complement relations above are exclusions, not merely test lists; inverse relations retain compatible antecedents. Unexecuted paths remain source-derived.

### Epoch

2026-10-31 wave34: new descendant refining the existing parent; prior parent descriptions and evidence retained as historical snapshots. Production code is unchanged; inline synthetic tests add bounded observations.
