-- Lean 4 proof step from Mathlib.CategoryTheory.WithTerminal.Basic (goal)
Goal:
C : Type u
inst : Category.{v, u} C
x_1 y_1 : (WithTerminal C)ᵒᵖ
f_1 : unop y_1 ⟶ unop x_1
x y : C
f : unop (op (of y)) ⟶ unop (op (of x))
x_2 : op (of x) ⟶ op (of y)
⊢ Eq.{v + 1} (α :=
    Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op (of x)) ⟶
      Functor.obj.{v, v, u, u}
        (Functor.comp (D := WithInitial Cᵒᵖ)
          {
            obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
              match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
              | op x =>
                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                | of x => WithInitial.of (op x)
                | star => WithInitial.star,
            map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
              match (motive :=
                (x ⟶ y) →
                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ))
                x_3 with
              | op f =>
                match (motive :=
                  (x y : (WithTerminal C)ᵒᵖ) →
                    (unop y ⟶ unop x) →
                      (x ⟶ y) →
                        Quiver.Hom (V := WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ))
                  x, y, f, x_3 with
                | op (of x), op (of y), f, x_4 => (down f).op
                | op star, op (of a), x, x_4 =>
                  Limits.IsInitial.to WithInitial.starInitial
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star)
                | op star, op star, x, x_4 =>
                  𝟙
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star),
            map_id := ⋯, map_comp := ⋯ }
          {
            obj := fun (x : WithInitial Cᵒᵖ) ↦
              match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
              | WithInitial.of x => op (of (unop x))
              | WithInitial.star => op star,
            map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
              match (motive :=
                (x y : WithInitial Cᵒᵖ) →
                  (x ⟶ y) →
                    Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ))
                x, y, f with
              | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
              | WithInitial.star, WithInitial.of (op unop), x =>
                op
                  (Limits.IsTerminal.from starTerminal
                    (Opposite.unop
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.of (op unop) with
                      | WithInitial.of x => op (of (Opposite.unop x))
                      | WithInitial.star => op star)))
              | WithInitial.star, WithInitial.star, x =>
                𝟙
                  (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                  | WithInitial.of x => op (of (unop x))
                  | WithInitial.star => op star),
            map_id := ⋯, map_comp := ⋯ })
        (op (of y)))
    (CategoryStruct.comp (Y := Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op (of y)))
      (Functor.map (𝟭 (WithTerminal C)ᵒᵖ) (op f))
      (Iso.hom
        ((fun (x : (WithTerminal C)ᵒᵖ) ↦
            (match (motive :=
                (x : (WithTerminal C)ᵒᵖ) →
                  Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) x ≅
                    Functor.obj.{v, v, u, u}
                      (Functor.comp (D := WithInitial Cᵒᵖ)
                        {
                          obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                            match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star,
                          map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                            match (motive :=
                              (x ⟶ y) →
                                Quiver.Hom (V := WithInitial Cᵒᵖ)
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star :
                                    WithInitial Cᵒᵖ)
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star :
                                    WithInitial Cᵒᵖ))
                              x_3 with
                            | op f =>
                              match (motive :=
                                (x y : (WithTerminal C)ᵒᵖ) →
                                  (unop y ⟶ unop x) →
                                    (x ⟶ y) →
                                      Quiver.Hom (V := WithInitial Cᵒᵖ)
                                        (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                          | op x =>
                                            match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                            | of x => WithInitial.of (op x)
                                            | star => WithInitial.star :
                                          WithInitial Cᵒᵖ)
                                        (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                          | op x =>
                                            match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                            | of x => WithInitial.of (op x)
                                            | star => WithInitial.star :
                                          WithInitial Cᵒᵖ))
                                x, y, f, x_3 with
                              | op (of x), op (of y), f, x_4 => (down f).op
                              | op star, op (of a), x, x_4 =>
                                Limits.IsInitial.to WithInitial.starInitial
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                                  | op x =>
                                    match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                    | of x => WithInitial.of (op x)
                                    | star => WithInitial.star)
                              | op star, op star, x, x_4 =>
                                𝟙
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                                  | op x =>
                                    match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                    | of x => WithInitial.of (op x)
                                    | star => WithInitial.star),
                          map_id := ⋯, map_comp := ⋯ }
                        {
                          obj := fun (x : WithInitial Cᵒᵖ) ↦
                            match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                            | WithInitial.of x => op (of (unop x))
                            | WithInitial.star => op star,
                          map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                            match (motive :=
                              (x y : WithInitial Cᵒᵖ) →
                                (x ⟶ y) →
                                  Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                      | WithInitial.of x => op (of (unop x))
                                      | WithInitial.star => op star :
                                      (WithTerminal C)ᵒᵖ)
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                      | WithInitial.of x => op (of (unop x))
                                      | WithInitial.star => op star :
                                      (WithTerminal C)ᵒᵖ))
                              x, y, f with
                            | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                            | WithInitial.star, WithInitial.of (op unop), x =>
                              op
                                (Limits.IsTerminal.from starTerminal
                                  (Opposite.unop
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ)
                                      WithInitial.of (op unop) with
                                    | WithInitial.of x => op (of (Opposite.unop x))
                                    | WithInitial.star => op star)))
                            | WithInitial.star, WithInitial.star, x =>
                              𝟙
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                                | WithInitial.of x => op (of (unop x))
                                | WithInitial.star => op star),
                          map_id := ⋯, map_comp := ⋯ })
                      x)
                x with
              | op x =>
                match (motive :=
                  (x : WithTerminal C) →
                    Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op x) ≅
                      Functor.obj.{v, v, u, u}
                        (Functor.comp (D := WithInitial Cᵒᵖ)
                          {
                            obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                              match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star,
                            map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                              match (motive :=
                                (x ⟶ y) →
                                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ))
                                x_3 with
                              | op f =>
                                match (motive :=
                                  (x y : (WithTerminal C)ᵒᵖ) →
                                    (unop y ⟶ unop x) →
                                      (x ⟶ y) →
                                        Quiver.Hom (V := WithInitial Cᵒᵖ)
                                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                            | op x =>
                                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                              | of x => WithInitial.of (op x)
                                              | star => WithInitial.star :
                                            WithInitial Cᵒᵖ)
                                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                            | op x =>
                                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                              | of x => WithInitial.of (op x)
                                              | star => WithInitial.star :
                                            WithInitial Cᵒᵖ))
                                  x, y, f, x_3 with
                                | op (of x), op (of y), f, x_4 => (down f).op
                                | op star, op (of a), x, x_4 =>
                                  Limits.IsInitial.to WithInitial.starInitial
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star)
                                | op star, op star, x, x_4 =>
                                  𝟙
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star),
                            map_id := ⋯, map_comp := ⋯ }
                          {
                            obj := fun (x : WithInitial Cᵒᵖ) ↦
                              match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                              | WithInitial.of x => op (of (unop x))
                              | WithInitial.star => op star,
                            map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                              match (motive :=
                                (x y : WithInitial Cᵒᵖ) →
                                  (x ⟶ y) →
                                    Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                        | WithInitial.of x => op (of (unop x))
                                        | WithInitial.star => op star :
                                        (WithTerminal C)ᵒᵖ)
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                        | WithInitial.of x => op (of (unop x))
                                        | WithInitial.star => op star :
                                        (WithTerminal C)ᵒᵖ))
                                x, y, f with
                              | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                              | WithInitial.star, WithInitial.of (op unop), x =>
                                op
                                  (Limits.IsTerminal.from starTerminal
                                    (Opposite.unop
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ)
                                        WithInitial.of (op unop) with
                                      | WithInitial.of x => op (of (Opposite.unop x))
                                      | WithInitial.star => op star)))
                              | WithInitial.star, WithInitial.star, x =>
                                𝟙
                                  (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star),
                            map_id := ⋯, map_comp := ⋯ })
                        (op x))
                  x with
                | of x => Iso.refl (Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op (of x)))
                | star => Iso.refl (Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op star)) :
              Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) x ≅
                Functor.obj.{v, v, u, u}
                  (Functor.comp (D := WithInitial Cᵒᵖ)
                    {
                      obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                        match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                        | op x =>
                          match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                          | of x => WithInitial.of (op x)
                          | star => WithInitial.star,
                      map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                        match (motive :=
                          (x ⟶ y) →
                            Quiver.Hom (V := WithInitial Cᵒᵖ)
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                | op x =>
                                  match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                  | of x => WithInitial.of (op x)
                                  | star => WithInitial.star :
                                WithInitial Cᵒᵖ)
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                | op x =>
                                  match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                  | of x => WithInitial.of (op x)
                                  | star => WithInitial.star :
                                WithInitial Cᵒᵖ))
                          x_3 with
                        | op f =>
                          match (motive :=
                            (x y : (WithTerminal C)ᵒᵖ) →
                              (unop y ⟶ unop x) →
                                (x ⟶ y) →
                                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ))
                            x, y, f, x_3 with
                          | op (of x), op (of y), f, x_4 => (down f).op
                          | op star, op (of a), x, x_4 =>
                            Limits.IsInitial.to WithInitial.starInitial
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star)
                          | op star, op star, x, x_4 =>
                            𝟙
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star),
                      map_id := ⋯, map_comp := ⋯ }
                    {
                      obj := fun (x : WithInitial Cᵒᵖ) ↦
                        match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star,
                      map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                        match (motive :=
                          (x y : WithInitial Cᵒᵖ) →
                            (x ⟶ y) →
                              Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star :
                                  (WithTerminal C)ᵒᵖ)
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star :
                                  (WithTerminal C)ᵒᵖ))
                          x, y, f with
                        | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                        | WithInitial.star, WithInitial.of (op unop), x =>
                          op
                            (Limits.IsTerminal.from starTerminal
                              (Opposite.unop
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.of (op unop) with
                                | WithInitial.of x => op (of (Opposite.unop x))
                                | WithInitial.star => op star)))
                        | WithInitial.star, WithInitial.star, x =>
                          𝟙
                            (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                            | WithInitial.of x => op (of (unop x))
                            | WithInitial.star => op star),
                      map_id := ⋯, map_comp := ⋯ })
                  x))
          (op (of y)))))
    (CategoryStruct.comp (Y :=
      Functor.obj.{v, v, u, u}
        (Functor.comp (D := WithInitial Cᵒᵖ)
          {
            obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
              match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
              | op x =>
                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                | of x => WithInitial.of (op x)
                | star => WithInitial.star,
            map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
              match (motive :=
                (x ⟶ y) →
                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ))
                x_3 with
              | op f =>
                match (motive :=
                  (x y : (WithTerminal C)ᵒᵖ) →
                    (unop y ⟶ unop x) →
                      (x ⟶ y) →
                        Quiver.Hom (V := WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ))
                  x, y, f, x_3 with
                | op (of x), op (of y), f, x_4 => (down f).op
                | op star, op (of a), x, x_4 =>
                  Limits.IsInitial.to WithInitial.starInitial
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star)
                | op star, op star, x, x_4 =>
                  𝟙
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star),
            map_id := ⋯, map_comp := ⋯ }
          {
            obj := fun (x : WithInitial Cᵒᵖ) ↦
              match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
              | WithInitial.of x => op (of (unop x))
              | WithInitial.star => op star,
            map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
              match (motive :=
                (x y : WithInitial Cᵒᵖ) →
                  (x ⟶ y) →
                    Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ))
                x, y, f with
              | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
              | WithInitial.star, WithInitial.of (op unop), x =>
                op
                  (Limits.IsTerminal.from starTerminal
                    (Opposite.unop
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.of (op unop) with
                      | WithInitial.of x => op (of (Opposite.unop x))
                      | WithInitial.star => op star)))
              | WithInitial.star, WithInitial.star, x =>
                𝟙
                  (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                  | WithInitial.of x => op (of (unop x))
                  | WithInitial.star => op star),
            map_id := ⋯, map_comp := ⋯ })
        (op (of x)))
      (Iso.hom
        ((fun (x : (WithTerminal C)ᵒᵖ) ↦
            (match (motive :=
                (x : (WithTerminal C)ᵒᵖ) →
                  Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) x ≅
                    Functor.obj.{v, v, u, u}
                      (Functor.comp (D := WithInitial Cᵒᵖ)
                        {
                          obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                            match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star,
                          map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                            match (motive :=
                              (x ⟶ y) →
                                Quiver.Hom (V := WithInitial Cᵒᵖ)
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star :
                                    WithInitial Cᵒᵖ)
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star :
                                    WithInitial Cᵒᵖ))
                              x_3 with
                            | op f =>
                              match (motive :=
                                (x y : (WithTerminal C)ᵒᵖ) →
                                  (unop y ⟶ unop x) →
                                    (x ⟶ y) →
                                      Quiver.Hom (V := WithInitial Cᵒᵖ)
                                        (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                          | op x =>
                                            match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                            | of x => WithInitial.of (op x)
                                            | star => WithInitial.star :
                                          WithInitial Cᵒᵖ)
                                        (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                          | op x =>
                                            match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                            | of x => WithInitial.of (op x)
                                            | star => WithInitial.star :
                                          WithInitial Cᵒᵖ))
                                x, y, f, x_3 with
                              | op (of x), op (of y), f, x_4 => (down f).op
                              | op star, op (of a), x, x_4 =>
                                Limits.IsInitial.to WithInitial.starInitial
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                                  | op x =>
                                    match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                    | of x => WithInitial.of (op x)
                                    | star => WithInitial.star)
                              | op star, op star, x, x_4 =>
                                𝟙
                                  (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                                  | op x =>
                                    match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                    | of x => WithInitial.of (op x)
                                    | star => WithInitial.star),
                          map_id := ⋯, map_comp := ⋯ }
                        {
                          obj := fun (x : WithInitial Cᵒᵖ) ↦
                            match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                            | WithInitial.of x => op (of (unop x))
                            | WithInitial.star => op star,
                          map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                            match (motive :=
                              (x y : WithInitial Cᵒᵖ) →
                                (x ⟶ y) →
                                  Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                      | WithInitial.of x => op (of (unop x))
                                      | WithInitial.star => op star :
                                      (WithTerminal C)ᵒᵖ)
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                      | WithInitial.of x => op (of (unop x))
                                      | WithInitial.star => op star :
                                      (WithTerminal C)ᵒᵖ))
                              x, y, f with
                            | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                            | WithInitial.star, WithInitial.of (op unop), x =>
                              op
                                (Limits.IsTerminal.from starTerminal
                                  (Opposite.unop
                                    (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ)
                                      WithInitial.of (op unop) with
                                    | WithInitial.of x => op (of (Opposite.unop x))
                                    | WithInitial.star => op star)))
                            | WithInitial.star, WithInitial.star, x =>
                              𝟙
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                                | WithInitial.of x => op (of (unop x))
                                | WithInitial.star => op star),
                          map_id := ⋯, map_comp := ⋯ })
                      x)
                x with
              | op x =>
                match (motive :=
                  (x : WithTerminal C) →
                    Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op x) ≅
                      Functor.obj.{v, v, u, u}
                        (Functor.comp (D := WithInitial Cᵒᵖ)
                          {
                            obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                              match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star,
                            map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                              match (motive :=
                                (x ⟶ y) →
                                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ))
                                x_3 with
                              | op f =>
                                match (motive :=
                                  (x y : (WithTerminal C)ᵒᵖ) →
                                    (unop y ⟶ unop x) →
                                      (x ⟶ y) →
                                        Quiver.Hom (V := WithInitial Cᵒᵖ)
                                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                            | op x =>
                                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                              | of x => WithInitial.of (op x)
                                              | star => WithInitial.star :
                                            WithInitial Cᵒᵖ)
                                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                            | op x =>
                                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                              | of x => WithInitial.of (op x)
                                              | star => WithInitial.star :
                                            WithInitial Cᵒᵖ))
                                  x, y, f, x_3 with
                                | op (of x), op (of y), f, x_4 => (down f).op
                                | op star, op (of a), x, x_4 =>
                                  Limits.IsInitial.to WithInitial.starInitial
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star)
                                | op star, op star, x, x_4 =>
                                  𝟙
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                                    | op x =>
                                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                      | of x => WithInitial.of (op x)
                                      | star => WithInitial.star),
                            map_id := ⋯, map_comp := ⋯ }
                          {
                            obj := fun (x : WithInitial Cᵒᵖ) ↦
                              match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                              | WithInitial.of x => op (of (unop x))
                              | WithInitial.star => op star,
                            map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                              match (motive :=
                                (x y : WithInitial Cᵒᵖ) →
                                  (x ⟶ y) →
                                    Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                        | WithInitial.of x => op (of (unop x))
                                        | WithInitial.star => op star :
                                        (WithTerminal C)ᵒᵖ)
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                        | WithInitial.of x => op (of (unop x))
                                        | WithInitial.star => op star :
                                        (WithTerminal C)ᵒᵖ))
                                x, y, f with
                              | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                              | WithInitial.star, WithInitial.of (op unop), x =>
                                op
                                  (Limits.IsTerminal.from starTerminal
                                    (Opposite.unop
                                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ)
                                        WithInitial.of (op unop) with
                                      | WithInitial.of x => op (of (Opposite.unop x))
                                      | WithInitial.star => op star)))
                              | WithInitial.star, WithInitial.star, x =>
                                𝟙
                                  (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star),
                            map_id := ⋯, map_comp := ⋯ })
                        (op x))
                  x with
                | of x => Iso.refl (Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op (of x)))
                | star => Iso.refl (Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) (op star)) :
              Functor.obj.{v, v, u, u} (𝟭 (WithTerminal C)ᵒᵖ) x ≅
                Functor.obj.{v, v, u, u}
                  (Functor.comp (D := WithInitial Cᵒᵖ)
                    {
                      obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
                        match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                        | op x =>
                          match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                          | of x => WithInitial.of (op x)
                          | star => WithInitial.star,
                      map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
                        match (motive :=
                          (x ⟶ y) →
                            Quiver.Hom (V := WithInitial Cᵒᵖ)
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                | op x =>
                                  match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                  | of x => WithInitial.of (op x)
                                  | star => WithInitial.star :
                                WithInitial Cᵒᵖ)
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                | op x =>
                                  match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                  | of x => WithInitial.of (op x)
                                  | star => WithInitial.star :
                                WithInitial Cᵒᵖ))
                          x_3 with
                        | op f =>
                          match (motive :=
                            (x y : (WithTerminal C)ᵒᵖ) →
                              (unop y ⟶ unop x) →
                                (x ⟶ y) →
                                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ)
                                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                                      | op x =>
                                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                        | of x => WithInitial.of (op x)
                                        | star => WithInitial.star :
                                      WithInitial Cᵒᵖ))
                            x, y, f, x_3 with
                          | op (of x), op (of y), f, x_4 => (down f).op
                          | op star, op (of a), x, x_4 =>
                            Limits.IsInitial.to WithInitial.starInitial
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star)
                          | op star, op star, x, x_4 =>
                            𝟙
                              (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                              | op x =>
                                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                                | of x => WithInitial.of (op x)
                                | star => WithInitial.star),
                      map_id := ⋯, map_comp := ⋯ }
                    {
                      obj := fun (x : WithInitial Cᵒᵖ) ↦
                        match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star,
                      map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
                        match (motive :=
                          (x y : WithInitial Cᵒᵖ) →
                            (x ⟶ y) →
                              Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star :
                                  (WithTerminal C)ᵒᵖ)
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                                  | WithInitial.of x => op (of (unop x))
                                  | WithInitial.star => op star :
                                  (WithTerminal C)ᵒᵖ))
                          x, y, f with
                        | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
                        | WithInitial.star, WithInitial.of (op unop), x =>
                          op
                            (Limits.IsTerminal.from starTerminal
                              (Opposite.unop
                                (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.of (op unop) with
                                | WithInitial.of x => op (of (Opposite.unop x))
                                | WithInitial.star => op star)))
                        | WithInitial.star, WithInitial.star, x =>
                          𝟙
                            (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                            | WithInitial.of x => op (of (unop x))
                            | WithInitial.star => op star),
                      map_id := ⋯, map_comp := ⋯ })
                  x))
          (op (of x))))
      (Functor.map
        (Functor.comp (D := WithInitial Cᵒᵖ)
          {
            obj := fun (x : (WithTerminal C)ᵒᵖ) ↦
              match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
              | op x =>
                match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                | of x => WithInitial.of (op x)
                | star => WithInitial.star,
            map := fun {x y : (WithTerminal C)ᵒᵖ} (x_3 : x ⟶ y) ↦
              match (motive :=
                (x ⟶ y) →
                  Quiver.Hom (V := WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ)
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                      | op x =>
                        match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                        | of x => WithInitial.of (op x)
                        | star => WithInitial.star :
                      WithInitial Cᵒᵖ))
                x_3 with
              | op f =>
                match (motive :=
                  (x y : (WithTerminal C)ᵒᵖ) →
                    (unop y ⟶ unop x) →
                      (x ⟶ y) →
                        Quiver.Hom (V := WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) x with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ)
                          (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) y with
                            | op x =>
                              match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                              | of x => WithInitial.of (op x)
                              | star => WithInitial.star :
                            WithInitial Cᵒᵖ))
                  x, y, f, x_3 with
                | op (of x), op (of y), f, x_4 => (down f).op
                | op star, op (of a), x, x_4 =>
                  Limits.IsInitial.to WithInitial.starInitial
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op (of a) with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star)
                | op star, op star, x, x_4 =>
                  𝟙
                    (match (motive := (WithTerminal C)ᵒᵖ → WithInitial Cᵒᵖ) op star with
                    | op x =>
                      match (motive := WithTerminal C → WithInitial Cᵒᵖ) x with
                      | of x => WithInitial.of (op x)
                      | star => WithInitial.star),
            map_id := ⋯, map_comp := ⋯ }
          {
            obj := fun (x : WithInitial Cᵒᵖ) ↦
              match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
              | WithInitial.of x => op (of (unop x))
              | WithInitial.star => op star,
            map := fun {x y : WithInitial Cᵒᵖ} (f : x ⟶ y) ↦
              match (motive :=
                (x y : WithInitial Cᵒᵖ) →
                  (x ⟶ y) →
                    Quiver.Hom (V := (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) x with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ)
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) y with
                        | WithInitial.of x => op (of (unop x))
                        | WithInitial.star => op star :
                        (WithTerminal C)ᵒᵖ))
                x, y, f with
              | WithInitial.of (op x), WithInitial.of (op y), f => WithInitial.down f
              | WithInitial.star, WithInitial.of (op unop), x =>
                op
                  (Limits.IsTerminal.from starTerminal
                    (Opposite.unop
                      (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.of (op unop) with
                      | WithInitial.of x => op (of (Opposite.unop x))
                      | WithInitial.star => op star)))
              | WithInitial.star, WithInitial.star, x =>
                𝟙
                  (match (motive := WithInitial Cᵒᵖ → (WithTerminal C)ᵒᵖ) WithInitial.star with
                  | WithInitial.of x => op (of (unop x))
                  | WithInitial.star => op star),
            map_id := ⋯, map_comp := ⋯ })
        (op f)))
have simp : op f = WithInitial.down (down f).op
Tactic: simp only [Functor.id_obj, Functor.comp_obj,
              Functor.id_map, Iso.refl_hom, Category.comp_id, Functor.comp_map, Category.id_comp]