l3lab/ntp-mathlib huggingface dataset:
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case of.star.of.of
C : Type u
inst✝ : Category.{v, u} C
a✝² : C
f : of a✝² ⟶ star
a✝¹ : C
g : star ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case of.star.of.of
C : Type u
inst✝ : Category.{v, u} C
a✝² : C
f : of a✝² ⟶ star
a✝¹ : C
g : star ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case of.star.of.star
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : of a✝¹ ⟶ star
a✝ : C
g : star ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case of.star.of.star
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : of a✝¹ ⟶ star
a✝ : C
g : star ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case of.star.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : of a✝¹ ⟶ star
g : star ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case of.star.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : of a✝¹ ⟶ star
g : star ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case of.star.star.star
C : Type u
inst✝ : Category.{v, u} C
a✝ : C
f : of a✝ ⟶ star
g h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case of.star.star.star
C : Type u
inst✝ : Category.{v, u} C
a✝ : C
f : of a✝ ⟶ star
g h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.of.of.of
C : Type u
inst✝ : Category.{v, u} C
a✝² : C
f : star ⟶ of a✝²
a✝¹ : C
g : of a✝² ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.of.of.of
C : Type u
inst✝ : Category.{v, u} C
a✝² : C
f : star ⟶ of a✝²
a✝¹ : C
g : of a✝² ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.of.of.star
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : star ⟶ of a✝¹
a✝ : C
g : of a✝¹ ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.of.of.star
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : star ⟶ of a✝¹
a✝ : C
g : of a✝¹ ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.of.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : star ⟶ of a✝¹
g : of a✝¹ ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.of.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : star ⟶ of a✝¹
g : of a✝¹ ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.of.star.star
C : Type u
inst✝ : Category.{v, u} C
a✝ : C
f : star ⟶ of a✝
g : of a✝ ⟶ star
h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.of.star.star
C : Type u
inst✝ : Category.{v, u} C
a✝ : C
f : star ⟶ of a✝
g : of a✝ ⟶ star
h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.star.of.of
C : Type u
inst✝ : Category.{v, u} C
f : star ⟶ star
a✝¹ : C
g : star ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.star.of.of
C : Type u
inst✝ : Category.{v, u} C
f : star ⟶ star
a✝¹ : C
g : star ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.star.of.star
C : Type u
inst✝ : Category.{v, u} C
f : star ⟶ star
a✝ : C
g : star ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.star.of.star
C : Type u
inst✝ : Category.{v, u} C
f : star ⟶ star
a✝ : C
g : star ⟶ of a✝
h : of a✝ ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.star.star.of
C : Type u
inst✝ : Category.{v, u} C
f g : star ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.star.star.of
C : Type u
inst✝ : Category.{v, u} C
f g : star ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> 

Proof state:
case star.star.star.star
C : Type u
inst✝ : Category.{v, u} C
f g h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
try aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try 

Proof state:
case star.star.star.star
C : Type u
inst✝ : Category.{v, u} C
f g h : star ⟶ star
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
aesop_cat
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try aesop_cat
    · 

Proof state:
case of.of.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝² a✝¹ : C
f : of a✝² ⟶ of a✝¹
g : of a✝¹ ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
exact (g : PEmpty).elim
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try aesop_cat
    · exact (g : PEmpty).elim
    · 

Proof state:
case of.star.of.of
C : Type u
inst✝ : Category.{v, u} C
a✝² : C
f : of a✝² ⟶ star
a✝¹ : C
g : star ⟶ of a✝¹
a✝ : C
h : of a✝¹ ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
exact (f : PEmpty).elim
instance : Category.{v} (WithInitial C) where
  Hom X Y := Hom X Y
  id X := id X
  comp f g := comp f g
  assoc {a b c d} f g h := by
    -- Porting note: it would be nice to automate this away as well.
    -- See the note on `Category (WithTerminal C)`
    cases a <;> cases b <;> cases c <;> cases d <;> try aesop_cat
    · exact (g : PEmpty).elim
    · exact (f : PEmpty).elim
    · 

Proof state:
case of.star.star.of
C : Type u
inst✝ : Category.{v, u} C
a✝¹ : C
f : of a✝¹ ⟶ star
g : star ⟶ star
a✝ : C
h : star ⟶ of a✝
⊢ (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
exact (f : PEmpty).elim
instance {X : WithInitial C} : Unique (star ⟶ X) where
  default :=
    match X with
    | of _x => PUnit.unit
    | star => PUnit.unit
  uniq := by 

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : WithInitial C
⊢ ∀ (a : star ⟶ X), a = default

Next tactic:
aesop_cat
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 := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) =
    M x ≫ (inclLift F M hM).hom.app x

Next tactic:
erw [Category.id_comp, Category.comp_id]
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 := by
  erw [Category.id_comp, Category.comp_id]
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} 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
⊢ (lift F M hM).map (Limits.IsInitial.to starInitial (incl.obj x)) = M x

Next tactic:
rfl
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
⊢ ∀ {X Y : WithInitial C} (f : X ⟶ Y),
    G.map f ≫
        ((fun X =>
              match X with
              | of x => h.app x
              | star => hG)
            Y).hom =
      ((fun X =>
              match X with
              | of x => h.app x
              | star => hG)
            X).hom ≫
        (lift F M hM).map f

Next tactic:
rintro (X | X) (Y | Y) f
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · 

Proof state:
case of.of
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
X Y : C
f : of X ⟶ of Y
⊢ G.map f ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          (of Y)).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          (of X)).hom ≫
      (lift F M hM).map f

Next tactic:
apply h.hom.naturality
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · 

Proof state:
case of.star
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
X : C
f : of X ⟶ star
⊢ G.map f ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          (of X)).hom ≫
      (lift F M hM).map f

Next tactic:
cases f
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · 

Proof state:
case star.of
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
Y : C
f : star ⟶ of Y
⊢ G.map f ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          (of Y)).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom ≫
      (lift F M hM).map f

Next tactic:
cases f
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        

Proof state:
case star.of.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
Y : C
⊢ G.map PUnit.unit ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          (of Y)).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom ≫
      (lift F M hM).map PUnit.unit

Next tactic:
change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        

Proof state:
case star.of.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
Y : C
⊢ G.map PUnit.unit ≫ h.hom.app Y = hG.hom ≫ (lift F M hM).map PUnit.unit

Next tactic:
symm
/-- 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 :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        symm
        

Proof state:
case star.of.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} 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 (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
Y : C
⊢ hG.hom ≫ (lift F M hM).map PUnit.unit = G.map PUnit.unit ≫ h.hom.app Y

Next tactic:
erw [← Iso.eq_inv_comp, ← Category.assoc, hh]