Documentation

ArkLib.ProofSystem.Sumcheck.Basic

The Sum-check Protocol #

We define the sum-check protocol as a series of Interactive Oracle Reductions (IORs), where the underlying polynomials are represented using Mathlib's noncomputable types Polynomial and MvPolynomial. See SingleRound.lean for a single round of the protocol, and the definition of the sum-check relations.

In the future, we will have files that deal with implementations of the protocol, and we will prove that those implementations derive security from that of the abstract protocol.

Protocol Specification #

The sum-check protocol is parameterized by the following:

The sum-check relation has no witness. The statement for the i-th round, where i : Fin (n + 2), contains:

There is a single oracle statement, which is:

The sum-check relation for the i-th round checks that:

∑ x ∈ (univ.map D) ^ᶠ (n + 1 - i), poly ⸨challenges, x⸩ = target.

Note that the last statement (when i = n) is the output statement of the sum-check protocol.

For i = 0, ..., n, the i-th round of the sum-check protocol consists of the following:

  1. The prover sends a univariate polynomial pᵢ ∈ R⦃≤ deg⦄[X] of degree at most deg. If the prover is honest, then we have:

    pᵢ(X) = ∑ x ∈ (univ.map D) ^ᶠ (n - i), poly ⸨X ⦃i⦄, challenges, x⸩.

Here, poly ⸨X ⦃i⦄, challenges, x⸩ is the polynomial poly evaluated at the concatenation of the prior challenges challenges, the i-th variable as the new indeterminate X, and the rest of the values x ∈ (univ.map D) ^ᶠ (n - i).

In the oracle protocol, this polynomial pᵢ is turned into an oracle for which the verifier can query for evaluations at arbitrary points.

  1. The verifier then sends the i-th challenge rᵢ sampled uniformly at random from R.

  2. The (oracle) verifier then performs queries for the evaluations of pᵢ at all points in (univ.map D), and checks that: ∑ x in (univ.map D), pᵢ.eval x = target.

    If the check fails, then the verifier outputs failure.

    Otherwise, it outputs a statement for the next round as follows:

    • target is updated to pᵢ.eval rᵢ
    • challenges is updated to the concatenation of the previous challenges and rᵢ

Notes & TODOs #

An annoying issue is that we need to index over i : Fin (n + 2), not i : Fin (n + 1). This is because existing Fin functions works better with n + 1 which is clearly positive, and not i : Fin (n + 1) (which would imply n > 0, but this fact is not apparent).

Note that to represent sum-check as a series of IORs, we will need to implicitly constrain the degree of the polynomials via using subtypes, such as Polynomial.degreeLE and MvPolynomial.degreeOf. This is because the oracle verifier only gets oracle access to evaluating the polynomials, but does not see the polynomials in the clear.

When this is compiled to an interactive proof, the corresponding polynomial commitment schemes will enforce that the declared degree bound holds, via letting the (non-oracle) verifier perform explicit degree checks.

There are some generalizations that we could consider later:

References #

[JACM:LFKN92]

[C:BooChiSot21]

def Sumcheck.Spec.pSpec (R : Type) [CommSemiring R] (d n : ) :
ProtocolSpec ((n + 1) * 2)
Equations
Instances For
    Equations
    Equations
    Instances For
      @[reducible]
      def Sumcheck.Spec.OStmtIn (R : Type) [CommSemiring R] (d n : ) :
      Equations
      Instances For
        Equations
        Instances For
          @[reducible]
          Equations
          Instances For
            def Sumcheck.Spec.relIn (R : Type) [CommSemiring R] (d : ) {m : } (D : Fin m R) (n : ) :
            StmtIn R × ((i : Unit) → OStmtIn R d n i)WitInProp
            Equations
            Instances For
              def Sumcheck.Spec.relOut (R : Type) [CommSemiring R] (d n : ) :
              StmtOut R n × ((i : Unit) → OStmtOut R d n i)WitOutProp
              Equations
              Instances For
                def Sumcheck.Spec.prover (R : Type) [CommSemiring R] (d n : ) :
                OracleProver (pSpec R d n) []ₒ (StmtIn R) WitIn (StmtOut R n) WitOut (OStmtIn R n d) (OStmtOut R n d)
                Equations
                Instances For
                  def Sumcheck.Spec.verifier (R : Type) [CommSemiring R] (d n : ) :
                  OracleVerifier (pSpec R d n) []ₒ (StmtIn R) (StmtOut R n) (OStmtIn R n d) (OStmtOut R n d)
                  Equations
                  Instances For
                    Equations
                    Instances For