
Prove
Formal theorem proving with machine verification in Lean 4
What You Can Do
You can formally verify mathematical proofs by translating theorems into Lean 4 code, leveraging Mathlib's extensive library of formalized mathematics. The skill guides you through researching existing lemmas, designing proof strategies, testing approaches, implementing formal proofs, and verifying correctness—turning informal mathematical claims into machine-checked theorems without requiring deep Lean syntax expertise.
Features
research, design, test, implement, and verify proofs systematically
access 100,000+ formalized lemmas and theorems via Loogle type-aware search
find existing lemmas by mathematical structure, not just keywords
Claude produces production-ready proof scripts with proper syntax
test proof tactics incrementally before final verification
Lean 4 compiler confirms correctness; no human review needed
Web search and Loogle queries identify proven strategies
Clear templates for translating informal proofs to formal notation
Example Output
Example 1: Group Homomorphism Identity Preservation
theorem group_homomorphism_preserves_id (G H : Type*) [Group G] [Group H]
(φ : G →* H) : φ 1 = 1 :=
map_one φ
Proof verified: ✓ Compiles without errors
Example 2: Continuous Functions on Compact Sets
theorem continuous_on_compact_is_uniform (f : ℝ → ℝ) (K : Set ℝ)
(hf : ContinuousOn f K) (hK : IsCompact K) :
UniformContinuousOn f K :=
hf.uniformContinuousOn_of_compact hK
Proof verified: ✓ Uses Mathlib's compact space theorem (2 lemmas)
Example 3: Research Phase Output
For "Monsky's theorem":
- Located Mathlib.NumberTheory.Zsqrtd.Basic with relevant field theory
- Found 47 candidate lemmas via type signature matching
- Identified proof strategy: construct explicit counterexample using 2-adic valuation
What's Included
- SKILL.md: Complete 5-phase workflow specification with Lean 4 syntax templates
- Loogle search checklists: Type signature patterns for common mathematical structures (groups, rings, topology, analysis)
- Proof strategy templates: Induction, case analysis, contradiction, and term-mode proof skeletons
- Lean 4 tactic quick reference: Common tactics with examples (rw, simp, exact, apply, sorry)
- Mathlib navigation guide: How to browse and import modules for group theory, topology, and number theory
Who It's For
- Mathematicians and pure math researchers — Formalize theorems without learning theorem prover syntax
- Logic and computation theory specialists — Verify proof correctness at machine precision
- Academic mathematicians — Create publication-ready machine-verified proofs
- PhD students in mathematics — Formalize dissertation theorems for reproducibility
- Automated theorem proving practitioners — Scale proof verification across research libraries
Best For
- Formalizing existing mathematical theorems from papers and textbooks
- Verifying correctness of abstract algebra proofs (groups, rings, fields)
- Proving topology and analysis theorems (continuity, compactness, convergence)
- Generating Lean 4 code from informal mathematical statements
- Discovering related lemmas and proof strategies through Mathlib search







