Documentation

CslibFrontier.Foundations.Data.Code.LowDegreeExtension

Low-degree extensions #

Let h : H ↪ F embed a finite set H of size |H| in a field F. Every function f : (Fin m → H) → F on the grid H ^ m is the restriction of a polynomial of low degree: the low-degree extension lowDegreeExtension h f x = ∑ u, f u * ∏ i, L (u i) (x i), where L a is the Lagrange basis polynomial of the node h a among the nodes h H Babai, Fortnow, Levin, Szegedy, Arora and Barak, Chapter 19. It agrees with f on the grid (Cslib.Code.lowDegreeExtension_apply_embed) and is a codeword of the Reed–Muller code of degree m * (|H| - 1) (Cslib.Code.lowDegreeExtension_mem_reedMuller). It is also the evaluation of a polynomial of degree at most |H| - 1 in each variable (Cslib.Code.exists_degreeOf_le_eval_eq_lowDegreeExtension), which is Goldreich, Exercise 7.12. For H = {0, 1} it is the multilinear extension, which is not stated here.

Low-degree extensions encode truth tables into Reed–Muller codewords: the truth table of a function on n = m * b bits, read as a function on (BitString b) ^ m, extends to a polynomial in m variables of total degree at most m * (2 ^ b - 1) over a field with at least 2 ^ b elements. Informally, evaluating the extension at a point costs |H| ^ m terms, linear in the size of the truth table, which is what makes encodings of functions computable in exponential time; no running time is formalized in this module.

Main definitions #

Main results #

References #

noncomputable def Cslib.Code.lowDegreeExtension {F : Type u_1} [Field F] {H : Type u_2} [Fintype H] [DecidableEq H] {m : ℕ} (h : H ↪ F) (f : (Fin m → H) → F) :
(Fin m → F) → F

The low-degree extension of f : (Fin m → H) → F along the embedding h : H ↪ F.

theorem Cslib.Code.lowDegreeExtension_apply_embed {F : Type u_1} [Field F] {H : Type u_2} [Fintype H] [DecidableEq H] {m : ℕ} (h : H ↪ F) (f : (Fin m → H) → F) (u : Fin m → H) :
(lowDegreeExtension h f fun (i : Fin m) => h (u i)) = f u

The low-degree extension extends f: it agrees with f on the grid.

theorem Cslib.Code.exists_degreeOf_le_eval_eq_lowDegreeExtension {F : Type u_1} [Field F] {H : Type u_2} [Fintype H] [DecidableEq H] {m : ℕ} (h : H ↪ F) (f : (Fin m → H) → F) :
∃ (P : MvPolynomial (Fin m) F), (∀ (i : Fin m), MvPolynomial.degreeOf i P ≤ Fintype.card H - 1) ∧ (∀ (x : Fin m → F), (MvPolynomial.eval x) P = lowDegreeExtension h f x) ∧ ∀ (u : Fin m → H), (MvPolynomial.eval fun (i : Fin m) => h (u i)) P = f u

Low-degree extension with individual degree Goldreich, Exercise 7.12: for H ⊆ F (here embedded by h) and every f : H ^ m → F, there is an m-variate polynomial of degree at most |H| - 1 in each variable that agrees with f on H ^ m. The polynomial evaluates to lowDegreeExtension h f everywhere. The guideline's f̂ x = ∑ a, f a * ∏ i, ∏ b ≠ a i, (x i - b) / (a i - b) is this extension, since ∏ b ≠ a i, (x i - b) / (a i - b) is the Lagrange basis polynomial of a i. The source's F is the finite field of the Theorem 7.12 construction; here F is any field.

theorem Cslib.Code.lowDegreeExtension_mem_reedMuller {F : Type u_1} [Field F] {H : Type u_2} [Fintype H] [DecidableEq H] {m : ℕ} (h : H ↪ F) (f : (Fin m → H) → F) :

The low-degree extension is a Reed–Muller codeword of degree m * (|H| - 1): its polynomial has degree at most |H| - 1 in each of the m variables.