Parity-check codes and binary linear codes #
A parity-check code over a commutative ring R is the kernel
Cslib.Code.parityCheckCode H = LinearMap.ker H.mulVecLin of a parity-check matrix
H : Matrix κ ι R MacWilliams and Sloane, Chapter 1. Over any finite
commutative ring (including Bool and ZMod 2), its cardinality is at least |R| ^ (|ι| - |κ|)
and its rate is at least 1 - |κ| / |ι| (pow_sub_le_card_parityCheckCode,
one_sub_card_div_card_le_rate_parityCheckCode); over a field F, its dimension satisfies
H.rank + finrank F (parityCheckCode H) = |ι| (finrank_parityCheckCode_add_rank).
Shortening parityCheckCode H along an embedding emb : κ' ↪ ι yields
parityCheckCode (H.submatrix id emb) (shortenLinear_parityCheckCode). For binary parity-check
matrices H : Matrix κ ι Bool, the computable ring isomorphism Cslib.BitString.bitEquiv
transfers dimension, cardinality 2 ^ dim, and rate from ZMod 2
(card_parityCheckCode_bool_eq_two_pow_finrank, rate_parityCheckCode_bool).
Main definitions #
Cslib.Code.parityCheckCode: the kernel ofH.mulVecLin.Cslib.Code.syndrome: the matrix-vector productH *ᵥ x.
Main results #
Cslib.Code.mem_parityCheckCode,Cslib.Code.mem_parityCheckCode_iff_forall_dotProduct: membership characterizations.Cslib.Code.pow_sub_le_card_parityCheckCode,Cslib.Code.one_sub_card_div_card_le_rate_parityCheckCode,Cslib.Code.finrank_parityCheckCode_add_rank: rate and dimension bounds.Cslib.Code.lt_minDist_parityCheckCode_iff: minimum distance from minimum nonzero kernel weight.Cslib.Code.shortenLinear_parityCheckCode: shortening drops columns not in the retained image.Cslib.Code.submoduleZModIso_parityCheckCode,Cslib.Code.finrank_parityCheckCode_bool_add_rank,Cslib.Code.orthogonal_parityCheckCode,Cslib.Code.orthogonal_parityCheckCode_bool,Cslib.Code.mem_parityCheckCode_zmodTwo_iff,Cslib.Code.card_parityCheckCode_bool_eq_two_pow_finrank,Cslib.Code.rate_parityCheckCode_bool: dual row-space and binaryBool↔ZMod 2bridges.
References #
- [F. J. MacWilliams, N. J. A. Sloane, The Theory of Error-Correcting Codes] [MWS77]
A word lies in parityCheckCode H iff its syndrome vanishes.
A word lies in parityCheckCode H iff it is orthogonal to every row of H.
Over a finite nontrivial commutative ring R, rate (parityCheckCode H) ≥ 1 - |κ| / |ι|.
The minimum distance of parityCheckCode H exceeds r iff every nonzero word in the kernel of
H has Hamming weight more than r.
Multiplying H by the zero-extension of z along emb equals multiplying the
column-restricted matrix H.submatrix id emb by z.
Shortening parityCheckCode H along emb gives parityCheckCode (H.submatrix id emb).
submoduleZModIso maps a Boolean parity-check code parityCheckCode H to
parityCheckCode (H.map bitEquiv.symm).
Membership in a Boolean parity-check code parityCheckCode H is equivalent to membership in the
corresponding ZMod 2 parity-check code under bitEquiv.symm.
A binary parity-check code parityCheckCode H (Bool) has cardinality 2 ^ dim matching its
ZMod 2 partner.
The rate of a binary parity-check code parityCheckCode H equals its ZMod 2 dimension
divided by |ι|.