A relocated group evaluator implements one actual hierarchy child
ProvedExactPatternStream.ImplementationProof.placed_group_childstreaming-algorithmsstring-algorithmsword-ram
Take a nonfinal level with at most the learned height of the seeded hierarchy of a pattern and text of lengths , . The alphabet has size and the word width is at least . For either the pattern or text parse, select a valid child at this level and the actual next-level parent sequence. Suppose the short and long bodies are placed at the normalized group site, with the prescribed bounds for the packed row, its opening and the arena up to height . From a correctly represented row the code implements the child transition and returns at
The row then represents the next child ordinal. When present, the parent is returned together with its activity bit. The run preserves the required caller state and respects its arena.
Preamble
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open DynBrooks MachineProof PackedRAM CounterProof HashProof SoundProof SeedRow OnlineReport MeasureTheory MainProof
Formal statement
theorem ExactPatternStream.ImplementationProof.placed_group_child {σ w k i h entry : ℕ} (P T : List (Fin σ)) (s : Seeds σ P.length)
(hm : 1≤ P.length) (mn : P.length≤ T.length) (twice : T.length≤2*P.length) (hn : 3≤ T.length)
(alpha : σ≤ T.length^k) (wide : 2*(64*(k+1)+33)*ell T.length≤ w)
(hi : i< h) (live : h≤ topIndex (seededBuild P T s)) (Q : Program) (ω : Tape w)
(sites : PatternNormalizedAt Q entry physicalShortRow physicalLongRow) :
let B:=seededBuild P T s
let L:=lvl B i
let D:=lvl B (i+1)
let base:=promotionHeapBase w σ P.length
let start:=trainedPayloadStart σ P.length T.length B i
let arena:=trainedParentArena w σ P.length T.length B h
CountedChildBounds w σ P.length T.length i base start L arena →
GroupOpenBounds w σ P.length T.length base start L arena →
∀ (S : List ParseTree) (A : List Bool) (parents : List ParseTree),
((S=L.P ∧ A=L.AP ∧ parents=D.P) ∨ (S=L.T ∧ A=L.AT ∧ parents=D.T)) →
∀ (j : ℕ) (valid : j< S.length),
GroupChildKernelAt s Q ω T.length base i start entry (entry+8490) L S A parents j valid arena := 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/CountedCompleteMachine.lean, lines 15–61.