
Description
The Lean 4 plugin gives a coding agent a set of commands for working on Lean 4 theorem proofs. It can draft declaration skeletons from informal claims, formalize statements interactively or autonomously from informal sources, and prove theorems cycle by cycle with explicit checkpoints or autonomously with stop budgets. Other commands search for counterexamples with certified refutations, save progress with a checkpoint commit, review proofs read-only, refactor them to use mathlib and golf them for brevity. A learn command teaches mathlib interactively, and a diagnose command handles cleanup and migration. The plugin is LSP-first and falls back to scripts when needed. Each command has a full specification in the commands folder, and a separate file holds worked transcripts. It is part of the lean4-skills project on GitHub and supports Claude Code and Codex.…
Highlights
- Draft Lean declarations from informal claims
- Guided and autonomous proving with checkpoints
- Proof review, refactoring and golfing
- Interactive mathlib learning
- Works in Claude Code and Codex
Ratings & Reviews
No ratings yet
Be the first to rate lean4.
People also visit
lean4 FAQ
What is the Lean 4 plugin?
A plugin for Lean 4 theorem proving that gives a coding agent commands for drafting, formalizing, proving, reviewing and refactoring Lean code.
Which commands are included?
Draft, formalize, autoformalize, prove, autoprove, disprove, checkpoint, review, refactor, golf, learn and diagnose. In Claude Code they run as /lean4 commands. In Codex you invoke $lean4 and ask for the workflow by name.
Does it need a language server?
It is LSP-first, so it uses Lean language server features where they are available and falls back to scripts otherwise.
Is it free?
The project is public on GitHub, in the cameronfreer/lean4-skills repository, and the plugin is listed as free.
Are there examples?
Yes. The plugin folder includes a command-examples file with worked transcripts of the commands.
What are the best lean4 alternatives?
Popular alternatives to lean4 include lean-explore, quasi-coder and warp-delegate. See all lean4 alternatives













