l3lab/ntp-mathlib huggingface dataset:
/-- Extension of a natural transformation `φ` between functors
`C ⥤ karoubi D` to a natural transformation between the
extension of these functors to `karoubi C ⥤ karoubi D` -/
@[simps]
def map {F G : C ⥤ Karoubi D} (φ : F ⟶ G) : obj F ⟶ obj G where
  app P :=
    { f := (F.map P.p).f ≫ (φ.app P.X).f
      comm := by
        have h := φ.naturality P.p
        have h' := F.congr_map P.idem
        simp only [hom_ext_iff, Karoubi.comp_f, F.map_comp] at h h'
        simp only [obj_obj_p, assoc, ← h]
        slice_rhs 1 3 => rw [h', h'] }
  naturality _ _ f := by
    ext
    dsimp [obj]
    have h := φ.naturality f.f
    have h' := F.congr_map (comp_p f)
    have h'' := F.congr_map (p_comp f)
    simp only [hom_ext_iff, Functor.map_comp, comp_f] at h h' h'' ⊢
    slice_rhs 2 3 => rw [← h]
    slice_lhs 1 2 => 

Proof state:
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.7431, u_1} C
inst✝¹ : Category.{?u.7435, u_2} D
inst✝ : Category.{?u.7439, u_3} E
F G : C ⥤ Karoubi D
φ : F ⟶ G
x✝¹ x✝ : Karoubi C
f : x✝¹ ⟶ x✝
h : (F.map f.f).f ≫ (φ.app x✝.X).f = (φ.app x✝¹.X).f ≫ (G.map f.f).f
h' : (F.map f.f).f ≫ (F.map x✝.p).f = (F.map f.f).f
h'' : (F.map x✝¹.p).f ≫ (F.map f.f).f = (F.map f.f).f
| (F.map f.f).f ≫ (F.map x✝.p).f
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.7431, u_1} C
inst✝¹ : Category.{?u.7435, u_2} D
inst✝ : Category.{?u.7439, u_3} E
F G : C ⥤ Karoubi D
φ : F ⟶ G
x✝¹ x✝ : Karoubi C
f : x✝¹ ⟶ x✝
h : (F.map f.f).f ≫ (φ.app x✝.X).f = (φ.app x✝¹.X).f ≫ (G.map f.f).f
h' : (F.map f.f).f ≫ (F.map x✝.p).f = (F.map f.f).f
h'' : (F.map x✝¹.p).f ≫ (F.map f.f).f = (F.map f.f).f
| (φ.app x✝.X).f

