Theorem: collapseSRSElement_G1_soundness (FormalSnarksProject/Transformations/Transformations.lean)

State before:
case intro.a.right
F : Type
inst✝¹ : Field F
𝓟 : AGMProofSystemInstantiation F
hTypeIII : 𝓟.Identified_Proof_Elems = []
inst✝ : DecidableEq 𝓟.SRSElements_G1
twin1 twin2 : 𝓟.SRSElements_G1
not_same : twin1 ≠ twin2
hcount1 : List.count twin1 𝓟.ListSRSElements_G1 = 1
hcount2 : List.count twin2 𝓟.ListSRSElements_G1 = 1
interchangeable : ∀ (idx : 𝓟.Proof_G1) (agm : 𝓟.Proof_G1 → 𝓟.SRSElements_G1 → F), agm idx twin1 = agm idx twin2
interchangeable' :
  ∀ (stmt : 𝓟.Stmt) (check_idx : 𝓟.EqualityChecks) (pairing : 𝓟.Pairings check_idx),
    𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin1 = 𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin2
Wit : Type
relation : 𝓟.Stmt → Wit → Prop
extractor : AGMProofSystemInstantiation.Prover F 𝓟 → Wit
stmt : (collapseSRSElement_G1 𝓟 twin1 twin2).Stmt
agm : AGMProofSystemInstantiation.Prover F (collapseSRSElement_G1 𝓟 twin1 twin2)
poly_checks_pass :
  ∀ (check_idx : (collapseSRSElement_G1 𝓟 twin1 twin2).EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G1 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.1 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G1 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G2 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.2 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G2 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum))
          ((collapseSRSElement_G1 𝓟 twin1 twin2).ListPairings check_idx)).sum =
      0
⊢ ∀ pfs ∈ 𝓟.Identified_Proof_Elems,
    (List.map (fun SRS_elem => MvPolynomial.C (agm.1 pfs.1 SRS_elem) * 𝓟.SRSElementValue_G1 SRS_elem)
          𝓟.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => MvPolynomial.C (agm.2 pfs.2 SRS_elem) * 𝓟.SRSElementValue_G2 SRS_elem)
          𝓟.ListSRSElements_G2).sum
Tactic:
rw [hTypeIII]
State after:
case intro.a.right
F : Type
inst✝¹ : Field F
𝓟 : AGMProofSystemInstantiation F
hTypeIII : 𝓟.Identified_Proof_Elems = []
inst✝ : DecidableEq 𝓟.SRSElements_G1
twin1 twin2 : 𝓟.SRSElements_G1
not_same : twin1 ≠ twin2
hcount1 : List.count twin1 𝓟.ListSRSElements_G1 = 1
hcount2 : List.count twin2 𝓟.ListSRSElements_G1 = 1
interchangeable : ∀ (idx : 𝓟.Proof_G1) (agm : 𝓟.Proof_G1 → 𝓟.SRSElements_G1 → F), agm idx twin1 = agm idx twin2
interchangeable' :
  ∀ (stmt : 𝓟.Stmt) (check_idx : 𝓟.EqualityChecks) (pairing : 𝓟.Pairings check_idx),
    𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin1 = 𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin2
Wit : Type
relation : 𝓟.Stmt → Wit → Prop
extractor : AGMProofSystemInstantiation.Prover F 𝓟 → Wit
stmt : (collapseSRSElement_G1 𝓟 twin1 twin2).Stmt
agm : AGMProofSystemInstantiation.Prover F (collapseSRSElement_G1 𝓟 twin1 twin2)
poly_checks_pass :
  ∀ (check_idx : (collapseSRSElement_G1 𝓟 twin1 twin2).EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G1 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.1 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G1 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G2 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.2 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G2 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum))
          ((collapseSRSElement_G1 𝓟 twin1 twin2).ListPairings check_idx)).sum =
      0
⊢ ∀ pfs ∈ [],
    (List.map (fun SRS_elem => MvPolynomial.C (agm.1 pfs.1 SRS_elem) * 𝓟.SRSElementValue_G1 SRS_elem)
          𝓟.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => MvPolynomial.C (agm.2 pfs.2 SRS_elem) * 𝓟.SRSElementValue_G2 SRS_elem)
          𝓟.ListSRSElements_G2).sum

State before:
case intro.a.right
F : Type
inst✝¹ : Field F
𝓟 : AGMProofSystemInstantiation F
hTypeIII : 𝓟.Identified_Proof_Elems = []
inst✝ : DecidableEq 𝓟.SRSElements_G1
twin1 twin2 : 𝓟.SRSElements_G1
not_same : twin1 ≠ twin2
hcount1 : List.count twin1 𝓟.ListSRSElements_G1 = 1
hcount2 : List.count twin2 𝓟.ListSRSElements_G1 = 1
interchangeable : ∀ (idx : 𝓟.Proof_G1) (agm : 𝓟.Proof_G1 → 𝓟.SRSElements_G1 → F), agm idx twin1 = agm idx twin2
interchangeable' :
  ∀ (stmt : 𝓟.Stmt) (check_idx : 𝓟.EqualityChecks) (pairing : 𝓟.Pairings check_idx),
    𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin1 = 𝓟.verificationPairingSRS_G1 stmt check_idx pairing twin2
Wit : Type
relation : 𝓟.Stmt → Wit → Prop
extractor : AGMProofSystemInstantiation.Prover F 𝓟 → Wit
stmt : (collapseSRSElement_G1 𝓟 twin1 twin2).Stmt
agm : AGMProofSystemInstantiation.Prover F (collapseSRSElement_G1 𝓟 twin1 twin2)
poly_checks_pass :
  ∀ (check_idx : (collapseSRSElement_G1 𝓟 twin1 twin2).EqualityChecks),
    (List.map
          (fun pairing =>
            ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G1 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.1 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G1).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G1 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G1 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G1).sum) *
              ((List.map
                    (fun pf_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingProof_G2 stmt check_idx pairing
                            pf_elem) *
                        (List.map
                            (fun SRS_elem =>
                              MvPolynomial.C (agm.2 pf_elem SRS_elem) *
                                (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                            (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListProof_G2).sum +
                (List.map
                    (fun SRS_elem =>
                      MvPolynomial.C
                          ((collapseSRSElement_G1 𝓟 twin1 twin2).verificationPairingSRS_G2 stmt check_idx pairing
                            SRS_elem) *
                        (collapseSRSElement_G1 𝓟 twin1 twin2).SRSElementValue_G2 SRS_elem)
                    (collapseSRSElement_G1 𝓟 twin1 twin2).ListSRSElements_G2).sum))
          ((collapseSRSElement_G1 𝓟 twin1 twin2).ListPairings check_idx)).sum =
      0
⊢ ∀ pfs ∈ [],
    (List.map (fun SRS_elem => MvPolynomial.C (agm.1 pfs.1 SRS_elem) * 𝓟.SRSElementValue_G1 SRS_elem)
          𝓟.ListSRSElements_G1).sum =
      (List.map (fun SRS_elem => MvPolynomial.C (agm.2 pfs.2 SRS_elem) * 𝓟.SRSElementValue_G2 SRS_elem)
          𝓟.ListSRSElements_G2).sum
Tactic:
simp
State after:
no goals