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>
impl<F, Data> UnivariateRoundProver<F, Data>
Sourcepub fn compute_message(
log_words: usize,
first_col: Data,
second_col: Data,
big_field_zerocheck_challenges: Vec<F>,
prover_message_domain: &BinarySubspace<B8>,
) -> Self
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 & Bhold 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 lengthfirst_col- The oblong multilinear polynomial A in the AND constraint A & B ^ C = 0second_col- The oblong multilinear polynomial B in the AND constraintbig_field_zerocheck_challenges- Challenges Z_{k+1},…,Zₙ in the large fieldFprover_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:
- Computes the equality indicator polynomial from the big field challenges
- Uses the NTT lookup to efficiently compute the univariate polynomial evaluations
- Caches these evaluations for later use in the
round_messagemethod
Sourcepub const fn round_message(&self) -> &[F; 64]
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.
Sourcepub fn univariate_claim(&self, challenge: F) -> F
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.
Sourcepub fn fold<'alloc, PChallenge: PackedField<Scalar = F>, A: Allocator>(
self,
alloc: &'alloc A,
challenge: F,
) -> impl MleCheckProver<F> + 'alloc
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
- Creates a fold lookup table over the univariate domain of the round message
- Folds A, B, and the derived C = A & B at Z = challenge, in one fused pass
- Combines the zerocheck challenges (small field + big field)
- Evaluates the univariate polynomial at the challenge to get the sumcheck claim
- Constructs the AND reduction sumcheck prover with the folded multilinears
Auto Trait Implementations§
impl<F, Data> Freeze for UnivariateRoundProver<F, Data>
impl<F, Data> RefUnwindSafe for UnivariateRoundProver<F, Data>
impl<F, Data> Send for UnivariateRoundProver<F, Data>
impl<F, Data> Sync for UnivariateRoundProver<F, Data>
impl<F, Data> Unpin for UnivariateRoundProver<F, Data>
impl<F, Data> UnsafeUnpin for UnivariateRoundProver<F, Data>
impl<F, Data> UnwindSafe for UnivariateRoundProver<F, Data>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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