-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrabiata: prepare constraints for cross-terms computation #2702
Changes from all commits
29ca8f1
5655290
0083c30
2d2265c
00a6119
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,6 +254,45 @@ pub trait MVPoly<F: PrimeField, const N: usize, const D: usize>: | |
u2: F, | ||
) -> HashMap<usize, F>; | ||
|
||
/// Compute the cross-terms of the given polynomial, scaled by the given | ||
/// scalar. | ||
/// | ||
/// More explicitly, given a polynomial `P(X1, ..., Xn)` and a scalar α, the | ||
/// method computes the the cross-terms of the polynomial `Q(X1, ..., Xn, α) | ||
/// = α * P(X1, ..., Xn)`. For this reason, the method takes as input the | ||
/// two different scalars `scalar1` and `scalar2` as we are considering the | ||
/// scaling factor as a variable. | ||
/// | ||
/// This method is particularly useful when you need to compute a | ||
/// (possibly random) combinaison of polynomials `P1(X1, ..., Xn), ..., | ||
/// Pm(X1, ..., Xn)`, like when computing a quotient polynomial in the PlonK | ||
/// PIOP, as the result is the sum of individual "scaled" polynomials: | ||
/// ```text | ||
/// Q(X_1, ..., X_n, α_1, ..., α_m) = | ||
/// α_1 P1(X_1, ..., X_n) + | ||
/// ... | ||
/// α_m Pm(X_1, ..., X_n) + | ||
/// ``` | ||
/// | ||
/// The polynomial must not necessarily be homogeneous. For this reason, the | ||
/// values `u1` and `u2` represents the extra variable that is used to make | ||
/// the polynomial homogeneous. | ||
/// | ||
/// The homogeneous degree is supposed to be the one defined by the type of | ||
/// the polynomial `P`, i.e. `D`. | ||
/// | ||
/// The output is a map of `D` values that represents the cross-terms | ||
/// for each power of `r`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add in the description of the funciton something like the following to summarize There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll do it in a follow-up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in the HackMD. |
||
fn compute_cross_terms_scaled( | ||
&self, | ||
eval1: &[F; N], | ||
eval2: &[F; N], | ||
u1: F, | ||
u2: F, | ||
scalar1: F, | ||
scalar2: F, | ||
) -> HashMap<usize, F>; | ||
|
||
/// Modify the monomial in the polynomial to the new value `coeff`. | ||
fn modify_monomial(&mut self, exponents: [usize; N], coeff: F); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't having (at least) a full columns for PI can create issue on the perfs of the verifier.
More importantely, this translate in the folder verifier which will handle a big PI.
We can use the PLONK way to handle PI to avoid a PI being linear in the number of rows
Since this is not the topic of the PR, we can see that later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I want to investigate other solutions to handle PI.