Finite Boolean codes -- definitions #
An abstract Boolean code is an injective map from fixed-length messages to fixed-length codewords. Correctness, minimum distance, exhaustive decoding, and rate are represented independently of any efficiency claim.
An injective fixed-block-length Boolean encoding.
- encode : BooleanHamming.Word messageLength → BooleanHamming.Word blockLength
Encode one message as a codeword.
- encode_injective : Function.Injective self.encode
Distinct messages have distinct codewords.
Instances For
Coordinatewise addition over GF(2), represented by Boolean XOR.
Equations
- Complexity.BooleanCode.xorWords left right coordinate = (left coordinate ^^ right coordinate)
Instances For
Exact rational information rate for the two code lengths. At block length zero this uses the total rational-division convention.
Equations
- Complexity.BooleanCode.rate messageLength blockLength = ↑messageLength / ↑blockLength
Instances For
Linearity over GF(2), stated directly through zero and XOR so the coding
layer does not need a second representation of Boolean words.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finite image of all messages.
Equations
- code.codewords = Finset.image code.encode Finset.univ
Instances For
Every pair of distinct messages encodes at distance at least the stated minimum.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exhaustive list of messages whose codewords lie in a received-word ball.
Equations
- code.decodeCandidates received radius = {message : Complexity.BooleanHamming.Word messageLength | Complexity.BooleanHamming.distance (code.encode message) received ≤ radius}
Instances For
Exhaustive decoder returning the first nearby message, if one exists. Minimum-distance hypotheses make this result unique but do not make the search efficient.
Equations
- code.decodeUnique? received radius = (code.decodeCandidates received radius).toList.head?