Documentation

CslibFrontier.Algorithms.WordRAM.TreeDecomposition.CSP.Forget

Word-RAM forget node handler #

This module certifies forgetNodeProg (along with the private loops forgetInnerProg and forgetFillProg). It uses eraseBagProg, radixProjProg, powProg, bagMemProg, and the shared descriptor/table-fill infrastructure (NodeDesc), and has no dependency on ConstraintScan, LeafIntro, or Join.

Main definitions #

Main results #

3. Forget node handler (forgetInnerProg, forgetFillProg, forgetNodeProg) #

Register arguments for the forget node handler forgetNodeProg.

  • mode : ℕ

    Mode flag (1 for exact model counting, 0 for satisfiability).

  • q : ℕ

    Domain size q.

  • v : ℕ

    Forgotten variable label v.

  • varsPtr : ℕ

    Base address of the serialized CSP active-variable list vars.

  • varsLen : ℕ

    Length of the serialized vars list.

  • dChild : ℕ

    Base address of the child node's 4-word descriptor slot.

  • dCur : ℕ

    Base address of the current node's 4-word descriptor slot.

Instances For

    Erase a.v from the child bag, aggregate DP entries over a.v, and write the descriptor for a forget node.

    theorem Cslib.Algorithms.WordRAM.TreeDecomposition.forgetNodeProg_spec {w F_lo : ℕ} (counting : Bool) (a : ForgetNodeArgs) (hq : 0 < a.q) (hmode : a.mode = if counting = true then 1 else 0) {child : SimpleGraph.NiceTree ℕ} {cs : List (ConstraintTable a.q)} {vars : List ℕ} {s : DataStructure.Memory.State} (hvars : WordRAM.Realization.HoldsIn a.varsPtr vars s) (hvars_len : vars.length = a.varsLen) (hfit_bag_elems : ∀ u ∈ Lean.TreeDecomposition.bagList child, WordRAM.Fits w u) (hchild : NodeDescAt F_lo counting a.q cs vars child a.dChild s) (hdCur : a.dCur + 4 ≤ F_lo) (hFlo : F_lo ≤ s.frontier) (hfit_peak : WordRAM.Fits w (s.frontier + max (Lean.TreeDecomposition.bagList child).length (((Lean.TreeDecomposition.bagList child).erase a.v).length + a.q ^ ((Lean.TreeDecomposition.bagList child).erase a.v).length))) (hfit_cap : WordRAM.Fits w (if counting = true then a.q ^ activeForgetCount vars (SimpleGraph.NiceTree.forget a.v child) else 1)) :

    Memory validity, framing, NodeDescAt, and cost bound for forgetNodeProg.