Skip to main content

FoldTrace

Trait FoldTrace 

Source
pub trait FoldTrace<From, To> {
    const FOLDING_FACTOR: usize;

    // Required method
    fn fold_trace_mle(
        mle: &DenseMultilinearExtension<From>,
    ) -> DenseMultilinearExtension<To>;

    // Provided method
    fn fold_eval_claim<F, A>(
        bar_u_coeffs: &[F],
        alphas: &[A],
        folding_challenges: &[F],
        field_cfg: &F::Config,
    ) -> F
       where F: PrimeField + for<'a> FromWithConfig<&'a A> { ... }
}
Expand description

Fold a trace of one type into a trace of another (similar but smaller) type.

Note that folding will increase number of variables for MLEs by ilog2(Self::FOLDING_FACTOR).

Required Associated Constants§

Source

const FOLDING_FACTOR: usize

Folding factor, a positive power of 2.

Required Methods§

Provided Methods§

Source

fn fold_eval_claim<F, A>( bar_u_coeffs: &[F], alphas: &[A], folding_challenges: &[F], field_cfg: &F::Config, ) -> F
where F: PrimeField + for<'a> FromWithConfig<&'a A>,

Verifier-side: compute one column’s contribution to the folded PCS eval-claim at the extended evaluation point r_0 || gamma_1 || ... || gamma_k, where k = log2(FOLDING_FACTOR).

§Inputs:
  • bar_u_coeffs: the column’s unfolded lifted-eval coefficients in F_q[X], of formal length D. May be shorter than D if trailing zero coefficients were trimmed.
  • alphas: per-poly PCS alphas, of length D / FOLDING_FACTOR, matching the folded entry size.
  • folding_challenges: k field-typed challenges sampled by the verifier, in sampling order (gamma_1 first, gamma_k last).

Returns the value <alphas, bar_u_folded> where bar_u_folded is the column’s lifted-eval polynomial after applying k chained 2x splits and pinning the appended boolean variables to (gamma_1, ..., gamma_k).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Clone> FoldTrace<T, T> for NoopFoldTrace

Source§

impl<const D: usize, const HALF_D: usize> FoldTrace<BinaryU64Poly<D>, BinaryU64Poly<HALF_D>> for FoldBinaryTrace2x<D, HALF_D>

Source§

impl<const D: usize, const HALF_D: usize, const QUARTER_D: usize> FoldTrace<BinaryU64Poly<D>, BinaryU64Poly<QUARTER_D>> for FoldBinaryTrace4x<D, HALF_D, QUARTER_D>