Documentation

CslibFrontier.Probability.HashFamily.MatrixKernel

Kernel moments for uniform finite-field matrices #

This elementary first-moment argument counts kernel vectors directly. For a uniform square matrix, each nonzero vector lies in its kernel with probability the reciprocal of the vector-space cardinality. Summing those probabilities gives the exact first moment. A nontrivial kernel contains at least one line. This gap above cardinality one sharpens the resulting square-root moment, which factors for independent coordinate matrices.

theorem Cslib.Probability.expect_card_ker_mulVecLin {ι F : Type} [Fintype ι] [DecidableEq ι] [Field F] [Fintype F] :
(Finset.univ.expect fun (A : Matrix ι ι F) => ↑(Nat.card ↥A.mulVecLin.ker)) = 2 - (↑(Fintype.card (ι → F)))⁻¹

The expected kernel cardinality of a uniform square matrix is exactly 2 - 1 / |V|, including when the vector space has dimension zero.

Over a field of size q, the expected square root of the kernel cardinality of a uniform square matrix is at most 1 + 1/(√q + 1). Singular matrices are included.

theorem Cslib.Probability.expect_sqrt_card_joint_kernel_le {ι F : Type} [Fintype ι] [DecidableEq ι] [Field F] [Fintype F] (r : ℕ) :
(Finset.univ.expect fun (A : Fin r → Matrix ι ι F) => √↑(Nat.card { v : Fin r → ι → F // ∀ (j : Fin r), (A j).mulVec (v j) = 0 })) ≤ (1 + (√↑(Fintype.card F) + 1)⁻¹) ^ r

For independent uniform square matrices, count all tuples killed by their respective matrices. The square-root moment of that joint kernel is at most the product of the individual bounds.