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 / V24. Category theory

Mathlib.CategoryTheory.WithTerminal.Basic

250 declarations. Mathlib docs · Source

WithInitial and WithTerminal

Given a category C, this file constructs two objects:

  1. WithTerminal C, the category built from C by formally adjoining a terminal object.
  2. WithInitial C, the category built from C by formally adjoining an initial object.

The terminal resp. initial object is WithTerminal.star resp. WithInitial.star, and the proofs that these are terminal resp. initial are in WithTerminal.star_terminal and WithInitial.star_initial.

The inclusion from C into WithTerminal C resp. WithInitial C is denoted WithTerminal.incl resp. WithInitial.incl.

The relevant constructions needed for the universal properties of these constructions are:

  1. lift, which lifts F : C ⥤ D to a functor from WithTerminal C resp. WithInitial C in the case where an object Z : D is provided satisfying some additional conditions.
  2. inclLift shows that the composition of lift with incl is isomorphic to the functor which was lifted.
  3. liftUnique provides the uniqueness property of lift.

In addition to this, we provide WithTerminal.map and WithInitial.map providing the functoriality of these constructions with respect to functors on the base categories.

We define corresponding pseudofunctors WithTerminal.pseudofunctor and WithInitial.pseudofunctor from Cat to Cat.

theorem CategoryTheory.WithInitial.opEquiv.match_15.congr_eq_2 E1 #

∀ (C : Type u_1) (motive : CategoryTheory.WithTerminal Cᵒᵖ → Sort u_2) (x : CategoryTheory.WithTerminal Cᵒᵖ)
  (h_1 : (x : Cᵒᵖ) → motive (CategoryTheory.WithTerminal.of x)) (h_2 : Unit → motive CategoryTheory.WithTerminal.star),
  x = CategoryTheory.WithTerminal.star →
    (match x with
      | CategoryTheory.WithTerminal.of x => h_1 x
      | CategoryTheory.WithTerminal.star => h_2 ()) ≍
      h_2 ()

theorem CategoryTheory.WithInitial.of.inj E1 #

∀ {C : Type u} {a a_1 : C}, CategoryTheory.WithInitial.of a = CategoryTheory.WithInitial.of a_1 → a = a_1

theorem CategoryTheory.WithInitial.id.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithInitial C → Sort u_2) (x : CategoryTheory.WithInitial C)
  (h_1 : (a : C) → motive (CategoryTheory.WithInitial.of a)) (h_2 : Unit → motive CategoryTheory.WithInitial.star)
  (a : C),
  x = CategoryTheory.WithInitial.of a →
    (match x with
      | CategoryTheory.WithInitial.of a => h_1 a
      | CategoryTheory.WithInitial.star => h_2 ()) ≍
      h_1 a

theorem CategoryTheory.WithTerminal.of.injEq E0 #

∀ {C : Type u} (a a_1 : C), (CategoryTheory.WithTerminal.of a = CategoryTheory.WithTerminal.of a_1) = (a = a_1)

theorem CategoryTheory.WithInitial.comp.match_1.congr_eq_4 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithInitial C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithInitial.of _X) (CategoryTheory.WithInitial.of _Y) (CategoryTheory.WithInitial.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive (CategoryTheory.WithInitial.of _X) x CategoryTheory.WithInitial.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithInitial C) →
      (_Y : C) → motive x CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _Y))
  (h_5 : Unit → motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star)
  (x_3 : CategoryTheory.WithInitial C) (_Y : C),
  x = x_3 →
    x_1 = CategoryTheory.WithInitial.star →
      x_2 = CategoryTheory.WithInitial.of _Y →
        (match x, x_1, x_2 with
          | CategoryTheory.WithInitial.of _X, CategoryTheory.WithInitial.of _Y, CategoryTheory.WithInitial.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithInitial.of _X, x, CategoryTheory.WithInitial.star => h_2 _X x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _X, x => h_3 _X x
          | x, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _Y => h_4 x _Y
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star =>
            h_5 ()) ≍
          h_4 x_3 _Y

abbrev CategoryTheory.WithInitial.ctorElimType E1 #

{C : Type u} → {motive : CategoryTheory.WithInitial C → Sort u_1} → ℕ → Sort (max 1 u_1 (imax (u + 1) u_1))

theorem CategoryTheory.WithTerminal.comp.match_1.congr_eq_3 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithTerminal C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithTerminal.of _X) (CategoryTheory.WithTerminal.of _Y)
        (CategoryTheory.WithTerminal.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive (CategoryTheory.WithTerminal.of _X) x CategoryTheory.WithTerminal.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithTerminal C) →
      (_Y : C) → motive x CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _Y))
  (h_5 :
    Unit → motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star)
  (_X : C) (x_3 : CategoryTheory.WithTerminal C),
  x = CategoryTheory.WithTerminal.star →
    x_1 = CategoryTheory.WithTerminal.of _X →
      x_2 = x_3 →
        (match x, x_1, x_2 with
          | CategoryTheory.WithTerminal.of _X, CategoryTheory.WithTerminal.of _Y, CategoryTheory.WithTerminal.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithTerminal.of _X, x, CategoryTheory.WithTerminal.star => h_2 _X x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _X, x => h_3 _X x
          | x, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _Y => h_4 x _Y
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star =>
            h_5 ()) ≍
          h_3 _X x_3

theorem CategoryTheory.WithTerminal.Hom.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 : CategoryTheory.WithTerminal C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithTerminal.of X) (CategoryTheory.WithTerminal.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of a))
  (h_3 : (x : CategoryTheory.WithTerminal C) → motive x CategoryTheory.WithTerminal.star) (X Y : C),
  x = CategoryTheory.WithTerminal.of X →
    x_1 = CategoryTheory.WithTerminal.of Y →
      (match x, x_1 with
        | CategoryTheory.WithTerminal.of X, CategoryTheory.WithTerminal.of Y => h_1 X Y
        | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of a => h_2 a
        | x, CategoryTheory.WithTerminal.star => h_3 x) ≍
        h_1 X Y

theorem CategoryTheory.WithInitial.comp.match_1.congr_eq_1 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithInitial C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithInitial.of _X) (CategoryTheory.WithInitial.of _Y) (CategoryTheory.WithInitial.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive (CategoryTheory.WithInitial.of _X) x CategoryTheory.WithInitial.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithInitial C) →
      (_Y : C) → motive x CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _Y))
  (h_5 : Unit → motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star)
  (_X _Y _Z : C),
  x = CategoryTheory.WithInitial.of _X →
    x_1 = CategoryTheory.WithInitial.of _Y →
      x_2 = CategoryTheory.WithInitial.of _Z →
        (match x, x_1, x_2 with
          | CategoryTheory.WithInitial.of _X, CategoryTheory.WithInitial.of _Y, CategoryTheory.WithInitial.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithInitial.of _X, x, CategoryTheory.WithInitial.star => h_2 _X x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _X, x => h_3 _X x
          | x, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _Y => h_4 x _Y
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star =>
            h_5 ()) ≍
          h_1 _X _Y _Z

theorem CategoryTheory.WithTerminal.comp.match_1.congr_eq_1 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithTerminal C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithTerminal.of _X) (CategoryTheory.WithTerminal.of _Y)
        (CategoryTheory.WithTerminal.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive (CategoryTheory.WithTerminal.of _X) x CategoryTheory.WithTerminal.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithTerminal C) →
      (_Y : C) → motive x CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _Y))
  (h_5 :
    Unit → motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star)
  (_X _Y _Z : C),
  x = CategoryTheory.WithTerminal.of _X →
    x_1 = CategoryTheory.WithTerminal.of _Y →
      x_2 = CategoryTheory.WithTerminal.of _Z →
        (match x, x_1, x_2 with
          | CategoryTheory.WithTerminal.of _X, CategoryTheory.WithTerminal.of _Y, CategoryTheory.WithTerminal.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithTerminal.of _X, x, CategoryTheory.WithTerminal.star => h_2 _X x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _X, x => h_3 _X x
          | x, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _Y => h_4 x _Y
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star =>
            h_5 ()) ≍
          h_1 _X _Y _Z

theorem CategoryTheory.WithTerminal.comp.match_1.congr_eq_2 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithTerminal C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithTerminal.of _X) (CategoryTheory.WithTerminal.of _Y)
        (CategoryTheory.WithTerminal.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive (CategoryTheory.WithTerminal.of _X) x CategoryTheory.WithTerminal.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithTerminal C) →
      (_Y : C) → motive x CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _Y))
  (h_5 :
    Unit → motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star)
  (_X : C) (x_3 : CategoryTheory.WithTerminal C),
  x = CategoryTheory.WithTerminal.of _X →
    x_1 = x_3 →
      x_2 = CategoryTheory.WithTerminal.star →
        (match x, x_1, x_2 with
          | CategoryTheory.WithTerminal.of _X, CategoryTheory.WithTerminal.of _Y, CategoryTheory.WithTerminal.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithTerminal.of _X, x, CategoryTheory.WithTerminal.star => h_2 _X x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _X, x => h_3 _X x
          | x, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _Y => h_4 x _Y
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star =>
            h_5 ()) ≍
          h_2 _X x_3

theorem CategoryTheory.WithTerminal.Hom.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 : CategoryTheory.WithTerminal C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithTerminal.of X) (CategoryTheory.WithTerminal.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of a))
  (h_3 : (x : CategoryTheory.WithTerminal C) → motive x CategoryTheory.WithTerminal.star) (a : C),
  x = CategoryTheory.WithTerminal.star →
    x_1 = CategoryTheory.WithTerminal.of a →
      (match x, x_1 with
        | CategoryTheory.WithTerminal.of X, CategoryTheory.WithTerminal.of Y => h_1 X Y
        | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of a => h_2 a
        | x, CategoryTheory.WithTerminal.star => h_3 x) ≍
        h_2 a

theorem CategoryTheory.WithTerminal.comp.match_1.congr_eq_4 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithTerminal C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithTerminal.of _X) (CategoryTheory.WithTerminal.of _Y)
        (CategoryTheory.WithTerminal.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive (CategoryTheory.WithTerminal.of _X) x CategoryTheory.WithTerminal.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithTerminal C) →
      (_Y : C) → motive x CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _Y))
  (h_5 :
    Unit → motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star)
  (x_3 : CategoryTheory.WithTerminal C) (_Y : C),
  x = x_3 →
    x_1 = CategoryTheory.WithTerminal.star →
      x_2 = CategoryTheory.WithTerminal.of _Y →
        (match x, x_1, x_2 with
          | CategoryTheory.WithTerminal.of _X, CategoryTheory.WithTerminal.of _Y, CategoryTheory.WithTerminal.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithTerminal.of _X, x, CategoryTheory.WithTerminal.star => h_2 _X x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _X, x => h_3 _X x
          | x, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _Y => h_4 x _Y
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star =>
            h_5 ()) ≍
          h_4 x_3 _Y

def CategoryTheory.WithTerminal.ctorIdx E1 #

{C : Type u} → CategoryTheory.WithTerminal C → ℕ

