Theorem: CategoryTheory.Idempotents.toKaroubi_comp_karoubiFunctorCategoryEmbedding
File: Mathlib/CategoryTheory/Idempotents/FunctorCategories.lean

tactic: apply Functor.ext
state_before: J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X : J
⊢ toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C = (whiskeringRight J C (Karoubi C)).obj (toKaroubi C)

tactic: intro X Y f
state_before: case h_map
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X : J
⊢ autoParam
    (∀ (X Y : J ⥤ C) (f : X ⟶ Y),
      (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).map f =
        eqToHom (_ : ?F.obj X = ?G.obj X) ≫
          ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).map f ≫
            eqToHom
              (_ :
                ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj Y =
                  (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj Y))
    _auto✝

tactic: ext j
state_before: case h_map
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f✝ : P ⟶ Q
X✝ : J
X Y : J ⥤ C
f : X ⟶ Y
⊢ (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).map f =
    eqToHom (_ : ?F.obj X = ?G.obj X) ≫
      ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).map f ≫
        eqToHom
          (_ :
            ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj Y =
              (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj Y)

tactic: dsimp [toKaroubi]
state_before: case h_map.w.h.h
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f✝ : P ⟶ Q
X✝ : J
X Y : J ⥤ C
f : X ⟶ Y
j : J
⊢ (((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).map f).app j).f =
    ((eqToHom (_ : ?F.obj X = ?G.obj X) ≫
            ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).map f ≫
              eqToHom
                (_ :
                  ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj Y =
                    (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj Y)).app
        j).f

tactic: simp only [eqToHom_app, eqToHom_refl]
state_before: case h_map.w.h.h
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f✝ : P ⟶ Q
X✝ : J
X Y : J ⥤ C
f : X ⟶ Y
j : J
⊢ f.app j =
    ((eqToHom (_ : ?F.obj X = ?G.obj X)).app j).f ≫
      f.app j ≫
        ((eqToHom
                (_ :
                  Y ⋙ Functor.mk { obj := fun X => Karoubi.mk X (𝟙 X), map := fun {X Y} f => Hom.mk f } =
                    KaroubiFunctorCategoryEmbedding.obj (Karoubi.mk Y (𝟙 Y)))).app
            j).f

tactic: erw [comp_id, id_comp]
state_before: case h_map.w.h.h
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f✝ : P ⟶ Q
X✝ : J
X Y : J ⥤ C
f : X ⟶ Y
j : J
⊢ f.app j =
    (𝟙 ((KaroubiFunctorCategoryEmbedding.obj (Karoubi.mk X (𝟙 X))).obj j)).f ≫
      f.app j ≫ (𝟙 ((Y ⋙ Functor.mk { obj := fun X => Karoubi.mk X (𝟙 X), map := fun {X Y} f => Hom.mk f }).obj j)).f

tactic: intro X
state_before: case h_obj
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X : J
⊢ ∀ (X : J ⥤ C),
    (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X =
      ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X

tactic: apply Functor.ext
state_before: case h_obj
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
⊢ (toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X =
    ((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X

tactic: intro j j' φ
state_before: case h_obj.h_map
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
⊢ autoParam
    (∀ (X_1 Y : J) (f : X_1 ⟶ Y),
      ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).map f =
        eqToHom (_ : ?F.obj X_1 = ?G.obj X_1) ≫
          (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).map f ≫
            eqToHom
              (_ :
                (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).obj Y =
                  ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).obj Y))
    _auto✝

tactic: ext
state_before: case h_obj.h_map
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
j j' : J
φ : j ⟶ j'
⊢ ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).map φ =
    eqToHom (_ : ?F.obj j = ?G.obj j) ≫
      (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).map φ ≫
        eqToHom
          (_ :
            (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).obj j' =
              ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).obj j')

tactic: dsimp
state_before: case h_obj.h_map.h
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
j j' : J
φ : j ⟶ j'
⊢ (((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).map φ).f =
    (eqToHom (_ : ?F.obj j = ?G.obj j) ≫
        (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).map φ ≫
          eqToHom
            (_ :
              (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).obj j' =
                ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).obj j')).f

tactic: simp
state_before: case h_obj.h_map.h
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
j j' : J
φ : j ⟶ j'
⊢ 𝟙 (X.obj j) ≫ X.map φ = 𝟙 (X.obj j) ≫ X.map φ ≫ 𝟙 (X.obj j')

tactic: intro j
state_before: case h_obj.h_obj
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
⊢ ∀ (X_1 : J),
    ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).obj X_1 =
      (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).obj X_1

tactic: rfl
state_before: case h_obj.h_obj
J : Type u_1
C : Type u_2
inst✝¹ : Category J
inst✝ : Category C
P Q : Karoubi (J ⥤ C)
f : P ⟶ Q
X✝ : J
X : J ⥤ C
j : J
⊢ ((toKaroubi (J ⥤ C) ⋙ karoubiFunctorCategoryEmbedding J C).obj X).obj j =
    (((whiskeringRight J C (Karoubi C)).obj (toKaroubi C)).obj X).obj j