Theorem: CategoryTheory.preadditiveYoneda_obj
File: Mathlib/CategoryTheory/Preadditive/Yoneda/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
x✝ : C
⊢ { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
          map := fun {X Y} f =>
            { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
      (𝟙 x✝) =
    𝟙
      ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
        x✝)
state_after: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
x✝² : C
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (𝟙 x✝²)).app
        x✝¹)
      x✝ =
    ((𝟙
            ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.obj
              x✝²)).app
        x✝¹)
      x✝
tactic: ext
state_before: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
x✝² : C
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (𝟙 x✝²)).app
        x✝¹)
      x✝ =
    ((𝟙
            ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.obj
              x✝²)).app
        x✝¹)
      x✝
state_after: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
x✝² : C
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ x✝ ≫ 𝟙 x✝² = x✝
tactic: dsimp
state_before: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
x✝² : C
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ x✝ ≫ 𝟙 x✝² = x✝
state_after: no goals
tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
          map := fun {X Y} f =>
            { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
      (f ≫ g) =
    { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
        f ≫
      { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
        g
state_after: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (f ≫ g)).app
        x✝¹)
      x✝ =
    (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              f ≫
            { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              g).app
        x✝¹)
      x✝
tactic: ext
state_before: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (f ≫ g)).app
        x✝¹)
      x✝ =
    (({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              f ≫
            { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              g).app
        x✝¹)
      x✝
state_after: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ x✝ ≫ f ≫ g = (x✝ ≫ f) ≫ g
tactic: dsimp
state_before: case w.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x✝¹ : Cᵒᵖ
x✝ :
  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun X_1 => { toFun := fun g => g ≫ f, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ x✝ ≫ f ≫ g = (x✝ ≫ f) ≫ g
state_after: no goals
tactic: simp