GCY Go Check Yourself
Archive Audits What “Lean-Verified” Means

What “Lean-Verified” Means, and What It Does Not — Seven Lean 4.34.1 Anti-Spoofing Demonstrations

Author: Sonny Proved Cited Open ReplayKernel Toolchain: Lean 4.34.1 (commit 5045d005, zero Mathlib) + nanoda_bin 0.4.19 (Lean 4.35.0) Kids Edition · The GCY Standard
Interactive External Link · Zero Embedded Scripts

Want to test the tiny honest 2 + 2 = 4 file without installing Lean? Open Demo.Honest (2 + 2 = 4) in Lean 4 Web → (opens external live.lean-lang.org in a new tab; this page loads zero external scripts or iframes).

The question in one sentence: For seven tiny standalone Lean 4.34.1 files that each print Build completed successfully — five of which appear to establish 2+2=52 + 2 = 5 and one of which calls 1 prime — which automated checks accept them, and what catches each flaw? Result: 3 definition/type spoofs pass every automated kernel check (including a separate Rust kernel) and are caught only by reading the formal statement and definitions in scope; 2 axiom/placeholder tricks are caught by #print axioms and strict axiom rules; and 1 kernel-skip trick passes lake build cleanly and is rejected only by replaying the stored proof through leanchecker or nanoda. Directly underpins The GCY Standard (Gates G1–G11).

Complete Side-by-Side Matrix · Lean 4.34.1 + Lean 4.35.0 / nanoda

1. What Each File Says & What Each Check Reported

Core Lean 4.34.1 (commit 5045d005, zero Mathlib) ran every build and leanchecker replay (both default and --fresh). Because leanexport 3.1.0 and nanoda_bin 0.4.19 ship inside Lean 4.35.0 (commit eb6cafb7), the nanoda column ran on the Lean 4.35.0 build of the exact same source files with permitted axioms restricted to [propext, Classical.choice, Quot.sound].

