Weekly

News about Lean, the theorem prover and programming language.

Verification, page 5

Software, hardware, protocols, and cryptography verified with Lean. 148 items, newest first.

Verification

Harmonic's Aristotle fixes three LibTomMath bugs and verifies optimized routines

Aristotle, Harmonic's AI that formally verifies software, found and repaired three bugs in LibTomMath 1.2.0, which supplies large-integer arithmetic to Tcl and Dropbear SSH. Aristotle then optimized two arithmetic routines, making modular exponentiation 31–38% faster in benchmarks, and proved them against the repaired code's specifications for results, memory safety, errors, and stored values.

The case study title “Speed up your code without wondering what you broke” in white over a picture in the Harmonic blue, with the Harmonic logo
Image: harmonic.fun

Checked against: harmonic.fun

Verification

Michael Stoll had Claude build a verified Lean 4 model of ratpoints

Claude mirrored ratpoints, Michael Stoll's C program that finds rational points on hyperelliptic curves, in Lean function by function and proved, as Comparator certified, that the model meets a short specification. Michael Stoll called the work token-intensive enough to use up a Max 20x subscription's weekly Opus 5.5 allowance within three to four days.

Checked against: MichaelStollBayreuth/RatpointsLeanleanprover.zulipchat.comMichaelStollBayreuth/ratpoints

Verification

Zhe Ye and coauthors propose agentic verified optimization in Lean 4

Agents return faster code plus a Lean proof that it equals the original, which serves as the specification. The agents did so for 156 of 189 Verina functions, and 92 proved rewrites sped up 47 of 51 scenarios in 17 applications the authors' Aqueduct framework migrated to Lean from C, C++, Go, or Rust.

Image: aqueduct.verina.io

Checked against: aqueduct.verina.ioarXiv:2610.30188@0xlf_ on X

Verification

Natalie Marleny announces formal-git, modelling about 30% of Git in Lean 4

Built over two months with heavy use of coding agents, the project proved more than 8,000 theorems of varying usefulness and uncovered more than 100 potential defects in Git v2.55, including at least two possible security vulnerabilities. Its differential random testing harness and more than 10,000 unique tests will be open-sourced after responsible disclosure.

Image: x.com/NatalieMarleny

Checked against: @NatalieMarleny on X

Verification

John Zhuoyang Ye and Jens Palsberg verify fault-tolerant quantum compilation in Lean

The paper introduces QPPM, a language for Pauli-product measurement programs, and verifies lowering of Clifford+T circuits to QPPM and an optimizer that eliminates measurements, fuses and reorders rotations, and schedules logical rounds. On QASMBench, verified fusion and scheduling reduce logical measurement depth by a median of 17.9%.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2610.31694paperswithlean.com

Verification

Miles Cranmer's AI agents model Julia code in Lean and find bugs

Lean definitions mirror Julia functions line by line, and each property ends proven, or refuted with a concrete counterexample and a pure-Julia reproducer. In Julia Base and several standard libraries, 400 of 910 properties were refuted and 75 issues filed on JuliaLang/julia; DynamicExpressions.jl, the expression-tree package behind PySR, merged 38 Lean-derived fixes.

Checked against: MilesCranmer/julia-in-lean

Verification

Thomas Coratger announces EthLib, a Lean 4 library for Ethereum

The library, hosted at github.com/ethereum/EthLib, launched with the goal of bringing Ethereum's primitives, specifications and theorems into one place, building a shared foundation for formally specifying and proving things about Ethereum.

Checked against: @tcoratger on X

Verification

Katzenpost's Lean library Cryptlib implements the Sphinx cryptographic packet format

Cryptlib's Sphinx packets are binary compatible with the Katzenpost mix network's Go implementation, including with a post-quantum/classical hybrid key encapsulation method (X25519 and ML-KEM-768) per hop. The AGPLv3-licensed library is for modeling protocols and proving their properties; each kind of primitive has a Lean structure with proposition fields that every instance must satisfy.

Checked against: katzenpost/cryptlibcryptlib.ioreservoir.lean-lang.org

Verification

AssureCode uses Lean for structured justification of AI-generated code

Logan Murphy and coauthors describe AssureCode, which autoformalizes developer intent into Lean specifications for human approval, then decomposes claims via Lean templates, with Lean checking an agent's decomposition-soundness proofs. On HumanEval, LiveCodeBench and MBPP samples with four LLMs, a single run recovered most of an iterative LLM baseline's concerns and surfaced additional ones.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2610.29758paperswithlean.com

Verification

Anand Kumar Keshavan announces lean-qverify for verifying quantum circuits in Lean 4

The open-source project includes a Lean library, a Qiskit integration, and a free workbook with executable examples covering circuit specifications, semantic proofs, Quantum Hoare Logic and ZX-calculus. Anand Kumar Keshavan calls the current implementation an initial research and educational framework, welcomes independent technical reviews, and is interested in collaborating on compositional proof techniques.

Checked against: akkeshavan/lean-qverifyleanprover.zulipchat.comakkeshavan.github.io

Verification

Anirudh Gupta, Siddhartha Gadgil and Petros Markopoulos present PastaLean for verifying Python

PastaLean deterministically translates Python into Lean through Python's abstract syntax tree, with no LLM, turning specifications written in Python into theorems for agents or humans to prove. It also includes TypeInfer, a Python type inference engine that completed one benchmark in 1.25 s against HeaderGen's 36.2 s, and an MCP server for coding agents.

Image: anirudhg07.github.io

