Skip to main content

Lecture 4: Redundancy Elimination and Equality

Laura Kovács and Andrei Voronkov

Subsumption and Tautology Deletion​

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

There are also equational tautologies, for example:

a≠b    ∨    b≠c    ∨    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 C∨DC \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.

Bag Extension of an Ordering​

Bag = finite multiset. Let >\gt be any (strict) ordering on a set XX. The bag extension of >\gt is a binary relation >bag\gt^\text{bag}, on bags over XX, defined as the smallest transitive relation on bags such that

{x,y1,…,yn}>bag{x1,…,xm,y1,…,yn}if  x>xi for all i∈{1…m}\{x,y_1,\ldots,y_n\} \gt^\text{bag}\{x_1,\ldots,x_m,y_1,\ldots,y_n\}\\ \text{if} \; x>x_i \text{ for all } i\in\{1\ldots m\}

where m≥0m \geq 0.

Idea: a bag becomes smaller if we replace an element by any finite number of smaller elements.

The following results are known about the bag extensions of orderings:

  1. >bag\gt^\text{bag} is an ordering;
  2. If >\gt is total, then so is >bag\gt^\text{bag};
  3. If >\gt is well-founded, then so is >bag\gt^\text{bag}.

Clause Orderings​

From now on consider clauses also as bags of literals. Note:

  • we have an ordering ≻\succ for comparing literals;
  • a clause is a bag of literals.

Hence

  • we can compare clauses using the bag extension ≻bag\succ^\text{bag} of ≻\succ.

For simpicity we often denote the multiset ordering also by ≻\succ.

Example​

Let ≻\succ be a total well-founded ordering on the ground atoms p1,…,p6p_1, \ldots, p_6 such that p6≻p5≻p4≻p3≻p2≻p1p_6 \succ p_5 \succ p_4 \succ p_3 \succ p_2 \succ p_1.

Consider the bag extension of ≻\succ; for simplicity, denote the bag extension of ≻\succ also by ≻\succ.

Using ≻\succ, compare and order the following three clauses:

p6∨¬p6¬p2∨p4∨p5p2∨p3\begin{aligned} p_6 \lor \neg p_6\\ \neg p_2 \lor p_4 \lor p_5\\ p_2 \lor p_3 \end{aligned}

Redundancy​

A clause C∈SC\in S is called redundant in SS if it is a logical consequence of clauses in SS strictly smaller than CC.

Examples​

A tautology p∨¬p∨Cp \lor \neg p \lor C is a logical consequence of the empty set of formulas:

⊨p∨¬p∨C,\models p \lor \neg p \lor C,

therefore it is redundant.

We know that CC subsumes C∨DC \lor D. Note

C∨D≻CC⊨C∨D\begin{aligned} C \lor D \succ C\\ C \models C \lor D \end{aligned}

therefore subsumed clauses are redundant.

If □∈S\square \in S, then all non-empty other clauses in SS are redundant.

Redundant Clauses Can be Removed​

In BRσ\mathbb{BR}\sigma (and in all calculi we will consider later) redundant clauses can be removed from the search space.

Inference Process with Redundancy​

Let I\mathbb{I} be an inference system. Consider an inference process with two kinds of step Si⇒Si+1S_i \Rightarrow S_{i+1}:

  1. Adding the conclusion of an I\mathbb{I}-inference with premises in SiS_i.
  2. Deletion of a clause redundant in SiS_i, that is
Si+1=Si−{C},S_{i+1} = S_i - \{C\},

where CC is redundant in SiS_i.

Fairness: Persistent Clauses and Limit​

Consider an inference process

S0⇒S1⇒S2⇒…S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots

A clause CC is called persistent if

∃i∀j≥i(C∈Sj).\exists i \forall j \geq i(C\in S_j).

The limit S∞S_\infty of the inference process is the set of all persistent clauses:

S∞=⋃i=0,1,…      ⋂j≥iSj.S_\infty = \bigcup_{i=0,1,\ldots}\;\;\;\bigcap_{j\geq i}S_j.

Fairness​

The process is called I\mathbb{I}-fair if every inference with persistent premises in S∞S_\infty has been applied, that is, if

C1    …    CnC\displaystyle\frac{C_1\;\; \ldots \;\; C_n}{C}

is an inference in I\mathbb{I} and {C1,…,Cn}⊆S∞\{C_1,\ldots,C_n\}\subseteq S_\infty, then C∈SiC \in S_i for some ii.

Completeness of BRσ\mathbb{BR}\sigma​

Completeness Theorem. Let ≻\succ be a well-founded ordering and σ\sigma a well-behaved selection function. Let also

  1. S0S_0 be a set of clauses;
  2. S0⇒S1⇒S2⇒…S_0 \Rightarrow S_1 \Rightarrow S_2 \Rightarrow \ldots be a fair BRσ\mathbb{BR}\sigma-inference process.

Then S0S_0 is unsatisfiable if and only if □∈Si\square \in S_i for some ii.

