The leaf of the local search
ProvedDirKECC1549.Asm.lsLeaf_specAt level , the leaf runs the terminal search with budget and returns: the found flag is set when a good reversal history of length exists, a reported set is a -out set of volume containing and not , and the time is at most .
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_L1Ls3
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.lsLeaf_spec (E : Env) (orig : Memory w) (hm : 0 < m) (P : LP) (B : Fin m → Fin n × Fin n)
(perm : Equiv.Perm (Fin m)) (v s : Fin n) (K Δ FR W : ℕ) (hL : LsLay P n m K Δ FR W w.bits) (hsv : s ≠ v)
(F : Finset (Fin m)) (q : Memory w) (hpre : LPre P orig B perm v s K Δ FR W K F q) (h1 : (q 1).toNat = K) :
Run E lsLeaf q (fun t q' => LsC P orig q' B perm F ∧ VisZero n P q' ∧
(∀ a, KeepLS P m FR W K K a → q' a = q a) ∧ q' (FR + K * W) = q (FR + K * W) ∧
(q' 5).toNat = FR + K * W ∧ (q' (P.SV + 38)).toNat = FR + K * W ∧ LsFound P B v s K Δ q' ∧
(LsGood B v s K Δ F K → (q' (P.SV + 42)).toNat = 1) ∧
t ≤ 50 * (K * (Δ + 2)) + 500 * (Δ + 1) + 450) := by sorry