Lean 4 Deterministic Verification Gate (Enforcement, Axiom Closure & Replay)
Execute all deterministic, machine-verifiable trust gates over a Lean 4 build before semantic human/council review.
Routing
- USE FOR: project-wide
#print axiomslockdown ([propext, Classical.choice, Quot.sound]), cold kernel replay (lake build/lean4checker), zero-sorry/autoImplicit falselinting, and pre-council CI checks. - DO NOT USE FOR: single-file mathematical faithfulness review (
@lean-proof-review) or whole-corpus quality scoring (@lean-corpus-audit).
Workflow
- Static & Hygiene Gate -- Run
lean_diagnosticsand enforcement scripts to verify0 sorry,0 admit,set_option autoImplicit false, and0forbidden metaprograms (native_decide/Lean.ofReduceBoolunless explicitly whitelisted). - Transitive Axiom Closure -- Invoke
lean_axiom_closureacross all exported declarations and verify every transitive closure is a subset of[propext, Classical.choice, Quot.sound]. - Kernel Replay Verification -- After
sorryremoval or toolchain bumps, run targeted/coldlake buildreplay so cached.oleanartifacts cannot mask unchecked terms. - Emit Gate Certificate -- Record the exact module manifest count and axiom set before handing off to
@lean-proof-reviewor@lean-review-council.
Recovery & STOP
- Any custom
axiom,sorryAx, or unapprovedLean.ofReduceBool/Lean.trustCompilerdependency is a hard blocker; return immediately to@lean-proofor@lean-sair-kernel-optimization. - Always quote the scanned declaration/module count (never treat an empty scan manifest as a pass).
Handoffs
- Predecessors:
lean-proof,lean-sair-kernel-optimization,lean-proof-repair. - Successors:
lean-proof-review,lean-review-council,lean-doc-sync.
Detailed reference
- Fast 3-table lookup card:
../../references/cards/lean-verification-gate-tables.md - Full handbook:
../../references/handbooks/lean-verification-gate-handbook.md - Verification template:
../../templates/core/Template_Verification.md
See also
../lean-proof-review/SKILL.md-- 4-layer semantic proof review../lean-corpus-audit/SKILL.md-- Whole-corpus 7-dimension audit