theorem CategoryTheory.WithInitial.map.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithInitial C) → (Y ⟶ X) → Sort u_3) (X Y : CategoryTheory.WithInitial C) (f : Y ⟶ X)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithInitial.of a_1 ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) (CategoryTheory.WithInitial.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) CategoryTheory.WithInitial.star x)
  (h_3 :
    (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.star) →
      motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star x)
  (a a_1 : C) (f_1 : CategoryTheory.WithInitial.of a_1 ⟶ CategoryTheory.WithInitial.of a),
  X = CategoryTheory.WithInitial.of a →
    Y = CategoryTheory.WithInitial.of a_1 →
      f ≍ f_1 →
        (match X, Y, f with
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_2, f => h_1 a a_2 f
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.star, x => h_2 a x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => h_3 x) ≍
          h_1 a a_1 f_1

theorem CategoryTheory.WithInitial.Hom.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 : CategoryTheory.WithInitial C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithInitial.of X) (CategoryTheory.WithInitial.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of a))
  (h_3 : (x : CategoryTheory.WithInitial C) → motive x CategoryTheory.WithInitial.star) (a : C),
  x = CategoryTheory.WithInitial.star →
    x_1 = CategoryTheory.WithInitial.of a →
      (match x, x_1 with
        | CategoryTheory.WithInitial.of X, CategoryTheory.WithInitial.of Y => h_1 X Y
        | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of a => h_2 a
        | x, CategoryTheory.WithInitial.star => h_3 x) ≍
        h_2 a

theorem CategoryTheory.WithInitial.map.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithInitial C) → (Y ⟶ X) → Sort u_3) (X Y : CategoryTheory.WithInitial C) (f : Y ⟶ X)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithInitial.of a_1 ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) (CategoryTheory.WithInitial.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) CategoryTheory.WithInitial.star x)
  (h_3 :
    (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.star) →
      motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star x)
  (a : C) (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.of a),
  X = CategoryTheory.WithInitial.of a →
    Y = CategoryTheory.WithInitial.star →
      f ≍ x →
        (match X, Y, f with
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f => h_1 a a_1 f
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.star, x => h_2 a x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => h_3 x) ≍
          h_2 a x

theorem CategoryTheory.WithTerminal.id.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithTerminal C → Sort u_2) (x : CategoryTheory.WithTerminal C)
  (h_1 : (a : C) → motive (CategoryTheory.WithTerminal.of a)) (h_2 : Unit → motive CategoryTheory.WithTerminal.star),
  x = CategoryTheory.WithTerminal.star →
    (match x with
      | CategoryTheory.WithTerminal.of a => h_1 a
      | CategoryTheory.WithTerminal.star => h_2 ()) ≍
      h_2 ()

theorem CategoryTheory.WithTerminal.map.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithTerminal C) → (X ⟶ Y) → Sort u_3) (X Y : CategoryTheory.WithTerminal C)
  (f : X ⟶ Y)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.of a_1) →
        motive (CategoryTheory.WithTerminal.of a) (CategoryTheory.WithTerminal.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.star) →
        motive (CategoryTheory.WithTerminal.of a) CategoryTheory.WithTerminal.star x)
  (h_3 :
    (x : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.star) →
      motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star x)
  (a : C) (x : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.star),
  X = CategoryTheory.WithTerminal.of a →
    Y = CategoryTheory.WithTerminal.star →
      f ≍ x →
        (match X, Y, f with
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f => h_1 a a_1 f
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.star, x => h_2 a x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => h_3 x) ≍
          h_2 a x

theorem CategoryTheory.WithTerminal.id.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithTerminal C → Sort u_2) (x : CategoryTheory.WithTerminal C)
  (h_1 : (a : C) → motive (CategoryTheory.WithTerminal.of a)) (h_2 : Unit → motive CategoryTheory.WithTerminal.star)
  (a : C),
  x = CategoryTheory.WithTerminal.of a →
    (match x with
      | CategoryTheory.WithTerminal.of a => h_1 a
      | CategoryTheory.WithTerminal.star => h_2 ()) ≍
      h_1 a

theorem CategoryTheory.WithInitial.Hom.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 : CategoryTheory.WithInitial C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithInitial.of X) (CategoryTheory.WithInitial.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of a))
  (h_3 : (x : CategoryTheory.WithInitial C) → motive x CategoryTheory.WithInitial.star) (X Y : C),
  x = CategoryTheory.WithInitial.of X →
    x_1 = CategoryTheory.WithInitial.of Y →
      (match x, x_1 with
        | CategoryTheory.WithInitial.of X, CategoryTheory.WithInitial.of Y => h_1 X Y
        | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of a => h_2 a
        | x, CategoryTheory.WithInitial.star => h_3 x) ≍
        h_1 X Y

abbrev CategoryTheory.WithTerminal.ctorElimType E1 #

{C : Type u} → {motive : CategoryTheory.WithTerminal C → Sort u_1} → ℕ → Sort (max 1 u_1 (imax (u + 1) u_1))

def CategoryTheory.instInhabitedWithInitial.default E1 #

{C : Type u} → CategoryTheory.WithInitial C

theorem CategoryTheory.WithTerminal.opEquiv.match_1.congr_eq_1 E1 #

∀ (C : Type u_1) (motive : (CategoryTheory.WithTerminal C)ᵒᵖ → Sort u_2) (x : (CategoryTheory.WithTerminal C)ᵒᵖ)
  (h_1 : (x : CategoryTheory.WithTerminal C) → motive (Opposite.op x)) (x_1 : CategoryTheory.WithTerminal C),
  x = Opposite.op x_1 →
    (match x with
      | Opposite.op x => h_1 x) ≍
      h_1 x_1

theorem CategoryTheory.WithInitial.opEquiv.match_1.congr_eq_1 E1 #

∀ (C : Type u_1) (motive : (CategoryTheory.WithInitial C)ᵒᵖ → Sort u_2) (x : (CategoryTheory.WithInitial C)ᵒᵖ)
  (h_1 : (x : CategoryTheory.WithInitial C) → motive (Opposite.op x)) (x_1 : CategoryTheory.WithInitial C),
  x = Opposite.op x_1 →
    (match x with
      | Opposite.op x => h_1 x) ≍
      h_1 x_1

theorem CategoryTheory.WithInitial.Hom.match_1.congr_eq_3 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 : CategoryTheory.WithInitial C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithInitial.of X) (CategoryTheory.WithInitial.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of a))
  (h_3 : (x : CategoryTheory.WithInitial C) → motive x CategoryTheory.WithInitial.star)
  (x_2 : CategoryTheory.WithInitial C),
  x = x_2 →
    x_1 = CategoryTheory.WithInitial.star →
      (match x, x_1 with
        | CategoryTheory.WithInitial.of X, CategoryTheory.WithInitial.of Y => h_1 X Y
        | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of a => h_2 a
        | x, CategoryTheory.WithInitial.star => h_3 x) ≍
        h_3 x_2

theorem CategoryTheory.WithTerminal.opEquiv.match_15.congr_eq_1 E1 #

∀ (C : Type u_1) (motive : CategoryTheory.WithInitial Cᵒᵖ → Sort u_2) (x : CategoryTheory.WithInitial Cᵒᵖ)
  (h_1 : (x : Cᵒᵖ) → motive (CategoryTheory.WithInitial.of x)) (h_2 : Unit → motive CategoryTheory.WithInitial.star)
  (x_1 : Cᵒᵖ),
  x = CategoryTheory.WithInitial.of x_1 →
    (match x with
      | CategoryTheory.WithInitial.of x => h_1 x
      | CategoryTheory.WithInitial.star => h_2 ()) ≍
      h_1 x_1

theorem CategoryTheory.WithInitial.comp.match_1.congr_eq_5 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithInitial C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithInitial.of _X) (CategoryTheory.WithInitial.of _Y) (CategoryTheory.WithInitial.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive (CategoryTheory.WithInitial.of _X) x CategoryTheory.WithInitial.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithInitial C) →
      (_Y : C) → motive x CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _Y))
  (h_5 : Unit → motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star),
  x = CategoryTheory.WithInitial.star →
    x_1 = CategoryTheory.WithInitial.star →
      x_2 = CategoryTheory.WithInitial.star →
        (match x, x_1, x_2 with
          | CategoryTheory.WithInitial.of _X, CategoryTheory.WithInitial.of _Y, CategoryTheory.WithInitial.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithInitial.of _X, x, CategoryTheory.WithInitial.star => h_2 _X x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _X, x => h_3 _X x
          | x, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _Y => h_4 x _Y
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star =>
            h_5 ()) ≍
          h_5 ()

theorem CategoryTheory.WithInitial.comp.match_1.congr_eq_2 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithInitial C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithInitial.of _X) (CategoryTheory.WithInitial.of _Y) (CategoryTheory.WithInitial.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive (CategoryTheory.WithInitial.of _X) x CategoryTheory.WithInitial.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithInitial C) →
      (_Y : C) → motive x CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _Y))
  (h_5 : Unit → motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star)
  (_X : C) (x_3 : CategoryTheory.WithInitial C),
  x = CategoryTheory.WithInitial.of _X →
    x_1 = x_3 →
      x_2 = CategoryTheory.WithInitial.star →
        (match x, x_1, x_2 with
          | CategoryTheory.WithInitial.of _X, CategoryTheory.WithInitial.of _Y, CategoryTheory.WithInitial.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithInitial.of _X, x, CategoryTheory.WithInitial.star => h_2 _X x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _X, x => h_3 _X x
          | x, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _Y => h_4 x _Y
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star =>
            h_5 ()) ≍
          h_2 _X x_3

def CategoryTheory.WithInitial.ctorIdx E1 #

{C : Type u} → CategoryTheory.WithInitial C → ℕ

theorem CategoryTheory.WithTerminal.Hom.match_1.congr_eq_3 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 : CategoryTheory.WithTerminal C)
  (h_1 : (X Y : C) → motive (CategoryTheory.WithTerminal.of X) (CategoryTheory.WithTerminal.of Y))
  (h_2 : (a : C) → motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of a))
  (h_3 : (x : CategoryTheory.WithTerminal C) → motive x CategoryTheory.WithTerminal.star)
  (x_2 : CategoryTheory.WithTerminal C),
  x = x_2 →
    x_1 = CategoryTheory.WithTerminal.star →
      (match x, x_1 with
        | CategoryTheory.WithTerminal.of X, CategoryTheory.WithTerminal.of Y => h_1 X Y
        | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of a => h_2 a
        | x, CategoryTheory.WithTerminal.star => h_3 x) ≍
        h_3 x_2

theorem CategoryTheory.WithTerminal.of.inj E1 #

∀ {C : Type u} {a a_1 : C}, CategoryTheory.WithTerminal.of a = CategoryTheory.WithTerminal.of a_1 → a = a_1

theorem CategoryTheory.WithInitial.id.match_1.congr_eq_2 E1 #

∀ {C : Type u_1} (motive : CategoryTheory.WithInitial C → Sort u_2) (x : CategoryTheory.WithInitial C)
  (h_1 : (a : C) → motive (CategoryTheory.WithInitial.of a)) (h_2 : Unit → motive CategoryTheory.WithInitial.star),
  x = CategoryTheory.WithInitial.star →
    (match x with
      | CategoryTheory.WithInitial.of a => h_1 a
      | CategoryTheory.WithInitial.star => h_2 ()) ≍
      h_2 ()

theorem CategoryTheory.WithTerminal.opEquiv.match_15.congr_eq_2 E1 #

∀ (C : Type u_1) (motive : CategoryTheory.WithInitial Cᵒᵖ → Sort u_2) (x : CategoryTheory.WithInitial Cᵒᵖ)
  (h_1 : (x : Cᵒᵖ) → motive (CategoryTheory.WithInitial.of x)) (h_2 : Unit → motive CategoryTheory.WithInitial.star),
  x = CategoryTheory.WithInitial.star →
    (match x with
      | CategoryTheory.WithInitial.of x => h_1 x
      | CategoryTheory.WithInitial.star => h_2 ()) ≍
      h_2 ()

