Elamur GroupantsโŒ•
โ˜ฐ

mlab-mcgate

The groupant beside mlab/src/mcgate.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
approximantpartialapproximant
astpartialsyntax.json
compositionpartialcomposition
costsymbolic source derivedinvariant
descriptantpresentdescriptant
invariantpartialinvariant
testsbounded selected teststests

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 source derived modelbehavior_complement
reverse_reconstructionreverse_reconstructionpartial source derived modelreverse_reconstruction
representation_transportrepresentation_transportpartial source derived modelrepresentation_transport
failure_precedencefailure_precedencepartial source derived modelfailure_precedence
resource_costresource_costpartial source derived modelresource_cost
composition_relationcomposition_relationpartial source derived modelcomposition_relation

Parts

Model text

descriptant

mlab-mcgate

Seeded RNG, vectors of per-scenario p-values and ordered Row results.

gate: Eight scenarios each append four ALPHAS rows. frac=count(p<=alpha)/ps.len; tol=4.5sqrt(alpha(1-alpha)/ps.len)+margin, margins .004 for Welch/chi2 only. Fault selects exact p:name.

Epoch 2026-10-31

Previously uncovered legacy source modeled using source-scoped children. Synthetic tests added without changing production behavior. Assertions measure selected branches, not universal correctness or distribution calibration.

approximant

Forward approximant

gate: Eight scenarios each append four ALPHAS rows. frac=count(p<=alpha)/ps.len; tol=4.5sqrt(alpha(1-alpha)/ps.len)+margin, margins .004 for Welch/chi2 only. Fault selects exact p:name.

Domain

Bounded k and allocations; tiny k checks structure, not significance calibration.

Executable gap

No cheaper Rust surrogate has been measured for this source. Exact categorical/effect behavior is not a percentage metric; numerical surrogates need a separately specified domain, zero policy and supported1/2/5/10% cap. No speed or error-bound claim.

invariant

Invariants and cost

gate: No failed calibration exception: ok is a boolean. k=0 excludes finite fraction and true ok; NaN p-values are not counted but remain in denominator except chi2 filter_map errors.

O(k) simulations with fixed scenario dimensions, 300 chi-square observations per replicate; O(k) p vectors plus32 rows, expected polar cost only.

Allocations can fail; public malformed shapes and extreme integer arithmetic are outside the bounded checked domain. Floating calculations retain their source-specific NaN and tie policies; no invented global finite guarantee.

composition

Scoped composition

gate: Eight scenarios each append four ALPHAS rows. frac=count(p<=alpha)/ps.len; tol=4.5sqrt(alpha(1-alpha)/ps.len)+margin, margins .004 for Welch/chi2 only. Fault selects exact p:name.

Children bind disjoint operation spans in the original source and share one syntax projection. Registration/reporting/glue between named spans remains represented by the parent projection.

gate: A row admits every p-vector with matching length and threshold counts, many seeds, and sample histories; four counts do not reconstruct draws.

The mathematical combiner keeps source equations, branch exclusions, compatible antecedents and bounded tests distinct. Passing children does not prove caller preconditions; dimension, missingness and effect adapters must preserve their own contracts.

models

behavior_complement

gate: No failed calibration exception: ok is a boolean. k=0 excludes finite fraction and true ok; NaN p-values are not counted but remain in denominator except chi2 filter_map errors.

reverse_reconstruction

gate: A row admits every p-vector with matching length and threshold counts, many seeds, and sample histories; four counts do not reconstruct draws.

representation_transport

denominator_policy: chi2 errors remove replicates, OLS errors become NaN and stay in denominator; these are distinct adapters. scenario_order: RNG state flows sequentially from t_one through t_two, ANOVA, correlation, OLS, chi2; changing earlier draw count changes later samples.

failure_precedence

gate: No failed calibration exception: ok is a boolean. k=0 excludes finite fraction and true ok; NaN p-values are not counted but remain in denominator except chi2 filter_map errors.

resource_cost

O(k) simulations with fixed scenario dimensions, 300 chi-square observations per replicate; O(k) p vectors plus32 rows, expected polar cost only.

composition_relation

gate: Eight scenarios each append four ALPHAS rows. frac=count(p<=alpha)/ps.len; tol=4.5sqrt(alpha(1-alpha)/ps.len)+margin, margins .004 for Welch/chi2 only. Fault selects exact p:name.

tests

Bounded evidence

Selected actual-source test: mcgate::wave30::tiny_and_zero_gate. It uses only synthetic values. Retained native-commands.json specifies exact cargo selection; source-test-map.json maps logs, profiles and controls externally. Paired debug/release observations and compiled mutant status are recorded in receipt.json only after execution.

No Boost/NIST data suite, default Monte Carlo calibration, filesystem dataset loading, GPU or benchmark was run. The test samples a subset of source branches; fragment prose remains source-derived for all uncalled APIs. No Clippy cleanliness claim: broad dependency lints outside owned sources not addressed.

prospective

Prospective statistics epoch โ€” 2026-10-31

Read all seven sources before editing. CPU synthetic checks only; no external Boost/NIST data, default Monte Carlo, GPU, live files, teachers or corpus. No speed claim or production algorithm change planned.

Planned controls mutate independent assertions/contracts in each source, compile successfully, observe selected failure, restore exact source bytes and rerun. Paired debug/release test names and statuses must match. Models remain partial and unsupported executable-surrogate gaps explicit.

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