Skip to main content

SelectorMlecheckProver

Struct SelectorMlecheckProver 

Source
pub struct SelectorMlecheckProver<'alloc, P: PackedField, A: Allocator> { /* private fields */ }
Expand description

A SumcheckProver implementation that proves an mlecheck over many compositions of the form selected * selector + (1 - selector), where selected is the shared large field multilinear and selector is one of the Word::BITS one-bit multilinears of a word list. Unlike other multi mlecheck provers however the evaluation point is not shared but is specified per selector.

Selector b is the multilinear whose i-th value is bit b of word i. The bits stay packed in words until BinarySwitchover folds them, which keeps the selectors’ memory at the size of selected. The need to expand the equality indicator for each selector still results in some blowup.

Implementations§

Source§

impl<'alloc, F: BinaryField, P: PackedField<Scalar = F>, A: Allocator> SelectorMlecheckProver<'alloc, P, A>

Source

pub fn new( alloc: &'alloc A, selected: FieldVec<P, A>, claims: Vec<Claim<F>>, words: &[Word], weights: Vec<F>, ) -> Self

Constructs a prover, given selected being the shared large field multilinear, individual claims per selector, words whose bits are the selectors (missing words read as zero), and weights to combine the per-selector round polynomials into one (one weight per claim).

The prover exposes a single claim — the weights-combination Σ_i weights[i] · C_i of the per-selector claims. Supplying the equality-indicator tensor eq_k(γ, ·) as the weights batches the claims with eq_k(γ, i).

Trait Implementations§

Source§

impl<F, P, A> SumcheckProver<F> for SelectorMlecheckProver<'_, P, A>
where F: BinaryField, P: PackedField<Scalar = F>, A: Allocator,

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§

§

impl<'alloc, P, A> Freeze for SelectorMlecheckProver<'alloc, P, A>
where <A as Allocator>::Vec<P>: Freeze, <A as Allocator>::Vec<Word>: Freeze,

§

impl<'alloc, P, A> RefUnwindSafe for SelectorMlecheckProver<'alloc, P, A>

§

impl<'alloc, P, A> Send for SelectorMlecheckProver<'alloc, P, A>

§

impl<'alloc, P, A> Sync for SelectorMlecheckProver<'alloc, P, A>
where <A as Allocator>::Vec<P>: Sync, <A as Allocator>::Vec<Word>: Sync,

§

impl<'alloc, P, A> Unpin for SelectorMlecheckProver<'alloc, P, A>
where <A as Allocator>::Vec<P>: Unpin, <A as Allocator>::Vec<Word>: Unpin, <P as FieldOps>::Scalar: Unpin, P: Unpin,

§

impl<'alloc, P, A> UnsafeUnpin for SelectorMlecheckProver<'alloc, P, A>
where <A as Allocator>::Vec<P>: UnsafeUnpin, <A as Allocator>::Vec<Word>: UnsafeUnpin,

§

impl<'alloc, P, A> UnwindSafe for SelectorMlecheckProver<'alloc, P, A>

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