Both scanner copies contain the relocated group kernel and timing accumulator
ProvedExactPatternStream.ImplementationProof.physical_row_call_sitesstreaming-algorithmsstring-algorithmsword-ram
Let be the fixed counted streaming program, the pattern scanner’s row entry, and the text scanner’s row entry. At each entrance , the program contains the normalized group code with the prescribed short and long callbacks, followed by the eight-instruction timing accumulator at
This checks instruction placement for both copies in the very same program. A local correctness result for either evaluator can therefore be applied during pattern training and during text scanning.
Preamble
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open DynBrooks MachineProof PackedRAM CounterProof SoundProof SeedRow OnlineReport
Formal statement
theorem ExactPatternStream.ImplementationProof.physical_row_call_sites :
(PatternNormalizedAt countedPhysicalProgram physicalPatternEntry physicalShortRow physicalLongRow ∧
NormalizedCodeAt countedPhysicalProgram (physicalPatternEntry+8490) (textAccumulateCode (physicalPatternEntry+8490))) ∧
(PatternNormalizedAt countedPhysicalProgram physicalTextEntry physicalShortRow physicalLongRow ∧
NormalizedCodeAt countedPhysicalProgram (physicalTextEntry+8490) (textAccumulateCode (physicalTextEntry+8490))) := 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/CountedPhysicalSites.lean, lines 43–48.