binius_core::protocols::abstract_sumcheck

Trait AbstractSumcheckEvaluator

source
pub trait AbstractSumcheckEvaluator<P: PackedField>: Sync {
    type VertexState;

    // Required methods
    fn n_round_evals(&self) -> usize;
    fn process_vertex(
        &self,
        i: usize,
        vertex_state: Self::VertexState,
        evals_0: &[P],
        evals_1: &[P],
        evals_z: &mut [P],
        round_evals: &mut [P],
    );
    fn round_evals_to_coeffs(
        &self,
        current_round_sum: P::Scalar,
        round_evals: Vec<P::Scalar>,
    ) -> Result<Vec<P::Scalar>, PolynomialError>;
}
Expand description

Represents an object that can evaluate the composition function of a generalized sumcheck.

Generalizes handling of regular sumcheck and zerocheck protocols.

Required Associated Types§

Required Methods§

source

fn n_round_evals(&self) -> usize

The number of points to evaluate at.

source

fn process_vertex( &self, i: usize, vertex_state: Self::VertexState, evals_0: &[P], evals_1: &[P], evals_z: &mut [P], round_evals: &mut [P], )

Process and update the round evaluations with the evaluations at a hypercube vertex.

§Arguments
  • i: index of the hypercube vertex under processing
  • vertex_state: state of the hypercube vertex under processing
  • evals_0: the n multilinear polynomial evaluations at 0
  • evals_1: the n multilinear polynomial evaluations at 1
  • evals_z: a scratch buffer of size n for storing multilinear polynomial evaluations at a point z
  • round_evals: the accumulated evaluations for the round

FIXME: this is incorrect - process_vertex when called on packed slices essentially processes a subcube of size P::WIDTH while taking in a single vertex index and state. It accidentally works on singleton fields. Not fixing due to in-progress move to sumcheck v2.

source

fn round_evals_to_coeffs( &self, current_round_sum: P::Scalar, round_evals: Vec<P::Scalar>, ) -> Result<Vec<P::Scalar>, PolynomialError>

Given evaluations of the round polynomial, interpolate and return monomial coefficients

§Arguments
  • current_round_sum: the claimed sum for the current round
  • round_evals: the computed evaluations of the round polynomial

Implementors§

source§

impl<'a, PW, DomainField, C> AbstractSumcheckEvaluator<PW> for GkrSumcheckLaterRoundEvaluator<'a, PW, DomainField, C>
where DomainField: Field, PW: PackedExtension<DomainField, Scalar: ExtensionField<DomainField>>, C: CompositionPoly<PW>,

source§

impl<'a, PW, DomainField, C, M> AbstractSumcheckEvaluator<PW> for GkrSumcheckFirstRoundEvaluator<'a, PW, DomainField, C, M>
where DomainField: Field, PW: PackedExtension<DomainField, Scalar: ExtensionField<DomainField>>, C: CompositionPoly<PW>, M: MultilinearPoly<PW> + Send + Sync,