Documentation

CslibFrontier.Probability.HashFamily.Matrix

Uniform finite-field matrix hashing #

A uniform matrix over a finite field maps every nonzero vector to a uniform vector. Consequently, ordinary matrix-vector multiplication satisfies the existing IsDeltaUniversalHash predicate. These are finite probability laws, with no claim about sampling the matrix with bounded fair coins.

Main results #

The proofs reuse surjectivity of scalar linear combinations and uniformity under surjective additive homomorphisms. These elementary API lemmas are original; the universality predicate is the existing one from Probability.HashFamily.

theorem Cslib.Probability.uniformOfFintype_map_mulVec {ι κ F : Type} [Fintype ι] [Fintype κ] [Field F] [Fintype F] [DecidableEq ι] [DecidableEq κ] (x : κ → F) (hx : x ≠ 0) :
PMF.map (fun (A : Matrix ι κ F) => A.mulVec x) (PMF.uniformOfFintype (Matrix ι κ F)) = PMF.uniformOfFintype (ι → F)

A uniform finite-field matrix sends a fixed nonzero vector to a uniform vector.

theorem Cslib.Probability.isDeltaUniversalHash_mulVec {ι κ F : Type} [Fintype ι] [Fintype κ] [Field F] [Fintype F] [DecidableEq ι] [DecidableEq κ] :
IsDeltaUniversalHash (PMF.uniformOfFintype (Matrix ι κ F)) (fun (A : Matrix ι κ F) (x : κ → F) => A.mulVec x) (↑(Fintype.card (ι → F)))⁻¹

Finite-field matrices are delta-universal under their uniform law: the difference at any two distinct inputs hits each output with probability exactly the reciprocal output cardinality. The predicate records the resulting upper bound.