Documentation

CslibFrontier.Computability.Complexity.HardnessEncoding.Program

The worst-case-to-average-case encoding as a program on bit lists #

The encoded slices Cslib.HardnessEncoding.encodedSlice L M of a language L are computed by a program on bit lists (Cslib.HardnessEncoding.encodedProgram) that makes 2 ^ (M b) queries to a decider of L and otherwise only does arithmetic in the explicit binary field Cslib.BinaryField of degree w = 4 b, in coordinates:

On every input y, with the length parameter |y|, the program computes the encoded slice of L at length |y| (Cslib.HardnessEncoding.encodedProgram_eq).

Main definitions #

Main results #

References #

The program #

The inverse in coordinates: y ^ (2 ^ w - 2), as the square of y ^ (2 ^ (w - 1) - 1).

The product of t + a' over the words a' of E other than a, in coordinates.

A Lagrange basis polynomial at a point, in coordinates: the value at t of the Lagrange basis polynomial of the node a among the nodes E.

def Cslib.HardnessEncoding.termVal (tab : List (List (List Bool))) (w b M : ℕ) (E xs : List (List Bool)) (z : List Bool) :

The product over the blocks i < M of z of the Lagrange basis polynomial of block i at the point xs i.

def Cslib.HardnessEncoding.ldeVal (tab : List (List (List Bool))) (w b M : ℕ) (E pts xs : List (List Bool)) :

The low-degree extension at a point, in coordinates: the sum of the terms of the inputs pts accepted by the truth table.

The encoding program with block length b: on the input y, the parity of the bits, selected by the last w = 4 b bits of y, of the low-degree extension over the binary field of degree w of the truth table of gL on M b bits, at the point whose coordinates are the first M blocks of w bits of y.

The encoding program with length parameter ℓ: block length blockLength M ℓ.

The explicit binary field in coordinates #

Correctness #

A Lagrange basis polynomial at a point: lagrangeVal computes the value at t of the Lagrange basis polynomial of the node a among the embedded bit strings of length b.

theorem Cslib.HardnessEncoding.fieldOfBits_ldeVal {w : ℕ} (hw : 2 ≤ w) {M b : ℕ} (hbw : b ≤ w) {L : Language Bool} {gL : List Bool → Bool} (hgL : ∀ (z : List Bool), z ∈ L ↔ gL z = true) (xs : List (List Bool)) :

The program computes the low-degree extension: ldeVal on the accepted inputs of a decider gL of L is the extension of the truth table of L on M b bits at the point with coordinates xs.

theorem Cslib.HardnessEncoding.encodedProgram_eq {L : Language Bool} {gL : List Bool → Bool} (hgL : ∀ (z : List Bool), z ∈ L ↔ gL z = true) (M : ℕ) (y : List Bool) :
encodedProgram M gL y y.length = encodedSlice L M y.length fun (i : Fin y.length) => y[i]

The program computes the encoded slices: on every input y, with a decider gL of L and the length parameter |y|, the program returns the encoded slice of L at length |y|.