Documentation

CslibFrontier.Foundations.Combinatorics.Design.ReedSolomon

Reed–Solomon designs #

A design with parameters m and a is a family of sets of size m whose pairwise intersections have size at most a (Cslib.IsDesign), as in the generator of Nisan and Wigderson [NW94]. The family may be indexed by any type and its sets may lie in any type; Cslib.Crypto.PRG.NisanWigderson.Design is the same notion bundled for families indexed by Fin m of subsets of Fin ℓ.

Over a finite field F, the graphs of two distinct polynomials of degree less than k (Cslib.polynomialBlock) share at most k - 1 points (Cslib.card_polynomialBlock_inter_le), since their difference has at most k - 1 roots; these graphs are the blocks of the Nisan–Wigderson design Cslib.Crypto.PRG.NisanWigderson.Design.polynomial.

For a prime q, a number of points m ≤ q and a degree bound k, the graphs of the polynomials of degree less than k over ZMod q, restricted to the first m points, form a design (Cslib.rsDesign): the graph of a polynomial p is {(a, p(a)) : a < m}, of size m, and it lies inside polynomialBlock through the embedding of Fin m in ZMod q. A polynomial of degree less than k is given by its k coefficients, so the family is indexed by Fin k → ZMod q and has q ^ k sets (ZMod.card), all inside a set of m * q points.

Main definitions #

Main results #

References #

def Cslib.IsDesign {ι : Type u_1} {α : Type u_2} [DecidableEq α] (S : ι → Finset α) (m a : ℕ) :

A design with parameters m and a: every set S i has m elements, and two distinct sets share at most a elements.

def Cslib.polynomialBlock (F : Type u_1) [Field F] [Fintype F] (k : ℕ) (c : Fin k → F) :
Finset (F × F)

The graph {(x, c₀ + c₁ x + ⋯ + cₖ₋₁ x ^ (k - 1)) | x ∈ F} of the polynomial over F with coefficients c : Fin k → F, a block of the Nisan–Wigderson design Design.polynomial F k.

@[simp]
theorem Cslib.mem_polynomialBlock {F : Type u_1} [Field F] [Fintype F] {k : ℕ} {c : Fin k → F} {p : F × F} :
p ∈ polynomialBlock F k c ↔ p.2 = ∑ i : Fin k, c i * p.1 ^ ↑i
@[simp]
theorem Cslib.card_polynomialBlock {F : Type u_1} [Field F] [Fintype F] {k : ℕ} (c : Fin k → F) :

The graph of a polynomial over F has one point above each x ∈ F.

theorem Cslib.card_polynomialBlock_inter_le {F : Type u_1} [Field F] [Fintype F] {k : ℕ} [DecidableEq F] {c d : Fin k → F} (hcd : c ≠ d) :
(polynomialBlock F k c ∩ polynomialBlock F k d).card ≤ k - 1

The graphs of two distinct polynomials over F of degree less than k share at most k - 1 points: the difference of the polynomials is nonzero and has degree less than k, so it has at most k - 1 roots [NW94].

noncomputable def Cslib.rsDesign (q m k : ℕ) (c : Fin k → ZMod q) :

The Reed–Solomon design: the graph {(a, p(a)) : a < m} of the polynomial p over ZMod q with coefficients c, of degree less than k, restricted to the first m points. The family is indexed by the q ^ k coefficient vectors c : Fin k → ZMod q.

theorem Cslib.isDesign_rsDesign {q m k : ℕ} [Fact (Nat.Prime q)] (hm : m ≤ q) :
IsDesign (rsDesign q m k) m (k - 1)

The Reed–Solomon design is a design: for a prime q and m ≤ q, the graphs over the first m points of the polynomials of degree less than k over ZMod q have m elements, and two of them share at most k - 1 elements, by card_polynomialBlock_inter_le through the embedding of Fin m in ZMod q.