One step of the local-search DFS in word-RAM code
ProvedDirKECC1549.Asm.dsStepP_specIf the stack is nonempty, dsStepP realizes one abstract DFS step of flipEdges B F over the adjacency lists adjOf: the new memory represents the next state and keeps the context, and the time plus 50 times the new skip potential is at most 200 plus 50 times the old potential.
Context. This lemma belongs to the machine-checked word-RAM implementation of Lemma 1 (p.11): Algorithm 1 refining by small -out sets, with the deterministic local search of [GKK+26, Proposition 6] (FindOutPaths and recursive path reversals). The program is written in the structured language Stmt compiled to the published word-RAM; Run E s mem Q states that the statement s, started on mem, reaches its end in a state satisfying Q t mem' within t ticks. The input cells double as registers; they are saved at SV and read through the image ImgAt. All definitions are in the Definitions.Def_DirKECC1549_Impl_* modules.
import Definitions.Def_DirKECC1549_Impl_L1Step4
set_option autoImplicit false
open WordRAM Classical Finset
open DirKECC1549.Main DirKECC1549.Main.CostAux
open DirKECC1549 DirKECC1549.Asm
variable {w : Width} {n m : ℕ}theorem DirKECC1549.Asm.dsStepP_spec (E : Env) (mm orig : Memory w) (hm : 0 < m) (P : LP) (B : Fin m → Fin n × Fin n)
(perm : Equiv.Perm (Fin m)) (F : Finset (Fin m)) (Ep : ℕ) (v : Fin n) (st : DS n m)
(hC : LsC P orig mm B perm F) (hD : DRep hm P B perm F Ep v st mm)
(hI : DInv (flipEdges B F) (adjOf B perm F (inL hm (fun x => its B x) P.CF P.IN mm)) v st)
(hA : AdjOK (flipEdges B F) (adjOf B perm F (inL hm (fun x => its B x) P.CF P.IN mm)))
(hne : st.stk ≠ []) :
Run E dsStepP mm (fun t mm' =>
t + 50 * phiD P B perm F (dsStep (flipEdges B F) (adjOf B perm F (inL hm (fun x => its B x) P.CF P.IN mm)) st) mm'
≤ 200 + 50 * phiD P B perm F st mm ∧
DRep hm P B perm F Ep v (dsStep (flipEdges B F) (adjOf B perm F (inL hm (fun x => its B x) P.CF P.IN mm)) st) mm' ∧
(∀ a, (13 ≤ a ∧ a ≤ 25) ∨ a = 27 ∨ (28 ≤ a ∧ a < P.VIS) ∨ P.CF ≤ a → mm' a = mm a)) := by sorry