correspondence-bridges
The groupant beside tools/correspondence/tests/bridges.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 source derived | Forward |
| ast | partial | syntax.json |
| composition | partial | Composition |
| cost | symbolic unmeasured | Cost |
| descriptant | present | descriptant |
| invariant | partial | Invariant |
| tests | bounded executed | Epoch memory and checks |
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 | behavior_complement |
reverse_reconstruction | reverse_reconstruction | partial source derived | reverse_reconstruction |
catalogue_adapter | specialized_relation | partial source derived | catalogue_adapter |
scalar_domain | specialized_relation | partial source derived | scalar_domain |
gate_projection | specialized_relation | partial source derived | gate_projection |
failure_outcomes | specialized_relation | partial source derived | failure_outcomes |
wave39-independent_positional_oracle | independent_exact_observation_check | partial source derived model | independent_positional_oracle |
wave39-adapter_and_error_partition | transport_adapter_counterexample_partition | partial source derived model | adapter_and_error_partition |
Model text
descriptant
Native correspondence bridges
Six focused tests connect bounded algorithm observations to public Mova APIs and a typed catalogue. The first epoch discovered ordinary gcd's zero-zero panic; source repair makes that boundary an explicit regression. Other controls retain derivative overflow, failed-tail projection and field mismatch. See model.md for forward behavior, six typed complementary views, costs, composition and evidence limits.
Wave39 reviews integer digit/Horner transport and its own typed model sections. Finite checks, dependent formula derivations and algebraic claims retain separate scopes; no production speed or universal source proof is inferred.
model
Source correspondence probe model
Forward
Input is compiled production sources and embedded finite catalogue. Fixed/enumerated inputs call actual public algorithm and ordinary Mova APIs. The catalogue bridge checks domain labels, computes output labels from real calls, maps them through declared codomain and requires exact indexed pairs. Suite success means every assertion succeeds. This is a harness relation, not a production solver.
Invariant
Small polynomial integer arithmetic is exactly representable in f64. Root-basin comparisons admit only in-range heads with exactly one root and matching labels; coordinate zero is separate. Scalar fields remain distinct. Success cannot promote finite cases into universal correspondence.
Cost
Gcd enumerates 4225 inputs and at most64 divisor candidates each plus library calls. Polynomial checks enumerate3905 calls, coefficient length<=4. Head enumeration visits sum((n+1)^n,n=1..4), filters288, and adds ten shapes n<=128. Elimination uses at most two variables. Catalogue is reparsed per observation helper: O(bytes) time/space with fixed calls. Compilation is excluded.
behavior_complement
Within the declared compiled-source/catalogue/input universe, complement of suite success contains assertion failure or uncaught panic on a required observation, wrong input label, absent output label or wrong indexed pair. Untested inputs are unsupported rather than established exclusions.
reverse_reconstruction
Success admits any source/catalogue versions satisfying all tested observations, with potentially different untested behavior. Hashes narrow identity but do not recover implementation uniquely. A failure can result from multiple source, adapter or table discrepancies.
catalogue_adapter
Constructed Rust inputs and fixture strings are paired explicitly. observed requires exact ordered domain labels, maps actual output labels to codomain indices and checks pairs. A label/table permutation without corresponding fixture change fails.
scalar_domain
Unsigned gcd embeds losslessly into arbitrary integers. Small Q coefficients convert exactly to f64 in the positive grid. Huge coefficients expose Result/value mismatch. Rational and prime-field equations retain different endpoint theories.
gate_projection
successor[0]=0, successor[i]=head[i]. Equal cycle IDs with root characterize termination there. First outside-basin token includes tails; least cycle vertex loses necessary information. Preflight precedence lies outside this admitted projection.
failure_outcomes
Ordinary source panics are failed assertions/unwinds, not silent successful observations. Allocation/process failures remain environment boundaries. A prior zero-zero panic exposed the need for an explicit public gcd boundary rule.
Composition
Production calls -> observation adapters -> labels -> indexed relation assertions. Correct numerical outputs alone cannot certify wrong label wiring. A sixth test validates all typed formulas, requires scoped finite coincidences, rejects derivative overflow and field mismatch, and checks the gcd forward/converse composition is not a function or identity. General matcher laws and hash checks remain separate. Derived operators must preserve theory, assumptions and observation scope.
Epoch memory and checks
2026-10-31 baseline84c first debug execution falsified unrestricted public gcd correspondence: dashu panicked at zero-zero. Other four tests passed. The source owner then repaired the ordinary wrapper under explicit authorization. Final probes require zero-zero to return0 in both implementations and retain the baseline failure externally. No timing or global-source proof follows.
Final corrected-source measurement, 2026-10-31: six tests passed in debug and release, including direct matcher/catalogue integration. All 4225 gcd grid pairs now call both real APIs; three u64 boundary pairs and the explicit zero regression also pass. These measurements supersede the temporary narrowed-domain success while preserving the initial failed prediction.
wave39-digits
Digit bridge checks โ wave39
independent_positional_oracle
Domain: 781 coefficient words of length0..4 over -2..2, each at seven integer bases -3..3. Observation: actual from_digits value and reversed-coefficient algorithm value/derivative, compared with independent positional power sums in bounded i128 arithmetic. These 5,467 cases also execute 75,250 adjacent carry interventions. At bases2,3, 1,562 cases check magnitude normalization and its idempotence. Separate signed integers -512..512 and bases2..16 yield 15,375 canonical/sign-fiber roundtrips. Inputs are small enough for exact arithmetic in both comparison oracles; this does not extend to arbitrary floats. Passing probes admit other untested implementations with the same finite observations; they do not reconstruct source uniquely.
adapter_and_error_partition
Twelve named fixtures are checked against both source-bound forward tables. Tests require finite equality of the converse/complement derivations and distinguish a nonfunctional input fiber from output-image identity. Explicit false candidates: unreversed coefficients, signed roundtrip, leading-zero identity, omitted base multiplier in the fiber formula, endpoint-only float exactness, aliased base, and exact value implying algorithm Ok. Invalid-base errors belong to digits only. Expected counterexamples are successful negative witnesses; a genuine adapter failure still fails the suite. This is an executable test relation, not an approximation of a production answerer.
checks
Run cargo test --offline --locked -p mova-correspondence --test bridges digit_ and the existing typed_catalogue_admits selection. External run receipts retain paired executions, an independently compiled probe, the wrong-order adapter control and source hashes. Compilation time is separate from runtime. No teacher, training, corpus, GPU or assessment calls are used.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/tools/correspondence/tests/bridges.rs.groupant/