The short-key sweep implements a full arrival with padding
ProvedExactPatternStream.ImplementationProof.sweep_short_evaluatorLet and have lengths with , over an alphabet of size . Fix the hierarchy seed and a word width , where is the integer logarithmic length used by the implementation. Fix a valid raw child of either parse below the top level. Its short group has size and an encoded key fitting the hash width. The packed row, trigger, countdown, children, counter values and incoming label match the hierarchy at this arrival. Assume the stated word and address bounds, and sufficient charged space for the control, marker and close callbacks. If is the slot and the number of virtual padding children, the return slot is
At the specified return address the updated row represents this slot, register 21 contains the actual padding and register 22 says whether the parse keeps a parent. Whenever it does, the evaluator also delivers that parent’s packed label and activity. The caller’s frame and stream cursors are preserved.
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open DynBrooks MachineProof CounterProof PackedRAM HashProof SoundProof CompletenessProof
theorem ExactPatternStream.ImplementationProof.sweep_short_evaluator {σ w exponent : ℕ} (P T : List (Fin σ)) (seed : Seeds σ P.length)
(hm : 1≤ P.length) (hmn : P.length≤ T.length) (short : T.length≤2*P.length)
(hn : 3≤ T.length) (alphabet : σ≤ T.length^exponent) (word : 2*(64*(exponent+1)+33)*ell T.length≤ w)
(j : ℕ) (live : j< topIndex (seededBuild P T seed)) (pre post : Program) (ω : ℕ→BitVec w)
(base start ret : ℕ) (safe : 456≤ base) (L : Level) (lev : L=lvl (seededBuild P T seed) j)
(S : List ParseTree) (A : List Bool) (parents : List ParseTree)
(side : (S=L.P ∧ A=L.AP ∧ parents=(lvl (seededBuild P T seed) (j+1)).P) ∨
(S=L.T ∧ A=L.AT ∧ parents=(lvl (seededBuild P T seed) (j+1)).T))
(raw : ℕ) (valid : raw< S.length) (g : ShortGroupTrace w σ P.length T.length L)
(old : (g.trigger,g.countdown)=countedCursor L S A raw)
(mode : (L.c+2)*levelBits σ P.length L.i≤ hashB σ P.length) (cursor : g.foot start<2^w) (cap : base+g.foot start/w+1<2^w)
(room : 3*Nat.clog 2 (L.c+2)+1≤ w) (wide : 2≤ w) (guard : 2*(L.c+2)<2^w) :
let pos:=countedOrdinal L S A raw
let idx:=pos/(L.c+2)
let slot:=pos%(L.c+2)
let x:=S[raw].label
let f:=g.after x
let pad:=ordinalPadding L S A raw x
let ends:=slot+1+pad=L.c+2
let Q:=pre++sweepShortEvaluator pre.length ret++post
∀ (area : Finset ℕ),laneControlCells base start w σ P.length L.i L.c⊆area → shortMarkerArena f base start⊆area →
f.closeCells base start⊆area → Finset.range 48⊆area →
g.children=counterChildLabels L S A idx → g.values=payloadCounterInputs σ P.length L S A idx →
∀ a : Config w,a.pc=pre.length → g.Ready base start slot a → a.mem 37=packedLabelWord w σ P.length L.i x →
f.response Q ω base start (if ends then 0 else slot+1) ret pad (keptParent L S A parents raw x) area a := by sorry