The streaming parent evaluator agrees with the parse-tree hash
ProvedExactPatternStream.ImplementationProof.canonical_chunksexact-pattern-matchingstreaming-algorithmsword-ram
Fix a pattern of length , a text of length , and one vector of level seeds. At a nonterminal level , take a complete padded group from either the pattern or the text. The evaluator reads the level seed for the group key length and returns exactly the parent label prescribed by the seeded parsing rule, including its hash, its counter and its annotation.
Preamble
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open SoundProof CompletenessProof
Formal statement
theorem ExactPatternStream.ImplementationProof.canonical_chunks {σ : ℕ} (P T : List (Fin σ)) (ω : Seeds σ P.length)
(hm : 1≤ P.length) (hmn : P.length≤ T.length) (hn : T.length≤2*P.length)
(j : ℕ) (hj : j< topIndex (seededBuild P T ω)) :
let L:=lvl (seededBuild P T ω) j
let keyLen:=L.g*levelBits σ P.length L.i
let ev:=canonicalParent σ P.length L.i L.c T.length L.u L.v
∀ (S : List ParseTree) (A : List Bool), ((S=L.P ∧ A=L.AP) ∨ (S=L.T ∧ A=L.AT)) →
∀ X ∈ chunks id (pad (labels S) A L.u L.c L.v (.marker L.i)).1 L.g,
ev.run (levelSeed ω L.i keyLen) X=seededF ω L.i L.u L.v L.c X := by sorrySource
Gawrychowski, Janczewski, Jin and Nelson, An Improved Streaming Algorithm for Exact Pattern Matching, STOC 2027 submission 1330, section 9, Lemma 9.2, pp. 27–29 (PDF pp. 28–30). Derived implementation result in Stage.OnlineParentCorrect, declaration canonical_chunks.