def CategoryTheory.instInhabitedWithTerminal.default E1 #

{C : Type u} → CategoryTheory.WithTerminal C

theorem CategoryTheory.WithInitial.opEquiv.match_15.congr_eq_1 E1 #

∀ (C : Type u_1) (motive : CategoryTheory.WithTerminal Cᵒᵖ → Sort u_2) (x : CategoryTheory.WithTerminal Cᵒᵖ)
  (h_1 : (x : Cᵒᵖ) → motive (CategoryTheory.WithTerminal.of x)) (h_2 : Unit → motive CategoryTheory.WithTerminal.star)
  (x_1 : Cᵒᵖ),
  x = CategoryTheory.WithTerminal.of x_1 →
    (match x with
      | CategoryTheory.WithTerminal.of x => h_1 x
      | CategoryTheory.WithTerminal.star => h_2 ()) ≍
      h_1 x_1

theorem CategoryTheory.WithTerminal.map.match_1.congr_eq_1 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithTerminal C) → (X ⟶ Y) → Sort u_3) (X Y : CategoryTheory.WithTerminal C)
  (f : X ⟶ Y)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.of a_1) →
        motive (CategoryTheory.WithTerminal.of a) (CategoryTheory.WithTerminal.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.star) →
        motive (CategoryTheory.WithTerminal.of a) CategoryTheory.WithTerminal.star x)
  (h_3 :
    (x : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.star) →
      motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star x)
  (a a_1 : C) (f_1 : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.of a_1),
  X = CategoryTheory.WithTerminal.of a →
    Y = CategoryTheory.WithTerminal.of a_1 →
      f ≍ f_1 →
        (match X, Y, f with
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_2, f => h_1 a a_2 f
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.star, x => h_2 a x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => h_3 x) ≍
          h_1 a a_1 f_1

theorem CategoryTheory.WithInitial.of.injEq E0 #

∀ {C : Type u} (a a_1 : C), (CategoryTheory.WithInitial.of a = CategoryTheory.WithInitial.of a_1) = (a = a_1)

theorem CategoryTheory.WithTerminal.comp.match_1.congr_eq_5 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithTerminal C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithTerminal.of _X) (CategoryTheory.WithTerminal.of _Y)
        (CategoryTheory.WithTerminal.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive (CategoryTheory.WithTerminal.of _X) x CategoryTheory.WithTerminal.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithTerminal C) →
        motive CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithTerminal C) →
      (_Y : C) → motive x CategoryTheory.WithTerminal.star (CategoryTheory.WithTerminal.of _Y))
  (h_5 :
    Unit → motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star),
  x = CategoryTheory.WithTerminal.star →
    x_1 = CategoryTheory.WithTerminal.star →
      x_2 = CategoryTheory.WithTerminal.star →
        (match x, x_1, x_2 with
          | CategoryTheory.WithTerminal.of _X, CategoryTheory.WithTerminal.of _Y, CategoryTheory.WithTerminal.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithTerminal.of _X, x, CategoryTheory.WithTerminal.star => h_2 _X x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _X, x => h_3 _X x
          | x, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of _Y => h_4 x _Y
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star =>
            h_5 ()) ≍
          h_5 ()

theorem CategoryTheory.WithInitial.comp.match_1.congr_eq_3 E1 #

∀ {C : Type u_1}
  (motive : CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Sort u_2)
  (x x_1 x_2 : CategoryTheory.WithInitial C)
  (h_1 :
    (_X _Y _Z : C) →
      motive (CategoryTheory.WithInitial.of _X) (CategoryTheory.WithInitial.of _Y) (CategoryTheory.WithInitial.of _Z))
  (h_2 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive (CategoryTheory.WithInitial.of _X) x CategoryTheory.WithInitial.star)
  (h_3 :
    (_X : C) →
      (x : CategoryTheory.WithInitial C) → motive CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _X) x)
  (h_4 :
    (x : CategoryTheory.WithInitial C) →
      (_Y : C) → motive x CategoryTheory.WithInitial.star (CategoryTheory.WithInitial.of _Y))
  (h_5 : Unit → motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star)
  (_X : C) (x_3 : CategoryTheory.WithInitial C),
  x = CategoryTheory.WithInitial.star →
    x_1 = CategoryTheory.WithInitial.of _X →
      x_2 = x_3 →
        (match x, x_1, x_2 with
          | CategoryTheory.WithInitial.of _X, CategoryTheory.WithInitial.of _Y, CategoryTheory.WithInitial.of _Z =>
            h_1 _X _Y _Z
          | CategoryTheory.WithInitial.of _X, x, CategoryTheory.WithInitial.star => h_2 _X x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _X, x => h_3 _X x
          | x, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of _Y => h_4 x _Y
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star =>
            h_5 ()) ≍
          h_3 _X x_3

theorem CategoryTheory.WithInitial.map.match_1.congr_eq_3 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithInitial C) → (Y ⟶ X) → Sort u_3) (X Y : CategoryTheory.WithInitial C) (f : Y ⟶ X)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithInitial.of a_1 ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) (CategoryTheory.WithInitial.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.of a) →
        motive (CategoryTheory.WithInitial.of a) CategoryTheory.WithInitial.star x)
  (h_3 :
    (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.star) →
      motive CategoryTheory.WithInitial.star CategoryTheory.WithInitial.star x)
  (x : CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.star),
  X = CategoryTheory.WithInitial.star →
    Y = CategoryTheory.WithInitial.star →
      f ≍ x →
        (match X, Y, f with
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f => h_1 a a_1 f
          | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.star, x => h_2 a x
          | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => h_3 x) ≍
          h_3 x

theorem CategoryTheory.WithTerminal.map.match_1.congr_eq_3 E1 #

∀ {C : Type u_1} [inst : CategoryTheory.Category.{u_2, u_1} C]
  (motive : (X Y : CategoryTheory.WithTerminal C) → (X ⟶ Y) → Sort u_3) (X Y : CategoryTheory.WithTerminal C)
  (f : X ⟶ Y)
  (h_1 :
    (a a_1 : C) →
      (f : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.of a_1) →
        motive (CategoryTheory.WithTerminal.of a) (CategoryTheory.WithTerminal.of a_1) f)
  (h_2 :
    (a : C) →
      (x : CategoryTheory.WithTerminal.of a ⟶ CategoryTheory.WithTerminal.star) →
        motive (CategoryTheory.WithTerminal.of a) CategoryTheory.WithTerminal.star x)
  (h_3 :
    (x : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.star) →
      motive CategoryTheory.WithTerminal.star CategoryTheory.WithTerminal.star x)
  (x : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.star),
  X = CategoryTheory.WithTerminal.star →
    Y = CategoryTheory.WithTerminal.star →
      f ≍ x →
        (match X, Y, f with
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f => h_1 a a_1 f
          | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.star, x => h_2 a x
          | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => h_3 x) ≍
          h_3 x

inductive CategoryTheory.WithTerminal E1 #

Type u → Type u

Formally adjoin a terminal object to a category.

ctor CategoryTheory.WithTerminal.of E0 #

{C : Type u} → C → CategoryTheory.WithTerminal C

ctor CategoryTheory.WithTerminal.star E0 #

{C : Type u} → CategoryTheory.WithTerminal C

instance CategoryTheory.instInhabitedWithTerminal E0 #

{a : Type u_1} → Inhabited (CategoryTheory.WithTerminal a)

inductive CategoryTheory.WithInitial E1 #

Type u → Type u

Formally adjoin an initial object to a category.

ctor CategoryTheory.WithInitial.of E0 #

{C : Type u} → C → CategoryTheory.WithInitial C

ctor CategoryTheory.WithInitial.star E0 #

{C : Type u} → CategoryTheory.WithInitial C

instance CategoryTheory.instInhabitedWithInitial E0 #

{a : Type u_1} → Inhabited (CategoryTheory.WithInitial a)

def CategoryTheory.WithTerminal.Hom E1 #

{C : Type u} →
  [CategoryTheory.Category.{v, u} C] → CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Type v

Morphisms for WithTerminal C.

def CategoryTheory.WithInitial.Hom E1 #

{C : Type u} → [CategoryTheory.Category.{v, u} C] → CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Type v

Morphisms for WithInitial C.

def CategoryTheory.WithTerminal.id E1 #

{C : Type u} → [inst : CategoryTheory.Category.{v, u} C] → (X : CategoryTheory.WithTerminal C) → X.Hom X

Identity morphisms for WithTerminal C.

def CategoryTheory.WithInitial.id E1 #

{C : Type u} → [inst : CategoryTheory.Category.{v, u} C] → (X : CategoryTheory.WithInitial C) → X.Hom X

Identity morphisms for WithInitial C.

def CategoryTheory.WithTerminal.comp E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → {X Y Z : CategoryTheory.WithTerminal C} → X.Hom Y → Y.Hom Z → X.Hom Z

Composition of morphisms for WithTerminal C.

def CategoryTheory.WithInitial.comp E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → {Z Y X : CategoryTheory.WithInitial C} → Y.Hom Z → X.Hom Y → X.Hom Z

Composition of morphisms for WithInitial C.

instance CategoryTheory.WithTerminal.instCategory E0 #

{C : Type u} → [CategoryTheory.Category.{v, u} C] → CategoryTheory.Category.{v, u} (CategoryTheory.WithTerminal C)

instance CategoryTheory.WithInitial.instCategory E0 #

{C : Type u} → [CategoryTheory.Category.{v, u} C] → CategoryTheory.Category.{v, u} (CategoryTheory.WithInitial C)

def CategoryTheory.WithTerminal.down E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {X Y : C} → (CategoryTheory.WithTerminal.of X ⟶ CategoryTheory.WithTerminal.of Y) → (X ⟶ Y)

Helper function for typechecking.

def CategoryTheory.WithInitial.down E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {X Y : C} → (CategoryTheory.WithInitial.of Y ⟶ CategoryTheory.WithInitial.of X) → (Y ⟶ X)

Helper function for typechecking.

theorem CategoryTheory.WithInitial.down_id E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : C},
  CategoryTheory.WithInitial.down (CategoryTheory.CategoryStruct.id (CategoryTheory.WithInitial.of X)) =
    CategoryTheory.CategoryStruct.id X

theorem CategoryTheory.WithTerminal.down_id E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : C},
  CategoryTheory.WithTerminal.down (CategoryTheory.CategoryStruct.id (CategoryTheory.WithTerminal.of X)) =
    CategoryTheory.CategoryStruct.id X

theorem CategoryTheory.WithTerminal.down_comp E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X Y Z : C}
  (f : CategoryTheory.WithTerminal.of X ⟶ CategoryTheory.WithTerminal.of Y)
  (g : CategoryTheory.WithTerminal.of Y ⟶ CategoryTheory.WithTerminal.of Z),
  CategoryTheory.WithTerminal.down (CategoryTheory.CategoryStruct.comp f g) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.WithTerminal.down f) (CategoryTheory.WithTerminal.down g)

theorem CategoryTheory.WithInitial.down_comp E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X Y Z : C}
  (f : CategoryTheory.WithInitial.of Y ⟶ CategoryTheory.WithInitial.of X)
  (g : CategoryTheory.WithInitial.of Z ⟶ CategoryTheory.WithInitial.of Y),
  CategoryTheory.WithInitial.down (CategoryTheory.CategoryStruct.comp g f) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.down g) (CategoryTheory.WithInitial.down f)

