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.Widget.CommDiag

11 declarations. Mathlib docs · Source

This module defines tactic/meta infrastructure for displaying commutative diagrams in the infoview.

Metaprogramming utilities for breaking down category theory expressions

Widget for general commutative diagrams

Commutative triangles

Commutative squares

def Lean.Expr.app7? E1 #

Lean.Expr → Lean.Name → Option (Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr × Lean.Expr)

If the expression is a function application of fName with 7 arguments, return those arguments. Otherwise return none.

def Mathlib.Tactic.Widget.homType? E1 #

Lean.Expr → Option (Lean.Expr × Lean.Expr)

Given a Hom type α ⟶ β, return (α, β). Otherwise none.

def Mathlib.Tactic.Widget.homComp? E1 #

Lean.Expr → Option (Lean.Expr × Lean.Expr)

Given composed homs g ≫ h, return (g, h). Otherwise none.

abbrev Mathlib.Tactic.Widget.ExprEmbeds E1 #

Type

Expressions to display as labels in a diagram.

def Mathlib.Tactic.Widget.mkCommDiag E1 #

String → Mathlib.Tactic.Widget.ExprEmbeds → Lean.MetaM ProofWidgets.Html

Construct a commutative diagram from a Penrose substance program and expressions embeds to display as labels in the diagram.

def Mathlib.Tactic.Widget.subTriangle E1 #

String

Triangle with homs = [f,g,h] and objs = [A,B,C]

A f B
  h g
    C

def Mathlib.Tactic.Widget.commTriangleM? E1 #

Lean.Expr → Lean.MetaM (Option ProofWidgets.Html)

Given a commutative triangle f ≫ g = h or e ≡ h = f ≫ g, return a triangle diagram. Otherwise none.

def Mathlib.Tactic.Widget.commutativeTrianglePresenter E1 #

ProofWidgets.ExprPresenter

Presenter for a commutative triangle

def Mathlib.Tactic.Widget.subSquare E1 #

String

Square with homs = [f,g,h,i] and objs = [A,B,C,D]

A f B
i   g
D h C

def Mathlib.Tactic.Widget.commSquareM? E1 #

Lean.Expr → Lean.MetaM (Option ProofWidgets.Html)

Given a commutative square f ≫ g = i ≫ h, return a square diagram. Otherwise none.

def Mathlib.Tactic.Widget.commutativeSquarePresenter E1 #

ProofWidgets.ExprPresenter

Presenter for a commutative square