pub struct CombinedPolyResolver<F: InnerTransparentField>(/* private fields */);Implementations§
Source§impl<F: InnerTransparentField + FromPrimitiveWithConfig + Send + Sync> CombinedPolyResolver<F>
impl<F: InnerTransparentField + FromPrimitiveWithConfig + Send + Sync> CombinedPolyResolver<F>
Sourcepub 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,
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 toF.num_constraints: The number of constraint polynomials in the UAIRU.num_vars: The number of variables of the trace MLEs.max_degree: The degree of the UAIRU.field_cfg: The random field config.
Sourcepub 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>>
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>>
Finalize the CPR proof after the multi-degree sumcheck completes.
§Parameters
transcript: FS-transcript (absorbsup_evalsanddown_evals).sumcheck_prover_state: The CPR group’sProverStatefromMultiDegreeSumcheck::prove_as_subprotocol(states[0]).ancillary: Produced by [prepare_sumcheck_group]; carries column counts andnum_varsneeded to split the flat eval vector.field_cfg: Field configuration.
Sourcepub 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,
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 fromcombined_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 inU.num_vars: Number of variables of the trace MLEs.projecting_element: The random challenge used to projectF[X] → F.field_cfg: Field configuration.
Sourcepub 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,
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 (absorbsup_evalsanddown_evals).proof: The CPR proof (consumed to produce the subclaim).shared_point: The shared evaluation pointr*from the multi-degree sumcheck.expected_evaluation:md_subclaims.expected_evaluations()[0]— the expected value of the CPR combination function atr*.ancillary: Produced by [prepare_verifier]; carries folding challenge powers, ideal-check evaluation point, andnum_vars.projected_scalars: UAIR scalars projected toF.field_cfg: Field configuration.
Auto Trait Implementations§
impl<F> Freeze for CombinedPolyResolver<F>
impl<F> RefUnwindSafe for CombinedPolyResolver<F>where
F: RefUnwindSafe,
impl<F> Send for CombinedPolyResolver<F>
impl<F> Sync for CombinedPolyResolver<F>
impl<F> Unpin for CombinedPolyResolver<F>where
F: Unpin,
impl<F> UnsafeUnpin for CombinedPolyResolver<F>
impl<F> UnwindSafe for CombinedPolyResolver<F>where
F: 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