File: Mathlib/CategoryTheory/WithTerminal.lean

full_name: CategoryTheory.WithTerminal.star
code: /-- Formally adjoin a terminal object to a category. -/
inductive WithTerminal : Type u
  | of : C → WithTerminal
  | star : WithTerminal
  deriving Inhabited
goal: CategoryTheory.WithTerminal C

full_name: CategoryTheory.WithTerminal
code: /-- Formally adjoin a terminal object to a category. -/
inductive WithTerminal : Type u
  | of : C → WithTerminal
  | star : WithTerminal
  deriving Inhabited
goal: Type u

full_name: CategoryTheory.WithTerminal.of
code: /-- Formally adjoin a terminal object to a category. -/
inductive WithTerminal : Type u
  | of : C → WithTerminal
  | star : WithTerminal
  deriving Inhabited
goal: C → CategoryTheory.WithTerminal C

full_name: CategoryTheory.instInhabitedWithTerminal
code: /-- Formally adjoin a terminal object to a category. -/
inductive WithTerminal : Type u
  | of : C → WithTerminal
  | star : WithTerminal
  deriving Inhabited
goal: {a : Type u_1} → Inhabited (CategoryTheory.WithTerminal a)

full_name: CategoryTheory.WithInitial.of
code: /-- Formally adjoin an initial object to a category. -/
inductive WithInitial : Type u
  | of : C → WithInitial
  | star : WithInitial
  deriving Inhabited
goal: C → CategoryTheory.WithInitial C

full_name: CategoryTheory.instInhabitedWithInitial
code: /-- Formally adjoin an initial object to a category. -/
inductive WithInitial : Type u
  | of : C → WithInitial
  | star : WithInitial
  deriving Inhabited
goal: {a : Type u_1} → Inhabited (CategoryTheory.WithInitial a)

full_name: CategoryTheory.WithInitial
code: /-- Formally adjoin an initial object to a category. -/
inductive WithInitial : Type u
  | of : C → WithInitial
  | star : WithInitial
  deriving Inhabited
goal: Type u

full_name: CategoryTheory.WithInitial.star
code: /-- Formally adjoin an initial object to a category. -/
inductive WithInitial : Type u
  | of : C → WithInitial
  | star : WithInitial
  deriving Inhabited
goal: CategoryTheory.WithInitial C

