LeanProbe

•
1
•

Accelerates Lean 4 proof feedback for coding agents by reusing elaborated environments and keeping a Lean REPL warm.

LeanProbe is designed to dramatically speed up Lean 4 proof checking for automated coding agents and iterative development workflows. It acts as a Python package, CLI, and Model Context Protocol (MCP) server, leveraging LeanInteract to maintain a warm Lean REPL session. By intelligently reusing previously elaborated imports and declarations, it eliminates redundant compilation costs for sequential or repeated checks within the same file. This allows agents to quickly evaluate candidate declarations, inspect proof states, and refine proofs with real Lean responses, providing a significant performance advantage over full-file checks while complementing the broader capabilities of LSP-backed tools.

Key Features

01Offers CLI, Python library, and Model Context Protocol (MCP) server interfaces.
02Returns Lean diagnostics, warnings, `sorry` detection, tactic metadata, and goal states.
03Provides fast Lean 4 feedback via a warm REPL and cached environment reuse.
04Enables tactic-by-tactic proof state exploration for snippets.
05Benchmarks demonstrate significant speedups for repeated and sequential checks.
060 GitHub stars

Use Cases

01Providing rapid feedback to AI coding agents generating or refining Lean proofs.
02Iteratively checking multiple candidate declarations or replacements within a Lean file.
03Stepping through Lean proofs tactic by tactic to inspect intermediate states.