Paper ReviewMathematics & StatisticsDesign Science Research
Lean-auto: Bridging Interactive Proof Assistants and Automated Theorem Provers
Lean 4 is the rising proof assistant for formalizing mathematicsโbut users must manually construct proofs tactic by tactic. Lean-auto connects Lean to external automated theorem provers, enabling one-click proof of routine goals that would otherwise require tedious manual construction.
By Sean K.S. Shin
This blog summarizes research trends based on published paper abstracts. Specific numbers or findings may contain inaccuracies. For scholarly rigor, always consult the original papers cited in each post.
Interactive theorem provers (ITPs) like Lean 4, Coq, and Isabelle enable mathematicians and computer scientists to construct machine-checked proofs of mathematical theorems and software correctness properties. The proofs are rigorousโevery step is verified against the system's foundational logicโbut the process of constructing them is painstaking. Users write proofs interactively, applying tactics one at a time, inspecting the resulting proof state, and deciding the next tactic. For complex proofs, this process can take hours or days of expert effort.
Automated theorem provers (ATPs) like E, Vampire, and Z3 take a different approach: given a logical formula, they search for a proof automatically, using resolution, superposition, and SMT (satisfiability modulo theories) techniques. ATPs are powerful for first-order logic but cannot directly handle the richer type theories that ITPs use.
Hammers bridge this gap: they translate goals from the ITP's type theory into first-order logic, send them to ATPs, and translate the proofs back. Isabelle's Sledgehammer has been the gold standard for yearsโhandling routine proof obligations automatically and freeing users to focus on the creative aspects of proof construction.
Lean 4, despite its rapid adoption, has lacked a mature hammer. Qian et al.'s Lean-auto fills this gap, providing the first production-quality interface between Lean 4 and external ATPs.
The Lean-auto Architecture
Lean-auto operates as a Lean 4 tactic that, when invoked, performs the following steps:
Goal extraction: Reads the current proof stateโthe goal to be proved and the available hypotheses
Translation: Converts the Lean 4 goal (expressed in dependent type theory) into first-order logic, handling the type-theoretic features (dependent types, universe polymorphism, type classes) that have no direct first-order counterpart
Premise selection: Identifies relevant lemmas from Lean's Mathlib library that might be useful for the proof, using machine learning-based relevance ranking
ATP invocation: Sends the translated goal and selected premises to one or more ATPs (E, Vampire, Z3, CVC5)
Proof reconstruction: If an ATP finds a proof, Lean-auto translates it back into a Lean 4 tactic script that Lean's kernel can verifyThe translation step is the most technically challenging. Lean 4's type theory is strictly more expressive than first-order logicโsome goals cannot be translated faithfully. Lean-auto handles this through a combination of encoding techniques (defunctionalization for higher-order functions, monomorphization for polymorphism) and graceful fallback (returning "unsolved" for goals that resist translation).
Machine Learning for Premise Selection
Piepenbrock's work on ML-guided ATP provides the theoretical foundation for Lean-auto's premise selection step. The Mathlib library contains over 200,000 theorems (as of 2025). Sending all of them to the ATP would overwhelm it; sending too few might omit the critical lemma. ML-based premise selectionโtrained on the corpus of existing Lean proofsโpredicts which lemmas are most likely to be useful for a given goal.
The ML model learns from the history of proof construction: when mathematicians proved similar goals in the past, which lemmas did they use? This historical data encodes expert mathematical judgment about lemma relevanceโjudgment that the ML model distills into a fast, automated relevance ranking.
Claims and Evidence
<
| Claim | Evidence | Verdict |
|---|
| Lean-auto provides functional hammer capability for Lean 4 | Integration with Mathlib demonstrated | โ
Demonstrated |
| Translation from dependent type theory to FOL is feasible | Encoding techniques handle common patterns | โ
Supported (with limitations) |
| ML-based premise selection improves ATP success rate | Consistent finding in Isabelle/Sledgehammer literature | โ
Well-established |
| Lean-auto matches Sledgehammer's capability | Lean-auto is newer and less mature | โ ๏ธ Approaching but not yet equivalent |
| Hammers eliminate the need for manual proof construction | Hammers handle routine goals; creative proof steps require human insight | โ ๏ธ Complements, not replaces |
Open Questions
Coverage: What fraction of Mathlib proof goals can Lean-auto solve automatically? Sledgehammer handles a significant fraction of Isabelle goals in benchmark evaluations. What is Lean-auto's success rate on comparable Lean 4 goals?Speed: ATP invocation adds latency to the proof development workflow. Can Lean-auto provide sub-second responses for the majority of solvable goals?Proof quality: ATP-generated proofs, translated back to Lean, may be longer and less readable than hand-written proofs. Can the reconstruction step produce concise, idiomatic Lean proofs?Integration with AI provers: Can Lean-auto integrate with LLM-based provers (Goedel-Prover, Seed-Prover) in addition to traditional ATPs? The combination of ATP rigor with LLM creativity might handle a broader range of goals.What This Means for Your Research
For Lean 4 users (an increasingly large community including mathematicians, computer scientists, and verification engineers), Lean-auto is an immediate productivity tool. Routine proof obligations that previously required manual tactic construction can now be dispatched with a single command.
For formal verification researchers, Lean-auto brings Lean 4 closer to parity with Isabelle in terms of automation infrastructureโa critical factor for Lean's adoption in industrial verification projects where proof engineer productivity determines project feasibility.
๋ฉด์ฑ
์กฐํญ: ์ด ๊ฒ์๋ฌผ์ ์ ๋ณด ์ ๊ณต์ ๋ชฉ์ ์ผ๋ก ํ ์ฐ๊ตฌ ๋ํฅ ๊ฐ์์ด๋ค. ํ์ ์ ์๋ฌผ์์ ์ธ์ฉํ๊ธฐ ์ ์ ๊ตฌ์ฒด์ ์ธ ์ฐ๊ตฌ ๊ฒฐ๊ณผ, ํต๊ณ ๋ฐ ์ฃผ์ฅ์ ์๋ณธ ๋
ผ๋ฌธ์ ํตํด ํ์ธํด์ผ ํ๋ค.
Lean-auto: ๋ํํ ์ฆ๋ช
๋ณด์กฐ๊ธฐ์ ์๋ ์ ๋ฆฌ ์ฆ๋ช
๊ธฐ์ ์ฐ๊ฒฐ
Lean 4, Coq, Isabelle๊ณผ ๊ฐ์ ๋ํํ ์ ๋ฆฌ ์ฆ๋ช
๊ธฐ(ITP)๋ ์ํ์์ ์ปดํจํฐ ๊ณผํ์๊ฐ ์ํ ์ ๋ฆฌ ๋ฐ ์ํํธ์จ์ด ์ ํ์ฑ ์์ฑ์ ๋ํ ๊ธฐ๊ณ ๊ฒ์ฆ ์ฆ๋ช
์ ๊ตฌ์ฑํ ์ ์๊ฒ ํด์ค๋ค. ์ฆ๋ช
์ ์๋ฐํ๋คโ๋ชจ๋ ๋จ๊ณ๊ฐ ์์คํ
์ ๊ธฐ์ด ๋
ผ๋ฆฌ์ ๋ํด ๊ฒ์ฆ๋๋คโ๊ทธ๋ฌ๋ ์ฆ๋ช
์ ๊ตฌ์ฑํ๋ ๊ณผ์ ์ ๋งค์ฐ ํ๋ค๋ค. ์ฌ์ฉ์๋ ๋ํํ์ผ๋ก ์ฆ๋ช
์ ์์ฑํ๋ฉฐ, ํ ๋ฒ์ ํ๋์ฉ ์ ์ (tactic)์ ์ ์ฉํ๊ณ , ๊ฒฐ๊ณผ๋ก ๋ํ๋๋ ์ฆ๋ช
์ํ๋ฅผ ๊ฒ์ฌํ ํ, ๋ค์ ์ ์ ์ ๊ฒฐ์ ํ๋ค. ๋ณต์กํ ์ฆ๋ช
์ ๊ฒฝ์ฐ ์ด ๊ณผ์ ์ ์ ๋ฌธ๊ฐ์ ๋
ธ๋ ฅ์ด ๋ช ์๊ฐ ๋๋ ๋ฉฐ์น ์ฉ ์์๋ ์ ์๋ค.
E, Vampire, Z3 ๊ฐ์ ์๋ ์ ๋ฆฌ ์ฆ๋ช
๊ธฐ(ATP)๋ ๋ค๋ฅธ ์ ๊ทผ ๋ฐฉ์์ ์ทจํ๋ค. ์ฃผ์ด์ง ๋
ผ๋ฆฌ ๊ณต์์ ๋ํด ๊ท๋ฉ(resolution), ์ค์ฒฉ(superposition), SMT(satisfiability modulo theories) ๊ธฐ๋ฒ์ ์ฌ์ฉํ์ฌ ์๋์ผ๋ก ์ฆ๋ช
์ ํ์ํ๋ค. ATP๋ 1์ฐจ ๋
ผ๋ฆฌ(first-order logic)์ ๊ฐ๋ ฅํ์ง๋ง, ITP๊ฐ ์ฌ์ฉํ๋ ๋ ํ๋ถํ ์ ํ ์ด๋ก (type theory)์ ์ง์ ์ฒ๋ฆฌํ ์ ์๋ค.
ํด๋จธ(Hammer)๋ ์ด ๊ฐ๊ทน์ ์ฐ๊ฒฐํ๋ค. ITP์ ์ ํ ์ด๋ก ์์ ๋ชฉํ๋ฅผ 1์ฐจ ๋
ผ๋ฆฌ๋ก ๋ณํํ๊ณ , ATP๋ก ์ ์กํ ํ, ์ฆ๋ช
์ ๋ค์ ๋ณํํ๋ค. Isabelle์ Sledgehammer๋ ์๋
๊ฐ ํ์ค์ผ๋ก ์๋ฆฌ ์ก์ ์์ผ๋ฉฐ, ์ผ์์ ์ธ ์ฆ๋ช
์๋ฌด๋ฅผ ์๋์ผ๋ก ์ฒ๋ฆฌํ๊ณ ์ฌ์ฉ์๊ฐ ์ฆ๋ช
๊ตฌ์ฑ์ ์ฐฝ์์ ์ธ ์ธก๋ฉด์ ์ง์คํ ์ ์๊ฒ ํด์ค๋ค.
Lean 4๋ ๋น ๋ฅธ ๋์
์๋ ๋ถ๊ตฌํ๊ณ ์ฑ์ํ ํด๋จธ๊ฐ ๋ถ์ฌํ๋ค. Qian ๋ฑ์ Lean-auto๋ ์ด ๊ฐ๊ทน์ ์ฑ์ฐ๋ฉฐ, Lean 4์ ์ธ๋ถ ATP ์ฌ์ด์ ์ฒซ ๋ฒ์งธ ํ๋ก๋์
ํ์ง ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํ๋ค.
Lean-auto ์ํคํ
์ฒ
Lean-auto๋ Lean 4 ์ ์ ๋ก ์๋ํ๋ฉฐ, ํธ์ถ ์ ๋ค์ ๋จ๊ณ๋ฅผ ์ํํ๋ค:
๋ชฉํ ์ถ์ถ: ํ์ฌ ์ฆ๋ช
์ํโ์ฆ๋ช
ํ ๋ชฉํ์ ์ฌ์ฉ ๊ฐ๋ฅํ ๊ฐ์คโ๋ฅผ ์ฝ๋๋ค
๋ณํ: Lean 4 ๋ชฉํ(์์กด ์ ํ ์ด๋ก ์ผ๋ก ํํ๋จ)๋ฅผ 1์ฐจ ๋
ผ๋ฆฌ๋ก ๋ณํํ๋ฉฐ, 1์ฐจ ๋
ผ๋ฆฌ์ ์ง์ ์ ์ธ ๋์๋ฌผ์ด ์๋ ์ ํ ์ด๋ก ์ ํน์ฑ(์์กด ์ ํ, ์ฐ์ฃผ ๋คํ์ฑ, ์ ํ ํด๋์ค)์ ์ฒ๋ฆฌํ๋ค
์ ์ ์ ํ: ๊ธฐ๊ณ ํ์ต ๊ธฐ๋ฐ ๊ด๋ จ์ฑ ์์๋ฅผ ์ฌ์ฉํ์ฌ ์ฆ๋ช
์ ์ ์ฉํ ์ ์๋ Lean์ Mathlib ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ๊ด๋ จ ๋ณด์กฐ์ ๋ฆฌ(lemma)๋ฅผ ์๋ณํ๋ค
ATP ํธ์ถ: ๋ณํ๋ ๋ชฉํ์ ์ ํ๋ ์ ์ ๋ฅผ ํ๋ ์ด์์ ATP(E, Vampire, Z3, CVC5)๋ก ์ ์กํ๋ค
์ฆ๋ช
์ฌ๊ตฌ์ฑ: ATP๊ฐ ์ฆ๋ช
์ ์ฐพ์ผ๋ฉด, Lean-auto๋ ์ด๋ฅผ Lean์ ์ปค๋์ด ๊ฒ์ฆํ ์ ์๋ Lean 4 ์ ์ ์คํฌ๋ฆฝํธ๋ก ๋ค์ ๋ณํํ๋ค๋ณํ ๋จ๊ณ๊ฐ ๊ธฐ์ ์ ์ผ๋ก ๊ฐ์ฅ ์ด๋ ต๋ค. Lean 4์ ์ ํ ์ด๋ก ์ 1์ฐจ ๋
ผ๋ฆฌ๋ณด๋ค ํํ๋ ฅ์ด ์๊ฒฉํ ๋ ๋์, ์ผ๋ถ ๋ชฉํ๋ ์ถฉ์คํ๊ฒ ๋ณํ๋ ์ ์๋ค. Lean-auto๋ ์ธ์ฝ๋ฉ ๊ธฐ๋ฒ(๊ณ ์ฐจ ํจ์๋ฅผ ์ํ ๋นํจ์ํ(defunctionalization), ๋คํ์ฑ์ ์ํ ๋จํํ(monomorphization))๊ณผ ์ ์ง์ ํด๋ฐฑ(๋ณํ์ ์ ํญํ๋ ๋ชฉํ์ ๋ํด "๋ฏธํด๊ฒฐ"์ ๋ฐํ)์ ์กฐํฉ์ ํตํด ์ด๋ฅผ ์ฒ๋ฆฌํ๋ค.
์ ์ ์ ํ์ ์ํ ๊ธฐ๊ณ ํ์ต
Piepenbrock์ ML ๊ธฐ๋ฐ ATP์ ๊ดํ ์ฐ๊ตฌ๋ Lean-auto์ ์ ์ ์ ํ ๋จ๊ณ์ ๋ํ ์ด๋ก ์ ๊ธฐ๋ฐ์ ์ ๊ณตํ๋ค. Mathlib ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ 2025๋
๊ธฐ์ค์ผ๋ก 200,000๊ฐ ์ด์์ ์ ๋ฆฌ๋ฅผ ํฌํจํ๊ณ ์๋ค. ์ด ๋ชจ๋๋ฅผ ATP์ ์ ์กํ๋ฉด ๊ณผ๋ถํ๊ฐ ๊ฑธ๋ฆฌ๊ณ , ๋๋ฌด ์ ๊ฒ ์ ์กํ๋ฉด ํต์ฌ ๋ณด์กฐ์ ๋ฆฌ๊ฐ ๋๋ฝ๋ ์ ์๋ค. ๊ธฐ์กด Lean ์ฆ๋ช
๋ง๋ญ์น๋ก ํ๋ จ๋ ML ๊ธฐ๋ฐ ์ ์ ์ ํ์ ์ฃผ์ด์ง ๋ชฉํ์ ๋ํด ์ด๋ค ๋ณด์กฐ์ ๋ฆฌ๊ฐ ๊ฐ์ฅ ์ ์ฉํ ์ง ์์ธกํ๋ค.
ML ๋ชจ๋ธ์ ์ฆ๋ช
๊ตฌ์ฑ์ ์ด๋ ฅ์ผ๋ก๋ถํฐ ํ์ตํ๋ค. ์ํ์๋ค์ด ๊ณผ๊ฑฐ์ ์ ์ฌํ ๋ชฉํ๋ฅผ ์ฆ๋ช
ํ ๋ ์ด๋ค ๋ณด์กฐ์ ๋ฆฌ๋ฅผ ์ฌ์ฉํ๋๊ฐ? ์ด ์ญ์ฌ์ ๋ฐ์ดํฐ๋ ๋ณด์กฐ์ ๋ฆฌ ๊ด๋ จ์ฑ์ ๋ํ ์ ๋ฌธ๊ฐ์ ์ํ์ ํ๋จ์ ์ธ์ฝ๋ฉํ๋ฉฐ, ML ๋ชจ๋ธ์ ์ด ํ๋จ์ ๋น ๋ฅด๊ณ ์๋ํ๋ ๊ด๋ จ์ฑ ์์๋ก ์ ์ ํ๋ค.
์ฃผ์ฅ๊ณผ ๊ทผ๊ฑฐ
<
| ์ฃผ์ฅ | ๊ทผ๊ฑฐ | ํ์ |
|---|
| Lean-auto๋ Lean 4์ ๊ธฐ๋ฅ์ ์ธ ํด๋จธ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ค | Mathlib์์ ํตํฉ์ด ์
์ฆ๋จ | โ
์
์ฆ๋จ |
| ์์กด ํ์
์ด๋ก ์์ FOL๋ก์ ๋ณํ์ ์คํ ๊ฐ๋ฅํ๋ค | ์ธ์ฝ๋ฉ ๊ธฐ๋ฒ์ด ์ผ๋ฐ์ ์ธ ํจํด์ ์ฒ๋ฆฌํ๋ค | โ
์ง์๋จ (์ ํ ์์) |
| ML ๊ธฐ๋ฐ ์ ์ ์ ํ์ด ATP ์ฑ๊ณต๋ฅ ์ ํฅ์์ํจ๋ค | Isabelle/Sledgehammer ๋ฌธํ์์ ์ผ๊ด๋๊ฒ ๋ฐ๊ฒฌ๋๋ ๊ฒฐ๊ณผ์ด๋ค | โ
์ถฉ๋ถํ ํ๋ฆฝ๋จ |
| Lean-auto๊ฐ Sledgehammer์ ์ญ๋์ ํ์ ํ๋ค | Lean-auto๋ ๋ ์ต์ ์ด๋ฉฐ ์ฑ์๋๊ฐ ๋ฎ๋ค | โ ๏ธ ๊ทผ์ ํ๊ณ ์์ผ๋ ์์ง ๋๋ฑํ์ง ์์ |
| Hammer๊ฐ ์๋ ์ฆ๋ช
๊ตฌ์ฑ์ ํ์์ฑ์ ์์ค๋ค | Hammer๋ ์ผ์์ ์ธ ๋ชฉํ๋ฅผ ์ฒ๋ฆฌํ๋ฉฐ, ์ฐฝ์์ ์ธ ์ฆ๋ช
๋จ๊ณ๋ ์ธ๊ฐ์ ํต์ฐฐ์ด ํ์ํ๋ค | โ ๏ธ ๋์ฒด๊ฐ ์๋ ๋ณด์ |
๋ฏธํด๊ฒฐ ์ง๋ฌธ
์ปค๋ฒ๋ฆฌ์ง: Lean-auto๊ฐ ์๋์ผ๋ก ํด๊ฒฐํ ์ ์๋ Mathlib ์ฆ๋ช
๋ชฉํ์ ๋น์จ์ ์ผ๋ง์ธ๊ฐ? Sledgehammer๋ ๋ฒค์น๋งํฌ ํ๊ฐ์์ Isabelle ๋ชฉํ์ ์๋น ๋ถ๋ถ์ ์ฒ๋ฆฌํ๋ค. ๋น๊ต ๊ฐ๋ฅํ Lean 4 ๋ชฉํ์ ๋ํ Lean-auto์ ์ฑ๊ณต๋ฅ ์ ์ผ๋ง์ธ๊ฐ?์๋: ATP ํธ์ถ์ ์ฆ๋ช
๊ฐ๋ฐ ์ํฌํ๋ก์ ์ง์ฐ ์๊ฐ์ ์ถ๊ฐํ๋ค. Lean-auto๋ ํด๊ฒฐ ๊ฐ๋ฅํ ๋ชฉํ์ ๋๋ถ๋ถ์ ๋ํด 1์ด ๋ฏธ๋ง์ ์๋ต์ ์ ๊ณตํ ์ ์๋๊ฐ?์ฆ๋ช
ํ์ง: Lean์ผ๋ก ์ญ๋ฒํ๋ ATP ์์ฑ ์ฆ๋ช
์ ์์์
์ผ๋ก ์์ฑ๋ ์ฆ๋ช
๋ณด๋ค ๊ธธ๊ณ ๊ฐ๋
์ฑ์ด ๋ฎ์ ์ ์๋ค. ์ฌ๊ตฌ์ฑ ๋จ๊ณ์์ ๊ฐ๊ฒฐํ๊ณ ๊ด์ฉ์ ์ธ Lean ์ฆ๋ช
์ ์์ฑํ ์ ์๋๊ฐ?AI ์ฆ๋ช
๊ธฐ์์ ํตํฉ: Lean-auto๋ ์ ํต์ ์ธ ATP ์ธ์๋ LLM ๊ธฐ๋ฐ ์ฆ๋ช
๊ธฐ(Goedel-Prover, Seed-Prover)์ ํตํฉ๋ ์ ์๋๊ฐ? ATP์ ์๋ฐ์ฑ๊ณผ LLM์ ์ฐฝ์์ฑ์ ๊ฒฐํฉํ๋ฉด ๋ ๋์ ๋ฒ์์ ๋ชฉํ๋ฅผ ์ฒ๋ฆฌํ ์ ์์ ๊ฒ์ด๋ค.์ฐ๊ตฌ์ ์ฃผ๋ ์์ฌ์
Lean 4 ์ฌ์ฉ์(์ํ์, ์ปดํจํฐ ๊ณผํ์, ๊ฒ์ฆ ์์ง๋์ด๋ฅผ ํฌํจํ์ฌ ์ ์ ์ปค์ง๋ ์ปค๋ฎค๋ํฐ)์๊ฒ Lean-auto๋ ์ฆ๊ฐ์ ์ธ ์์ฐ์ฑ ๋๊ตฌ์ด๋ค. ์ด์ ์ ์๋ ํํฑ ๊ตฌ์ฑ์ด ํ์ํ๋ ์ผ์์ ์ธ ์ฆ๋ช
์๋ฌด๋ ์ด์ ๋จ์ผ ๋ช
๋ น์ผ๋ก ์ฒ๋ฆฌํ ์ ์๋ค.
ํ์ ๊ฒ์ฆ ์ฐ๊ตฌ์์๊ฒ Lean-auto๋ ์๋ํ ์ธํ๋ผ ์ธก๋ฉด์์ Lean 4๋ฅผ Isabelle๊ณผ์ ๋๋ฑ์ฑ์ ๋ ๊ฐ๊น๊ฒ ๋ง๋ ๋ค. ์ด๋ ์ฆ๋ช
์์ง๋์ด์ ์์ฐ์ฑ์ด ํ๋ก์ ํธ ์คํ ๊ฐ๋ฅ์ฑ์ ๊ฒฐ์ ํ๋ ์ฐ์
์ฉ ๊ฒ์ฆ ํ๋ก์ ํธ์์ Lean์ ๋์
์ ์ํ ํต์ฌ ์์์ด๋ค.
References (2)
[1] Qian, Y., Clune, J., Barrett, C., & Avigad, J. (2025). Lean-auto: An Interface between Lean 4 and Automated Theorem Provers. arXiv:2505.14929.
[2] Piepenbrock, J. (2025). Guiding Automated Theorem Proving with Machine Learning.