General CNF variable restriction and branching model counts #
This module develops the semantic, satisfiability, size, occurrence, and model-counting properties
of single-variable restriction (Cslib.Logic.PL.CNF.restrict from Resolution.lean),
list-ordered partial-assignment restriction (Cslib.Logic.PL.CNF.restrictList), and partial-map
restriction (Cslib.Logic.PL.CNF.restrictBy).
Main definitions #
Cslib.Logic.PL.CNF.restrictModelsEquiv: explicit bijection between satisfying assignments of a restricted formulaφ.restrict v boverdeclared.erase vand satisfying assignments ofφoverdeclaredfixingv ↦ b.Cslib.Logic.PL.CNF.modelsSplitEquiv: disjoint sum splitting declared models ofφacrossφ.restrict v falseandφ.restrict v true.Cslib.Logic.PL.CNF.restrictList: iterated restriction along a list of literals.
Main results #
Cslib.Logic.PL.CNF.eval_restrict: exact evaluation identity(φ.restrict v b).eval σ = φ.eval (Function.update σ v b).Cslib.Logic.PL.CNF.satisfiable_restrict_iff,Cslib.Logic.PL.CNF.satisfiable_iff_restrict: satisfiability characterization and binary branching split.Cslib.Logic.PL.CNF.modelCountOn_eq_add_restrict,Cslib.Logic.PL.CNF.modelCount_eq_add_restrict_of_mem_vars: additive branching laws for both declared-universe and occurring-variable model counts.Cslib.Logic.PL.CNF.length_restrict_le,Cslib.Logic.PL.CNF.numVars_restrict_lt,Cslib.Logic.PL.CNF.occurrences_restrict_self,Cslib.Logic.PL.CNF.occurrences_restrict_le: formula length, variable count, and literal-occurrence bounds under restriction.Cslib.Logic.PL.CNF.eval_restrictList,Cslib.Logic.PL.CNF.satisfiable_restrictBy_iff: iterated and partial-map restriction properties.
Single-variable clause and formula restriction #
Filtering (v, !b) out of a clause that does not contain (v, b) computes evaluation under
Function.update σ v b.
Evaluating a single-variable restriction φ.restrict v b at σ equals evaluating φ at
Function.update σ v b.
Restricting on a variable that does not occur in φ leaves φ unchanged.
The restricted variable does not occur in φ.restrict v b.
Restricting a variable never increases the number of distinct occurring variables.
Every clause of φ.restrict v b is a sublist-literal subset of some clause of φ of at most
the same length.
Restricting never increases the number of clauses.
Restricting on v removes all occurrences of v.
Restricting on v does not increase the number of clauses mentioning any variable u.
Satisfiability and assignment bijections #
φ.restrict v b is satisfiable iff φ has a satisfying assignment mapping v to b.
Binary branching characterization of CNF satisfiability.
Explicit bijection between satisfying assignments of φ.restrict v b on declared.erase v and
satisfying assignments of φ on declared that map v to b.
Explicit disjoint sum equivalence splitting declared models of φ into those extending
φ.restrict v false and those extending φ.restrict v true.
Forward action of restrictModelsEquiv extends σ at v by b.
At the restricted variable v, restrictModelsEquiv yields b.
Off the restricted variable v, restrictModelsEquiv agrees with σ.
Inverse of restrictModelsEquiv restricts τ to declared.erase v.
Left branch of modelsSplitEquiv agrees with restrictModelsEquiv ... false.
Right branch of modelsSplitEquiv agrees with restrictModelsEquiv ... true.
Inverse of modelsSplitEquiv on an assignment setting v ↦ false.
Inverse of modelsSplitEquiv on an assignment setting v ↦ true.
Branching additivity for model counts #
Branching additivity for declared-universe model counting: restricting v ∈ declared splits
modelCountOn into the sum of false and true branches over declared.erase v.
When every satisfying assignment of φ maps v ∈ declared to b, restricting v ↦ b
conserves modelCountOn onto declared.erase v.
When v ∉ declared, modelCountOn fixes v ↦ false, so restricting v ↦ false leaves
modelCountOn unchanged.
Branching additivity for occurring-variable CNF.modelCount on an occurring variable v,
explicitly accounting for any other variables eliminated along each branch.
Restricting a non-occurring variable leaves CNF.modelCount unchanged.
Iterated list restriction and partial-map restriction #
Restrict a formula sequentially along a list of literals (v, b).
Update an assignment by applying a list of literals in list order (earlier entries override
later ones, matching CNF.restrictList).
Evaluation of φ.restrictList assign at σ equals evaluation of φ at applyAssignList assign σ.
Variables remaining in φ.restrictList assign occur in φ and not in assign.
Iterated restriction does not increase the number of clauses.
Iterated restriction does not increase occurrences of any variable.
Any variable mentioned in assign has zero occurrences in φ.restrictList assign.
If every assigned literal holds in assign (no conflicting assignments to the same variable),
applyAssignList fixes each variable to its assigned Boolean value.
Under a variable-disjoint literal list assign, satisfiability of φ.restrictList assign is
equivalent to satisfiability of φ extending assign.
Partial-map restriction CNF.restrictBy does not increase clause count.
CNF.restrictBy ρ eliminates all occurrences of variables fixed by ρ.
CNF.restrictBy ρ is satisfiable iff φ has a satisfying assignment extending ρ.