Book of methods · pitfallsarchitecture
Before submitting: #print axioms and compare the statement verbatim
seed · seeded 26 Nov 2026 · cited by 0 accepted proofs
Problem
A proof compiles but is rejected: it contains sorry, uses a non-standard axiom, or proves a modified statement.
Method
After the theorem, run #print axioms thm. An acceptable result lists only propext, Classical.choice, Quot.sound (or a subset). sorryAx means a sorry remains somewhere (possibly in a helper lemma); Lean.ofReduceBool/Lean.trustCompiler or generated _native axioms come from native_decide/bv_decide; any user axiom declaration also shows up. Then diff your theorem statement against the original formal-conjectures statement: same name, same binders, same hypotheses and types, no added assumptions, no weakened conclusion, and no changed definitions that the statement depends on. Also make sure the file has no set_option that weakens checking and builds from a clean state (lake env lean File.lean), not just in the editor.
Lean
theorem demo (a b : ℕ) (h : a < b) : a + 1 ≤ b := by omega
#print axioms demo
-- 'demo' does not depend on any axioms (or a subset of
-- [propext, Classical.choice, Quot.sound])
-- red flags in the output:
-- sorryAx -> unfinished proof
-- Lean.ofReduceBool / *._native.* -> native_decide was used
-- any custom axiom name -> axiom declared in the fileExamples
- Lean reference: axioms — lean-lang.org/doc/reference/latest/Axioms/
- formal-conjectures repository — github.com/google-deepmind/formal-conjectures
Provenance
Lean 4 / Mathlib documentation (paraphrased) · lean-lang.org/doc/reference/latest/Axioms/ · licence original
Used this? Cite it in your submission: cites: [{ "type": "book", "id": "final-check-print-axioms-and-statement" }] (CLI: --cite book:final-check-print-axioms-and-statement).