Checked against: anirudhg07.github.iosiddhartha-gadgil/PastaLeanleanprover.zulipchat.com

Verification

Aditya Ranjan Jha and coauthors mechanize a hardware type system in Lean

Pact, a typed extension of the Anvil hardware description language, checks each component against its type, and compatible types guarantee communication safety (no unsynchronized exchanges or loss of progress). The POPL 2027 paper's artifact includes a Lean 4 mechanization proving soundness of type inference, type checking, and compatibility, plus optimality of inferred types.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2610.26599doi.org

Verification

Giulio rebuffo's Janus verifies compiled Go arm64 machine code in Lean 4

Janus, an early work in progress, decodes instructions in Lean and does not trust the Go compiler, linker, or any source-level reasoning. Every load and store must fall inside a caller-provided allocation, and Go runtime panic stubs (bounds checks, nil, divide) are named outcomes, so "this function never panics" is provable.

Checked against: Giulio2002/Janus

Verification

ATOMSLab's LeanSMILES formalizes molecular representations and learning algorithms in Lean

The repository's SMILES toolkit parses SMILES strings into typed molecular graphs, with a canonicity proof for canonical SMILES and an order-invariance proof for RDKit-compatible Morgan fingerprints. Its LeanLearn library covers linear and logistic regression, and the machine-learning pipeline from SMILES to model runs in Lean, with results checked against scikit-learn.

Checked against: ATOMSLab/LeanSMILES

Verification

Tanner Duve of Logical Intelligence offers Veil an invariant-synthesis tactic

Written for Veil, a Lean-based verifier for transition systems, #synthesize_invariants runs the universal PDR algorithm on a module and its safety property. It returns inductive invariants or a counterexample (both proven sound), a "no universal invariant" result (not proven sound) or "unknown"; it succeeded on every Veil example tested within its supported fragment.

Checked against: leanprover.zulipchat.comverse-lab/veil

Verification

AI agents help researchers discover a new consensus protocol, verified in Lean

AI-greement, an agent harness with a Lean-based verification framework, helped researchers discover A-greement, a consensus protocol proved linearizable in about 98,000 lines of Lean. A-greement cuts mean latency over the fastest baseline by 12.2% on write-heavy and 33.3% on read-heavy workloads, and the harness's Lean formalization uncovered four previously unreported vulnerabilities in existing protocols.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2610.30114paperswithlean.com

Verification

Kraken Lean project proves FFmpeg's SBR decoder binary safe

The theorem sbr_session_safe covers the linked machine code (aacsbr.o with its callees): given the link's layout, external routines' contracts and a 32-bit bound on their stack, every run stays in the memory it owns and uses at most the stated stack. The prefix-code and bound facts of FFmpeg's Huffman tables are proved.

Checked against: zrlk/kraken

Verification

Ilya Sergey describes Vermilion, an experimental Lean backend for Rust verifier Verus

Vermilion expresses Verus's verification conditions (mathematical propositions about a program), normally sent to the Z3 solver, as Lean theorems, though it does not prove that they correctly describe Rust's semantics. Its default tactic, vrml, tries to prove each automatically, and any it leaves open can be proved interactively, drawing on Mathlib.

Checked against: proofsandintuitions.net@ilyasergey on X

Verification

Vasily Ilin shares a prompt to build verified, faster software in Lean

The prompt asks for a Lean version of software X, proved correct and optimized to run at least 10% faster than X's fastest implementation, with tests and proofs passing throughout. Kim Morrison's lean-zip, a verified DEFLATE implementation, inspired the workflow; examples cover integer factorization and jump processes, the latter faster than Julia's JumpProcesses.jl.

Image: x.com/IlinVasily29521

Checked against: @IlinVasily29521 on XVilin97/PrimeFactorLeanVilin97/JumpProcessesLeankim-em/lean-zip

Verification

Son Ho and colleagues verify Rust code in Microsoft's SymCrypt with Lean

Using Aeneas, which extracts a pure model of Rust code in Lean, a 237 KLOC Lean development establishes safety, panic-freedom, and functional correctness of 16.7 KLOC of Rust, including SHA-3 and ML-KEM ported from C. AI agents autonomously write proofs, which the Lean kernel independently verifies.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2609.15648

Verification

Boris Cherny used Opus 5.5 and Lean to verify the Claude Agent SDK

Boris Cherny reports that a couple of short prompts to Opus 5.5 produced 16 PRs fixing various bugs and race conditions in the Claude Agent SDK. Boris Cherny also sometimes combines Lean and TLA+ to look for issues around data flow, concurrency, and state management.

Image: x.com/bcherny

Checked against: @bcherny on XLinkedIn post

Verification

Velvet 2.0 released, and Ilya Sergey publishes Vermilion, a Lean backend for Verus

Velvet 2.0 is now based on Lean's most recent verification machinery, is easier to set up and 10x faster, adding exception specs, ghost state and named proof goals. Vermilion, an experimental Lean 4 backend for the Verus Rust verifier, turns each obligation into a Lean theorem checked by the Lean kernel.

Checked against: LinkedIn postilyasergey/vermilion

Verification

Trivet combines LLMs and Lean to validate LLVM compiler transformations

Chunhao Liao, Hongxu Xu, Xintong Zhou, Yizhou Zhang and Chengnian Sun present Trivet, which verifies or refutes 147 of 148 LLVM transformations, including 60 loop-free transformations with symbolic bitwidths and 27 loop-containing cases. Every successful verdict is checked by the Lean kernel.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2609.19583

More news