Theorem: CategoryTheory.piEquivalenceFunctorDiscrete_counitIso
File: Mathlib/CategoryTheory/DiscreteCategory.lean

Proof steps:
state_before: J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
⊢ ∀ {X Y : Discrete J} (f : X ⟶ Y),
    (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                  { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                    map_id := ⋯, map_comp := ⋯ }).obj
              F).map
          f ≫
        ((fun j =>
              Iso.refl
                ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                            map_comp := ⋯ } ⋙
                          { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                            map_id := ⋯, map_comp := ⋯ }).obj
                      F).obj
                  j))
            Y).hom =
      ((fun j =>
              Iso.refl
                ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                            map_comp := ⋯ } ⋙
                          { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                            map_id := ⋯, map_comp := ⋯ }).obj
                      F).obj
                  j))
            X).hom ≫
        ((𝟭 (Discrete J ⥤ C)).obj F).map f
state_after: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x y : J
f : { as := x } ⟶ { as := y }
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        f ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := y }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map f
tactic: rintro ⟨x⟩ ⟨y⟩ f
state_before: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x y : J
f : { as := x } ⟶ { as := y }
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        f ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := y }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map f
state_after: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x : J
f : { as := x } ⟶ { as := x }
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        f ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map f
tactic: obtain rfl : x = y := Discrete.eq_of_hom f
state_before: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x : J
f : { as := x } ⟶ { as := x }
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        f ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map f
state_after: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x : J
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        (𝟙 { as := x }) ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map (𝟙 { as := x })
tactic: obtain rfl : f = 𝟙 _ := rfl
state_before: case mk.mk
J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
F : Discrete J ⥤ C
x : J
⊢ (({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
                { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                  map_id := ⋯, map_comp := ⋯ }).obj
            F).map
        (𝟙 { as := x }) ≫
      ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom =
    ((fun j =>
            Iso.refl
              ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                          map_comp := ⋯ } ⋙
                        { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                          map_id := ⋯, map_comp := ⋯ }).obj
                    F).obj
                j))
          { as := x }).hom ≫
      ((𝟭 (Discrete J ⥤ C)).obj F).map (𝟙 { as := x })
state_after: no goals
tactic: simp
state_before: J : Type u₂
C : Type u₁
inst✝ : Category.{v₁, u₁} C
⊢ ∀ {X Y : Discrete J ⥤ C} (f : X ⟶ Y),
    ({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯, map_comp := ⋯ } ⋙
              { obj := fun F => Discrete.functor F, map := fun {X Y} f => Discrete.natTrans fun j => f j.as,
                map_id := ⋯, map_comp := ⋯ }).map
          f ≫
        ((fun F =>
              NatIso.ofComponents
                (fun j =>
                  Iso.refl
                    ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                                map_comp := ⋯ } ⋙
                              { obj := fun F => Discrete.functor F,
                                map := fun {X Y} f => Discrete.natTrans fun j => f j.as, map_id := ⋯,
                                map_comp := ⋯ }).obj
                          F).obj
                      j))
                ⋯)
            Y).hom =
      ((fun F =>
              NatIso.ofComponents
                (fun j =>
                  Iso.refl
                    ((({ obj := fun F j => F.obj { as := j }, map := fun {X Y} f j => f.app { as := j }, map_id := ⋯,
                                map_comp := ⋯ } ⋙
                              { obj := fun F => Discrete.functor F,
                                map := fun {X Y} f => Discrete.natTrans fun j => f j.as, map_id := ⋯,
                                map_comp := ⋯ }).obj
                          F).obj
                      j))
                ⋯)
            X).hom ≫
        (𝟭 (Discrete J ⥤ C)).map f
state_after: no goals
tactic: aesop_cat