full_name: CategoryTheory.WithTerminal.Hom
code: /-- Morphisms for `WithTerminal C`. -/
-- Porting note(#5171): removed `nolint has_nonempty_instance`
@[simp]
def Hom : WithTerminal C → WithTerminal C → Type v
  
goal: CategoryTheory.WithTerminal C → CategoryTheory.WithTerminal C → Type v

full_name: CategoryTheory.WithTerminal.id
code: /-- Identity morphisms for `WithTerminal C`. -/
@[simp]
def id : ∀ X : WithTerminal C, Hom X X
  
goal: X.Hom X

full_name: CategoryTheory.WithTerminal.comp
code: /-- Composition of morphisms for `WithTerminal C`. -/
@[simp]
def comp : ∀ {X Y Z : WithTerminal C}, Hom X Y → Hom Y Z → Hom X Z
  
goal: X.Hom Y → Y.Hom Z → X.Hom Z

full_name: CategoryTheory.WithTerminal.instCategory
code: instance : Category.{v} (WithTerminal C) 
goal: CategoryTheory.Category.{v, u} (CategoryTheory.WithTerminal C)

full_name: CategoryTheory.WithTerminal.down
code: /-- Helper function for typechecking. -/
def down {X Y : C} (f : of X ⟶ of Y) : X ⟶ Y 
goal: X ⟶ Y

full_name: CategoryTheory.WithTerminal.down_id
code: @[simp] lemma down_id {X : C} : down (𝟙 (of X)) = 𝟙 X 
goal: CategoryTheory.WithTerminal.down (CategoryTheory.CategoryStruct.id (CategoryTheory.WithTerminal.of X)) =
  CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.WithTerminal.down_comp
code: @[simp] lemma down_comp {X Y Z : C} (f : of X ⟶ of Y) (g : of Y ⟶ of Z) :
    down (f ≫ g) = down f ≫ down g 
goal: CategoryTheory.WithTerminal.down (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.WithTerminal.down f) (CategoryTheory.WithTerminal.down g)

full_name: CategoryTheory.WithTerminal.false_of_from_star
code: @[aesop safe destruct (rule_sets := [CategoryTheory])]
lemma false_of_from_star {X : C} (f : star ⟶ of X) : False 
goal: False

full_name: CategoryTheory.WithTerminal.incl
code: /-- The inclusion from `C` into `WithTerminal C`. -/
def incl : C ⥤ WithTerminal C 
goal: CategoryTheory.Functor C (CategoryTheory.WithTerminal C)

full_name: CategoryTheory.WithTerminal.instFullIncl
code: instance : (incl : C ⥤ _).Full 
goal: CategoryTheory.WithTerminal.incl.Full

full_name: CategoryTheory.WithTerminal.instFaithfulIncl
code: instance : (incl : C ⥤ _).Faithful 
goal: CategoryTheory.WithTerminal.incl.Faithful

full_name: CategoryTheory.WithTerminal.map_map
code: /-- Map `WithTerminal` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithTerminal C ⥤ WithTerminal D 
goal: (CategoryTheory.WithTerminal.map F).map f =
  match X, Y, f with
  | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.of y, 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

full_name: CategoryTheory.WithTerminal.map_obj
code: /-- Map `WithTerminal` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithTerminal C ⥤ WithTerminal D 
goal: (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

full_name: CategoryTheory.WithTerminal.map
code: /-- Map `WithTerminal` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithTerminal C ⥤ WithTerminal D 
goal: CategoryTheory.Functor (CategoryTheory.WithTerminal C) (CategoryTheory.WithTerminal D)

full_name: CategoryTheory.WithTerminal.mapId
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithTerminal C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithTerminal C) 
goal: CategoryTheory.WithTerminal.map (CategoryTheory.Functor.id C) ≅
  CategoryTheory.Functor.id (CategoryTheory.WithTerminal C)

full_name: CategoryTheory.WithTerminal.mapId_hom_app
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithTerminal C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithTerminal C) 
goal: (CategoryTheory.WithTerminal.mapId C).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

full_name: CategoryTheory.WithTerminal.mapId_inv_app
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithTerminal C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithTerminal C) 
goal: (CategoryTheory.WithTerminal.mapId C).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

full_name: CategoryTheory.WithTerminal.mapComp_inv_app
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: (CategoryTheory.WithTerminal.mapComp F G).inv.app X =
  (match X with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of (G.obj (F.obj x)))
    | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).inv

full_name: CategoryTheory.WithTerminal.mapComp_hom_app
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: (CategoryTheory.WithTerminal.mapComp F G).hom.app X =
  (match X with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of (G.obj (F.obj x)))
    | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom

full_name: CategoryTheory.WithTerminal.mapComp
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: CategoryTheory.WithTerminal.map (F.comp G) ≅
  (CategoryTheory.WithTerminal.map F).comp (CategoryTheory.WithTerminal.map G)

full_name: CategoryTheory.WithTerminal.map₂
code: /-- From a natural transformation of functors `C ⥤ D`, the induced natural transformation
of functors `WithTerminal C ⥤ WithTerminal D`. -/
@[simps]
def map₂ {D : Type*} [Category D] {F G : C ⥤ D} (η : F ⟶ G) : map F ⟶ map G 
goal: CategoryTheory.WithTerminal.map F ⟶ CategoryTheory.WithTerminal.map G

