-- Lean 4 proof step from Mathlib.CategoryTheory.WithTerminal.Basic (goal)
Goal:
C : Type u
inst : Category.{v, u} C
x_1 : (WithInitial C)ᵒᵖ
x : WithInitial C
of :
  ∀ (a : C),
    Eq (α :=
      Quiver.Hom (V := WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ))
      (match (motive :=
          (op (WithInitial.of a) ⟶ op (WithInitial.of a)) →
            Quiver.Hom (V := WithTerminal Cᵒᵖ)
              (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
                | op x =>
                  match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                  | WithInitial.of x => WithTerminal.of (op x)
                  | star => WithTerminal.star :
                WithTerminal Cᵒᵖ)
              (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
                | op x =>
                  match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                  | WithInitial.of x => WithTerminal.of (op x)
                  | star => WithTerminal.star :
                WithTerminal Cᵒᵖ))
          𝟙 (op (WithInitial.of a)) with
        | op f =>
          match (motive :=
            (x y : (WithInitial C)ᵒᵖ) →
              (unop y ⟶ unop x) →
                (x ⟶ y) →
                  Quiver.Hom (V := WithTerminal Cᵒᵖ)
                    (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) x with
                      | op x =>
                        match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                        | WithInitial.of x => WithTerminal.of (op x)
                        | star => WithTerminal.star :
                      WithTerminal Cᵒᵖ)
                    (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) y with
                      | op x =>
                        match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                        | WithInitial.of x => WithTerminal.of (op x)
                        | star => WithTerminal.star :
                      WithTerminal Cᵒᵖ))
            op (WithInitial.of a), op (WithInitial.of a), f, 𝟙 (op (WithInitial.of a)) with
          | op (WithInitial.of x), op (WithInitial.of y), f, x_2 => (WithTerminal.down f).op
          | op (WithInitial.of a), op star, x, x_2 =>
            Limits.IsTerminal.from WithTerminal.starTerminal
              (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
              | op x =>
                match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                | WithInitial.of x => WithTerminal.of (op x)
                | star => WithTerminal.star)
          | op star, op star, x, x_2 =>
            𝟙
              (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
              | op x =>
                match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                | WithInitial.of x => WithTerminal.of (op x)
                | star => WithTerminal.star) :
        Quiver.Hom (V := WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ))
      (𝟙
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star) :
        Quiver.Hom (V := WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ))
⊢ Eq (α :=
    Quiver.Hom (V := WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ))
    (match (motive :=
        (op x ⟶ op x) →
          Quiver.Hom (V := WithTerminal Cᵒᵖ)
            (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
              | op x =>
                match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                | WithInitial.of x => WithTerminal.of (op x)
                | star => WithTerminal.star :
              WithTerminal Cᵒᵖ)
            (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
              | op x =>
                match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                | WithInitial.of x => WithTerminal.of (op x)
                | star => WithTerminal.star :
              WithTerminal Cᵒᵖ))
        𝟙 (op x) with
      | op f =>
        match (motive :=
          (x y : (WithInitial C)ᵒᵖ) →
            (unop y ⟶ unop x) →
              (x ⟶ y) →
                Quiver.Hom (V := WithTerminal Cᵒᵖ)
                  (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) x with
                    | op x =>
                      match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                      | WithInitial.of x => WithTerminal.of (op x)
                      | star => WithTerminal.star :
                    WithTerminal Cᵒᵖ)
                  (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) y with
                    | op x =>
                      match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                      | WithInitial.of x => WithTerminal.of (op x)
                      | star => WithTerminal.star :
                    WithTerminal Cᵒᵖ))
          op x, op x, f, 𝟙 (op x) with
        | op (WithInitial.of x), op (WithInitial.of y), f, x_2 => (WithTerminal.down f).op
        | op (WithInitial.of a), op star, x, x_2 =>
          Limits.IsTerminal.from WithTerminal.starTerminal
            (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star)
        | op star, op star, x, x_2 =>
          𝟙
            (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star) :
      Quiver.Hom (V := WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ))
    (𝟙
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star) :
      Quiver.Hom (V := WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ)
        (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op x with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star :
          WithTerminal Cᵒᵖ))
have star : Eq (α :=
  Quiver.Hom (V := WithTerminal Cᵒᵖ)
    (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
      | op x =>
        match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
        | WithInitial.of x => WithTerminal.of (op x)
        | star => WithTerminal.star :
      WithTerminal Cᵒᵖ)
    (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
      | op x =>
        match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
        | WithInitial.of x => WithTerminal.of (op x)
        | star => WithTerminal.star :
      WithTerminal Cᵒᵖ))
  (match (motive :=
      Quiver.Hom.{v, u} (V := (WithInitial C)ᵒᵖ) (op star) (op star) →
        Quiver.Hom (V := WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ)
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
            | op x =>
              match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
              | WithInitial.of x => WithTerminal.of (op x)
              | star => WithTerminal.star :
            WithTerminal Cᵒᵖ))
      𝟙 (op star) with
    | op f =>
      match (motive :=
        (x y : (WithInitial C)ᵒᵖ) →
          (unop y ⟶ unop x) →
            (x ⟶ y) →
              Quiver.Hom (V := WithTerminal Cᵒᵖ)
                (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) x with
                  | op x =>
                    match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                    | WithInitial.of x => WithTerminal.of (op x)
                    | star => WithTerminal.star :
                  WithTerminal Cᵒᵖ)
                (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) y with
                  | op x =>
                    match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
                    | WithInitial.of x => WithTerminal.of (op x)
                    | star => WithTerminal.star :
                  WithTerminal Cᵒᵖ))
        op star, op star, f, 𝟙 (op star) with
      | op (WithInitial.of x), op (WithInitial.of y), f, x_2 => (WithTerminal.down f).op
      | op (WithInitial.of a), op star, x, x_2 =>
        Limits.IsTerminal.from WithTerminal.starTerminal
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op (WithInitial.of a) with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star)
      | op star, op star, x, x_2 =>
        𝟙
          (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
          | op x =>
            match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
            | WithInitial.of x => WithTerminal.of (op x)
            | star => WithTerminal.star) :
    Quiver.Hom (V := WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ))
  (𝟙
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
      | op x =>
        match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
        | WithInitial.of x => WithTerminal.of (op x)
        | star => WithTerminal.star) :
    Quiver.Hom (V := WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ)
      (match (motive := (WithInitial C)ᵒᵖ → WithTerminal Cᵒᵖ) op star with
        | op x =>
          match (motive := WithInitial C → WithTerminal Cᵒᵖ) x with
          | WithInitial.of x => WithTerminal.of (op x)
          | star => WithTerminal.star :
        WithTerminal Cᵒᵖ))
Tactic: cases x
Cleared hypotheses: x