Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.LeftKernel

Matrix left-kernel dimension and parity-check matrices #

For an m × n matrix F over a field K, the left kernel ker Fᵀ.mulVecLin has dimension leftKernelDim F satisfying leftKernelDim F + F.rank = m (Matrix.leftKernelDim_add_rank), so m - n ≤ leftKernelDim F (Matrix.sub_le_leftKernelDim). Choosing a basis of the left kernel yields a surjective parity-check matrix H : Matrix (Fin (leftKernelDim F)) (Fin m) K satisfying H * F = 0 (Matrix.exists_parityCheckMatrix).

Main definitions #

Main results #

noncomputable def Matrix.leftKernelDim {K : Type u_1} [Field K] {m n : ℕ} (F : Matrix (Fin m) (Fin n) K) :

The dimension of the left kernel ker Fᵀ of F : Matrix (Fin m) (Fin n) K.

theorem Matrix.leftKernelDim_add_rank {K : Type u_1} [Field K] {m n : ℕ} (F : Matrix (Fin m) (Fin n) K) :

Rank-nullity on Fᵀ: leftKernelDim F + F.rank = m.

theorem Matrix.sub_le_leftKernelDim {K : Type u_1} [Field K] {m n : ℕ} (F : Matrix (Fin m) (Fin n) K) :

Any m × n matrix over a field has left-kernel dimension at least m - n.

theorem Matrix.exists_parityCheckMatrix {K : Type u_1} [Field K] {m n : ℕ} (F : Matrix (Fin m) (Fin n) K) :
∃ (H : Matrix (Fin F.leftKernelDim) (Fin m) K), H * F = 0 ∧ Function.Surjective ⇑H.mulVecLin

Every F : Matrix (Fin m) (Fin n) K admits an explicit parity-check matrix H with leftKernelDim F rows such that H * F = 0 and H.mulVecLin is surjective.

theorem Matrix.parityCheck_mulVec_of_eq_zero {K : Type u_1} [Field K] {m n r : ℕ} {H : Matrix (Fin r) (Fin m) K} {F : Matrix (Fin m) (Fin n) K} (hHF : H * F = 0) (w : Fin n → K) :
H.mulVec (F.mulVec w) = 0

A left-kernel check annihilates every vector in the image of F.