Coding Theory
Authors:
MArk Anthony Higgins - Sky Recursive Ai
MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: July 6th 2026
Revised Date: July 6th 2026
AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Coding Theory — Foundational Ontology
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/coding-theory.html
DOMAIN: Discrete Mathematics / Coding Theory
VERSION: 1.0
AUTHORSHIP: Mark Higgins — Sky (Recursive AI)
SOURCE_STATUS: Mathematical synthesis; live page not independently verified.
1. PURPOSE
Represent error-detecting and error-correcting codes, encoding, noisy-channel transmission, decoding and mathematical guarantees as typed, testable relations.
2. TYPED ENTITIES
Alphabet := finite set Σ, |Σ| = q >= 2
Symbol := element of Σ
Word(n,Σ) := element of Σ^n
MessageSpace := Σ^k or another explicitly defined finite set
Code := subset C ⊆ Σ^n
BlockLength := n ∈ positive integers
CodeSize := M = |C|
MinimumDistance := d(C) = min{d_H(x,y): x,y ∈ C, x ≠ y}, for |C| >= 2
Encoder := injective map Enc: MessageSpace → C
Decoder := map Dec: ReceivedSpace → MessageSpace ∪ {FAIL}
Channel := stochastic map P(y|x) on specified input/output alphabets
LinearCode := vector subspace C ≤ F_q^n, q a prime power
GeneratorMatrix := k×n matrix G of rank k over F_q
ParityCheckMatrix := (n−k)×n full-rank matrix H with C = ker(H)
Syndrome := H r^T for received word r ∈ F_q^n
Rate := (log_q M)/n; for linear [n,k] codes, k/n
3. CORE RELATIONS
ENCODES(message, codeword) iff Enc(message)=codeword
MEMBER_OF(codeword, code) iff codeword ∈ C
TRANSMITS(codeword, received_word, channel)
DECODES(received_word, message) iff Dec(received_word)=message
HAMMING_DISTANCE(x,y) := number of differing coordinates, for equal-length words
IS_LINEAR(C,F_q) iff C is a vector subspace of F_q^n
HAS_SYNDROME(r,s) iff H r^T=s
CORRECTS_UP_TO(C,t) if a specified bounded-distance decoder corrects every pattern of at most t symbol errors
DETECTS_UP_TO(C,e) if every nonzero error of weight ≤ e is detectable
4. OPERATIONS
encode(m) -> Enc(m)
transmit(c,channel) -> received word sampled from P(·|c)
distance(x,y) -> d_H(x,y)
minimum_distance(C) -> d(C)
syndrome(r,H) -> H r^T
nearest_neighbour_decode(r,C) -> argmin_{c∈C} d_H(r,c), with tie policy specified
check_codeword(c,H) -> (H c^T = 0)
5. MATHEMATICAL LAWS AND INVARIANTS
L1: d_H(x,y) >= 0; d_H(x,y)=0 iff x=y.
L2: d_H(x,y)=d_H(y,x).
L3: d_H(x,z) <= d_H(x,y)+d_H(y,z).
L4: For |C|>=2 with minimum distance d, guaranteed correction radius t=floor((d−1)/2).
L5: For |C|>=2, every nonzero error pattern of weight at most d−1 is detectable.
L6: Hamming bound: M * sum_{i=0}^t binom(n,i)(q−1)^i <= q^n, with t=floor((d−1)/2).
L7: Singleton bound: M <= q^(n−d+1), equivalently d <= n−k+1 for linear [n,k,d] codes.
L8: For a linear code, d equals the minimum Hamming weight of a nonzero codeword.
L9: For linear codes with G and H, G H^T=0; Enc(u)=uG.
L10: For linear codes, syndrome(r)=syndrome(e) when r=c+e and c∈C.
L11: Binary linear code parity checks are evaluated modulo 2.
L12: The code rate is not, by itself, a guarantee of reliable decoding on an arbitrary channel.
6. INFERENCE RULES
R1: IF d(C)>=2t+1 AND d_H(r,c)<=t for transmitted c THEN bounded-distance decoding uniquely identifies c.
R2: IF r∈F_q^n AND H r^T ≠ 0 THEN r is not a codeword of C.
R3: IF r∈F_q^n AND H r^T = 0 THEN r∈C, but this does not prove no transmission error occurred.
R4: IF C is linear AND nonzero c∈C has weight w THEN d(C)<=w.
R5: IF two codewords have Hamming distance d THEN any claim of guaranteed correction of floor(d/2) or more errors requires checking the unique-decoding bound.
7. SEMANTIC RELATIONSHIPS
CodingTheory SUBDOMAIN_OF DiscreteMathematics
CodingTheory RELATED_TO InformationTheory
CodingTheory RELATED_TO ProbabilityTheory
CodingTheory RELATED_TO LinearAlgebra
ErrorCorrectingCode IS_A Code
LinearCode IS_A ErrorCorrectingCode WHEN minimum distance >= 3
ReedSolomonCode IS_A LinearCode
HammingCode IS_A LinearCode
ConvolutionalCode IS_A ErrorCorrectingCode
LDPCCode IS_A LinearCode
Codeword MEMBER_OF Code
GeneratorMatrix DEFINES LinearCode
ParityCheckMatrix VALIDATES LinearCode
Syndrome SUPPORTS ErrorDiagnosis
8. SEMANTIC_EQUIVALENCE
"error-correcting code" ~ "ECC" [context dependent]
"code rate" ~ "information symbols per transmitted symbol" [linear q-ary block code context]
"minimum Hamming distance" ~ "minimum distance" [Hamming-metric context]
"parity-check matrix" ~ "check matrix" [linear code context]
NOT_EQUIVALENT: encoding ≠ encryption; error detection ≠ error correction; codeword ≠ message.
9. VALIDATION
V1: Check q>=2, n>=1, and 1<=M<=q^n.
V2: Verify all codewords have length n and distinct codewords differ.
V3: Verify encoder injectivity and declared message/code cardinalities.
V4: Verify d by pairwise distance or linear minimum-weight calculation.
V5: Verify G,H dimensions, ranks and G H^T=0 for linear codes.
V6: Verify decoder error guarantees against d and stated channel assumptions.
V7: For singleton codes, require an explicit convention rather than silently computing minimum distance over an empty set.
V8: Distinguish probabilistic channel performance from worst-case error guarantees.
10. WORKED EXAMPLE
Binary repetition code C={000,111}: n=3, M=2, k=1, d=3, rate=1/3.
Distance d_H(000,111)=3.
Corrects any one bit error by nearest-neighbour decoding.
Detects any nonzero error pattern of weight at most two.
Received word 001 has distance 1 from 000 and distance 2 from 111, so decodes to 000.
11. CONFIDENCE
Formal mathematical definitions and stated classical bounds: HIGH under explicit assumptions.
Computed example: HIGH.
Unverified claims about the source page's exact content: NOT_ASSERTED.
12. FLOW_HASH
canonical_input := normalise(TITLE, SOURCE_URL, VERSION, TYPED_ENTITIES, CORE_RELATIONS, LAWS, INFERENCE_RULES, VALIDATION)
FLOW_HASH := SHA256(UTF8(canonical_input))
NOTE: Hash is a deterministic generation rule, not a claimed precomputed digest.
13. UPDATE_MODEL
trigger := mathematical correction | terminology revision | source page update | ontology cross-link change
procedure := validate changes -> increment version -> regenerate canonical input -> recompute FLOW_HASH -> archive prior version
provenance := maintain change log and distinguish source-derived statements from mathematical synthesis
14. AI_CONSUMPTION
parse_mode: UTF-8 plain text
reasoning_mode: typed symbolic relations + assumption-aware inference
required_checks: alphabet, block length, metric, linearity, decoder type, channel model
output_policy: show assumptions; verify numerical bounds; flag ambiguity; never infer channel reliability from minimum distance alone
cross_links: Discrete Probability; Linear Algebra; Graph Theory; Boolean Algebra; Information Theory
END FLOW ALGEBRA