Next tactic:
rw [h']
/-- Extension of a natural transformation `φ` between functors
`C ⥤ karoubi D` to a natural transformation between the
extension of these functors to `karoubi C ⥤ karoubi D` -/
@[simps]
def map {F G : C ⥤ Karoubi D} (φ : F ⟶ G) : obj F ⟶ obj G where
  app P :=
    { f := (F.map P.p).f ≫ (φ.app P.X).f
      comm := by
        have h := φ.naturality P.p
        have h' := F.congr_map P.idem
        simp only [hom_ext_iff, Karoubi.comp_f, F.map_comp] at h h'
        simp only [obj_obj_p, assoc, ← h]
        slice_rhs 1 3 => rw [h', h'] }
  naturality _ _ f := by
    ext
    dsimp [obj]
    have h := φ.naturality f.f
    have h' := F.congr_map (comp_p f)
    have h'' := F.congr_map (p_comp f)
    simp only [hom_ext_iff, Functor.map_comp, comp_f] at h h' h'' ⊢
    slice_rhs 2 3 => rw [← h]
    slice_lhs 1 2 => rw [h']
    

Proof state:
case h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.7431, u_1} C
inst✝¹ : Category.{?u.7435, u_2} D
inst✝ : Category.{?u.7439, u_3} E
F G : C ⥤ Karoubi D
φ : F ⟶ G
x✝¹ x✝ : Karoubi C
f : x✝¹ ⟶ x✝
h : (F.map f.f).f ≫ (φ.app x✝.X).f = (φ.app x✝¹.X).f ≫ (G.map f.f).f
h' : (F.map f.f).f ≫ (F.map x✝.p).f = (F.map f.f).f
h'' : (F.map x✝¹.p).f ≫ (F.map f.f).f = (F.map f.f).f
⊢ (F.map f.f).f ≫ (φ.app x✝.X).f = (F.map x✝¹.p).f ≫ (F.map f.f).f ≫ (φ.app x✝.X).f

Next tactic:
slice_rhs 1 2 => rw [h'']
/-- Extension of a natural transformation `φ` between functors
`C ⥤ karoubi D` to a natural transformation between the
extension of these functors to `karoubi C ⥤ karoubi D` -/
@[simps]
def map {F G : C ⥤ Karoubi D} (φ : F ⟶ G) : obj F ⟶ obj G where
  app P :=
    { f := (F.map P.p).f ≫ (φ.app P.X).f
      comm := by
        have h := φ.naturality P.p
        have h' := F.congr_map P.idem
        simp only [hom_ext_iff, Karoubi.comp_f, F.map_comp] at h h'
        simp only [obj_obj_p, assoc, ← h]
        slice_rhs 1 3 => rw [h', h'] }
  naturality _ _ f := by
    ext
    dsimp [obj]
    have h := φ.naturality f.f
    have h' := F.congr_map (comp_p f)
    have h'' := F.congr_map (p_comp f)
    simp only [hom_ext_iff, Functor.map_comp, comp_f] at h h' h'' ⊢
    slice_rhs 2 3 => rw [← h]
    slice_lhs 1 2 => rw [h']
    slice_rhs 1 2 => 

Proof state:
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.7431, u_1} C
inst✝¹ : Category.{?u.7435, u_2} D
inst✝ : Category.{?u.7439, u_3} E
F G : C ⥤ Karoubi D
φ : F ⟶ G
x✝¹ x✝ : Karoubi C
f : x✝¹ ⟶ x✝
h : (F.map f.f).f ≫ (φ.app x✝.X).f = (φ.app x✝¹.X).f ≫ (G.map f.f).f
h' : (F.map f.f).f ≫ (F.map x✝.p).f = (F.map f.f).f
h'' : (F.map x✝¹.p).f ≫ (F.map f.f).f = (F.map f.f).f
| (F.map x✝¹.p).f ≫ (F.map f.f).f
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.7431, u_1} C
inst✝¹ : Category.{?u.7435, u_2} D
inst✝ : Category.{?u.7439, u_3} E
F G : C ⥤ Karoubi D
φ : F ⟶ G
x✝¹ x✝ : Karoubi C
f : x✝¹ ⟶ x✝
h : (F.map f.f).f ≫ (φ.app x✝.X).f = (φ.app x✝¹.X).f ≫ (G.map f.f).f
h' : (F.map f.f).f ≫ (F.map x✝.p).f = (F.map f.f).f
h'' : (F.map x✝¹.p).f ≫ (F.map f.f).f = (F.map f.f).f
| (φ.app x✝.X).f

