Documentation

CslibFrontier.Computability.Complexity.Classes.MIP.AxisTest

Axis-line verification for a bit-valued proof oracle #

This verifier uses the approximate-line implication of Babai, Fortnow and Lund, Theorem 5.13 and §7.1 over a prime field. The verifier reads a value at a field point and an affine function on the axis-parallel line containing it. A static bit proof supplies three field values, the point value and the two coefficients of that line. Zeroing the selected coordinate before querying the line prevents the proof from supplying different affine functions for different positions on that line.

Main definitions #

Main results #

Coefficients of an axis-parallel affine restriction reported by a proof oracle.

  • slope : F

    The change in value per unit step along the selected axis.

  • intercept : F

    The value where that coordinate vanishes.

def Cslib.Complexity.MIP.checkAxis {n : ℕ} {F : Type} [Field F] [DecidableEq F] (f : (Fin n → F) → F) (lines : Fin n → (Fin n → F) → LineAnswer F) (i : Fin n) (x : Fin n → F) :

Compare the proof's claimed value at a point with its affine restriction to one axis. The line address zeroes that coordinate, so it is independent of the point along the line.

theorem Cslib.Complexity.MIP.exists_checkAxis_of_mem_restrictDegree {n : ℕ} {F : Type} [Field F] [DecidableEq F] {A : MvPolynomial (Fin n) F} (hA : A ∈ MvPolynomial.restrictDegree (Fin n) F 1) :
∃ (lines : Fin n → (Fin n → F) → LineAnswer F), ∀ (i : Fin n) (x : Fin n → F), checkAxis (fun (z : Fin n → F) => (MvPolynomial.eval z) A) lines i x = true

Every evaluation table of a multilinear polynomial has a line table passing every check.

noncomputable def Cslib.Complexity.MIP.uniformAxisCheck {n : ℕ} {F : Type} [Field F] [Fintype F] [DecidableEq F] [NeZero n] (f : (Fin n → F) → F) (lines : Fin n → (Fin n → F) → LineAnswer F) :

The uniformly random axis check is a finite experiment on a single axis and field point.

theorem Cslib.Complexity.MIP.exists_assignment_of_checkAxis {n : ℕ} {F : Type} [Field F] [Fintype F] [DecidableEq F] [NeZero n] (f : (Fin n → F) → F) (lines : Fin n → (Fin n → F) → LineAnswer F) (hq : 1000 * (n + 1) ^ 3 ≤ Fintype.card F) (hrej : ((uniformAxisCheck f lines) false).toReal < 1 / (10 ^ 6 * (↑n + 1) ^ 7)) :
∃ A ∈ MvPolynomial.restrictDegree (Fin n) F 1, ↑(hammingDist f fun (x : Fin n → F) => (MvPolynomial.eval x) A) < ↑(Fintype.card F) ^ n / (100 * (↑n + 1))

A uniformly sampled axis and point detect a proof table that is too far from every multilinear assignment for local correction. The correction step can make n + 1 queries per literal, so the exceptional fraction here scales inversely with that number.

A proof's point table uses the tag 0 followed by a framed list of unary residues.

def Cslib.Complexity.MIP.axisTableKey (slope : Bool) (i : ℕ) (point : List ℕ) :

An axis-line table key contains tags 10, a slope/intercept selector, a unary axis, and a framed list of unary coordinates with the selected coordinate zeroed.

Read the field value, slope and intercept from the proof, then check the axis equation mod p. The verifier uses p.size bits of each table value.

def Cslib.Complexity.MIP.proofPoint {n : ℕ} (π : List Bool → Bool) (p : ℕ) (x : Fin n → ZMod p) :

The point table induced by a fixed proof over the given residue ring.

def Cslib.Complexity.MIP.proofAxis {n : ℕ} (π : List Bool → Bool) (p : ℕ) (i : Fin n) (x : Fin n → ZMod p) :

The two coefficients returned by the fixed proof for a canonical axis-parallel line.

