Uniform seeds for the public pattern bootstrap and later locks
ProvedExactPatternStream.ImplementationProof.public_trained_first_readexact-pattern-matchingstreaming-algorithmsword-ram
Let be the pattern and text, with lengths , , over an alphabet of size . The machine uses words of bits.
Given a minimum multiplier , choose a common word multiplier
and three uniform charge constants. In the public trained-loop layout the fixed joint seed function has the uniform law. On a common probability-one set of tapes it provides the bootstrap handoff, the first trained pattern read and the transitions at later prefix locks, all for the same sampled seeds and program.
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.public_trained_first_read (k : ℕ) (minimum : ℕ := 0) : ∃ cw K₀ K₁ K₂ : ℕ, max minimum (2048*(k+1))≤ cw ∧ ∀ {σ : ℕ}
(P T : List (Fin σ)) (hm : 1≤ P.length), P.length≤ T.length → T.length≤2*P.length →
3≤ T.length → σ≤ T.length^k → ∀ (noChange : ℕ) (sweep text : Program) (rawExit : Option ℕ),
let m:=P.length
let n:=T.length
let w:=cw*ell n
let pr : ℕ:=residualPrime n m σ
letI : NeZero pr:=⟨(residualPrime n m σ).property.ne_zero⟩
let callback:=3312+sweep.length
let dispatch:=callback+2858
let setup:=dispatch+4
let Q:=publicTrainedLoop noChange sweep text rawExit
∃ (hf : hashPrime (hashB σ m)≤2^w) (rf : pr≤2^w),
let Φ:=fun ω=>((filledSeedDraw σ m pr w hf rf).run ω).1
(∀ E : Set (Seeds σ m×ZMod pr),MeasurableSet (Φ ⁻¹' E) ∧
coinMeasure w (Φ ⁻¹' E)=ENNReal.ofReal (unifProb (fun z=> z∈E))) ∧
∀ᵐ ω ∂coinMeasure w,PublicBootHandoff P T hm Q setup (rawExit.getD (setup+200)) K₀ ω (Φ ω) ∧
PublicFirstPatternRead P T hm Q K₂ ω (Φ ω) ∧ PublicPrefixLockHandoff P T Q callback dispatch K₁ ω (Φ ω) := by sorrySource
Gawrychowski, Janczewski, Jin and Nelson, An Improved Streaming Algorithm for Exact Pattern Matching, STOC 2027 submission, §9, Lemma 9.2, p. 29 (PDF p. 30). Derived implementation lemma in Stage.AlternatePublicBoot, declaration public_trained_first_read.