hyperplonk/poly-iop/src/lib.rs
poly-iop/src/lib.rsRaw
1use ark_ff::PrimeField;
2use std::marker::PhantomData;
3
4mod errors;
5mod perm_check;
6pub mod prelude;
7mod prod_check;
8mod structs;
9mod sum_check;
10mod utils;
11mod zero_check;
12
13pub use errors::PolyIOPErrors;
14pub use perm_check::{
15 util::{identity_permutation_mle, random_permutation_mle},
16 PermutationCheck,
17};
18pub use prod_check::ProductCheck;
19pub use sum_check::SumCheck;
20pub use utils::*;
21pub use zero_check::ZeroCheck;
22
23#[derive(Clone, Debug, Default, Copy)]
24/// Struct for PolyIOP protocol.
25/// It has an associated type `F` that defines the prime field the multi-variate
26/// polynomial operates on.
27///
28/// An PolyIOP may be instantiated with one of the following:
29/// - SumCheck protocol.
30/// - ZeroCheck protocol.
31/// - PermutationCheck protocol.
32///
33/// Those individual protocol may have similar or identical APIs.
34/// The systematic way to invoke specific protocol is, for example
35/// `<PolyIOP<F> as SumCheck<F>>::prove()`
36pub struct PolyIOP<F: PrimeField> {
37 /// Associated field
38 #[doc(hidden)]
39 phantom: PhantomData<F>,
40}