Skip to main content

Module lean

Module lean 

Source

Re-exports§

pub use crate::codegen::recursion::ProofModeIssue;
pub use crate::codegen::recursion::RecursionPlan;

Modules§

universal_lane
When-universal quarantine lane — genuine universal proofs for scalar-sign when-laws, emitted OUTSIDE the counted build.

Enums§

VerifyEmitMode
How verify blocks should be emitted in generated Lean.

Constants§

LAW_CLASS_BOUNDED_DOMAIN
Marker class tag: sampled-domain disjunction premises bound the statement to the finite sample domain.
LAW_CLASS_MARKER_PREFIX
Statement-class channel for emitted law theorems.
LAW_CLASS_UNIVERSAL
Marker class tag: no sampled-domain premises — the -statement is the law’s genuine universal claim.
LEAN_PANIC_LINE_MARKER
The marker every Lean runtime panic prints into captured build output. Empirically pinned against real lake build transcripts (both panic sites below produce it):
PROOF_FUEL_EXHAUSTED_MSG
Panic message baked into every fuel wrapper’s exhaustion arm. This is a SOUNDNESS marker, not just a diagnostic: Lean’s panic! does NOT abort evaluation — it prints PANIC at … <this message> and returns the type’s default value, so under native_decide an exhausted-fuel sample reduces both sides of a model-vs-model equation to default and the kernel certifies a vacuous (possibly FALSE) equality with lake still exiting 0. aver proof --check therefore scans captured lake output for panic lines (crate::codegen::lean::count_model_panic_lines) and treats any hit as a hard check failure. The scan keys on Lean’s generic PANIC at line marker — every prelude panic! site shares the vacuity vector, not just this one — so this constant is purely the emission message; changing it cannot blind the gate.

Functions§

count_model_panic_lines
Count model panic lines in captured lake build output.
proof_mode_findings
Proof-mode diagnostics for Lean transpilation.
proof_mode_issues
transpile
Transpile an Aver program to a Lean 4 project.
transpile_for_proof_mode
Proof-mode transpilation.
transpile_with_verify_mode
Transpile an Aver program to a Lean 4 project with configurable verify proof mode.