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

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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
h1022 :
  -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) +
      (sum_v_stmt +
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x)
            (List.finRange n_wit)).sum) =
    0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt +
        ((List.map
              (fun x =>
                Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                  (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
              (List.finRange (n_var - 1))).sum +
          (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
              (List.finRange n_wit)).sum)) =
    0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
⊢ (sum_u_stmt + sum_C_u_wit) *
      (sum_v_stmt +
        (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q i)) * v_wit i)
            (List.finRange n_wit)).sum) =
    sum_w_stmt +
        (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:
set sum_C_v_wit := List.sum
      (List.map
        (fun x =>
          Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
            v_wit x)
        (List.finRange n_wit))
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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt +
        ((List.map
              (fun x =>
                Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                  (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
              (List.finRange (n_var - 1))).sum +
          (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
              (List.finRange n_wit)).sum)) =
    0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) =
    sum_w_stmt +
        (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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt +
        ((List.map
              (fun x =>
                Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                  (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
              (List.finRange (n_var - 1))).sum +
          (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x)
              (List.finRange n_wit)).sum)) =
    0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) =
    sum_w_stmt +
        (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:
set sum_C_w_wit := List.sum
      (List.map
        (fun x =>
          Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) *
            w_wit x)
        (List.finRange n_wit))
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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
sum_C_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
hC0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      sum_C_w_wit =
    0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt +
        ((List.map
              (fun x =>
                Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                  (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
              (List.finRange (n_var - 1))).sum +
          sum_C_w_wit)) =
    0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) =
    sum_w_stmt + sum_C_w_wit +
      (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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
sum_C_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
hC0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      sum_C_w_wit =
    0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt +
        ((List.map
              (fun x =>
                Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
                  (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
              (List.finRange (n_var - 1))).sum +
          sum_C_w_wit)) =
    0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) =
    sum_w_stmt + sum_C_w_wit +
      (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:
set sum_C_x_t := List.sum
      (List.map
        (fun x : Fin (n_var - 1) =>
          Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * (Polynomial.X ^ (x : ℕ) * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
        (List.finRange (n_var - 1)))
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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
sum_C_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_C_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hC0010 : sum_C_x_t + sum_C_w_wit = 0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt + (sum_C_x_t + sum_C_w_wit)) =
    0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) = sum_w_stmt + sum_C_w_wit + sum_C_x_t

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))
hA0021 : 0 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.γ)
hB1011 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.α) = 0
hB0010 :
  (List.map
          (fun x =>
            Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow_times_t x)) *
              (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
          (List.finRange (n_var - 1))).sum +
      (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * w_wit x)
          (List.finRange n_wit)).sum =
    0
hB0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hB0110 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum =
    0
hB1010 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum =
    0
hC0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.C (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
hC0101 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * u_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC1001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * v_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0001 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.y x)) * w_stmt x)
        (List.finRange n_stmt)).sum =
    0
hC0021 : 0 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.γ)
sum_u_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum
sum_v_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * v_stmt i) (List.finRange n_stmt)).sum
sum_w_stmt : Polynomial F := (List.map (fun i => Polynomial.C (stmt i) * w_stmt i) (List.finRange n_stmt)).sum
A_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.α)
hA1011 : A_1 = 0
A_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.β)
hA0111 : A_2 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.β)
A_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.A SRS_Elements_Idx.δ)
hA0012 : A_3 = Polynomial.C (prover.2 Proof_Idx.A SRS_Elements_Idx.δ)
sum_A_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hA0011 :
  sum_A_x =
    (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.A (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum
sum_A_u_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * u_stmt x) (List.finRange n_stmt)).sum
hA0101 : sum_A_u_stmt = 0
sum_A_v_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * v_stmt x) (List.finRange n_stmt)).sum
hA1001 : sum_A_v_stmt = 0
sum_A_w_stmt : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.y x)) * w_stmt x) (List.finRange n_stmt)).sum
hA0001 : sum_A_w_stmt = 0
sum_A_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hA0110 : sum_A_u_wit = 0
sum_A_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hA1010 : sum_A_v_wit = 0
sum_A_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_A_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.A (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hA0010 : sum_A_x_t + sum_A_w_wit = 0
B_1 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.β)
hB0111 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.β) = B_1
h1122 : -(A_1 * B_1) + 1 = 0
h0222 : -(A_2 * B_1) = 0
h0212 : -(sum_A_u_stmt * B_1) = 0
h1112 : -(sum_A_v_stmt * B_1) = 0
h0221 : -(sum_A_u_wit * B_1) = 0
h1121 : -(sum_A_v_wit * B_1) = 0
B_2 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)
hB0021 : 0 = B_2
B_3 : Polynomial F := Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.δ)
hB0012 : Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.δ) = B_3
sum_B_x : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
      (List.finRange n_var)).sum