theorem CategoryTheory.WithInitial.false_of_to_star E1 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : C}
  (f : CategoryTheory.WithInitial.of X ⟶ CategoryTheory.WithInitial.star), False

theorem CategoryTheory.WithTerminal.false_of_from_star E1 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : C}
  (f : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.of X), False

def CategoryTheory.WithTerminal.incl E1 #

{C : Type u} → [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.Functor C (CategoryTheory.WithTerminal C)

The inclusion from C into WithTerminal C.

def CategoryTheory.WithInitial.incl E1 #

{C : Type u} → [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.Functor C (CategoryTheory.WithInitial C)

The inclusion of C into WithInitial C.

instance CategoryTheory.WithInitial.instFullIncl E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C], CategoryTheory.WithInitial.incl.Full

instance CategoryTheory.WithTerminal.instFullIncl E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C], CategoryTheory.WithTerminal.incl.Full

instance CategoryTheory.WithTerminal.instFaithfulIncl E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C], CategoryTheory.WithTerminal.incl.Faithful

instance CategoryTheory.WithInitial.instFaithfulIncl E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C], CategoryTheory.WithInitial.incl.Faithful

def CategoryTheory.WithTerminal.map E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor C D →
          CategoryTheory.Functor (CategoryTheory.WithTerminal C) (CategoryTheory.WithTerminal D)

Map WithTerminal with respect to a functor F : C ⥤ D.

theorem CategoryTheory.WithTerminal.map_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor C D) {X Y : CategoryTheory.WithTerminal C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.map F).map f =
    match X, Y, f with
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f =>
      F.map (CategoryTheory.WithTerminal.down f)
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.star, x => PUnit.unit
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => PUnit.unit

def CategoryTheory.WithInitial.map E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor C D →
          CategoryTheory.Functor (CategoryTheory.WithInitial C) (CategoryTheory.WithInitial D)

Map WithInitial with respect to a functor F : C ⥤ D.

theorem CategoryTheory.WithInitial.map_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor C D) {Y X : CategoryTheory.WithInitial C} (f : Y ⟶ X),
  (CategoryTheory.WithInitial.map F).map f =
    match X, Y, f with
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f => F.map (CategoryTheory.WithInitial.down f)
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.star, x => PUnit.unit
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => PUnit.unit

theorem CategoryTheory.WithTerminal.map_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor C D) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.map F).obj X =
    match X with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.WithTerminal.of (F.obj x)
    | CategoryTheory.WithTerminal.star => CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.map_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor C D) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.map F).obj X =
    match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.WithInitial.of (F.obj x)
    | CategoryTheory.WithInitial.star => CategoryTheory.WithInitial.star

def CategoryTheory.WithTerminal.mapId E1 #

(C : Type u_1) →
  [inst : CategoryTheory.Category.{v_1, u_1} C] →
    CategoryTheory.WithTerminal.map (CategoryTheory.Functor.id C) ≅
      CategoryTheory.Functor.id (CategoryTheory.WithTerminal C)

A natural isomorphism between the functor map (𝟭 C) and 𝟭 (WithTerminal C).

theorem CategoryTheory.WithInitial.mapId_inv_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.mapId C).inv.app X =
    (match X with
      | CategoryTheory.WithInitial.of a => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of a)
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv

theorem CategoryTheory.WithTerminal.mapId_hom_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.mapId C).hom.app X =
    (match X with
      | CategoryTheory.WithTerminal.of a => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of a)
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom

theorem CategoryTheory.WithTerminal.mapId_inv_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.mapId C).inv.app X =
    (match X with
      | CategoryTheory.WithTerminal.of a => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of a)
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).inv

theorem CategoryTheory.WithInitial.mapId_hom_app E0 #

∀ (C : Type u_1) [inst : CategoryTheory.Category.{v_1, u_1} C] (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.mapId C).hom.app X =
    (match X with
      | CategoryTheory.WithInitial.of a => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of a)
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).hom

def CategoryTheory.WithInitial.mapId E1 #

(C : Type u_1) →
  [inst : CategoryTheory.Category.{v_1, u_1} C] →
    CategoryTheory.WithInitial.map (CategoryTheory.Functor.id C) ≅
      CategoryTheory.Functor.id (CategoryTheory.WithInitial C)

A natural isomorphism between the functor map (𝟭 C) and 𝟭 (WithInitial C).

def CategoryTheory.WithTerminal.mapComp E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      {E : Type u_2} →
        [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
          [inst_2 : CategoryTheory.Category.{v_2, u_2} E] →
            (F : CategoryTheory.Functor C D) →
              (G : CategoryTheory.Functor D E) →
                CategoryTheory.WithTerminal.map (F.comp G) ≅
                  (CategoryTheory.WithTerminal.map F).comp (CategoryTheory.WithTerminal.map G)

A natural isomorphism between the functor map (F ⋙ G) and map F ⋙ map G .

theorem CategoryTheory.WithTerminal.mapComp_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} {E : Type u_2}
  [inst_1 : CategoryTheory.Category.{v_1, u_1} D] [inst_2 : CategoryTheory.Category.{v_2, u_2} E]
  (F : CategoryTheory.Functor C D) (G : CategoryTheory.Functor D E) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.mapComp F G).hom.app X =
    (match X with
      | CategoryTheory.WithTerminal.of a => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of (G.obj (F.obj a)))
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom

theorem CategoryTheory.WithTerminal.mapComp_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} {E : Type u_2}
  [inst_1 : CategoryTheory.Category.{v_1, u_1} D] [inst_2 : CategoryTheory.Category.{v_2, u_2} E]
  (F : CategoryTheory.Functor C D) (G : CategoryTheory.Functor D E) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.mapComp F G).inv.app X =
    (match X with
      | CategoryTheory.WithTerminal.of a => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of (G.obj (F.obj a)))
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).inv

def CategoryTheory.WithInitial.mapComp E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      {E : Type u_2} →
        [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
          [inst_2 : CategoryTheory.Category.{v_2, u_2} E] →
            (F : CategoryTheory.Functor C D) →
              (G : CategoryTheory.Functor D E) →
                CategoryTheory.WithInitial.map (F.comp G) ≅
                  (CategoryTheory.WithInitial.map F).comp (CategoryTheory.WithInitial.map G)

A natural isomorphism between the functor map (F ⋙ G) and map F ⋙ map G .

theorem CategoryTheory.WithInitial.mapComp_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} {E : Type u_2}
  [inst_1 : CategoryTheory.Category.{v_1, u_1} D] [inst_2 : CategoryTheory.Category.{v_2, u_2} E]
  (F : CategoryTheory.Functor C D) (G : CategoryTheory.Functor D E) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.mapComp F G).inv.app X =
    (match X with
      | CategoryTheory.WithInitial.of a => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj a)))
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv

theorem CategoryTheory.WithInitial.mapComp_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} {E : Type u_2}
  [inst_1 : CategoryTheory.Category.{v_1, u_1} D] [inst_2 : CategoryTheory.Category.{v_2, u_2} E]
  (F : CategoryTheory.Functor C D) (G : CategoryTheory.Functor D E) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.mapComp F G).hom.app X =
    (match X with
      | CategoryTheory.WithInitial.of a => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj a)))
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).hom

def CategoryTheory.WithTerminal.map₂ E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {F G : CategoryTheory.Functor C D} →
          (F ⟶ G) → (CategoryTheory.WithTerminal.map F ⟶ CategoryTheory.WithTerminal.map G)

From a natural transformation of functors C ⥤ D, the induced natural transformation of functors WithTerminal C ⥤ WithTerminal D.

theorem CategoryTheory.WithTerminal.map₂_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor C D} (η : F ⟶ G) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.map₂ η).app X =
    match X with
    | CategoryTheory.WithTerminal.of x => η.app x
    | CategoryTheory.WithTerminal.star => CategoryTheory.CategoryStruct.id CategoryTheory.WithTerminal.star

def CategoryTheory.WithInitial.map₂ E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {F G : CategoryTheory.Functor C D} →
          (G ⟶ F) → (CategoryTheory.WithInitial.map G ⟶ CategoryTheory.WithInitial.map F)

From a natural transformation of functors C ⥤ D, the induced natural transformation of functors WithInitial C ⥤ WithInitial D.

theorem CategoryTheory.WithInitial.map₂_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor C D} (η : G ⟶ F) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.map₂ η).app X =
    match X with
    | CategoryTheory.WithInitial.of x => η.app x
    | CategoryTheory.WithInitial.star => CategoryTheory.CategoryStruct.id CategoryTheory.WithInitial.star

def CategoryTheory.WithTerminal.prelaxfunctor E1 #

CategoryTheory.PrelaxFunctor CategoryTheory.Cat CategoryTheory.Cat

The prelax functor from Cat to Cat defined with WithTerminal.

theorem CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_obj E0 #

∀ (C : CategoryTheory.Cat), CategoryTheory.WithInitial.prelaxfunctor.obj C = ↧(CategoryTheory.WithTerminal ↑C)

theorem CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_map₂ E0 #

∀ {a b : CategoryTheory.Cat} {f g : a ⟶ b} (f_1 : f ⟶ g),
  CategoryTheory.WithInitial.prelaxfunctor.map₂ f_1 =
    CategoryTheory.NatTrans.toCatHom₂ (CategoryTheory.WithTerminal.map₂ f_1.toNatTrans)

def CategoryTheory.WithInitial.prelaxfunctor E1 #

CategoryTheory.PrelaxFunctor CategoryTheory.Cat CategoryTheory.Cat

The prelax functor from Cat to Cat defined with WithInitial.

theorem CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_map₂ E0 #

∀ {a b : CategoryTheory.Cat} {f g : a ⟶ b} (f_1 : f ⟶ g),
  CategoryTheory.WithTerminal.prelaxfunctor.map₂ f_1 =
    CategoryTheory.NatTrans.toCatHom₂ (CategoryTheory.WithTerminal.map₂ f_1.toNatTrans)

theorem CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_map E0 #

∀ {X Y : CategoryTheory.Cat} (F : X ⟶ Y),
  CategoryTheory.WithInitial.prelaxfunctor.map F = (CategoryTheory.WithTerminal.map F.toFunctor).toCatHom

theorem CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_obj E0 #

∀ (C : CategoryTheory.Cat), CategoryTheory.WithTerminal.prelaxfunctor.obj C = ↧(CategoryTheory.WithTerminal ↑C)

theorem CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_map E0 #

∀ {X Y : CategoryTheory.Cat} (F : X ⟶ Y),
  CategoryTheory.WithTerminal.prelaxfunctor.map F = (CategoryTheory.WithTerminal.map F.toFunctor).toCatHom

def CategoryTheory.WithTerminal.pseudofunctor E1 #

CategoryTheory.Pseudofunctor CategoryTheory.Cat CategoryTheory.Cat

The pseudofunctor from Cat to Cat defined with WithTerminal.

def CategoryTheory.WithInitial.pseudofunctor E1 #

CategoryTheory.Pseudofunctor CategoryTheory.Cat CategoryTheory.Cat

The pseudofunctor from Cat to Cat defined with WithInitial.

theorem CategoryTheory.WithInitial.pseudofunctor_mapId E0 #

∀ (C : CategoryTheory.Cat),
  CategoryTheory.WithInitial.pseudofunctor.mapId C = CategoryTheory.Cat.Hom.isoMk (CategoryTheory.WithTerminal.mapId ↑C)

