unfold AGMProofSystemInstantiation.soundness AGMProofSystemInstantiation.verify AGMProofSystemInstantiation.proof_element_G1_as_poly AGMProofSystemInstantiation.proof_element_G2_as_poly
F : Type
inst✝ : Field F
n_stmt n_wit m d : ℕ
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_wit : Fin m → Polynomial F
v_0 w_0 : Polynomial F
r : Fin n_wit → F
⊢ AGMProofSystemInstantiation.soundness F GGPR ((Fin n_wit → F) × (Fin m → F))
    (fun stmt wit =>
      let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
      ((v_0 + (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
                (List.map (fun i => Polynomial.C (wit.1 i) * v_wit i) (List.finRange n_wit)).sum) *
              (w_0 + (List.map (fun i => Polynomial.C (wit.2 i) * w_wit i) (List.finRange m)).sum)).modByMonic
          t =
        0)
    fun prover =>
    (fun i => prover.2 Proof_G2_Idx.H (SRS_Elements_Idx.EK_β_v i), fun i =>
      prover.2 Proof_G2_Idx.H (SRS_Elements_Idx.EK_β_w i))
F : Type
inst✝ : Field F
n_stmt n_wit m d : ℕ
v_stmt : Fin n_stmt → Polynomial F
v_wit : Fin n_wit → Polynomial F
w_wit : Fin m → Polynomial F
v_0 w_0 : Polynomial F
r : Fin n_wit → F
⊢ ∀ (stmt : GGPR.Stmt) (prover : AGMProofSystemInstantiation.Prover F GGPR),
    ((∀ (check_idx : GGPR.EqualityChecks), GGPR.check_poly prover stmt check_idx = 0) ∧
        ∀ pfs ∈ GGPR.Identified_Proof_Elems,
          (List.map (fun SRS_elem => C (prover.1 pfs.1 SRS_elem) * GGPR.SRSElementValue_G1 SRS_elem)
                GGPR.ListSRSElements_G1).sum =
            (List.map (fun SRS_elem => C (prover.2 pfs.2 SRS_elem) * GGPR.SRSElementValue_G2 SRS_elem)
                GGPR.ListSRSElements_G2).sum) →
      (fun stmt wit =>
          let t := ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i));
          ((v_0 + (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum +
                    (List.map (fun i => Polynomial.C (wit.1 i) * v_wit i) (List.finRange n_wit)).sum) *
                  (w_0 + (List.map (fun i => Polynomial.C (wit.2 i) * w_wit i) (List.finRange m)).sum)).modByMonic
              t =
            0)
        stmt
        ((fun prover =>
            (fun i => prover.2 Proof_G2_Idx.H (SRS_Elements_Idx.EK_β_v i), fun i =>
              prover.2 Proof_G2_Idx.H (SRS_Elements_Idx.EK_β_w i)))
          prover)