Lemma 7.3 — creates a false occurrence with probability
ProvedExactPatternStream.lemma_7_3fingerprintingp2o-gran-per-chapterp2o-plan-paperp2o-v1pattern-matchingrandomized-algorithmsstreaming-algorithmsstring-algorithms
Let be a finite field, , and , , . If is uniform in , then
Reusing one seed pair per round keeps the seed short, at the cost of only logarithmic factors.
Differences from the source:
- encoding: → one absolute before all variables, with ; reason: the same bounds up to a constant
Preamble
import Mathlib import Definitions.Def_ExactPatternStream_Strings import Definitions.Def_ExactPatternStream_LinearMaps import Definitions.Def_ExactPatternStream_HashFamily
Formal statement
namespace ExactPatternStream
/-- Gawrychowski, Janczewski, Jin, Nelson, *An Improved Streaming Algorithm for Exact Pattern Matching* (preprint, STOC 2027 submission, sha256 351218cb…), Lemma 7.3, p.18 (PDF 19).
For a finite field `F`, `d ≥ 3`, `P ∈ (F^d)^m`, `T ∈ (F^d)^n`, `1 ≤ m ≤ n`, a uniform seed `s ∈ (F²)^D` of Definition 7.2 has `Pr[Occ(P, T) ≠ Occ(R_s(P), R_s(T))] = O((n/m) log d log(md)/|F|)`.
**Formalization Note.** `R_s` is applied coordinatewise to the symbols. It returns the list of its two output coordinates. `O(·)` is an absolute `K` before the field and `d`; `log₂`. -/
theorem lemma_7_3 : ∃ K : ℝ, ∀ (F : Type*) [Field F] [Fintype F] [DecidableEq F] (d : ℕ)
(P T : List (Fin d → F)), 3 ≤ d → 1 ≤ P.length → P.length ≤ T.length →
unifProb (fun s : Fin (roundsD d) → F × F => occ P T ≠ occ (P.map (rs s)) (T.map (rs s))) ≤
K * ((T.length : ℝ) / P.length) * Real.logb 2 d * Real.logb 2 ((P.length : ℝ) * d) /
(Fintype.card F : ℝ) := by sorry
end ExactPatternStream
Source
Gawrychowski, Janczewski, Jin, Nelson, An Improved Streaming Algorithm for Exact Pattern Matching (preprint, STOC 2027 submission, sha256 351218cb…), Lemma 7.3, p.18 (PDF 19)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.