Skip to main content

Lecture 3: Recap, Saturation, and Redundancy Elimination

Laura Kovács

Inference Systems - Soundness (Recap)

  • An inference is sound if the conclusion of this inference is a logical consequence of its premises.
  • An inference system is sound if every inference rule in this system is sound.
  • BR\mathbb{BR} is sound.
  • Consequence of soundness:
    • let SS be a set of clauses.
    • If \square can be derived from SS in BR\mathbb{BR}, then SS is unsatisfiable.
Lecture 2 - Exercise recap : infinite number of BR\mathbb{BR} derivations of \square

Can this be used for checking (un)satisfiability (Recap)

  1. What happens when the empty clause cannot be derived from SS?
  2. How can one search for possible derivations of the empty clause?

  1. Completeness.
    • Let SS be an unsatisfiable set of clauses.
      • Then there exists a derivation of \square from SS in BR\mathbb{BR}.
  2. We have to formalize search for derivations.

We introduced well-behaved selection functions for selecting literals in clauses and applying inferences only over selected literals.

Binary resolution BR\mathbb{BR} with selection is complete for every well-behaved selection function.

How to Establish Unsatisfiability?

Completeness is formulated in terms of derivability of the empty clause \square from a set S0S_0 of clauses in an inference system I\mathbb{I}. However, this formulations gives no hint on how to search for such a derivation.

Idea:

  • Take a set of clauses SS (the search space), initially S=S0S = S_0. Repeatedly apply inferences in I\mathbb{I} to clauses in SS and add their conclusions to SS, unless these conclusions are already in SS.
  • If, at any stage, we obtain \square, we terminate and report unsatisfiability of S0S_0.

How to Establish Satisfiability?

When can we report satisfiability? When we build a set SS such that any inference applied to clauses in SS is already a member of SS. Any such set of clauses is called saturated (with respect to I\mathbb{I}).

In first-order logic it is often the case that all saturated sets are infinite (due to undecidability), so in practice we can never build a saturated set.

The process of trying to build one is referred to as saturation.

Saturated Set of Clauses

Let I\mathbb{I} be an inference system on formulas and SS be a set of formulas.

  • SS is called saturated with respect to I\mathbb{I}, or simply I\mathbb{I}-saturated, if for every inference of I\mathbb{I} with premises in SS, the conclusion of this inference also belongs to SS.
  • The closure of SS with respect to I\mathbb{I}, or simply I\mathbb{I}-closure, is the smallest set SS' containing SS and saturated with respect to I\mathbb{I}.

Inference Process

Inference process: sequence of sets of formulas S0,S1,S_0, S_1 , \ldots, denoted

S0S1S2S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots

(SiSi+1)(S_i \Rightarrow S_{i+1}) is a step of this process.

We say that this step is an I\mathbb{I}-step if:

  1. there exists an inference
F1        FnF\displaystyle \frac{F_1\;\; \ldots \;\; F_n}{F}

in I\mathbb{I} such that {F1,,Fn}Si\{F_1, \ldots, F_n\}\subseteq S_i

  1. Si+1=Si{F}S_{i+1} = S_i \cup \{F\}.

An I\mathbb{I}-inference process is an inference process whose every step is an I\mathbb{I}-step.

Property

  • Let S0S1S2S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots be an I\mathbb{I}-inference process and a formula FF belongs to some SiS_i.
    • Then SiS_i is derivable in I\mathbb{I} from S0S_0.
    • In particular, every SiS_i is a subset of the I\mathbb{I}-closure of S0S_0.

Limit of a Process

The limit of SS an inference process S0S1S2S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots is the set of formulas iSi\bigcup_i S_i.

In other words, the limit is the set of all derived formulas. We denote the limit by SS_\infty.

Suppose that we have an infinite inference process such that S0S_0 is unsatisfiable and we use the binary resolution inference system.

Question: does completeness imply that the limit of the process contains the empty clause?

Fairness

Let S0S1S2S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots be an inference process with the limit SS_\infty. The process is called fair if for every I\mathbb{I}-inference

F1        FnF,\displaystyle \frac{F_1\;\; \ldots \;\; F_n}{F},

if {F1,,Fn}S\{F_1, \ldots, F_n\}\subseteq S_\infty, then there exists ii such that FSiF\in S_i.

Limit of a Fair Inference Process

Let S0S1S2S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots be an fair inference process using a sound inference system I\mathbb{I}.

Exercise: Show that the limit of SS_\infty is the I\mathbb{I}-closure of S0S_0.

Completeness, reformulated

Theorem Let I\mathbb{I} be an inference system. The following conditions are equivalent.

  1. I\mathbb{I} is complete.
  2. For every unsatisfiable set of formulas S0S_0 and any fair I\mathbb{I}-inference process with the initial set S0S_0,
    • the limit SS_\infty of this inference process contains \square.

Fair Saturation Algorithms: Inference Selection by Clause Selection

(Given-Clause Algorithm) children given clause candidate clauses search space

Saturation Algorithm

A saturation algorithm is an algorithm that tries to saturate a set of clauses with respect to a given inference system.

In theory there are three possible scenarios:

  1. At some moment the empty clause \square is generated, in this case the input set of clauses is unsatisfiable.
  2. Saturation will terminate without ever generating \square, in this case the input set of clauses in satisfiable.
  3. Saturation will run forever, but without generating \square. In this case the input set of clauses is satisfiable.

Saturation Algorithm in Practice

In practice there are three possible scenarios:

  1. At some moment the empty clause \square is generated, in this case the input set of clauses is unsatisfiable.
  2. Saturation will terminate without ever generating \square, in this case the input set of clauses in satisfiable.
  3. Saturation will run until we run out of resources, but without generating \square. In this case it is unknown whether the input set is unsatisfiable.

Saturation Algorithm

Even when we implement inference selection by clause selection, there are too many inferences, especially when the search space grows.

Solution: only apply inferences to the selected clause and the previously selected clauses.

Thus, the search space is divided in two parts:

  • active clauses, that participate in inferences;
  • passive clauses, that do not participate in inferences.

Observation: the set of passive clauses is usually considerably larger than the set of active clauses, often by 2-4 orders of magnitude (depending on the saturation algorithm and the problem).

Subsumption and Tautology Deletion

A clause is a propositional tautology if it is of the form p¬pCp \lor \neg p \lor C, that is, it contains a pair of complementary literals.

There are also equational tautologies, for example:

ab        bc        f(c,c)=f(a,a)a\neq b \;\;\lor\;\; b \neq c \;\;\lor\;\; f(c,c)=f(a,a)

A clause CC subsumes any clause CDC \lor D, where DD is non-empty.

It was known since 1965 that subsumed clauses and propositional tautologies can be removed from the search space

Problem

  • How can we prove that completeness is preserved if we remove subsumed clauses and tautologies from the search space?
  • Solution: general theory of redundancy.