Fact 8.9 — a substring with no earlier occurrence contains an LZ77 phrase start
ProvedDynLZ77.Main.fact_8_9lempel-zivp2o-gran-per-chapterp2o-plan-paperp2o-v1string-algorithms
Let be a string and a substring () that does not occur at any position . Then some phrase starts inside it:
This is [Lew13, Lemma 3], the usual basis of LZ77-compressed indexes; in §8 it places a phrase start inside every leftmost occurrence.
Differences from the source:
- reading: a substring S[i..j] → 1 ≤ i ≤ j ≤ |S|; reason: p. 15 calls S[i..j] the substring that starts at index i and ends at index j, so it is nonempty; for an empty S[1..0] the conclusion has no position to offer
- encoding: phrase [x..y] ∈ LZ77(S) → (x, y) ∈ LZ77 S; reason: phrases are position pairs
Preamble
import Mathlib import Definitions.Def_DynLZ77_Main_Strings import Definitions.Def_DynLZ77_Main_Structure set_option autoImplicit false
Formal statement
namespace DynLZ77.Main
/-- **Fact 8.9** (p. 50). If the substring `S[i..j]` does not occur at any position `i′ < i`, some
phrase `[x..y]` of `LZ77(S)` starts at a position `x ∈ [i..j]`. -/
theorem fact_8_9 {α : Type} [DecidableEq α] (S : List α) (i j : ℕ) (hi : 1 ≤ i) (hij : i ≤ j)
(hj : j ≤ S.length)
(hnew : ∀ i' : ℕ, 1 ≤ i' → i' < i → sub S i' (i' + (j - i)) ≠ sub S i j) :
∃ x y : ℕ, (x, y) ∈ LZ77 S ∧ i ≤ x ∧ x ≤ j := by sorry
end DynLZ77.Main
Source
Boneh, Fried, Golan, Kraus, Dynamic LZ77: No Space for Improvement, STOC 2027 submission (manuscript sha256 2a15e146…), p. 50 (PDF 52), Fact 8.9
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.