Next tactic:
rw [h'']
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F : C ⥤ Karoubi D
⊢ { obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map (𝟙 F) =
    𝟙 ({ obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.obj F)

Next tactic:
ext P
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F : C ⥤ Karoubi D
P : Karoubi C
⊢ (({ obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map (𝟙 F)).app P).f =
    ((𝟙 ({ obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.obj F)).app P).f

Next tactic:
exact comp_p (F.map P.p)
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
⊢ { obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map (φ ≫ φ') =
    { obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map φ ≫
      { obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map φ'

Next tactic:
ext P
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
⊢ (({ obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map (φ ≫ φ')).app P).f =
    (({ obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map φ ≫
            { obj := FunctorExtension₁.obj, map := fun {X Y} => FunctorExtension₁.map }.map φ').app
        P).f

Next tactic:
simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = (F.map P.p).f ≫ (φ.app P.X).f ≫ (G.map P.p).f ≫ (φ'.app P.X).f

Next tactic:
have h := φ.naturality P.p
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : F.map P.p ≫ φ.app P.X = φ.app P.X ≫ G.map P.p
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = (F.map P.p).f ≫ (φ.app P.X).f ≫ (G.map P.p).f ≫ (φ'.app P.X).f

Next tactic:
have h' := F.congr_map P.idem
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : F.map P.p ≫ φ.app P.X = φ.app P.X ≫ G.map P.p
h' : F.map (P.p ≫ P.p) = F.map P.p
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = (F.map P.p).f ≫ (φ.app P.X).f ≫ (G.map P.p).f ≫ (φ'.app P.X).f

Next tactic:
simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = (F.map P.p).f ≫ (φ.app P.X).f ≫ (G.map P.p).f ≫ (φ'.app P.X).f

Next tactic:
slice_rhs 2 3 => rw [← h]
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
    slice_rhs 2 3 => 

Proof state:
case a.a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (φ.app P.X).f ≫ (G.map P.p).f
case a.a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (φ'.app P.X).f
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (F.map P.p).f

Next tactic:
rw [← h]
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
    slice_rhs 2 3 => rw [← h]
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = (F.map P.p).f ≫ ((F.map P.p).f ≫ (φ.app P.X).f) ≫ (φ'.app P.X).f

Next tactic:
slice_rhs 1 2 => rw [h']
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
    slice_rhs 2 3 => rw [← h]
    slice_rhs 1 2 => 

Proof state:
case a.a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (F.map P.p).f ≫ (F.map P.p).f
case a.a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (φ.app P.X).f
case a
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
| (φ'.app P.X).f

Next tactic:
rw [h']
/-- The canonical functor `(C ⥤ Karoubi D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps]
def functorExtension₁ : (C ⥤ Karoubi D) ⥤ Karoubi C ⥤ Karoubi D where
  obj := FunctorExtension₁.obj
  map := FunctorExtension₁.map
  map_id F := by
    ext P
    exact comp_p (F.map P.p)
  map_comp {F G H} φ φ' := by
    ext P
    simp only [comp_f, FunctorExtension₁.map_app_f, NatTrans.comp_app, assoc]
    have h := φ.naturality P.p
    have h' := F.congr_map P.idem
    simp only [hom_ext_iff, comp_f, F.map_comp] at h h'
    slice_rhs 2 3 => rw [← h]
    slice_rhs 1 2 => rw [h']
    

Proof state:
case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.21754, u_1} C
inst✝¹ : Category.{?u.21758, u_2} D
inst✝ : Category.{?u.21762, u_3} E
F G H : C ⥤ Karoubi D
φ : F ⟶ G
φ' : G ⟶ H
P : Karoubi C
h : (F.map P.p).f ≫ (φ.app P.X).f = (φ.app P.X).f ≫ (G.map P.p).f
h' : (F.map P.p).f ≫ (F.map P.p).f = (F.map P.p).f
⊢ (F.map P.p).f ≫ (φ.app P.X).f ≫ (φ'.app P.X).f = ((F.map P.p).f ≫ (φ.app P.X).f) ≫ (φ'.app P.X).f

Next tactic:
simp only [assoc]
/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₁` actually extends the original functors `C ⥤ Karoubi D`. -/
@[simps!]
def functorExtension₁CompWhiskeringLeftToKaroubiIso :
    functorExtension₁ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun F => NatIso.ofComponents
      (fun X =>
        { hom := { f := (F.obj X).p }
          inv := { f := (F.obj X).p } })
      (fun {X Y} f => by 

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.31037, u_1} C
inst✝¹ : Category.{?u.31041, u_2} D
inst✝ : Category.{?u.31045, u_3} E
F : C ⥤ Karoubi D
X Y : C
f : X ⟶ Y
⊢ ((functorExtension₁ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).obj F).map f ≫
      ((fun X => Iso.mk (Hom.mk (F.obj X).p) (Hom.mk (F.obj X).p)) Y).hom =
    ((fun X => Iso.mk (Hom.mk (F.obj X).p) (Hom.mk (F.obj X).p)) X).hom ≫ ((𝟭 (C ⥤ Karoubi D)).obj F).map f

Next tactic:
aesop_cat
/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₁` actually extends the original functors `C ⥤ Karoubi D`. -/
@[simps!]
def functorExtension₁CompWhiskeringLeftToKaroubiIso :
    functorExtension₁ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun F => NatIso.ofComponents
      (fun X =>
        { hom := { f := (F.obj X).p }
          inv := { f := (F.obj X).p } })
      (fun {X Y} f => by aesop_cat))
    (by 

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.31037, u_1} C
inst✝¹ : Category.{?u.31041, u_2} D
inst✝ : Category.{?u.31045, u_3} E
⊢ ∀ {X Y : C ⥤ Karoubi D} (f : X ⟶ Y),
    (functorExtension₁ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C)).map f ≫
        ((fun F => NatIso.ofComponents fun X => Iso.mk (Hom.mk (F.obj X).p) (Hom.mk (F.obj X).p)) Y).hom =
      ((fun F => NatIso.ofComponents fun X => Iso.mk (Hom.mk (F.obj X).p) (Hom.mk (F.obj X).p)) X).hom ≫
        (𝟭 (C ⥤ Karoubi D)).map f

Next tactic:
aesop_cat
/-- The counit isomorphism of the equivalence `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps!]
def KaroubiUniversal₁.counitIso :
    (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun G =>
      { hom :=
          { app := fun P =>
              { f := (G.map (decompId_p P)).f
                comm := by
                  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.61453, u_1} C
inst✝¹ : Category.{?u.61457, u_2} D
inst✝ : Category.{?u.61461, u_3} E
G : Karoubi C ⥤ Karoubi D
P : Karoubi C
⊢ (G.map (decompId_p P)).f =
    ((((whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D).obj G).obj P).p ≫
      (G.map (decompId_p P)).f ≫ (((𝟭 (Karoubi C ⥤ Karoubi D)).obj G).obj P).p

Next tactic:
simpa only [hom_ext_iff, G.map_comp, G.map_id] using
                    G.congr_map
                      (show P.decompId_p = (toKaroubi C).map P.p ≫ P.decompId_p ≫ 𝟙 _ by simp)
/-- The counit isomorphism of the equivalence `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps!]
def KaroubiUniversal₁.counitIso :
    (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun G =>
      { hom :=
          { app := fun P =>
              { f := (G.map (decompId_p P)).f
                comm := by
                  simpa only [hom_ext_iff, G.map_comp, G.map_id] using
                    G.congr_map
                      (show P.decompId_p = (toKaroubi C).map P.p ≫ P.decompId_p ≫ 𝟙 _ by 

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.61453, u_1} C
inst✝¹ : Category.{?u.61457, u_2} D
inst✝ : Category.{?u.61461, u_3} E
G : Karoubi C ⥤ Karoubi D
P : Karoubi C
⊢ decompId_p P = (toKaroubi C).map P.p ≫ decompId_p P ≫ 𝟙 P

Next tactic:
simp
/-- The counit isomorphism of the equivalence `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps!]
def KaroubiUniversal₁.counitIso :
    (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun G =>
      { hom :=
          { app := fun P =>
              { f := (G.map (decompId_p P)).f
                comm := by
                  simpa only [hom_ext_iff, G.map_comp, G.map_id] using
                    G.congr_map
                      (show P.decompId_p = (toKaroubi C).map P.p ≫ P.decompId_p ≫ 𝟙 _ by simp) }
            naturality := fun P Q f => by
              

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.61453, u_1} C
inst✝¹ : Category.{?u.61457, u_2} D
inst✝ : Category.{?u.61461, u_3} E
G : Karoubi C ⥤ Karoubi D
P Q : Karoubi C
f : P ⟶ Q
⊢ (((whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D).obj G).map f ≫
      (fun P => Hom.mk (G.map (decompId_p P)).f) Q =
    (fun P => Hom.mk (G.map (decompId_p P)).f) P ≫ ((𝟭 (Karoubi C ⥤ Karoubi D)).obj G).map f

Next tactic:
simpa only [hom_ext_iff, G.map_comp]
                using (G.congr_map (decompId_p_naturality f)).symm
/-- The counit isomorphism of the equivalence `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps!]
def KaroubiUniversal₁.counitIso :
    (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D ≅ 𝟭 _ :=
  NatIso.ofComponents
    (fun G =>
      { hom :=
          { app := fun P =>
              { f := (G.map (decompId_p P)).f
                comm := by
                  simpa only [hom_ext_iff, G.map_comp, G.map_id] using
                    G.congr_map
                      (show P.decompId_p = (toKaroubi C).map P.p ≫ P.decompId_p ≫ 𝟙 _ by simp) }
            naturality := fun P Q f => by
              simpa only [hom_ext_iff, G.map_comp]
                using (G.congr_map (decompId_p_naturality f)).symm }
        inv :=
          { app := fun P =>
              { f := (G.map (decompId_i P)).f
                comm := by
                  

Proof state:
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.61453, u_1} C
inst✝¹ : Category.{?u.61457, u_2} D
inst✝ : Category.{?u.61461, u_3} E
G : Karoubi C ⥤ Karoubi D
P : Karoubi C
⊢ (G.map (decompId_i P)).f =
    (((𝟭 (Karoubi C ⥤ Karoubi D)).obj G).obj P).p ≫
      (G.map (decompId_i P)).f ≫
        ((((whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ⋙ functorExtension₁ C D).obj G).obj P).p

Next tactic:
simpa only [hom_ext_iff, G.map_comp, G.map_id] using
                    G.congr_map
                      (show P.decompId_i = 𝟙 _ ≫ P.decompId_i ≫ (toKaroubi C).map P.p by simp)