# Statement

**The question:** for seven small Lean files that each look fine, which checks accept them and which catch what is wrong? **The answer:** the table below gives, for each file, what the Lean statement says and what each check reported; five files are caught by reading the axiom report, a warning or the text, one is caught only by replaying the stored proof through the kernel, and the honest file needs nothing.

Setup: Lean 4.34.1 (x86_64 Windows build, commit 5045d005) with core Lean only; no Mathlib. Each demonstration is one short file in the demos folder of this book. The second-kernel column uses the same files built with Lean 4.35.0 (commit eb6cafb7), because the tools for it (leanexport and nanoda_bin 0.4.19) ship in that toolchain's folder.

## What each file says, and what each check reported

| Demo | What the Lean statement says | Build | Axiom report | leanchecker, fresh | nanoda (Lean 4.35.0 build) | What catches it |
| --- | --- | --- | --- | --- | --- | --- |
| Honest file | 2 + 2 = 4 on the natural numbers, by reflexivity | passes | none | accepts | accepts | nothing needed |
| Added axiom | 2 + 2 = 5 on the natural numbers, from an axiom declared in the file | passes | the added axiom | accepts | refuses: axiom not permitted | the axiom report |
| Unfinished proof | 2 + 2 = 5 on the natural numbers, proof is the placeholder sorry | passes, with a warning | the placeholder axiom | accepts | refuses: axiom not permitted | the warning and the axiom report |
| One-number system | 2 + 2 = 5 in the numbers below 1, so only 0 | passes | one standard axiom | accepts | accepts | reading the statement |
| Different plus sign | 2 + 2 = 5 where a local definition makes plus on natural numbers add one extra | passes | none | accepts | accepts | reading the definitions in scope |
| Faulty definition | 1 is prime, where the definition of prime forgets the condition of being at least 2 | passes | one standard axiom | accepts | accepts | reading the definition |
| Kernel check off | False, stored with kernel checking turned off, then 2 + 2 = 5 from it | passes | none | rejects | does not accept: internal assertion failure | the re-check through the kernel |

Reading the table: for the added axiom and the unfinished proof the extra assumption is visible in the axiom report. The one-number system, the different plus sign and the faulty definition are fully accepted by every automatic check, including a separately written kernel, and are caught only by a person reading what the statement and its definitions say. The kernel-check-off file is the only one a kernel rejects, and it does so because the declaration was stored without ever being checked.

The same switch can be set in a project's build file instead of a Lean file; then no Lean file mentions it.

The machine-readable version of the table is the demonstrations file in this folder.

## Where to go next

- What does each of these checks do, and what is each blind to? See [What "Lean-verified" does not mean](../chapters/02-what-it-does-not-mean.md).
- What do the real outputs look like? See [Five ways to get 2 + 2 = 5 past a build](../chapters/03-two-plus-two-is-five.md).
