Elamur GroupantsโŒ•
โ˜ฐ

algorithm-karatsuba-polynomial-tests

The groupant beside algorithms/src/karatsuba_polynomial/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

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
approximantpartialForward
astpartialsyntax.json
costconditionalCost
descriptantpresentdescriptant
invariantpartialInvariant
testsbounded executedevidence

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 relational specificationbehavior_complement
reverse_reconstructionreverse_reconstructionpartial relational specificationreverse_reconstruction
oracle_independenceoracle_independencepartial relational specificationoracle_independence
boundary_partitionboundary_partitionpartial relational specificationboundary_partition
mutation_observationmutation_observationpartial relational specificationmutation_observation

Model text

descriptant

karatsuba_polynomial

Prospective model saved before implementation in ../prospective.md (relative from source directory). Original standard-library code. This epoch adds explicit supported domains and independent finite checks. See model.md for typed excluded-output and preimage relations. Partial syntax omits macro expansion and semantic resolution. No executable approximation profile is attached; useful cheaper metrics and evidence remain unsupported. No timing gain is claimed.

model

karatsuba_polynomial tests.rs

Forward

Deterministic finite fixtures compare the public API with independent observations and validation outcomes.

Invariant

Each exercised case either matches the declared oracle or fails an assertion. No random, clock, I/O or callbacks inside tests.

Cost

Bounded finite fixture cost plus production calls. No timing claims; no benchmark in test harness.

behavior_complement

A successful run excludes any exercised mismatch between production and independent oracle, accepted invalid fixture, or failure of a named residual/dimension assertion. It does not exclude defects outside the finite fixture set.

reverse_reconstruction

An observed passing transcript admits all production programs agreeing on exercised observations, including programs wrong on unseen inputs. The original and any implementation with identical fixture outputs are indistinguishable by this harness.

oracle_independence

Schoolbook double sum on unequal lengths across cutoff16 and recursive sizes up to129; no recursive identity is shared.

boundary_partition

Named boundaries test validation errors, degenerate cases and normalization where applicable. Allocator failure is not injected; production resource status and algebraic absence are separate assertions.

mutation_observation

One compiled production mutant must fail direct_oracle; exact source bytes restored before positive rerun. This only proves sensitivity to that chosen changed behavior, not mutation completeness.

evidence

Evidence โ€” 2026-10-30

Two tests per algorithm cover independent finite oracles and boundaries. Receipts: $MOVA_DATA/runs/octopus-wave25-algebra-2026-10-30. Paired debug/release logs, compiled-mutant rejection and restored rerun logs are retained there. Exact positive counts and final verification are reported in the integration receipt. Syntax projections are generated twice and compared. Source bindings are SHA-256; typed models are conditional specifications, not proofs. Allocator failure is not injected.

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/algorithms/src/karatsuba_polynomial/tests.rs.groupant/