hB0011 :
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.x_pow x)) * Polynomial.X ^ ↑x)
        (List.finRange n_var)).sum =
    sum_B_x
h0012 : -(sum_A_w_stmt * sum_B_x) = 0
h0021 : -(sum_A_x_t * sum_B_x) + -(sum_A_w_wit * sum_B_x) = 0
h0112 : -(sum_A_u_stmt * sum_B_x) + -(sum_A_w_stmt * B_1) = 0
h0121 : -(sum_A_u_wit * sum_B_x) + (-(sum_A_x_t * B_1) + -(sum_A_w_wit * B_1)) = 0
C_1 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.α)
hC1011 : C_1 = 0
C_2 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.β)
hC0111 : C_2 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.β)
C_3 : Polynomial F := Polynomial.C (prover.1 Proof_Idx.C SRS_Elements_Idx.δ)
hC0012 : C_3 = Polynomial.C (prover.2 Proof_Idx.C SRS_Elements_Idx.δ)
sum_C_u_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * u_wit x) (List.finRange n_wit)).sum
hC0110 : sum_C_u_wit = 0
h0122 :
  -(A_2 * sum_B_x) + -(sum_A_u_wit * B_3) + -(sum_A_u_stmt * B_2) + -(sum_A_x * B_1) + (sum_u_stmt + sum_C_u_wit) = 0
sum_C_v_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * v_wit x) (List.finRange n_wit)).sum
hC1010 : sum_C_v_wit = 0
h1022 : -(A_1 * sum_B_x) + -(sum_A_v_wit * B_3) + -(sum_A_v_stmt * B_2) + (sum_v_stmt + sum_C_v_wit) = 0
sum_C_w_wit : Polynomial F :=
  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.q x)) * w_wit x) (List.finRange n_wit)).sum
sum_C_x_t : Polynomial F :=
  (List.map
      (fun x =>
        Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) *
          (Polynomial.X ^ ↑x * ∏ i : Fin n_wit, (Polynomial.X - Polynomial.C (r i))))
      (List.finRange (n_var - 1))).sum
hC0010 : sum_C_x_t + sum_C_w_wit = 0
h0022 :
  -(sum_A_x * sum_B_x) + (-(sum_A_x_t * B_3) + -(sum_A_w_wit * B_3)) + -(sum_A_w_stmt * B_2) +
      (sum_w_stmt + (sum_C_x_t + sum_C_w_wit)) =
    0
⊢ (sum_u_stmt + sum_C_u_wit) * (sum_v_stmt + sum_C_v_wit) = sum_w_stmt + sum_C_w_wit + sum_C_x_t
Tactic:
integral_domain_tactic <;> polyrith
State after:
no goals

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
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
this :
  ((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
⊢ (((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:
rw [<-sub_eq_iff_eq_add'] at this
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
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
this :
  ((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
⊢ (((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
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
this :
  ((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
⊢ (((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 h := congr_arg (fun x => x %ₘ t) this
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
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
this :
  ((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
h :
  (fun x => x.modByMonic t)
      (((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)) =
    (fun x => x.modByMonic t)
      (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
⊢ (((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
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
this :
  ((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
h :
  (fun x => x.modByMonic t)
      (((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)) =
    (fun x => x.modByMonic t)
      (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
⊢ (((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 at h
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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (((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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (((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
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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (((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)).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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (((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)).modByMonic
      t =
    0
Tactic:
rw [h]
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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (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.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
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
this :
  ((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
h :
  (((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)).modByMonic
      t =
    (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.modByMonic
      t
⊢ (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.modByMonic
      t =
    0
Tactic:
clear this h
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
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 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.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
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 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.modByMonic
      t =
    0
Tactic:
simp only [mul_comm _ (t), <-mul_assoc]
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
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 x => t * Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * Polynomial.X ^ ↑x)
            (List.finRange (n_var - 1))).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
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 x => t * Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t x)) * Polynomial.X ^ ↑x)
            (List.finRange (n_var - 1))).sum.modByMonic
      t =
    0
Tactic:
simp only [mul_assoc, List.sum_map_mul_right, List.sum_map_mul_left]
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
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
⊢ (t *
          (List.map
              (fun b => Polynomial.C (prover.1 Proof_Idx.C (SRS_Elements_Idx.x_pow_times_t b)) * Polynomial.X ^ ↑b)
              (List.finRange (n_var - 1))).sum).modByMonic
      t =
    0