Saturation up to Redundancy​

A set SS of clauses is called saturated up to redundancy if for every I\mathbb{I}-inference

C1      …      CnC\displaystyle\frac{C_1 \;\;\; \ldots \;\;\; C_n}{C}

with premises in SS, either

  1. C∈SC \in S; or
  2. CC is redundant w.r.t. SS, that is, S≺C⊨CS_{\prec C} \models C.

Saturation up to Redundancy and Satisfiability Checking​

Lemma. A set SS of clauses saturated up to redundancy is unsatisfiable if and only if □∈S\square \in S.

Therefore, if we built a set saturated up to redundancy, then the initial set S0S_0 is satisfiable. This is a powerful way of checking redundancy: one can even check satisfiability of formulas having only infinite models.

The only problem with this characterisation is that there is no obvious way to build a model of S0S_0 out of a saturated set.

Binary Resolution with Selection​

  • One of the key properties to satisfy this lemma is the following:
    • the conclusion of every rule is strictly smaller that the rightmost premise of this rule.
  • Binary resolution, p‾∨C1      ¬p‾∨C2C1∨C2(BR)\displaystyle\frac{\underline{p}\lor C_1 \;\;\; \underline{\neg p} \lor C_2}{C_1 \lor C_2} (BR)
  • Positive factoring,
p‾∨p‾∨Cp∨C(Fact)\displaystyle\frac{\underline{p} \lor \underline{p} \lor C}{p \lor C}{} (Fact)

🎬 Animation: See first-order resolution, including the unifier and resolvent.

First-order logic with equality​

  • Equality predicate: ==.
  • Equality: l=rl = r .

The order of literals in equalities does not matter, that is, we consider an equality l=rl = r as a multiset consisting of two terms l,rl, r, and so consider l=rl = r and r=lr = l equal.

Equality. An Axiomatisation (Recap)​

  • reflexivity axiom: x=xx = x;

  • symmetry axiom: x=y→y=xx = y \rightarrow y = x;

  • transitivity axiom: x=y∧y=z→x=zx = y \land y = z \rightarrow x = z;

  • function substitution (congruence) axioms: \\ x1=y1∧…∧xn=yn→f(x1,…,xn)=f(y1,…,yn)x_1 = y_1 \land \ldots \land x_n = y_n \rightarrow f(x_1, \ldots, x_n ) = f(y_1, \ldots, y_n), for every function symbol ff;

  • predicate substitution (congruence) axioms: \\ x1=y1∧…∧xn=yn∧P(x1,…,xn)→P(y1,…,yn)x_1 = y_1 \land \ldots \land x_n = y_n \land P(x_1, \ldots, x_n ) \rightarrow P(y_1, \ldots, y_n), for every predicate symbol PP.

Inference systems for logic with equality​

We will define a resolution and superposition inference system. This system is complete. One can eliminate redundancy.

We will first define it only for ground clauses. On the theoretical side,

  • Completeness is first proved for ground clauses only.
  • It is then “lifted” to arbitrary first-order clauses using a technique called lifting.
  • Moreover, this way some notions (ordering, selection function) can first be defined for ground clauses only and then it is relatively easy to see how to generalise them for non-ground clauses.

Simple Ground Superposition Inference System​

Superposition: (right and left)

l=r∨C      s[l]=t∨Ds[r]=t∨C∨D(Sup),            l=r∨C      s[l]≠t∨Ds[r]≠t∨C∨D(Sup),\displaystyle \frac{{\color{red}l=r} \lor C \;\;\; {\color{red}s[l] = t} \lor D}{s[r]=t \lor C \lor D}(Sup),\;\;\;\;\;\; \frac{{\color{red}l=r} \lor C \;\;\; {\color{red}s[l]\neq t} \lor D}{s[r] \neq t \lor C \lor D}(Sup),

Equality Resolution:

s≠s∨CC(ER),\displaystyle \frac{{\color{red}s\neq s} \lor C}{C}(ER),

Equality Factoring:

s=t∨s=t′∨Cs=t∨t≠t′∨C(EF),\displaystyle \frac{{\color{red}s=t} \lor {\color{red}s=t'} \lor C}{s=t \lor t \neq t' \lor C}(EF),

Example​

f(a)=a∨g(a)=af(f(a))=a∨g(g(a))≠af(f(a))≠a\begin{array}{ll} f(a)=a \lor g(a)=a \\ f(f(a))=a \lor g(g(a))\neq a\\ f(f(a)) \neq a \end{array}

Can this system be used for efficient theorem proving?​

Not really. It has too many inferences. For example, from the clause f(a)=af(a) = a we can derive any clause of the form

fm(a)=fn(a)f^m(a) = f^n(a)

where m,n≥0m, n \geq 0. Worst of all, the derived clauses can be much larger than the original clause f(a)=af(a) = a.

The recipe is to use the previously introduced ingredients:

  1. Ordering;
  2. Literal selection;
  3. Redundancy elimination.