Theorem: CategoryTheory.preadditiveCoyoneda_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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
          map := fun {X Y} f =>
            { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
      (𝟙 x✝) =
    𝟙
      ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (𝟙 x✝²)).app
        x✝¹)
      x✝ =
    ((𝟙
            ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (𝟙 x✝²)).app
        x✝¹)
      x✝ =
    ((𝟙
            ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ 𝟙 (unop 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          x✝²).obj
      x✝¹)
⊢ 𝟙 (unop 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
          map := fun {X Y} f =>
            { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ }, naturality := ⋯ } }.map
      (f ≫ g) =
    { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                naturality := ⋯ } }.map
        f ≫
      { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
            map := fun {X Y} f =>
              { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (f ≫ g)).app
        x✝¹)
      x✝ =
    (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              f ≫
            { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                map := fun {X Y} f =>
                  { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                    naturality := ⋯ } }.map
            (f ≫ g)).app
        x✝¹)
      x✝ =
    (({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                      naturality := ⋯ } }.map
              f ≫
            { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
                  map := fun {X Y} f =>
                    { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, 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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (g.unop ≫ f.unop) ≫ x✝ = g.unop ≫ f.unop ≫ x✝
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 X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGrp,
              map := fun {X Y} f =>
                { app := fun Y_1 => { toFun := fun g => f.unop ≫ g, map_zero' := ⋯, map_add' := ⋯ },
                  naturality := ⋯ } }.obj
          X✝).obj
      x✝¹)
⊢ (g.unop ≫ f.unop) ≫ x✝ = g.unop ≫ f.unop ≫ x✝
state_after: no goals
tactic: simp