Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

23. Verification and Algorithmic Gates (G1–G8 and 13 Negative Proofs)

23.1 The Philosophy of Positive and Negative Verification

In ordinary software engineering, a test suite checks that valid inputs produce the expected output (positive testing). In an auditable epistemological machine, positive testing alone is never enough.

Suppose a gate is supposed to reject dogmatic $0%$ probabilities or Moulton-Campbell pseudoreplication, but a programmer accidentally wrote if true { return Ok(()); } inside the validator. Every positive test will pass with flying colors! The only way to prove that a gate has genuine refutation power (Deborah Mayo’s Severity Principle, Chapters 14 and 16) is to deliberately inject each forbidden methodological pathology into the system and verify that the binary halts and exits with non-zero status code 1.

A single command at the root of the repository runs the complete positive and negative verification suite:

scripts/verify.sh

23.2 The Six Verification Stages of scripts/verify.sh

  1. Formatting Check (cargo fmt --all --check): Enforces canonical Rust formatting across all 5 crates.
  2. Zero-Warning Static Analysis (cargo clippy --workspace --all-targets -- -D warnings): Rejects any compiler or Clippy lint warning anywhere in library, binary, or test targets.
  3. Unit and Integration Tests (cargo test --workspace): Executes all unit tests across stochology-core, stochology-lenses, stochology-siga, stochology-governance, and the end-to-end integration suite in crates/stochology-cli/tests/protocol_integration.rs.
  4. The Seven Methodological and Empirical Laboratories (labs):
    • cargo run --release --bin labs -- --all
    • cargo run --release --bin labs -- --layers (Lab 1: Meng, Manski, Jensen, Performativity)
    • cargo run --release --bin labs -- --uncertainty (Lab 2: Kennedy-O’Hagan GP, Info-Gap + Sniedovich)
    • cargo run --release --bin labs -- --lenses (Lab 3: The 5 Lenses, Machine $M=(T,\Phi,\theta)$, 6-Axis Relational Ontology, 5-Axis Analog & Wave Computing, 4-Axis Critical Stochastic Rationality, and 4-Axis Stochary-Conjectural & Cybernetic Synthesis)
    • cargo run --release --bin labs -- --invariants (Lab 4: $\Phi_1$–$\Phi_5$, Moulton-Campbell, Exceedance, Chouldechova)
    • cargo run --release --bin labs -- --siga (Lab 5: 4-Filter Funnel and 8-Step SIGA on the 3 YAML Cards)
    • cargo run --release --bin labs -- --governance (Lab 6: Bitemporal Clock, Canary, Vault, and 4 Drift Regimes)
    • cargo run --release --bin labs -- --real-data (Lab 7: Transversal Synthesis across all 13 CSVs & 3 YAML Cards)
  5. The Eight Epistemological Gates (gates, exit code 0) and Thirteen Negative Proofs (--defect, exit code 1).
  6. Repository Tag Hygiene (git tag --list): Verifies that no git tags pollute the tree.

23.3 The Eight Epistemological Gates (G1 to G8)

The Eight Epistemological Gates (G1 to G8) and Thirteen Negative Defect Proofs G1 · SIMULABILITY (Φ₁) seed=2026 & 13 CSV SHA-256 SplitMix64 + Null Model H₀ G2 · INDEPENDENT UNIT (Φ₂) Moulton m̃ & Exceedance n_eff --defect moulton → exit 1 G3 · SEVERE TEST & SEAL (Φ₃) Rubin · Meng · Manski · Lee 64-Hex SHA-256 Pre-Reg Seal G4 · FAIRNESS & EXIT (Φ₄) p* = C/(ηL) · Chouldechova --defect chouldechova → exit 1 G5 · RESOLUTION (Φ₅) R_data ≥ R_decision Match --defect phi5 → exit 1 G6 · PROHIBITIONS 1–4 & WALD Cromwell · RRM · Wald · CORP cromwell/performativity/sniedovich G7 · CLOCK, VAULT & DRIFT Canary · HMAC Vault · Breaker clock / vault / concept_drift G8 · MACHINE & ANALOG/WAVE P1–P5 · δ(x)+S* · Wave · Critical · Stocks machine/analog/reason/stochary
Figure 23.1 — The Eight Epistemological Gates (G1–G8) and Thirteen Negative Defect Proofs

