Documentation

CslibFrontier.Computability.Complexity.Classes.MIP.SumcheckProof

Static coefficient tables for sumcheck #

A row contains the prover's round polynomial at a public challenge history. The row key includes the external challenges and the challenges in earlier sumcheck rounds. All coefficients are fixed before the next challenge, including for dishonest bit tables.

Main definitions #

Main results #

The address of one coefficient in a prefix-indexed sumcheck table.

  • external : List ℕ

    External challenges fixing the sumcheck instance.

  • challenges : List ℕ

    Challenges disclosed in earlier rounds.

  • exponent : ℕ

    Exponent of this coefficient.

theorem Cslib.Complexity.MIP.SumcheckProof.encAddress_exponent_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Address} :

The framed list of external binary residues, the framed list of earlier binary challenges, and the binary exponent, in that order.

theorem Cslib.Complexity.MIP.SumcheckProof.encAddress_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List ℕ} {T0 S0 : γ → ℕ} {x1 : γ → List ℕ} {T1 S1 x2 T2 S2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn Turing.MultiTapeTM.encNat T2 S2) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { external := x0 x, challenges := x1 x, exponent := x2 x }) encIn encAddress (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
theorem Cslib.Complexity.MIP.SumcheckProof.encAddress_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 x1 : γ → List ℕ} {x2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat) budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn Turing.MultiTapeTM.encNat budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { external := x0 x, challenges := x1 x, exponent := x2 x }) encIn encAddress budget
theorem Cslib.Complexity.MIP.SumcheckProof.encAddress_mk_deg :
Turing.MultiTapeTM.ComputableInDegree (fun (p : List ℕ × List ℕ × ℕ) => { external := p.1, challenges := p.2.1, exponent := p.2.2 }) encAddressFields encAddress 1 1
@[reducible, inline]

The tuple of the fields of encAddress.

theorem Cslib.Complexity.MIP.SumcheckProof.encAddress_external_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Address} :

Sumcheck coefficient keys have tag 110 followed by the framed binary address.

Read the coefficients of the next polynomial, from its constant coefficient through degree d inclusive.

def Cslib.Complexity.MIP.SumcheckProof.row (π : List Bool → Bool) (external challenges : List ℕ) (d width : ℕ) :

Values in a row of a bit table, indexed just by the public history and exponent.

A strict oracle-PPT verifier can read the row if it computes the public challenge lists and the unary degree and bit-width bounds in polynomial time.

theorem Cslib.Complexity.MIP.SumcheckProof.run_readRow (π : List Bool → Bool) (external challenges : List ℕ) (d width : ℕ) :
(Prover.ofProof π).run (readRow external challenges d width) () = PMF.pure (row π external challenges d width, ())

The row lookup is deterministic under a fixed static proof.

noncomputable def Cslib.Complexity.MIP.SumcheckProof.rowPolynomial (π : List Bool → Bool) (p : ℕ) (external challenges : List ℕ) (d width : ℕ) :

The polynomial over the residue ring obtained from this public history.

theorem Cslib.Complexity.MIP.SumcheckProof.natDegree_rowPolynomial_le (π : List Bool → Bool) (p : ℕ) (external challenges : List ℕ) (d width : ℕ) :
(rowPolynomial π p external challenges d width).natDegree ≤ d

Even a dishonest proof's polynomial has degree at most the requested degree.

Read the polynomial for the current public history and advance at the given challenge. The row address depends only on the earlier challenges.

theorem Cslib.Complexity.MIP.SumcheckProof.run_advance (π : List Bool → Bool) (p : ℕ) (ext : List ℕ) (d width r : ℕ) (s : Interactive.Sumcheck.WordState) :
(Prover.ofProof π).run (advance p ext d width r s) () = PMF.pure (s.advance p (row π ext s.challenges d width) r, ())

The round under a fixed proof performs exactly the update for its stored coefficients.

noncomputable def Cslib.Complexity.MIP.SumcheckProof.extendTable {p : ℕ} (F : List ℕ → List ℕ → Polynomial (ZMod p)) (other : List Bool → ℕ) :

Extend a natural-valued table on all other proof keys with coefficient rows.

The extension stores the coefficients of its designated row.

theorem Cslib.Complexity.MIP.SumcheckProof.extendTable_of_tag_ne {p : ℕ} (F : List ℕ → List ℕ → Polynomial (ZMod p)) (other : List Bool → ℕ) {q : List Bool} (hq : List.take 3 q ≠ [true, true, false]) :
extendTable F other q = other q

Queries outside the sumcheck tag access the supplied background table.

theorem Cslib.Complexity.MIP.SumcheckProof.rowPolynomial_eq {p : ℕ} [NeZero p] (F : List ℕ → List ℕ → Polynomial (ZMod p)) (other : List Bool → ℕ) (π : List Bool → Bool) (external challenges : List ℕ) (d width : ℕ) (hπ : ∀ (key : List Bool), ProofWord.value π key width = extendTable F other key % 2 ^ width) (hp : p ≤ 2 ^ width) (hd : (F external challenges).natDegree ≤ d) :
rowPolynomial π p external challenges d width = F external challenges

Reconstruct a row of an honest table whenever the modulus fits the word width and the requested degree covers the polynomial. The proof may serve all rows and other kinds of keys.

theorem Cslib.Complexity.MIP.SumcheckProof.exists_proof_roundPoly {n p d : ℕ} [Fact (Nat.Prime p)] (P : List ℕ → MvPolynomial (Fin n) (ZMod p)) (other : List Bool → ℕ) (hP : ∀ (external : List ℕ) (j : Fin n), MvPolynomial.degreeOf j (P external) ≤ d) :
∃ (π : List Bool → Bool), (∀ (external challenges : List ℕ) (width : ℕ), challenges.length < n → p ≤ 2 ^ width → rowPolynomial π p external challenges d width = Interactive.Sumcheck.roundPoly (P external) fun (j : Fin challenges.length) => ↑(challenges.get j)) ∧ ∀ (key : List Bool) (width : ℕ), List.take 3 key ≠ [true, true, false] → ProofWord.value π key width = other key % 2 ^ width

One static proof realizes the honest sumcheck polynomial for every external challenge, every valid prefix and every sufficiently large access width. Its values outside the sumcheck tag are the low bits of the prescribed background table.