Skip to main content

slop_sumcheck/
proof.rs

1use serde::{Deserialize, Serialize};
2use slop_algebra::{AbstractField, UnivariatePolynomial};
3use slop_multilinear::Point;
4
5/// A sumchexckl proof that does not include the evaluation proofs.
6///
7/// Verifying a partial sumcheck proof is equivalent to verifying the sumcheck claim on the
8/// condition of having evaluation proofs for the given componment polynomials at the given points.
9#[derive(Serialize, Deserialize, Debug, Clone)]
10pub struct PartialSumcheckProof<K> {
11    pub univariate_polys: Vec<UnivariatePolynomial<K>>,
12    pub claimed_sum: K,
13    pub point_and_eval: (Point<K>, K),
14}
15
16impl<K: AbstractField> PartialSumcheckProof<K> {
17    /// Creates a dummy sumcheck proof with the given number of variables and degree.
18    ///
19    /// NOTE: ONLY USE THIS FOR TESTING AND MOCK PROOF CREATION.
20    #[must_use]
21    pub fn dummy() -> Self {
22        Self {
23            univariate_polys: Vec::new(),
24            claimed_sum: K::zero(),
25            point_and_eval: (Point::<K>::from_usize(0, 0), K::zero()),
26        }
27    }
28}