Documentation

CslibFrontier.Computability.Complexity.AffineDisperser.Coordinates

Ben-Sasson and Kopparty's function in coordinates #

Let B be a basis of a field F over š”½ā‚‚ indexed by Fin n. A bit list a stands for the element āˆ‘_{u < n} a u • B u (Cslib.BinaryField.fieldOfBits), and a multiplication table lists the coordinates of the products B u * B w (Cslib.BinaryField.IsMulTable). With such a table, field arithmetic is a computation on bit lists: a product is the sum of the table entries B u * B w with a u = b w = 1 (Cslib.BinaryField.fieldMul), the power y ^ (2 ^ k - 1) follows from k - 1 steps z ↦ z ^ 2 * y, the elementary symmetric polynomial e_t from the recursion e_{j + 1}(z, ys) = e_{j + 1}(ys) + z e_j(ys), and the trace from the traces Tr (B u) = āˆ‘_v [B u * B v]_v of the basis vectors, the diagonal of the multiplication matrices.

So traceSym 1 r t on blocks of n bits is computed from the multiplication table alone (Cslib.AffineDisperser.traceSymCoords_eq): its value depends on the basis only through the table.

Main definitions #

Main results #

References #

Coordinates #

The power y ^ (2 ^ (k + 1) - 1) in coordinates, by k steps z ↦ z ^ 2 * y from y.

theorem Cslib.AffineDisperser.fieldOfBits_powerPred {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : ā„•} {B : Module.Basis (Fin n) (ZMod 2) F} {tab : List (List (List Bool))} (htab : BinaryField.IsMulTable B tab) (y : List Bool) (k : ā„•) :

One step of the elementary symmetric polynomials e₁, …, e_t in coordinates: adding an element z replaces e_{j + 1} by e_{j + 1} + z e_j, with eā‚€ = 1.

The coordinates of the t-th elementary symmetric polynomial e_t of the elements with coordinates zs, for t ≄ 1, by dynamic programming over e₁, …, e_t.

theorem Cslib.AffineDisperser.fieldOfBits_esymmCoords {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : ā„•} {B : Module.Basis (Fin n) (ZMod 2) F} {tab : List (List (List Bool))} (htab : BinaryField.IsMulTable B tab) {t : ā„•} (ht : 0 < t) (zs : List (List Bool)) :

The dynamic program for e_t: with a multiplication table of the basis B and 0 < t, esymmCoords tab t zs has the coordinates of the t-th elementary symmetric polynomial of the elements with coordinates zs.

theorem Cslib.AffineDisperser.trace_eq_sum_repr_mul {R : Type u_2} {S : Type u_3} [CommRing R] [CommRing S] [Algebra R S] {ι : Type u_4} [Fintype ι] (b : Module.Basis ι R S) (x : S) :
(Algebra.trace R S) x = āˆ‘ i : ι, (b.repr (x * b i)) i

The trace is the trace of the multiplication matrix: the sum of the diagonal coordinates [x * b i]_i.

The traces of the basis elements, as bits: the trace of B u is the sum over v of the coordinate v of B u * B v.

The trace, as a bit, of the element with coordinates a, from the traces Ļ„ of the basis elements.

The trace as a bit: with a multiplication table of the basis B, traceBit (traceVector tab) a is the trace over ZMod 2 of the element with coordinates a.

def Cslib.AffineDisperser.blockPos {r n N : ā„•} (h : r * n ≤ N) (q : Fin r Ɨ Fin n) :
Fin N

Blocks of n bits: bit u of block i < r is input bit n i + u, among the first r n input bits.

Ben-Sasson and Kopparty's function in coordinates: traceSym 1 r t at the elements with coordinates the blocks of n = tab.length bits of x, computed from the multiplication table tab: the powers by repeated squaring, the elementary symmetric polynomial by dynamic programming, and the trace from the traces of the basis elements.

theorem Cslib.AffineDisperser.traceSymCoords_eq {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : ā„•} {B : Module.Basis (Fin n) (ZMod 2) F} {tab : List (List (List Bool))} (htab : BinaryField.IsMulTable B tab) {r t N : ā„•} (ht : 0 < t) (h : r * n ≤ N) (x : List Bool) :

Correctness of the coordinate computation: with a multiplication table of the basis B, traceSymCoords computes traceSymBits 1 r t B on blocks of n bits.