Theorem: Groth16TypeI.is_sound (FormalSnarksProject/SNARKs/Groth16.lean)

State before:
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
⊢ soundness F Groth16TypeI (Fin n_wit → F)
    (fun stmt wit =>
      let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
      (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
                  (List.map (fun i => Polynomial.C (wit i) * u_wit i) (List.finRange n_wit)).sum) *
                ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
                  (List.map (fun i => Polynomial.C (wit i) * v_wit i) (List.finRange n_wit)).sum) -
              ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
                (List.map (fun i => Polynomial.C (wit i) * w_wit i) (List.finRange n_wit)).sum)).modByMonic
          t =
        0)
    fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)
Tactic:
unfold soundness verify check_poly pairing_poly proof_element_G1_as_poly proof_element_G2_as_poly
State after:
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
⊢ ∀ (stmt : Groth16TypeI.Stmt) (prover : Prover F Groth16TypeI),
    ((∀ (check_idx : Groth16TypeI.EqualityChecks),
          (List.map
                (fun pairing =>
                  ((List.map
                          (fun pf_elem =>
                            C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                              (List.map
                                  (fun SRS_elem =>
                                    C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                                  Groth16TypeI.ListSRSElements_G1).sum)
                          Groth16TypeI.ListProof_G1).sum +
                      (List.map
                          (fun SRS_elem =>
                            C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                              Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum) *
                    ((List.map
                          (fun pf_elem =>
                            C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                              (List.map
                                  (fun SRS_elem =>
                                    C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                                  Groth16TypeI.ListSRSElements_G2).sum)
                          Groth16TypeI.ListProof_G2).sum +
                      (List.map
                          (fun SRS_elem =>
                            C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                              Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum))
                (Groth16TypeI.ListPairings check_idx)).sum =
            0) ∧
        ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
          (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                Groth16TypeI.ListSRSElements_G1).sum =
            (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                Groth16TypeI.ListSRSElements_G2).sum) →
      (fun stmt wit =>
          let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
          (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
                      (List.map (fun i => Polynomial.C (wit i) * u_wit i) (List.finRange n_wit)).sum) *
                    ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
                      (List.map (fun i => Polynomial.C (wit i) * v_wit i) (List.finRange n_wit)).sum) -
                  ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
                    (List.map (fun i => Polynomial.C (wit i) * w_wit i) (List.finRange n_wit)).sum)).modByMonic
              t =
            0)
        stmt ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover)

State before:
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
⊢ ∀ (stmt : Groth16TypeI.Stmt) (prover : Prover F Groth16TypeI),
    ((∀ (check_idx : Groth16TypeI.EqualityChecks),
          (List.map
                (fun pairing =>
                  ((List.map
                          (fun pf_elem =>
                            C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                              (List.map
                                  (fun SRS_elem =>
                                    C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                                  Groth16TypeI.ListSRSElements_G1).sum)
                          Groth16TypeI.ListProof_G1).sum +
                      (List.map
                          (fun SRS_elem =>
                            C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                              Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum) *
                    ((List.map
                          (fun pf_elem =>
                            C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                              (List.map
                                  (fun SRS_elem =>
                                    C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                                  Groth16TypeI.ListSRSElements_G2).sum)
                          Groth16TypeI.ListProof_G2).sum +
                      (List.map
                          (fun SRS_elem =>
                            C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                              Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum))
                (Groth16TypeI.ListPairings check_idx)).sum =
            0) ∧
        ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
          (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                Groth16TypeI.ListSRSElements_G1).sum =
            (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                Groth16TypeI.ListSRSElements_G2).sum) →
      (fun stmt wit =>
          let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
          (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
                      (List.map (fun i => Polynomial.C (wit i) * u_wit i) (List.finRange n_wit)).sum) *
                    ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
                      (List.map (fun i => Polynomial.C (wit i) * v_wit i) (List.finRange n_wit)).sum) -
                  ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
                    (List.map (fun i => Polynomial.C (wit i) * w_wit i) (List.finRange n_wit)).sum)).modByMonic
              t =
            0)
        stmt ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover)
Tactic:
intros stmt prover eqns'
State after:
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns' :
  (∀ (check_idx : Groth16TypeI.EqualityChecks),
      (List.map
            (fun pairing =>
              ((List.map
                      (fun pf_elem =>
                        C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                          (List.map
                              (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                              Groth16TypeI.ListSRSElements_G1).sum)
                      Groth16TypeI.ListProof_G1).sum +
                  (List.map
                      (fun SRS_elem =>
                        C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                          Groth16TypeI.SRSElementValue_G1 SRS_elem)
                      Groth16TypeI.ListSRSElements_G1).sum) *
                ((List.map
                      (fun pf_elem =>
                        C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                          (List.map
                              (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                              Groth16TypeI.ListSRSElements_G2).sum)
                      Groth16TypeI.ListProof_G2).sum +
                  (List.map
                      (fun SRS_elem =>
                        C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                          Groth16TypeI.SRSElementValue_G2 SRS_elem)
                      Groth16TypeI.ListSRSElements_G2).sum))
            (Groth16TypeI.ListPairings check_idx)).sum =
        0) ∧
    ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
      (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum
⊢ let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
  (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns' :
  (∀ (check_idx : Groth16TypeI.EqualityChecks),
      (List.map
            (fun pairing =>
              ((List.map
                      (fun pf_elem =>
                        C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                          (List.map
                              (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                              Groth16TypeI.ListSRSElements_G1).sum)
                      Groth16TypeI.ListProof_G1).sum +
                  (List.map
                      (fun SRS_elem =>
                        C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                          Groth16TypeI.SRSElementValue_G1 SRS_elem)
                      Groth16TypeI.ListSRSElements_G1).sum) *
                ((List.map
                      (fun pf_elem =>
                        C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                          (List.map
                              (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                              Groth16TypeI.ListSRSElements_G2).sum)
                      Groth16TypeI.ListProof_G2).sum +
                  (List.map
                      (fun SRS_elem =>
                        C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                          Groth16TypeI.SRSElementValue_G2 SRS_elem)
                      Groth16TypeI.ListSRSElements_G2).sum))
            (Groth16TypeI.ListPairings check_idx)).sum =
        0) ∧
    ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
      (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum
⊢ let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
  (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
rcases eqns' with ⟨eqns, typeI_identification⟩
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
⊢ let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
  (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
⊢ let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
  (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
intro t
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
have eqn := eqns ()
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
eqns :
  ∀ (check_idx : Groth16TypeI.EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G1 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                            Groth16TypeI.ListSRSElements_G1).sum)
                    Groth16TypeI.ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G1 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G1 SRS_elem)
                    Groth16TypeI.ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      C (Groth16TypeI.verificationPairingProof_G2 stmt check_idx pairing pf_elem) *
                        (List.map
                            (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                            Groth16TypeI.ListSRSElements_G2).sum)
                    Groth16TypeI.ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      C (Groth16TypeI.verificationPairingSRS_G2 stmt check_idx pairing SRS_elem) *
                        Groth16TypeI.SRSElementValue_G2 SRS_elem)
                    Groth16TypeI.ListSRSElements_G2).sum))
          (Groth16TypeI.ListPairings check_idx)).sum =
      0
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
clear eqns
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
typeI_identification :
  ∀ pfs ∈ Groth16TypeI.Identified_Proof_Elems,
    (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
simp only [identified_proof_elems_def, Bool.not_eq_true, List.mem_cons, List.mem_singleton,
  forall_eq_or_imp, forall_eq] at typeI_identification
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
typeI_identification :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum ∧
    (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum ∧
      (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
              Groth16TypeI.ListSRSElements_G1).sum =
          (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
              Groth16TypeI.ListSRSElements_G2).sum ∧
        ∀ a ∈ [],
          (List.map (fun SRS_elem => C (prover.1 a.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                Groth16TypeI.ListSRSElements_G1).sum =
            (List.map (fun SRS_elem => C (prover.2 a.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
typeI_identification :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum ∧
    (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum ∧
      (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
              Groth16TypeI.ListSRSElements_G1).sum =
          (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
              Groth16TypeI.ListSRSElements_G2).sum ∧
        ∀ a ∈ [],
          (List.map (fun SRS_elem => C (prover.1 a.1 SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                Groth16TypeI.ListSRSElements_G1).sum =
            (List.map (fun SRS_elem => C (prover.2 a.2 SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
simp only [List.find?_nil, List.not_mem_nil, IsEmpty.forall_iff, Prod.forall, implies_true,
  and_true] at typeI_identification
State after:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
typeI_identification :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum ∧
    (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum ∧
      (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
typeI_identification :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
          Groth16TypeI.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
          Groth16TypeI.ListSRSElements_G2).sum ∧
    (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum ∧
      (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
            Groth16TypeI.ListSRSElements_G1).sum =
        (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
            Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
rcases typeI_identification with ⟨eqnA, eqnB, eqnC⟩
State after:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
eqnA :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnB :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnC :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0

State before:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
eqnA :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnB :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnC :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
⊢ (((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * u_wit i)
                  (List.finRange n_wit)).sum) *
            ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
              (List.map
                  (fun i =>
                    Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * v_wit i)
                  (List.finRange n_wit)).sum) -
          ((List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
            (List.map
                (fun i =>
                  Polynomial.C ((fun prover i => prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) prover i) * w_wit i)
                (List.finRange n_wit)).sum)).modByMonic
      t =
    0
Tactic:
suffices
    ((List.sum (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)))
    + (List.sum (List.map (fun i => Polynomial.C (prover.fst Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i) (List.finRange n_wit))))
    *
    ((List.sum (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)))
    + (List.sum (List.map (fun i => Polynomial.C (prover.fst Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i) (List.finRange n_wit))))
    =
    ((List.sum (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)))
    + (List.sum (List.map (fun i => Polynomial.C (prover.fst Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i) (List.finRange n_wit))))
    +
    List.sum (List.map (fun x : Fin (n_var - 1) => Polynomial.C (prover.fst Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ (x : ℕ) * t)) (List.finRange (n_var - 1))) by
  rw [<-sub_eq_iff_eq_add'] at this
  have h := congr_arg (fun x => x %ₘ t) this
  simp only at h
  simp
  rw [h]
  clear this h
  simp only [mul_comm _ (t), <-mul_assoc]
  simp only [mul_assoc, List.sum_map_mul_right, List.sum_map_mul_left]
  apply Polynomial.mul_self_modByMonic
  apply Polynomial.monic_prod_of_monic
  intro i hi
  exact Polynomial.monic_X_sub_C (r i)
  done
State after:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
eqnA :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnB :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnC :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum

State before:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G1 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.1 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
                          Groth16TypeI.ListSRSElements_G1).sum)
                  Groth16TypeI.ListProof_G1).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G1 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G1 SRS_elem)
                  Groth16TypeI.ListSRSElements_G1).sum) *
            ((List.map
                  (fun pf_elem =>
                    C (Groth16TypeI.verificationPairingProof_G2 stmt () pairing pf_elem) *
                      (List.map
                          (fun SRS_elem => C (prover.2 pf_elem SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
                          Groth16TypeI.ListSRSElements_G2).sum)
                  Groth16TypeI.ListProof_G2).sum +
              (List.map
                  (fun SRS_elem =>
                    C (Groth16TypeI.verificationPairingSRS_G2 stmt () pairing SRS_elem) *
                      Groth16TypeI.SRSElementValue_G2 SRS_elem)
                  Groth16TypeI.ListSRSElements_G2).sum))
        (Groth16TypeI.ListPairings ())).sum =
    0
eqnA :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.A SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnB :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.B SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
eqnC :
  (List.map (fun SRS_elem => C (prover.1 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G1 SRS_elem)
        Groth16TypeI.ListSRSElements_G1).sum =
    (List.map (fun SRS_elem => C (prover.2 Proof_Idx.C SRS_elem) * Groth16TypeI.SRSElementValue_G2 SRS_elem)
        Groth16TypeI.ListSRSElements_G2).sum
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum
Tactic:
simp_rw [Groth16TypeI] at eqn eqnA eqnB eqnC
State after:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match pf_elem with
                          | Proof_Idx.A => 1
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.αβ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.stmtγ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.cδ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 1) *
                      (List.map
                          (fun SRS_elem =>
                            C (prover.1 pf_elem SRS_elem) *
                              match SRS_elem with
                              | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                              | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                              | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                              | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                              | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                              | SRS_Elements_Idx.x_pow_times_t i =>
                                X Vars_γ * X Vars_x ^ ↑i *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                              | SRS_Elements_Idx.y i =>
                                X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                              | SRS_Elements_Idx.q i =>
                                X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                          ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                                  List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
                                List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
                              List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
                            List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum)
                  [Proof_Idx.A, Proof_Idx.B, Proof_Idx.C]).sum +
              (List.map
                  (fun SRS_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.αβ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 1
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.stmtγ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y i => stmt i
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.cδ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0) *
                      match SRS_elem with
                      | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                      | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                      | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                      | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                      | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                      | SRS_Elements_Idx.x_pow_times_t i =>
                        X Vars_γ * X Vars_x ^ ↑i *
                          (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                      | SRS_Elements_Idx.y i =>
                        X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                      | SRS_Elements_Idx.q i =>
                        X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                  ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
                        List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
                      List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
                    List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum) *
            ((List.map
                  (fun pf_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => -1
                          | Proof_Idx.C => 0
                        | PairingsIdx.αβ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.stmtγ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.cδ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0) *
                      (List.map
                          (fun SRS_elem =>
                            C (prover.2 pf_elem SRS_elem) *
                              match SRS_elem with
                              | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                              | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                              | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                              | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                              | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                              | SRS_Elements_Idx.x_pow_times_t i =>
                                X Vars_γ * X Vars_x ^ ↑i *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                              | SRS_Elements_Idx.y i =>
                                X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                              | SRS_Elements_Idx.q i =>
                                X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                          ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
                            List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum)
                  [Proof_Idx.A, Proof_Idx.B, Proof_Idx.C]).sum +
              (List.map
                  (fun SRS_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.αβ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 1
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.stmtγ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 1
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.cδ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 1
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0) *
                      match SRS_elem with
                      | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                      | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                      | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                      | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                      | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                      | SRS_Elements_Idx.x_pow_times_t i =>
                        X Vars_γ * X Vars_x ^ ↑i *
                          (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                      | SRS_Elements_Idx.y i =>
                        X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                      | SRS_Elements_Idx.q i =>
                        X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                  ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
                    List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum))
        [PairingsIdx.ab, PairingsIdx.αβ, PairingsIdx.stmtγ, PairingsIdx.cδ]).sum =
    0
eqnA :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.A SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.A SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
eqnB :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.B SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.B SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
eqnC :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.C SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.C SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum

State before:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (List.map
        (fun pairing =>
          ((List.map
                  (fun pf_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match pf_elem with
                          | Proof_Idx.A => 1
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.αβ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.stmtγ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.cδ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 1) *
                      (List.map
                          (fun SRS_elem =>
                            C (prover.1 pf_elem SRS_elem) *
                              match SRS_elem with
                              | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                              | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                              | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                              | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                              | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                              | SRS_Elements_Idx.x_pow_times_t i =>
                                X Vars_γ * X Vars_x ^ ↑i *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                              | SRS_Elements_Idx.y i =>
                                X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                              | SRS_Elements_Idx.q i =>
                                X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                          ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                                  List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
                                List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
                              List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
                            List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum)
                  [Proof_Idx.A, Proof_Idx.B, Proof_Idx.C]).sum +
              (List.map
                  (fun SRS_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.αβ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 1
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.stmtγ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y i => stmt i
                          | SRS_Elements_Idx.q a => 0
                        | PairingsIdx.cδ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.α => 0
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | SRS_Elements_Idx.x_pow_times_t a => 0
                          | SRS_Elements_Idx.y a => 0
                          | SRS_Elements_Idx.q a => 0) *
                      match SRS_elem with
                      | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                      | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                      | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                      | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                      | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                      | SRS_Elements_Idx.x_pow_times_t i =>
                        X Vars_γ * X Vars_x ^ ↑i *
                          (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                      | SRS_Elements_Idx.y i =>
                        X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                      | SRS_Elements_Idx.q i =>
                        X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                  ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
                        List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
                      List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
                    List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum) *
            ((List.map
                  (fun pf_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => -1
                          | Proof_Idx.C => 0
                        | PairingsIdx.αβ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.stmtγ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0
                        | PairingsIdx.cδ =>
                          match pf_elem with
                          | Proof_Idx.A => 0
                          | Proof_Idx.B => 0
                          | Proof_Idx.C => 0) *
                      (List.map
                          (fun SRS_elem =>
                            C (prover.2 pf_elem SRS_elem) *
                              match SRS_elem with
                              | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                              | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                              | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                              | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                              | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                              | SRS_Elements_Idx.x_pow_times_t i =>
                                X Vars_γ * X Vars_x ^ ↑i *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                              | SRS_Elements_Idx.y i =>
                                X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                              | SRS_Elements_Idx.q i =>
                                X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                          ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
                            List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum)
                  [Proof_Idx.A, Proof_Idx.B, Proof_Idx.C]).sum +
              (List.map
                  (fun SRS_elem =>
                    C
                        (match pairing with
                        | PairingsIdx.ab =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.αβ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 1
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.stmtγ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 1
                          | SRS_Elements_Idx.δ => 0
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0
                        | PairingsIdx.cδ =>
                          match SRS_elem with
                          | SRS_Elements_Idx.β => 0
                          | SRS_Elements_Idx.γ => 0
                          | SRS_Elements_Idx.δ => 1
                          | SRS_Elements_Idx.x_pow a => 0
                          | x => 0) *
                      match SRS_elem with
                      | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
                      | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
                      | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
                      | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
                      | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
                      | SRS_Elements_Idx.x_pow_times_t i =>
                        X Vars_γ * X Vars_x ^ ↑i *
                          (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
                      | SRS_Elements_Idx.y i =>
                        X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
                      | SRS_Elements_Idx.q i =>
                        X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
                  ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
                    List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum))
        [PairingsIdx.ab, PairingsIdx.αβ, PairingsIdx.stmtγ, PairingsIdx.cδ]).sum =
    0
eqnA :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.A SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.A SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
eqnB :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.B SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.B SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
eqnC :
  (List.map
        (fun SRS_elem =>
          C (prover.1 Proof_Idx.C SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.α] ++ [SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.δ] ++
                List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var) ++
              List.map (fun i => SRS_Elements_Idx.x_pow_times_t i) (List.finRange (n_var - 1)) ++
            List.map (fun i => SRS_Elements_Idx.y i) (List.finRange n_stmt) ++
          List.map (fun i => SRS_Elements_Idx.q i) (List.finRange n_wit))).sum =
    (List.map
        (fun SRS_elem =>
          C (prover.2 Proof_Idx.C SRS_elem) *
            match SRS_elem with
            | SRS_Elements_Idx.α => X Vars_γ * X Vars_δ * X Vars_α
            | SRS_Elements_Idx.β => X Vars_γ * X Vars_δ * X Vars_β
            | SRS_Elements_Idx.γ => X Vars_γ * X Vars_δ * X Vars_γ
            | SRS_Elements_Idx.δ => X Vars_γ * X Vars_δ * X Vars_δ
            | SRS_Elements_Idx.x_pow i => X Vars_γ * X Vars_δ * X Vars_x ^ ↑i
            | SRS_Elements_Idx.x_pow_times_t i =>
              X Vars_γ * X Vars_x ^ ↑i *
                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))
            | SRS_Elements_Idx.y i =>
              X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i) +
                  X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i) +
                X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)
            | SRS_Elements_Idx.q i =>
              X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i) +
                  X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i) +
                X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i))
        ([SRS_Elements_Idx.β] ++ [SRS_Elements_Idx.γ] ++ [SRS_Elements_Idx.δ] ++
          List.map (fun i => SRS_Elements_Idx.x_pow i) (List.finRange n_var))).sum
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum
Tactic:
simp only [monomial_zero', List.singleton_append, List.cons_append, List.append_assoc,
  List.map_cons, Sum.elim_inl, Sum.elim_inr, List.map_append, List.map_map, List.sum_cons,
  List.sum_append, List.map_nil, List.sum_nil, add_zero, Sum.elim_lam_const_lam_const, map_one,
  one_mul, map_zero, zero_mul, map_neg, neg_mul, neg_add_rev, zero_add, mul_zero,
  Function.comp, List.sum_map_zero] at eqn eqnA eqnB eqnC
State after:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
          (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
            (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                    (List.finRange n_var)).sum +
                ((List.map
                      (fun x =>
                        C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                          (X Vars_γ * X Vars_x ^ ↑x *
                            (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                      (List.finRange (n_var - 1))).sum +
                  ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) *
                            (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                                X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                              X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                        (List.finRange n_stmt)).sum +
                    (List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) *
                            (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                                X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                              X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                        (List.finRange n_wit)).sum)))))) *
        (-(List.map
                    (fun x =>
                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                    (List.finRange n_var)).sum +
              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β))) +
      (X Vars_γ * X Vars_δ * X Vars_α * (X Vars_γ * X Vars_δ * X Vars_β) +
        ((List.map
                (fun x =>
                  C (stmt x) *
                    (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                        X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                      X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                (List.finRange n_stmt)).sum *
            (X Vars_γ * X Vars_δ * X Vars_γ) +
          (C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
              (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
                (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
                  ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                        (List.finRange n_var)).sum +
                    ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                              (X Vars_γ * X Vars_x ^ ↑x *
                                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                          (List.finRange (n_var - 1))).sum +
                      ((List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) *
                                (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                            (List.finRange n_stmt)).sum +
                        (List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
                                (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                            (List.finRange n_wit)).sum)))))) *
            (X Vars_γ * X Vars_δ * X Vars_δ))) =
    0
eqnA :
  C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnB :
  C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnC :
  C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum

State before:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  (C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
          (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
            (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                    (List.finRange n_var)).sum +
                ((List.map
                      (fun x =>
                        C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                          (X Vars_γ * X Vars_x ^ ↑x *
                            (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                      (List.finRange (n_var - 1))).sum +
                  ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) *
                            (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                                X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                              X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                        (List.finRange n_stmt)).sum +
                    (List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) *
                            (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                                X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                              X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                        (List.finRange n_wit)).sum)))))) *
        (-(List.map
                    (fun x =>
                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                    (List.finRange n_var)).sum +
              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β))) +
      (X Vars_γ * X Vars_δ * X Vars_α * (X Vars_γ * X Vars_δ * X Vars_β) +
        ((List.map
                (fun x =>
                  C (stmt x) *
                    (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                        X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                      X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                (List.finRange n_stmt)).sum *
            (X Vars_γ * X Vars_δ * X Vars_γ) +
          (C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
              (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
                (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
                  ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                        (List.finRange n_var)).sum +
                    ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                              (X Vars_γ * X Vars_x ^ ↑x *
                                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                          (List.finRange (n_var - 1))).sum +
                      ((List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) *
                                (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                                    X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                                  X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                            (List.finRange n_stmt)).sum +
                        (List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
                                (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                                    X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                                  X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                            (List.finRange n_wit)).sum)))))) *
            (X Vars_γ * X Vars_δ * X Vars_δ))) =
    0
eqnA :
  C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnB :
  C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnC :
  C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) *
                        (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt x) +
                            X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt x) +
                          X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt x)))
                    (List.finRange n_stmt)).sum +
                (List.map
                    (fun x =>
                      C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
                        (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit x) +
                            X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit x) +
                          X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit x)))
                    (List.finRange n_wit)).sum))))) =
    C (prover.2 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum
Tactic:
simp only [mul_add, add_mul, List.sum_map_add] at eqn eqnA eqnB eqnC
State after:
case intro.intro.intro
F : Type
inst✝ : Field F
n_stmt n_wit n_var : ℕ
u_stmt : Fin n_stmt → Polynomial F
u_wit : Fin n_wit → Polynomial F
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_stmt : Fin n_stmt → Polynomial F
w_wit : Fin n_wit → Polynomial F
r : Fin n_wit → F
stmt : Groth16TypeI.Stmt
prover : Prover F Groth16TypeI
t : Polynomial F := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))
eqn :
  C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) *
                -(List.map
                      (fun x =>
                        C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                      (List.finRange n_var)).sum +
              (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) *
                  -(List.map
                        (fun x =>
                          C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                        (List.finRange n_var)).sum +
                (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) *
                    -(List.map
                          (fun x =>
                            C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                          (List.finRange n_var)).sum +
                  ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                          (List.finRange n_var)).sum *
                      -(List.map
                            (fun x =>
                              C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                            (List.finRange n_var)).sum +
                    ((List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                                (X Vars_γ * X Vars_x ^ ↑x *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                            (List.finRange (n_var - 1))).sum *
                        -(List.map
                              (fun x =>
                                C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                  (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                              (List.finRange n_var)).sum +
                      ((List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                      (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                                  (List.finRange n_stmt)).sum *
                              -(List.map
                                    (fun x =>
                                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                        (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                    (List.finRange n_var)).sum +
                            (List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                      (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                                  (List.finRange n_stmt)).sum *
                              -(List.map
                                    (fun x =>
                                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                        (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                    (List.finRange n_var)).sum +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                    (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                                (List.finRange n_stmt)).sum *
                            -(List.map
                                  (fun x =>
                                    C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                      (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                  (List.finRange n_var)).sum +
                        ((List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                      (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                                  (List.finRange n_wit)).sum *
                              -(List.map
                                    (fun x =>
                                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                        (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                    (List.finRange n_var)).sum +
                            (List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                      (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                                  (List.finRange n_wit)).sum *
                              -(List.map
                                    (fun x =>
                                      C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                        (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                    (List.finRange n_var)).sum +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                    (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                                (List.finRange n_wit)).sum *
                            -(List.map
                                  (fun x =>
                                    C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) *
                                      (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                                  (List.finRange n_var)).sum)))))) +
            (C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) *
                -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
              (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) *
                  -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) *
                    -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                  ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                          (List.finRange n_var)).sum *
                      -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                    ((List.map
                            (fun x =>
                              C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                                (X Vars_γ * X Vars_x ^ ↑x *
                                  (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                            (List.finRange (n_var - 1))).sum *
                        -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                      ((List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                      (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                                  (List.finRange n_stmt)).sum *
                              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                            (List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                      (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                                  (List.finRange n_stmt)).sum *
                              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                    (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                                (List.finRange n_stmt)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                        ((List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                      (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                                  (List.finRange n_wit)).sum *
                              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                            (List.map
                                  (fun i =>
                                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                      (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                                  (List.finRange n_wit)).sum *
                              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ)) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                    (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                                (List.finRange n_wit)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ))))))))) +
          (C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) *
              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
            (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) *
                -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
              (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) *
                  -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                        (List.finRange n_var)).sum *
                    -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                  ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                              (X Vars_γ * X Vars_x ^ ↑x *
                                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                          (List.finRange (n_var - 1))).sum *
                      -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                    ((List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                    (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                                (List.finRange n_stmt)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                    (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                                (List.finRange n_stmt)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                  (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                              (List.finRange n_stmt)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                      ((List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                    (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                                (List.finRange n_wit)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                    (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                                (List.finRange n_wit)).sum *
                            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ)) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                  (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                              (List.finRange n_wit)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ))))))))) +
        (C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) *
            -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
          (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) *
              -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
            (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) *
                -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
              ((List.map
                      (fun x =>
                        C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                      (List.finRange n_var)).sum *
                  -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                            (X Vars_γ * X Vars_x ^ ↑x *
                              (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                        (List.finRange (n_var - 1))).sum *
                    -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                  ((List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                  (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                              (List.finRange n_stmt)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                  (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                              (List.finRange n_stmt)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                      (List.map
                            (fun i =>
                              C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                                (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                            (List.finRange n_stmt)).sum *
                        -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                    ((List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                  (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                              (List.finRange n_wit)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                  (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                              (List.finRange n_wit)).sum *
                          -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β)) +
                      (List.map
                            (fun i =>
                              C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                                (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                            (List.finRange n_wit)).sum *
                        -(C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β))))))))) +
      (X Vars_γ * X Vars_δ * X Vars_α * (X Vars_γ * X Vars_δ * X Vars_β) +
        ((List.map (fun i => C (stmt i) * (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                    (List.finRange n_stmt)).sum *
                (X Vars_γ * X Vars_δ * X Vars_γ) +
              (List.map (fun i => C (stmt i) * (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                    (List.finRange n_stmt)).sum *
                (X Vars_γ * X Vars_δ * X Vars_γ) +
            (List.map (fun i => C (stmt i) * (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                  (List.finRange n_stmt)).sum *
              (X Vars_γ * X Vars_δ * X Vars_γ) +
          (C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) *
              (X Vars_γ * X Vars_δ * X Vars_δ) +
            (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) *
                (X Vars_γ * X Vars_δ * X Vars_δ) +
              (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) *
                  (X Vars_γ * X Vars_δ * X Vars_δ) +
                ((List.map
                        (fun x =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                        (List.finRange n_var)).sum *
                    (X Vars_γ * X Vars_δ * X Vars_δ) +
                  ((List.map
                          (fun x =>
                            C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                              (X Vars_γ * X Vars_x ^ ↑x *
                                (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                          (List.finRange (n_var - 1))).sum *
                      (X Vars_γ * X Vars_δ * X Vars_δ) +
                    ((List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                                    (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                                (List.finRange n_stmt)).sum *
                            (X Vars_γ * X Vars_δ * X Vars_δ) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                                    (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                                (List.finRange n_stmt)).sum *
                            (X Vars_γ * X Vars_δ * X Vars_δ) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                                  (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                              (List.finRange n_stmt)).sum *
                          (X Vars_γ * X Vars_δ * X Vars_δ) +
                      ((List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                                    (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                                (List.finRange n_wit)).sum *
                            (X Vars_γ * X Vars_δ * X Vars_δ) +
                          (List.map
                                (fun i =>
                                  C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                                    (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                                (List.finRange n_wit)).sum *
                            (X Vars_γ * X Vars_δ * X Vars_δ) +
                        (List.map
                              (fun i =>
                                C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                                  (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                              (List.finRange n_wit)).sum *
                          (X Vars_γ * X Vars_δ * X Vars_δ)))))))))) =
    0
eqnA :
  C (prover.1 Proof_Idx.A SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                            (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                        (List.finRange n_stmt)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                            (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                        (List.finRange n_stmt)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y i)) *
                          (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                      (List.finRange n_stmt)).sum +
                ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                            (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                        (List.finRange n_wit)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                            (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                        (List.finRange n_wit)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q i)) *
                          (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                      (List.finRange n_wit)).sum)))))) =
    C (prover.2 Proof_Idx.A SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnB :
  C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y i)) *
                            (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                        (List.finRange n_stmt)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y i)) *
                            (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                        (List.finRange n_stmt)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y i)) *
                          (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                      (List.finRange n_stmt)).sum +
                ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q i)) *
                            (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                        (List.finRange n_wit)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q i)) *
                            (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                        (List.finRange n_wit)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q i)) *
                          (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                      (List.finRange n_wit)).sum)))))) =
    C (prover.2 Proof_Idx.B SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
eqnC :
  C (prover.1 Proof_Idx.C SRS_Elements_Idx.α) * (X Vars_γ * X Vars_δ * X Vars_α) +
      (C (prover.1 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
        (C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          ((List.map
                (fun x => C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
                (List.finRange n_var)).sum +
            ((List.map
                  (fun x =>
                    C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                      (X Vars_γ * X Vars_x ^ ↑x *
                        (to_MvPolynomial_Option Vars) (∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i)))))
                  (List.finRange (n_var - 1))).sum +
              ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                            (X Vars_β * X Vars_δ * (to_MvPolynomial_Option Vars) (u_stmt i)))
                        (List.finRange n_stmt)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                            (X Vars_α * X Vars_δ * (to_MvPolynomial_Option Vars) (v_stmt i)))
                        (List.finRange n_stmt)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y i)) *
                          (X Vars_δ * (to_MvPolynomial_Option Vars) (w_stmt i)))
                      (List.finRange n_stmt)).sum +
                ((List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                            (X Vars_β * X Vars_γ * (to_MvPolynomial_Option Vars) (u_wit i)))
                        (List.finRange n_wit)).sum +
                    (List.map
                        (fun i =>
                          C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                            (X Vars_α * X Vars_γ * (to_MvPolynomial_Option Vars) (v_wit i)))
                        (List.finRange n_wit)).sum +
                  (List.map
                      (fun i =>
                        C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) *
                          (X Vars_γ * (to_MvPolynomial_Option Vars) (w_wit i)))
                      (List.finRange n_wit)).sum)))))) =
    C (prover.2 Proof_Idx.C SRS_Elements_Idx.β) * (X Vars_γ * X Vars_δ * X Vars_β) +
      (C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ) * (X Vars_γ * X Vars_δ * X Vars_γ) +
        (C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ) * (X Vars_γ * X Vars_δ * X Vars_δ) +
          (List.map
              (fun x => C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * (X Vars_γ * X Vars_δ * X Vars_x ^ ↑x))
              (List.finRange n_var)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * u_wit i)
            (List.finRange n_wit)).sum) *
      ((List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * w_wit i)
            (List.finRange n_wit)).sum +
      (List.map
          (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ ↑x * t))
          (List.finRange (n_var - 1))).sum