Skip to main content

Module lean

Module lean 

Source

Re-exports§

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

Modules§

tactic_ir
Structured Lean tactic-combinator tree — the proof-output substrate.

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
residual_probe_body
aver proof --explain residual probe — turns an emitted main law theorem’s source lines into a normalization-only twin so Lean reports its residual (unsolved goals). Used by the --check harness in the aver binary. aver proof --explain residual probe: turn an emitted main law theorem’s source lines into a normalization-only twin so Lean reports its residual (unsolved goals). Re-exported up to codegen::lean for the --check harness in the aver binary; see induction::residual_probe_body. aver proof --explain residual probe. Given the EMITTED Lean source lines of ONE main law theorem (the theorem … := by line through its last arm), render a NORMALIZATION-ONLY twin whose body strips the closing tactic cascade so Lean’s elaborator reports the law’s residual (unsolved goals) instead of closing it with sorry/omega/split. The leftover goal IS what a Lemma-Calculation agent applies the IH against, so the cons arm’s IH must stay in canonical recursive form: each arm is replaced by (try simp only [<the theorem's own def simp set>, List.cons_append]) — def-unfold + cons-peel ONLY, no done/omega/split/simp_all/| sorry.
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.