The short-key marker loop stops before the final virtual child
ProvedExactPatternStream.ImplementationProof.sweep_short_marker_prefixLet 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. At a live level of either parse, take a short-key group of size with distinct trigger labels. Let positions lie in the padding generated by one real arrival, where is the group’s last slot. The row is ready at , the marker counter contains , and the specified word, address and layout bounds hold. From entry the loop reaches
Register 37 contains the level marker, ready for the final close. Every earlier virtual child in the indicated interval has been absorbed into the persistent short row. The loop satisfies its marker-workspace frame even when there are no intermediate children.
import Definitions.Def_ExactPatternStream_StreamingImplementation open ExactPatternStream open ExactPatternStream.ImplementationProof open CounterProof DynBrooks MachineProof SoundProof PackedRAM CompletenessProof HashProof GroupReader
theorem ExactPatternStream.ImplementationProof.sweep_short_marker_prefix {σ 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) (tape : ℕ→BitVec w)
(base start : ℕ) (safe : 152≤ base) (L : Level) (atLevel : L=lvl (seededBuild P T seed) j)
(S : List ParseTree) (A : List Bool) (side : (S=L.P ∧ A=L.AP) ∨ (S=L.T ∧ A=L.AT))
(idx raw begin last : ℕ) (actual : raw< S.length) (distinct : L.u≠L.v)
(group : ShortGroupTrace w σ P.length T.length L)
(children : group.children=counterChildLabels L S A idx) (values : group.values=payloadCounterInputs σ P.length L S A idx)
(shortMode : (L.c+2)*levelBits σ P.length L.i≤ hashB σ P.length)
(cursor : group.foot start<2^w) (cap : base+group.foot start/w+1<2^w)
(within : idx*(L.c+2)≤ begin) (finalSlot : last+1=(idx+1)*(L.c+2))
(afterReal : padRho (labels S) A L.u L.c L.v raw< begin)
(beforeNext : last< padRho (labels S) A L.u L.c L.v (raw+1)) (order : begin≤ last)
(a : Config w) (pc : a.pc=pre.length) (ready : group.Ready base start (begin%(L.c+2)) a)
(number : (a.mem 150).toNat=last-begin+1) (small : 2*(last-begin+1)<2^w) :
let absorb:=sweepShortAbsorb (pre.length+14)
let Q:=pre++sweepMarkerPrefix pre.length absorb++post
∃ d,Reach Q tape a d ∧ d.pc=pre.length+390 ∧ group.Ready base start (L.c+1) d ∧
d.mem 37=packedLabelWord w σ P.length L.i (.marker L.i) ∧ (d.mem 150).toNat=0 ∧
MarkerEffect base start (group.foot start+5) (shortMarkerArena group base start) a d := by sorry