theorem Cslib.Complexity.MIP.run_checkAxisAt {n : ℕ} (π : List Bool → Bool) {p : ℕ} [Fact (Nat.Prime p)] (i : Fin n) (x : Fin n → ZMod p) :
(Prover.ofProof π).run (checkAxisAt p (↑i) (List.ofFn fun (k : Fin n) => (x k).val)) () = PMF.pure (checkAxis (proofPoint π p) (proofAxis π p) i x, ())

A run of the word verifier on field elements agrees with an affine line query on the two tables represented by the proof, including malformed field representatives reduced modulo p.

The axis check is a strict polynomial-time verifier for unary moduli, coordinates and axes.

noncomputable def Cslib.Complexity.MIP.extendAxisTable {n p : ℕ} (f : (Fin n → ZMod p) → ZMod p) (lines : Fin n → (Fin n → ZMod p) → LineAnswer (ZMod p)) (other : List Bool → ℕ) :

Populate the point and axis tables for a given dimension and field. Other tags retain their background values, permitting the same proof to store sumcheck and correction data.

theorem Cslib.Complexity.MIP.extendAxisTable_reserved {n p : ℕ} (f : (Fin n → ZMod p) → ZMod p) (lines : Fin n → (Fin n → ZMod p) → LineAnswer (ZMod p)) (other : List Bool → ℕ) (tail : List Bool) :
extendAxisTable f lines other (true :: true :: tail) = other (true :: true :: tail)

The 11 tag subspace can carry additional parts of the static proof.

A strict oracle program for the point-versus-axis-line check over dyadic random coins.

theorem Cslib.Complexity.MIP.closeTo_axisRound (π : List Bool → Bool) (n p precision : ℕ) [NeZero n] [Fact (Nat.Prime p)] :
Probability.CloseTo (uniformAxisCheck (proofPoint π p) (proofAxis π p)) (PMF.map Prod.fst ((Prover.ofProof π).run (axisRound n p precision) ())) (1 / 2 ^ precision + 1 / 2 ^ precision)

The distribution of the bounded-coin verifier on a fixed bit proof differs from the uniform field test on the tables encoded by that very proof by at most the sampling error.

theorem Cslib.Complexity.MIP.exists_assignment_of_axisRound (π : List Bool → Bool) {n p : ℕ} [NeZero n] [Fact (Nat.Prime p)] (hq : 1000 * (n + 1) ^ 3 ≤ p) (precision : ℕ) (hrej : ((PMF.map Prod.fst ((Prover.ofProof π).run (axisRound n p precision) ())) false).toReal + 2 / 2 ^ precision < 1 / (10 ^ 6 * (↑n + 1) ^ 7)) :
∃ A ∈ MvPolynomial.restrictDegree (Fin n) (ZMod p) 1, ↑(hammingDist (proofPoint π p) fun (x : Fin n → ZMod p) => (MvPolynomial.eval x) A) < ↑p ^ n / (100 * (↑n + 1))

A proof passing the strict verifier with low enough rejection encodes a point table close to the evaluation table of an individual-degree-one polynomial.

theorem Cslib.Complexity.MIP.exists_axisTable_of_mem_restrictDegree {n p : ℕ} [NeZero n] [Fact (Nat.Prime p)] {A : MvPolynomial (Fin n) (ZMod p)} (hA : A ∈ MvPolynomial.restrictDegree (Fin n) (ZMod p) 1) :
∃ (lines : Fin n → (Fin n → ZMod p) → LineAnswer (ZMod p)), ∀ (other : List Bool → ℕ) (π : List Bool → Bool), (∀ (key : List Bool), List.take 2 key ≠ [true, true] → ProofWord.value π key p.size = extendAxisTable (fun (x : Fin n → ZMod p) => (MvPolynomial.eval x) A) lines other key % 2 ^ p.size) → (proofPoint π p = fun (x : Fin n → ZMod p) => (MvPolynomial.eval x) A) ∧ ∀ (precision : ℕ), (Prover.ofProof π).run (axisRound n p precision) () = PMF.pure (true, ())

Every multilinear assignment admits a fixed axis table whose encoded point values are the polynomial evaluations and whose verifier accepts on every choice of fair coins. The same bit proof can use the other tag addresses for the remaining verification phases.