theorem CategoryTheory.WithInitial.pseudofunctor_toPrelaxFunctor E0 #

CategoryTheory.WithInitial.pseudofunctor.toPrelaxFunctor = CategoryTheory.WithInitial.prelaxfunctor

theorem CategoryTheory.WithTerminal.pseudofunctor_toPrelaxFunctor E0 #

CategoryTheory.WithTerminal.pseudofunctor.toPrelaxFunctor = CategoryTheory.WithTerminal.prelaxfunctor

theorem CategoryTheory.WithTerminal.pseudofunctor_mapId E0 #

∀ (C : CategoryTheory.Cat),
  CategoryTheory.WithTerminal.pseudofunctor.mapId C =
    CategoryTheory.Cat.Hom.isoMk (CategoryTheory.WithTerminal.mapId ↑C)

theorem CategoryTheory.WithTerminal.pseudofunctor_mapComp E0 #

∀ {a b c : CategoryTheory.Cat} (x : a ⟶ b) (x_1 : b ⟶ c),
  CategoryTheory.WithTerminal.pseudofunctor.mapComp x x_1 =
    CategoryTheory.Cat.Hom.isoMk (CategoryTheory.WithTerminal.mapComp x.toFunctor x_1.toFunctor)

theorem CategoryTheory.WithInitial.pseudofunctor_mapComp E0 #

∀ {a b c : CategoryTheory.Cat} (x : a ⟶ b) (x_1 : b ⟶ c),
  CategoryTheory.WithInitial.pseudofunctor.mapComp x x_1 =
    CategoryTheory.Cat.Hom.isoMk (CategoryTheory.WithTerminal.mapComp x.toFunctor x_1.toFunctor)

instance CategoryTheory.WithTerminal.instUniqueHomStar E0 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {X : CategoryTheory.WithTerminal C} → Unique (X ⟶ CategoryTheory.WithTerminal.star)

instance CategoryTheory.WithInitial.instUniqueHomStar E0 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {X : CategoryTheory.WithInitial C} → Unique (CategoryTheory.WithInitial.star ⟶ X)

def CategoryTheory.WithTerminal.starTerminal E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.Limits.IsTerminal CategoryTheory.WithTerminal.star

WithTerminal.star is terminal.

def CategoryTheory.WithInitial.starInitial E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.Limits.IsInitial CategoryTheory.WithInitial.star

WithInitial.star is initial.

instance CategoryTheory.WithInitial.instHasInitial E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.Limits.HasInitial (CategoryTheory.WithInitial C)

instance CategoryTheory.WithTerminal.instHasTerminal E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.Limits.HasTerminal (CategoryTheory.WithTerminal C)

def CategoryTheory.WithTerminal.starIsoTerminal E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.WithTerminal.star ≅ ⊤_ CategoryTheory.WithTerminal C

The isomorphism between star and an abstract terminal object of WithTerminal C

def CategoryTheory.WithInitial.starIsoInitial E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] → CategoryTheory.WithInitial.star ≅ ⊥_ CategoryTheory.WithInitial C

The isomorphism between star and an abstract initial object of WithInitial C

theorem CategoryTheory.WithInitial.starIsoInitial_inv E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.WithInitial.starIsoInitial.inv =
    CategoryTheory.Limits.initialIsInitial.to CategoryTheory.WithInitial.star

theorem CategoryTheory.WithTerminal.starIsoTerminal_inv E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.WithTerminal.starIsoTerminal.inv =
    CategoryTheory.WithTerminal.starTerminal.from (⊤_ CategoryTheory.WithTerminal C)

theorem CategoryTheory.WithTerminal.starIsoTerminal_hom E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.WithTerminal.starIsoTerminal.hom =
    CategoryTheory.Limits.terminalIsTerminal.from CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.starIsoInitial_hom E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C],
  CategoryTheory.WithInitial.starIsoInitial.hom =
    CategoryTheory.WithInitial.starInitial.to (⊥_ CategoryTheory.WithInitial C)

def CategoryTheory.WithTerminal.lift E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → F.obj x ⟶ Z) →
              (∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) →
                CategoryTheory.Functor (CategoryTheory.WithTerminal C) D

Lift a functor F : C ⥤ D to WithTerminal C ⥤ D.

theorem CategoryTheory.WithTerminal.lift_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x)
  {X Y : CategoryTheory.WithTerminal C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.lift F M hM).map f =
    match X, Y, f with
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f =>
      F.map (CategoryTheory.WithTerminal.down f)
    | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.star, x_1 => M x
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithTerminal.lift_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x)
  (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.lift F M hM).obj X =
    match X with
    | CategoryTheory.WithTerminal.of x => F.obj x
    | CategoryTheory.WithTerminal.star => Z

def CategoryTheory.WithInitial.lift E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → Z ⟶ F.obj x) →
              (∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) →
                CategoryTheory.Functor (CategoryTheory.WithInitial C) D

Lift a functor F : C ⥤ D to WithInitial C ⥤ D.

theorem CategoryTheory.WithInitial.lift_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x)
  {Y X : CategoryTheory.WithInitial C} (f : Y ⟶ X),
  (CategoryTheory.WithInitial.lift F M hM).map f =
    match X, Y, f with
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f => F.map (CategoryTheory.WithInitial.down f)
    | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.star, x_1 => M x
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithInitial.lift_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x)
  (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.lift F M hM).obj X =
    match X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z

def CategoryTheory.WithTerminal.inclLift E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → F.obj x ⟶ Z) →
              (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) →
                CategoryTheory.WithTerminal.incl.comp (CategoryTheory.WithTerminal.lift F M hM) ≅ F

The isomorphism between incl ⋙ lift F _ _ with F.

theorem CategoryTheory.WithInitial.inclLift_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) (x : C),
  (CategoryTheory.WithInitial.inclLift F M hM).hom.app x = CategoryTheory.CategoryStruct.id (F.obj x)

theorem CategoryTheory.WithTerminal.inclLift_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) (x : C),
  (CategoryTheory.WithTerminal.inclLift F M hM).hom.app x =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithTerminal.incl.obj x with
      | CategoryTheory.WithTerminal.of x => F.obj x
      | CategoryTheory.WithTerminal.star => Z)

theorem CategoryTheory.WithTerminal.inclLift_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) (x : C),
  (CategoryTheory.WithTerminal.inclLift F M hM).inv.app x = CategoryTheory.CategoryStruct.id (F.obj x)

theorem CategoryTheory.WithInitial.inclLift_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) (x : C),
  (CategoryTheory.WithInitial.inclLift F M hM).inv.app x =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithInitial.incl.obj x with
      | CategoryTheory.WithInitial.of x => F.obj x
      | CategoryTheory.WithInitial.star => Z)

def CategoryTheory.WithInitial.inclLift E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → Z ⟶ F.obj x) →
              (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) →
                CategoryTheory.WithInitial.incl.comp (CategoryTheory.WithInitial.lift F M hM) ≅ F

The isomorphism between incl ⋙ lift F _ _ with F.

def CategoryTheory.WithTerminal.liftStar E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → F.obj x ⟶ Z) →
              (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) →
                (CategoryTheory.WithTerminal.lift F M hM).obj CategoryTheory.WithTerminal.star ≅ Z

The isomorphism between (lift F _ _).obj WithTerminal.star with Z.

theorem CategoryTheory.WithTerminal.liftStar_inv E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x),
  (CategoryTheory.WithTerminal.liftStar F M hM).inv = CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithTerminal.liftStar_hom E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x),
  (CategoryTheory.WithTerminal.liftStar F M hM).hom = CategoryTheory.CategoryStruct.id Z

def CategoryTheory.WithInitial.liftStar E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → Z ⟶ F.obj x) →
              (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) →
                (CategoryTheory.WithInitial.lift F M hM).obj CategoryTheory.WithInitial.star ≅ Z

The isomorphism between (lift F _ _).obj WithInitial.star with Z.

theorem CategoryTheory.WithInitial.liftStar_hom E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x),
  (CategoryTheory.WithInitial.liftStar F M hM).hom = CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithInitial.liftStar_inv E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x),
  (CategoryTheory.WithInitial.liftStar F M hM).inv = CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithInitial.liftStar_lift_map E1 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → Z ⟶ F.obj x)
  (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) (x : C),
  CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.liftStar F M hM).inv
      ((CategoryTheory.WithInitial.lift F M hM).map
        (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.incl.obj x))) =
    CategoryTheory.CategoryStruct.comp (M x) ((CategoryTheory.WithInitial.inclLift F M hM).inv.app x)

theorem CategoryTheory.WithTerminal.lift_map_liftStar E1 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (M : (x : C) → F.obj x ⟶ Z)
  (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) (x : C),
  CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.WithTerminal.lift F M hM).map
        (CategoryTheory.WithTerminal.starTerminal.from (CategoryTheory.WithTerminal.incl.obj x)))
      (CategoryTheory.WithTerminal.liftStar F M hM).hom =
    CategoryTheory.CategoryStruct.comp ((CategoryTheory.WithTerminal.inclLift F M hM).hom.app x) (M x)

def CategoryTheory.WithTerminal.liftUnique E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → F.obj x ⟶ Z) →
              (hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x) →
                (G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) →
                  (h : CategoryTheory.WithTerminal.incl.comp G ≅ F) →
                    (hG : G.obj CategoryTheory.WithTerminal.star ≅ Z) →
                      (∀ (x : C),
                          CategoryTheory.CategoryStruct.comp
                              (G.map
                                (CategoryTheory.WithTerminal.starTerminal.from
                                  (CategoryTheory.WithTerminal.incl.obj x)))
                              hG.hom =
                            CategoryTheory.CategoryStruct.comp (h.hom.app x) (M x)) →
                        (G ≅ CategoryTheory.WithTerminal.lift F M hM)

The uniqueness of lift.

def CategoryTheory.WithInitial.liftUnique E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (M : (x : C) → Z ⟶ F.obj x) →
              (hM : ∀ (x y : C) (f : y ⟶ x), CategoryTheory.CategoryStruct.comp (M y) (F.map f) = M x) →
                (G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) →
                  (h : CategoryTheory.WithInitial.incl.comp G ≅ F) →
                    (hG : G.obj CategoryTheory.WithInitial.star ≅ Z) →
                      (∀ (x : C),
                          CategoryTheory.CategoryStruct.comp hG.inv
                              (G.map
                                (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.incl.obj x))) =
                            CategoryTheory.CategoryStruct.comp (M x) (h.inv.app x)) →
                        (G ≅ CategoryTheory.WithInitial.lift F M hM)

The uniqueness of lift.

def CategoryTheory.WithTerminal.liftToTerminal E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          CategoryTheory.Functor C D →
            CategoryTheory.Limits.IsTerminal Z → CategoryTheory.Functor (CategoryTheory.WithTerminal C) D

A variant of lift with Z a terminal object.

theorem CategoryTheory.WithInitial.liftToInitial_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.liftToInitial F hZ).obj X =
    match X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z

theorem CategoryTheory.WithTerminal.liftToTerminal_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z)
  {X Y : CategoryTheory.WithTerminal C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.liftToTerminal F hZ).map f =
    match X, Y, f with
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f =>
      F.map (CategoryTheory.WithTerminal.down f)
    | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.star, x_1 => hZ.from (F.obj x)
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => CategoryTheory.CategoryStruct.id Z

theorem CategoryTheory.WithTerminal.liftToTerminal_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z)
  (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.liftToTerminal F hZ).obj X =
    match X with
    | CategoryTheory.WithTerminal.of x => F.obj x
    | CategoryTheory.WithTerminal.star => Z

