# Credits

We stand on the shoulders of giants. Being listed here is credit, not endorsement: nobody named has reviewed or checked this book.

## Sonny's own work

Each line gives the result in plain words, its status label as the book states it, and the credit. Lean and its checkers are other people's work and stay credited to them below.

- The honest file (2 + 2 = 4 on the natural numbers, by reflexivity): Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Sonny (2026), built with Lean 4.34.1 (Leonardo de Moura, Sebastian Ullrich and the Lean community).
- The added-axiom file (2 + 2 = 5, from an axiom declared in the file): Accepted by the build but dependent on an added or placeholder assumption, visible in the axiom report. Sonny (2026).
- The unfinished-proof file (2 + 2 = 5, the proof is the placeholder sorry): Accepted by the build but dependent on an added or placeholder assumption, visible in the axiom report. Sonny (2026).
- The one-number system (2 + 2 = 5 in the numbers below 1): Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Sonny (2026).
- The different plus sign (2 + 2 = 5 where a local definition makes plus add one extra): Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Sonny (2026).
- The faulty definition (1 is prime, where the definition of prime forgets the condition of being at least 2): Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Sonny (2026).
- The kernel-check-off file (False, stored with kernel checking turned off, then 2 + 2 = 5 from it): stored with kernel checking turned off, rejected by the re-check. Sonny (2026), with the re-check by leanchecker (Kim Morrison and Sebastian Ullrich).
- A second-kernel run with lean4lean (Mario Carneiro), which could not read the compiled files here: Open. Sonny (2026).

## Lean and its checkers

- **Leonardo de Moura, Sebastian Ullrich, the Lean FRO and the Lean community**: Lean 4, its kernel and its build tool Lake. This book uses Lean 4.34.1 (commit 5045d005). Lean is released under the Apache 2.0 licence.
- **Kim Morrison and Sebastian Ullrich**: leanchecker (earlier lean4checker), named as authors in its source file in the Lean 4.34.1 distribution. Repository: github.com/leanprover/lean4checker, now archived because the tool ships with Lean.
- **Mario Carneiro**: lean4lean, a Lean kernel and external checker written in Lean 4 (github.com/digama0/lean4lean), and the paper "Lean4Lean: Verifying a Typechecker for Lean, in Lean" (2024). Tried for this book: it could not read the compiled files, so it was not used.
- **ammkrn**: nanoda, a Lean type checker written in Rust (github.com/ammkrn/nanoda_lib). Version 0.4.19, which ships in the Lean 4.35.0 release toolchain, was run on the demonstrations.
- **The Lean community**: lean4export (github.com/leanprover/lean4export), which writes a proof out as plain text so that another checker can read it (its leanexport build, version 3.1.0, ships in the Lean 4.35.0 toolchain and was used); the comparator tool; and the Lean Kernel Arena, which the Lean manual mentions as a collection of external checkers. Comparator and the Kernel Arena were not used.
- **Mathlib**: the Lean community's library of formal mathematics (github.com/leanprover-community/mathlib4). Many results that people call "Lean-verified" rest on it. Mathlib is not used in the demonstrations here; the files need core Lean only.
- **The Lean Language Reference**, chapter "Validating a Lean Proof" (lean-lang.org/doc/reference/latest/ValidatingProofs/). The order of checks in chapter 1 and the framing of honest and dishonest code follow that page.

## The 2026 kernel bug

- **kiranandcode** (GitHub name), who opened issue 14576 in the Lean repository on 28 July 2026 with a minimal reproducer. **Leonardo de Moura**, whose pull request 14577 added the missing check.
- **Jonathan Brossard**, "Lean 4 kernel soundness bug: forging proofs via nested inductive projections", post to the oss-security mailing list, 2 August 2026 (openwall.com/lists/oss-security/2026/08/02/1).
- **Leonardo de Moura**, "Postmortem for kernel soundness bug #14576" (1 August 2026, leodemoura.github.io/blog/2026-8-1-postmortem-for-kernel-soundness-bug-14576/): the timeline, the cause, the status of nanoda and lean4lean, and the follow-up kernel fixes. **Ramana Kumar** (discovered the bug) and **Kiran Gopinathan** (reported it), as named in the Lean 4.32.2 release notes, the earliest release with the fix.
- **dumko2001, CaptainAni187 and hallerite** (GitHub names): PrimeIntellect verifiers issue 2177, "Lean taskset: injected `axiom` bypasses the reward" (opened 30 July 2026), the added-axiom case of chapter 3 inside a reward pipeline, with a fix that checks axioms after compiling.

## On the distance between a Lean statement and a written one

- **Alexander Bastounis, Fabian Circelli and Anders C. Hansen**, "Navier-Stokes lost in translation: Why Lean verification of AI autoformalisation does not guarantee correct natural language proofs", arXiv:2610.08144 (2026).
- **Jimmy Xin, Alex Schneidman, Chris Cummins, Karun Ram, Srihari Ganesh and Jannis Limperg**, "AXLE: A Cloud Infrastructure for Lean 4 Theorem Proving Utilities", arXiv:2606.26442 (24 June 2026; accepted at the 3rd AI for Math Workshop, ICML 2026): the ways a Lean file can compile without proving the intended statement, and a comparison of lean4checker, Comparator and SafeVerify.
- **The Lean FRO**: the comparator repository notes that from Lean 4.35.0 the tool is part of Lean itself, as `lake comparator` and `lake check`.

## Earlier version of the demonstration

- Three demonstrations in chapter 3, the honest file, the kernel-skip file and the faulty-definition file, come from an earlier draft by Sonny, run earlier on the same Lean version; their comments were rewritten for this book. All seven demonstrations were run for this book, and again later.

## Where to go next

- Which of these sources should a reader open to follow the kernel bug of 2026? See [Kernel bugs, and why a second checker helps](chapters/04-kernel-bugs-and-second-checkers.md).
- Where is each tool used on the demonstrations? See [Five ways to get 2 + 2 = 5 past a build](chapters/03-two-plus-two-is-five.md).
