binius_core::poly_commit::batch_pcs

Struct BatchPCS

source
pub struct BatchPCS<P, FE, InnerPCS>
where P: PackedField, FE: ExtensionField<P::Scalar> + TowerField, InnerPCS: PolyCommitScheme<P, FE>,
{ /* private fields */ }
Expand description

A block-box batching scheme for multilinear commitments, as explained in [Section 5.3, DP24].

In particular, the scheme allows us to open the evaluations of a collection of multilinear polynomials at a point $\vec{r}$.

Given a collection of $2^m$ multilinear $n$-variate polynomials $t_u$, jointly commit to them with the following functionality: jointly open the evaluations of the polynomials at a point $\vec{r}=(r_0,\ldots,r_{n-1})$.

Suppose we have a collection of $2^m$ multilinear polynomials $t_u$, each of which is $n$-variate, and we want to prove the evaluations at a point $\vec{r}=(r_0,\ldots ,r_{n-1})$ are $(s_u)$. Build the multilinear, $n+m$-variate polynomial T, whose values on $B_{m+n}$ are given as: $T(v||u) = t_u(v)$, for all u in ${0,1}^m$ and v in ${0,1}^n$. Sample random challenges $\vec{r’}:=(r’0,\ldots,r’{m-1})$. Finally, pass off the evaluation of $T$ at $(r_0,\ldots,r_{n-1}, r’0,\ldots,r’{m-1})$ to the inner polynomial commitment scheme.

If the prover is honest, $T(\vec{r}||\vec{r’})$ is the dot product of the tensor expansion of $\vec{r’}$ with $(s_u)$. Equivalently, it is the evaluation of the multilinear polynomial defined via MLE on the hypercube: $B_m\rightarrow \mathbb F$ by $u\mapsto s_u$ at the point $(r’0,\ldots, r’{m-1})$. Therefore, given the claimed evaluations $(s_u)$, the verifier can compute the desired mixing herself.

§Type parameters

  • P - the packed coefficient subfield
  • FE - an extension field of P::Scalar (used for the inner PCS)
  • Inner - the inner polynomial commitment scheme over the extension field

Implementations§

source§

impl<F, FE, P, Inner> BatchPCS<P, FE, Inner>
where F: Field, P: PackedField<Scalar = F>, FE: ExtensionField<F> + TowerField, Inner: PolyCommitScheme<P, FE>,

source

pub fn new( inner: Inner, n_vars: usize, log_num_polys: usize, ) -> Result<Self, Error>

Trait Implementations§

source§

impl<P, FE, InnerPCS> Debug for BatchPCS<P, FE, InnerPCS>
where P: PackedField + Debug, FE: ExtensionField<P::Scalar> + TowerField + Debug, InnerPCS: PolyCommitScheme<P, FE> + Debug,

source§

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

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

impl<F, FE, P, Inner> PolyCommitScheme<P, FE> for BatchPCS<P, FE, Inner>
where F: Field, P: PackedField<Scalar = F>, FE: ExtensionField<F> + TowerField, Inner: PolyCommitScheme<P, FE>,

source§

type Commitment = <Inner as PolyCommitScheme<P, FE>>::Commitment

source§

type Committed = <Inner as PolyCommitScheme<P, FE>>::Committed

source§

type Proof = Proof<<Inner as PolyCommitScheme<P, FE>>::Proof>

source§

type Error = Error

source§

fn n_vars(&self) -> usize

source§

fn commit<Data>( &self, polys: &[MultilinearExtension<P, Data>], ) -> Result<(Self::Commitment, Self::Committed), Self::Error>
where Data: Deref<Target = [P]> + Send + Sync,

Commit to a batch of polynomials
source§

fn prove_evaluation<Data, Transcript, Backend>( &self, transcript: &mut Transcript, committed: &Self::Committed, polys: &[MultilinearExtension<P, Data>], query: &[FE], backend: &Backend, ) -> Result<Self::Proof, Self::Error>
where Data: Deref<Target = [P]> + Send + Sync, Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanWrite, Backend: ComputationBackend,

Generate an evaluation proof at a random challenge point.
source§

fn verify_evaluation<Transcript, Backend>( &self, transcript: &mut Transcript, commitment: &Self::Commitment, query: &[FE], proof: Self::Proof, values: &[FE], backend: &Backend, ) -> Result<(), Self::Error>
where Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanRead, Backend: ComputationBackend,

Verify an evaluation proof at a random challenge point.
source§

fn proof_size(&self, _n_polys: usize) -> usize

Return the byte-size of a proof.

Auto Trait Implementations§

§

impl<P, FE, InnerPCS> Freeze for BatchPCS<P, FE, InnerPCS>
where <FE as WithUnderlier>::Underlier: Sized, InnerPCS: Freeze,

§

impl<P, FE, InnerPCS> RefUnwindSafe for BatchPCS<P, FE, InnerPCS>

§

impl<P, FE, InnerPCS> Send for BatchPCS<P, FE, InnerPCS>
where <FE as WithUnderlier>::Underlier: Sized, InnerPCS: Send,

§

impl<P, FE, InnerPCS> Sync for BatchPCS<P, FE, InnerPCS>
where <FE as WithUnderlier>::Underlier: Sized, InnerPCS: Sync,

§

impl<P, FE, InnerPCS> Unpin for BatchPCS<P, FE, InnerPCS>
where <FE as WithUnderlier>::Underlier: Sized, InnerPCS: Unpin, P: Unpin, FE: Unpin,

§

impl<P, FE, InnerPCS> UnwindSafe for BatchPCS<P, FE, InnerPCS>
where <FE as WithUnderlier>::Underlier: Sized, InnerPCS: UnwindSafe, P: UnwindSafe, FE: 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