"매 'works' 의 'cannot fail' 의 강제 proof". 매 software trust 의 정점. 매 seL4 / Compcert / Ethereum smart contract / aerospace 의 underlying. 매 LLM + Lean 의 fusion 의 매 IMO gold (DeepMind AlphaProof 2024) 의 milestone.
📖 핵심
매 spectrum
종류
Automation
매 사용처
SAT solver
full
매 boolean satisfiability
SMT solver
full
매 program verification
Proof assistant (interactive)
partial
매 deep math + OS
Auto-tactic + LLM
hybrid
매 modern (AlphaProof)
매 tool
SAT/SMT
Z3 (Microsoft): 매 SMT, 매 hardware verify.
CVC5, Yices: SMT 의 alternative.
MiniSat / Glucose: SAT.
Interactive proof assistant
Lean 4 (Microsoft Research): 매 modern. 매 Mathlib.
Coq: 매 OG. 매 CompCert / Software Foundations.
Isabelle/HOL: 매 seL4 verify.
Agda: 매 dependent type.
F*: 매 program 의 spec.
Specification language
TLA+ (Lamport): 매 distributed system.
Alloy: 매 model finder.
Dafny: 매 functional spec.
Landmark
seL4 (NICTA, 2009): 매 OS kernel 의 functional correctness proof.
CompCert (INRIA): 매 verified C compiler.
AWS s2n / Encryption SDK: 매 crypto library.
CertiKOS: 매 OS kernel.
AlphaProof / AlphaGeometry (DeepMind 2024): 매 IMO silver / gold.
Lean 4 Mathlib: 매 1M line of formal math.
매 process (proof assistant)
Specification: 매 property 의 formal statement.
Proof script: 매 tactic 의 sequence.
Type check: 매 kernel 의 verify.
Tactic: 매 simp, rewrite, induction, ring, nlinarith, ...
매 LLM 의 결합
GPT-f / Lean-Gym (OpenAI): 매 tactic prediction.
AlphaProof: 매 self-play + Lean 4.
DeepSeek-Prover: 매 open-source.
MiniF2F benchmark: 매 high-school math.
→ 매 AI + symbolic verify 의 best of both.
매 수학 의 응용
매 Kepler conjecture (Hales, Coq).
매 Four color theorem (Coq).
매 Liquid tensor experiment (Lean, Scholze).
매 Polynomial Freiman-Ruzsa (Tao 2024, Lean Mathlib).
매 software 의 응용
Compiler: CompCert.
OS kernel: seL4.
Crypto: HACL*.
Smart contract: Move (Aptos), K framework.
Distributed: TLA+ (AWS, Azure).
Hardware: Intel, ARM 의 formal verify.
매 limitation
Specification effort: 매 spec 의 write 가 매 expensive.
Computability: 매 undecidable problem 도 있음.
Scaling: 매 large code 의 effort 폭발.
Maintenance: 매 spec change → 매 proof update.
💻 패턴
Lean 4 (basic)
-- 매 definitiondeffactorial:Nat→Nat|0=>1|n+1=>(n+1)*factorialn-- 매 theoremtheoremfactorial_pos:∀n,factorialn>0:=byintroninductionnwith|zero=>simp[factorial]|succkih=>simp[factorial]exactNat.mul_pos(Nat.succ_posk)ih
fromz3import*x=Int('x')y=Int('y')solver=Solver()solver.add(x+y==10)solver.add(x>0,y>0)solver.add(x*y==21)ifsolver.check()==sat:print(solver.model())# 매 [x = 7, y = 3] or [x = 3, y = 7]
fromlean_gymimportLeanGymgym=LeanGym()gym.start_proof(theorem="factorial_pos")whilenotgym.is_complete():state=gym.current_goal()tactic=llm.predict_tactic(state)# 매 LLM 의 proposesuccess=gym.apply_tactic(tactic)ifnotsuccess:tactic=llm.regenerate(state,blacklist=[tactic])
🤔 결정 기준
문제
Tool
Smart contract
Move / K / Dafny
OS kernel
Isabelle / Coq
Compiler
Coq (CompCert)
Crypto
F* (HACL*)
Distributed protocol
TLA+
Hardware
SystemVerilog + formal
Math research
Lean 4 + Mathlib
SAT/SMT
Z3
기본값: 매 critical = Lean / Coq + Z3. 매 distributed = TLA+. 매 smart contract = K / Move.
언제: 매 critical software (kernel, crypto, smart contract). 매 distributed protocol. 매 deep math. 매 ATP-LLM hybrid 의 research.
언제 X: 매 normal app (cost overrun). 매 spec 의 unclear (proof 의 X).
❌ 안티패턴
Spec 없이 prove: 매 wrong thing 의 prove.
모든 code 의 prove: 매 ROI X.
Lean 의 proof 의 LLM 의 generate without check: 매 fake.