@@ -92,7 +92,7 @@ fn _compute_multi_opening_naive(
92
92
}
93
93
94
94
// Compute f(x) - I(x) / \prod (x - z_i)
95
- // Where I(x) is the polynomial such that r (z_i) = f(z_i) for all z_i
95
+ // Where I(x) is the polynomial such that I (z_i) = f(z_i) for all z_i
96
96
//
97
97
// We can speed up computation of I(x) by doing an IFFT, given the coset generator, since
98
98
// we know all of the points are of the form k * \omega where \omega is a root of unity
@@ -103,15 +103,15 @@ fn _compute_multi_opening_naive(
103
103
. zip ( evaluations. iter ( ) )
104
104
. map ( |( p, e) | ( * p, * e) )
105
105
. collect ( ) ;
106
- let r_x = lagrange_interpolate ( & coordinates) . expect ( "lagrange interpolation failed" ) ;
106
+ let i_x = lagrange_interpolate ( & coordinates) . expect ( "lagrange interpolation failed" ) ;
107
107
108
- // Check that the r_x polynomial is correct, it should essentially be the polynomial that
109
- // evaluates to f(z_i) = r (z_i)
108
+ // Check that the i_x polynomial is correct, it should essentially be the polynomial that
109
+ // evaluates to f(z_i) = I (z_i)
110
110
for ( point, evaluation) in points. iter ( ) . zip ( evaluations. iter ( ) ) {
111
- assert_eq ! ( poly_eval( & r_x , point) , * evaluation) ;
111
+ assert_eq ! ( poly_eval( & i_x , point) , * evaluation) ;
112
112
}
113
113
114
- let poly_shifted = poly_sub ( polynomial. to_vec ( ) . clone ( ) , r_x . clone ( ) ) ;
114
+ let poly_shifted = poly_sub ( polynomial. to_vec ( ) . clone ( ) , i_x . clone ( ) ) ;
115
115
116
116
let mut quotient_poly = poly_shifted. to_vec ( ) . clone ( ) ;
117
117
for point in points. iter ( ) {
@@ -146,17 +146,17 @@ fn _verify_multi_opening_naive(
146
146
. zip ( output_points. iter ( ) )
147
147
. map ( |( p, e) | ( * p, * e) )
148
148
. collect ( ) ;
149
- let r_x = lagrange_interpolate ( & coordinates) . unwrap ( ) ;
149
+ let i_x = lagrange_interpolate ( & coordinates) . unwrap ( ) ;
150
150
151
151
let vanishing_poly = vanishing_poly ( input_points) ;
152
152
let comm_vanishing_poly: G2Point = verification_key. commit_g2 ( & vanishing_poly) . into ( ) ;
153
153
154
- let comm_r_x = verification_key. commit_g1 ( & r_x ) ;
155
- let comm_minus_r_x : G1Point = ( G1Projective :: from ( commitment) - comm_r_x ) . into ( ) ;
154
+ let comm_i_x = verification_key. commit_g1 ( & i_x ) ;
155
+ let comm_minus_i_x : G1Point = ( G1Projective :: from ( commitment) - comm_i_x ) . into ( ) ;
156
156
multi_pairings ( & [
157
157
( & proof, & G2Prepared :: from ( comm_vanishing_poly) ) ,
158
158
(
159
- & comm_minus_r_x ,
159
+ & comm_minus_i_x ,
160
160
& G2Prepared :: from ( -verification_key. g2_gen ( ) ) ,
161
161
) ,
162
162
] )
0 commit comments