-- Lean 4 proof step from Mathlib.CategoryTheory.Limits.Constructions.Over.Products (goal)
Goal:
J_1 : Type w
C : Type u
inst : Category.{v, u} C
X Y Z B : C
J : Type w
F : Discrete J ⥤ Over.{v, u} B
c : Cone F
val : J
some :
  Eq.{v + 1} (α :=
    c.pt.left ⟶
      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
    (Option.rec (motive := fun (x : WidePullbackShape J) ↦
        c.pt.left ⟶
          Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
            (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
        c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val) :
      c.pt.left ⟶
        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
    (CategoryStruct.comp (Y :=
        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
        (Option.rec (motive := fun (x : WidePullbackShape J) ↦
          c.pt.left ⟶
            Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
              (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
          c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val))
        (WidePullbackShape.Hom.rec (motive := fun (a a_1 : WidePullbackShape J) (x : a.Hom a_1) ↦
          (h : Option.some val = a) →
            (h : Option.some val = a_1) →
              (h : WidePullbackShape.Hom.id (Option.some val) ≍ x) →
                Quiver.Hom.{v, u} (V := C)
                  (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                      (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                    C)
                  (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                      (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                    C))
          (fun (X : WidePullbackShape J) (h : Option.some val = X) ↦
            Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some val = x) ↦
              (h : Option.some val = x) →
                (h : HEq (WidePullbackShape.Hom.id (Option.some val)) (β := x.Hom x) (𝟙 x)) →
                  Quiver.Hom.{v, u} (V := C)
                    (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                      C)
                    (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                      C))
              (fun (h : Option.some val = Option.some val) ↦
                Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some val = x) ↦
                  (f : Option.some val ⟶ x) →
                    (h :
                        HEq f (β := WidePullbackShape.Hom (Option.some val) (Option.some val))
                          (𝟙 (Option.some val) : Option.some val ⟶ Option.some val)) →
                      Quiver.Hom.{v, u} (V := C)
                        (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                            (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                          C)
                        (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                            (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x :
                          C))
                  (fun (f : Option.some val ⟶ Option.some val)
                      (h :
                        HEq f (β := WidePullbackShape.Hom (Option.some val) (Option.some val))
                          (𝟙 (Option.some val) : Option.some val ⟶ Option.some val)) ↦
                    𝟙
                      (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val)))
                  ⋯ (WidePullbackShape.Hom.id (Option.some val)))
              h)
          (fun (j : J) (h : Option.some val = Option.some j) ↦
            Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some j = x) ↦
              (f : x ⟶ Option.some val) →
                (h : Option.some val = none) →
                  (h : f ≍ WidePullbackShape.Hom.term j) →
                    Quiver.Hom.{v, u} (V := C)
                      (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x :
                        C)
                      (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                        C))
              (fun (f : Option.some j ⟶ Option.some val) (h : Option.some val = none) ↦
                Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : none = x) ↦
                  (f : Option.some j ⟶ x) →
                    (h : f ≍ WidePullbackShape.Hom.term j) →
                      (F.obj { as := j : Discrete J }).left ⟶
                        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
                  (fun (f : Option.some j ⟶ none) (h : f ≍ WidePullbackShape.Hom.term j) ↦ (F.obj { as := j }).hom) ⋯ f)
              ⋯ (WidePullbackShape.Hom.id (Option.some val)))
          (WidePullbackShape.Hom.id (Option.some val)) ⋯ ⋯ ⋯) :
      c.pt.left ⟶
        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
⊢ Eq.{v + 1} (α :=
    c.pt.left ⟶
      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
    (𝟙 c.pt.left ≫
      Option.rec (motive := fun (x : WidePullbackShape J) ↦
        c.pt.left ⟶
          Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
            (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
        c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val))
    (CategoryStruct.comp (Y :=
      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
      (Option.rec (motive := fun (x : WidePullbackShape J) ↦
        c.pt.left ⟶
          Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
            (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
        c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val))
      (WidePullbackShape.Hom.rec (motive := fun (a a_1 : WidePullbackShape J) (x : a.Hom a_1) ↦
        (h : Option.some val = a) →
          (h : Option.some val = a_1) →
            (h : WidePullbackShape.Hom.id (Option.some val) ≍ x) →
              Quiver.Hom.{v, u} (V := C)
                (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                    (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                  C)
                (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                    (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                  C))
        (fun (X : WidePullbackShape J) (h : Option.some val = X) ↦
          Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some val = x) ↦
            (h : Option.some val = x) →
              (h : HEq (WidePullbackShape.Hom.id (Option.some val)) (β := x.Hom x) (𝟙 x)) →
                Quiver.Hom.{v, u} (V := C)
                  (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                      (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                    C)
                  (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                      (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                    C))
            (fun (h : Option.some val = Option.some val) ↦
              Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some val = x) ↦
                (f : Option.some val ⟶ x) →
                  (h :
                      HEq f (β := WidePullbackShape.Hom (Option.some val) (Option.some val))
                        (𝟙 (Option.some val) : Option.some val ⟶ Option.some val)) →
                    Quiver.Hom.{v, u} (V := C)
                      (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                        C)
                      (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x :
                        C))
                (fun (f : Option.some val ⟶ Option.some val)
                    (h :
                      HEq f (β := WidePullbackShape.Hom (Option.some val) (Option.some val))
                        (𝟙 (Option.some val) : Option.some val ⟶ Option.some val)) ↦
                  𝟙
                    (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                      (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val)))
                ⋯ (WidePullbackShape.Hom.id (Option.some val)))
            h)
        (fun (j : J) (h : Option.some val = Option.some j) ↦
          Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : Option.some j = x) ↦
            (f : x ⟶ Option.some val) →
              (h : Option.some val = none) →
                (h : f ≍ WidePullbackShape.Hom.term j) →
                  Quiver.Hom.{v, u} (V := C)
                    (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x :
                      C)
                    (Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val) :
                      C))
            (fun (f : Option.some j ⟶ Option.some val) (h : Option.some val = none) ↦
              Eq.rec (motive := fun (x : WidePullbackShape J) (x_1 : none = x) ↦
                (f : Option.some j ⟶ x) →
                  (h : f ≍ WidePullbackShape.Hom.term j) →
                    (F.obj { as := j : Discrete J }).left ⟶
                      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
                        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
                (fun (f : Option.some j ⟶ none) (h : f ≍ WidePullbackShape.Hom.term j) ↦ (F.obj { as := j }).hom) ⋯ f)
            ⋯ (WidePullbackShape.Hom.id (Option.some val)))
        (WidePullbackShape.Hom.id (Option.some val)) ⋯ ⋯ ⋯))
have some₁ : Eq.{v + 1} (α :=
  c.pt.left ⟶
    Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left)
      (Option.some val))
  (Option.rec (motive := fun (x : WidePullbackShape J) ↦
      c.pt.left ⟶
        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
      c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val) :
    c.pt.left ⟶
      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
  (Option.rec (motive := fun (x : WidePullbackShape J) ↦
      c.pt.left ⟶
        Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
          (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) x)
      c.pt.hom (fun (val : J) ↦ Hom.left (c.π.app { as := val })) (Option.some val) :
    c.pt.left ⟶
      Option.rec (motive := fun (x : WidePullbackShape J) ↦ C) B
        (fun (val : J) ↦ (F.obj { as := val : Discrete J }).left) (Option.some val))
Tactic: rw [Category.id_comp, Category.comp_id]