pub struct BooleanityChecker<C: SemiringConfig>(/* private fields */);Expand description
Booleanity sumcheck group constructor / verifier.
Implementations§
Source§impl<C> BooleanityChecker<C>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig + 'static,
C::Integer: ConstTranscribable,
impl<C> BooleanityChecker<C>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig + 'static,
C::Integer: ConstTranscribable,
Sourcepub fn prepare_sumcheck_group<const D: usize>(
transcript: &mut impl Transcript,
trace_bin_poly: &[DenseMultilinearExtension<BinaryPoly<D>>],
num_vars: usize,
field_cfg: &C,
) -> Result<(MultiDegreeSumcheckGroup<C>, BoolProverAncillary), BooleanityError<C::Element>>
pub fn prepare_sumcheck_group<const D: usize>( transcript: &mut impl Transcript, trace_bin_poly: &[DenseMultilinearExtension<BinaryPoly<D>>], num_vars: usize, field_cfg: &C, ) -> Result<(MultiDegreeSumcheckGroup<C>, BoolProverAncillary), BooleanityError<C::Element>>
Build the booleanity sumcheck group, to be appended to the multi-degree sumcheck.
Installs a [BooleanityRound1FastPath] hook on the returned group:
the round-1 polynomial and the post-round-1 MLE fold are computed
in closed form directly from the BinaryPoly-typed trace columns
(no full-size F-valued bit-slice MLEs are ever materialized).
Verifier doesn’t see a difference.
Sourcepub fn prepare_affine_virtual_sumcheck_group<const D: usize>(
transcript: &mut impl Transcript,
all_trace_bin_poly: &[DenseMultilinearExtension<BinaryPoly<D>>],
affine_virtual_specs: &[AffineVirtualSpec],
num_vars: usize,
field_cfg: &C,
) -> Result<(MultiDegreeSumcheckGroup<C>, BoolProverAncillary), BooleanityError<C::Element>>
pub fn prepare_affine_virtual_sumcheck_group<const D: usize>( transcript: &mut impl Transcript, all_trace_bin_poly: &[DenseMultilinearExtension<BinaryPoly<D>>], affine_virtual_specs: &[AffineVirtualSpec], num_vars: usize, field_cfg: &C, ) -> Result<(MultiDegreeSumcheckGroup<C>, BoolProverAncillary), BooleanityError<C::Element>>
Build a generic booleanity sumcheck group for affine virtual targets.
Unlike Self::prepare_sumcheck_group, this path does not install the
BinaryPoly round-1 fast path: affine residual cells may be non-binary
field values before the booleanity relation is enforced. The trace
slice must contain all binary-polynomial columns in public-then-witness
order so that affine source indices match the UAIR layout.
Sourcepub fn finalize_prover(
transcript: &mut impl Transcript,
sumcheck_prover_state: SumcheckProverState<C>,
ancillary: BoolProverAncillary,
field_cfg: &C,
) -> Result<BooleanityProof<C::Element>, BooleanityError<C::Element>>
pub fn finalize_prover( transcript: &mut impl Transcript, sumcheck_prover_state: SumcheckProverState<C>, ancillary: BoolProverAncillary, field_cfg: &C, ) -> Result<BooleanityProof<C::Element>, BooleanityError<C::Element>>
Finalize the booleanity proof after the multi-degree sumcheck completes.
Mirrors the structure of CombinedPolyResolver::finalize_prover:
evaluates each bit-slice MLE at the final sumcheck challenge,
emits the flat bit_slice_evals vector, and absorbs it into the
transcript.
Sourcepub fn prepare_verifier(
transcript: &mut impl Transcript,
claimed_sum: &C::Element,
num_wit_bin_cols: usize,
bit_width: usize,
num_vars: usize,
field_cfg: &C,
) -> Result<BoolVerifierAncillary<C::Element>, BooleanityError<C::Element>>
pub fn prepare_verifier( transcript: &mut impl Transcript, claimed_sum: &C::Element, num_wit_bin_cols: usize, bit_width: usize, num_vars: usize, field_cfg: &C, ) -> Result<BoolVerifierAncillary<C::Element>, BooleanityError<C::Element>>
Pre-sumcheck half of the booleanity verifier.
Must run after the CPR prepare_verifier and before
MultiDegreeSumcheck::verify_as_subprotocol to maintain transcript
ordering.
Sourcepub fn finalize_verifier(
transcript: &mut impl Transcript,
proof: BooleanityProof<C::Element>,
shared_point: Vec<C::Element>,
expected_eval: &C::Element,
ancillary: BoolVerifierAncillary<C::Element>,
field_cfg: &C,
) -> Result<BoolVerifierSubclaim<C::Element>, BooleanityError<C::Element>>
pub fn finalize_verifier( transcript: &mut impl Transcript, proof: BooleanityProof<C::Element>, shared_point: Vec<C::Element>, expected_eval: &C::Element, ancillary: BoolVerifierAncillary<C::Element>, field_cfg: &C, ) -> Result<BoolVerifierSubclaim<C::Element>, BooleanityError<C::Element>>
Post-sumcheck half of the booleanity verifier.
Validates the length of bit_slice_evals, recomputes the
booleanity residue at the shared sumcheck point $r^\star$, and
compares it against the sumcheck’s expected_eval. On success,
absorbs bit_slice_evals into the transcript.
The bit-decomposition consistency at $r^\star$ is not checked
here; the protocol layer squeezes $\alpha’$ and appends an extra
multipoint-eval column (and up-eval $c’_j$) per witness
binary-poly column derived from bit_slice_evals — see the
module-level docs.
Auto Trait Implementations§
impl<C> Freeze for BooleanityChecker<C>
impl<C> RefUnwindSafe for BooleanityChecker<C>where
C: RefUnwindSafe,
impl<C> Send for BooleanityChecker<C>
impl<C> Sync for BooleanityChecker<C>
impl<C> Unpin for BooleanityChecker<C>where
C: Unpin,
impl<C> UnsafeUnpin for BooleanityChecker<C>
impl<C> UnwindSafe for BooleanityChecker<C>where
C: UnwindSafe,
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
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