Skip to main content

UnivariateRoundProver

Struct UnivariateRoundProver 

Source
pub struct UnivariateRoundProver<F, Data>
where F: BinaryField,
{ /* private fields */ }
Expand description

Prover for the univariate-skip round of the AND constraint reduction.

It computes the round message over the two operand columns, then folds the columns at the verifier’s challenge into the MLE-check summand.

See [binius_verifier::protocols::bitand] for the protocol specification.

The columns are generic over their backing store Data (anything that dereferences to [Word]), so callers can supply pooled buffers (PoolVec) or plain Vec<Word> interchangeably.

Implementations§

Source§

impl<F, Data> UnivariateRoundProver<F, Data>
where F: BinaryField + From<Rijndael8b>, Data: Deref<Target = [Word]>,

Source

pub fn compute_message( log_words: usize, first_col: Data, second_col: Data, big_field_zerocheck_challenges: Vec<F>, prover_message_domain: &BinarySubspace<B8>, ) -> Self

Computes the univariate-skip message over the two operand columns.

The message holds the evaluations of the univariate round polynomial R₀(Z), which encodes the AND constraint across the oblong dimension.

The C operand of the AND constraint A & B ^ C = 0 is not an input. The prover derives it word-by-word as A & B.

§Why deriving C is sound
  • A satisfying witness makes C = A & B hold on every row.
  • Folding is F2-linear on word bits.
  • Equal words therefore fold to equal field elements.
  • So an honest prover emits the exact same transcript as with an explicit C column.
  • A cheating witness is still rejected.
  • The shift reduction later checks the claimed C evaluation against the committed witness.
§Arguments
  • log_words - Base-2 logarithm of the constraint axis’s length
  • first_col - The oblong multilinear polynomial A in the AND constraint A & B ^ C = 0
  • second_col - The oblong multilinear polynomial B in the AND constraint
  • big_field_zerocheck_challenges - Challenges Z_{k+1},…,Zₙ in the large field F
  • prover_message_domain - The domain for evaluating the univariate polynomial

The two columns must have equal length, at most 1 << log_words. A column shorter than the axis has its remaining rows read as zero, in both the round-1 message and the fold; the reduction skips them rather than working over them.

§Implementation Details

This function:

  1. Computes the equality indicator polynomial from the big field challenges
  2. Uses the NTT lookup to efficiently compute the univariate polynomial evaluations
  3. Caches these evaluations for later use in the round_message method
Source

pub const fn round_message(&self) -> &[F; 64]

The message to send: R₀(Z) on the extension domain.

These are exactly ROWS_PER_HYPERCUBE_VERTEX field elements that represent R₀(Z) for Z in the upper half of the univariate domain. compute_message computes them; this method returns the cached result.

Source

pub fn univariate_claim(&self, challenge: F) -> F

The univariate round polynomial at challenge: the claim the multilinear rounds prove.

The polynomial is zero on the base half of the domain, and the round message holds its evaluations on the upper half.

Source

pub fn fold<'alloc, PChallenge: PackedField<Scalar = F>, A: Allocator>( self, alloc: &'alloc A, challenge: F, ) -> impl MleCheckProver<F> + 'alloc

Folds A, B and the derived C = A & B at the univariate challenge.

Returns the MLE-check summand over the ℓ_and constraint variables, at the zerocheck point. Fixing Z to challenge reduces the oblong multilinears to standard multilinears over the remaining variables, and the returned prover proves the sumcheck claim: R₀(z) = ∑_{X₀,…,Xₙ₋₁ ∈ {0,1}} (A(z,X₀,…,Xₙ₋₁)·B(z,X₀,…,Xₙ₋₁) - C(z,X₀,…,Xₙ₋₁))·eq(X₀,…,Xₙ₋₁; r₀,…,rₙ₋₁)

The folded columns are allocated in alloc, which the returned prover borrows.

§Process
  1. Creates a fold lookup table over the univariate domain of the round message
  2. Folds A, B, and the derived C = A & B at Z = challenge, in one fused pass
  3. Combines the zerocheck challenges (small field + big field)
  4. Evaluates the univariate polynomial at the challenge to get the sumcheck claim
  5. Constructs the AND reduction sumcheck prover with the folded multilinears

Auto Trait Implementations§

§

impl<F, Data> Freeze for UnivariateRoundProver<F, Data>
where <F as UnderlierView>::Underlier: Sized, Data: Freeze, F: Freeze,

§

impl<F, Data> RefUnwindSafe for UnivariateRoundProver<F, Data>

§

impl<F, Data> Send for UnivariateRoundProver<F, Data>
where <F as UnderlierView>::Underlier: Sized, Data: Send,

§

impl<F, Data> Sync for UnivariateRoundProver<F, Data>
where <F as UnderlierView>::Underlier: Sized, Data: Sync,

§

impl<F, Data> Unpin for UnivariateRoundProver<F, Data>
where <F as UnderlierView>::Underlier: Sized, Data: Unpin, F: Unpin,

§

impl<F, Data> UnsafeUnpin for UnivariateRoundProver<F, Data>

§

impl<F, Data> UnwindSafe for UnivariateRoundProver<F, Data>

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