@@ -24,7 +24,6 @@ def whir_open(
2424 claimed_sum : Mut ,
2525):
2626 n_rounds , n_final_vars , num_queries , num_oods , query_grinding_bits , folding_grinding = get_whir_params (n_vars , initial_log_inv_rate )
27- n_final_coeffs = powers_of_two (n_final_vars )
2827 folding_factors = Array (n_rounds + 1 )
2928 folding_factors [0 ] = WHIR_INITIAL_FOLDING_FACTOR
3029 for i in range (1 , n_rounds + 1 ):
@@ -88,15 +87,8 @@ def whir_open(
8887
8988 final_circle_values = all_circle_values [n_rounds ]
9089 for i in range (0 , num_queries [n_rounds ]):
91- powers_of_2_rev = expand_from_univariate_base (final_circle_values [i ], n_final_vars )
92- poly_eq = match_range (n_final_vars , range (MAX_NUM_VARIABLES_TO_SEND_COEFFS - WHIR_SUBSEQUENT_FOLDING_FACTOR , MAX_NUM_VARIABLES_TO_SEND_COEFFS + 1 ), lambda n : poly_eq_base (powers_of_2_rev , n ))
93- final_pol_evaluated_on_circle = Array (DIM )
94- dot_product_be_dynamic (
95- poly_eq ,
96- final_coeffcients ,
97- final_pol_evaluated_on_circle ,
98- n_final_coeffs ,
99- )
90+ alpha = final_circle_values [i ]
91+ final_pol_evaluated_on_circle = match_range (n_final_vars , range (MAX_NUM_VARIABLES_TO_SEND_COEFFS - WHIR_SUBSEQUENT_FOLDING_FACTOR , MAX_NUM_VARIABLES_TO_SEND_COEFFS + 1 ), lambda n : univariate_eval_on_base (final_coeffcients , alpha , n ))
10092 copy_5 (final_pol_evaluated_on_circle , final_folds + i * DIM )
10193
10294 fs , all_folding_randomness [n_rounds + 1 ], end_sum = sumcheck_verify (fs , n_final_vars , claimed_sum , 2 )
@@ -158,9 +150,7 @@ def whir_open(
158150 )
159151 s = add_extension_ret (s , s7 )
160152 s = add_extension_ret (summed_ood , s )
161- poly_eq_final = poly_eq_extension_dynamic (all_folding_randomness [n_rounds + 1 ], n_final_vars )
162- final_value = Array (DIM )
163- dot_product_ee_dynamic (poly_eq_final , final_coeffcients , final_value , n_final_coeffs )
153+ final_value = match_range (n_final_vars , range (MAX_NUM_VARIABLES_TO_SEND_COEFFS - WHIR_SUBSEQUENT_FOLDING_FACTOR , MAX_NUM_VARIABLES_TO_SEND_COEFFS + 1 ), lambda n : eval_multilinear_coeffs_rev (final_coeffcients , all_folding_randomness [n_rounds + 1 ], n ))
164154 # copy_5(mul_extension_ret(s, final_value), end_sum);
165155
166156 return fs , folding_randomness_global , s , final_value , end_sum
0 commit comments