Skip to main content

FoldAlphabet

Trait FoldAlphabet 

Source
pub trait FoldAlphabet<EF: TowerLevel>: TowerLevel {
    // Required method
    fn fold_rounds(codeword: &[Self], challenges: &[EF]) -> Vec<EF>;
}
Expand description

A codeword alphabet, together with the field its folds are challenged from.

§Overview

One implementation names one route, and the set of them is this crate’s route table:

    challenge field has a packed route   ->  that route, symbols widened on the way in
    challenge field has none             ->  one widening fold, then that field's route

Adding a challenge level is one implementation per alphabet it admits. Nothing else in this crate names a field.

§Panics

Every implementation panics unless there is at least one challenge. A fold with no round would leave every output slot at zero rather than fail.

Required Methods§

Source

fn fold_rounds(codeword: &[Self], challenges: &[EF]) -> Vec<EF>

Fold one round per challenge, halving the codeword each time.

challenges stays in the order the sumcheck drew it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FoldAlphabet<BinaryField64> for BinaryField8

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField64], ) -> Vec<BinaryField64>

Source§

impl FoldAlphabet<BinaryField64> for BinaryField16

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField64], ) -> Vec<BinaryField64>

Source§

impl FoldAlphabet<BinaryField64> for BinaryField32

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField64], ) -> Vec<BinaryField64>

Source§

impl FoldAlphabet<BinaryField64> for BinaryField64

Source§

fn fold_rounds(codeword: &[Self], challenges: &[Self]) -> Vec<Self>

Source§

impl FoldAlphabet<BinaryField128> for BinaryField8

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField128], ) -> Vec<BinaryField128>

Source§

impl FoldAlphabet<BinaryField128> for BinaryField16

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField128], ) -> Vec<BinaryField128>

Source§

impl FoldAlphabet<BinaryField128> for BinaryField32

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField128], ) -> Vec<BinaryField128>

Source§

impl FoldAlphabet<BinaryField128> for BinaryField64

Source§

fn fold_rounds( codeword: &[Self], challenges: &[BinaryField128], ) -> Vec<BinaryField128>

Source§

impl FoldAlphabet<BinaryField128> for BinaryField128

Source§

fn fold_rounds(codeword: &[Self], challenges: &[Self]) -> Vec<Self>

Implementors§