When you run cargo run --release --bin gates, the binary executes eight sequential gates:

GateNameWhat It Audits at Runtime
G1Simulability & Cryptographic Integrity ($\Phi_1$)Verifies seed = 2026 (SplitMix64), executable null models, and FIPS 180-4 SHA-256 digests of all 13 CSV datasets against data/SHA256SUMS and cards/*.yaml.
G2Independent Unit & Exceedance Design Effect ($\Phi_2$)Verifies Moulton-Campbell unequal-cluster $\tilde{m} = \bar{m}(1 + \mathrm{CV}^2)$, tail-exceedance ICC $\rho_I(p)$, and $n_{\mathrm{eff}}(p)$ across all 3 canonical cards and empirical benchmarks.
G3Severe Testing, Missingness & Pre-Registration ($\Phi_3$)Verifies Rubin missingness (MCAR, MAR, MNAR), Meng’s Identity, Manski bounds, Pearl’s Ladder rung, and 64-hex SHA-256 pre-registration seals.
G4Scope, Fairness & Exit Clause ($\Phi_4$)Verifies cost-loss threshold $p^{\ast} = \frac{C}{\eta L}$, action consistency (protect iff $p > p^{\ast}$), Chouldechova’s algebraic fairness identity, and numeric exit clauses.
G5Question Resolution Alignment ($\Phi_5$)Verifies $R_{\text{data}} \ge R_{\text{decision}}$ so coarse annual/monthly aggregates never answer daily, shift, or 6-hour operational questions.
G6Prohibitions 1–4, Performativity, Info-Gap & LensesVerifies Cromwell’s Rule ($p \in [\varepsilon_{\text{floor}}, 1-\varepsilon_{\text{floor}}]$), 7-number NonlinearSummary, Stackelberg $\theta_{\mathrm{PO}}$ vs. $\theta_{\mathrm{PS}}$ ($r_{\mathrm{RRM}} < 1$), Info-Gap + Sniedovich Wald floor, SDPI/DPI hierarchy, and exact PAV CORP-Murphy closure.
G7Bitemporal Governance, Vault & Drift BreakerVerifies Bitemporal Clock ($t_{\text{disp}} \le \tau$), Synthetic Canary ($I(\text{Canary}; Y) = 0$), Single-Opening Temporal Vault (0 -> 1), ExTRA-WCP-T Lei & Candès bounds, 4 Label Shift estimators, and the Murphy-CORP Circuit Breaker.
G8Almost-Perfect Machine, Authentic Form, Relational, Analog/Wave, Critical Rationality & Stochary-Conjectural CyberneticsVerifies $(\varepsilon, \delta)$-Almost-Perfect Machine $M=(T,\Phi,\theta)$ (P1–P5), First-Class Authentic Model Form ($\delta(x)+\hat{S}^{\ast}$, named discarded atoms, 6 closed identities, $A(\text{model}) = \text{true}$), Fair-Coin Benchmark, the 6-Axis Relational & Complex Systems Synthesis, the 5-Axis Physical, Analog, and Wave-Interference Computing Synthesis, the 4-Axis Critical Theory of Stochastic Rationality, and the 4-Axis Stochary-Conjectural, Supply-Chain Physics & Cybernetic Synthesis (StocharyConjecturalCyberneticSynthesis, SupplyChainPhysicsAudit, StocharyStressTestNotebook, and 5-CSV EmpiricalStocharyCyberneticAudit).

23.4 The Thirteen Negative Defect Proofs (--defect)

Each command below injects a targeted methodological defect and must exit with code 1:

Command (cargo run --release --bin gates -- ...)Injected PathologyBlocking Gate & Mechanism
--defect cromwellSets a forecast probability to dogmatic $0%$ or $100%$ outside $[\varepsilon_{\text{floor}}, 1 - \varepsilon_{\text{floor}}]$.Gate G6 (Prohibition 4): Rejects violation of Cromwell’s Rule.
--defect phi5Attempts to answer a 5-minute shift-staffing decision using coarse monthly aggregate data ($R_{\text{data}} < R_{\text{decision}}$).Gate G5 (Invariant $\Phi_5$): Rejects temporal resolution mismatch.
--defect moultonClaims nominal sample size $n$ as effective sample size $n_{\mathrm{eff}}(p)$, ignoring Moulton-Campbell cluster inflation ($\mathrm{DEFF} > 1$).Gate G2 (Invariant $\Phi_2$): Rejects pseudoreplicated margin of error.
--defect performativityDeploys a performative retraining loop with contraction ratio $r_{\mathrm{RRM}} = \frac{\varepsilon\beta}{\gamma} \ge 1$ or conflates $\theta_{\mathrm{PS}}$ with $\theta_{\mathrm{PO}}$.Gate G6 (Prohibition 3): Rejects divergent performative feedback.
--defect sniedovichSelects a fragile “Christmas Turkey” option with positive local $\hat{\alpha}$ that collapses below the global Wald Maximin floor in “No-Man’s Land.”Gate G6 (Chapter 4): Rejects Info-Gap No-Man’s Land collapse.
--defect clockDisables the bitemporal filter ($t_{\text{disp}} \le \tau$), allowing future records to leak into features and spiking canary mutual information $I(\text{Canary}; Y) > 0$.Gate G7 (Chapter 19): Trips the Bitemporal Canary Intrusion Alarm.
--defect vaultAttempts to call open_once() a second time (opened_count: 1 -> 2) on an already-opened TemporalVault.Gate G7 (Chapter 19): Blocks vault reopening (VaultReopenError).
--defect concept_driftInjects a structural breakdown where resolution collapses ($\Delta\mathrm{RES}_{\mathrm{CORP}} < -\tau_{\mathrm{RES}}$) while attempting to continue automated predictions.Gate G7 (Chapter 19): Trips the Murphy-CORP Concept Drift Circuit Breaker.
--defect chouldechovaClaims simultaneous equality of $\mathrm{FPR}, \mathrm{PPV},$ and $\mathrm{FNR}$ across groups with unequal base rates ($p_A \neq p_B$).Gate G4 (Invariant $\Phi_4$): Rejects algebraic violation of Chouldechova’s identity.
--defect machineInjects a non-invariant spurious proxy into $\hat{S}^{\ast}$, hides a discarded atom, or breaks Gram effective dimension $d_{\mathrm{eff}} < 0.80 W$.Gate G8 (Chapter 8): Rejects inauthentic model form ($A(\text{model}) = \text{false}$).
--defect analog_wallDeploys standard digital weights onto a noisy analog RRAM/PCM crossbar ($\sigma = 0.60$) without Noise-Aware Training (NAT), Analog ECC, or PKU HP-INV iterative refinement.Gate G8 (Chapter 11): Rejects uncompensated Analog Wall threshold cliff ($35.0% < 50.0%$).
--defect instrumental_reasonLiquidates Adorno’s Non-Identical via Gaussian outlier amputation, deploys an ungrounded Marcuse/Rouvroy “Stochastic Parrot” without causal invariance ($\hat{S}^{\ast}$) or named discarded atoms, and disables neurosymbolic/wave overcoming.Gate G8 (Chapter 12): Rejects instrumental stochastic reification and counterfactual collapse.
--defect stochary_cyberneticsOperates an acyclic taxonomy without feedback loops, runs Just-in-Time without low-pass stock buffering (Bullwhip $= 8.38\times$, Kingman $W_q = 26.5\text{ h}$), exposes full capital to Peters’s non-ergodic $+50%/-40%$ ruin ($g_{\text{tempo}} = -5.13%$), operates with $\mathrm{TTS} < \mathrm{TTR}$ ($0.43$) and $\varepsilon = 0$ Optimizer’s Curse ($+2.79$), and rewards a PATE Q3 Happy Accident jackpot without triggering the S3* Algedonic alarm.Gate G8 (Chapter 13): Rejects non-ergodic ruin, Bullwhip/Optimizer’s Curse fragility, and PATE Q3 moral-luck indulgence.