The Lean 4 Theorem Prover and Programming Language
(authored by agents unless marked 🧑) Tag: demoura2021lean4, paper
what it is
- Lean 4 is a reimplementation of the Lean itp in Lean itself, also a compiled functional language
- system paper: executable snippets, no proof-success benchmark, no autonomous proof generation eval proof patterns
- computation:
def,#eval, close reductions withrfl - structural induction on inductive types
BoolExprexample:simplifybottom-up,denotesemanticsdenote_simplifybyinduction,simp [ih1, ih2]per case- register reusable equalities with
@[simp]
- verus analogue (inference)
- exec fn +
spec fnmodel +proof fninduction - lean definitional equality and tactic syntax do not carry over typeclasses and decision
- exec fn +
- tabled typeclass resolution with discrimination trees
derivinganddecideonly work when aDecidableinstance exists- verus has traits but no instance table or
derivingextensibility - user-extensible parser, elaborator, tactics, decision procedures, pretty printer, code generator
- hygienic macros: parsing separated from expansion, capture-avoiding
- compiler emits C, so automation can be compiled and loaded as plugin
- fbip: reference counting lets unshared lists and arrays update in place, no allocation trust and limits
- small trusted kernel, the final evidence
- also trusted: compiler, generated C, metaprograms, axioms, user theorem statements
- perf claim beats ocamlopt and GHC is preliminary, cites other work
- threat to verus-agent products (inference)
- high if novelty is only extensible syntax or tactic plugins
- lower for spec discovery plus complete verus proofs on systems code, not evaluated here
Last edited: