Closing the Specification-to-Binary Trust Gap: Zero-Axiom Rust-to-Lean Functional Extraction and Six-Kernel Proof Replay
How Inria Charon + Aeneas zero-axiom Rust MIR extraction and 6-kernel Lean 4.36.0 replay connect with Wave-12’s N=64 (17,920-bit) MDL optimality proof, 20 Liquid Silicon theorems + 6 Kani harnesses, and 189 Horizon H65 proofs.
How Inria Charon + Aeneas mechanically extracts #![no_std] Rust MIR into zero-axiom Lean 4.36.0 refinements—paired with constructive boundary counterexamples and 6-kernel independent proof replay.
Signed Provenance · Self-Checked (
human_in_gate = false; automated build, benchmark, and proof-checking scripts ran without manual override — not externally peer-reviewed; see Verification & AI-Use Disclosure and Epistemic Glossary).
Canonical Post-Review Essay (
rel="canonical"): https://blog.openie.dev/posts/rust-to-lean-six-kernel-extraction/
Primary Research Paper: https://research.openie.dev/papers/rust-to-lean-six-kernel-extraction/ · Source Sheet (
[G0–G12]): https://research.openie.dev/sourcesheets/rust-to-lean-six-kernel-extraction/
Repository & Replication: https://github.com/openIE-dev/openie-research-experiments
Canonical Artifact ID:
blake3:tv:fac2882b3fc36caa713bd6c6ad1f5bf96cba980664559a4b37bdc048985b7af1· Telemetry Class:unmetered(measured_j ⊥ reported_j ⊥ est_j ⊥ unmetered)

