The first pattern promotion branches to the next read or the trained phase
ProvedExactPatternStream.ImplementationProof.first_public_advance_at_leaststreaming-algorithmsstring-algorithmsword-ram
For any polynomial alphabet exponent and requested minimum word multiplier , choose and a constant . For inputs of lengths with and alphabet size at most , the canonical random-tape draw has the uniform joint law of hierarchy seeds and a residual field element. Almost surely, if the pattern is nonconstant and its first change is at zero-based position , consuming that symbol installs the first promotion record and reaches
The state contains the correct level-one head, top control and sampler cursor, and has empty input and output buffers. From feeding this symbol to the return, the space used at every clock is at most . The program may be followed by arbitrary code.
Preamble
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open DynBrooks MachineProof PackedRAM CounterProof HashProof SoundProof OnlineReport SeedRow MeasureTheory
Formal statement
theorem ExactPatternStream.ImplementationProof.first_public_advance_at_least (k minWidth : ℕ) :
∃ cw K : ℕ,minWidth≤ cw ∧ FirstPublicAdvanceAt k cw K := by sorrySource
Derived word-RAM implementation lemma for Gawrychowski, Janczewski, Jin and Nelson, An Improved Streaming Algorithm for Exact Pattern Matching, STOC 2027 submission 1330, §9, Lemma 9.2, p. 29 (PDF p. 30). Accompanying Lean formalization, InProgress/Stage/FirstPublicAdvance.lean, lines 67–149.