Internal ℕ-indexed dynamic-programming helpers for MWISInstance #
Internal helper definitions and bag/parent indexing lemmas consumed privately by Model and the
Word-RAM pass submodules (IndepScan, ChildPass, NodeLayout, RootPass, ProcessNodes,
Runner); never re-exported through IndependentSet or IndependentSet.Model.
Main definitions #
Cslib.Algorithms.WordRAM.TreeDecomposition.noAdjInst,Cslib.Algorithms.WordRAM.TreeDecomposition.indepInst,Cslib.Algorithms.WordRAM.TreeDecomposition.childPassInst,Cslib.Algorithms.WordRAM.TreeDecomposition.rootPassInst,Cslib.Algorithms.WordRAM.TreeDecomposition.tablesInst: pureℕ-indexed DP passes.Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.parFin,Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.bagAt: bounded node accessors.
Main results #
Cslib.Algorithms.WordRAM.TreeDecomposition.size_childPassInst,Cslib.Algorithms.WordRAM.TreeDecomposition.tablesInst_zero,Cslib.Algorithms.WordRAM.TreeDecomposition.tablesInst_succ,Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.bagAt_length_le,Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.bagAt_mem_lt.
theorem Cslib.Algorithms.WordRAM.TreeDecomposition.tablesInst_succ (adj : ℕ → ℕ → Bool) (wt : ℕ → ℕ) (n : ℕ) (par : Fin (n + 1) → Fin (n + 1)) (bags : Fin (n + 1) → List ℕ) (t : ℕ) :
tablesInst adj wt n par bags (t + 1) = have prev := tablesInst adj wt n par bags t;
let j := Fin.ofNat (n + 1) (n - t);
let p := par j;
have init := Array.replicate (2 ^ (bags p).length) 0;
have best := childPassInst adj wt (bags j) (bags p) prev[j] init (2 ^ (bags j).length);
have tp := Lean.TreeDecomposition.parentPass (bags j) (bags p) prev[p] best (2 ^ (bags p).length);
prev.set (↑p) tp ⋯
Step equation of tablesInst processing nonroot node Fin.ofNat (n + 1) (n - t).
def Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.parFin (inst : MWISInstance) (i : Fin (inst.numNodes + 1)) :
Bounded parent node index of i (0 at the root i = 0).
def Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.bagAt (inst : MWISInstance) (i : Fin (inst.numNodes + 1)) :
Ordered vertex list of node i.
theorem Cslib.Algorithms.WordRAM.TreeDecomposition.MWISInstance.bagAt_length_le (inst : MWISInstance) (i : Fin (inst.numNodes + 1)) :
Every node's bag length is at most inst.maxBagLen.