Open source · Lean 4 · Mathlib v4.33

The theorem‑proving
agent that ends with

Give Lean‑Prover a theorem. It drafts a proof with an LLM, compiles it with lake, parses the diagnostics, and repairs — iteration after iteration — until the proof type‑checks against pinned Mathlib.

$ prover prove "theorem absl (a : ℤ) : a ≤ |a|"
[hammer] prover_finish (grind·ring·omega·+) 
[llm]    draft tactics            step 2 
[build]  lake env lean            step 3 
proved in 3 steps — no sorry, no axioms 
0/100
Curated benchmark — pure Lean hammers, zero LLM calls
0/100
Best agent score (Qwen3.8‑27B, $0 cost)
0+
Imported benchmark problems (MiniF2F · PutnamBench · FormalQualBench)
0
Native hammer tactics led by grind

The repair loop

Every proof attempt is a closed loop between the language model and the kernel. Nothing is accepted that does not type‑check.

Draft

The model writes tactic proofs — or the whole file in --full-file mode.

Compile

lake env lean verifies against pinned Lean v4.33 + Mathlib v4.33.

Diagnose

Diagnostics + live LSP goal states are fed back as structured feedback.

Repair

Fix exactly those errors; repeat until declaration uses 'sorry' never appears.

Before any LLM token is spent, a hammer pre‑pass tries grind · ring · omega · linarith · nlinarith · simp · norm_num · decide · aesop · tauto · positivity — solving more than half the calibration suite with zero cost.

Everything a proving stack needs

One CLI, one TUI, one MCP server — built for agents and humans alike.

Interactive TUI

Browse problems, watch live repairs, queue workers in parallel, slash commands, themes, autocomplete for 33 commands.

Session resume & branching

Every run is a JSONL event stream. Resume any session, branch at any turn, export as Markdown or JSON.

N×1

Best‑of‑N search

N trajectories at ramped temperatures; attempts ranked by goal-state heuristics, all kept for future resume.

🜚

Mathlib retrieval

Local lemma corpus search injects relevant proven lemmas into the prompt — a LeanDojo-style retrieval lever.

Autoformalization

prover formalize turns natural language into a compilable Lean theorem with compile-verified output.

Lightweight Comparator

Catches axiom injection, sorry smuggling and statement drift — the honest-verification layer FormalQualBench demands.

MCP + RPC servers

prove_theorem, benchmark_score, problems, validate_proof, loogle_search — usable from any MCP client or native JSON-RPC.

Training data tooling

SFT chat formats, Lean-verified proof corpus, synthetic problem generation and LoRA fine-tune recipes.

Provider-agnostic

Any OpenAI-compatible endpoint, per-difficulty model routing, atomic profile storage, OAuth flows for Codex & friends.

Extensions

Drop a Python file into data/examples/extensions/ — register tools, slash commands and input hooks at runtime.

Live Goal Feedback

Real-time LSP diagnostics — open goals, error traces and sorry positions streamed back into the repair loop.

Adaptive & Parallel

Auto-extends the step budget on progress, fans out --parallel workers and --workers in the TUI.

Benchmarks, honestly measured

Scores only mean something over problems that compile on our pinned Mathlib. Every import is type-checked; failures are flagged, never dropped.

BenchmarkProblemsType-check v4.33TierStatus
Curated 100 100100%trivial → hard 51/100 hammer baseline · 68/100 agent
MiniF2F test + valid 244 + 244100% / 100%AMC · AIME · IMO · MATH imported + verified
PutnamBench 672602 / 672Putnam 1962–2025 imported + verified
FormalQualBench 2320 / 23PhD qualifying level imported + verified

Live board below — every submitted score is kernel-verified with the lightweight Comparator. No sorry, no axioms past propext/choice, no statement drift.

Leaderboard

Kernel-verified scores on the curated 100-problem suite. Built from leaderboard.json at deploy time — updated by prover leaderboard --run.

Loading leaderboard…

Run it yourself

Three commands. No service, no lock-in — your endpoint, your models.

install
# Lean toolchain + Mathlib curl https://elan.lean-lang.org/elan-init.sh -sSf | sh cd lean && lake update && lake exe cache get && lake build # the agent pip install -e .
prove
prover prove "theorem absl (a : ℤ) : a ≤ |a|" # or best-of-N, full-file mode, adaptive steps prover prove "..." --n-attempts 3 --adaptive # natural language → Lean prover formalize "∀ a b : ℤ, a + b = b + a"
measure
prover bench --parallel 4 --report report.json # pure-Lean floor (no LLM) prover lean-baseline --tactic prover_finish # expose to Claude / opencode / Cursor prover mcp

The Lean/AI proving landscape

We track the whole frontier — and import its benchmarks directly.

Systems we study

  • Harmonic Aristotle — IMO gold, MCTS over Lean (closed)
  • DeepSeek-Prover V2 — 88.9% MiniF2F, open-weight RL recipe
  • Goedel-Prover V2 — 90.4% MiniF2F SOTA open
  • Gauss / OpenGauss — Comparator-verified FormalQualBench 8/23
  • LeanDojo / ReProver — retrieval-augmented proving

Where we stand

  • Open agent stack: TUI, MCP, sessions, extensions, OAuth
  • Verification: Lightweight Comparator (axiom/sorry/drift checks)
  • Data: SFT + RL recipes from kernel-verified corpora
  • Cost: free-endpoint $0 runs alongside frontier APIs
  • Roadmap: frontier RL + retrieval at 210k-lemma Mathlib scale