pub trait UnivariateZerocheckProver<F: Field> {
type RegularZerocheckProver: SumcheckProver<F>;
// Required methods
fn n_vars(&self) -> usize;
fn domain_size(&self, skip_rounds: usize) -> usize;
fn execute_univariate_round(
&mut self,
skip_rounds: usize,
max_domain_size: usize,
batch_coeff: F,
) -> Result<LagrangeRoundEvals<F>, Error>;
fn fold_univariate_round(
self,
challenge: F,
) -> Result<Self::RegularZerocheckProver, Error>;
}
Expand description
A univariate zerocheck prover interface.
The primary reason for providing this logic via a trait is the ability to type erase univariate round small fields, which may differ between the provers, and to decouple the batch prover implementation from the relatively complex type signatures of the individual provers.
The batch prover must obey a specific sequence of calls: Self::execute_univariate_round
should be followed by Self::fold_univariate_round
. Getters Self::n_vars
and Self::domain_size
are used to align claims and determine the maximal domain size, required by the Lagrange representation
of the univariate round polynomial. Folding univariate round results in a SumcheckProver
instance
that can be driven to completion to prove the remaining multilinear rounds.
This trait is not object safe.
Required Associated Types§
sourcetype RegularZerocheckProver: SumcheckProver<F>
type RegularZerocheckProver: SumcheckProver<F>
“Regular” prover for the multilinear rounds remaining after the univariate skip.
Required Methods§
sourcefn domain_size(&self, skip_rounds: usize) -> usize
fn domain_size(&self, skip_rounds: usize) -> usize
Maximal required Lagrange domain size among compositions in this prover.
sourcefn execute_univariate_round(
&mut self,
skip_rounds: usize,
max_domain_size: usize,
batch_coeff: F,
) -> Result<LagrangeRoundEvals<F>, Error>
fn execute_univariate_round( &mut self, skip_rounds: usize, max_domain_size: usize, batch_coeff: F, ) -> Result<LagrangeRoundEvals<F>, Error>
Computes the prover message for the univariate round as a univariate polynomial.
The prover message mixes the univariate polynomials of the underlying composites using
the same approach as SumcheckProver::execute
.
Unlike multilinear rounds, the returned univariate is not in monomial basis but in Lagrange basis.
sourcefn fold_univariate_round(
self,
challenge: F,
) -> Result<Self::RegularZerocheckProver, Error>
fn fold_univariate_round( self, challenge: F, ) -> Result<Self::RegularZerocheckProver, Error>
Folds into a regular multilinear prover for the remaining rounds.