mlab-mcgate-gate
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
| component | label | where |
|---|---|---|
| approximant | partial | approximant |
| ast | partial | ../syntax.json |
| cost | symbolic source derived | invariant |
| descriptant | present | descriptant |
| invariant | partial | invariant |
| tests | partial bounded parent evidence | 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 |
reverse_reconstruction | reverse_reconstruction | partial source derived model | reverse_reconstruction |
denominator_policy | denominator_policy | partial source derived model | denominator_policy |
scenario_order | scenario_order | partial source derived model | scenario_order |
branch_relation | branch_relation | partial source derived model | branch_relation |
resource_cost | resource_cost | partial source derived model | resource_cost |
Model text
descriptant
mlab-mcgate-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: isolated source-bound fragment over bytes [442,3893); includes no claim beyond this relation. Source hash 367b5b5a047a1c38b6d47c2d19978efd2f0274468ffc4375c4c6cc08d3426bc9.
approximant
gate: forward relation
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 surrogate gap: no measured cheaper implementation with a useful scoped metric is supplied. Categorical/error/effect relations are exact obligations, not percent losses. Future numeric caps only1/2/5/10%.
invariant
gate: invariant and cost
chi2 errors remove replicates, OLS errors become NaN and stay in denominator; these are distinct adapters.
RNG state flows sequentially from t_one through t_two, ANOVA, correlation, OLS, chi2; changing earlier draw count changes later samples.
Scope-specific cost: O(k) scenario simulations with fixed5/6/4/7/9 samples and300 chi2 trials; O(k) retained p values,32 result rows. k=0 still constructs32 rows.
models
behavior_complement
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
A row admits every p-vector with matching length and threshold counts, many seeds, and sample histories; four counts do not reconstruct draws.
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.
branch_relation
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.
resource_cost
O(k) scenario simulations with fixed5/6/4/7/9 samples and300 chi2 trials; O(k) retained p values,32 result rows. k=0 still constructs32 rows.
tests
Evidence boundary
See ../tests.md for the actual selected source test and mutant. These tests sample the file, not every fragment branch. 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. Other branches here are source-derived and unexecuted unless the parent test explicitly calls them.
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/mlab/src/mcgate.rs.groupant/gate.groupant/