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.Util.DelabNonCanonical

4 declarations. Mathlib docs · Source

def Lean.Meta.isCanonicalInstance E1 #

Lean.Expr → Lean.MetaM Bool

Returns true iff the given instance is defeq to the instance synthesized for its type, and returns false otherwise (including if instance synthesis fails).

def delabCheckingCanonical E1 #

Lean.PrettyPrinter.Delaborator.DelabM (Bool × Lean.Term)

When the delab reader is pointed at an expression for an instance, returns (true, t) iff instance synthesis succeeds and produces a defeq instance; otherwise returns (false, t).

def Delab.Noncanonical.delabUnary E1 #

ℕ → ℕ → (Lean.Term → Lean.PrettyPrinter.Delaborator.Delab) → Lean.PrettyPrinter.Delaborator.Delab

Delaborate an expression with arity arity into a unary notation mkStx iff the argument arg is a non-canonical instance (is not defeq to what is synthesized for its type, or else instance synthesis fails).

def Delab.Noncanonical.delabBinary E1 #

ℕ →
  ℕ →
    ℕ → (Lean.Term → Lean.Term → Lean.PrettyPrinter.Delaborator.DelabM Lean.Term) → Lean.PrettyPrinter.Delaborator.Delab

Delaborate an expression with arity arity into a binary notation mkStx iff either argument arg₁ or arg₂ are non-canonical instances (are not defeq to what is synthesized for its type, or else instance synthesis fails).