Weekly

News about Lean, the theorem prover and programming language.

Verification, page 4

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

Verification

zkSecurity publishes Rust BLS12-381 code proved equivalent to the EthLib Lean specification

The code covers field arithmetic, G1 encoding and decoding, and subgroup and pairing-product checks, specializing routines from the arkworks 0.5.0 crate; proofs establish termination and agreement with EthLib under documented preconditions, while arkworks agreement is tested and the Charon/Aeneas translation remains trusted. The project was mostly AI-generated and has not been independently reviewed.

Checked against: zksecurity/arkworks-ethlib

Verification

Rudi Cilibrasi publishes openverse, an unofficial Verse runtime with Lean verification

The project defines and proves the semantics of Verse (Epic Games' functional logic programming language) in Lean 4 and checks a C runtime against it. Its C components for integer arithmetic, program loading, and rollback are proved with QuickProof (VST and CompCert in Coq); differential testing and fuzzing check the object store and value heap.

Checked against: rudi-cilibrasi/openverse

Verification

Markus de Medeiros publishes SampLib, a Lean library of verified random samplers

SampLib expresses samplers from Peter Occil's articles as executable ProbLang terms and proves them correct in continuous TotalEris, building on logsem/clutch-lean and Lean 4.35.0. Its completed baseline suite contains 216 samplers, and the README notes that the interpreter tests are not proofs and that the interpreter uses finite-precision Float arithmetic.

Checked against: markusdemedeiros/SampLib

Verification

yaneurao publishes Lean 4 proofs for a shogi AI opening-book algorithm

The algorithm, peta-shock conversion, propagates evaluation values recorded in a shogi AI's opening book backward from the end positions and covers books containing ordinary and perpetual-check repetitions. PaperClaims.lean links the accompanying paper's theorem numbers to Lean theorem names, and Audit.lean checks the axioms the theorems depend on.

Checked against: yaneurao/peta-shock

Verification

Andreas Andreakis extends DBLog to delete orphan rows, with Lean 4 proofs

DBLog-based incremental snapshots, adopted by Debezium and Flink CDC, originally did not handle orphan rows (in the sink, absent at the source); the extension deletes keys a chunk read did not return. Safety and convergence are proved in Isabelle/HOL and, except for the Flink CDC theory, in Lean 4, with no unfinished proofs.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.10810doi.org

Verification

Google DeepMind uses AI agents to verify Signal's messaging security in Lean

The researchers used AlphaProof Code, a multi-agent framework for formal software specification and verification, on Signal's post-quantum PQXDH handshake and Triple Ratchet. The agents generated 6.5 million lines of Lean code proving the libsignal implementation correct against a human-reviewed specification; the proof assumes perfect cryptography.

Image: news.lavx.hu

Checked against: news.lavx.hu

Verification

Anthropic releases FlashProve, with Lean proofs of its security properties

Anthropic released FlashProve, which uses a zkSNARK (a type of cryptographic proof) to prove which AI model answered a request. Anthropic used Lean to specify FlashProve's protocol and prove completeness (honest proofs are accepted), soundness (fake proofs are rejected) and zero-knowledge (proofs hide the model's weights), and shipped an executable, provably correct Lean verifier.

Anthropic logo
Image: anthropic.com

Checked against: anthropic.comanthropics/FlashProve

Verification

Kiro proves properties of its own agent harness in Lean

Kiro wrote Lean models of 26 functions from its TypeScript, Rust, and Python harness (the code managing context, permissions, and state), proving 70 of 96 properties; 18 falsified ones reproduced on the real code. “Lean’s kernel checks every proof, the real code checks every finding,” says the post, which Swami Sivasubramanian shared on LinkedIn.

Kiro proves properties of its own harness in Lean - Blog post by Yaroslav Kharkov, Ferhat Erata, Behrooz Omidvar-Tehrani, Rajdeep Mukherjee
Image: kiro.dev

Checked against: kiro.devLinkedIn post

Verification

Jesse Comer and coauthors present Whiel for Lean-certified relational program verification

Whiel verifies programs whose states are database instances against Hoare specifications: an LLM proposes loop invariants, and the Vampire first-order theorem prover checks their verification conditions. An independent certifier constructs Lean proofs of the original specification or its negation; the 86 benchmark tasks have certified reference answers, 69 valid and 17 invalid.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.05612JesseComer/whiel

Verification

Naoya Yamashita releases lean-ritsuryo, Japanese statutory computation with proofs in Lean

The Lean 4 library and CLI (Apache-2.0 license) compute periods, deadlines, ages, holidays, and taxes under Japanese law, including income and inheritance tax. The library's functions come with proofs that they compute what the provisions say, and the CLI computes by calling them; the README also links a paper.

Checked against: conao3/lean-ritsuryo

Verification

Luk Koska, Tom Koska and Ben Koska verify GPU kernels in Lean

The authors formalize PTX, combining an interpreter covering 81 instruction forms with the axiomatic PTX memory model, and prove correct 9 hand-written PTX entry points (454 instructions), including simple implementations of FlashAttention and a 3-kernel MoE pipeline. LLM coding agents helped write the 34,034 lines of proof, which contain no sorry or custom axioms.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.04447paperswithlean.com

Verification

LARK verifies GPU kernels against PyTorch references using LLM agents and Lean

LARK formalizes a GPU machine model and per-operation semantics in Lean 4 once per target language (PTX, CUDA, HIP), and agents prove segment-by-segment equivalence under exact arithmetic. Of 10 production kernels from LLM serving frameworks, it verifies 9 and finds a previously unknown data race in the tenth, an llm.c softmax kernel.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.02028paperswithlean.com

