Weighted partial MaxSAT and propositional translations #
A weighted partial MaxSAT instance (Cslib.Logic.PL.MaxSAT) pairs hard clauses hard : CNF V
with weighted soft clauses soft : List (Clause V × ℕ) (repeated soft clauses are counted with
their multiplicity). An assignment is feasible when it satisfies hard, and its cost is the sum
of weights of falsified soft clauses. The optimum (MaxSAT.optimum) is the least cost of a
feasible assignment in WithTop ℕ, or ⊤ when the hard clauses are unsatisfiable.
Equivalently, MaxSAT.maxSatisfiedWeight gives the maximum weight of simultaneously satisfied
soft clauses in WithBot ℕ.
For arbitrary propositions (Cslib.Logic.PL.PropMaxSAT), the Tseitin translation
(PropMaxSAT.toTseitin) and positive-polarity Plaisted–Greenbaum translation
(PropMaxSAT.toPlaistedGreenbaum) produce clausal weighted partial MaxSAT instances with linearly
many clauses, clause width at most three, and the same optimum cost:
- In
PropMaxSAT.toTseitin, feasible assignments correspond bijectively (on the variables of the translation) via restriction andProposition.tseitinExtend, with identical cost. - In
PropMaxSAT.toPlaistedGreenbaum, feasible source assignments extend viaProposition.tseitinExtendwith equal cost, while every feasible assignment of the translation restricts to a feasible assignment of at most the same cost.
Main definitions #
Cslib.Logic.PL.MaxSAT,Cslib.Logic.PL.MaxSAT.feasible,Cslib.Logic.PL.MaxSAT.cost,Cslib.Logic.PL.MaxSAT.optimum,Cslib.Logic.PL.MaxSAT.maxSatisfiedWeight.Cslib.Logic.PL.MaxSAT.HasCostAtMost,Cslib.Logic.PL.MaxSAT.HasSatisfiedWeightAtLeast.Cslib.Logic.PL.MaxSAT.unweighted,Cslib.Logic.PL.MaxSAT.relabel,Cslib.Logic.PL.MaxSAT.computeOptimum.Cslib.Logic.PL.PropMaxSAT,Cslib.Logic.PL.PropMaxSAT.computeOptimum,Cslib.Logic.PL.PropMaxSAT.toTseitin,Cslib.Logic.PL.PropMaxSAT.toPlaistedGreenbaum.
Main results #
Cslib.Logic.PL.MaxSAT.exists_feasible_cost_eq_optimum,Cslib.Logic.PL.MaxSAT.exists_feasible_cost_eq_optimum_support: attainment of the optimum on satisfiable instances, with a finitely supported optimal assignment.Cslib.Logic.PL.MaxSAT.hasCostAtMost_iff_optimum_le,Cslib.Logic.PL.MaxSAT.hasSatisfiedWeightAtLeast_iff,Cslib.Logic.PL.MaxSAT.optimum_add_maxSatisfiedWeight: equivalence between minimum falsified cost (optimum) and maximum satisfied weight (maxSatisfiedWeight).Cslib.Logic.PL.MaxSAT.computeOptimum_eq_optimum,Cslib.Logic.PL.PropMaxSAT.computeOptimum_eq_optimum: correctness of the verified computable solvers.Cslib.Logic.PL.MaxSAT.optimum_relabel,Cslib.Logic.PL.MaxSAT.optimum_le_of_sublist: invariance under injective variable relabelling and monotonicity under adding hard or soft clauses.Cslib.Logic.PL.PropMaxSAT.optimum_toTseitin,Cslib.Logic.PL.PropMaxSAT.eq_of_feasible_toTseitin: optimum preservation and atom-determined uniqueness for the Tseitin translation.Cslib.Logic.PL.PropMaxSAT.optimum_toPlaistedGreenbaum,Cslib.Logic.PL.PropMaxSAT.cost_le_cost_toPlaistedGreenbaum,Cslib.Logic.PL.PropMaxSAT.not_forall_eq_of_feasible_toPlaistedGreenbaum: optimum preservation and non-uniqueness for the positive-polarity Plaisted–Greenbaum translation.
References #
Shared minimum-cost and branch-and-enumerate helpers #
Clausal weighted partial MaxSAT #
A weighted partial MaxSAT instance over variable type V. Repeated soft clauses are counted
with multiplicity.
- hard : CNF V
Clauses that must be satisfied by every feasible assignment.
Soft clauses paired with non-negative integer weights.
Total weight of all soft clauses in φ.
The underlying soft clauses as a CNF list.
All variable occurrences appearing in the hard or soft clauses of φ.
Finite-support attainment: when φ.hard is satisfiable, the minimum cost is achieved by
an assignment that takes false on every variable outside φ.vars.
Decision version and maximum satisfied weight #
Computable solver over finite variable lists #
Computable optimum for instances with decidable variable equality, suitable for decide.
Basic theory: empty soft, unweighted, relabelling, and monotonicity #
Unweighted MaxSAT view of a CNF formula: no hard clauses, each clause given unit weight.
Relabelling along an injective variable map preserves the MaxSAT optimum.
Propositional weighted partial MaxSAT and Tseitin / Plaisted–Greenbaum translations #
A weighted partial MaxSAT instance over arbitrary propositions.
- hard : List (Proposition Atom)
Propositions that must evaluate to
trueunder every feasible assignment. Soft propositions paired with non-negative integer weights.
All hard and soft propositions of ψ.
Sum of syntactic sizes of all hard and soft propositions of ψ.
All atom occurrences appearing in ψ.
An atom valuation is feasible when every hard proposition holds.
Total weight of soft propositions falsified by v.
Total weight of all soft propositions in ψ.
Total weight of soft propositions satisfied by v.
Minimum cost among feasible atom valuations of ψ, or ⊤ when ψ.hard is unsatisfiable.
Computable optimum for propositional MaxSAT instances over atoms with decidable equality.
Tseitin translation #
The Tseitin translation of ψ into a clausal weighted partial MaxSAT instance: hard
definitional clauses for every hard and soft proposition, unit hard clauses for ψ.hard, and
unit soft clauses for ψ.soft preserving weights.
Under a feasible assignment for ψ.toTseitin, every variable appearing in ψ.toTseitin
carries the value assigned by Proposition.tseitinExtend to its atom restriction.
Feasible assignments for ψ.toTseitin are uniquely determined on the variables of
ψ.toTseitin by their restriction to the atoms.
The Tseitin translation preserves the MaxSAT optimum.
Plaisted–Greenbaum translation #
The positive-polarity Plaisted–Greenbaum translation of ψ into a clausal weighted partial
MaxSAT instance.
Under a feasible assignment for ψ.toPlaistedGreenbaum, the cost of its atom restriction
never exceeds the cost of the translated assignment.
The Plaisted–Greenbaum translation preserves the MaxSAT optimum.
Unlike PropMaxSAT.toTseitin, feasible assignments for PropMaxSAT.toPlaistedGreenbaum are
not uniquely determined by their restriction to atoms even on all variables of the translation.