full_name: CategoryTheory.WithTerminal.map₂_app
code: /-- From a natural transformation of functors `C ⥤ D`, the induced natural transformation
of functors `WithTerminal C ⥤ WithTerminal D`. -/
@[simps]
def map₂ {D : Type*} [Category D] {F G : C ⥤ D} (η : F ⟶ G) : map F ⟶ map G 
goal: (CategoryTheory.WithTerminal.map₂ η).app X =
  match X with
  | CategoryTheory.WithTerminal.of x => η.app x
  | CategoryTheory.WithTerminal.star => CategoryTheory.CategoryStruct.id CategoryTheory.WithTerminal.star

full_name: CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_map₂
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: ∀ {a b : CategoryTheory.Cat} {f g : a ⟶ b} (η : f ⟶ g),
  CategoryTheory.WithTerminal.prelaxfunctor.map₂ η = CategoryTheory.WithTerminal.map₂ η

full_name: CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_map
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: ∀ {X Y : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑X ↑Y),
  CategoryTheory.WithTerminal.prelaxfunctor.map F = CategoryTheory.WithTerminal.map F

full_name: CategoryTheory.WithTerminal.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_obj
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: CategoryTheory.WithTerminal.prelaxfunctor.obj C = CategoryTheory.Cat.of (CategoryTheory.WithTerminal ↑C)

full_name: CategoryTheory.WithTerminal.prelaxfunctor
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: CategoryTheory.PrelaxFunctor CategoryTheory.Cat CategoryTheory.Cat

full_name: CategoryTheory.WithTerminal.pseudofunctor_mapComp
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: ∀ {a b c : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑a ↑b) (G : CategoryTheory.Functor ↑b ↑c),
  CategoryTheory.WithTerminal.pseudofunctor.mapComp F G = CategoryTheory.WithTerminal.mapComp F G

full_name: CategoryTheory.WithTerminal.pseudofunctor
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.Pseudofunctor CategoryTheory.Cat CategoryTheory.Cat

full_name: CategoryTheory.WithTerminal.pseudofunctor_toPrelaxFunctor
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.WithTerminal.pseudofunctor.toPrelaxFunctor = CategoryTheory.WithTerminal.prelaxfunctor

full_name: CategoryTheory.WithTerminal.pseudofunctor_mapId
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.WithTerminal.pseudofunctor.mapId C = CategoryTheory.WithTerminal.mapId ↑C

full_name: CategoryTheory.WithTerminal.instUniqueHomStar
code: instance {X : WithTerminal C} : Unique (X ⟶ star) 
goal: Unique (X ⟶ CategoryTheory.WithTerminal.star)

full_name: CategoryTheory.WithTerminal.starTerminal
code: /-- `WithTerminal.star` is terminal. -/
def starTerminal : Limits.IsTerminal (star : WithTerminal C) 
goal: CategoryTheory.Limits.IsTerminal CategoryTheory.WithTerminal.star

full_name: CategoryTheory.WithTerminal.lift
code: /-- Lift a functor `F : C ⥤ D` to `WithTerminal C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : WithTerminal C ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.WithTerminal C) D

full_name: CategoryTheory.WithTerminal.lift_obj
code: /-- Lift a functor `F : C ⥤ D` to `WithTerminal C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : WithTerminal C ⥤ D 
goal: (CategoryTheory.WithTerminal.lift F M hM).obj X =
  match X with
  | CategoryTheory.WithTerminal.of x => F.obj x
  | CategoryTheory.WithTerminal.star => Z

full_name: CategoryTheory.WithTerminal.lift_map
code: /-- Lift a functor `F : C ⥤ D` to `WithTerminal C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : WithTerminal C ⥤ D 
goal: (CategoryTheory.WithTerminal.lift F M hM).map f =
  match X, Y, f with
  | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.of y, 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

full_name: CategoryTheory.WithTerminal.inclLift_inv_app
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : incl ⋙ lift F M hM ≅ F 
goal: (CategoryTheory.WithTerminal.inclLift F M hM).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.WithTerminal.inclLift_hom_app
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : incl ⋙ lift F M hM ≅ F 
goal: (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)

full_name: CategoryTheory.WithTerminal.inclLift
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : incl ⋙ lift F M hM ≅ F 
goal: CategoryTheory.WithTerminal.incl.comp (CategoryTheory.WithTerminal.lift F M hM) ≅ F

full_name: CategoryTheory.WithTerminal.liftStar_hom
code: /-- The isomorphism between `(lift F _ _).obj WithTerminal.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithTerminal.liftStar F M hM).hom = CategoryTheory.CategoryStruct.id Z

