Documentation

CslibFrontier.Logics.Propositional.ClauseSet.Sparsification.Tree

Sparsification -- the branching tree #

A branching rule (BranchingRule) makes the procedure deterministic: it is a step on states that represent clause sets, which at every state that is not sparse takes the heart (false) or the petal (true) child for one valid choice. Any valid choice will do, so a rule may compute its choice, and its states may be any representation of clause sets. The canonical rule (chooseRule) works on clause sets themselves, with a valid choice made by chooseBranch.

The tree of a rule (BranchingRule.tree) is the binary branching whose leaves are the sparse states; its words, node words and leaf words are those of Cslib.BinaryBranching. Each step decreases the potential, so the tree terminates (BranchingRule.tree_terminating). Every leaf word yields a Path with the same length and the same petal steps (exists_path_of_isLeafWord), and every solution of the root reaches a leaf containing it (exists_isLeafWord_sat).

Main definitions #

Main results #

References #

theorem Cslib.Logic.PL.ClauseSet.Sparsification.exists_choice {V : Type u_1} [DecidableEq V] (θ : ℕ → ℕ) {ψ : ClauseSet V} (h : ¬Sparse θ ψ) :
∃ (c : ℕ) (H : Finset (Literal V)), Choice θ ψ c H

A clause set that is not sparse has a valid branching choice.

The canonical branching choice: a valid choice if there is one.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.choice_chooseBranch {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {ψ : ClauseSet V} (h : ¬Sparse θ ψ) :
Choice θ ψ (chooseBranch θ ψ).1 (chooseBranch θ ψ).2

chooseBranch θ ψ yields a valid branching choice whenever ψ is not sparse.

structure Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule (θ : ℕ → ℕ) (V : Type u_2) [DecidableEq V] (σ : Type u_3) :
Type (max u_2 u_3)

A branching rule for the thresholds θ: a deterministic step next on states σ, each representing the clause set toClauseSet s, which at every state that is not sparse takes the heart (false) or petal (true) child for one valid choice.

The canonical branching rule on clause sets, with the choice chooseBranch.

The branching tree of a rule: its leaves are the sparse states.

@[simp]
theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.tree_IsLeaf {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} (R : BranchingRule θ V σ) (s : σ) :
@[simp]
theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.tree_next {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} (R : BranchingRule θ V σ) (a✝ : σ) (a✝¹ : Bool) :
R.tree.next a✝ a✝¹ = R.next a✝ a✝¹

One step #

The tree #

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.tree_terminating {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} (hθ : ∀ (j : ℕ), 1 ≤ θ j) :

Termination. Each branching step strictly decreases the potential.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.refines_walk {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} (hθ : ∀ (j : ℕ), 1 ≤ θ j) {s : σ} {w : List Bool} (h : R.tree.IsNodeWord s w) :

Every clause reached along a node word is contained in a clause of the start.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.exists_isLeafWord_sat {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} (hθ : ∀ (j : ℕ), 1 ≤ θ j) (s : σ) {x : V → Bool} (hx : (R.toClauseSet s).Sat x) :
∃ (w : List Bool), R.tree.IsLeafWord s w ∧ (R.toClauseSet (R.tree.walk s w)).Sat x

Covering. Every solution of a state reaches a leaf of which it is a solution.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.sat_of_sat_walk {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} {s : σ} {w : List Bool} (h : R.tree.IsNodeWord s w) {x : V → Bool} (hx : (R.toClauseSet (R.tree.walk s w)).Sat x) :

Solutions of a state reached along a node word are solutions of the start.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.exists_isLeafWord_sat_iff {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} (hθ : ∀ (j : ℕ), 1 ≤ θ j) (s : σ) (x : V → Bool) :
(∃ (w : List Bool), R.tree.IsLeafWord s w ∧ (R.toClauseSet (R.tree.walk s w)).Sat x) ↔ (R.toClauseSet s).Sat x

A state is satisfiable exactly when one of its leaves is.

theorem Cslib.Logic.PL.ClauseSet.Sparsification.BranchingRule.exists_path_of_isLeafWord {V : Type u_1} [DecidableEq V] {θ : ℕ → ℕ} {σ : Type u_2} {R : BranchingRule θ V σ} {s : σ} (hred : Reduced (R.toClauseSet s)) {w : List Bool} (hw : R.tree.IsLeafWord s w) :
∃ (P : Path θ V), (∀ i ≤ w.length, P.node i = R.toClauseSet (R.tree.walk s (List.take i w))) ∧ P.len = w.length ∧ Sparse θ (P.node P.len) ∧ {i ∈ Finset.range P.len | P.dir i = true} = {i ∈ Finset.range w.length | w.getD i false = true}

A leaf word is a branch. From a reduced state, it yields a Path with the same length, ending in a sparse node, whose nodes are the states along the word and whose petal steps are the positions of true in the word.