Skip to main content

CombinedPolyResolver

Struct CombinedPolyResolver 

Source
pub struct CombinedPolyResolver<F: InnerTransparentField>(/* private fields */);

Implementations§

Source§

impl<F: InnerTransparentField + FromPrimitiveWithConfig + Send + Sync> CombinedPolyResolver<F>

Source

pub fn prepare_sumcheck_group<U>( transcript: &mut impl Transcript, trace_matrix: Vec<DenseMultilinearExtension<F::Inner>>, evaluation_point: &[F], projected_scalars: &HashMap<U::Scalar, F>, num_constraints: usize, num_vars: usize, max_degree: usize, field_cfg: &F::Config, ) -> Result<(MultiDegreeSumcheckGroup<F>, CprProverAncillary), CombinedPolyResolverError<F>>
where F::Inner: ConstTranscribable + Send + Sync + Zero + Default, F::Modulus: ConstTranscribable, F: 'static, U::Scalar: 'static, U: Uair,

Build the CPR sumcheck group for use in the multi-degree sumcheck.

Pre-sumcheck half of the CPR prover. Samples the folding challenge α, builds the MLE vector and combination function with the constraint polynomial identity:

$$ \sum_{b \in H} (f_0(b, x_0[b],…,x_n[b], x_0ˆdown[b],…,x_nˆdown[b]) + \alpha f_1(…) + … + \alpha^k f_k(…)) = v_0 + \alpha * v_1 + … + \alphaˆk * v_k, $$ where $f_i(b, x_0[b],…,x_n[b], x_0ˆdown[b],…,x_nˆdown[b]) = eq(r, b) * (1 - eq(r, 1,…1)) * g_i(x_0[b],…,x_n[b], x_0ˆdown[b],…,x_nˆdown[b])$ and g_i is a constraint polynomial given by the UAIR U. v_0,...,v_k are the claimed evaluations of the combined polynomials.

§Parameters
  • transcript: FS-transcript.
  • trace_matrix: The trace that have been projected to F.
  • evaluation_point: The evaluation point for the claims.
  • projected_scalars: The UAIR scalars projected to F.
  • num_constraints: The number of constraint polynomials in the UAIR U.
  • num_vars: The number of variables of the trace MLEs.
  • max_degree: The degree of the UAIR U.
  • field_cfg: The random field config.
Source

pub fn finalize_prover( transcript: &mut impl Transcript, sumcheck_prover_state: SumcheckProverState<F>, ancillary: CprProverAncillary, field_cfg: &F::Config, ) -> Result<(CprProof<F>, CprProverState<F>), CombinedPolyResolverError<F>>
where F::Inner: ConstTranscribable + Zero, F::Modulus: ConstTranscribable,

Finalize the CPR proof after the multi-degree sumcheck completes.

§Parameters
  • transcript: FS-transcript (absorbs up_evals and down_evals).
  • sumcheck_prover_state: The CPR group’s ProverState from MultiDegreeSumcheck::prove_as_subprotocol (states[0]).
  • ancillary: Produced by [prepare_sumcheck_group]; carries column counts and num_vars needed to split the flat eval vector.
  • field_cfg: Field configuration.
Source

pub fn prepare_verifier<U>( transcript: &mut impl Transcript, proof: &CprProof<F>, claimed_sum: F, ic_check_subclaim: &VerifierSubclaim<F>, num_constraints: usize, num_vars: usize, projecting_element: &F, field_cfg: &F::Config, ) -> Result<CprVerifierAncillary<F>, CombinedPolyResolverError<F>>
where F::Inner: ConstTranscribable, F::Modulus: ConstTranscribable, U: Uair,

Pre-sumcheck half of the CPR verifier.

Must run before [MultiDegreeSumcheck::verify_as_subprotocol] to maintain transcript ordering (samples folding challenge α here).

§Parameters
  • transcript: FS-transcript.
  • proof: The CPR proof (up_evals, down_evals).
  • claimed_sum: The claimed sum from combined_sumcheck.claimed_sums()[0].
  • ic_check_subclaim: Subclaim from the ideal check; provides the evaluation point and claimed values used to verify the sumcheck sum.
  • num_constraints: Number of constraint polynomials in U.
  • num_vars: Number of variables of the trace MLEs.
  • projecting_element: The random challenge used to project F[X] → F.
  • field_cfg: Field configuration.
Source

pub fn finalize_verifier<U>( transcript: &mut impl Transcript, proof: CprProof<F>, shared_point: Vec<F>, expected_evaluation: F, ancillary: CprVerifierAncillary<F>, projected_scalars: &HashMap<U::Scalar, F>, field_cfg: &F::Config, ) -> Result<VerifierSubclaim<F>, CombinedPolyResolverError<F>>
where F::Inner: ConstTranscribable, F::Modulus: ConstTranscribable, U: Uair,

Post-sumcheck half of the CPR verifier.

Runs after [MultiDegreeSumcheck::verify_as_subprotocol] produces the shared evaluation point.

§Parameters
  • transcript: FS-transcript (absorbs up_evals and down_evals).
  • proof: The CPR proof (consumed to produce the subclaim).
  • shared_point: The shared evaluation point r* from the multi-degree sumcheck.
  • expected_evaluation: md_subclaims.expected_evaluations()[0] — the expected value of the CPR combination function at r*.
  • ancillary: Produced by [prepare_verifier]; carries folding challenge powers, ideal-check evaluation point, and num_vars.
  • projected_scalars: UAIR scalars projected to F.
  • field_cfg: Field configuration.

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<F, T> IntoWithConfig<F> for T
where F: PrimeField + FromWithConfig<T>,

§

fn into_with_cfg(self, cfg: &<F as PrimeField>::Config) -> F

§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V