Skip to main content

SparseMultiDenseProductSumcheckProver

Struct SparseMultiDenseProductSumcheckProver 

Source
pub struct SparseMultiDenseProductSumcheckProver<P: PackedField> { /* private fields */ }
Expand description

Proves the hypercube sums of one sparse multilinear against several dense ones.

The sparse multilinear is shared, so it is stored once and folded once. That holds however many dense columns ride along.

One prover per column would instead hold a copy of the entry list each. Every copy would then fold each round. Avoiding that is the whole reason this exists.

One round polynomial comes out per column. The batching driver combines a prover’s polynomials exactly as it would separate provers’.

The claim each column carries is its own. So the columns are independent sums that happen to share a factor.

Everything else follows the single-column prover in this module. A test pins the two together at one column.

Implementations§

Source§

impl<P: PackedField> SparseMultiDenseProductSumcheckProver<P>

Source

pub fn new( sparse: Vec<SparseEntry<P::Scalar>>, dense: Vec<FactoredMultilinear<P>>, sums: &[P::Scalar], ) -> Self

Creates a prover for the claim that each sparse-dense product sums to its stated value.

§Arguments
  • sparse - entries of the shared sparse multilinear, in any order, indices repeatable.
  • dense - one dense multilinear per claim, all over the same variables.
  • sums - the claimed sum of each product over the hypercube.
§Panics

Panics if the columns disagree on their variable count.

Panics if there is not one sum per column, or if any entry index is out of range.

Trait Implementations§

Source§

impl<F: Field, P: PackedField<Scalar = F>> SumcheckProver<F> for SparseMultiDenseProductSumcheckProver<P>

Source§

fn n_vars(&self) -> usize

The number of variables in the remaining multivariate polynomial. Read more
Source§

fn execute(&mut self) -> Vec<RoundCoeffs<F>>

Computes the prover messages for this round as a univariate polynomial. Read more
Source§

fn fold(&mut self, challenge: F)

Folds the sumcheck multilinears with a new verifier challenge.
Source§

fn finish(self) -> Vec<F>

Finishes the sumcheck proving protocol and returns the evaluations of all multilinears at the challenge point.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more