How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Prefix Codes and Finite Lossless Coding — Examples
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Countability and Uncountability
- Decidable, Recognizable, and Enumerable Languages
- Finite Counting, Factorials and Binomial Coefficients
- Finite Probability Spaces and Random Variables
- Finite-Alphabet Entropy and Divergence
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Kolmogorov Complexity and Algorithmic Randomness
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Recurrences and Rational Generating Functions
- Metric Spaces
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Order, Zorn's Lemma, and the Axiom of Choice
- Power and sample size
- Power Series and Real-Analytic Functions
- Prefix Codes and Finite Lossless Coding
- Properties of the Integral and the Working FTC
- Quantum Communication and Fingerprinting
- Relations, Functions, and Quotients
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Exponential Function
- The Logarithm and General Powers
- The Riemann Integral: Definition and Integrability
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
- Turing Machines, Configurations, and Computation
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Summary
These examples work an exact three-symbol Huffman tree, a uniquely decodable code that is not prefix-free, and one rational arithmetic-coded block. The code-tree and interval diagrams explain their conventions; the verification arguments use the displayed words, integer updates, and rational inequalities directly.
3 · Logical flowchart
4 · Definitions, theorems and proofs
None yet.
5 · Examples, counterexamples and false statements
A uniquely decodable binary code that is not prefix-free
Facts & Assumptions
Given: The binary code on the two-symbol alphabet defined by and .
Finite binary source codes, extension, and expected length: The extension concatenates the codewords, and the code is uniquely decodable exactly when this extension is injective on all finite source words.
Binary prefix codes and their code trees: A prefix code has no codeword that is a proper prefix of a different codeword.
McMillan inequality for finite binary uniquely decodable codes: Every finite binary uniquely decodable code satisfies .
Example
The word is itself assigned to symbol 1 and is also the first bit of the word assigned to symbol 2. Thus the code fails the prefix condition. The next verification shows that the two codewords still admit a unique parse.
Verification
The codeword is a proper prefix of , so [F2] shows this code is not prefix-free.
Every codeword begins with . If an encoded word begins with , its first codeword must be , since choosing would leave an unread suffix beginning with , and no codeword begins with . If the unread word begins with , or consists only of , its first codeword must be . Repeating this forced rule on the remaining suffix consumes one or two bits at each step and ends after finitely many steps; the empty word is produced only by the empty source word. Hence every encoded word has a unique source parse, and [F1] gives unique decodability.
The lengths are and , so the Kraft sum is , consistent with [F3]; this calculation is only a necessary-bound check, while unique decodability was proved in step 1.2.
Exact rational interval coding of the block AB
Facts & Assumptions
Given: Alphabet order , rational frequencies with , maximum and fixed frame length , and input block .
Exact finite-register arithmetic coding for rational block sources: At symbol , the update is and ; the output uses the largest with , then and .
The rational finite-register arithmetic code is prefix-free and lossless: The finite decoder returns exactly the encoded block.
Finite discrete sources and product blocks: The block law is the product of the one-symbol probabilities.
Example
With and a length-two frame, the interval for should be . The emitted codeword is , whose dyadic cell is strictly inside that interval.
The diagram uses horizontal position for the real coordinate on . The upper bar is the source interval for ; the lower bar is the dyadic cell represented by . It illustrates the exact rational comparisons below but is not used as proof.
Verification
For the first symbol , , so the update from gives . For the second symbol , and , so . With , the source interval is ; its width equals by [F3].
Since , the largest admissible is and the payload length is . The midpoint is , hence and its four-bit representation is . Also because , so the emitted four-bit word obeys the configured limit.
The dyadic cell of is . Exact comparisons give and , so this cell is inside . By [F2], the decoder returns uniquely.
Huffman tree for a dyadic three-symbol source
Facts & Assumptions
Given: The source on symbols and the deterministic Huffman procedure.
Deterministic binary Huffman coding: Equal weights are ordered by increasing serial number; the first selected node is the left child and the second is the right child.
Huffman expected length is within one bit of entropy: If , then .
The deterministic Huffman code is prefix-optimal: The deterministic Huffman procedure returns a binary prefix code minimizing among all binary prefix codes on the same alphabet.
Change of base and inversion of the positive-base real exponential: for every real .
Example
The weights of symbols 2 and 3 are tied for least, so the first merge combines them. The final tie is between symbol 1 and the merged node; the serial rule puts symbol 1 on the left. The code tree uses edge labels 0 on the left and 1 on the right; each leaf label is a source symbol, and reading its root path gives its codeword.
The diagram records the tree structure and edge convention; the verification below computes the codewords and lengths directly.
Verification
The first merge combines 2 and 3 into a node of weight . The active nodes are then and the merged node of weight ; the serial tie-break puts 1 on the left and the merged node on the right. Thus , , and .
These lengths are , so [F2] gives . By [F6] and [F7], and , so [F3] gives as well, which satisfies the two-sided bound [F4]; [F5] confirms the optimal prefix-code conclusion.