Verification

Sreehari Sankar and coauthors present LeanGuard, Lean-verified guardrails for AI agents

LeanGuard checks every tool call an agent proposes against a Lean 4 policy, using a decision procedure proved equivalent to a LeanLTL temporal semantics. On Tau-Bench, unguarded Qwen agents executed at least 33 policy-forbidden calls while LeanGuard executed none, and it cut direct prompt-injection success on DTap from 57.9% to 5.9%.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.02332DebarghaG/LeanGuard

Verification

Jan Onderka, Armin Biere and Henrik Böving verify a Lean SMT-LIB parser

The paper introduces blazing-smtlib, a Rust parsing library for SMT-LIB (a standard input format for SMT solvers), and its Lean port BSmtLib, whose optimised lexer and parser provably match a formalised SMT-LIB syntax. On 9,201 benchmark files, blazing-smtlib is more than 6 times faster than previous libraries (geometric mean); BSmtLib is faster or comparable.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2611.00185onderjan/blazing-smtlibpaperswithlean.com

Verification

Autoresearch, Inc. releases Silmaril: Lean models of programs and verified WebAssembly tools

Silmaril uses Lean 4 to model programs and prove properties about them, with a library of logics, models, lambda calculi and verified translations. Its demo exercises all seven Binaryen-style WebAssembly tools and checks that run() returns 42 in both the Lean WebAssembly interpreter and Node.

Checked against: hiloopai/silmaril-lean

Verification

Sébastien Celles uses Lean 4 to find correctness bugs in Go

Inspired by julia-in-lean, the go-in-lean proof-of-concept models a bounded subset of Go (including all of math/bits), states each function's documented behaviour as a theorem, proves it with Lean's kernel and bv_decide, and turns failed proofs into Go tests. Counterexamples must reproduce in Go, and the README lists Go compiler bugs reported after human review.

Checked against: s-celles/go-in-lean

Verification

Volodymyr Pavlyshyn's LeanRDF certifies RDF entailment with a verified checker

Its Lean 4 libraries define the W3C semantics of RDF, RDFS, OWL 2 RL and EL, SPARQL 1.1 and SHACL Core. Untrusted engines, Elpi (λProlog) and oxilite (a SPARQL store on SQLite), find answers that the checker turns into theorems, and the SPARQL evaluator and SHACL validator are proven to compute their semantics exactly.

Checked against: Volland/rdf-lean

Verification

Basis Research Institute proves compiled libtommath correct in Lean, finds bugs

The proofs show that all 100 functions of the RV64I image of libtommath v1.3.0 (76 libtommath functions and the 24 newlib/libgcc routines they call) meet specifications as total-correctness triples on the Sail RISC-V model. Bugs found in that version include mp_invmod returning −2 for -3 and 7 instead of an inverse.

Checked against: BasisResearch/verified-libtommath

Verification

Denis Firsov verifies worst-case constant-time order maintenance in Lean 4

No order-maintenance algorithm (keeping a sequence under insertions and deletions and telling which of two elements comes first) had been verified in a proof assistant. This verification, about 78,000 lines, proves that a program for a step-counting machine embedded in Lean matches a reference specification within a fixed number of steps per operation.

First page of the paper
Image: paperswithlean.com

Checked against: arXiv:2610.38616dfirsov/order_maintenancepaperswithlean.com

Verification

Mathstodon user markusde posts about porting xv6 to Iris-Lean

The post includes one attached image and thanks @ahuoguo for noticing the update.

Checked against: mathstodon.xyz

Verification

Adam Gall publishes lean-sudo, a drop-in sudo replacement written in Lean 4

Its policy, environment and authentication logic is formally verified, with 498 hand-written theorems. On Ubuntu, lean-sudo reads the existing /etc/sudoers, /etc/sudoers.d and /etc/sudo.conf, uses the system's PAM stack, and passes the same 1113-test end-to-end suite as the original sudo, a large C program written around 1980 with a decades-long history of security bugs.

Checked against: adamgall/lean-sudo

Verification

holmesworcester publishes Lean Quiet, a chat app written mostly in Lean

The iOS and Android app uses Lean for everything from TCP packets to pixels; 429 of its 586 theorems are about the code that runs. Because it is local-first, end-to-end encrypted, and peer-to-peer, many properties that would normally depend on a server operator are provable over all possible deployments, assuming user device integrity.

Checked against: holmesworcester/lean-quiet

Verification

Open-source desktop OS ZENOS releases first preview with Lean-proved security decisions

ZENOS's services ask zenos-decide, built from the same Lean definitions as the proofs, whether a file opens, content may reach a printer or AI, and a send is allowed, treating missing or unreadable answers as refusals. The theorems rest only on Lean's standard axioms, but the unaudited preview is not for real sensitive data.

Checked against: zenos-org/zenosleanprover.zulipchat.comzenos v0.1.0-preview

Verification

Harmonic's Aristotle proved 185 properties of Tensordyne's most complex block

Aristotle, an AI that formally verifies software and hardware, also refuted 56 properties of the 12.2 million gate-equivalent block, each with a reproducible counterexample, exposing bugs up to 110,000 cycles after reset. Counting earlier Aristotle runs on sub-blocks, Tensordyne found 8 bugs early in its next chip's design cycle.

The case study title “Tensordyne’s most complex block and early exploration for its next chip” in white over a picture in the Harmonic blue, with the Harmonic logo
Image: harmonic.fun

Checked against: harmonic.fun

More news