def CategoryTheory.WithInitial.liftToInitial E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          CategoryTheory.Functor C D →
            CategoryTheory.Limits.IsInitial Z → CategoryTheory.Functor (CategoryTheory.WithInitial C) D

A variant of lift with Z an initial object.

theorem CategoryTheory.WithInitial.liftToInitial_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z) {Y X : CategoryTheory.WithInitial C}
  (f : Y ⟶ X),
  (CategoryTheory.WithInitial.liftToInitial F hZ).map f =
    match X, Y, f with
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f => F.map (CategoryTheory.WithInitial.down f)
    | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.star, x_1 => hZ.to (F.obj x)
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => CategoryTheory.CategoryStruct.id Z

def CategoryTheory.WithTerminal.inclLiftToTerminal E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (hZ : CategoryTheory.Limits.IsTerminal Z) →
              CategoryTheory.WithTerminal.incl.comp (CategoryTheory.WithTerminal.liftToTerminal F hZ) ≅ F

A variant of incl_lift with Z a terminal object.

theorem CategoryTheory.WithInitial.inclLiftToInitial_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z) (x : C),
  (CategoryTheory.WithInitial.inclLiftToInitial F hZ).inv.app x =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithInitial.incl.obj x with
      | CategoryTheory.WithInitial.of x => F.obj x
      | CategoryTheory.WithInitial.star => Z)

theorem CategoryTheory.WithTerminal.inclLiftToTerminal_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z) (x : C),
  (CategoryTheory.WithTerminal.inclLiftToTerminal F hZ).inv.app x = CategoryTheory.CategoryStruct.id (F.obj x)

def CategoryTheory.WithInitial.inclLiftToInitial E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (hZ : CategoryTheory.Limits.IsInitial Z) →
              CategoryTheory.WithInitial.incl.comp (CategoryTheory.WithInitial.liftToInitial F hZ) ≅ F

A variant of incl_lift with Z an initial object.

theorem CategoryTheory.WithInitial.inclLiftToInitial_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z) (x : C),
  (CategoryTheory.WithInitial.inclLiftToInitial F hZ).hom.app x = CategoryTheory.CategoryStruct.id (F.obj x)

theorem CategoryTheory.WithTerminal.inclLiftToTerminal_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z) (x : C),
  (CategoryTheory.WithTerminal.inclLiftToTerminal F hZ).hom.app x =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithTerminal.incl.obj x with
      | CategoryTheory.WithTerminal.of x => F.obj x
      | CategoryTheory.WithTerminal.star => Z)

def CategoryTheory.WithTerminal.liftToTerminalUnique E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (hZ : CategoryTheory.Limits.IsTerminal Z) →
              (G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) →
                (CategoryTheory.WithTerminal.incl.comp G ≅ F) →
                  (G.obj CategoryTheory.WithTerminal.star ≅ Z) → (G ≅ CategoryTheory.WithTerminal.liftToTerminal F hZ)

A variant of lift_unique with Z a terminal object.

theorem CategoryTheory.WithInitial.liftToInitialUnique_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z)
  (G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (h : CategoryTheory.WithInitial.incl.comp G ≅ F)
  (hG : G.obj CategoryTheory.WithInitial.star ≅ Z) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.liftToInitialUnique F hZ G h hG).hom.app X =
    (match X with
      | CategoryTheory.WithInitial.of x => h.app x
      | CategoryTheory.WithInitial.star => hG).hom

theorem CategoryTheory.WithTerminal.liftToTerminalUnique_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z)
  (G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (h : CategoryTheory.WithTerminal.incl.comp G ≅ F)
  (hG : G.obj CategoryTheory.WithTerminal.star ≅ Z) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.liftToTerminalUnique F hZ G h hG).inv.app X =
    (match X with
      | CategoryTheory.WithTerminal.of x => h.app x
      | CategoryTheory.WithTerminal.star => hG).inv

def CategoryTheory.WithInitial.liftToInitialUnique E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {Z : D} →
          (F : CategoryTheory.Functor C D) →
            (hZ : CategoryTheory.Limits.IsInitial Z) →
              (G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) →
                (CategoryTheory.WithInitial.incl.comp G ≅ F) →
                  (G.obj CategoryTheory.WithInitial.star ≅ Z) → (G ≅ CategoryTheory.WithInitial.liftToInitial F hZ)

A variant of lift_unique with Z an initial object.

theorem CategoryTheory.WithInitial.liftToInitialUnique_inv_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsInitial Z)
  (G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (h : CategoryTheory.WithInitial.incl.comp G ≅ F)
  (hG : G.obj CategoryTheory.WithInitial.star ≅ Z) (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.liftToInitialUnique F hZ G h hG).inv.app X =
    (match X with
      | CategoryTheory.WithInitial.of x => h.app x
      | CategoryTheory.WithInitial.star => hG).inv

theorem CategoryTheory.WithTerminal.liftToTerminalUnique_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Z : D} (F : CategoryTheory.Functor C D) (hZ : CategoryTheory.Limits.IsTerminal Z)
  (G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (h : CategoryTheory.WithTerminal.incl.comp G ≅ F)
  (hG : G.obj CategoryTheory.WithTerminal.star ≅ Z) (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.liftToTerminalUnique F hZ G h hG).hom.app X =
    (match X with
      | CategoryTheory.WithTerminal.of x => h.app x
      | CategoryTheory.WithTerminal.star => hG).hom

def CategoryTheory.WithTerminal.homFrom E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    (X : C) → CategoryTheory.WithTerminal.incl.obj X ⟶ CategoryTheory.WithTerminal.star

Constructs a morphism to star from of X.

def CategoryTheory.WithInitial.homTo E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    (X : C) → CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.incl.obj X

Constructs a morphism from star to of X.

instance CategoryTheory.WithInitial.isIso_of_to_star E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : CategoryTheory.WithInitial C}
  (f : X ⟶ CategoryTheory.WithInitial.star), CategoryTheory.IsIso f

instance CategoryTheory.WithTerminal.isIso_of_from_star E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {X : CategoryTheory.WithTerminal C}
  (f : CategoryTheory.WithTerminal.star ⟶ X), CategoryTheory.IsIso f

def CategoryTheory.WithTerminal.mkCommaObject E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor (CategoryTheory.WithTerminal C) D →
          CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)

A functor WithTerminal C ⥤ D can be seen as an element of the comma category Comma (𝟭 (C ⥤ D)) (const C).

theorem CategoryTheory.WithTerminal.mkCommaObject_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D),
  (CategoryTheory.WithTerminal.mkCommaObject F).right = F.obj CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.mkCommaObject_right_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (X : C),
  (CategoryTheory.WithInitial.mkCommaObject F).right.obj X = F.obj (CategoryTheory.WithInitial.incl.obj X)

theorem CategoryTheory.WithInitial.mkCommaObject_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (x : C),
  (CategoryTheory.WithInitial.mkCommaObject F).hom.app x =
    F.map (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.of x))

theorem CategoryTheory.WithTerminal.mkCommaObject_left_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.mkCommaObject F).left.map f = F.map (CategoryTheory.WithTerminal.incl.map f)

theorem CategoryTheory.WithInitial.mkCommaObject_right_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.WithInitial.mkCommaObject F).right.map f = F.map (CategoryTheory.WithInitial.incl.map f)

theorem CategoryTheory.WithTerminal.mkCommaObject_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (x : C),
  (CategoryTheory.WithTerminal.mkCommaObject F).hom.app x =
    F.map (CategoryTheory.WithTerminal.starTerminal.from (CategoryTheory.WithTerminal.of x))

theorem CategoryTheory.WithTerminal.mkCommaObject_left_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (X : C),
  (CategoryTheory.WithTerminal.mkCommaObject F).left.obj X = F.obj (CategoryTheory.WithTerminal.incl.obj X)

def CategoryTheory.WithInitial.mkCommaObject E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor (CategoryTheory.WithInitial C) D →
          CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))

A functor WithInitial C ⥤ D can be seen as an element of the comma category Comma (const C) (𝟭 (C ⥤ D)).

theorem CategoryTheory.WithInitial.mkCommaObject_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D),
  (CategoryTheory.WithInitial.mkCommaObject F).left = F.obj CategoryTheory.WithInitial.star

def CategoryTheory.WithTerminal.mkCommaMorphism E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {F G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D} →
          (F ⟶ G) → (CategoryTheory.WithTerminal.mkCommaObject F ⟶ CategoryTheory.WithTerminal.mkCommaObject G)

A morphism of functors WithTerminal C ⥤ D gives a morphism between the associated comma objects.

def CategoryTheory.WithInitial.mkCommaMorphism E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {F G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D} →
          (G ⟶ F) → (CategoryTheory.WithInitial.mkCommaObject G ⟶ CategoryTheory.WithInitial.mkCommaObject F)

A morphism of functors WithInitial C ⥤ D gives a morphism between the associated comma objects.

theorem CategoryTheory.WithTerminal.mkCommaMorphism_left_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D} (η : F ⟶ G) (X : C),
  (CategoryTheory.WithTerminal.mkCommaMorphism η).left.app X = η.app (CategoryTheory.WithTerminal.incl.obj X)

theorem CategoryTheory.WithInitial.mkCommaMorphism_right_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D} (η : G ⟶ F) (X : C),
  (CategoryTheory.WithInitial.mkCommaMorphism η).right.app X = η.app (CategoryTheory.WithInitial.incl.obj X)

theorem CategoryTheory.WithInitial.mkCommaMorphism_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor (CategoryTheory.WithInitial C) D} (η : G ⟶ F),
  (CategoryTheory.WithInitial.mkCommaMorphism η).left = η.app CategoryTheory.WithInitial.star

theorem CategoryTheory.WithTerminal.mkCommaMorphism_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {F G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D} (η : F ⟶ G),
  (CategoryTheory.WithTerminal.mkCommaMorphism η).right = η.app CategoryTheory.WithTerminal.star

def CategoryTheory.WithTerminal.ofCommaObject E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C) →
          CategoryTheory.Functor (CategoryTheory.WithTerminal C) D

An element of the comma category Comma (𝟭 (C ⥤ D)) (Functor.const C) can be seen as a functor WithTerminal C ⥤ D.

theorem CategoryTheory.WithInitial.ofCommaObject_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.ofCommaObject c).obj X =
    match X with
    | CategoryTheory.WithInitial.of x => c.right.obj x
    | CategoryTheory.WithInitial.star => c.left

theorem CategoryTheory.WithTerminal.ofCommaObject_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.ofCommaObject c).obj X =
    match X with
    | CategoryTheory.WithTerminal.of x => c.left.obj x
    | CategoryTheory.WithTerminal.star => c.right

theorem CategoryTheory.WithTerminal.ofCommaObject_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  {X Y : CategoryTheory.WithTerminal C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.ofCommaObject c).map f =
    match X, Y, f with
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f =>
      c.left.map (CategoryTheory.WithTerminal.down f)
    | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.star, x_1 => c.hom.app x
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => CategoryTheory.CategoryStruct.id c.right

theorem CategoryTheory.WithInitial.ofCommaObject_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  {Y X : CategoryTheory.WithInitial C} (f : Y ⟶ X),
  (CategoryTheory.WithInitial.ofCommaObject c).map f =
    match X, Y, f with
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f =>
      c.right.map (CategoryTheory.WithInitial.down f)
    | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.star, x_1 => c.hom.app x
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => CategoryTheory.CategoryStruct.id c.left

