Struct ZerocheckProverImpl

Source
pub struct ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where FDomain: Field, FBase: Field, P: PackedExtension<FBase>, Backend: ComputationBackend,
{ /* private fields */ }
Expand description

Small-field aware zerocheck prover.

This is a state machine satisfying the contract of ZerocheckProver trait. Object safety of the latter allows batching several zerocheck provers over different base fields together.

Full zerocheck reduction is laid out in the batch_verify_zerocheck. This struct implements the univariate round, witness folding and prover construction for multilinear rounds, and witness projection for the univariatizing reduction.

Implementations§

Source§

impl<'a, F, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where F: TowerField, FDomain: Field, FBase: ExtensionField<FDomain>, P: PackedField<Scalar = F> + PackedExtension<F, PackedSubfield = P> + PackedExtension<FBase> + PackedExtension<FDomain>, CompositionBase: CompositionPoly<<P as PackedExtension<FBase>>::PackedSubfield>, Composition: CompositionPoly<P> + 'a, M: MultilinearPoly<P> + Send + Sync + 'a, DomainFactory: EvaluationDomainFactory<FDomain>, Backend: ComputationBackend,

Source

pub fn new( multilinears: Vec<M>, zero_claims: impl IntoIterator<Item = (String, CompositionBase, Composition)>, zerocheck_challenges: &[F], domain_factory: DomainFactory, backend: &'a Backend, ) -> Result<Self, Error>

Trait Implementations§

Source§

impl<'a, FDomain, FBase, P, CompositionBase: Debug, Composition: Debug, M: Debug, DomainFactory: Debug, Backend> Debug for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where FDomain: Field + Debug, FBase: Field + Debug, P: PackedExtension<FBase> + Debug, Backend: ComputationBackend + Debug, P::Scalar: Debug, P::PackedSubfield: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, F, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> ZerocheckProver<'a, P> for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where F: TowerField, FDomain: TowerField, FBase: ExtensionField<FDomain>, P: PackedField<Scalar = F> + PackedExtension<F, PackedSubfield = P> + PackedExtension<FBase> + PackedExtension<FDomain>, CompositionBase: CompositionPoly<PackedSubfield<P, FBase>> + 'static, Composition: CompositionPoly<P> + 'static, M: MultilinearPoly<P> + Send + Sync + 'a, DomainFactory: EvaluationDomainFactory<FDomain>, Backend: ComputationBackend,

Source§

fn n_vars(&self) -> usize

The number of variables in the multivariate polynomial.
Source§

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

Maximal required Lagrange domain size among compositions in this prover. Read more
Source§

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

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

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

Folds into a regular multilinear prover for the remaining rounds.
Source§

fn project_to_skipped_variables( self: Box<Self>, challenges: &[F], ) -> Result<Vec<Arc<dyn MultilinearPoly<P> + Send + Sync>>, Error>

Projects witness onto the “skipped” variables for the univariatizing reduction.

Auto Trait Implementations§

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> Freeze for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: Freeze, <Backend as ComputationBackend>::Vec<P>: Freeze,

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> RefUnwindSafe for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized + RefUnwindSafe, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: RefUnwindSafe, Backend: RefUnwindSafe, FBase: RefUnwindSafe, FDomain: RefUnwindSafe, <Backend as ComputationBackend>::Vec<P>: RefUnwindSafe, M: RefUnwindSafe, CompositionBase: RefUnwindSafe, Composition: RefUnwindSafe, P: RefUnwindSafe, <P as PackedExtension<FBase>>::PackedSubfield: RefUnwindSafe,

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> Send for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: Send, M: Send, CompositionBase: Send, Composition: Send,

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> Sync for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: Sync, M: Sync, CompositionBase: Sync, Composition: Sync,

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> Unpin for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized + Unpin, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: Unpin, FBase: Unpin, FDomain: Unpin, <Backend as ComputationBackend>::Vec<P>: Unpin, M: Unpin, CompositionBase: Unpin, Composition: Unpin, P: Unpin, <P as PackedExtension<FBase>>::PackedSubfield: Unpin,

§

impl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend> UnwindSafe for ZerocheckProverImpl<'a, FDomain, FBase, P, CompositionBase, Composition, M, DomainFactory, Backend>
where <P as PackedField>::Scalar: Sized + UnwindSafe, <<P as PackedField>::Scalar as WithUnderlier>::Underlier: Sized, <FBase as WithUnderlier>::Underlier: Sized, <FDomain as WithUnderlier>::Underlier: Sized, DomainFactory: UnwindSafe, Backend: RefUnwindSafe, FBase: UnwindSafe, FDomain: UnwindSafe, <Backend as ComputationBackend>::Vec<P>: UnwindSafe, M: UnwindSafe, CompositionBase: UnwindSafe, Composition: UnwindSafe, P: UnwindSafe, <P as PackedExtension<FBase>>::PackedSubfield: UnwindSafe,

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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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