Three Plain-Language Takeaways
- Instead of hand-writing a separate math model that might drift from real code, Inria Charon and Aeneas translate actual no-std Rust compiler intermediate code into Lean 4 with zero opaque axioms.
- All seven extracted Rust kernels are machine-checked for total panic-freedom, integer overflow safety, and exact mathematical refinement alongside constructive counterexamples where bounds break.
- Every proof term is replayed from scratch across six independent verifiers—Lean paranoid, lean4lean, nanoda, con-leche, con-ron, and Lean default—across more than 58,600 declarations.
Primary Claim & Audited Scope
Closes the specification-to-MIR gap (Horizons H27 & H30) by mechanically extracting 7 #![no_std] Rust functions via Inria Charon + Aeneas (nightly-2026.11.23-2e3d448) into 5,598 B of pure Lean 4.36.0 (WaiosRingsVerify_Aeneas.lean, SHA-256 ee3c1d52...) with 0 opaque external axioms, 0 sorry, and 0 ofReduceBool, proving total panic-freedom and functional refinement (Kulisch K<=512, DSP48E2 dual-INT8 signed tmod/tdiv extraction, 6-channel RRNS encode & Hamming distance, FWHT2 butterfly, Antisym40 mirror, authority gate) paired with constructive tightness counterexamples (2^24+1=16,777,217, 9-tap -145,161<-131,072, +-1,890,071,541) and replayed across 6 independent kernels (Lean 4.36.0 paranoid, lean4lean, nanoda, con-leche --verified, con-ron --verified, Lean default; 58,647+ declarations, unmetered).
- Headline Metric:
7 Charon+Aeneas Rust MIR Proofs · 0 Opaque Axioms · 6/6 Independent Kernels - Energy Disclosure: Signed Provenance · Self-Checked (Horizons H27 & H30, SHA-256 ee3c1d52...). Formal compiler extraction and 6-kernel proof replay are strictly unmetered (joules = null).
- Artifact & License Status: Paper & summaries CC0-1.0; Rust crates & Lean 4.36.0 / Aeneas proof suite Apache-2.0; self-checked, not peer-reviewed.
Full Briefing & Deep-Cut Synthesis
First, instead of hand-writing a separate math model that might drift from real code, Inria Charon and Aeneas translate actual no-std Rust compiler intermediate code into Lean 4 with zero opaque axioms. Second, all seven extracted Rust kernels are machine-checked for total panic-freedom, integer overflow safety, and exact mathematical refinement alongside constructive counterexamples where bounds break. Third, every proof term is replayed from scratch across six independent verifiers—Lean paranoid, lean4lean, nanoda, con-leche, con-ron, and Lean default—across more than 58,600 declarations. Formal verification sceptics rightly ask two questions: does the Lean file actually match the shipping Rust code, and could a bug in preconditions or in one proof checker silently admit a false claim? Charon lowers no-std Rust MIR into structured LLBC and Aeneas emits pure Result-monad Lean functions with zero opaque axioms, while paired counterexample theorems test the exact failure boundary. In WaiosRingsVerify_Spec.lean, Theorem 2 bridges Rust signed truncating modulo at 262,144 to prove dual INT8 packing never overflows i32 or i64 and unpacks both products exactly. Paired witnesses construct exact rounding at 2^24 plus 1 and 9-tap DSP48E2 crosstalk at minus 145,161, while lean4lean, nanoda, con-leche, con-ron, and Lean paranoid all replay zero-sorry proofs. LLVM backend lowering below MIR is cross-checked empirically by our 11-ISA bit-invariance gauntlet rather than assumed formal, and this study carries strictly unmetered status under Signed Provenance, Self-Checked.
First, instead of hand-writing a separate math model that might drift from real code, Inria Charon and Aeneas translate actual no-std Rust compiler intermediate code into Lean 4 with zero opaque axioms. Second, all seven extracted Rust kernels are machine-checked for total panic-freedom, integer overflow safety, and exact mathematical refinement alongside constructive counterexamples where bounds break. Third, every proof term is replayed from scratch across six independent verifiers—Lean paranoid, lean4lean, nanoda, con-leche, con-ron, and Lean default—across more than 58,600 declarations. In most verified systems papers, humans transcribe C or Rust algorithms into Lean by hand. If the Rust code uses 32-bit signed truncating division while Lean uses mathematical integers, subtle edge bugs slip right through. Using Charon and Aeneas nightly-2026.11.23, our #![no_std] Rust crate extracts mechanically into 5,598 bytes of pure Lean 4 (SHA-256 ee3c1d52) where every cast, shift, and division carries an explicit overflow obligation. WaiosRingsVerify_Spec.lean proves total Result.ok refinement across all seven kernels: binary32 tile guards, dual-INT8 DSP48E2 port packing, 6-channel coprime residue encoding and Hamming distance, Sylvester butterflies, Antisym40 mirrors, and authority gates. To guarantee no theorem is vacuously true, we prove paired failure witnesses: binary32 rounds 16,777,217 = 2^24 + 1, a ninth DSP48E2 tap overflows -131,072 at -145,161, and +-1,890,071,541 breaks single-fault RRNS uniqueness. Exported kernel environments replay cleanly across Lean 4.36 paranoid, lean4lean in Lean, nanoda in Rust with sorryAx barred, and con-leche plus con-ron across 58,647 verified declarations. In this cutaway, Rust MIR flows through Charon and Aeneas into a six-verifier hexagon above MIR, while our eleven-architecture binary gauntlet empirically checks LLVM machine-code lowering below MIR. Charon and Aeneas verify Rust MIR rather than raw transistor netlists or LLVM assembly emission, and because proof checking is purely mathematical, energy is reported strictly as unmetered. Explore the extracted Lean files, tightness witnesses, and six-kernel receipts at research.openie.dev/papers/rust-to-lean-six-kernel-extraction/ under Signed Provenance, Self-Checked.
Replicate, Critique & Explore Interactively
- Interactive Observatory: https://research.openie.dev/living/rce-compile/
- Primary Paper & Stamped PDF: https://research.openie.dev/papers/rust-to-lean-six-kernel-extraction/ · https://research.openie.dev/pdfs/rust-to-lean-six-kernel-extraction.pdf
- Research TV (
15s–180s+9:16TikTok): https://research.openie.dev/tv/?study=rust-to-lean-six-kernel-extraction - Checkable
[G0–G12]Source Sheet: https://research.openie.dev/sourcesheets/rust-to-lean-six-kernel-extraction/