Internal subroutine cost, admissibility, frame, and accumulator bounds #
Memory-operation counts, ValidHistory, preservation frames, and cut-accumulator bounds for the
internal subroutines (roundStep, cutOuterStep, augStep) of
Cslib.Algorithms.WordRAM.EdmondsKarp. Imported privately by
CslibFrontier.Algorithms.WordRAM.EdmondsKarp.Spec.
Memory-operation counts #
theorem Cslib.Algorithms.WordRAM.EdmondsKarp.Internal.memoryCost_cutOuterStep_le (d : Ctx × ℕ × ℕ) (s : DataStructure.Memory.State) :
Admissibility (ValidHistory) #
@[reducible, inline]
abbrev Cslib.Algorithms.WordRAM.EdmondsKarp.Internal.EkReady (w : ℕ) (c : Ctx) (t : DataStructure.Memory.State) :
The solver's memory invariant: well-formed memory and an allocated scratch area.
theorem Cslib.Algorithms.WordRAM.EdmondsKarp.Internal.validHistory_roundStep {w : ℕ} {d : (Ctx × ℕ × ℕ) × ℕ} {t : DataStructure.Memory.State} (hc :
match d with
| ((c, snd), snd_1) => CtxFits w c) (hs :
match d, hc with
| ((c, s, snd), snd_1), hc => s < c.n) (hsnk :
match d, hc, hs with
| ((c, fst, t'), snd), hc, hs => t' < c.n) (ht :
EkReady w
(match d, hc, hs, hsnk with
| ((c, snd), snd_1), hc, hs, hsnk => c)
t) :
(DataStructure.Memory.spec w).ValidHistory t ((DataStructure.Memory.spec w).clientHistory t (roundStep d))
theorem Cslib.Algorithms.WordRAM.EdmondsKarp.Internal.validHistory_cutOuterStep {w : ℕ} {d : Ctx × ℕ × ℕ} {t : DataStructure.Memory.State} (hlay : d.1.matBase + d.1.n * d.1.n ≤ d.1.scratchBase) (hu :
match d, hlay with
| (c, u, snd), hlay => u < c.n) (ht : EkReady w d.1 t) :
(DataStructure.Memory.spec w).ValidHistory t ((DataStructure.Memory.spec w).clientHistory t (cutOuterStep d))
Frame and result bound of internal subroutines #
theorem Cslib.Algorithms.WordRAM.EdmondsKarp.Internal.cutOuterStep_acc_le (d : Ctx × ℕ × ℕ) (t : DataStructure.Memory.State) (h :
match d with
| (c, fst, acc) => acc ≤ c.n * c.n * c.capBound + c.capBound) :
((DataStructure.Memory.spec 0).clientResult t (cutOuterStep d)).2 ≤ d.1.n * d.1.n * d.1.capBound + d.1.capBound