def CategoryTheory.WithInitial.ofCommaObject E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) →
          CategoryTheory.Functor (CategoryTheory.WithInitial C) D

An element of the comma category Comma (Functor.const C) (𝟭 (C ⥤ D)) can be seen as a functor WithInitial C ⥤ D.

def CategoryTheory.WithTerminal.ofCommaMorphism E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {c c' :
            CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D))
              (CategoryTheory.Functor.const C)} →
          (c ⟶ c') → (CategoryTheory.WithTerminal.ofCommaObject c ⟶ CategoryTheory.WithTerminal.ofCommaObject c')

A morphism in Comma (𝟭 (C ⥤ D)) (Functor.const C) gives a morphism between the associated functors WithTerminal C ⥤ D.

theorem CategoryTheory.WithTerminal.ofCommaMorphism_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {c c' :
    CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)}
  (φ : c ⟶ c') (x : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.ofCommaMorphism φ).app x =
    match x with
    | CategoryTheory.WithTerminal.of x => φ.left.app x
    | CategoryTheory.WithTerminal.star => φ.right

def CategoryTheory.WithInitial.ofCommaMorphism E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        {c c' :
            CategoryTheory.Comma (CategoryTheory.Functor.const C)
              (CategoryTheory.Functor.id (CategoryTheory.Functor C D))} →
          (c' ⟶ c) → (CategoryTheory.WithInitial.ofCommaObject c' ⟶ CategoryTheory.WithInitial.ofCommaObject c)

A morphism in Comma (Functor.const C) (𝟭 (C ⥤ D)) gives a morphism between the associated functors WithInitial C ⥤ D.

theorem CategoryTheory.WithInitial.ofCommaMorphism_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {c c' :
    CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))}
  (φ : c' ⟶ c) (x : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.ofCommaMorphism φ).app x =
    match x with
    | CategoryTheory.WithInitial.of x => φ.right.app x
    | CategoryTheory.WithInitial.star => φ.left

def CategoryTheory.WithTerminal.equivComma E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor (CategoryTheory.WithTerminal C) D ≌
          CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)

The category of functors WithTerminal C ⥤ D is equivalent to the category Comma (𝟭 (C ⥤ D)) (const C) .

theorem CategoryTheory.WithInitial.equivComma_functor_obj_right_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (X : C),
  (CategoryTheory.WithInitial.equivComma.functor.obj F).right.obj X = F.obj (CategoryTheory.WithInitial.incl.obj X)

theorem CategoryTheory.WithTerminal.equivComma_functor_obj_left_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (X : C),
  (CategoryTheory.WithTerminal.equivComma.functor.obj F).left.obj X = F.obj (CategoryTheory.WithTerminal.incl.obj X)

theorem CategoryTheory.WithTerminal.equivComma_counitIso_hom_app_left_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  (X_1 : C),
  (CategoryTheory.WithTerminal.equivComma.counitIso.hom.app X).left.app X_1 =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithTerminal.incl.obj X_1 with
      | CategoryTheory.WithTerminal.of x => X.left.obj x
      | CategoryTheory.WithTerminal.star => X.right)

theorem CategoryTheory.WithTerminal.equivComma_counitIso_inv_app_left_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  (X_1 : C),
  (CategoryTheory.WithTerminal.equivComma.counitIso.inv.app X).left.app X_1 =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithTerminal.incl.obj X_1 with
      | CategoryTheory.WithTerminal.of x => X.left.obj x
      | CategoryTheory.WithTerminal.star => X.right)

theorem CategoryTheory.WithTerminal.equivComma_inverse_obj_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  (X : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.equivComma.inverse.obj c).obj X =
    match X with
    | CategoryTheory.WithTerminal.of x => c.left.obj x
    | CategoryTheory.WithTerminal.star => c.right

theorem CategoryTheory.WithTerminal.equivComma_counitIso_hom_app_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)),
  (CategoryTheory.WithTerminal.equivComma.counitIso.hom.app X).right = CategoryTheory.CategoryStruct.id X.right

theorem CategoryTheory.WithTerminal.equivComma_functor_obj_left_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.equivComma.functor.obj F).left.map f = F.map (CategoryTheory.WithTerminal.incl.map f)

theorem CategoryTheory.WithTerminal.equivComma_functor_obj_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D),
  (CategoryTheory.WithTerminal.equivComma.functor.obj F).right = F.obj CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.equivComma_functor_obj_right_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.WithInitial.equivComma.functor.obj F).right.map f = F.map (CategoryTheory.WithInitial.incl.map f)

theorem CategoryTheory.WithInitial.equivComma_counitIso_hom_app_right_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  (X_1 : C),
  (CategoryTheory.WithInitial.equivComma.counitIso.hom.app X).right.app X_1 =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithInitial.incl.obj X_1 with
      | CategoryTheory.WithInitial.of x => X.right.obj x
      | CategoryTheory.WithInitial.star => X.left)

theorem CategoryTheory.WithInitial.equivComma_counitIso_inv_app_right_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  (X_1 : C),
  (CategoryTheory.WithInitial.equivComma.counitIso.inv.app X).right.app X_1 =
    CategoryTheory.CategoryStruct.id
      (match CategoryTheory.WithInitial.incl.obj X_1 with
      | CategoryTheory.WithInitial.of x => X.right.obj x
      | CategoryTheory.WithInitial.star => X.left)

theorem CategoryTheory.WithTerminal.equivComma_functor_map_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {X Y : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D} (η : X ⟶ Y),
  (CategoryTheory.WithTerminal.equivComma.functor.map η).right = η.app CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.equivComma_functor_map_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Y X : CategoryTheory.Functor (CategoryTheory.WithInitial C) D} (η : Y ⟶ X),
  (CategoryTheory.WithInitial.equivComma.functor.map η).left = η.app CategoryTheory.WithInitial.star

theorem CategoryTheory.WithTerminal.equivComma_functor_obj_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (x : C),
  (CategoryTheory.WithTerminal.equivComma.functor.obj F).hom.app x =
    F.map (CategoryTheory.WithTerminal.starTerminal.from (CategoryTheory.WithTerminal.of x))

theorem CategoryTheory.WithInitial.equivComma_inverse_map_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Y X : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))}
  (φ : Y ⟶ X) (x : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.equivComma.inverse.map φ).app x =
    match x with
    | CategoryTheory.WithInitial.of x => φ.right.app x
    | CategoryTheory.WithInitial.star => φ.left

theorem CategoryTheory.WithInitial.equivComma_counitIso_hom_app_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))),
  (CategoryTheory.WithInitial.equivComma.counitIso.hom.app X).left = CategoryTheory.CategoryStruct.id X.left

theorem CategoryTheory.WithInitial.equivComma_functor_map_right_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {Y X : CategoryTheory.Functor (CategoryTheory.WithInitial C) D} (η : Y ⟶ X) (X_1 : C),
  (CategoryTheory.WithInitial.equivComma.functor.map η).right.app X_1 = η.app (CategoryTheory.WithInitial.incl.obj X_1)

theorem CategoryTheory.WithInitial.equivComma_functor_obj_hom_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (x : C),
  (CategoryTheory.WithInitial.equivComma.functor.obj F).hom.app x =
    F.map (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.of x))

theorem CategoryTheory.WithInitial.equivComma_inverse_obj_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  {Y X : CategoryTheory.WithInitial C} (f : Y ⟶ X),
  (CategoryTheory.WithInitial.equivComma.inverse.obj c).map f =
    match X, Y, f with
    | CategoryTheory.WithInitial.of a, CategoryTheory.WithInitial.of a_1, f =>
      c.right.map (CategoryTheory.WithInitial.down f)
    | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.star, x_1 => c.hom.app x
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => CategoryTheory.CategoryStruct.id c.left

theorem CategoryTheory.WithInitial.equivComma_unitIso_inv_app_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (X_1 : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.equivComma.unitIso.inv.app X).app X_1 =
    (match X_1 with
      | CategoryTheory.WithInitial.of x => (CategoryTheory.Iso.refl (CategoryTheory.WithInitial.incl.comp X)).app x
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl (X.obj CategoryTheory.WithInitial.star)).inv

theorem CategoryTheory.WithInitial.equivComma_functor_obj_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (F : CategoryTheory.Functor (CategoryTheory.WithInitial C) D),
  (CategoryTheory.WithInitial.equivComma.functor.obj F).left = F.obj CategoryTheory.WithInitial.star

theorem CategoryTheory.WithInitial.equivComma_unitIso_hom_app_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Functor (CategoryTheory.WithInitial C) D) (X_1 : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.equivComma.unitIso.hom.app X).app X_1 =
    (match X_1 with
      | CategoryTheory.WithInitial.of x => (CategoryTheory.Iso.refl (CategoryTheory.WithInitial.incl.comp X)).app x
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl (X.obj CategoryTheory.WithInitial.star)).hom

theorem CategoryTheory.WithInitial.equivComma_inverse_obj_obj E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D)))
  (X : CategoryTheory.WithInitial C),
  (CategoryTheory.WithInitial.equivComma.inverse.obj c).obj X =
    match X with
    | CategoryTheory.WithInitial.of x => c.right.obj x
    | CategoryTheory.WithInitial.star => c.left

theorem CategoryTheory.WithInitial.equivComma_counitIso_inv_app_left E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))),
  (CategoryTheory.WithInitial.equivComma.counitIso.inv.app X).left = CategoryTheory.CategoryStruct.id X.left

theorem CategoryTheory.WithTerminal.equivComma_functor_map_left_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {X Y : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D} (η : X ⟶ Y) (X_1 : C),
  (CategoryTheory.WithTerminal.equivComma.functor.map η).left.app X_1 = η.app (CategoryTheory.WithTerminal.incl.obj X_1)

theorem CategoryTheory.WithTerminal.equivComma_inverse_map_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  {X Y : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)}
  (φ : X ⟶ Y) (x : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.equivComma.inverse.map φ).app x =
    match x with
    | CategoryTheory.WithTerminal.of x => φ.left.app x
    | CategoryTheory.WithTerminal.star => φ.right

theorem CategoryTheory.WithTerminal.equivComma_inverse_obj_map E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (c : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C))
  {X Y : CategoryTheory.WithTerminal C} (f : X ⟶ Y),
  (CategoryTheory.WithTerminal.equivComma.inverse.obj c).map f =
    match X, Y, f with
    | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.of a_1, f =>
      c.left.map (CategoryTheory.WithTerminal.down f)
    | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.star, x_1 => c.hom.app x
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => CategoryTheory.CategoryStruct.id c.right

theorem CategoryTheory.WithTerminal.equivComma_counitIso_inv_app_right E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Comma (CategoryTheory.Functor.id (CategoryTheory.Functor C D)) (CategoryTheory.Functor.const C)),
  (CategoryTheory.WithTerminal.equivComma.counitIso.inv.app X).right = CategoryTheory.CategoryStruct.id X.right

theorem CategoryTheory.WithTerminal.equivComma_unitIso_hom_app_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (X_1 : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.equivComma.unitIso.hom.app X).app X_1 =
    (match X_1 with
      | CategoryTheory.WithTerminal.of x => (CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.incl.comp X)).app x
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl (X.obj CategoryTheory.WithTerminal.star)).hom