DemoFormal Statementlake buildAxiom Reportleanchecker & --freshnanoda (4.35.0 build)What Catches It
Honest file
Demo.Honest
2+2=42 + 2 = 4 on Nat by rfl Passes None Accepts (both) Checked 38 decls Nothing needed — honest baseline
Added axiom
Demo.AddedAxiom
2+2=52 + 2 = 5 via custom axiom Demo.bad Passes Lists Demo.bad Accepts (both) Refuses unpermitted axiom Demo.bad The axiom report & strict axiom policy
Unfinished proof
Demo.UsesSorry
2+2=52 + 2 = 5 via placeholder sorry Passes (warning) Lists sorryAx Accepts (both) Refuses unpermitted axiom sorryAx Build warning & axiom report
One-number system
Demo.SmallerNumberSystem
2+2=52 + 2 = 5 inside Fin 1 (0∈Fin  10 \in \mathrm{Fin}\;1) Passes [propext] Accepts (both) Checked 294 decls Reading the statement (types in scope)
Different plus sign
Demo.RedefinedPlus
2+2=52 + 2 = 5 under local Add Nat (+1) Passes None Accepts (both) Checked 38 decls Reading definitions (#synth Add Nat)
Faulty definition
Demo.WrongDefinition
MyPrime 1 omitting 2≤n2 \le n Passes [propext] Accepts (both) Checked 198 decls Reading the definition
Kernel check off
Demo.SkipKernelTC
False via debug.skipKernelTC, then 2+2=52 + 2 = 5 Passes None Rejects (exit 1) Fails (panic, exit 101) Kernel replay (lake env leanchecker)
Exact Code & Outputs · Live Standalone Demos

2. Five Ways to Get 2+2=52 + 2 = 5 Past lake build

Honest Baseline (Demo.Honest)

theorem Demo.honest : 2 + 2 = 4 := rfl
#print axioms Demo.honest
-- Output: 'Demo.honest' does not depend on any axioms · nanoda: Checked 38 declarations

Trick 1 — Added Axiom (Demo.AddedAxiom)

Anyone can declare an arbitrary starting rule via axiom. Both lake build and leanchecker accept the file because no check was bypassed; #print axioms reports [Demo.bad] and nanoda refuses it under a standard three-axiom whitelist.

axiom Demo.bad : 2 + 2 = 5
theorem Demo.two_plus_two_is_five : 2 + 2 = 5 := Demo.bad
#print axioms Demo.two_plus_two_is_five
-- nanoda: Error: export file declares unpermitted axiom "Demo.bad"

Trick 2 — Unfinished Proof Placeholder (Demo.UsesSorry)

Using sorry succeeds with a warning (not an error) and inserts sorryAx into the axiom report. A log scraper checking only for Error: misses it.

theorem Demo.two_plus_two_is_five_sorry : 2 + 2 = 5 := by sorry
-- warning: declaration uses `sorry` · axiom: [sorryAx]
-- nanoda: Error: export file declares unpermitted axiom "sorryAx"

Tricks 3a, 3b & 3c — Valid Proofs About Altered Meanings (Caught ONLY by Human Statement Reading)

Here the proof and kernel trace are 100% genuine, so lake build, leanchecker, --fresh, and nanoda all pass cleanly:

  • One-number system (Demo.SmallerNumberSystem): theorem Demo.small_number_system : (2 + 2 : Fin 1) = 5 := by decide (modulo 1, both sides equal 0; axioms [propext]; nanoda checks 294 declarations).
  • Redefined + sign (Demo.RedefinedPlus): Inside a namespace, local instance : Add Nat := <fun a b => Nat.succ (Nat.add a b)> turns 2 + 2 = 5 into a zero-axiom rfl theorem; outside the namespace #synth Add Nat reverts to instAddNat.
  • Faulty definition (Demo.WrongDefinition): def MyPrime (n : Nat) : Prop := forall d : Nat, d | n -> d = 1 \/ d = n omits 2 ≤ n, letting Demo.one_is_prime : MyPrime 1 pass with [propext] and 198 nanoda declarations.

Trick 4 — Kernel Check Disabled (Demo.SkipKernelTC)

Enabling set_option debug.skipKernelTC true inside meta-code stores a declaration of type False whose proof term has type True.intro without invoking Lean's kernel during elaboration (or via build-file flags invisible in .lean source!). Both lake build and #print axioms look spotless, yet replaying the compiled .olean rejects it immediately:

$ lake env leanchecker Demo.SkipKernelTC
leanchecker found a problem in Demo.SkipKernelTC
uncaught exception: while replaying declaration 'Demo.unchecked':
(kernel) declaration type mismatch, 'Demo.unchecked' has type True but it is expected to have type False

$ lake env nanoda_bin config.json
thread 'main' panicked at src\tc.rs:955:71: assertion failed: self.def_eq(u, v)   # exit code 101
Toolchain Discipline · Lean #14576 · lean4lean Open

3. Kernel Soundness Bugs (#14576), Second Checkers & Open Limits

  • What happened in Lean issue #14576 (July 2026): Reported by Kiran Gopinathan (kiranandcode) after discovery by Ramana Kumar and fixed the same day via PR #14577 by Leonardo de Moura (shipped in Lean 4.32.2+, including both 4.34.1 and 4.35.0 used here). Nested inductive parametric arguments bypassed type checking, allowing an axiom-free 0 = 1 proof that also bypassed leanchecker (same kernel) and comparator, while nanoda resisted that bug yet required a separate fix for a Collatz disproof noted on oss-security (Jonathan Brossard, 2 Aug 2026) and lean4lean shared the original inductive port.
  • What this means: Agreement between independent kernels is strong empirical evidence, not an absolute guarantee; toolchain versions matter. Both 4.34.1 and 4.35.0 here include the #14577 fix, so the bug itself was not reproduced.
  • Why lean4lean stays marked Open: Mario Carneiro's lean4lean binary shipped in our Lean 4.35.0 folder failed with "incompatible header" on compiled .olean files, so zero lean4lean verification is claimed.
  • How The GCY Standard responds: Every Lean deposit on Go Check Yourself isolates a compact zero-Mathlib kernel core (pinned under trustLevel = 0), publishes Scoped Definition Audit tables mapping formal types to textbook math, and ships planted negative controls that invert definitions/constants to prove checks reject broken claims loudly.
Self-Contained Reproduction · Public Source Files

4. Run All Seven Demos Yourself (lean-verified Files & SHA-256)

All seven .lean source files, Lake configuration files, and the pinned SHA256SUMS.txt live directly under /data/files/lean-verified/ (full walkthrough in lean-verified-REPLICATE.md):

sha256sum -c certificates/SHA256SUMS.txt && cd lean && lake build Demo.Honest && lake env leanchecker --fresh Demo.SkipKernelTC

Optional Lean 4.35.0 + nanoda_bin 0.4.19 config (--fresh takes ~100 s and ~1 GB per demo; set LEAN_NUM_THREADS=2 to keep memory modest):

lake env leanexport Demo.<Name> -- <theorem_name> > export.ndjson && lake env nanoda_bin config.json

{
  "export_file_path": "export.ndjson",
  "permitted_axioms": ["propext", "Classical.choice", "Quot.sound"],
  "unpermitted_axiom_hard_error": true,
  "nat_extension": true,
  "string_extension": true,
  "print_success_message": true,
  "print_axioms": false,
  "num_threads": 1,
  "pp_to_stdout": false,
  "pp_declars": []
}
Public File Path (under /data/files/lean-verified/)SHA-256 Digest
demos/Demo/Honest.lean2c433c2bc1563475f0dcbf1c96659ad5a853fb0625b455fa9b107f1f4608f36f
demos/Demo/AddedAxiom.leana99d155e950dd1a59c540fb33f5cbde7224a06c7eb7b92d9b3ac141e5d04bd81
demos/Demo/UsesSorry.lean44a013f949d8c018817b64ce3673a00fc7f773964632fb1618dd280f0a5cd092
demos/Demo/SmallerNumberSystem.lean1ebb5a0216a24c2060fb08a414c52e60f473ef42fba1d2940fe3c79133af79b1
demos/Demo/RedefinedPlus.leana29da88148cb85000ae2874a5049c56f8b9fb2c609d57e6f7aa9a93a26beca60
demos/Demo/WrongDefinition.lean884281af9c1818640c7f1d72b1aa121304afe23ef90bac9f78f44d5ceabb411b
demos/Demo/SkipKernelTC.leane853101f51d13b281c6a270f9164f660edf05c6e763201d57a7821425bdb6676
lean/lean-toolchaind5edba4e4b8faad9c1baeadb265716d20d03be4d1a2647dc5e35b0c0325bea7b
lean/lakefile.tomlef4b1311a487ca31ff37e382c2bce0b38faf28ee8a465362e192ee4ad0d98ba0
lean/lake-manifest.jsoncb0ca2fdba8da778ddea7d9bac0f6f92cee623b85a012a5d3e797997d583df0d
Shoulders of Giants · CITED

5. Sources, Credits & Boundaries

  • Leonardo de Moura, Sebastian Ullrich, Kim Morrison & Lean FRO / Community: Lean 4 (Apache 2.0), Lake, leanchecker, lean4export, and Validating a Lean Proof reference chapter.
  • ammkrn (github.com/ammkrn/nanoda_lib): nanoda_bin 0.4.19 external Rust kernel.
  • Mario Carneiro: lean4lean (github.com/digama0/lean4lean, 2024; marked Open here due to header incompatibility).
  • Ramana Kumar, Kiran Gopinathan (kiranandcode) & Jonathan Brossard: July–August 2026 disclosures and Lean #14576 / #14577 postmortem; dumko2001, CaptainAni187 & hallerite for PrimeIntellect verifiers issue #2177.
  • A. Bastounis, F. Circelli & A. C. Hansen (arXiv:2610.08144, 2026) and J. Xin, A. Schneidman, C. Cummins, K. Ram, S. Ganesh & J. Limperg (AXLE, arXiv:2606.26442, 2026) on formal-to-informal alignment and verification utilities.