Documentation

Mathlib.Tactic.Widget.CommDiag

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

@[inline]
def Lean.Expr.app7? (e : Expr) (fName : Name) :
Option (Expr × Expr × Expr × Expr × Expr × Expr × Expr)

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

Instances For

    Metaprogramming utilities for breaking down category theory expressions #

    def Mathlib.Tactic.Widget.homType? (e : Lean.Expr) :
    Option (Lean.Expr × Lean.Expr)

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

    Instances For
      def Mathlib.Tactic.Widget.homComp? (f : Lean.Expr) :
      Option (Lean.Expr × Lean.Expr)

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

      Instances For
        @[reducible, inline]

        Expressions to display as labels in a diagram.

        Instances For

          Widget for general commutative diagrams #

          def Mathlib.Tactic.Widget.mkCommDiag (sub : String) (embeds : ExprEmbeds) :
          Lean.MetaM ProofWidgets.Html

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

          Instances For

            Commutative triangles #

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

            A f B
              h g
                C
            
            Instances For
              def Mathlib.Tactic.Widget.commTriangleM? (e : 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.

              Instances For

                Presenter for a commutative triangle

                Instances For

                  Commutative squares #

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

                  A f B
                  i   g
                  D h C
                  
                  Instances For
                    def Mathlib.Tactic.Widget.commSquareM? (e : Lean.Expr) :
                    Lean.MetaM (Option ProofWidgets.Html)

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

                    Instances For
                      def Mathlib.Tactic.Widget.commutativeSquarePresenter :
                      ProofWidgets.ExprPresenter

                      Presenter for a commutative square

                      Instances For