theorem CategoryTheory.WithTerminal.equivComma_unitIso_inv_app_app E0 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] {D : Type u_1} [inst_1 : CategoryTheory.Category.{v_1, u_1} D]
  (X : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D) (X_1 : CategoryTheory.WithTerminal C),
  (CategoryTheory.WithTerminal.equivComma.unitIso.inv.app X).app X_1 =
    (match X_1 with
      | CategoryTheory.WithTerminal.of x => (CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.incl.comp X)).app x
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl (X.obj CategoryTheory.WithTerminal.star)).inv

def CategoryTheory.WithInitial.equivComma E1 #

{C : Type u} →
  [inst : CategoryTheory.Category.{v, u} C] →
    {D : Type u_1} →
      [inst_1 : CategoryTheory.Category.{v_1, u_1} D] →
        CategoryTheory.Functor (CategoryTheory.WithInitial C) D ≌
          CategoryTheory.Comma (CategoryTheory.Functor.const C) (CategoryTheory.Functor.id (CategoryTheory.Functor C D))

The category of functors WithInitial C ⥤ D is equivalent to the category Comma (const C) (𝟭 (C ⥤ D)).

instance CategoryTheory.WithInitial.subsingleton_hom E0 #

∀ {J : Type u_1}, Quiver.IsThin (CategoryTheory.WithInitial (CategoryTheory.Discrete J))

instance CategoryTheory.WithTerminal.subsingleton_hom E0 #

∀ {J : Type u_1}, Quiver.IsThin (CategoryTheory.WithTerminal (CategoryTheory.Discrete J))

def CategoryTheory.WithTerminal.widePullbackShapeEquiv E1 #

{J : Type u_1} → CategoryTheory.Limits.WidePullbackShape J ≌ CategoryTheory.WithTerminal (CategoryTheory.Discrete J)

For a discrete category, WithTerminal is the same category as WidePullbackShape.

TODO: Should we simply replace WidePullbackShape J with WithTerminal (Discrete J) everywhere?

def CategoryTheory.WithInitial.widePushoutShapeEquiv E1 #

{J : Type u_1} → CategoryTheory.Limits.WidePushoutShape J ≌ CategoryTheory.WithInitial (CategoryTheory.Discrete J)

For a discrete category, WithInitial is the same category as WidePushoutShape

theorem CategoryTheory.WithInitial.widePushoutShapeEquiv_functor_obj E0 #

∀ {J : Type u_1} (a : CategoryTheory.Limits.WidePushoutShape J),
  CategoryTheory.WithInitial.widePushoutShapeEquiv.functor.obj a =
    match a with
    | some x => CategoryTheory.WithInitial.of { as := x }
    | none => CategoryTheory.WithInitial.star

theorem CategoryTheory.WithInitial.widePushoutShapeEquiv_inverse_obj E0 #

∀ {J : Type u_1} (a : CategoryTheory.WithInitial (CategoryTheory.Discrete J)),
  CategoryTheory.WithInitial.widePushoutShapeEquiv.inverse.obj a =
    CategoryTheory.WithInitial.widePushoutShapeEquivObj✝.symm a

theorem CategoryTheory.WithTerminal.widePullbackShapeEquiv_inverse_obj E0 #

∀ {J : Type u_1} (a : CategoryTheory.WithTerminal (CategoryTheory.Discrete J)),
  CategoryTheory.WithTerminal.widePullbackShapeEquiv.inverse.obj a =
    CategoryTheory.WithTerminal.widePullbackShapeEquivObj✝.symm a

theorem CategoryTheory.WithTerminal.widePullbackShapeEquiv_functor_obj E0 #

∀ {J : Type u_1} (a : CategoryTheory.Limits.WidePullbackShape J),
  CategoryTheory.WithTerminal.widePullbackShapeEquiv.functor.obj a =
    match a with
    | some x => CategoryTheory.WithTerminal.of { as := x }
    | none => CategoryTheory.WithTerminal.star

def CategoryTheory.WithTerminal.opEquiv E1 #

(C : Type u) →
  [inst : CategoryTheory.Category.{v, u} C] → (CategoryTheory.WithTerminal C)ᵒᵖ ≌ CategoryTheory.WithInitial Cᵒᵖ

The opposite category of WithTerminal C is equivalent to WithInitial Cᵒᵖ.

theorem CategoryTheory.WithInitial.opEquiv_unitIso_inv_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : (CategoryTheory.WithInitial C)ᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).unitIso.inv.app X =
    (match Opposite.unop X with
      | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (Opposite.op (CategoryTheory.WithInitial.of x))
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl (Opposite.op CategoryTheory.WithInitial.star)).inv

theorem CategoryTheory.WithTerminal.opEquiv_inverse_obj E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (x : CategoryTheory.WithInitial Cᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).inverse.obj x =
    match x with
    | CategoryTheory.WithInitial.of x => Opposite.op (CategoryTheory.WithTerminal.of (Opposite.unop x))
    | CategoryTheory.WithInitial.star => Opposite.op CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.opEquiv_functor_map E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] {y x : (CategoryTheory.WithInitial C)ᵒᵖ} (x_1 : y ⟶ x),
  (CategoryTheory.WithInitial.opEquiv C).functor.map x_1 =
    match x_1 with
    | Opposite.op f =>
      match x, y, f, x_1 with
      | Opposite.op (CategoryTheory.WithInitial.of x), Opposite.op (CategoryTheory.WithInitial.of y), f, x_2 =>
        (CategoryTheory.WithInitial.down f).op
      | Opposite.op CategoryTheory.WithInitial.star, Opposite.op (CategoryTheory.WithInitial.of a), x, x_2 =>
        CategoryTheory.WithTerminal.starTerminal.from (CategoryTheory.WithTerminal.of (Opposite.op a))
      | Opposite.op CategoryTheory.WithInitial.star, Opposite.op CategoryTheory.WithInitial.star, x, x_2 =>
        CategoryTheory.CategoryStruct.id CategoryTheory.WithTerminal.star

theorem CategoryTheory.WithInitial.opEquiv_counitIso_hom_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : CategoryTheory.WithTerminal Cᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).counitIso.hom.app X =
    (match X with
      | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of x)
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom

theorem CategoryTheory.WithTerminal.opEquiv_counitIso_inv_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : CategoryTheory.WithInitial Cᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).counitIso.inv.app X =
    (match X with
      | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of x)
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv

theorem CategoryTheory.WithTerminal.opEquiv_unitIso_hom_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : (CategoryTheory.WithTerminal C)ᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).unitIso.hom.app X =
    (match Opposite.unop X with
      | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (Opposite.op (CategoryTheory.WithTerminal.of x))
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl (Opposite.op CategoryTheory.WithTerminal.star)).hom

theorem CategoryTheory.WithTerminal.opEquiv_counitIso_hom_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : CategoryTheory.WithInitial Cᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).counitIso.hom.app X =
    (match X with
      | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of x)
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).hom

theorem CategoryTheory.WithInitial.opEquiv_inverse_obj E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (x : CategoryTheory.WithTerminal Cᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).inverse.obj x =
    match x with
    | CategoryTheory.WithTerminal.of x => Opposite.op (CategoryTheory.WithInitial.of (Opposite.unop x))
    | CategoryTheory.WithTerminal.star => Opposite.op CategoryTheory.WithInitial.star

theorem CategoryTheory.WithTerminal.opEquiv_functor_obj E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (x : (CategoryTheory.WithTerminal C)ᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).functor.obj x =
    match Opposite.unop x with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.WithInitial.of (Opposite.op x)
    | CategoryTheory.WithTerminal.star => CategoryTheory.WithInitial.star

theorem CategoryTheory.WithInitial.opEquiv_counitIso_inv_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : CategoryTheory.WithTerminal Cᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).counitIso.inv.app X =
    (match X with
      | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of x)
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).inv

theorem CategoryTheory.WithInitial.opEquiv_functor_obj E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (x : (CategoryTheory.WithInitial C)ᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).functor.obj x =
    match Opposite.unop x with
    | CategoryTheory.WithInitial.of x => CategoryTheory.WithTerminal.of (Opposite.op x)
    | CategoryTheory.WithInitial.star => CategoryTheory.WithTerminal.star

def CategoryTheory.WithInitial.opEquiv E1 #

(C : Type u) →
  [inst : CategoryTheory.Category.{v, u} C] → (CategoryTheory.WithInitial C)ᵒᵖ ≌ CategoryTheory.WithTerminal Cᵒᵖ

The opposite category of WithInitial C is equivalent to WithTerminal Cᵒᵖ.

theorem CategoryTheory.WithInitial.opEquiv_inverse_map E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] {y x : CategoryTheory.WithTerminal Cᵒᵖ} (f : y ⟶ x),
  (CategoryTheory.WithInitial.opEquiv C).inverse.map f =
    match x, y, f with
    | CategoryTheory.WithTerminal.of (Opposite.op x), CategoryTheory.WithTerminal.of (Opposite.op y), f =>
      CategoryTheory.WithTerminal.down f
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.of (Opposite.op unop), x =>
      Opposite.op (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.of unop))
    | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x =>
      CategoryTheory.CategoryStruct.id (Opposite.op CategoryTheory.WithInitial.star)

theorem CategoryTheory.WithInitial.opEquiv_unitIso_hom_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : (CategoryTheory.WithInitial C)ᵒᵖ),
  (CategoryTheory.WithInitial.opEquiv C).unitIso.hom.app X =
    (match Opposite.unop X with
      | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (Opposite.op (CategoryTheory.WithInitial.of x))
      | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl (Opposite.op CategoryTheory.WithInitial.star)).hom

theorem CategoryTheory.WithTerminal.opEquiv_unitIso_inv_app E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] (X : (CategoryTheory.WithTerminal C)ᵒᵖ),
  (CategoryTheory.WithTerminal.opEquiv C).unitIso.inv.app X =
    (match Opposite.unop X with
      | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (Opposite.op (CategoryTheory.WithTerminal.of x))
      | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl (Opposite.op CategoryTheory.WithTerminal.star)).inv

theorem CategoryTheory.WithTerminal.opEquiv_functor_map E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] {x y : (CategoryTheory.WithTerminal C)ᵒᵖ} (x_1 : x ⟶ y),
  (CategoryTheory.WithTerminal.opEquiv C).functor.map x_1 =
    match x_1 with
    | Opposite.op f =>
      match x, y, f, x_1 with
      | Opposite.op (CategoryTheory.WithTerminal.of x), Opposite.op (CategoryTheory.WithTerminal.of y), f, x_2 =>
        (CategoryTheory.WithTerminal.down f).op
      | Opposite.op CategoryTheory.WithTerminal.star, Opposite.op (CategoryTheory.WithTerminal.of a), x, x_2 =>
        CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.of (Opposite.op a))
      | Opposite.op CategoryTheory.WithTerminal.star, Opposite.op CategoryTheory.WithTerminal.star, x, x_2 =>
        CategoryTheory.CategoryStruct.id CategoryTheory.WithInitial.star

theorem CategoryTheory.WithTerminal.opEquiv_inverse_map E0 #

∀ (C : Type u) [inst : CategoryTheory.Category.{v, u} C] {x y : CategoryTheory.WithInitial Cᵒᵖ} (f : x ⟶ y),
  (CategoryTheory.WithTerminal.opEquiv C).inverse.map f =
    match x, y, f with
    | CategoryTheory.WithInitial.of (Opposite.op x), CategoryTheory.WithInitial.of (Opposite.op y), f =>
      CategoryTheory.WithInitial.down f
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of (Opposite.op unop), x =>
      Opposite.op (CategoryTheory.WithTerminal.starTerminal.from (CategoryTheory.WithTerminal.of unop))
    | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x =>
      CategoryTheory.CategoryStruct.id (Opposite.op CategoryTheory.WithTerminal.star)