Module: Mathlib.CategoryTheory.Limits.Shapes.Equalizers

Goal state before:
pp: case right
Z✝ : WalkingParallelPair
g : one ⟶ Z✝
⊢ WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
      zero = a →
        Z✝ = a_1 →
          right ≫ g ≍ t →
            (op
                (match zero with
                | zero => one
                | one => zero) ⟶
              op
                (match Z✝ with
                | zero => one
                | one => zero)))
      (right ≫ g)
      (fun h ↦
        Eq.ndrec (motive := fun {X} ↦
          (f : X ⟶ Z✝) →
            Z✝ = one →
              f ≍ left →
                (op
                    (match X with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match Z✝ with
                    | zero => one
                    | one => zero)))
          (fun f h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ left →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦ Quiver.Hom.op left) ⋯ f)
          ⋯ (right ≫ g))
      (fun h ↦
        Eq.ndrec (motive := fun {X} ↦
          (f : X ⟶ Z✝) →
            Z✝ = one →
              f ≍ right →
                (op
                    (match X with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match Z✝ with
                    | zero => one
                    | one => zero)))
          (fun f h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ right →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦ Quiver.Hom.op right) ⋯ f)
          ⋯ (right ≫ g))
      (fun X h ↦
        Eq.ndrec (motive := fun X ↦
          Z✝ = X →
            right ≫ g ≍ WalkingParallelPairHom.id X →
              (op
                  (match zero with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match Z✝ with
                  | zero => one
                  | one => zero)))
          (fun h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ WalkingParallelPairHom.id zero →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦
                Quiver.Hom.op
                  (WalkingParallelPairHom.id
                    (match zero with
                    | zero => one
                    | one => zero)))
              ⋯ (right ≫ g))
          h)
      ⋯ ⋯ ⋯ =
    WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
        zero = a →
          one = a_1 →
            right ≍ t →
              (op
                  (match zero with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match one with
                  | zero => one
                  | one => zero)))
        right
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ left →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ left →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op left) ⋯ f)
            ⋯ right)
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ right →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ right →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op right) ⋯ f)
            ⋯ right)
        (fun X h ↦
          Eq.ndrec (motive := fun X ↦
            one = X →
              right ≍ WalkingParallelPairHom.id X →
                (op
                    (match zero with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match one with
                    | zero => one
                    | one => zero)))
            (fun h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ WalkingParallelPairHom.id zero →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦
                  Quiver.Hom.op
                    (WalkingParallelPairHom.id
                      (match zero with
                      | zero => one
                      | one => zero)))
                ⋯ right)
            h)
        ⋯ ⋯ ⋯ ≫
      WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
        one = a →
          Z✝ = a_1 →
            g ≍ t →
              (op
                  (match one with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match Z✝ with
                  | zero => one
                  | one => zero)))
        g
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ Z✝) →
              Z✝ = one →
                f ≍ left →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Z✝ with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ left →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op left) ⋯ f)
            ⋯ g)
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ Z✝) →
              Z✝ = one →
                f ≍ right →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Z✝ with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ right →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op right) ⋯ f)
            ⋯ g)
        (fun X h ↦
          Eq.ndrec (motive := fun X ↦
            Z✝ = X →
              g ≍ WalkingParallelPairHom.id X →
                (op
                    (match one with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match Z✝ with
                    | zero => one
                    | one => zero)))
            (fun h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : one ⟶ Y) →
                  f ≍ WalkingParallelPairHom.id one →
                    (op
                        (match one with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦
                  Quiver.Hom.op
                    (WalkingParallelPairHom.id
                      (match one with
                      | zero => one
                      | one => zero)))
                ⋯ g)
            h)
        ⋯ ⋯ ⋯

Tactic:
cases g

