Skip to main content

BooleanityChecker

Struct BooleanityChecker 

Source
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,

Source

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.

Source

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.

Source

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.

Source

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.

Source

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§

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.

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, 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.