full_name: CategoryTheory.WithTerminal.liftStar
code: /-- The isomorphism between `(lift F _ _).obj WithTerminal.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithTerminal.lift F M hM).obj CategoryTheory.WithTerminal.star ≅ Z

full_name: CategoryTheory.WithTerminal.liftStar_inv
code: /-- The isomorphism between `(lift F _ _).obj WithTerminal.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithTerminal.liftStar F M hM).inv = CategoryTheory.CategoryStruct.id Z

full_name: CategoryTheory.WithTerminal.lift_map_liftStar
code: theorem lift_map_liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) (x : C) :
    (lift F M hM).map (starTerminal.from (incl.obj x)) ≫ (liftStar F M hM).hom =
      (inclLift F M hM).hom.app x ≫ M x 
goal: 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)

full_name: CategoryTheory.WithTerminal.liftUnique
code: /-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, G.map (starTerminal.from (incl.obj x)) ≫ hG.hom = h.hom.app x ≫ M x) :
    G ≅ lift F M hM 
goal: G ≅ CategoryTheory.WithTerminal.lift F M hM

full_name: CategoryTheory.WithTerminal.liftToTerminal
code: /-- A variant of `lift` with `Z` a terminal object. -/
@[simps!]
def liftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    WithTerminal C ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.WithTerminal C) D

full_name: CategoryTheory.WithTerminal.liftToTerminal_map
code: /-- A variant of `lift` with `Z` a terminal object. -/
@[simps!]
def liftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    WithTerminal C ⥤ D 
goal: (CategoryTheory.WithTerminal.liftToTerminal F hZ).map f =
  match X, Y, f with
  | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.of y, 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

full_name: CategoryTheory.WithTerminal.liftToTerminal_obj
code: /-- A variant of `lift` with `Z` a terminal object. -/
@[simps!]
def liftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    WithTerminal C ⥤ D 
goal: (CategoryTheory.WithTerminal.liftToTerminal F hZ).obj X =
  match X with
  | CategoryTheory.WithTerminal.of x => F.obj x
  | CategoryTheory.WithTerminal.star => Z

full_name: CategoryTheory.WithTerminal.inclLiftToTerminal
code: /-- A variant of `incl_lift` with `Z` a terminal object. -/
@[simps!]
def inclLiftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    incl ⋙ liftToTerminal F hZ ≅ F 
goal: CategoryTheory.WithTerminal.incl.comp (CategoryTheory.WithTerminal.liftToTerminal F hZ) ≅ F

full_name: CategoryTheory.WithTerminal.inclLiftToTerminal_hom_app
code: /-- A variant of `incl_lift` with `Z` a terminal object. -/
@[simps!]
def inclLiftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    incl ⋙ liftToTerminal F hZ ≅ F 
goal: (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)

full_name: CategoryTheory.WithTerminal.inclLiftToTerminal_inv_app
code: /-- A variant of `incl_lift` with `Z` a terminal object. -/
@[simps!]
def inclLiftToTerminal {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z) :
    incl ⋙ liftToTerminal F hZ ≅ F 
goal: (CategoryTheory.WithTerminal.inclLiftToTerminal F hZ).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.WithTerminal.liftToTerminalUnique
code: /-- A variant of `lift_unique` with `Z` a terminal object. -/
@[simps!]
def liftToTerminalUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToTerminal F hZ 
goal: G ≅ CategoryTheory.WithTerminal.liftToTerminal F hZ

