A complete pattern pass installs the canonical hierarchy rows
ProvedExactPatternStream.ImplementationProof.full_training_rowsexact-pattern-matchingstreaming-algorithmsword-ram
Fix a nonempty pattern , a text with , the level seeds and a residual hash parameter . Start with empty row storage and the initial guard probe, feed the symbols of to the training procedure and finish the training pass. If is the top level of the seeded parse, the stored list consists of exactly the rows for levels , in that order.
Preamble
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open OnlineReport SoundProof CompletenessProof Dispatch
Formal statement
theorem ExactPatternStream.ImplementationProof.full_training_rows {σ p : ℕ} (P T : List (Fin σ)) (seed : Seeds σ P.length)
(a : ZMod p) (hm : 1≤ P.length) (hmn : P.length≤ T.length) (hn : T.length≤2*P.length) :
let B := seededBuild P T seed
let initial : TrainingState LaneMemory p := .reading [] [] ⟨P.length+2,0,1,.symbol .guard,(0,0)⟩
let z := afterTraining ((P.map Fin.val).foldl (trainingTick (canonicalRowInstaller seed T.length) a) initial)
z.rows=(List.range (topIndex B)).map (fun i=> hierarchyRow (lvl B i)) := 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.TrainingPrefixRows, declaration full_training_rows.