binius_core::protocols::sumcheck::prove

Trait UnivariateZerocheckProver

Source
pub trait UnivariateZerocheckProver<'a, F: Field> {
    // 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: Box<Self>,
        challenge: F,
    ) -> Result<Box<dyn SumcheckProver<F> + 'a>, 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 object-safe.

Required Methods§

Source

fn n_vars(&self) -> usize

The number of variables in the multivariate polynomial.

Source

fn domain_size(&self, skip_rounds: usize) -> usize

Maximal required Lagrange domain size among compositions in this prover.

Source

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.

Source

fn fold_univariate_round( self: Box<Self>, challenge: F, ) -> Result<Box<dyn SumcheckProver<F> + 'a>, Error>

Folds into a regular multilinear prover for the remaining rounds.

Implementations on Foreign Types§

Source§

impl<'a, F: Field, Prover: UnivariateZerocheckProver<'a, F> + ?Sized> UnivariateZerocheckProver<'a, F> for Box<Prover>

Source§

fn n_vars(&self) -> usize

Source§

fn domain_size(&self, skip_rounds: usize) -> usize

Source§

fn execute_univariate_round( &mut self, skip_rounds: usize, max_domain_size: usize, batch_coeff: F, ) -> Result<LagrangeRoundEvals<F>, Error>

Source§

fn fold_univariate_round( self: Box<Self>, challenge: F, ) -> Result<Box<dyn SumcheckProver<F> + 'a>, Error>

Implementors§

Source§

impl<'a, 'm, F, FDomain, PBase, P, CompositionBase, Composition, M, Backend> UnivariateZerocheckProver<'a, F> for UnivariateZerocheck<'a, 'm, FDomain, PBase, P, CompositionBase, Composition, M, Backend>
where F: TowerField + ExtensionField<PBase::Scalar> + ExtensionField<FDomain>, FDomain: TowerField, PBase: PackedFieldIndexable<Scalar: ExtensionField<FDomain>> + PackedExtension<FDomain, PackedSubfield: PackedFieldIndexable>, P: PackedFieldIndexable<Scalar = F> + RepackedExtension<PBase> + PackedExtension<FDomain>, CompositionBase: CompositionPolyOS<PBase> + 'static, Composition: CompositionPolyOS<P> + 'static, M: MultilinearPoly<P> + Send + Sync + 'm, Backend: ComputationBackend,