full_name: CategoryTheory.WithTerminal.liftToTerminalUnique_hom_app
code: /-- A variant of `lift_unique` with `Z` a terminal object. -/
@[simps!]
def liftToTerminalUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToTerminal F hZ 
goal: (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

full_name: CategoryTheory.WithTerminal.liftToTerminalUnique_inv_app
code: /-- A variant of `lift_unique` with `Z` a terminal object. -/
@[simps!]
def liftToTerminalUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToTerminal F hZ 
goal: (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

full_name: CategoryTheory.WithTerminal.homFrom
code: /-- Constructs a morphism to `star` from `of X`. -/
@[simp]
def homFrom (X : C) : incl.obj X ⟶ star 
goal: CategoryTheory.WithTerminal.incl.obj X ⟶ CategoryTheory.WithTerminal.star

full_name: CategoryTheory.WithTerminal.isIso_of_from_star
code: instance isIso_of_from_star {X : WithTerminal C} (f : star ⟶ X) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.WithInitial.Hom
code: /-- Morphisms for `WithInitial C`. -/
-- Porting note(#5171): removed `nolint has_nonempty_instance`
@[simp]
def Hom : WithInitial C → WithInitial C → Type v
  
goal: CategoryTheory.WithInitial C → CategoryTheory.WithInitial C → Type v

full_name: CategoryTheory.WithInitial.id
code: /-- Identity morphisms for `WithInitial C`. -/
@[simp]
def id : ∀ X : WithInitial C, Hom X X
  
goal: X.Hom X

full_name: CategoryTheory.WithInitial.comp
code: /-- Composition of morphisms for `WithInitial C`. -/
@[simp]
def comp : ∀ {X Y Z : WithInitial C}, Hom X Y → Hom Y Z → Hom X Z
  
goal: X.Hom Y → Y.Hom Z → X.Hom Z

full_name: CategoryTheory.WithInitial.instCategory
code: instance : Category.{v} (WithInitial C) 
goal: CategoryTheory.Category.{v, u} (CategoryTheory.WithInitial C)

full_name: CategoryTheory.WithInitial.down
code: /-- Helper function for typechecking. -/
def down {X Y : C} (f : of X ⟶ of Y) : X ⟶ Y 
goal: X ⟶ Y

full_name: CategoryTheory.WithInitial.down_id
code: @[simp] lemma down_id {X : C} : down (𝟙 (of X)) = 𝟙 X 
goal: CategoryTheory.WithInitial.down (CategoryTheory.CategoryStruct.id (CategoryTheory.WithInitial.of X)) =
  CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.WithInitial.down_comp
code: @[simp] lemma down_comp {X Y Z : C} (f : of X ⟶ of Y) (g : of Y ⟶ of Z) :
    down (f ≫ g) = down f ≫ down g 
goal: CategoryTheory.WithInitial.down (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.down f) (CategoryTheory.WithInitial.down g)

full_name: CategoryTheory.WithInitial.false_of_to_star
code: @[aesop safe destruct (rule_sets := [CategoryTheory])]
lemma false_of_to_star {X : C} (f : of X ⟶ star) : False 
goal: False

full_name: CategoryTheory.WithInitial.incl
code: /-- The inclusion of `C` into `WithInitial C`. -/
def incl : C ⥤ WithInitial C 
goal: CategoryTheory.Functor C (CategoryTheory.WithInitial C)

full_name: CategoryTheory.WithInitial.instFullIncl
code: instance : (incl : C ⥤ _).Full 
goal: CategoryTheory.WithInitial.incl.Full

full_name: CategoryTheory.WithInitial.instFaithfulIncl
code: instance : (incl : C ⥤ _).Faithful 
goal: CategoryTheory.WithInitial.incl.Faithful

full_name: CategoryTheory.WithInitial.map_obj
code: /-- Map `WithInitial` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithInitial C ⥤ WithInitial D 
goal: (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

full_name: CategoryTheory.WithInitial.map
code: /-- Map `WithInitial` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithInitial C ⥤ WithInitial D 
goal: CategoryTheory.Functor (CategoryTheory.WithInitial C) (CategoryTheory.WithInitial D)

full_name: CategoryTheory.WithInitial.map_map
code: /-- Map `WithInitial` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithInitial C ⥤ WithInitial D 
goal: (CategoryTheory.WithInitial.map F).map f =
  match X, Y, f with
  | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.of y, f => F.map (CategoryTheory.WithInitial.down f)
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of a, x => PUnit.unit
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => PUnit.unit

full_name: CategoryTheory.WithInitial.mapId
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithInitial C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithInitial C) 
goal: CategoryTheory.WithInitial.map (CategoryTheory.Functor.id C) ≅ CategoryTheory.Functor.id (CategoryTheory.WithInitial C)

full_name: CategoryTheory.WithInitial.mapId_inv_app
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithInitial C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithInitial C) 
goal: (CategoryTheory.WithInitial.mapId C).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

full_name: CategoryTheory.WithInitial.mapId_hom_app
code: /-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithInitial C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithInitial C) 
goal: (CategoryTheory.WithInitial.mapId C).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

full_name: CategoryTheory.WithInitial.mapComp_inv_app
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: (CategoryTheory.WithInitial.mapComp F G).inv.app X =
  (match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj x)))
    | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv

