Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-generatedPipeline-generated
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 q≥2.

[F1]

Finite-block LZ78 incremental prefix code: each record is (parent dictionary index, next symbol); the final record contains the unique terminator #.

[F2]

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].

1.1F1givenalgebra

Every dictionary entry is an ordinary word over A. 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 n+1 records, at a final marker record. If an ordinary phrase wc were already in the dictionary, it would be a longer dictionary prefix than the selected w, contradicting the longest-prefix rule. Thus ordinary inserted phrases are distinct; the terminal phrase contains # and is distinct from them.

1.2F1F2givenconstruct

For a parent index i≥0, put m=i+1, b=⌊log⁡2m⌋+1 and d=⌊log⁡2b⌋+1. The Elias-gamma code of b consists of d−1 zeros followed by the d-bit binary expansion of b. Its first 1 reveals d, after which exactly d−1 more bits complete b. Append the final b−1 bits of the binary expansion of m to form its Elias-delta code; the decoder restores the leading 1 of m and then returns i=m−1. 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 m=1,2,4 the codes are respectively 1, 0100, and 01100, so the case b=1 has an empty suffix but still a nonempty header. Appending a fixed-width ⌈log⁡2(q+1)⌉-bit symbol field gives an unambiguously delimited nonempty record.

2.1F1F2step 1.1step 1.2algebra

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.

3.1F1step 1.1step 1.2algebra∎

The exact index length is 2d−1+(b−1)=b+2d−2=b+2⌊log⁡2b⌋. At phrase number j≥1, the parent satisfies 0≤i<j, hence m≤j and b≤log⁡2(j+1)+1. Since b≤2log⁡2(j+2), its length is at most log⁡2(j+1)+2log⁡2log⁡2(j+2)+3. Thus, writing sq=⌈log⁡2(q+1)⌉, the N output records, including the final marker record, have total bit length at most N[log⁡2(N+1)+2log⁡2log⁡2(N+2)+3+sq]. This is O(Nlog⁡(N+1)), with the same bound valid for every small index including i=0. The final record is encoded and counted even though its phrase is not inserted into the dictionary.

Depends on

Used by

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