Proof that Binary Matrix-vector multiplication (using all matrices) is a Universal-2 hash function:
matrix_mulVec_isUniversal2
(This family is very big and therefore not useful in practice)
theorem
mulVecMat_surjective
{๐ : Type u_1}
[Field ๐]
{n : Type u_3}
[Fintype n]
(m : Type u_4)
[Fintype m]
[DecidableEq m]
{v : n โ ๐}
(vne0 : v โ 0)
:
Function.Surjective โ(mulVecMat m v)
theorem
finrank_ker_mulVecLin
{๐ : Type u_1}
[Field ๐]
{n : Type u_3}
[Fintype n]
(m : Type u_4)
[Fintype m]
[DecidableEq m]
{v : n โ ๐}
(hv : v โ 0)
:
finrank of the kernel of M โฆ M.mulVec v for nonzero v.
theorem
card_eq_two_pow_finrank
(p : โ)
[Fact (Nat.Prime p)]
(V : Type u_1)
[AddCommGroup V]
[Module (ZMod p) V]
[FiniteDimensional (ZMod p) V]
[Fintype V]
:
theorem
matHash_universal2atHash_universal2
(p : โ)
[Fact (Nat.Prime p)]
(a b : โ)
:
(matHash p a b).universal2
Matrix-vector multiplication (using all matrices modulo p) is Universal2.
theorem
matHash_not_strongly_universal_n
(a b : โ)
(ha : a > 0)
(hb : b > 0)
:
ยฌHashFamily.stronglyUniversal_n 2 (matHash 2 a b)
Counterexample: Binary Matrix-vector multiplication (using binary matrices) is not strongly-Universal-2.