Goal state after:
case right.id
⊢ WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
      zero = a →
        one = a_1 →
          right ≫ WalkingParallelPairHom.id one ≍ t →
            (op
                (match zero with
                | zero => one
                | one => zero) ⟶
              op
                (match one with
                | zero => one
                | one => zero)))
      (right ≫ WalkingParallelPairHom.id one)
      (fun h ↦
        Eq.ndrec (motive := fun {X} ↦
          (f : X ⟶ one) →
            one = one →
              f ≍ left →
                (op
                    (match X with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match one with
                    | zero => one
                    | one => zero)))
          (fun f h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ left →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦ Quiver.Hom.op left) ⋯ f)
          ⋯ (right ≫ WalkingParallelPairHom.id one))
      (fun h ↦
        Eq.ndrec (motive := fun {X} ↦
          (f : X ⟶ one) →
            one = one →
              f ≍ right →
                (op
                    (match X with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match one with
                    | zero => one
                    | one => zero)))
          (fun f h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ right →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦ Quiver.Hom.op right) ⋯ f)
          ⋯ (right ≫ WalkingParallelPairHom.id one))
      (fun X h ↦
        Eq.ndrec (motive := fun X ↦
          one = X →
            right ≫ WalkingParallelPairHom.id one ≍ WalkingParallelPairHom.id X →
              (op
                  (match zero with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match one with
                  | zero => one
                  | one => zero)))
          (fun h ↦
            Eq.ndrec (motive := fun {Y} ↦
              (f : zero ⟶ Y) →
                f ≍ WalkingParallelPairHom.id zero →
                  (op
                      (match zero with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match Y with
                      | zero => one
                      | one => zero)))
              (fun f h ↦
                Quiver.Hom.op
                  (WalkingParallelPairHom.id
                    (match zero with
                    | zero => one
                    | one => zero)))
              ⋯ (right ≫ WalkingParallelPairHom.id one))
          h)
      ⋯ ⋯ ⋯ =
    WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
        zero = a →
          one = a_1 →
            right ≍ t →
              (op
                  (match zero with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match one with
                  | zero => one
                  | one => zero)))
        right
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ left →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ left →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op left) ⋯ f)
            ⋯ right)
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ right →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ right →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op right) ⋯ f)
            ⋯ right)
        (fun X h ↦
          Eq.ndrec (motive := fun X ↦
            one = X →
              right ≍ WalkingParallelPairHom.id X →
                (op
                    (match zero with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match one with
                    | zero => one
                    | one => zero)))
            (fun h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ WalkingParallelPairHom.id zero →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦
                  Quiver.Hom.op
                    (WalkingParallelPairHom.id
                      (match zero with
                      | zero => one
                      | one => zero)))
                ⋯ right)
            h)
        ⋯ ⋯ ⋯ ≫
      WalkingParallelPairHom.casesOn (motive := fun a a_1 t ↦
        one = a →
          one = a_1 →
            WalkingParallelPairHom.id one ≍ t →
              (op
                  (match one with
                  | zero => one
                  | one => zero) ⟶
                op
                  (match one with
                  | zero => one
                  | one => zero)))
        (WalkingParallelPairHom.id one)
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ left →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ left →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op left) ⋯ f)
            ⋯ (WalkingParallelPairHom.id one))
        (fun h ↦
          Eq.ndrec (motive := fun {X} ↦
            (f : X ⟶ one) →
              one = one →
                f ≍ right →
                  (op
                      (match X with
                      | zero => one
                      | one => zero) ⟶
                    op
                      (match one with
                      | zero => one
                      | one => zero)))
            (fun f h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : zero ⟶ Y) →
                  f ≍ right →
                    (op
                        (match zero with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦ Quiver.Hom.op right) ⋯ f)
            ⋯ (WalkingParallelPairHom.id one))
        (fun X h ↦
          Eq.ndrec (motive := fun X ↦
            one = X →
              WalkingParallelPairHom.id one ≍ WalkingParallelPairHom.id X →
                (op
                    (match one with
                    | zero => one
                    | one => zero) ⟶
                  op
                    (match one with
                    | zero => one
                    | one => zero)))
            (fun h ↦
              Eq.ndrec (motive := fun {Y} ↦
                (f : one ⟶ Y) →
                  f ≍ WalkingParallelPairHom.id one →
                    (op
                        (match one with
                        | zero => one
                        | one => zero) ⟶
                      op
                        (match Y with
                        | zero => one
                        | one => zero)))
                (fun f h ↦
                  Quiver.Hom.op
                    (WalkingParallelPairHom.id
                      (match one with
                      | zero => one
                      | one => zero)))
                ⋯ (WalkingParallelPairHom.id one))
            h)
        ⋯ ⋯ ⋯