full_name: CategoryTheory.WithInitial.mapComp_hom_app
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: (CategoryTheory.WithInitial.mapComp F G).hom.app X =
  (match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj x)))
    | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).hom

full_name: CategoryTheory.WithInitial.mapComp
code: /-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G 
goal: CategoryTheory.WithInitial.map (F.comp G) ≅ (CategoryTheory.WithInitial.map F).comp (CategoryTheory.WithInitial.map G)

full_name: CategoryTheory.WithInitial.map₂
code: /-- From a natrual transformation of functors `C ⥤ D`, the induced natural transformation
of functors `WithInitial C ⥤ WithInitial D`. -/
@[simps]
def map₂ {D : Type*} [Category D] {F G : C ⥤ D} (η : F ⟶ G) : map F ⟶ map G 
goal: CategoryTheory.WithInitial.map F ⟶ CategoryTheory.WithInitial.map G

full_name: CategoryTheory.WithInitial.map₂_app
code: /-- From a natrual transformation of functors `C ⥤ D`, the induced natural transformation
of functors `WithInitial C ⥤ WithInitial D`. -/
@[simps]
def map₂ {D : Type*} [Category D] {F G : C ⥤ D} (η : F ⟶ G) : map F ⟶ map G 
goal: (CategoryTheory.WithInitial.map₂ η).app X =
  match X with
  | CategoryTheory.WithInitial.of x => η.app x
  | CategoryTheory.WithInitial.star => CategoryTheory.CategoryStruct.id CategoryTheory.WithInitial.star

full_name: CategoryTheory.WithInitial.prelaxfunctor
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: CategoryTheory.PrelaxFunctor CategoryTheory.Cat CategoryTheory.Cat

full_name: CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_obj
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: CategoryTheory.WithInitial.prelaxfunctor.obj C = CategoryTheory.Cat.of (CategoryTheory.WithInitial ↑C)

full_name: CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_toPrefunctor_map
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: ∀ {X Y : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑X ↑Y),
  CategoryTheory.WithInitial.prelaxfunctor.map F = CategoryTheory.WithInitial.map F

full_name: CategoryTheory.WithInitial.prelaxfunctor_toPrelaxFunctorStruct_map₂
code: /-- The prelax functor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat 
goal: ∀ {a b : CategoryTheory.Cat} {f g : a ⟶ b} (η : f ⟶ g),
  CategoryTheory.WithInitial.prelaxfunctor.map₂ η = CategoryTheory.WithInitial.map₂ η

full_name: CategoryTheory.WithInitial.pseudofunctor_toPrelaxFunctor
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.WithInitial.pseudofunctor.toPrelaxFunctor = CategoryTheory.WithInitial.prelaxfunctor

full_name: CategoryTheory.WithInitial.pseudofunctor
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.Pseudofunctor CategoryTheory.Cat CategoryTheory.Cat

