Theorem: BabySNARK.is_sound (FormalSnarksProject/SNARKs/BabySnark.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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
          (X Vars_β *
              (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum) +
            (X Vars_γ *
                (X Vars_β *
                  (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                    (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum)) +
              X Vars_β *
                ((List.map
                      (fun b =>
                        C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                      (List.finRange n_wit)).sum *
                  (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum))) +
        (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
          (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
      ((List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
          (List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
        (-(X Vars_β *
                        ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun b =>
                                C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                  (to_MvPolynomial_Option Vars) (u_wit b))
                              (List.finRange n_wit)).sum)) +
                    (-(X Vars_β *
                          (X Vars_β *
                            (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                              (List.map
                                  (fun b =>
                                    C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                      (to_MvPolynomial_Option Vars) (u_wit b))
                                  (List.finRange n_wit)).sum))) +
                      (-(X Vars_γ *
                            (X Vars_β *
                              (X Vars_β *
                                (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                  (List.map
                                      (fun b =>
                                        C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum)))) +
                        -(X Vars_β *
                            (X Vars_β *
                              ((List.map
                                    (fun b =>
                                      C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum *
                                (List.map
                                    (fun b =>
                                      C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum))))) +
                  -(X Vars_β *
                      ((List.map
                            (fun x =>
                              C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map
                            (fun b =>
                              C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                (to_MvPolynomial_Option Vars) (u_wit b))
                            (List.finRange n_wit)).sum)) +
                (-(X Vars_γ *
                        (X Vars_β *
                          ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum *
                            C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                    (-(X Vars_β *
                          (X Vars_γ *
                            (X Vars_β *
                              (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                      (-(X Vars_γ *
                            (X Vars_β *
                              (X Vars_γ *
                                (X Vars_β *
                                  (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                    C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                        -(X Vars_β *
                            (X Vars_γ *
                              (X Vars_β *
                                ((List.map
                                      (fun b =>
                                        C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum *
                                  C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                  -(X Vars_γ *
                      (X Vars_β *
                        ((List.map
                              (fun x =>
                                C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
              (-(X Vars_β *
                      ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                            (List.finRange n_var)).sum *
                        C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
                  (-(X Vars_β *
                        (X Vars_β *
                          (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                            C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                    (-(X Vars_γ *
                          (X Vars_β *
                            (X Vars_β *
                              (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                      -(X Vars_β *
                          (X Vars_β *
                            ((List.map
                                  (fun b =>
                                    C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                      (to_MvPolynomial_Option Vars) (u_wit b))
                                  (List.finRange n_wit)).sum *
                              C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                -(X Vars_β *
                    ((List.map
                          (fun x =>
                            C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                              X Vars_τ ^ ↑x)
                          (List.finRange n_var)).sum *
                      C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
            (-((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum) +
                (-(X Vars_β *
                      (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                        (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                            (List.finRange n_var)).sum)) +
                  (-(X Vars_γ *
                        (X Vars_β *
                          (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                            (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum))) +
                    -(X Vars_β *
                        ((List.map
                              (fun b =>
                                C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                  (to_MvPolynomial_Option Vars) (u_wit b))
                              (List.finRange n_wit)).sum *
                          (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum)))) +
              -((List.map
                      (fun x =>
                        C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum * X Vars_τ ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                      (List.finRange n_var)).sum)) +
          ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          X Vars_τ ^ ↑x))
                    (List.finRange n_var)).sum +
              (X Vars_β *
                  (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                    (List.map
                        (fun x =>
                          -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                              X Vars_τ ^ ↑x))
                        (List.finRange n_var)).sum) +
                (X Vars_γ *
                    (X Vars_β *
                      (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                        (List.map
                            (fun x =>
                              -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x))
                            (List.finRange n_var)).sum)) +
                  X Vars_β *
                    ((List.map
                          (fun b =>
                            C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (List.map
                  (fun x =>
                    C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum * X Vars_τ ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map
                  (fun x =>
                    -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum * X Vars_τ ^ ↑x))
                  (List.finRange n_var)).sum))) =
    0
eqnII :
  X Vars_β *
          (List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
              (List.finRange n_var)).sum +
        (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
          (X Vars_γ * (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
            X Vars_β *
              (X Vars_β *
                (List.map
                    (fun b =>
                      C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                    (List.finRange n_wit)).sum))) +
      (-(X Vars_γ *
                (X Vars_β *
                  (X Vars_β *
                    (List.map
                        (fun b =>
                          C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                        (List.finRange n_wit)).sum))) +
            -(X Vars_γ * (X Vars_β * (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
          -(X Vars_γ * (X Vars_β * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
        -(X Vars_γ *
            (X Vars_β *
              (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                  (List.finRange n_var)).sum))) =
    0
eqnH :
  (List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
      (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum))
eqnV :
  (List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
      (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum))
eqnB :
  (List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
      (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) +
        (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ)) +
          X Vars_β *
            (List.map
                (fun b => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum
Tactic:
simp only [←(EquivLike.apply_eq_iff_eq (optionEquivRight _ _))] at eqnI eqnII eqnH eqnV eqnB
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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
            (X Vars_β *
                (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                  (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum) +
              (X Vars_γ *
                  (X Vars_β *
                    (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                      (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum)) +
                X Vars_β *
                  ((List.map
                        (fun b =>
                          C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                        (List.finRange n_wit)).sum *
                    (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum))) +
          (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
        ((List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
          (-(X Vars_β *
                          ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum *
                            (List.map
                                (fun b =>
                                  C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                    (to_MvPolynomial_Option Vars) (u_wit b))
                                (List.finRange n_wit)).sum)) +
                      (-(X Vars_β *
                            (X Vars_β *
                              (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                (List.map
                                    (fun b =>
                                      C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum))) +
                        (-(X Vars_γ *
                              (X Vars_β *
                                (X Vars_β *
                                  (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                    (List.map
                                        (fun b =>
                                          C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                            (to_MvPolynomial_Option Vars) (u_wit b))
                                        (List.finRange n_wit)).sum)))) +
                          -(X Vars_β *
                              (X Vars_β *
                                ((List.map
                                      (fun b =>
                                        C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum *
                                  (List.map
                                      (fun b =>
                                        C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum))))) +
                    -(X Vars_β *
                        ((List.map
                              (fun x =>
                                C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun b =>
                                C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                  (to_MvPolynomial_Option Vars) (u_wit b))
                              (List.finRange n_wit)).sum)) +
                  (-(X Vars_γ *
                          (X Vars_β *
                            ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                  (List.finRange n_var)).sum *
                              C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                      (-(X Vars_β *
                            (X Vars_γ *
                              (X Vars_β *
                                (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                  C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                        (-(X Vars_γ *
                              (X Vars_β *
                                (X Vars_γ *
                                  (X Vars_β *
                                    (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                      C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                          -(X Vars_β *
                              (X Vars_γ *
                                (X Vars_β *
                                  ((List.map
                                        (fun b =>
                                          C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                            (to_MvPolynomial_Option Vars) (u_wit b))
                                        (List.finRange n_wit)).sum *
                                    C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                    -(X Vars_γ *
                        (X Vars_β *
                          ((List.map
                                (fun x =>
                                  C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum *
                            C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                (-(X Vars_β *
                        ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
                    (-(X Vars_β *
                          (X Vars_β *
                            (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                              C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                      (-(X Vars_γ *
                            (X Vars_β *
                              (X Vars_β *
                                (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                  C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                        -(X Vars_β *
                            (X Vars_β *
                              ((List.map
                                    (fun b =>
                                      C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum *
                                C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                  -(X Vars_β *
                      ((List.map
                            (fun x =>
                              C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x)
                            (List.finRange n_var)).sum *
                        C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
              (-((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                          (List.finRange n_var)).sum *
                      (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                          (List.finRange n_var)).sum) +
                  (-(X Vars_β *
                        (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                          (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum)) +
                    (-(X Vars_γ *
                          (X Vars_β *
                            (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                  (List.finRange n_var)).sum))) +
                      -(X Vars_β *
                          ((List.map
                                (fun b =>
                                  C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                    (to_MvPolynomial_Option Vars) (u_wit b))
                                (List.finRange n_wit)).sum *
                            (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum)))) +
                -((List.map
                        (fun x =>
                          C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum)) +
            ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            X Vars_τ ^ ↑x))
                      (List.finRange n_var)).sum +
                (X Vars_β *
                    (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                      (List.map
                          (fun x =>
                            -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x))
                          (List.finRange n_var)).sum) +
                  (X Vars_γ *
                      (X Vars_β *
                        (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                          (List.map
                              (fun x =>
                                -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    X Vars_τ ^ ↑x))
                              (List.finRange n_var)).sum)) +
                    X Vars_β *
                      ((List.map
                            (fun b =>
                              C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                (to_MvPolynomial_Option Vars) (u_wit b))
                            (List.finRange n_wit)).sum *
                        (List.map
                            (fun x =>
                              -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x))
                            (List.finRange n_var)).sum))) +
              (List.map
                    (fun x =>
                      C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum * X Vars_τ ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          X Vars_τ ^ ↑x))
                    (List.finRange n_var)).sum)))) =
    (optionEquivRight F Vars) 0
eqnII :
  (optionEquivRight F Vars)
      (X Vars_β *
            (List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                (List.finRange n_var)).sum +
          (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
            (X Vars_γ * (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
              X Vars_β *
                (X Vars_β *
                  (List.map
                      (fun b =>
                        C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                      (List.finRange n_wit)).sum))) +
        (-(X Vars_γ *
                  (X Vars_β *
                    (X Vars_β *
                      (List.map
                          (fun b =>
                            C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                          (List.finRange n_wit)).sum))) +
              -(X Vars_γ * (X Vars_β * (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
            -(X Vars_γ * (X Vars_β * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
          -(X Vars_γ *
              (X Vars_β *
                (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                    (List.finRange n_var)).sum)))) =
    (optionEquivRight F Vars) 0
eqnH :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
eqnV :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
eqnB :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
            (X Vars_β *
                (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                  (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum) +
              (X Vars_γ *
                  (X Vars_β *
                    (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                      (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum)) +
                X Vars_β *
                  ((List.map
                        (fun b =>
                          C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                        (List.finRange n_wit)).sum *
                    (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum))) +
          (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => C (t.coeff ↑x) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
        ((List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => C (if ↑x = 0 then 1 else 0) * X Vars_τ ^ ↑x) (List.finRange n_var)).sum +
          (-(X Vars_β *
                          ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum *
                            (List.map
                                (fun b =>
                                  C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                    (to_MvPolynomial_Option Vars) (u_wit b))
                                (List.finRange n_wit)).sum)) +
                      (-(X Vars_β *
                            (X Vars_β *
                              (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                (List.map
                                    (fun b =>
                                      C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum))) +
                        (-(X Vars_γ *
                              (X Vars_β *
                                (X Vars_β *
                                  (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                    (List.map
                                        (fun b =>
                                          C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                            (to_MvPolynomial_Option Vars) (u_wit b))
                                        (List.finRange n_wit)).sum)))) +
                          -(X Vars_β *
                              (X Vars_β *
                                ((List.map
                                      (fun b =>
                                        C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum *
                                  (List.map
                                      (fun b =>
                                        C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                          (to_MvPolynomial_Option Vars) (u_wit b))
                                      (List.finRange n_wit)).sum))))) +
                    -(X Vars_β *
                        ((List.map
                              (fun x =>
                                C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun b =>
                                C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                  (to_MvPolynomial_Option Vars) (u_wit b))
                              (List.finRange n_wit)).sum)) +
                  (-(X Vars_γ *
                          (X Vars_β *
                            ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                  (List.finRange n_var)).sum *
                              C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                      (-(X Vars_β *
                            (X Vars_γ *
                              (X Vars_β *
                                (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                  C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                        (-(X Vars_γ *
                              (X Vars_β *
                                (X Vars_γ *
                                  (X Vars_β *
                                    (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                      C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                          -(X Vars_β *
                              (X Vars_γ *
                                (X Vars_β *
                                  ((List.map
                                        (fun b =>
                                          C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                            (to_MvPolynomial_Option Vars) (u_wit b))
                                        (List.finRange n_wit)).sum *
                                    C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                    -(X Vars_γ *
                        (X Vars_β *
                          ((List.map
                                (fun x =>
                                  C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum *
                            C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                (-(X Vars_β *
                        ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum *
                          C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
                    (-(X Vars_β *
                          (X Vars_β *
                            (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                              C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                      (-(X Vars_γ *
                            (X Vars_β *
                              (X Vars_β *
                                (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                  C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                        -(X Vars_β *
                            (X Vars_β *
                              ((List.map
                                    (fun b =>
                                      C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                        (to_MvPolynomial_Option Vars) (u_wit b))
                                    (List.finRange n_wit)).sum *
                                C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                  -(X Vars_β *
                      ((List.map
                            (fun x =>
                              C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x)
                            (List.finRange n_var)).sum *
                        C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
              (-((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                          (List.finRange n_var)).sum *
                      (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                          (List.finRange n_var)).sum) +
                  (-(X Vars_β *
                        (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                          (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                              (List.finRange n_var)).sum)) +
                    (-(X Vars_γ *
                          (X Vars_β *
                            (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                  (List.finRange n_var)).sum))) +
                      -(X Vars_β *
                          ((List.map
                                (fun b =>
                                  C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                    (to_MvPolynomial_Option Vars) (u_wit b))
                                (List.finRange n_wit)).sum *
                            (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                                (List.finRange n_var)).sum)))) +
                -((List.map
                        (fun x =>
                          C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                        (List.finRange n_var)).sum)) +
            ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            X Vars_τ ^ ↑x))
                      (List.finRange n_var)).sum +
                (X Vars_β *
                    (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                      (List.map
                          (fun x =>
                            -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                X Vars_τ ^ ↑x))
                          (List.finRange n_var)).sum) +
                  (X Vars_γ *
                      (X Vars_β *
                        (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                          (List.map
                              (fun x =>
                                -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    X Vars_τ ^ ↑x))
                              (List.finRange n_var)).sum)) +
                    X Vars_β *
                      ((List.map
                            (fun b =>
                              C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) *
                                (to_MvPolynomial_Option Vars) (u_wit b))
                            (List.finRange n_wit)).sum *
                        (List.map
                            (fun x =>
                              -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  X Vars_τ ^ ↑x))
                            (List.finRange n_var)).sum))) +
              (List.map
                    (fun x =>
                      C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum * X Vars_τ ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          X Vars_τ ^ ↑x))
                    (List.finRange n_var)).sum)))) =
    (optionEquivRight F Vars) 0
eqnII :
  (optionEquivRight F Vars)
      (X Vars_β *
            (List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                (List.finRange n_var)).sum +
          (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
            (X Vars_γ * (X Vars_β * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
              X Vars_β *
                (X Vars_β *
                  (List.map
                      (fun b =>
                        C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                      (List.finRange n_wit)).sum))) +
        (-(X Vars_γ *
                  (X Vars_β *
                    (X Vars_β *
                      (List.map
                          (fun b =>
                            C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                          (List.finRange n_wit)).sum))) +
              -(X Vars_γ * (X Vars_β * (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
            -(X Vars_γ * (X Vars_β * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
          -(X Vars_γ *
              (X Vars_β *
                (List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
                    (List.finRange n_var)).sum)))) =
    (optionEquivRight F Vars) 0
eqnH :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
eqnV :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
eqnB :
  (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum))) =
    (optionEquivRight F Vars)
      ((List.map (fun x => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * X Vars_τ ^ ↑x)
            (List.finRange n_var)).sum +
        (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ) +
          (X Vars_γ * (X Vars_β * C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ)) +
            X Vars_β *
              (List.map
                  (fun b => C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu b)) * (to_MvPolynomial_Option Vars) (u_wit b))
                  (List.finRange n_wit)).sum)))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum
Tactic:
simp only [AlgEquiv.map_add, AlgEquiv.map_zero, AlgEquiv.map_mul, AlgEquiv.map_one,
  AlgEquiv.map_neg, AlgEquiv.list_map_sum, AlgEquiv.map_pow] at eqnI eqnII eqnH eqnV eqnB
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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                (List.finRange n_var)).sum *
            (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                (List.finRange n_var)).sum +
          ((optionEquivRight F Vars) (X Vars_β) *
              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) *
                (List.map
                    (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                    (List.finRange n_var)).sum) +
            ((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum)) +
              (optionEquivRight F Vars) (X Vars_β) *
                ((List.map
                      (fun x =>
                        (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                      (List.finRange n_wit)).sum *
                  (List.map
                      (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum))) +
        (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
      ((List.map
              (fun x =>
                (optionEquivRight F Vars) (C (if ↑x = 0 then 1 else 0)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map
              (fun x =>
                (optionEquivRight F Vars) (C (if ↑x = 0 then 1 else 0)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
        (-((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                  (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                              (List.finRange n_wit)).sum)) +
                    (-((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                              (List.map
                                  (fun x =>
                                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                      (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                  (List.finRange n_wit)).sum))) +
                      (-((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (X Vars_β) *
                                ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                  (List.map
                                      (fun x =>
                                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                      (List.finRange n_wit)).sum)))) +
                        -((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((List.map
                                    (fun x =>
                                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                    (List.finRange n_wit)).sum *
                                (List.map
                                    (fun x =>
                                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                    (List.finRange n_wit)).sum))))) +
                  -((optionEquivRight F Vars) (X Vars_β) *
                      ((List.map
                            (fun x =>
                              (optionEquivRight F Vars)
                                  (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                            (List.finRange n_wit)).sum)) +
                (-((optionEquivRight F Vars) (X Vars_γ) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((List.map
                                (fun x =>
                                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                                (List.finRange n_var)).sum *
                            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                    (-((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                      (-((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (X Vars_γ) *
                                ((optionEquivRight F Vars) (X Vars_β) *
                                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                        -((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_γ) *
                              ((optionEquivRight F Vars) (X Vars_β) *
                                ((List.map
                                      (fun x =>
                                        (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                      (List.finRange n_wit)).sum *
                                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))))) +
                  -((optionEquivRight F Vars) (X Vars_γ) *
                      ((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars)
                                    (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum *
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
              (-((optionEquivRight F Vars) (X Vars_β) *
                      ((List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum *
                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                  (-((optionEquivRight F Vars) (X Vars_β) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                    (-((optionEquivRight F Vars) (X Vars_γ) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                      -((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((List.map
                                  (fun x =>
                                    (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                      (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                  (List.finRange n_wit)).sum *
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))))) +
                -((optionEquivRight F Vars) (X Vars_β) *
                    ((List.map
                          (fun x =>
                            (optionEquivRight F Vars)
                                (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                          (List.finRange n_var)).sum *
                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
            (-((List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                            (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                            (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum) +
                (-((optionEquivRight F Vars) (X Vars_β) *
                      ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                        (List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum)) +
                  (-((optionEquivRight F Vars) (X Vars_γ) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                            (List.map
                                (fun x =>
                                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                                (List.finRange n_var)).sum))) +
                    -((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                  (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                              (List.finRange n_wit)).sum *
                          (List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum)))) +
              -((List.map
                      (fun x =>
                        (optionEquivRight F Vars)
                            (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum)) +
          ((List.map
                    (fun x =>
                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                        (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -((optionEquivRight F Vars)
                            (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                    (List.finRange n_var)).sum +
              ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                    (List.map
                        (fun x =>
                          -((optionEquivRight F Vars)
                                (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                        (List.finRange n_var)).sum) +
                ((optionEquivRight F Vars) (X Vars_γ) *
                    ((optionEquivRight F Vars) (X Vars_β) *
                      ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                        (List.map
                            (fun x =>
                              -((optionEquivRight F Vars)
                                    (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                            (List.finRange n_var)).sum)) +
                  (optionEquivRight F Vars) (X Vars_β) *
                    ((List.map
                          (fun x =>
                            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                              (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -((optionEquivRight F Vars)
                                  (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (List.map
                  (fun x =>
                    (optionEquivRight F Vars)
                        (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                      (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map
                  (fun x =>
                    -((optionEquivRight F Vars)
                          (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                        (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                  (List.finRange n_var)).sum))) =
    0
eqnII :
  (optionEquivRight F Vars) (X Vars_β) *
          (List.map
              (fun x =>
                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
        ((optionEquivRight F Vars) (X Vars_β) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          ((optionEquivRight F Vars) (X Vars_γ) *
              ((optionEquivRight F Vars) (X Vars_β) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            (optionEquivRight F Vars) (X Vars_β) *
              ((optionEquivRight F Vars) (X Vars_β) *
                (List.map
                    (fun x =>
                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                    (List.finRange n_wit)).sum))) +
      (-((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (X Vars_β) *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                            (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                        (List.finRange n_wit)).sum))) +
            -((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (X Vars_γ) *
                    ((optionEquivRight F Vars) (X Vars_β) *
                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -((optionEquivRight F Vars) (X Vars_γ) *
              ((optionEquivRight F Vars) (X Vars_β) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (List.map
                  (fun x =>
                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                      (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                  (List.finRange n_var)).sum))) =
    0
eqnH :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
eqnV :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
eqnB :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                (List.finRange n_var)).sum *
            (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                (List.finRange n_var)).sum +
          ((optionEquivRight F Vars) (X Vars_β) *
              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) *
                (List.map
                    (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                    (List.finRange n_var)).sum) +
            ((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum)) +
              (optionEquivRight F Vars) (X Vars_β) *
                ((List.map
                      (fun x =>
                        (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                      (List.finRange n_wit)).sum *
                  (List.map
                      (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum))) +
        (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map (fun x => (optionEquivRight F Vars) (C (t.coeff ↑x)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
      ((List.map
              (fun x =>
                (optionEquivRight F Vars) (C (if ↑x = 0 then 1 else 0)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map
              (fun x =>
                (optionEquivRight F Vars) (C (if ↑x = 0 then 1 else 0)) * (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
        (-((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                  (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                              (List.finRange n_wit)).sum)) +
                    (-((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                              (List.map
                                  (fun x =>
                                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                      (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                  (List.finRange n_wit)).sum))) +
                      (-((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (X Vars_β) *
                                ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                  (List.map
                                      (fun x =>
                                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                      (List.finRange n_wit)).sum)))) +
                        -((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((List.map
                                    (fun x =>
                                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                    (List.finRange n_wit)).sum *
                                (List.map
                                    (fun x =>
                                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                    (List.finRange n_wit)).sum))))) +
                  -((optionEquivRight F Vars) (X Vars_β) *
                      ((List.map
                            (fun x =>
                              (optionEquivRight F Vars)
                                  (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                            (List.finRange n_wit)).sum)) +
                (-((optionEquivRight F Vars) (X Vars_γ) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((List.map
                                (fun x =>
                                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                                (List.finRange n_var)).sum *
                            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                    (-((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                      (-((optionEquivRight F Vars) (X Vars_γ) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (X Vars_γ) *
                                ((optionEquivRight F Vars) (X Vars_β) *
                                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                        -((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_γ) *
                              ((optionEquivRight F Vars) (X Vars_β) *
                                ((List.map
                                      (fun x =>
                                        (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                          (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                      (List.finRange n_wit)).sum *
                                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))))) +
                  -((optionEquivRight F Vars) (X Vars_γ) *
                      ((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars)
                                    (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum *
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
              (-((optionEquivRight F Vars) (X Vars_β) *
                      ((List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum *
                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                  (-((optionEquivRight F Vars) (X Vars_β) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                    (-((optionEquivRight F Vars) (X Vars_γ) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((optionEquivRight F Vars) (X Vars_β) *
                              ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                      -((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (X Vars_β) *
                            ((List.map
                                  (fun x =>
                                    (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                      (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                                  (List.finRange n_wit)).sum *
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))))) +
                -((optionEquivRight F Vars) (X Vars_β) *
                    ((List.map
                          (fun x =>
                            (optionEquivRight F Vars)
                                (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                          (List.finRange n_var)).sum *
                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
            (-((List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                            (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                            (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                        (List.finRange n_var)).sum) +
                (-((optionEquivRight F Vars) (X Vars_β) *
                      ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                        (List.map
                            (fun x =>
                              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                            (List.finRange n_var)).sum)) +
                  (-((optionEquivRight F Vars) (X Vars_γ) *
                        ((optionEquivRight F Vars) (X Vars_β) *
                          ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                            (List.map
                                (fun x =>
                                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                                (List.finRange n_var)).sum))) +
                    -((optionEquivRight F Vars) (X Vars_β) *
                        ((List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                                  (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                              (List.finRange n_wit)).sum *
                          (List.map
                              (fun x =>
                                (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                              (List.finRange n_var)).sum)))) +
              -((List.map
                      (fun x =>
                        (optionEquivRight F Vars)
                            (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                      (List.finRange n_var)).sum)) +
          ((List.map
                    (fun x =>
                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                        (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -((optionEquivRight F Vars)
                            (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                    (List.finRange n_var)).sum +
              ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                    (List.map
                        (fun x =>
                          -((optionEquivRight F Vars)
                                (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                        (List.finRange n_var)).sum) +
                ((optionEquivRight F Vars) (X Vars_γ) *
                    ((optionEquivRight F Vars) (X Vars_β) *
                      ((optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                        (List.map
                            (fun x =>
                              -((optionEquivRight F Vars)
                                    (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                            (List.finRange n_var)).sum)) +
                  (optionEquivRight F Vars) (X Vars_β) *
                    ((List.map
                          (fun x =>
                            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                              (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -((optionEquivRight F Vars)
                                  (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (List.map
                  (fun x =>
                    (optionEquivRight F Vars)
                        (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                      (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map
                  (fun x =>
                    -((optionEquivRight F Vars)
                          (C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                        (optionEquivRight F Vars) (X Vars_τ) ^ ↑x))
                  (List.finRange n_var)).sum))) =
    0
eqnII :
  (optionEquivRight F Vars) (X Vars_β) *
          (List.map
              (fun x =>
                (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
                  (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
              (List.finRange n_var)).sum +
        ((optionEquivRight F Vars) (X Vars_β) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          ((optionEquivRight F Vars) (X Vars_γ) *
              ((optionEquivRight F Vars) (X Vars_β) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            (optionEquivRight F Vars) (X Vars_β) *
              ((optionEquivRight F Vars) (X Vars_β) *
                (List.map
                    (fun x =>
                      (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                        (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                    (List.finRange n_wit)).sum))) +
      (-((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (X Vars_β) *
                    (List.map
                        (fun x =>
                          (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                            (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                        (List.finRange n_wit)).sum))) +
            -((optionEquivRight F Vars) (X Vars_γ) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  ((optionEquivRight F Vars) (X Vars_γ) *
                    ((optionEquivRight F Vars) (X Vars_β) *
                      (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -((optionEquivRight F Vars) (X Vars_γ) *
              ((optionEquivRight F Vars) (X Vars_β) *
                ((optionEquivRight F Vars) (X Vars_β) *
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (List.map
                  (fun x =>
                    (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                      (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
                  (List.finRange n_var)).sum))) =
    0
eqnH :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
eqnV :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
eqnB :
  (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum)) =
    (List.map
          (fun x =>
            (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) *
              (optionEquivRight F Vars) (X Vars_τ) ^ ↑x)
          (List.finRange n_var)).sum +
      ((optionEquivRight F Vars) (X Vars_β) * (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((optionEquivRight F Vars) (X Vars_γ) *
            ((optionEquivRight F Vars) (X Vars_β) *
              (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          (optionEquivRight F Vars) (X Vars_β) *
            (List.map
                (fun x =>
                  (optionEquivRight F Vars) (C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x))) *
                    (optionEquivRight F Vars) ((to_MvPolynomial_Option Vars) (u_wit x)))
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum
Tactic:
simp only [optionEquivRight_C, optionEquivRight_X_none, optionEquivRight_X_some, optionEquivRight_to_MvPolynomial_Option] at eqnI eqnII eqnH eqnV eqnB
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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum *
            (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum +
          (X Vars.β *
              (C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) *
                (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
            (X Vars.γ *
                (X Vars.β *
                  (C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) *
                    (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum)) +
              X Vars.β *
                ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                      (List.finRange n_wit)).sum *
                  (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum))) +
        (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
          (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum +
      ((List.map (fun x => C (Polynomial.C (if ↑x = 0 then 1 else 0)) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map (fun x => C (Polynomial.C (if ↑x = 0 then 1 else 0)) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum +
        (-(X Vars.β *
                        ((List.map
                              (fun x =>
                                C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                              (List.finRange n_wit)).sum)) +
                    (-(X Vars.β *
                          (X Vars.β *
                            (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                              (List.map
                                  (fun x =>
                                    C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                  (List.finRange n_wit)).sum))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.β *
                                (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                  (List.map
                                      (fun x =>
                                        C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                      (List.finRange n_wit)).sum)))) +
                        -(X Vars.β *
                            (X Vars.β *
                              ((List.map
                                    (fun x =>
                                      C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                    (List.finRange n_wit)).sum *
                                (List.map
                                    (fun x =>
                                      C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                    (List.finRange n_wit)).sum))))) +
                  -(X Vars.β *
                      ((List.map
                            (fun x =>
                              C
                                  (Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map
                            (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                            (List.finRange n_wit)).sum)) +
                (-(X Vars.γ *
                        (X Vars.β *
                          ((List.map
                                (fun x =>
                                  C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    C Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                    (-(X Vars.β *
                          (X Vars.γ *
                            (X Vars.β *
                              (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                                C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.γ *
                                (X Vars.β *
                                  (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                    C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                        -(X Vars.β *
                            (X Vars.γ *
                              (X Vars.β *
                                ((List.map
                                      (fun x =>
                                        C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                      (List.finRange n_wit)).sum *
                                  C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))))) +
                  -(X Vars.γ *
                      (X Vars.β *
                        ((List.map
                              (fun x =>
                                C
                                    (Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
              (-(X Vars.β *
                      ((List.map
                            (fun x =>
                              C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                  (-(X Vars.β *
                        (X Vars.β *
                          (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                            C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                    (-(X Vars.γ *
                          (X Vars.β *
                            (X Vars.β *
                              (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                      -(X Vars.β *
                          (X Vars.β *
                            ((List.map
                                  (fun x =>
                                    C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                  (List.finRange n_wit)).sum *
                              C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))))) +
                -(X Vars.β *
                    ((List.map
                          (fun x =>
                            C
                                (Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              C Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
            (-((List.map
                        (fun x =>
                          C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x =>
                          C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum) +
                (-(X Vars.β *
                      (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                        (List.map
                            (fun x =>
                              C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum)) +
                  (-(X Vars.γ *
                        (X Vars.β *
                          (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                            (List.map
                                (fun x =>
                                  C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    C Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum))) +
                    -(X Vars.β *
                        ((List.map
                              (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                              (List.finRange n_wit)).sum *
                          (List.map
                              (fun x =>
                                C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum)))) +
              -((List.map
                      (fun x =>
                        C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum)) +
          ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          C Polynomial.X ^ ↑x))
                    (List.finRange n_var)).sum +
              (X Vars.β *
                  (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                    (List.map
                        (fun x =>
                          -(C
                                (Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              C Polynomial.X ^ ↑x))
                        (List.finRange n_var)).sum) +
                (X Vars.γ *
                    (X Vars.β *
                      (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                        (List.map
                            (fun x =>
                              -(C
                                    (Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  C Polynomial.X ^ ↑x))
                            (List.finRange n_var)).sum)) +
                  X Vars.β *
                    ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -(C
                                  (Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                C Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (List.map
                  (fun x =>
                    C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                      C Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map
                  (fun x =>
                    -(C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                        C Polynomial.X ^ ↑x))
                  (List.finRange n_var)).sum))) =
    0
eqnII :
  X Vars.β *
          (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum +
        (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          (X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            X Vars.β *
              (X Vars.β *
                (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                    (List.finRange n_wit)).sum))) +
      (-(X Vars.γ *
                (X Vars.β *
                  (X Vars.β *
                    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                        (List.finRange n_wit)).sum))) +
            -(X Vars.γ *
                (X Vars.β * (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -(X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -(X Vars.γ *
            (X Vars.β *
              (List.map
                  (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum))) =
    0
eqnH :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
eqnV :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
eqnB :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum *
            (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum +
          (X Vars.β *
              (C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) *
                (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
            (X Vars.γ *
                (X Vars.β *
                  (C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) *
                    (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum)) +
              X Vars.β *
                ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                      (List.finRange n_wit)).sum *
                  (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum))) +
        (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
          (List.map (fun x => C (Polynomial.C (t.coeff ↑x)) * C Polynomial.X ^ ↑x) (List.finRange n_var)).sum +
      ((List.map (fun x => C (Polynomial.C (if ↑x = 0 then 1 else 0)) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum *
          (List.map (fun x => C (Polynomial.C (if ↑x = 0 then 1 else 0)) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum +
        (-(X Vars.β *
                        ((List.map
                              (fun x =>
                                C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map
                              (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                              (List.finRange n_wit)).sum)) +
                    (-(X Vars.β *
                          (X Vars.β *
                            (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                              (List.map
                                  (fun x =>
                                    C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                  (List.finRange n_wit)).sum))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.β *
                                (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                  (List.map
                                      (fun x =>
                                        C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                      (List.finRange n_wit)).sum)))) +
                        -(X Vars.β *
                            (X Vars.β *
                              ((List.map
                                    (fun x =>
                                      C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                    (List.finRange n_wit)).sum *
                                (List.map
                                    (fun x =>
                                      C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                    (List.finRange n_wit)).sum))))) +
                  -(X Vars.β *
                      ((List.map
                            (fun x =>
                              C
                                  (Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map
                            (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                            (List.finRange n_wit)).sum)) +
                (-(X Vars.γ *
                        (X Vars.β *
                          ((List.map
                                (fun x =>
                                  C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    C Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                    (-(X Vars.β *
                          (X Vars.γ *
                            (X Vars.β *
                              (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                                C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.γ *
                                (X Vars.β *
                                  (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                    C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                        -(X Vars.β *
                            (X Vars.γ *
                              (X Vars.β *
                                ((List.map
                                      (fun x =>
                                        C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                      (List.finRange n_wit)).sum *
                                  C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))))) +
                  -(X Vars.γ *
                      (X Vars.β *
                        ((List.map
                              (fun x =>
                                C
                                    (Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
              (-(X Vars.β *
                      ((List.map
                            (fun x =>
                              C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                  (-(X Vars.β *
                        (X Vars.β *
                          (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                            C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                    (-(X Vars.γ *
                          (X Vars.β *
                            (X Vars.β *
                              (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                                C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                      -(X Vars.β *
                          (X Vars.β *
                            ((List.map
                                  (fun x =>
                                    C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                                  (List.finRange n_wit)).sum *
                              C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))))) +
                -(X Vars.β *
                    ((List.map
                          (fun x =>
                            C
                                (Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              C Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
            (-((List.map
                        (fun x =>
                          C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x =>
                          C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum) +
                (-(X Vars.β *
                      (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                        (List.map
                            (fun x =>
                              C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum)) +
                  (-(X Vars.γ *
                        (X Vars.β *
                          (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                            (List.map
                                (fun x =>
                                  C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                    C Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum))) +
                    -(X Vars.β *
                        ((List.map
                              (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                              (List.finRange n_wit)).sum *
                          (List.map
                              (fun x =>
                                C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) *
                                  C Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum)))) +
              -((List.map
                      (fun x =>
                        C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum)) +
          ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                          C Polynomial.X ^ ↑x))
                    (List.finRange n_var)).sum +
              (X Vars.β *
                  (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) *
                    (List.map
                        (fun x =>
                          -(C
                                (Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                              C Polynomial.X ^ ↑x))
                        (List.finRange n_var)).sum) +
                (X Vars.γ *
                    (X Vars.β *
                      (C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) *
                        (List.map
                            (fun x =>
                              -(C
                                    (Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                  C Polynomial.X ^ ↑x))
                            (List.finRange n_var)).sum)) +
                  X Vars.β *
                    ((List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -(C
                                  (Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                                C Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (List.map
                  (fun x =>
                    C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                      C Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map
                  (fun x =>
                    -(C (Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum) *
                        C Polynomial.X ^ ↑x))
                  (List.finRange n_var)).sum))) =
    0
eqnII :
  X Vars.β *
          (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum +
        (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          (X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            X Vars.β *
              (X Vars.β *
                (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                    (List.finRange n_wit)).sum))) +
      (-(X Vars.γ *
                (X Vars.β *
                  (X Vars.β *
                    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                        (List.finRange n_wit)).sum))) +
            -(X Vars.γ *
                (X Vars.β * (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -(X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -(X Vars.γ *
            (X Vars.β *
              (List.map
                  (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum))) =
    0
eqnH :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
eqnV :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
eqnB :
  (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum)) =
    (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x))) * C Polynomial.X ^ ↑x)
          (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            (List.map (fun x => C (Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x))) * C (u_wit x))
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum
Tactic:
simp only [←C_mul, ←C_pow, ←C_add, ←C_neg,
  sum_map_C] at eqnI eqnII eqnH eqnV eqnB
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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  C
            ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
          (X Vars.β *
              C
                (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                  (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
            (X Vars.γ *
                (X Vars.β *
                  C
                    (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                      (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum)) +
              X Vars.β *
                C
                  ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                        (List.finRange n_wit)).sum *
                    (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum))) +
        C
          ((List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
      (C
          ((List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum) +
        (-(X Vars.β *
                        C
                          ((List.map
                                (fun x =>
                                  Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum)) +
                    (-(X Vars.β *
                          (X Vars.β *
                            C
                              (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                (List.map
                                    (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                    (List.finRange n_wit)).sum))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.β *
                                C
                                  (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                    (List.map
                                        (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                        (List.finRange n_wit)).sum)))) +
                        -(X Vars.β *
                            (X Vars.β *
                              C
                                ((List.map
                                      (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                      (List.finRange n_wit)).sum *
                                  (List.map
                                      (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                      (List.finRange n_wit)).sum))))) +
                  -(X Vars.β *
                      C
                        ((List.map
                              (fun x =>
                                Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                              (List.finRange n_wit)).sum)) +
                (-(X Vars.γ *
                        (X Vars.β *
                          C
                            ((List.map
                                  (fun x =>
                                    Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                  (List.finRange n_var)).sum *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                    (-(X Vars.β *
                          (X Vars.γ *
                            (X Vars.β *
                              C
                                (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                  Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.γ *
                                (X Vars.β *
                                  C
                                    (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                      Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                        -(X Vars.β *
                            (X Vars.γ *
                              (X Vars.β *
                                C
                                  ((List.map
                                        (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                        (List.finRange n_wit)).sum *
                                    Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                  -(X Vars.γ *
                      (X Vars.β *
                        C
                          ((List.map
                                (fun x =>
                                  Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
              (-(X Vars.β *
                      C
                        ((List.map
                              (fun x =>
                                Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
                  (-(X Vars.β *
                        (X Vars.β *
                          C
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                    (-(X Vars.γ *
                          (X Vars.β *
                            (X Vars.β *
                              C
                                (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                  Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                      -(X Vars.β *
                          (X Vars.β *
                            C
                              ((List.map
                                    (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                    (List.finRange n_wit)).sum *
                                Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                -(X Vars.β *
                    C
                      ((List.map
                            (fun x =>
                              Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
            (C
                  (-((List.map
                          (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      (List.map
                          (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum)) +
                (-(X Vars.β *
                      C
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                          (List.map
                              (fun x =>
                                Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum)) +
                  (-(X Vars.γ *
                        (X Vars.β *
                          C
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              (List.map
                                  (fun x =>
                                    Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                  (List.finRange n_var)).sum))) +
                    -(X Vars.β *
                        C
                          ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum *
                            (List.map
                                (fun x =>
                                  Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum)))) +
              C
                (-((List.map
                        (fun x =>
                          Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum))) +
          (C
                ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x))
                      (List.finRange n_var)).sum) +
              (X Vars.β *
                  C
                    (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                      (List.map
                          (fun x =>
                            -(Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum) +
                (X Vars.γ *
                    (X Vars.β *
                      C
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                          (List.map
                              (fun x =>
                                -(Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    Polynomial.X ^ ↑x))
                              (List.finRange n_var)).sum)) +
                  X Vars.β *
                    C
                      ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                            (List.finRange n_wit)).sum *
                        (List.map
                            (fun x =>
                              -(Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  Polynomial.X ^ ↑x))
                            (List.finRange n_var)).sum))) +
            C
              ((List.map
                    (fun x =>
                      Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                        Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          Polynomial.X ^ ↑x))
                    (List.finRange n_var)).sum)))) =
    0
eqnII :
  X Vars.β *
          C
            (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum +
        (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          (X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            X Vars.β *
              (X Vars.β *
                C
                  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                      (List.finRange n_wit)).sum))) +
      (-(X Vars.γ *
                (X Vars.β *
                  (X Vars.β *
                    C
                      (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                          (List.finRange n_wit)).sum))) +
            -(X Vars.γ *
                (X Vars.β * (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -(X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -(X Vars.γ *
            (X Vars.β *
              C
                (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum))) =
    0
eqnH :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
eqnV :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
eqnB :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  C
            ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
          (X Vars.β *
              C
                (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                  (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
            (X Vars.γ *
                (X Vars.β *
                  C
                    (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                      (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum)) +
              X Vars.β *
                C
                  ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                        (List.finRange n_wit)).sum *
                    (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum))) +
        C
          ((List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
      (C
          ((List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum) +
        (-(X Vars.β *
                        C
                          ((List.map
                                (fun x =>
                                  Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum)) +
                    (-(X Vars.β *
                          (X Vars.β *
                            C
                              (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                (List.map
                                    (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                    (List.finRange n_wit)).sum))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.β *
                                C
                                  (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                    (List.map
                                        (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                        (List.finRange n_wit)).sum)))) +
                        -(X Vars.β *
                            (X Vars.β *
                              C
                                ((List.map
                                      (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                      (List.finRange n_wit)).sum *
                                  (List.map
                                      (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                      (List.finRange n_wit)).sum))))) +
                  -(X Vars.β *
                      C
                        ((List.map
                              (fun x =>
                                Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                              (List.finRange n_wit)).sum)) +
                (-(X Vars.γ *
                        (X Vars.β *
                          C
                            ((List.map
                                  (fun x =>
                                    Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                  (List.finRange n_var)).sum *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                    (-(X Vars.β *
                          (X Vars.γ *
                            (X Vars.β *
                              C
                                (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                                  Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
                      (-(X Vars.γ *
                            (X Vars.β *
                              (X Vars.γ *
                                (X Vars.β *
                                  C
                                    (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                      Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
                        -(X Vars.β *
                            (X Vars.γ *
                              (X Vars.β *
                                C
                                  ((List.map
                                        (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                        (List.finRange n_wit)).sum *
                                    Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))))) +
                  -(X Vars.γ *
                      (X Vars.β *
                        C
                          ((List.map
                                (fun x =>
                                  Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum *
                            Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))))) +
              (-(X Vars.β *
                      C
                        ((List.map
                              (fun x =>
                                Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
                  (-(X Vars.β *
                        (X Vars.β *
                          C
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                    (-(X Vars.γ *
                          (X Vars.β *
                            (X Vars.β *
                              C
                                (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                                  Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
                      -(X Vars.β *
                          (X Vars.β *
                            C
                              ((List.map
                                    (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                    (List.finRange n_wit)).sum *
                                Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))))) +
                -(X Vars.β *
                    C
                      ((List.map
                            (fun x =>
                              Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
            (C
                  (-((List.map
                          (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      (List.map
                          (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum)) +
                (-(X Vars.β *
                      C
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                          (List.map
                              (fun x =>
                                Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum)) +
                  (-(X Vars.γ *
                        (X Vars.β *
                          C
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              (List.map
                                  (fun x =>
                                    Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                  (List.finRange n_var)).sum))) +
                    -(X Vars.β *
                        C
                          ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum *
                            (List.map
                                (fun x =>
                                  Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                                (List.finRange n_var)).sum)))) +
              C
                (-((List.map
                        (fun x =>
                          Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum))) +
          (C
                ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x))
                      (List.finRange n_var)).sum) +
              (X Vars.β *
                  C
                    (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                      (List.map
                          (fun x =>
                            -(Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum) +
                (X Vars.γ *
                    (X Vars.β *
                      C
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                          (List.map
                              (fun x =>
                                -(Polynomial.C
                                      (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                    Polynomial.X ^ ↑x))
                              (List.finRange n_var)).sum)) +
                  X Vars.β *
                    C
                      ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                            (List.finRange n_wit)).sum *
                        (List.map
                            (fun x =>
                              -(Polynomial.C
                                    (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                  Polynomial.X ^ ↑x))
                            (List.finRange n_var)).sum))) +
            C
              ((List.map
                    (fun x =>
                      Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                        Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          Polynomial.X ^ ↑x))
                    (List.finRange n_var)).sum)))) =
    0
eqnII :
  X Vars.β *
          C
            (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum +
        (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ))) +
          (X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)))) +
            X Vars.β *
              (X Vars.β *
                C
                  (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                      (List.finRange n_wit)).sum))) +
      (-(X Vars.γ *
                (X Vars.β *
                  (X Vars.β *
                    C
                      (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                          (List.finRange n_wit)).sum))) +
            -(X Vars.γ *
                (X Vars.β * (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))))) +
          -(X Vars.γ * (X Vars.β * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))))) +
        -(X Vars.γ *
            (X Vars.β *
              C
                (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum))) =
    0
eqnH :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
eqnV :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
eqnB :
  C
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) =
    C
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        (X Vars.γ * (X Vars.β * C (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ))) +
          X Vars.β *
            C
              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum
Tactic:
simp only [X, C_apply, monomial_mul, one_mul, mul_one, add_zero, zero_add, mul_add, add_mul] at eqnI eqnII eqnH eqnV eqnB
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
t : Polynomial F
ht : (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum = t
ht0 : t.Monic
stmt : BabySNARK.Stmt
prover : Prover F BabySNARK
eqnI :
  (monomial 0)
            ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                  (List.finRange n_var)).sum *
              (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
          ((monomial fun₀ | Vars.β => 1)
              (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ) *
                (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
            ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
                (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ) *
                  (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
              (monomial fun₀ | Vars.β => 1)
                ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                      (List.finRange n_wit)).sum *
                  (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum))) +
        (monomial 0)
          ((List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (t.coeff ↑x) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum) +
      ((monomial 0)
          ((List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x) (List.finRange n_var)).sum *
            (List.map (fun x => Polynomial.C (if ↑x = 0 then 1 else 0) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum) +
        (-(monomial fun₀ | Vars.β => 1)
                        ((List.map
                              (fun x =>
                                Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                              (List.finRange n_wit)).sum) +
                    (-(monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
                          (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum) +
                      (-(monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1)))
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                  (List.finRange n_wit)).sum) +
                        -(monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
                            ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                  (List.finRange n_wit)).sum *
                              (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                  (List.finRange n_wit)).sum))) +
                  -(monomial fun₀ | Vars.β => 1)
                      ((List.map
                            (fun x =>
                              Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                            (List.finRange n_wit)).sum) +
                (-(monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
                        ((List.map
                              (fun x =>
                                Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum *
                          Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
                    (-(monomial ((fun₀ | Vars.β => 1) + ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1)))
                          (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                            Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
                      (-(monomial
                              ((fun₀ | Vars.γ => 1) +
                                ((fun₀ | Vars.β => 1) + ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))))
                            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
                        -(monomial ((fun₀ | Vars.β => 1) + ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1)))
                            ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                  (List.finRange n_wit)).sum *
                              Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)))) +
                  -(monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
                      ((List.map
                            (fun x =>
                              Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ))) +
              (-(monomial fun₀ | Vars.β => 1)
                      ((List.map
                            (fun x =>
                              Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum *
                        Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
                  (-(monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                          Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
                    (-(monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1)))
                          (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                            Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
                      -(monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
                          ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                                (List.finRange n_wit)).sum *
                            Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)))) +
                -(monomial fun₀ | Vars.β => 1)
                    ((List.map
                          (fun x =>
                            Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                              Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ))) +
            ((monomial 0)
                  (-((List.map
                          (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum *
                      (List.map
                          (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                          (List.finRange n_var)).sum)) +
                (-(monomial fun₀ | Vars.β => 1)
                      (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                        (List.map
                            (fun x =>
                              Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                            (List.finRange n_var)).sum) +
                  (-(monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
                        (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                          (List.map
                              (fun x =>
                                Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum) +
                    -(monomial fun₀ | Vars.β => 1)
                        ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                              (List.finRange n_wit)).sum *
                          (List.map
                              (fun x =>
                                Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                              (List.finRange n_var)).sum))) +
              (monomial 0)
                (-((List.map
                        (fun x =>
                          Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum *
                    (List.map
                        (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                        (List.finRange n_var)).sum))) +
          ((monomial 0)
                ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                      (List.finRange n_var)).sum *
                  (List.map
                      (fun x =>
                        -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                            Polynomial.X ^ ↑x))
                      (List.finRange n_var)).sum) +
              ((monomial fun₀ | Vars.β => 1)
                  (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ) *
                    (List.map
                        (fun x =>
                          -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                              Polynomial.X ^ ↑x))
                        (List.finRange n_var)).sum) +
                ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
                    (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ) *
                      (List.map
                          (fun x =>
                            -(Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum) +
                  (monomial fun₀ | Vars.β => 1)
                    ((List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                          (List.finRange n_wit)).sum *
                      (List.map
                          (fun x =>
                            -(Polynomial.C
                                  (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                                Polynomial.X ^ ↑x))
                          (List.finRange n_var)).sum))) +
            (monomial 0)
              ((List.map
                    (fun x =>
                      Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                        Polynomial.X ^ ↑x)
                    (List.finRange n_var)).sum *
                (List.map
                    (fun x =>
                      -(Polynomial.C (List.map (fun j => stmt j * (u_stmt j).coeff ↑x) (List.finRange n_stmt)).sum *
                          Polynomial.X ^ ↑x))
                    (List.finRange n_var)).sum)))) =
    0
eqnII :
  (monomial fun₀ | Vars.β => 1)
          (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
              (List.finRange n_var)).sum +
        ((monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
          ((monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1)))
              (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)) +
            (monomial ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1))
              (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                  (List.finRange n_wit)).sum)) +
      (-(monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1)))
                (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                    (List.finRange n_wit)).sum +
            -(monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))))
                (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
          -(monomial ((fun₀ | Vars.γ => 1) + ((fun₀ | Vars.β => 1) + fun₀ | Vars.β => 1)))
              (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        -(monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
                (List.finRange n_var)).sum) =
    0
eqnH :
  (monomial 0)
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.1 Proof_Idx.H SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum)) =
    (monomial 0)
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.2 Proof_Idx.H SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.H (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum))
eqnV :
  (monomial 0)
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.1 Proof_Idx.V SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum)) =
    (monomial 0)
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.2 Proof_Idx.V SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.V (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum))
eqnB :
  (monomial 0)
        (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.1 Proof_Idx.B SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum)) =
    (monomial 0)
        (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.τ_pow x)) * Polynomial.X ^ ↑x)
            (List.finRange n_var)).sum +
      ((monomial fun₀ | Vars.β => 1) (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γ)) +
        ((monomial ((fun₀ | Vars.γ => 1) + fun₀ | Vars.β => 1))
            (Polynomial.C (prover.2 Proof_Idx.B SRS_Elements_Idx.γβ)) +
          (monomial fun₀ | Vars.β => 1)
            (List.map (fun x => Polynomial.C (prover.2 Proof_Idx.B (SRS_Elements_Idx.βu x)) * u_wit x)
                (List.finRange n_wit)).sum))
⊢ ((List.map (fun i => Polynomial.C (stmt i) * u_stmt i) (List.finRange n_stmt)).sum +
          (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.B (SRS_Elements_Idx.βu i)) * u_wit i)
              (List.finRange n_wit)).sum) ^
        2 -
      1 =
    t *
      (List.map (fun i => Polynomial.C (prover.1 Proof_Idx.H (SRS_Elements_Idx.βu i)) * u_wit i)
          (List.finRange n_wit)).sum