---
title: "algorithm-prime-factorization-tests — Mova code model"
description: "Mova code model of algorithms/src/prime_factorization/tests.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/algorithms/src/prime_factorization/tests.rs.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/algorithms/src/prime_factorization/tests.rs.groupant/>

# algorithm-prime-factorization-tests

The groupant beside algorithms/src/prime_factorization/tests.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
- **status:** partial source derived instance
- **source:** [`algorithms/src/prime_factorization/tests.rs`](https://github.com/ElamurAI/mova-free/blob/main/algorithms/src/prime_factorization/tests.rs)
- **source SHA-256:** `ebd06d8fbe790fce…`
- **repository folder:** [`algorithms/src/prime_factorization/tests.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/algorithms/src/prime_factorization/tests.rs.groupant)
- **repository commit:** `855da7bd4a7b`

> **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** | bounded checked | [Forward](#forward) |
| **ast** | partial | `syntax.json` |
| **cost** | symbolic unmeasured | [Cost](#cost) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | source derived | [Invariant](#invariant) |
| **tests** | bounded executed | [evidence](#evidence) |

## 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 |
|---|---|---|---|
| `nonbehavior` | behavior_complement | partial source derived | [nonbehavior](#nonbehavior) |
| `failure_fibers` | reverse_reconstruction | partial source derived | [failure_fibers](#failure-fibers) |
| `oracle` | oracle_correspondence | partial source derived | [oracle](#oracle) |
| `mutation` | counterfactual_boundary | partial source derived | [mutation](#mutation) |
| `schedule` | metamorphic_relation | partial source derived | [schedule](#schedule) |

## Model text


### descriptant

#### algorithm-prime-factorization-tests combiner

2026-10-30: combine the fixed harness source, independent reference observations, invariants and typed relations. Enumerate every candidate divisor of the original bounded n, certify prime by checking all smaller divisors, then determine valuation by powers dividing the original n. This uses neither shrinking remainder nor sqrt termination. Additional product/canonical certificates and multiplication relations test other observations.

Behavior complement models false reported outcomes; reverse reconstruction retains ambiguity of both pass and fail. Disagreement remains an obligation, never resolved by a registry label. Epoch observation: boundaries and independent oracles detect a compiled production mutation; successful finite checks leave off-fixture behavior unproved.

### model

## algorithm-prime-factorization-tests

### Forward

Report pass iff all fixed finite assertions hold; otherwise fail. Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

### Invariant

Finite fixtures and independent oracle arithmetic stay within bounded integer domains. Passing tests leave all unobserved behavior open.

### Cost

Finite bounded enumeration of divisors or residues, symbolic unmeasured cost.

### nonbehavior

Type: behavior_complement. Domain: Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

Over terminating candidate implementations paired with pass/fail, excluded observations comprise pass with any failed assertion and fail with every assertion satisfied. Aborts/nontermination are outside this binary domain.

### failure_fibers

Type: reverse_reconstruction. Domain: Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

A pass reconstructs all implementations agreeing with every finite fixture, leaving arbitrary off-fixture behavior. Failure reconstructs implementations or faulty oracle premises causing the mismatch, never uniquely identifies a defect.

### oracle

Type: oracle_correspondence. Domain: Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

Enumerate every candidate divisor of the original bounded n, certify prime by checking all smaller divisors, then determine valuation by powers dividing the original n. This uses neither shrinking remainder nor sqrt termination. Additional product/canonical certificates and multiplication relations test other observations.

### mutation

Type: counterfactual_boundary. Domain: Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

Change trial boundary <= to <. This compiled production-source mutant loses the exponent of 2 at n=4 and is rejected by zero_one_and_prime_squares.

### schedule

Type: metamorphic_relation. Domain: Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64.

Single-thread repeated debug/release runs preserve normalized test records, excluding timestamps, build progress and elapsed time. This is finite evidence, not universal equivalence.

### Limits

Partial syntax is not semantic AST analysis. Finite observations are not proof; no executable approximation claim.

### evidence

#### Evidence — 2026-10-30

Source SHA-256: ebd06d8fbe790fced807c1e67b813a489e66f122e23654134af4a89accf2273d.

Five tests in this module pass; the temporarily integrated crate passes 177 unit tests twice in debug and twice in release. Single-thread normalized records match within each mode. Strict all-target Clippy and owned-file rustfmt checks pass. A compiled production mutant is rejected at a real assertion. Partial syntax regenerated twice with identical bytes.

External evidence: MOVA_DATA/runs/octopus-wave4-number-2026-10-30, containing the Rust validation helper, raw logs and mutants. No throughput measurement, live API, teacher, GPU or semantic proof. Root integration separately binds parent groups and registry.

- debug-records.txt SHA-256: fa902d23abe56879ca09d425ce49c7eabfedb520d9356ce92da1e8e1c22e11cb
- release-records.txt SHA-256: fa902d23abe56879ca09d425ce49c7eabfedb520d9356ce92da1e8e1c22e11cb
- prime_factorization-mutant-build.log SHA-256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- prime_factorization-mutant-rejected.log SHA-256: 360c3c6af7c1648c91603b1f45754f0523a6c9693bfee5612838a8ec1d848c2b
- syntax.json SHA-256: d727e3c35ef629d848b487541da44ec23a48518f286f344aac02068a85952b95

Current-checker validation: an isolated Git snapshot of the four owned source/sidecar leaves passes groupants with zero diagnostics, four sidecars, zero missing leaf sidecars; its temporary parent is explicitly one missing group sidecar. changed against the task baseline reports all four changed Rust files registered, none missing, using the external leaf registry. Full parent-tree integration remains the integrating agent's responsibility. An initial historical checker/full-repository minimal-registry probe was rejected for unrelated ownership and old component-schema gaps; it is not counted as validation.

### prospective

#### Before execution

2026-10-30: inherited pre-implementation plan in the adjacent implementation groupant. Five tests: independent divisor/primality oracle n=1..2048; zero/one and eight prime squares; u64::MAX known factors, powers of two e=1..63 and 3^40; reconstruction/canonical certificates n=1..4096; valuation addition for 4096 pairs a,b=1..64. Expect deterministic identical normalized records in debug/release and a real assertion failure for Change trial boundary <= to <. This compiled production-source mutant loses the exponent of 2 at n=4 and is rejected by zero_one_and_prime_squares.
