The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Clean

2 declarations and 3 deprecated aliases. Mathlib docs · Source

clean% term elaborator

Remove identity functions from a term.

def Lean.Expr.cleanConsts E1 #

List Lean.Name

List of names removed by the clean tactic. All of these names must resolve to functions defeq id.

def Lean.Expr.clean E1 #

Lean.Expr → Lean.Expr

Clean an expression by eliminating identify functions listed in cleanConsts. Also eliminates fun x => x applications and tautological let/have bindings.

Deprecated aliases

NameNew nameSince
Mathlib.Tactic.cleanStx2026-09-03
Mathlib.Tactic.elabClean2026-09-03
Mathlib.Tactic.tacticClean_2026-09-03