Linear codes, rate, puncturing, and shortening #
A linear code is a submodule C of the words ι → M, usually with M = F a field
MacWilliams and Sloane, Chapter 1. The Hamming distance between two words
is the Hamming weight hammingNorm of their difference, and the difference of two codewords is a
codeword, so the minimum distance of a linear code is the least weight of a nonzero codeword
(Cslib.Code.le_minDist_iff_hammingNorm, Cslib.Code.minDist_eq_iInf_hammingNorm).
This module also provides the finite-code rate (log_|α| |C| / |ι|, equal to finrank F C / |ι|
for linear codes over a finite field F), coordinate restriction / puncturing (Code.puncture,
Code.punctureLinear), zero-extension along an embedding (Code.extend, Code.extendLinearMap),
and shortening (Code.shorten, Code.shortenLinear), together with cardinality/rate bounds for
kernels of linear maps.
Main definitions #
Cslib.Code.rate: the information ratelog_|α| |C| / |ι|of a finite code.Cslib.Code.extend,Cslib.Code.extendLinearMap: zero-extension of a word along an embedding.Cslib.Code.puncture,Cslib.Code.punctureLinear: puncturing (coordinate restriction).Cslib.Code.shorten,Cslib.Code.shortenLinear: shortening a code to an embedded subset.
Main results #
Cslib.Code.le_minDist_iff_hammingNorm: lower bounds on the minimum distance of a linear code are lower bounds on the weights of its nonzero codewords.Cslib.Code.minDist_eq_iInf_hammingNorm: the minimum distance of a linear code is the least weight of a nonzero codeword.Cslib.Code.card_linearCode_eq_pow_finrank,Cslib.Code.rate_linearCode_eq_finrank_div_card: cardinality and rate of linear codes over finite fields.Cslib.Code.hammingNorm_extend,Cslib.Code.le_minDist_shorten: shortening preserves Hamming weights and cannot decrease minimum distance.Cslib.Code.pow_sub_le_card_ker,Cslib.Code.one_sub_card_div_card_le_rate_ker: cardinality and rate lower bounds for kernels of linear maps over finite rings.
References #
- [F. J. MacWilliams, N. J. A. Sloane, The Theory of Error-Correcting Codes] [MWS77]
The minimum distance of a linear code is at least d iff every nonzero codeword has weight at
least d.
Minimum weight. The minimum distance of a linear code is the least weight of a nonzero
codeword, and ⊤ for the zero code.
Over a finite nontrivial ring R, rate (ker f) ≥ 1 - |κ| / |ι|.
Zero-extension along an embedding is injective.
Applying extendLinearMap agrees with extend.
Zero-extension preserves Hamming weight.
Zero-extension preserves Hamming distance.
Membership in a punctured linear code punctureLinear C emb.
Coercion of punctureLinear C emb agrees with puncture (C : Set _) emb.
Membership in shortenLinear C emb means the zero-extension lies in C.
As a set, shortenLinear C emb equals shorten (C : Set (ι → M)) emb.
Shortening cannot decrease minimum distance.