# Theorems in this book

Every theorem and lemma in this book, with its exact statement, status and credit. Maths is written in LaTeX notation, between dollar signs.

The entries follow the book's own order (the order of the table in [the statement page](statement/STATEMENT.md)). The Lean names are internal labels, not terms of the problem. Each Lean statement is quoted word for word in a code block under its entry.

## Theorem 1: the honest file, $2 + 2 = 4$ (Sonny, 2026)

**Credit:** Sonny (2026), built with Lean 4.34.1 (Leonardo de Moura, Sebastian Ullrich and the Lean community).

$2 + 2 = 4$ on the natural numbers, by reflexivity.

**Status:** Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Build: passes. Axiom report: none. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): accepts. What catches it: nothing needed.

```lean
theorem Demo.honest : 2 + 2 = 4 := rfl
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/Honest.lean](demos/Demo/Honest.lean); Lean theorem named in the code block above.

## Theorem 2: the added axiom, $2 + 2 = 5$ from a declared axiom (Sonny, 2026)

**Credit:** Sonny (2026).

$2 + 2 = 5$ on the natural numbers, from an axiom declared in the file.

**Status:** Accepted by the build but dependent on an added or placeholder assumption, visible in the axiom report. Build: passes. Axiom report: the added axiom. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): refuses, axiom not permitted. What catches it: the axiom report.

```lean
axiom Demo.bad : 2 + 2 = 5

theorem Demo.two_plus_two_is_five : 2 + 2 = 5 := Demo.bad
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/AddedAxiom.lean](demos/Demo/AddedAxiom.lean); Lean theorem and axiom named in the code block above.

## Theorem 3: the unfinished proof, $2 + 2 = 5$ by a placeholder (Sonny, 2026)

**Credit:** Sonny (2026).

$2 + 2 = 5$ on the natural numbers, where the proof is the placeholder “sorry”.

**Status:** Accepted by the build but dependent on an added or placeholder assumption, visible in the axiom report. Build: passes, with a warning. Axiom report: the placeholder axiom. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): refuses, axiom not permitted. What catches it: the warning and the axiom report.

```lean
theorem Demo.two_plus_two_is_five_sorry : 2 + 2 = 5 := by sorry
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/UsesSorry.lean](demos/Demo/UsesSorry.lean); Lean theorem named in the code block above.

## Theorem 4: the one-number system, $2 + 2 = 5$ below $1$ (Sonny, 2026)

**Credit:** Sonny (2026).

$2 + 2 = 5$ in the numbers below $1$, so only $0$. In Lean, the type of numbers below $1$ has only the number $0$.

**Status:** Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Build: passes. Axiom report: one standard axiom. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): accepts. What catches it: reading the statement.

```lean
theorem Demo.small_number_system : (2 + 2 : Fin 1) = 5 := by decide
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/SmallerNumberSystem.lean](demos/Demo/SmallerNumberSystem.lean); Lean theorem named in the code block above.

## Theorem 5: the different plus sign, $2 + 2 = 5$ (Sonny, 2026)

**Credit:** Sonny (2026).

$2 + 2 = 5$ where a local definition makes plus on natural numbers add one extra.

**Status:** Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Build: passes. Axiom report: none. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): accepts. What catches it: reading the definitions in scope.

```lean
-- name: Demo.redefined_plus
local instance : Add Nat := ⟨fun a b => Nat.succ (Nat.add a b)⟩

theorem redefined_plus : 2 + 2 = 5 := rfl
```

The full name in the code block above shows the namespace the theorem sits in.

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/RedefinedPlus.lean](demos/Demo/RedefinedPlus.lean); Lean theorem named in the code block above.

## Theorem 6: the faulty definition, $1$ is prime (Sonny, 2026)

**Credit:** Sonny (2026).

$1$ is prime, where the definition of prime forgets the condition of being at least $2$. In symbols, $\mathrm{MyPrime}(n) :\Leftrightarrow \forall d,\ d \mid n \Rightarrow d = 1 \lor d = n$, and the statement is $\mathrm{MyPrime}(1)$.

**Status:** Proved and checked in Lean (the Lean statement as written, accepted by the kernel; the meaning of the statement is not claimed). Build: passes. Axiom report: one standard axiom. leanchecker, fresh: accepts. nanoda (Lean 4.35.0 build): accepts. What catches it: reading the definition.

```lean
def MyPrime (n : Nat) : Prop := ∀ d : Nat, d ∣ n → d = 1 ∨ d = n

theorem Demo.one_is_prime : MyPrime 1 := by
  intro d h
  exact Or.inl (Nat.dvd_one.mp h)
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/WrongDefinition.lean](demos/Demo/WrongDefinition.lean); Lean theorem named in the code block above.

## Theorem 7: the kernel-check-off file, False stored unchecked (Sonny, 2026)

**Credit:** Sonny (2026), with the re-check by leanchecker (Kim Morrison and Sebastian Ullrich).

False, stored with kernel checking turned off, then $2 + 2 = 5$ from it.

**Status:** Stored with kernel checking turned off, rejected by the re-check. Build: passes. Axiom report: none. leanchecker, fresh: rejects. nanoda (Lean 4.35.0 build): does not accept, internal assertion failure. What catches it: the re-check through the kernel.

```lean
set_option debug.skipKernelTC true in
run_cmd liftCoreM <| addDecl (Declaration.thmDecl
  { name := `Demo.unchecked, levelParams := [], type := mkConst ``False, value := mkConst ``True.intro })

theorem Demo.wrong : 2 + 2 = 5 := Demo.unchecked.elim
```

**Proof:** [chapters/03-two-plus-two-is-five.md](chapters/03-two-plus-two-is-five.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)), file [demos/Demo/SkipKernelTC.lean](demos/Demo/SkipKernelTC.lean); Lean declarations named in the code block above.

## Open questions

### A second-kernel run with lean4lean

**Credit:** Sonny (2026).

Whether the seven files are accepted by a run of lean4lean, a second separately written kernel. The copy in the Lean 4.35.0 toolchain folder could not read the compiled files here ("incompatible header"), so no lean4lean result is claimed.

**Status:** Open.

**Proof:** none; see [chapters/04-kernel-bugs-and-second-checkers.md](chapters/04-kernel-bugs-and-second-checkers.md) ([https://gocheckyourself.org/read/lean-verified/experts/](https://gocheckyourself.org/read/lean-verified/experts/)).
