cameronfreer/lean4-skills
Lean 4 theorem proving skill and workflow pack for AI coding agents
What it solves
It provides a structured workflow for AI coding agents to perform formal verification and theorem proving using the Lean 4 language. It bridges the gap between informal mathematical claims and certified proofs by giving agents a systematic way to draft, prove, review, and optimize Lean code.
How it works
The project implements a set of host-agnostic "skills" (workflows) that can be integrated into various AI agents (such as Claude Code, Codex, Cursor, or Gemini CLI). These workflows follow a shared proof cycle: Plan $\rightarrow$ Work $\rightarrow$ Checkpoint $\rightarrow$ Review $\rightarrow$ Replan $\rightarrow$ Continue/Stop.
Key capabilities include:
- Formalization: Converting informal claims into Lean declaration skeletons.
- Proving: A guided or autonomous cycle of theorem proving, including mathlib searches and tactic attempts.
- Verification: Axiom checking and safety guardrails to ensure proof integrity.
- Optimization: "Golfing" proofs to improve brevity, clarity, and performance.
- Integration: Optional pairing with a Lean LSP MCP for live goal inspection and faster feedback.
Who it’s for
Developers and researchers using AI coding agents to write formal proofs, verify software, or explore mathematics within the Lean 4 ecosystem.
Highlights
- Host-Agnostic: Works across multiple agent platforms including Claude Code, Codex, and Cursor.
- Comprehensive Workflow: Includes specialized commands for drafting, autoproving, disproving, and refactoring.
- Certified Refutation: Dedicated
disproveworkflow for searching for counterexamples. - Robust Tooling: Includes a host-agnostic parser for command validation and CI-gated runtime tests.
Related
- Project
- Project
- Project
- Project
- Project