full_name: CategoryTheory.WithInitial.pseudofunctor_mapComp
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: ∀ {a b c : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑a ↑b) (G : CategoryTheory.Functor ↑b ↑c),
  CategoryTheory.WithInitial.pseudofunctor.mapComp F G = CategoryTheory.WithInitial.mapComp F G

full_name: CategoryTheory.WithInitial.pseudofunctor_mapId
code: /-- The pseudofunctor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat 
goal: CategoryTheory.WithInitial.pseudofunctor.mapId C = CategoryTheory.WithInitial.mapId ↑C

full_name: CategoryTheory.WithInitial.instUniqueHomStar
code: instance {X : WithInitial C} : Unique (star ⟶ X) 
goal: Unique (CategoryTheory.WithInitial.star ⟶ X)

full_name: CategoryTheory.WithInitial.starInitial
code: /-- `WithInitial.star` is initial. -/
def starInitial : Limits.IsInitial (star : WithInitial C) 
goal: CategoryTheory.Limits.IsInitial CategoryTheory.WithInitial.star

full_name: CategoryTheory.WithInitial.lift_map
code: /-- Lift a functor `F : C ⥤ D` to `WithInitial C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : WithInitial C ⥤ D 
goal: (CategoryTheory.WithInitial.lift F M hM).map f =
  match X, Y, f with
  | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.of y, f => F.map (CategoryTheory.WithInitial.down f)
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of x, x_1 => M x
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x =>
    CategoryTheory.CategoryStruct.id
      ((fun X =>
          match X with
          | CategoryTheory.WithInitial.of x => F.obj x
          | CategoryTheory.WithInitial.star => Z)
        CategoryTheory.WithInitial.star)

full_name: CategoryTheory.WithInitial.lift_obj
code: /-- Lift a functor `F : C ⥤ D` to `WithInitial C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : WithInitial C ⥤ D 
goal: (CategoryTheory.WithInitial.lift F M hM).obj X =
  match X with
  | CategoryTheory.WithInitial.of x => F.obj x
  | CategoryTheory.WithInitial.star => Z

full_name: CategoryTheory.WithInitial.lift
code: /-- Lift a functor `F : C ⥤ D` to `WithInitial C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : WithInitial C ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.WithInitial C) D

full_name: CategoryTheory.WithInitial.inclLift_inv_app
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : incl ⋙ lift F M hM ≅ F 
goal: (CategoryTheory.WithInitial.inclLift F M hM).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.WithInitial.inclLift_hom_app
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : incl ⋙ lift F M hM ≅ F 
goal: (CategoryTheory.WithInitial.inclLift F M hM).hom.app X =
  CategoryTheory.CategoryStruct.id
    (match CategoryTheory.WithInitial.incl.obj X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z)

full_name: CategoryTheory.WithInitial.inclLift
code: /-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : incl ⋙ lift F M hM ≅ F 
goal: CategoryTheory.WithInitial.incl.comp (CategoryTheory.WithInitial.lift F M hM) ≅ F

full_name: CategoryTheory.WithInitial.liftStar_inv
code: /-- The isomorphism between `(lift F _ _).obj WithInitial.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithInitial.liftStar F M hM).inv = CategoryTheory.CategoryStruct.id Z

full_name: CategoryTheory.WithInitial.liftStar
code: /-- The isomorphism between `(lift F _ _).obj WithInitial.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithInitial.lift F M hM).obj CategoryTheory.WithInitial.star ≅ Z

full_name: CategoryTheory.WithInitial.liftStar_hom
code: /-- The isomorphism between `(lift F _ _).obj WithInitial.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : (lift F M hM).obj star ≅ Z 
goal: (CategoryTheory.WithInitial.liftStar F M hM).hom = CategoryTheory.CategoryStruct.id Z

full_name: CategoryTheory.WithInitial.liftStar_lift_map
code: theorem liftStar_lift_map {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) (x : C) :
    (liftStar F M hM).hom ≫ (lift F M hM).map (starInitial.to (incl.obj x)) =
      M x ≫ (inclLift F M hM).hom.app x 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.liftStar F M hM).hom
    ((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).hom.app x)

