Correctness of the recursive local search
ProvedDirKECC1549.Asm.lsCall_specFor every level , a call of the local-search procedure from a memory satisfying the precondition LPre at level meets the postcondition LPost (context kept, found sets correct, completeness for good histories, time at most ), proved by induction on .
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.lsCall_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)
(hcut : ∀ X : Finset (Fin n), v ∈ X → s ∉ X → K ≤ outCount B X)
(hE : EnvOK E lsBody) (hs : ∀ x ∈ E.sites, x < 2 ^ w.bits) :
∀ r i, K - i = r → i ≤ K → ∀ (F : Finset (Fin m)) (q : Memory w),
LPre P orig B perm v s K Δ FR W i F q →
Run E .call q (fun t q' => LPost P orig B perm v s K Δ FR W E.sites.length i F q t q') := by sorry