Explicit SAT branching rules: covering vs. partitioning and sub-2 ^ n search trees #
Branching SAT algorithms split a CNF formula φ into child formulas. Depending on the rule, child
branches either cover satisfying assignments (CNF.CoversModels: φ.eval σ = true iff some
branch evaluates to true, sufficient for decision and giving a subadditive model-count bound) or
partition them (CNF.PartitionsModels: every model of φ satisfies a unique branch and every
non-model satisfies none, conserving modelCountOn exactly across branches).
We package formula-level branching rules with their declared disposition (CNF.BranchMode,
CNF.BranchRule) and prove the exact disposition of three standard SAT rules:
- Binary variable split (
CNF.varSplitBranches v φ): branching vector[1, 1], partitions satisfying assignments (CNF.partitionsModels_varSplitBranches). - Naive clause literal cover (
CNF.clauseCoverBranches c φforc ∈ φ): branching vector[1, …, 1], covers satisfying assignments (CNF.coversModels_clauseCoverBranches), and fails to partition them wheneverchas two literals on distinct variables (CNF.not_partitionsModels_clauseCoverBranches_two). - Disjoint prefix
k-clause branching (CNF.clausePrefixBranches c φforc ∈ φ, fixing[l₁],[¬l₁, l₂], …,[¬l₁, …, ¬l_{b-1}, l_b]): partitions satisfying assignments (CNF.partitionsModels_clausePrefixBranches).
Eliminating assigned variables along disjoint prefix branches gives a terminating
BranchingVector.BranchingTree (CNF.clausePrefixTree k on CNF.ClauseBranchState V) with step
vector prefixSteps b (b ≤ k), conserving modelCountOn, deciding Satisfiable at its leaves,
and bounding the search tree by (2 - (1 / 2) ^ k) ^ n leaves (< 2 ^ n for k ≥ 1, n ≥ 1) and
goldenBranchFactor ^ n leaves for 2-CNF.
Main definitions #
Cslib.Logic.PL.CNF.CoversModels,Cslib.Logic.PL.CNF.PartitionsModels: covering and partitioning semantics for lists of child CNF formulas.Cslib.Logic.PL.CNF.BranchMode,Cslib.Logic.PL.CNF.BranchRule: branching rule specification recording covering vs. partitioning disposition.Cslib.Logic.PL.CNF.varSplitBranches,Cslib.Logic.PL.CNF.clauseCoverBranches,Cslib.Logic.PL.CNF.clausePrefixBranches: explicit SAT branching rules.Cslib.Logic.PL.CNF.ClauseBranchState,Cslib.Logic.PL.CNF.clausePrefixTree: variable-eliminating disjoint prefixk-clauseBranchingTree.
Main results #
Cslib.Logic.PL.CNF.CoversModels.satisfiable_iff,Cslib.Logic.PL.CNF.CoversModels.modelCountOn_le_sum,Cslib.Logic.PL.CNF.PartitionsModels.modelCountOn_eq_sum: decision equivalence, subadditivity, and exact count additivity.Cslib.Logic.PL.CNF.partitionsModels_varSplitBranches,Cslib.Logic.PL.CNF.coversModels_clauseCoverBranches,Cslib.Logic.PL.CNF.not_partitionsModels_clauseCoverBranches_two,Cslib.Logic.PL.CNF.partitionsModels_clausePrefixBranches: disposition of the three rules.Cslib.Logic.PL.CNF.modelCountOn_eq_sum_clausePrefixTree_leaves,Cslib.Logic.PL.CNF.satisfiable_iff_exists_clausePrefixTree_leaf,Cslib.Logic.PL.CNF.leafCount_clausePrefixTree_le,Cslib.Logic.PL.CNF.leafCount_clausePrefixTree_two_le: exact leaf count conservation, satisfiability equivalence, sub-2 ^ n(2 - (1 / 2) ^ k) ^ nbound, and golden-ratio2-CNF bound.
References #
Covering vs. partitioning branch semantics #
Whether a branching rule merely covers satisfying assignments or partitions them into pairwise disjoint branches.
- covering : BranchMode
Every model of the parent satisfies at least one child, and every child model satisfies the parent (
CoversModels). - partitioning : BranchMode
Every model of the parent satisfies a unique child, and non-models satisfy none (
PartitionsModels).
Instances For
Formula-level SAT branching rule bundled with its declared BranchMode and soundness proof.
- mode : BranchMode
Declared solution-set disposition (
coveringorpartitioning). Domain of formulas on which the rule applies.
Child formulas produced from an input formula.
- sound (φ : CNF V) : self.valid φ → match self.mode with | BranchMode.covering => φ.CoversModels (self.apply φ) | BranchMode.partitioning => φ.PartitionsModels (self.apply φ)
Verification of the declared disposition on
validformulas.
Every partitioning branching rule is in particular a covering branching rule.
A covering branching rule preserves satisfiability (φ.Satisfiable iff some branch is
satisfiable).
A partitioning branching rule preserves satisfiability.
Subadditivity of covering rules. If CoversModels φ branches, then
φ.modelCountOn declared is at most the sum of ψ.modelCountOn declared over ψ ∈ branches.
Additivity of partitioning rules. If PartitionsModels φ branches, then
φ.modelCountOn declared equals the sum of ψ.modelCountOn declared over ψ ∈ branches.
Explicit formula-level SAT branching rules #
Binary variable splitting partitions satisfying assignments on every formula.
Packaged BranchRule for binary variable splitting (mode = .partitioning).
Naive clause literal branching covers satisfying assignments whenever c ∈ φ.
Packaged BranchRule for naive clause literal branching (mode = .covering).
Naive clause literal branching does not partition models. On [ [l₁, l₂] ] with distinct
variables l₁.1 ≠ l₂.1, setting both literals true satisfies both branches simultaneously.
The prefix lengths of clausePrefixLitsList c form the branching vector prefixSteps c.length
([1, 2, …, c.length]).
For any assignment σ, the number of prefixes in clausePrefixLitsList c satisfied by σ is
1 when c.eval σ = true and 0 when c.eval σ = false.
Whenever c holds on every model of φ (∀ σ, φ.eval σ = true → c.eval σ = true),
clausePrefixBranches c φ partitions the models of φ.
Disjoint prefix clause branching partitions models whenever c ∈ φ.
Packaged BranchRule for disjoint prefix clause branching (mode = .partitioning).
Variable-eliminating disjoint prefix k-clause search tree #
Substitute a fixed literal l = (v, b) into φ: drop clauses containing l and delete ¬l
from all remaining clauses.
Evaluating substLit l φ at σ agrees with evaluating φ at Function.update σ l.1 l.2.
substLit l φ eliminates every occurrence of l.1.
substLit never increases maximum clause length.
Adding [l] to φ on U (l.1 ∈ U) has the same model count as substLit l φ on
U.erase l.1.
Sequentially substitute a list of literals into φ.
Sequentially erase the variables of lits from U.
Erasing lits with distinct variables contained in U decreases U.card by lits.length.
substLits preserves clause-width bounds.
Conjoining unit clauses [l] for l ∈ lits with distinct variables in U has the same model
count on U as substLits lits φ on eraseLits lits U.
Search-tree state for variable-eliminating CNF branching: remaining unassigned variables and
residual formula.
- unassigned : Finset V
Variables not yet fixed along the current branch.
- formula : CNF V
Residual CNF formula over
unassigned.
Predicate selecting a non-tautological clause supported in U with deduplicated width in
[1, k].
Disjoint prefix k-clause BranchingTree on ClauseBranchState V, measured by
s.unassigned.card with branching vector prefixSteps k = [1, 2, …, k].
Exact model-count conservation across clausePrefixTree k. On any width-≤ k formula φ
whose variables lie in declared, φ.modelCountOn declared equals the sum of leaf counts
if [] ∈ l.formula then 0 else 2 ^ l.unassigned.card over the leaves of clausePrefixTree k.
Satisfiability equivalence across clausePrefixTree k. A width-≤ k formula φ with
variables in declared is satisfiable if and only if some leaf of clausePrefixTree k contains no
empty clause.
Sub-2 ^ n k-SAT branching-tree leaf bound. For k ≥ 1, clausePrefixTree k expands any
state on n = declared.card unassigned variables into at most (2 - (1 / 2) ^ k) ^ n leaves.
Node-count bound for clausePrefixTree k. For k ≥ 1, clausePrefixTree k visits at most
(n + 1) * (2 - (1 / 2) ^ k) ^ n total nodes on n = s.unassigned.card variables.
Golden-ratio 2-CNF branching-tree leaf bound. For k = 2, clausePrefixTree 2 expands
into at most ((1 + √5) / 2) ^ n leaves (goldenBranchFactor ^ s.unassigned.card).