Skip to content
DARC
■ Change #43 · wiki.edited

Lean tactic frameworks and automation (simp, aesop, omega, grind): Normalize Markdown to canonical form

by DARC wiki2026-10-22 20:31:01 UTCOpen the page →
explainer.student
− **Goals and tactics.** When you prove something in Lean you see a *goal*: the hypotheses you have and the statement still to prove. A *tactic* is a command that changes the goal, for example by rewriting an expression or by splitting "A and B" into two goals. A proof is a list of tactics that ends with no goals left. Each tactic also writes part of the proof term that the kernel checks at the end, so a tactic may use any trick it likes: if the trick is wrong, the kernel rejects the result.
+ **Goals and tactics.** When you prove something in Lean you see a _goal_: the hypotheses you have and the statement still to prove. A _tactic_ is a command that changes the goal, for example by rewriting an expression or by splitting "A and B" into two goals. A proof is a list of tactics that ends with no goals left. Each tactic also writes part of the proof term that the kernel checks at the end, so a tactic may use any trick it likes: if the trick is wrong, the kernel rejects the result.
**A small example.** To prove $n + 0 = n$ and $2n = n + n$ for natural numbers you might type `simp` for the first and `omega` for the second, and never write the low-level steps.
**The main tools.**
+
- **`simp`** rewrites the goal with a large list of simplification lemmas, such as $x\cdot 1 = x$, always from the complicated side to the simpler side, until nothing changes. It is the everyday clean-up tool, and its power comes from Mathlib's thousands of tagged lemmas.
- **`omega`** decides linear arithmetic over integers and natural numbers: statements built from $+$, $-$, comparisons and multiplication by constants. It either proves the goal or reports that it cannot.
- **`ring`**, **`linarith`** and **`norm_num`** prove polynomial identities, linear inequalities and numerical facts.
- **`aesop`** is a search: it tries registered rules (lemmas and tactics) in best-first order over a tree of goals, like a search algorithm from a programming course, and the tree can be inspected afterwards.
- **`grind`** works like an SMT solver, the kind of tool used to verify software and chips: it collects known equalities, merges terms that must be equal, instantiates general lemmas that match the goal and combines this with arithmetic reasoning.
**Why it matters.** Most lines of a formal proof are routine steps, so better automation makes projects shorter and cheaper. AI provers also emit tactics, so a tool that closes a whole class of goals in one call shrinks the search they must do.
**Trade-offs.** Heavy automation can be slow, and a proof that relies on `simp` can break when someone adds a new simp lemma to the library. Tool designers balance power against speed and stability, and that balance is still an active engineering question.
hash 205ba6a7b4c018f8bd41a014282c620e6feff284780626ce53960e23fe1d1735
previous 845665d5912d68e37508d697fe259af4361960db4ccd25a4b11aba51a3a44a62