pub struct IdealCheckProtocol<U: Uair>(/* private fields */);Expand description
Ideal-check subprotocol.
The evaluation point $r \in F^\mu$ at which the combined polynomial MLEs are pinned down is supplied by the caller rather than squeezed from the transcript inside this subprotocol:
The protocol layer samples a single shared integer vector $r \in [0, q^*)^\mu$ once and projects it into each family’s field, so all $n + 1$ families re-use the same underlying integers (just typed in their respective fields).
Implementations§
Source§impl<U: Uair> IdealCheckProtocol<U>
impl<U: Uair> IdealCheckProtocol<U>
Sourcepub fn prove_mle_first<C, const DEGREE_PLUS_ONE: usize>(
transcript: &mut impl Transcript,
trace_matrix: &ColumnMajorTrace<C::Element>,
projected_scalars: &ProjectedScalars<U::Scalar, DynamicPolynomial<C::Element>>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
field_cfg: &C,
) -> Result<Proof<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
pub fn prove_mle_first<C, const DEGREE_PLUS_ONE: usize>(
transcript: &mut impl Transcript,
trace_matrix: &ColumnMajorTrace<C::Element>,
projected_scalars: &ProjectedScalars<U::Scalar, DynamicPolynomial<C::Element>>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
field_cfg: &C,
) -> Result<Proof<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
Prover using MLE-first evaluation (column-indexed trace).
Routes each constraint through the most efficient evaluation path:
- Linear constraints with non-zero ideals are batched through
[
evaluate_combined_polynomials], which evaluates trace column MLEs at the challenge point and then applies the constraints to the evaluated values. - Non-linear constraints with non-zero ideals fall back to the row-major
[
evaluate_for_constraints] path; the trace is transposed on demand viacolumn_major_to_row_major. - Constraints with zero ideals are short-circuited to zero (their combined polynomial value is zero by construction for an honest prover).
For $F_{q_i}[X]$ constraints, trace_matrix and projected_scalars
must already be projected mod $q_i$.
§Parameters
transcript: the Fiat-Shamir transcript.trace_matrix: input trace for the UAIRUprojected toDynamicPolynomialF<F>, column-indexed:trace_matrix[col][row].projected_scalars: UAIR scalars projected toDynamicPolynomialF<F>.family_idx: which constraint family to prove.0-> $Q[X]$;i >= 1-> $F_{q_{i-1}}[X]$ (i.e. UAIR-levelprime_idx = i - 1).num_constraints: number of constraints this UAIR encodes.evaluation_point: pre-sampled MLE evaluation point, shared for all families of constraints ($Q[X]$ and $F_q[X]$).field_cfg: random field configuration sampled on the previous steps of the overall protocol.
Sourcepub fn prove_combined<C, const DEGREE_PLUS_ONE: usize>(
transcript: &mut impl Transcript,
trace_matrix: &RowMajorTrace<C::Element>,
projected_scalars: &ProjectedScalars<U::Scalar, DynamicPolynomial<C::Element>>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
field_cfg: &C,
) -> Result<Proof<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
pub fn prove_combined<C, const DEGREE_PLUS_ONE: usize>(
transcript: &mut impl Transcript,
trace_matrix: &RowMajorTrace<C::Element>,
projected_scalars: &ProjectedScalars<U::Scalar, DynamicPolynomial<C::Element>>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
field_cfg: &C,
) -> Result<Proof<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
Prover for any UAIR using combined polynomial construction.
Uses row-indexed (transposed) trace for efficient row-by-row combined polynomial construction.
For $F_{q_i}[X]$ constraints, trace_matrix and projected_scalars
must already be projected mod $q_i$.
§Parameters
transcript: the Fiat-Shamir transcript.trace_matrix: input trace for the UAIRUprojected toDynamicPolynomialF<F>, row-indexed:trace_matrix[row][col].projected_scalars: UAIR scalars projected toDynamicPolynomialF<F>.family_idx: which constraint family to prove.0-> $Q[X]$;i >= 1-> $F_{q_{i-1}}[X]$.num_constraints: number of constraints this UAIR encodes.evaluation_point: pre-sampled MLE evaluation point, shared for all families of constraints ($Q[X]$ and $F_q[X]$).field_cfg: random field configuration sampled on the previous steps of the overall protocol.
Sourcepub fn verify_as_subprotocol<'cfg, C, IdealOverF, IdealOverFFromRef, IdealOverFFromFqRef>(
transcript: &mut impl Transcript,
proof: Proof<C::Element>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
ideal_over_f_from_ref: IdealOverFFromRef,
ideal_over_f_from_fq_ref: IdealOverFFromFqRef,
field_cfg: &'cfg C,
) -> Result<VerifierSubclaim<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig,
C::Integer: ConstTranscribable,
IdealOverF: Ideal + IdealCheck<DynamicPolynomialConfig<'cfg, C>>,
IdealOverFFromRef: Fn(&IdealOrZero<U::Ideal>) -> IdealOverF,
IdealOverFFromFqRef: Fn(&IdealOrZero<U::FqIdeal>) -> IdealOverF,
pub fn verify_as_subprotocol<'cfg, C, IdealOverF, IdealOverFFromRef, IdealOverFFromFqRef>(
transcript: &mut impl Transcript,
proof: Proof<C::Element>,
family_idx: usize,
num_constraints: usize,
evaluation_point: &[C::Element],
ideal_over_f_from_ref: IdealOverFFromRef,
ideal_over_f_from_fq_ref: IdealOverFFromFqRef,
field_cfg: &'cfg C,
) -> Result<VerifierSubclaim<C::Element>, IdealCheckError<C::Element>>where
C: BaseFieldConfig,
C::Integer: ConstTranscribable,
IdealOverF: Ideal + IdealCheck<DynamicPolynomialConfig<'cfg, C>>,
IdealOverFFromRef: Fn(&IdealOrZero<U::Ideal>) -> IdealOverF,
IdealOverFFromFqRef: Fn(&IdealOrZero<U::FqIdeal>) -> IdealOverF,
The verifier part of the ideal-check subprotocol.
Mirrors the prover: receives the prover’s combined_mle_values,
absorbs them into the transcript, then checks each non-trivial
constraint’s value against the corresponding lifted ideal.
§Parameters
transcript: the Fiat-Shamir transcript.proof: a purported proof produced by the prover.family_idx: which constraint family to verify.0-> $Q[X]$;i >= 1-> $F_{q_{i-1}}[X]$.num_constraints: the number of constraints the UAIRUencodes.evaluation_point: pre-sampled MLE evaluation point matching the one used by the prover. The caller is responsible for ensuring transcript ordering matches the prover.ideal_over_f_from_ref: since the UAIRUis not aware of the field the ideal check is operating on it defines ideals over the ringIcTypes::Witness.ideal_over_f_from_refallows to convert the ideals overIcTypes::Witnessinto ideals over the fieldIcTypes::F. Think of this as a projection for ideals.field_cfg: random field configuration sampled on the previous steps of the overall protocol.
Trait Implementations§
Source§impl<U: Clone + Uair> Clone for IdealCheckProtocol<U>
impl<U: Clone + Uair> Clone for IdealCheckProtocol<U>
Source§fn clone(&self) -> IdealCheckProtocol<U>
fn clone(&self) -> IdealCheckProtocol<U>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<U: Default + Uair> Default for IdealCheckProtocol<U>
impl<U: Default + Uair> Default for IdealCheckProtocol<U>
Source§fn default() -> IdealCheckProtocol<U>
fn default() -> IdealCheckProtocol<U>
impl<U: Copy + Uair> Copy for IdealCheckProtocol<U>
Auto Trait Implementations§
impl<U> Freeze for IdealCheckProtocol<U>
impl<U> RefUnwindSafe for IdealCheckProtocol<U>where
U: RefUnwindSafe,
impl<U> Send for IdealCheckProtocol<U>where
U: Send,
impl<U> Sync for IdealCheckProtocol<U>where
U: Sync,
impl<U> Unpin for IdealCheckProtocol<U>where
U: Unpin,
impl<U> UnsafeUnpin for IdealCheckProtocol<U>
impl<U> UnwindSafe for IdealCheckProtocol<U>where
U: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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