Use when working with Lean 4 (.lean files), writing mathematical proofs, seeing "failed to synthesize instance" errors, managing sorry/axiom elimination, or searching mathlib for lemmas - provides build-first workflow, haveI/letI patterns, compiler-guided repair, and LSP integration
View on GitHubcameronfreer/lean4-skills
lean4-theorem-proving
January 23, 2026
Select agents to install to:
npx add-skill https://github.com/cameronfreer/lean4-skills/blob/main/plugins/lean4-theorem-proving/skills/lean4-theorem-proving/SKILL.md -a claude-code --skill lean4-theorem-provingInstallation paths:
.claude/skills/lean4-theorem-proving/# Lean 4 Theorem Proving ## Core Principle **Build incrementally, structure before solving, trust the type checker.** Lean's type checker is your test suite. **Success = `lake build` passes + zero sorries + zero custom axioms.** Theorems with sorries/axioms are scaffolding, not results. ## Quick Reference | **Resource** | **What You Get** | **Where to Find** | |--------------|------------------|-------------------| | **Interactive Commands** | 10 slash commands for search, analysis, optimization, repair | Type `/lean` in Claude Code ([full guide](../../COMMANDS.md)) | | **Automation Scripts** | 19 tools for search, verification, refactoring, repair | Plugin `scripts/` directory ([scripts/README.md](../../scripts/README.md)) | | **Subagents** | 4 specialized agents for batch tasks (optional) | [subagent-workflows.md](references/subagent-workflows.md) | | **LSP Server** | 30x faster feedback with instant proof state (optional) | [lean-lsp-server.md](references/lean-lsp-server.md) | | **Reference Files** | 18 detailed guides (phrasebook, tactics, patterns, errors, repair, performance) | [List below](#reference-files) | ## When to Use Use for ANY Lean 4 development: pure/applied math, program verification, mathlib contributions. **Critical for:** Type class synthesis errors, sorry/axiom management, mathlib search, measure theory/probability work. ## Tools & Workflows **7 slash commands** for search, analysis, and optimization - type `/lean` in Claude Code. See [COMMANDS.md](../../COMMANDS.md) for full guide with examples and workflows. **16 automation scripts** for search, verification, and refactoring. See [scripts/README.md](../../scripts/README.md) for complete documentation. **Lean LSP Server** (optional) provides 30x faster feedback with instant proof state and parallel tactic testing. See [lean-lsp-server.md](references/lean-lsp-server.md) for setup and workflows. **Subagent delegation** (optional, Claude Code users) enables batch automation. See [sub