Documentation

Mathlib.CategoryTheory.CommSq

Commutative squares #

This file provide an API for commutative squares in categories. If top, left, right and bottom are four morphisms which are the edges of a square, CommSq top left right bottom is the predicate that this square is commutative.

The structure CommSq is extended in CategoryTheory/Shapes/Limits/CommSq.lean as IsPullback and IsPushout in order to define pullback and pushout squares.

Future work #

Refactor LiftStruct from Arrow.lean and lifting properties using CommSq.lean.

structure CategoryTheory.CommSq {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : C} (f : W X) (g : W Y) (h : X Z) (i : Y Z) :

The proposition that a square

  W ---f---> X
  |          |
  g          h
  |          |
  v          v
  Y ---i---> Z

is a commuting square.

Instances For
    theorem CategoryTheory.CommSq.flip {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : C} {f : W X} {g : W Y} {h : X Z} {i : Y Z} (p : CategoryTheory.CommSq f g h i) :
    theorem CategoryTheory.CommSq.op {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : C} {f : W X} {g : W Y} {h : X Z} {i : Y Z} (p : CategoryTheory.CommSq f g h i) :
    CategoryTheory.CommSq i.op h.op g.op f.op

    The commutative square in the opposite category associated to a commutative square.

    theorem CategoryTheory.CommSq.unop {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : Cᵒᵖ} {f : W X} {g : W Y} {h : X Z} {i : Y Z} (p : CategoryTheory.CommSq f g h i) :
    CategoryTheory.CommSq i.unop h.unop g.unop f.unop

    The commutative square associated to a commutative square in the opposite category.

    theorem CategoryTheory.CommSq.vert_inv {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : C} {f : W X} {i : Y Z} {g : W Y} {h : X Z} (p : CategoryTheory.CommSq f g.hom h.hom i) :
    CategoryTheory.CommSq i g.inv h.inv f
    theorem CategoryTheory.CommSq.horiz_inv {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Z : C} {g : W Y} {h : X Z} {f : W X} {i : Y Z} (p : CategoryTheory.CommSq f.hom g h i.hom) :
    CategoryTheory.CommSq f.inv h g i.inv
    theorem CategoryTheory.CommSq.horiz_comp {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X X' Y Z Z' : C} {f : W X} {f' : X X'} {g : W Y} {h : X Z} {h' : X' Z'} {i : Y Z} {i' : Z Z'} (hsq₁ : CategoryTheory.CommSq f g h i) (hsq₂ : CategoryTheory.CommSq f' h h' i') :

    The horizontal composition of two commutative squares as below is a commutative square.

      W ---f---> X ---f'--> X'
      |          |          |
      g          h          h'
      |          |          |
      v          v          v
      Y ---i---> Z ---i'--> Z'
    
    
    theorem CategoryTheory.CommSq.vert_comp {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y Y' Z Z' : C} {f : W X} {g : W Y} {g' : Y Y'} {h : X Z} {h' : Z Z'} {i : Y Z} {i' : Y' Z'} (hsq₁ : CategoryTheory.CommSq f g h i) (hsq₂ : CategoryTheory.CommSq i g' h' i') :

    The vertical composition of two commutative squares as below is a commutative square.

      W ---f---> X
      |          |
      g          h
      |          |
      v          v
      Y ---i---> Z
      |          |
      g'         h'
      |          |
      v          v
      Y'---i'--> Z'
    
    
    theorem CategoryTheory.CommSq.eq_of_mono {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y : C} {f g : W X} {i : X Y} [CategoryTheory.Mono i] (sq : CategoryTheory.CommSq f g i i) :
    f = g
    theorem CategoryTheory.CommSq.eq_of_epi {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {W X Y : C} {f : W X} {h i : X Y} [CategoryTheory.Epi f] (sq : CategoryTheory.CommSq f f h i) :
    h = i
    theorem CategoryTheory.Functor.map_commSq {C : Type u_1} [CategoryTheory.Category.{u_3, u_1} C] {D : Type u_2} [CategoryTheory.Category.{u_4, u_2} D] (F : CategoryTheory.Functor C D) {W X Y Z : C} {f : W X} {g : W Y} {h : X Z} {i : Y Z} (s : CategoryTheory.CommSq f g h i) :
    CategoryTheory.CommSq (F.map f) (F.map g) (F.map h) (F.map i)
    theorem CategoryTheory.CommSq.map {C : Type u_1} [CategoryTheory.Category.{u_3, u_1} C] {D : Type u_2} [CategoryTheory.Category.{u_4, u_2} D] (F : CategoryTheory.Functor C D) {W X Y Z : C} {f : W X} {g : W Y} {h : X Z} {i : Y Z} (s : CategoryTheory.CommSq f g h i) :
    CategoryTheory.CommSq (F.map f) (F.map g) (F.map h) (F.map i)

    Alias of CategoryTheory.Functor.map_commSq.

    structure CategoryTheory.CommSq.LiftStruct {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
    Type u_2

    Now we consider a square:

      A ---f---> X
      |          |
      i          p
      |          |
      v          v
      B ---g---> Y
    

    The datum of a lift in a commutative square, i.e. an up-right-diagonal morphism which makes both triangles commute.

    Instances For
      theorem CategoryTheory.CommSq.LiftStruct.ext {C : Type u_1} {inst✝ : CategoryTheory.Category.{u_2, u_1} C} {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} {x y : sq.LiftStruct} (l : x.l = y.l) :
      x = y
      def CategoryTheory.CommSq.LiftStruct.op {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} (l : sq.LiftStruct) :
      .LiftStruct

      A LiftStruct for a commutative square gives a LiftStruct for the corresponding square in the opposite category.

      Equations
      • l.op = { l := l.l.op, fac_left := , fac_right := }
      Instances For
        @[simp]
        theorem CategoryTheory.CommSq.LiftStruct.op_l {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} (l : sq.LiftStruct) :
        l.op.l = l.l.op
        def CategoryTheory.CommSq.LiftStruct.unop {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : Cᵒᵖ} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} (l : sq.LiftStruct) :
        .LiftStruct

        A LiftStruct for a commutative square in the opposite category gives a LiftStruct for the corresponding square in the original category.

        Equations
        • l.unop = { l := l.l.unop, fac_left := , fac_right := }
        Instances For
          @[simp]
          theorem CategoryTheory.CommSq.LiftStruct.unop_l {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : Cᵒᵖ} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} (l : sq.LiftStruct) :
          l.unop.l = l.l.unop
          def CategoryTheory.CommSq.LiftStruct.opEquiv {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
          sq.LiftStruct .LiftStruct

          Equivalences of LiftStruct for a square and the corresponding square in the opposite category.

          Equations
          Instances For
            @[simp]
            theorem CategoryTheory.CommSq.LiftStruct.opEquiv_apply {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) (l : sq.LiftStruct) :
            @[simp]
            theorem CategoryTheory.CommSq.LiftStruct.opEquiv_symm_apply {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) (l : .LiftStruct) :
            def CategoryTheory.CommSq.LiftStruct.unopEquiv {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : Cᵒᵖ} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
            sq.LiftStruct .LiftStruct

            Equivalences of LiftStruct for a square in the oppositive category and the corresponding square in the original category.

            Equations
            Instances For
              instance CategoryTheory.CommSq.subsingleton_liftStruct_of_epi {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [CategoryTheory.Epi i] :
              Subsingleton sq.LiftStruct
              Equations
              • =
              instance CategoryTheory.CommSq.subsingleton_liftStruct_of_mono {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [CategoryTheory.Mono p] :
              Subsingleton sq.LiftStruct
              Equations
              • =
              class CategoryTheory.CommSq.HasLift {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :

              The assertion that a square has a LiftStruct.

              Instances
                theorem CategoryTheory.CommSq.HasLift.mk' {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} {sq : CategoryTheory.CommSq f i p g} (l : sq.LiftStruct) :
                sq.HasLift
                theorem CategoryTheory.CommSq.HasLift.iff {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
                sq.HasLift Nonempty sq.LiftStruct
                theorem CategoryTheory.CommSq.HasLift.iff_op {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
                sq.HasLift .HasLift
                theorem CategoryTheory.CommSq.HasLift.iff_unop {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : Cᵒᵖ} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) :
                sq.HasLift .HasLift
                noncomputable def CategoryTheory.CommSq.lift {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [hsq : sq.HasLift] :
                B X

                A choice of a diagonal morphism that is part of a LiftStruct when the square has a lift.

                Equations
                • sq.lift = .some.l
                Instances For
                  @[simp]
                  theorem CategoryTheory.CommSq.fac_left {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [hsq : sq.HasLift] :
                  @[simp]
                  theorem CategoryTheory.CommSq.fac_left_assoc {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [hsq : sq.HasLift] {Z : C} (h : X Z) :
                  @[simp]
                  theorem CategoryTheory.CommSq.fac_right {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [hsq : sq.HasLift] :
                  @[simp]
                  theorem CategoryTheory.CommSq.fac_right_assoc {C : Type u_1} [CategoryTheory.Category.{u_2, u_1} C] {A B X Y : C} {f : A X} {i : A B} {p : X Y} {g : B Y} (sq : CategoryTheory.CommSq f i p g) [hsq : sq.HasLift] {Z : C} (h : Y Z) :