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 / V01. The language of Mathlib

Mathlib.Lean.Meta.Tactic.Rewrite

2 declarations. Mathlib docs · Source

def Lean.Expr.rewrite E1 #

Lean.Expr → Lean.Expr → Lean.MetaM Lean.Expr

Rewrites e via some eq, producing a proof e = e' for some e'.

Rewrites with a fresh metavariable as the ambient goal. Fails if the rewrite produces any subgoals.

def Lean.Expr.rewriteType E1 #

Lean.Expr → Lean.Expr → Lean.MetaM Lean.Expr

Rewrites the type of e via some eq, then moves e into the new type via Eq.mp.

Rewrites with a fresh metavariable as the ambient goal. Fails if the rewrite produces any subgoals.