full_name: CategoryTheory.WithInitial.liftUnique
code: /-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, hG.symm.hom ≫ G.map (starInitial.to (incl.obj x)) = M x ≫ h.symm.hom.app x) :
    G ≅ lift F M hM 
goal: G ≅ CategoryTheory.WithInitial.lift F M hM

full_name: CategoryTheory.WithInitial.liftToInitial_map
code: /-- A variant of `lift` with `Z` an initial object. -/
@[simps!]
def liftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    WithInitial C ⥤ D 
goal: (CategoryTheory.WithInitial.liftToInitial F hZ).map f =
  match X, Y, f with
  | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.of y, f => F.map (CategoryTheory.WithInitial.down f)
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of x, x_1 => hZ.to (F.obj x)
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x => CategoryTheory.CategoryStruct.id Z

full_name: CategoryTheory.WithInitial.liftToInitial
code: /-- A variant of `lift` with `Z` an initial object. -/
@[simps!]
def liftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    WithInitial C ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.WithInitial C) D

full_name: CategoryTheory.WithInitial.liftToInitial_obj
code: /-- A variant of `lift` with `Z` an initial object. -/
@[simps!]
def liftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    WithInitial C ⥤ D 
goal: (CategoryTheory.WithInitial.liftToInitial F hZ).obj X =
  match X with
  | CategoryTheory.WithInitial.of x => F.obj x
  | CategoryTheory.WithInitial.star => Z

full_name: CategoryTheory.WithInitial.inclLiftToInitial_hom_app
code: /-- A variant of `incl_lift` with `Z` an initial object. -/
@[simps!]
def inclLiftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    incl ⋙ liftToInitial F hZ ≅ F 
goal: (CategoryTheory.WithInitial.inclLiftToInitial F hZ).hom.app X =
  CategoryTheory.CategoryStruct.id
    (match CategoryTheory.WithInitial.incl.obj X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z)

full_name: CategoryTheory.WithInitial.inclLiftToInitial
code: /-- A variant of `incl_lift` with `Z` an initial object. -/
@[simps!]
def inclLiftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    incl ⋙ liftToInitial F hZ ≅ F 
goal: CategoryTheory.WithInitial.incl.comp (CategoryTheory.WithInitial.liftToInitial F hZ) ≅ F

full_name: CategoryTheory.WithInitial.inclLiftToInitial_inv_app
code: /-- A variant of `incl_lift` with `Z` an initial object. -/
@[simps!]
def inclLiftToInitial {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z) :
    incl ⋙ liftToInitial F hZ ≅ F 
goal: (CategoryTheory.WithInitial.inclLiftToInitial F hZ).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.WithInitial.liftToInitialUnique_inv_app
code: /-- A variant of `lift_unique` with `Z` an initial object. -/
@[simps!]
def liftToInitialUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToInitial F hZ 
goal: (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

full_name: CategoryTheory.WithInitial.liftToInitialUnique_hom_app
code: /-- A variant of `lift_unique` with `Z` an initial object. -/
@[simps!]
def liftToInitialUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToInitial F hZ 
goal: (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

full_name: CategoryTheory.WithInitial.liftToInitialUnique
code: /-- A variant of `lift_unique` with `Z` an initial object. -/
@[simps!]
def liftToInitialUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsInitial Z)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToInitial F hZ 
goal: G ≅ CategoryTheory.WithInitial.liftToInitial F hZ

full_name: CategoryTheory.WithInitial.homTo
code: /-- Constructs a morphism from `star` to `of X`. -/
@[simp]
def homTo (X : C) : star ⟶ incl.obj X 
goal: CategoryTheory.WithInitial.star ⟶ CategoryTheory.WithInitial.incl.obj X

full_name: CategoryTheory.WithInitial.isIso_of_to_star
code: instance isIso_of_to_star {X : WithInitial C} (f : X ⟶ star) : IsIso f 
goal: CategoryTheory.IsIso f