Trait folding::FoldingEnv

source ·
pub trait FoldingEnv<F: Zero + Clone, I, W, Col, Chal, Selector> {
    type Structure;

    // Required methods
    fn new(
        structure: &Self::Structure,
        instances: [&I; 2],
        witnesses: [&W; 2]
    ) -> Self;
    fn challenge(&self, challenge: Chal, side: Side) -> F;
    fn col(&self, col: Col, curr_or_next: CurrOrNext, side: Side) -> &[F];
    fn selector(&self, s: &Selector, side: Side) -> &[F];
}
Expand description

Describe a folding environment. The type parameters are:

  • F: The field of the circuit/computation
  • I: The instance type, i.e the public inputs
  • W: The type of the witness, i.e. the private inputs
  • Col: The type of the column
  • Chal: The type of the challenge
  • Selector: The type of the selector

Required Associated Types§

source

type Structure

Structure which could be storing useful information like selectors, etc.

Required Methods§

source

fn new( structure: &Self::Structure, instances: [&I; 2], witnesses: [&W; 2] ) -> Self

Creates a new environment storing the structure, instances and witnesses.

source

fn challenge(&self, challenge: Chal, side: Side) -> F

Obtains a given challenge from the expanded instance for one side. The challenges are stored inside the instances structs.

source

fn col(&self, col: Col, curr_or_next: CurrOrNext, side: Side) -> &[F]

Returns the evaluations of a given column witness at omega or zeta*omega.

source

fn selector(&self, s: &Selector, side: Side) -> &[F]

similar to Self::col, but folding may ask for a dynamic selector directly instead of just column that happens to be a selector

Implementors§

source§

impl<G, Col, Chall, Sel, Str, I, W> FoldingEnv<<G as AffineRepr>::ScalarField, I, W, Col, Chall, Sel> for Env<G, Col, Chall, Sel, Str, I, W>where G: CommitmentCurve, I: Instance<G> + Index<Chall, Output = G::ScalarField> + Clone, W: Witness<G> + Clone + Index<Col, Output = [G::ScalarField]> + Index<Sel, Output = [G::ScalarField]>, Col: FoldingColumnTrait + Eq + Hash, Sel: Copy, Str: Clone + Index<Col, Output = [G::ScalarField]>,

§

type Structure = Str