From 6b1bcd1ef7ca62705fcefce442912c32a2c1d29e Mon Sep 17 00:00:00 2001 From: "sm.wu" Date: Tue, 9 Jul 2024 11:46:29 +0800 Subject: [PATCH] fix comment --- gkr/src/prover/phase1.rs | 4 ++-- gkr/src/verifier/phase1.rs | 2 +- multilinear_extensions/src/mle.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gkr/src/prover/phase1.rs b/gkr/src/prover/phase1.rs index 6e52040f7..04dd3170f 100644 --- a/gkr/src/prover/phase1.rs +++ b/gkr/src/prover/phase1.rs @@ -20,7 +20,7 @@ use crate::{ // Prove the items copied from the current layer to later layers for data parallel circuits. impl IOPProverState { - /// Sumcheck 1: sigma = \sum_{t || y} \sum_j ( f1^{(j)}(t || y) * g1^{(j)}(t || y) ) + /// Sumcheck 1: sigma = \sum_{t || y}(f1({t || y}) * (\sum_j g1^{(j)}({t || y}))) /// sigma = \sum_j( \alpha^j * subset[i][j](rt_j || ry_j) ) /// f1^{(j)}(y) = layers[i](t || y) /// g1^{(j)}(y) = \alpha^j * eq(rt_j, t) * eq(ry_j, y) @@ -149,7 +149,7 @@ impl IOPProverState { }; exit_span!(span); - // sumcheck: sigma = \sum_y( \sum_j f1^{(j)}(y) * g1^{(j)}(y)) + // sumcheck: sigma = \sum_{s || y}(f1({s || y}) * (\sum_j g1^{(j)}({s || y}))) let span = entered_span!("virtual_poly"); let mut virtual_poly_1 = VirtualPolynomial::new_from_mle(f1, E::BaseField::ONE); virtual_poly_1.mul_by_mle(g1, E::BaseField::ONE); diff --git a/gkr/src/verifier/phase1.rs b/gkr/src/verifier/phase1.rs index 6a3b0c947..eafde9efd 100644 --- a/gkr/src/verifier/phase1.rs +++ b/gkr/src/verifier/phase1.rs @@ -53,7 +53,7 @@ impl IOPVerifierState { acc + point_and_eval.eval * alpha_pow }); - // Sumcheck: sigma = \sum_{t || y}( \sum_j f1^{(j)}( t || y) * g1^{(j)}(t || y) ) + // Sumcheck: sigma = \sum_{s || y}(f1({s || y}) * (\sum_j g1^{(j)}({s || y}))) // f1^{(j)}(y) = layers[i](t || y) // g1^{(j)}(t || y) = \alpha^j * eq(rt_j, t) * eq(ry_j, y) // g1^{(j)}(t || y) = \alpha^j * eq(rt_j, t) * copy_to[j](ry_j, y) diff --git a/multilinear_extensions/src/mle.rs b/multilinear_extensions/src/mle.rs index 1cefa8269..4b8a9baec 100644 --- a/multilinear_extensions/src/mle.rs +++ b/multilinear_extensions/src/mle.rs @@ -147,7 +147,7 @@ impl DenseMultilinearExtension { let nv = self.num_vars; // evaluate single variable of partial point from left to right for (i, point) in partial_point.iter().enumerate() { - // override buf[b1, b2,..bt, 0] = (1-point) * buf[b1, b2,..bt, 0] + point * buf[b1,b2,..bt, 1] in parallel + // override buf[b1, b2,..bt, 0] = (1-point) * buf[b1, b2,..bt, 0] + point * buf[b1, b2,..bt, 1] in parallel match &mut self.evaluations { FieldType::Base(evaluations) => { let evaluations_ext = evaluations @@ -444,7 +444,7 @@ impl DenseMultilinearExtension { // evaluate single variable of partial point from left to right for (i, point) in partial_point.iter().enumerate() { let max_log2_size = nv - i; - // override buf[b1, b2,..bt, 0] = (1-point) * buf[b1, b2,..bt, 0] + point * buf[b1,b2,..bt, 1] in parallel + // override buf[b1, b2,..bt, 0] = (1-point) * buf[b1, b2,..bt, 0] + point * buf[b1, b2,..bt, 1] in parallel match &mut self.evaluations { FieldType::Base(evaluations) => { let evaluations_ext = evaluations