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.
Losslessness and prefix property of the explicit LZ78 code
Statement
Proves the specified parser terminates on every finite input, its ordinary complete phrases are distinct, and its finite-block LZ78 record stream is prefix-free and decodes the original block exactly, including the explicit terminal symbol.
Facts & Assumptions
Given: The LZ78 parser and terminated record convention of Finite-block LZ78 incremental prefix code, over an alphabet of size .
Finite-block LZ78 incremental prefix code: each record is (parent dictionary index, next symbol); the final record contains the unique terminator .
Binary prefix codes on finite supports: nonempty prefix-free component codewords can be parsed in a concatenation without knowing the message count; the empty singleton exception applies only with a known count or one known block.
Proof
Given: The algorithm and symbol/record conventions [F1]–[F2].
Every dictionary entry is an ordinary word over . While unread text remains it ends in , which no dictionary word contains; the root is a prefix and the finite dictionary therefore has a longest matching prefix with a following symbol. Each iteration removes at least one symbol, so from the finite input followed by the parser terminates after at most records, at a final marker record. If an ordinary phrase were already in the dictionary, it would be a longer dictionary prefix than the selected , contradicting the longest-prefix rule. Thus ordinary inserted phrases are distinct; the terminal phrase contains and is distinct from them.
For a parent index , put , and . The Elias-gamma code of consists of zeros followed by the -bit binary expansion of . Its first reveals , after which exactly more bits complete . Append the final bits of the binary expansion of to form its Elias-delta code; the decoder restores the leading of and then returns . Thus the gamma header determines exactly how many suffix bits to read. No codeword can be a proper prefix of another, because identical headers determine the same suffix length. For the codes are respectively , , and , so the case has an empty suffix but still a nonempty header. Appending a fixed-width -bit symbol field gives an unambiguously delimited nonempty record.
The decoder lookup and dictionary update of [F1] recover each phrase. Since appears exactly once as the final symbol, decoding stops at the first such field, and a valid terminated codeword cannot be a proper prefix of another valid terminated codeword. Thus the concatenated records form a lossless prefix code on finite input words after termination.
The exact index length is . At phrase number , the parent satisfies , hence and . Since , its length is at most . Thus, writing , the output records, including the final marker record, have total bit length at most . This is , with the same bound valid for every small index including . The final record is encoded and counted even though its phrase is not inserted into the dictionary.
Depends on
Used by
- LZ78 parsing of a finite binary word Example
- Distinct-phrase count and Ziv inequality Lemma
- LZ78 expected-rate universality for stationary sources Theorem
- LZ78 finite-state optimality for individual sequences Theorem
Cited to discharge well-definedness by Finite-block LZ78 incremental prefix code.
Dependency tree · two levels
3 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Stanford EE376C, Lempel-Ziv Compression lecture notes (standard reference, not scraped)