Soundness and completeness of leafProg and compressProg #
This module combines MinSep and LeafSubroutines to prove leafProg_spec (soundness),
leafProg_complete_at (completeness via the base-3 odometer digit bijection), and the overall
compressProg_spec theorem.
Main definitions #
Cslib.Algorithms.WordRAM.OddCycleTransversal.OctStateAt: inductive invariant onsepBaseandcolBaseforprefixGraph G m.
Main results #
Cslib.Algorithms.WordRAM.OddCycleTransversal.compressProg_spec:compressProgreturns1and materializes an odd cycle transversal of size≤ kiffprefixGraph G madmits one.
def Cslib.Algorithms.WordRAM.OddCycleTransversal.OctStateAt {n : ℕ} (G : SimpleGraph (Fin n)) (m k : ℕ) (t : DataStructure.Memory.State) :
Invariant asserting a valid transversal of prefixGraph G m of size ≤ k at sepBase and
proper 2-colouring off it at colBase.
theorem Cslib.Algorithms.WordRAM.OddCycleTransversal.OctStateAt.congr {n : ℕ} {G : SimpleGraph (Fin n)} {m k : ℕ} {s₁ s₂ : DataStructure.Memory.State} (h : OctStateAt G m k s₁) (heq : ∀ (a : ℕ), sepBase n ≤ a → a < wBase n → s₂.mem a = s₁.mem a) :
OctStateAt G m k s₂
theorem Cslib.Algorithms.WordRAM.OddCycleTransversal.compressProg_spec {n k m L : ℕ} {G : SimpleGraph (Fin n)} [DecidableRel G.Adj] {Wset : Finset (Fin n)} {s : DataStructure.Memory.State} (hG : MatrixLoaded G s) (hW : WListSpec Wset L s) (hcol01 : ∀ (v : Fin n), s.mem (colBase n + ↑v) ≤ 1) (hc₀_prop :
∀ (u v : Fin n),
(Lean.IterativeCompression.prefixGraph G m).Adj u v →
u ∉ Wset → v ∉ Wset → (s.mem (colBase n + ↑u) == 1) ≠ (s.mem (colBase n + ↑v) == 1)) :
have res := (DataStructure.Memory.spec 0).clientResult s (compressProg (((n, k), m), L));
have t := (DataStructure.Memory.spec 0).clientState s (compressProg (((n, k), m), L));
(∀ a < sepBase n, t.mem a = s.mem a) ∧ res ≤ 1 ∧ (res = 1 → OctStateAt G m k t) ∧ ((∃ (T : Finset (Fin n)), (Lean.IterativeCompression.prefixGraph G m).IsOddCycleTransversal ↑T ∧ T.card ≤ k) →
res = 1)
Soundness and completeness of the base-3 odometer compression search compressProg.