Automated reasoning for first-order logic Theory, Practice...

220
Automated reasoning for first-order logic Theory, Practice and Challenges Konstantin Korovin 1 The University of Manchester UK [email protected] Part I 1 supported by a Royal Society University Fellowship

Transcript of Automated reasoning for first-order logic Theory, Practice...

Page 1: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Automated reasoning for first-order logic

Theory, Practice and Challenges

Konstantin Korovin1

The University of ManchesterUK

[email protected]

Part I

1supported by a Royal Society University Fellowship

Page 2: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Acknowledgments

I Harald Ganzinger

I Zurab Khasidashvili

I Renate Schmidt

I Christoph Sticksel

I Andrei Voronkov

I . . .

2 / 144

Page 3: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Logic and Automated Reasoning

Applications:

I software and hardware

verification: Intel, MicrosoftI information management:

biomedical ontologies, semantic

Web, databasesI combinatorial reasoning:

constraint satisfaction,

planning, schedulingI Internet securityI theorem proving in mathematics

John McCarthy

“It is reasonable to hope that the

relationship between computation and

mathematical logic will be as fruitful in

the next century as that between

analysis and physics in the past.”

McCarthy, 1963.

3 / 144

Page 4: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Formalising Complex Systems

Complex System

Formal Model Formal Requirements

(Automated) Reasoning

Proof of Correctness

4 / 144

Page 5: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Automated Reasoning

The complexity of current engineering systems is enormous:

I Intel Microprocessor: 2 billion transistors

I Microsoft Windows: 50 million lines of code

Complexity is rapidly growing!

Automated reasoning methods are crucial!

In this lectures we will focus on efficient automated reasoning for

first-order logic.

5 / 144

Page 6: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Automated Reasoning

The complexity of current engineering systems is enormous:

I Intel Microprocessor: 2 billion transistors

I Microsoft Windows: 50 million lines of code

Complexity is rapidly growing!

Automated reasoning methods are crucial!

In this lectures we will focus on efficient automated reasoning for

first-order logic.

6 / 144

Page 7: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order reasoning

I Theory:

I resolution, superposition, instantiation

I completeness, redundancy elimination, decision procedures

I Applications:

I software/hardware verification

I semantic Web, security, multi-agent systems, bio-health

I Reasoning systems for FOL:

I Resolution/superposition-based:

Vampire, E, SPASS, Prover9, Metis, Waldmeister

I Instantiation-based:

iProver, Darwin, Equinox

I Tableaux, connection, geometric, natural deduction:

leanCoP, Princess, GEO, Muscadet

I CASC – The World Championship for Automated Theorem Proving

7 / 144

Page 8: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order reasoning

I Theory:

I resolution, superposition, instantiation

I completeness, redundancy elimination, decision procedures

I Applications:

I software/hardware verification

I semantic Web, security, multi-agent systems, bio-health

I Reasoning systems for FOL:

I Resolution/superposition-based:

Vampire, E, SPASS, Prover9, Metis, Waldmeister

I Instantiation-based:

iProver, Darwin, Equinox

I Tableaux, connection, geometric, natural deduction:

leanCoP, Princess, GEO, Muscadet

I CASC – The World Championship for Automated Theorem Proving

8 / 144

Page 9: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order reasoning

I Theory:

I resolution, superposition, instantiation

I completeness, redundancy elimination, decision procedures

I Applications:

I software/hardware verification

I semantic Web, security, multi-agent systems, bio-health

I Reasoning systems for FOL:

I Resolution/superposition-based:

Vampire, E, SPASS, Prover9, Metis, Waldmeister

I Instantiation-based:

iProver, Darwin, Equinox

I Tableaux, connection, geometric, natural deduction:

leanCoP, Princess, GEO, Muscadet

I CASC – The World Championship for Automated Theorem Proving

9 / 144

Page 10: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order reasoning

I Theory:

I resolution, superposition, instantiation

I completeness, redundancy elimination, decision procedures

I Applications:

I software/hardware verification

I semantic Web, security, multi-agent systems, bio-health

I Reasoning systems for FOL:

I Resolution/superposition-based:

Vampire, E, SPASS, Prover9, Metis, Waldmeister

I Instantiation-based:

iProver, Darwin, Equinox

I Tableaux, connection, geometric, natural deduction:

leanCoP, Princess, GEO, Muscadet

I CASC – The World Championship for Automated Theorem Proving

10 / 144

Page 11: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

These lectures

Reasoning for first-Order logic

I First-order logic

I Resolution-based methods

I Instantiation-based methods

I Effectively propositional fragment (EPR)

I Applications: bounded model checking and finite model finding

I Implementation techniques:

proof search, indexing, redundancy elimination

11 / 144

Page 12: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Why first-order logic?

I expressive: quantifiers are needed in many applications

I expressivity comes at a price: first-order logic is semi-decidable

I reasoning can be done at a higher level and can gain in efficiency

I has efficient reasoning methods

12 / 144

Page 13: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Syntax of first-order logic

Page 14: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

14 / 144

Page 15: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

15 / 144

Page 16: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

16 / 144

Page 17: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

17 / 144

Page 18: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

18 / 144

Page 19: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

19 / 144

Page 20: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic terms

∀x∀i∀z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

I Signature Σ = (F ,P)

I function symbols with arities: F = {store/3, select/2}constants are function symbols of arity 0,

I predicate symbols with arities:

P = {same content/2, out of bounds/2,' /2}I Variables: X = {x , y , z , i , j , . . .} – infinitely countable set

I Terms:

I variable terms: x where x ∈ XI function terms: f (t1, . . . , tn), where f ∈ F and ti are terms

I A term is ground if it does not contain variables

I T (Σ,X ) – the set of all terms over signature Σ and variables XI T (Σ, ∅) – the set of all ground terms

20 / 144

Page 21: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic syntax (formulas)

Example:

∀x , i , z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

Formulas:

I atomic formulas: p(t1, . . . , tn), where p is a predicate symbol

I Boolean combinations: ¬F , F1 ∧ F2, F1 ∨ F2, F1 → F2, F1 ↔ F2

I quantifier applications: ∀x̄F (x̄), ∃x̄F (x̄)

F(X ) – the set of all formulas over variables X .

21 / 144

Page 22: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic syntax (formulas)

Example:

∀x , i , z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

Formulas:

I atomic formulas: p(t1, . . . , tn), where p is a predicate symbol

I Boolean combinations: ¬F , F1 ∧ F2, F1 ∨ F2, F1 → F2, F1 ↔ F2

I quantifier applications: ∀x̄F (x̄), ∃x̄F (x̄)

F(X ) – the set of all formulas over variables X .

22 / 144

Page 23: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic syntax (formulas)

Example:

∀x , i , z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

Formulas:

I atomic formulas: p(t1, . . . , tn), where p is a predicate symbol

I Boolean combinations: ¬F , F1 ∧ F2, F1 ∨ F2, F1 → F2, F1 ↔ F2

I quantifier applications: ∀x̄F (x̄), ∃x̄F (x̄)

F(X ) – the set of all formulas over variables X .

23 / 144

Page 24: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic syntax (formulas)

Example:

∀x , i , z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

Formulas:

I atomic formulas: p(t1, . . . , tn), where p is a predicate symbol

I Boolean combinations: ¬F , F1 ∧ F2, F1 ∨ F2, F1 → F2, F1 ↔ F2

I quantifier applications: ∀x̄F (x̄), ∃x̄F (x̄)

F(X ) – the set of all formulas over variables X .

24 / 144

Page 25: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order logic syntax (formulas)

Example:

∀x , i , z (same content(store(x , i , e), z)→[out of bounds(x , i) ∨ ∃j(select(z , j) ' e)])

Formulas:

I atomic formulas: p(t1, . . . , tn), where p is a predicate symbol

I Boolean combinations: ¬F , F1 ∧ F2, F1 ∨ F2, F1 → F2, F1 ↔ F2

I quantifier applications: ∀x̄F (x̄), ∃x̄F (x̄)

F(X ) – the set of all formulas over variables X .

25 / 144

Page 26: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.26 / 144

Page 27: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.27 / 144

Page 28: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.28 / 144

Page 29: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.29 / 144

Page 30: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.30 / 144

Page 31: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

free/bound variable occurrences

F (y) = ∀x(p(x , y)→ ∃yq(y , x))

I A variable occurrence is bound if it is under the scope of a quantifier

I A variable occurrence is free if it is not bound

I A formula is closed, also called a sentence if it does not contain free

variables

Note: the same variable can have both free and bound occurrences.

Rectified formula:

I no variable occur both free and bound

I a variable is quantified only once

Rectifying a formula: rename quantified variables

F ′(y) = ∀x(p(x , y)→ ∃y1q(y1, x))

F (y) is equivalent to F ′(y)

We will assume that all formulas are rectified.31 / 144

Page 32: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Substitutions

A substitution: is a mapping σ : X 7→ T (Σ,X ) such that σ(x) 6= x is

finite.

Example:

σ = {x 7→ a, y 7→ f (x , g(z))}

where σ is assumed to be identity for all variables different from x , y .

The domain of σ:

dom(σ) = {x | x ∈ X , σ(x) 6= x}

Notation:σ = {x1 7→ t1, . . . , xn 7→ tn}σ = {t1/x1, . . . , tn/xn}

Application of a substitution to a term/formula: – simultaneous

replacement of variables by terms.

(p(f (x , x), y) ∨ q(g(y)))σ = p(f (a, a), f (x , g(z))) ∨ q(g(f (x , g(z))))

32 / 144

Page 33: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Substitutions

A substitution: is a mapping σ : X 7→ T (Σ,X ) such that σ(x) 6= x is

finite.

Example:

σ = {x 7→ a, y 7→ f (x , g(z))}

where σ is assumed to be identity for all variables different from x , y .

The domain of σ:

dom(σ) = {x | x ∈ X , σ(x) 6= x}

Notation:σ = {x1 7→ t1, . . . , xn 7→ tn}σ = {t1/x1, . . . , tn/xn}

Application of a substitution to a term/formula: – simultaneous

replacement of variables by terms.

(p(f (x , x), y) ∨ q(g(y)))σ = p(f (a, a), f (x , g(z))) ∨ q(g(f (x , g(z))))

33 / 144

Page 34: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Semantics of first-order logic

Page 35: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order interpretation

Consider a signature Σ = (F ,P).

A first-order Σ-structure is a triple:

A = (A,FA,PA)

where

I FA is a collection of functions {fA : An 7→ A | f /n ∈ F}I PA is a collection of relations {pA ⊆ An | p/n ∈ P}

Examples: Let Σ = ({+/2, ∗/2, 0}, {≤ /2}).

Σ-structures:

I N = (N, {+N, ∗N, 0N}, {≤N}) – natural numbers

I R = (R, {+R, ∗R, 0R}, {≤R}) – reals

I L = (P(N), {+L, ∗L, 0L}, {≤L}) – lattice over the power set of N

where +L is union of sets, ∗L is intersection of sets, ≤L is subset

relation.35 / 144

Page 36: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order interpretation

Consider a signature Σ = (F ,P).

A first-order Σ-structure is a triple:

A = (A,FA,PA)

where

I FA is a collection of functions {fA : An 7→ A | f /n ∈ F}I PA is a collection of relations {pA ⊆ An | p/n ∈ P}

Examples: Let Σ = ({+/2, ∗/2, 0}, {≤ /2}).

Σ-structures:

I N = (N, {+N, ∗N, 0N}, {≤N}) – natural numbers

I R = (R, {+R, ∗R, 0R}, {≤R}) – reals

I L = (P(N), {+L, ∗L, 0L}, {≤L}) – lattice over the power set of N

where +L is union of sets, ∗L is intersection of sets, ≤L is subset

relation.36 / 144

Page 37: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Semantics of first-order logic

Consider a structure A = (A,FA,PA).

A variable assignment: γ : X 7→ A

An interpretation is a pair: I = (A, γ)

For every therm t define value I(t) of t under I as follows:

I I(t) = γ(t) if t is a variable

I I(f (t1, . . . , tn)) = fA(I(t1), . . . , I(tn))

Note that I(t) ∈ A.

Example: Consider N = (N, {+/2, ∗/2}, {≤ /2,' /2}),

γ = {x 7→ 0, y 7→ 1} and I = (N, γ). Then

I I(x + (y + y) ∗ (y + y)) = 4

Notation: γax is a variable assignment coinciding with γ on all variables

except x where it is equal to a.

37 / 144

Page 38: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Evaluation of formulas

A formula F (x̄) is true in an interpretation I = (A, γ), denoted as

I |= F (x̄) if the following holds:

I atomic formulas: I |= p(t1, . . . , tn) iff (I(t1), . . . , I(tn)) ∈ pA.

I Boolean combinations:

I I |= ¬F (x̄) iff I |= F (x̄) does not hold

I I |= F1(x̄) ∧ F2(x̄) iff I |= F1(x̄) and I |= F2(x̄)

I I |= F1(x̄) ∨ F2(x̄) iff I |= F1(x̄) or I |= F2(x̄)

I I |= F1(x̄)→ F2(x̄) iff I 6|= F1(x̄) or I |= F2(x̄)

I I |= F1(x̄)↔ F2(x̄) iff I |= F1(x̄) if and only if I |= F2(x̄)

I quantified formulas:

I I |= ∀xF (x̄) iff for every a ∈ A, (A, γax ) |= F (x̄),

I I |= ∃xF (x̄) iff there exists a ∈ A such that (A, γax ) |= F (x̄)

38 / 144

Page 39: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Evaluation of formulas

Example: Consider N = (N, {+, ∗}, {≤,'}), γ = {x 7→ 2, y 7→ 1} and

I = (N, γ). Then

I I |= ∀z(x ≤ z + y → (x ≤ z ∨ z + y ' x))

I I |= ∀z∃u(z ≤ u)

I I 6|= ∃u∀z(z ≤ u)

Notation: Consider an interpretation I = (A, γ) and a formula

F (x1, . . . , xn). Assume γ(xi ) = ai for 1 ≤ i ≤ n. Then we write

A |= F [a1, . . . , an] in place of I |= F (x1, . . . , xn).

Note that for any closed formula F its true value does not depend on γ,

in this case we can write A |= F . We say A is a model for F .

39 / 144

Page 40: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Evaluation of formulas

Example: Consider N = (N, {+, ∗}, {≤,'}), γ = {x 7→ 2, y 7→ 1} and

I = (N, γ). Then

I I |= ∀z(x ≤ z + y → (x ≤ z ∨ z + y ' x))

I I |= ∀z∃u(z ≤ u)

I I 6|= ∃u∀z(z ≤ u)

Notation: Consider an interpretation I = (A, γ) and a formula

F (x1, . . . , xn). Assume γ(xi ) = ai for 1 ≤ i ≤ n. Then we write

A |= F [a1, . . . , an] in place of I |= F (x1, . . . , xn).

Note that for any closed formula F its true value does not depend on γ,

in this case we can write A |= F . We say A is a model for F .

40 / 144

Page 41: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Evaluation of formulas

Example: Consider N = (N, {+, ∗}, {≤,'}), γ = {x 7→ 2, y 7→ 1} and

I = (N, γ). Then

I I |= ∀z(x ≤ z + y → (x ≤ z ∨ z + y ' x))

I I |= ∀z∃u(z ≤ u)

I I 6|= ∃u∀z(z ≤ u)

Notation: Consider an interpretation I = (A, γ) and a formula

F (x1, . . . , xn). Assume γ(xi ) = ai for 1 ≤ i ≤ n. Then we write

A |= F [a1, . . . , an] in place of I |= F (x1, . . . , xn).

Note that for any closed formula F its true value does not depend on γ,

in this case we can write A |= F . We say A is a model for F .

41 / 144

Page 42: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Validity, satisfiability,

A (closed) formula F is

I satisfiable if there is a Σ-structure A which is a model for F , A |= F

I valid if every Σ-structure is a model for F

Note: a formula F is valid if and only if ¬F is unsatisfiable

Formulas F1,F2 are:

I F1 semantically imply F2, denoted F1 |= F2, if all models of F1 are

also models of F2

I semantically equivalent, denoted F1 ≡ F2, iff F1 and F2 have the

same models

42 / 144

Page 43: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Validity, satisfiability,

A (closed) formula F is

I satisfiable if there is a Σ-structure A which is a model for F , A |= F

I valid if every Σ-structure is a model for F

Note: a formula F is valid if and only if ¬F is unsatisfiable

Formulas F1,F2 are:

I F1 semantically imply F2, denoted F1 |= F2, if all models of F1 are

also models of F2

I semantically equivalent, denoted F1 ≡ F2, iff F1 and F2 have the

same models

43 / 144

Page 44: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Validity, satisfiability,

A (closed) formula F is

I satisfiable if there is a Σ-structure A which is a model for F , A |= F

I valid if every Σ-structure is a model for F

Note: a formula F is valid if and only if ¬F is unsatisfiable

Formulas F1,F2 are:

I F1 semantically imply F2, denoted F1 |= F2, if all models of F1 are

also models of F2

I semantically equivalent, denoted F1 ≡ F2, iff F1 and F2 have the

same models

44 / 144

Page 45: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

A first-order theory is T is a set of first-order formulas closed under

implication: if F ∈ T and F |= G then G ∈ T .

Axioms for T is a set of formulas Ax such that Ax ⊆ T and Ax imply T .

45 / 144

Page 46: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

A first-order theory is T is a set of first-order formulas closed under

implication: if F ∈ T and F |= G then G ∈ T .

Axioms for T is a set of formulas Ax such that Ax ⊆ T and Ax imply T .

46 / 144

Page 47: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

Consider a first-order theory T and a first-order formula F .

The main reasoning problem is checking whether T |= F .

Axioms of groups Group: Σ = ({·/2,−1/1, e/0}, {' /2}):

I ∀x , y , z (x · (y · z) ' (x · y) · z) – associativity

I ∀x (x · x−1 ' e) – inverse

I ∀x (x · e ' x) – identity

Consider F = ∀x , y ((x · y)−1 ' y−1 · x−1)

Is F a theorem in the group theory: Group |= F ?

Axioms of arrays:

I ∀a, i , e (select(store(a, i , e), i) ' e)

I ∀a, i , j , e (i 6' j → (select(store(a, i , e), j) ' select(a, j)))

I ∀a1, a2 ((∀i (select(a1, i) ' select(a2, i)))→ a1 ' a2)

Is ∃a∃i∀j (select(a, i) ' select(a, j)) a theorem in the theory of arrays ?47 / 144

Page 48: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

Consider a first-order theory T and a first-order formula F .

The main reasoning problem is checking whether T |= F .

Axioms of groups Group: Σ = ({·/2,−1/1, e/0}, {' /2}):

I ∀x , y , z (x · (y · z) ' (x · y) · z) – associativity

I ∀x (x · x−1 ' e) – inverse

I ∀x (x · e ' x) – identity

Consider F = ∀x , y ((x · y)−1 ' y−1 · x−1)

Is F a theorem in the group theory: Group |= F ?

Axioms of arrays:

I ∀a, i , e (select(store(a, i , e), i) ' e)

I ∀a, i , j , e (i 6' j → (select(store(a, i , e), j) ' select(a, j)))

I ∀a1, a2 ((∀i (select(a1, i) ' select(a2, i)))→ a1 ' a2)

Is ∃a∃i∀j (select(a, i) ' select(a, j)) a theorem in the theory of arrays ?48 / 144

Page 49: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

Consider a first-order theory T and a first-order formula F .

The main reasoning problem is checking whether T |= F .

Axioms of groups Group: Σ = ({·/2,−1/1, e/0}, {' /2}):

I ∀x , y , z (x · (y · z) ' (x · y) · z) – associativity

I ∀x (x · x−1 ' e) – inverse

I ∀x (x · e ' x) – identity

Consider F = ∀x , y ((x · y)−1 ' y−1 · x−1)

Is F a theorem in the group theory: Group |= F ?

Axioms of arrays:

I ∀a, i , e (select(store(a, i , e), i) ' e)

I ∀a, i , j , e (i 6' j → (select(store(a, i , e), j) ' select(a, j)))

I ∀a1, a2 ((∀i (select(a1, i) ' select(a2, i)))→ a1 ' a2)

Is ∃a∃i∀j (select(a, i) ' select(a, j)) a theorem in the theory of arrays ?49 / 144

Page 50: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

First-order theories

Consider a first-order theory T and a first-order formula F .

The main reasoning problem is checking whether T |= F .

Axioms of groups Group: Σ = ({·/2,−1/1, e/0}, {' /2}):

I ∀x , y , z (x · (y · z) ' (x · y) · z) – associativity

I ∀x (x · x−1 ' e) – inverse

I ∀x (x · e ' x) – identity

Consider F = ∀x , y ((x · y)−1 ' y−1 · x−1)

Is F a theorem in the group theory: Group |= F ?

Axioms of arrays:

I ∀a, i , e (select(store(a, i , e), i) ' e)

I ∀a, i , j , e (i 6' j → (select(store(a, i , e), j) ' select(a, j)))

I ∀a1, a2 ((∀i (select(a1, i) ' select(a2, i)))→ a1 ' a2)

Is ∃a∃i∀j (select(a, i) ' select(a, j)) a theorem in the theory of arrays ?50 / 144

Page 51: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Deduction

Semantic arguments are usually as hoc, complicated and

applicable only to narrow cases.

Deduction: A simple set of syntactic rules to derive theorems.

Why deduction:

I purely syntactic derivations

I can derive any first-order theorem (completeness)

I a universal set of rules which is applicable to any first-order theory

I can be efficiently automated

51 / 144

Page 52: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Deduction

Semantic arguments are usually as hoc, complicated and

applicable only to narrow cases.

Deduction: A simple set of syntactic rules to derive theorems.

Why deduction:

I purely syntactic derivations

I can derive any first-order theorem (completeness)

I a universal set of rules which is applicable to any first-order theory

I can be efficiently automated

52 / 144

Page 53: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Calculi for first-order logic

Calculi complete for first-order logic:

I natural deduction

I difficult to automate

I tableaux-based calculi

I popular with special fragments: modal and description logics

I difficult to automate efficiently in the general case

I resolution/superposition calculi

I general purpose

I can be efficiently automated

I decision procedure for many fragments

I instantiation-based calculi

I combination of efficient ground reasoning with first-order reasoning

I can be efficiently automated

I decision procedure for the effectively propositional fragment (EPR)

53 / 144

Page 54: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Calculi for first-order logic

Calculi complete for first-order logic:

I natural deduction

I difficult to automate

I tableaux-based calculi

I popular with special fragments: modal and description logics

I difficult to automate efficiently in the general case

I resolution/superposition calculi

I general purpose

I can be efficiently automated

I decision procedure for many fragments

I instantiation-based calculi

I combination of efficient ground reasoning with first-order reasoning

I can be efficiently automated

I decision procedure for the effectively propositional fragment (EPR)

54 / 144

Page 55: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Calculi for first-order logic

Calculi complete for first-order logic:

I natural deduction

I difficult to automate

I tableaux-based calculi

I popular with special fragments: modal and description logics

I difficult to automate efficiently in the general case

I resolution/superposition calculi

I general purpose

I can be efficiently automated

I decision procedure for many fragments

I instantiation-based calculi

I combination of efficient ground reasoning with first-order reasoning

I can be efficiently automated

I decision procedure for the effectively propositional fragment (EPR)

55 / 144

Page 56: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Calculi for first-order logic

Calculi complete for first-order logic:

I natural deduction

I difficult to automate

I tableaux-based calculi

I popular with special fragments: modal and description logics

I difficult to automate efficiently in the general case

I resolution/superposition calculi

I general purpose

I can be efficiently automated

I decision procedure for many fragments

I instantiation-based calculi

I combination of efficient ground reasoning with first-order reasoning

I can be efficiently automated

I decision procedure for the effectively propositional fragment (EPR)

56 / 144

Page 57: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Refutational reasoning

In reasoning methods we study, the validity problem is reformulated in

terms of unsatisfiability. Proof by contradiction.

A is valid iff ¬A is unsatisfiable.

In other words:

|= A iff ¬A |= ⊥

Example. The are an infinite number of prime numbers.

Other common problems:

|= Axioms→ Theorem iff Axioms ∧ ¬Theorem |= ⊥

|= A↔ B iff A↔ ¬B |= ⊥

57 / 144

Page 58: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Refutational reasoning

In reasoning methods we study, the validity problem is reformulated in

terms of unsatisfiability. Proof by contradiction.

A is valid iff ¬A is unsatisfiable.

In other words:

|= A iff ¬A |= ⊥

Example. The are an infinite number of prime numbers.

Other common problems:

|= Axioms→ Theorem iff Axioms ∧ ¬Theorem |= ⊥

|= A↔ B iff A↔ ¬B |= ⊥

58 / 144

Page 59: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Refutational reasoning

In reasoning methods we study, the validity problem is reformulated in

terms of unsatisfiability. Proof by contradiction.

A is valid iff ¬A is unsatisfiable.

In other words:

|= A iff ¬A |= ⊥

Example. The are an infinite number of prime numbers.

Other common problems:

|= Axioms→ Theorem iff Axioms ∧ ¬Theorem |= ⊥

|= A↔ B iff A↔ ¬B |= ⊥

59 / 144

Page 60: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Refutational reasoning

In reasoning methods we study, the validity problem is reformulated in

terms of unsatisfiability. Proof by contradiction.

A is valid iff ¬A is unsatisfiable.

In other words:

|= A iff ¬A |= ⊥

Example. The are an infinite number of prime numbers.

Other common problems:

|= Axioms→ Theorem iff Axioms ∧ ¬Theorem |= ⊥

|= A↔ B iff A↔ ¬B |= ⊥

60 / 144

Page 61: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Normal forms: CNF

Page 62: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Normal Forms

For efficient reasoning methods we need to assume that formulas are in a

certain simple normal form – conjunctive normal form (CNF).

CNF transformation: Transforms any first-order formula into an

equi-satisfiable formula in CNF.

62 / 144

Page 63: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Normal Forms

For efficient reasoning methods we need to assume that formulas are in a

certain simple normal form – conjunctive normal form (CNF).

CNF transformation: Transforms any first-order formula into an

equi-satisfiable formula in CNF.

63 / 144

Page 64: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal, clause

I Literal L: either an atom p(t̄) (positive literal) or its negation ¬p(t̄)

(negative literal).

I The complementary literal to L:

Ldef=

{¬p(t̄), if L has the form p(t̄);

p(t̄), if L has the form ¬p(t̄).

In other words, p(t̄) and ¬p(t̄) are complementary.

I Clause: disjunction of literals

L1 ∨ . . . ∨ Ln, n ≥ 0.

Variables are implicitly universally quantified.

A clause can be seen as a mulit-set of literals {L1, . . . , Ln}.

I Empty clause, denoted by �: n = 0

The empty clause is false in every interpretation. 64 / 144

Page 65: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal, clause

I Literal L: either an atom p(t̄) (positive literal) or its negation ¬p(t̄)

(negative literal).

I The complementary literal to L:

Ldef=

{¬p(t̄), if L has the form p(t̄);

p(t̄), if L has the form ¬p(t̄).

In other words, p(t̄) and ¬p(t̄) are complementary.

I Clause: disjunction of literals

L1 ∨ . . . ∨ Ln, n ≥ 0.

Variables are implicitly universally quantified.

A clause can be seen as a mulit-set of literals {L1, . . . , Ln}.

I Empty clause, denoted by �: n = 0

The empty clause is false in every interpretation. 65 / 144

Page 66: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal, clause

I Literal L: either an atom p(t̄) (positive literal) or its negation ¬p(t̄)

(negative literal).

I The complementary literal to L:

Ldef=

{¬p(t̄), if L has the form p(t̄);

p(t̄), if L has the form ¬p(t̄).

In other words, p(t̄) and ¬p(t̄) are complementary.

I Clause: disjunction of literals

L1 ∨ . . . ∨ Ln, n ≥ 0.

Variables are implicitly universally quantified.

A clause can be seen as a mulit-set of literals {L1, . . . , Ln}.

I Empty clause, denoted by �: n = 0

The empty clause is false in every interpretation. 66 / 144

Page 67: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal, clause

I Literal L: either an atom p(t̄) (positive literal) or its negation ¬p(t̄)

(negative literal).

I The complementary literal to L:

Ldef=

{¬p(t̄), if L has the form p(t̄);

p(t̄), if L has the form ¬p(t̄).

In other words, p(t̄) and ¬p(t̄) are complementary.

I Clause: disjunction of literals

L1 ∨ . . . ∨ Ln, n ≥ 0.

Variables are implicitly universally quantified.

A clause can be seen as a mulit-set of literals {L1, . . . , Ln}.

I Empty clause, denoted by �: n = 0

The empty clause is false in every interpretation. 67 / 144

Page 68: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF

I A formula F is in conjunctive normal form, or simply CNF, if it is

either >, or ⊥, or a universally quantified conjunction of clauses:

F = ∀x̄ [∧i

(∨j

Li,j)].

Example:

∀x , y , z [ p(x) ∨ p(y) ∨ ¬q(x , f (y))∧

¬p(f (z)) ∨ q(z , z)∧

q(c , f (d)) ]

Notation: a set of clauses

{p(x) ∨ p(y) ∨ ¬q(x , f (y)),¬p(f (z)) ∨ q(z , z), q(c , f (d))}

I A set of clauses S is a clausal normal form of a formula F if

S is equi-satisfiable with F . 68 / 144

Page 69: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF

I A formula F is in conjunctive normal form, or simply CNF, if it is

either >, or ⊥, or a universally quantified conjunction of clauses:

F = ∀x̄ [∧i

(∨j

Li,j)].

Example:

∀x , y , z [ p(x) ∨ p(y) ∨ ¬q(x , f (y))∧

¬p(f (z)) ∨ q(z , z)∧

q(c , f (d)) ]

Notation: a set of clauses

{p(x) ∨ p(y) ∨ ¬q(x , f (y)),¬p(f (z)) ∨ q(z , z), q(c , f (d))}

I A set of clauses S is a clausal normal form of a formula F if

S is equi-satisfiable with F . 69 / 144

Page 70: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF transformation

Main steps in the basic CNF transformation:

1. Prenex normal form – moving all quantifiers up-front

∀y [∀x [p(f (x), y)]→ ∀v∃z [q(f (z)) ∧ p(v , z)]]⇒∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]

2. Skolemization – eliminating existential quantifiers

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]⇒∀y∀v [p(f (sk1(y)), y)→ (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]

3. CNF transformation of the quantifier-free part

∀y∀v [ p(f (sk1(y)), y) → (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]⇒∀y∀v [ (¬p(f (sk1(y)), y) ∨ q(f (sk2(y , v)))) ∧

(¬p(f (sk1(y)), y) ∨ p(v , sk2(y , v)))]

70 / 144

Page 71: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF transformation

Main steps in the basic CNF transformation:

1. Prenex normal form – moving all quantifiers up-front

∀y [∀x [p(f (x), y)]→ ∀v∃z [q(f (z)) ∧ p(v , z)]]⇒∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]

2. Skolemization – eliminating existential quantifiers

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]⇒∀y∀v [p(f (sk1(y)), y)→ (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]

3. CNF transformation of the quantifier-free part

∀y∀v [ p(f (sk1(y)), y) → (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]⇒∀y∀v [ (¬p(f (sk1(y)), y) ∨ q(f (sk2(y , v)))) ∧

(¬p(f (sk1(y)), y) ∨ p(v , sk2(y , v)))]

71 / 144

Page 72: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF transformation

Main steps in the basic CNF transformation:

1. Prenex normal form – moving all quantifiers up-front

∀y [∀x [p(f (x), y)]→ ∀v∃z [q(f (z)) ∧ p(v , z)]]⇒∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]

2. Skolemization – eliminating existential quantifiers

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]⇒∀y∀v [p(f (sk1(y)), y)→ (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]

3. CNF transformation of the quantifier-free part

∀y∀v [ p(f (sk1(y)), y) → (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]⇒∀y∀v [ (¬p(f (sk1(y)), y) ∨ q(f (sk2(y , v)))) ∧

(¬p(f (sk1(y)), y) ∨ p(v , sk2(y , v)))]

72 / 144

Page 73: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Prenex normal form

Prenex normal form – moving all quantifiers up-front.

Assume that the formula is rectified and

F ↔ G is replaced by (F → G ) ∧ (G → F ).

¬(∀xF ) ⇒PNF ∃x¬F¬(∃xF ) ⇒PNF ∀x¬F

( ∀∃ xF )∨∧G ⇒PNF ∀∃ x(F∨∧G )

(∃xF )→ G ⇒PNF ∀x(F → G )

(∀xF )→ G ⇒PNF ∃x(F → G )

Example:

∀y [∀x [p(f (x), y)]→ ∀v∃z [q(f (z)) ∧ p(v , z)]]⇒∗PNF

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]

73 / 144

Page 74: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Prenex normal form

Prenex normal form – moving all quantifiers up-front.

Assume that the formula is rectified and

F ↔ G is replaced by (F → G ) ∧ (G → F ).

¬(∀xF ) ⇒PNF ∃x¬F¬(∃xF ) ⇒PNF ∀x¬F

( ∀∃ xF )∨∧G ⇒PNF ∀∃ x(F∨∧G )

(∃xF )→ G ⇒PNF ∀x(F → G )

(∀xF )→ G ⇒PNF ∃x(F → G )

Example:

∀y [∀x [p(f (x), y)]→ ∀v∃z [q(f (z)) ∧ p(v , z)]]⇒∗PNF

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]

74 / 144

Page 75: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Skolemization

Skolemization – eliminating existential quantifiers.

F = ∀x̄∃y F ′(x̄ , y)

Informally:

I F states that for each value of x̄ we can choose a value for y such

that F ′(x̄ , y) holds.

I We can represent this choice by a Skolem function skF ′(x̄).

I ∀x̄∃y F ′(x̄ , y) is equi-satisfiable with ∀x̄ F ′(x̄ , skF ′(x̄)).

Example:

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]⇒SK

∀y∀v [p(f (sk1(y)), y)→ (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]

75 / 144

Page 76: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Skolemization

Skolemization – eliminating existential quantifiers.

F = ∀x̄∃y F ′(x̄ , y)

Informally:

I F states that for each value of x̄ we can choose a value for y such

that F ′(x̄ , y) holds.

I We can represent this choice by a Skolem function skF ′(x̄).

I ∀x̄∃y F ′(x̄ , y) is equi-satisfiable with ∀x̄ F ′(x̄ , skF ′(x̄)).

Example:

∀y∃x∀v∃z [p(f (x), y)→ (q(f (z)) ∧ p(v , z))]⇒SK

∀y∀v [p(f (sk1(y)), y)→ (q(f (sk2(y , v))) ∧ p(v , sk2(y , v)))]

76 / 144

Page 77: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

CNF transformation

CNF transformation of the quantifier-fee part:

F ↔ G ⇒CNF (F → G ) ∧ (G → F )

F → G ⇒CNF (¬F ∨ G )

¬(F ∨ G ) ⇒CNF (¬F ∧ ¬G )

¬(F ∧ G ) ⇒CNF (¬F ∨ ¬G )

¬¬F ⇒CNF F

(F ∧ G ) ∨ H ⇒CNF (F ∨ H) ∧ (G ∨ H)

77 / 144

Page 78: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Clausal normal form

F ⇒∗PNF ∀∃ x1 . . . ∀∃ xn F ′

⇒∗SK ∀x̄ F ′′

⇒∗CNF ∀x̄ [∧

i (∨

j Li,j)]

⇒ {C1, . . . ,Cn}

Note: all variables in C1, . . . ,Cn are implicitly universally quantified.

Problems with the basic transformation:

I exponential in size

I the structure of the formula can be lost

I Skolem functions can include many irrelevant arguments

78 / 144

Page 79: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Clausal normal form

F ⇒∗PNF ∀∃ x1 . . . ∀∃ xn F ′

⇒∗SK ∀x̄ F ′′

⇒∗CNF ∀x̄ [∧

i (∨

j Li,j)]

⇒ {C1, . . . ,Cn}

Note: all variables in C1, . . . ,Cn are implicitly universally quantified.

Problems with the basic transformation:

I exponential in size

I the structure of the formula can be lost

I Skolem functions can include many irrelevant arguments

79 / 144

Page 80: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Clausal normal form

F ⇒∗PNF ∀∃ x1 . . . ∀∃ xn F ′

⇒∗SK ∀x̄ F ′′

⇒∗CNF ∀x̄ [∧

i (∨

j Li,j)]

⇒ {C1, . . . ,Cn}

Note: all variables in C1, . . . ,Cn are implicitly universally quantified.

Problems with the basic transformation:

I exponential in size

I the structure of the formula can be lost

I Skolem functions can include many irrelevant arguments

80 / 144

Page 81: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 81 / 144

Page 82: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 82 / 144

Page 83: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 83 / 144

Page 84: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 84 / 144

Page 85: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 85 / 144

Page 86: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 86 / 144

Page 87: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 87 / 144

Page 88: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Optimized CNF transformation

Optimized: do the opposite to the basic transformation.

I structural transformation: introduce names for complex sub-formulas

I F [G(x̄)] equi-satisfiable with F [pG (x̄)] ∧ ∀x̄(pG (x̄)↔ G(x̄))

where pG is a fresh predicate name.

I using naming we can obtain a linear-size CNF

I structural transformation: optimizations

I if G(x̄) occurs only positively then we need only one side of the

definition: ∀x̄(pG (x̄)→ G(x̄)) (similar for negatively)

I reuse names, combine with preprocessing

I miniscoping: push quantifiers inwards

Reduces arguments of Skolem functions: ∀x , y∃z(p(z) ∨ q(x , y))

basic: p(sk(x , y)) ∨ q(x , y) non-EPR

miniscoping: p(sk) ∨ q(x , y) EPR

[Nonnengart, Weidenbach, AR’01; Hoder, Khasidashvili, Korovin, Voronkov,

FMCAD’12] 88 / 144

Page 89: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

Page 90: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

Basic idea: In order to check of satisfiability of (universal) formulas it is

sufficient to consider only specific class of interpretations called

Herbrand interpretations.

Consider a signature Σ = (F ,P), we assume that F contains at least

one constant in F .

Key ingredient – ground terms.

Ground terms – terms without occurrences of variables e.g. f (f (a, b), a).

The set of ground terms is T (Σ, ∅).

Ground atoms, clauses are ... without occurrences of variables.

Grounding substitution is a substitution with the range in ground terms.

90 / 144

Page 91: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

Basic idea: In order to check of satisfiability of (universal) formulas it is

sufficient to consider only specific class of interpretations called

Herbrand interpretations.

Consider a signature Σ = (F ,P), we assume that F contains at least

one constant in F .

Key ingredient – ground terms.

Ground terms – terms without occurrences of variables e.g. f (f (a, b), a).

The set of ground terms is T (Σ, ∅).

Ground atoms, clauses are ... without occurrences of variables.

Grounding substitution is a substitution with the range in ground terms.

91 / 144

Page 92: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

Basic idea: In order to check of satisfiability of (universal) formulas it is

sufficient to consider only specific class of interpretations called

Herbrand interpretations.

Consider a signature Σ = (F ,P), we assume that F contains at least

one constant in F .

Key ingredient – ground terms.

Ground terms – terms without occurrences of variables e.g. f (f (a, b), a).

The set of ground terms is T (Σ, ∅).

Ground atoms, clauses are ... without occurrences of variables.

Grounding substitution is a substitution with the range in ground terms.

92 / 144

Page 93: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

A Herbrand Σ-interpretation H = (H,FH,PH) is a Σ-structure such

that

I H = T (Σ, ∅) –the domain is the set of all ground terms

I f H(t1, . . . , tn) = f (t1, . . . , tn) – terms are interpreted by themselves

Note: the domain and the interpretation of functions are fixed, only

interpretations of predicates can vary.

Example: Consider Σ = ({s/1, 0/0}, {p/2}) possible Herbrand

Σ-interpretations H1,H2:

I 0 ∈ pH1 , s(s(0)) ∈ pH1 , . . . , s2n(0) ∈ pH1 , . . ..

I pH2 = ∅Q: How many Herbrand interpretations over Σ exist?

We can specify any Herbrand interpretation uniquely by specifying which

ground atoms are true in it.

Notation: H1 = {p(0), p(s(s(0))), . . . , p(s2n(0)), . . .}.93 / 144

Page 94: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

A Herbrand Σ-interpretation H = (H,FH,PH) is a Σ-structure such

that

I H = T (Σ, ∅) –the domain is the set of all ground terms

I f H(t1, . . . , tn) = f (t1, . . . , tn) – terms are interpreted by themselves

Note: the domain and the interpretation of functions are fixed, only

interpretations of predicates can vary.

Example: Consider Σ = ({s/1, 0/0}, {p/2}) possible Herbrand

Σ-interpretations H1,H2:

I 0 ∈ pH1 , s(s(0)) ∈ pH1 , . . . , s2n(0) ∈ pH1 , . . ..

I pH2 = ∅Q: How many Herbrand interpretations over Σ exist?

We can specify any Herbrand interpretation uniquely by specifying which

ground atoms are true in it.

Notation: H1 = {p(0), p(s(s(0))), . . . , p(s2n(0)), . . .}.94 / 144

Page 95: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

A Herbrand Σ-interpretation H = (H,FH,PH) is a Σ-structure such

that

I H = T (Σ, ∅) –the domain is the set of all ground terms

I f H(t1, . . . , tn) = f (t1, . . . , tn) – terms are interpreted by themselves

Note: the domain and the interpretation of functions are fixed, only

interpretations of predicates can vary.

Example: Consider Σ = ({s/1, 0/0}, {p/2}) possible Herbrand

Σ-interpretations H1,H2:

I 0 ∈ pH1 , s(s(0)) ∈ pH1 , . . . , s2n(0) ∈ pH1 , . . ..

I pH2 = ∅Q: How many Herbrand interpretations over Σ exist?

We can specify any Herbrand interpretation uniquely by specifying which

ground atoms are true in it.

Notation: H1 = {p(0), p(s(s(0))), . . . , p(s2n(0)), . . .}.95 / 144

Page 96: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations

A Herbrand Σ-interpretation H = (H,FH,PH) is a Σ-structure such

that

I H = T (Σ, ∅) –the domain is the set of all ground terms

I f H(t1, . . . , tn) = f (t1, . . . , tn) – terms are interpreted by themselves

Note: the domain and the interpretation of functions are fixed, only

interpretations of predicates can vary.

Example: Consider Σ = ({s/1, 0/0}, {p/2}) possible Herbrand

Σ-interpretations H1,H2:

I 0 ∈ pH1 , s(s(0)) ∈ pH1 , . . . , s2n(0) ∈ pH1 , . . ..

I pH2 = ∅Q: How many Herbrand interpretations over Σ exist?

We can specify any Herbrand interpretation uniquely by specifying which

ground atoms are true in it.

Notation: H1 = {p(0), p(s(s(0))), . . . , p(s2n(0)), . . .}.96 / 144

Page 97: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations suffice

Theorem. Consider a universally quantified formula F over Σ.

Then F is satisfiable if and only if F has a Herbrand model.

Proof. ⇐) Obvious.

⇒) Let F = ∀x1, . . . , xnF ′(x̄) where F ′(x̄) is quantifier-free.

Consider A such that A |= ∀x1, . . . , xnF ′(x̄).

Then for any t1, . . . , tn ∈ T (Σ, ∅) we have A |= F ′[tA1 , . . . , tAn ].

Define a Herbrand interpretation H as follows

H = {p(t̄) | A |= p[t̄A], where p ∈ P, t̄ ∈ T (Σ, ∅)}.

The domain of H is T (Σ, ∅), hence to show that

H |= ∀x1, . . . , xnF ′(x̄) it is suffices to show that for any terms

t1, . . . , tn ∈ T (Σ, ∅),H |= F ′[t1, . . . , tn]. This holds since

H |= F ′[t1, . . . , tn] iff A |= F ′[tA1 , . . . , tAn ] by construction.

97 / 144

Page 98: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations suffice

Theorem. Consider a universally quantified formula F over Σ.

Then F is satisfiable if and only if F has a Herbrand model.

Proof. ⇐) Obvious.

⇒) Let F = ∀x1, . . . , xnF ′(x̄) where F ′(x̄) is quantifier-free.

Consider A such that A |= ∀x1, . . . , xnF ′(x̄).

Then for any t1, . . . , tn ∈ T (Σ, ∅) we have A |= F ′[tA1 , . . . , tAn ].

Define a Herbrand interpretation H as follows

H = {p(t̄) | A |= p[t̄A], where p ∈ P, t̄ ∈ T (Σ, ∅)}.

The domain of H is T (Σ, ∅), hence to show that

H |= ∀x1, . . . , xnF ′(x̄) it is suffices to show that for any terms

t1, . . . , tn ∈ T (Σ, ∅),H |= F ′[t1, . . . , tn]. This holds since

H |= F ′[t1, . . . , tn] iff A |= F ′[tA1 , . . . , tAn ] by construction.

98 / 144

Page 99: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations suffice

Theorem. Consider a universally quantified formula F over Σ.

Then F is satisfiable if and only if F has a Herbrand model.

Proof. ⇐) Obvious.

⇒) Let F = ∀x1, . . . , xnF ′(x̄) where F ′(x̄) is quantifier-free.

Consider A such that A |= ∀x1, . . . , xnF ′(x̄).

Then for any t1, . . . , tn ∈ T (Σ, ∅) we have A |= F ′[tA1 , . . . , tAn ].

Define a Herbrand interpretation H as follows

H = {p(t̄) | A |= p[t̄A], where p ∈ P, t̄ ∈ T (Σ, ∅)}.

The domain of H is T (Σ, ∅), hence to show that

H |= ∀x1, . . . , xnF ′(x̄) it is suffices to show that for any terms

t1, . . . , tn ∈ T (Σ, ∅),H |= F ′[t1, . . . , tn]. This holds since

H |= F ′[t1, . . . , tn] iff A |= F ′[tA1 , . . . , tAn ] by construction.

99 / 144

Page 100: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Herbrand interpretations suffice

Theorem. Consider a universally quantified formula F over Σ.

Then F is satisfiable if and only if F has a Herbrand model.

Proof. ⇐) Obvious.

⇒) Let F = ∀x1, . . . , xnF ′(x̄) where F ′(x̄) is quantifier-free.

Consider A such that A |= ∀x1, . . . , xnF ′(x̄).

Then for any t1, . . . , tn ∈ T (Σ, ∅) we have A |= F ′[tA1 , . . . , tAn ].

Define a Herbrand interpretation H as follows

H = {p(t̄) | A |= p[t̄A], where p ∈ P, t̄ ∈ T (Σ, ∅)}.

The domain of H is T (Σ, ∅), hence to show that

H |= ∀x1, . . . , xnF ′(x̄) it is suffices to show that for any terms

t1, . . . , tn ∈ T (Σ, ∅),H |= F ′[t1, . . . , tn]. This holds since

H |= F ′[t1, . . . , tn] iff A |= F ′[tA1 , . . . , tAn ] by construction.

100 / 144

Page 101: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Grounding

Consider a universally quantified formula:

F = ∀x1, . . . , xnF ′(x1, . . . , xn) where F ′(x1, . . . , xn) is quantifier-free.

A ground instance of F ′ (ambiguously also of F ) is a ground formula

F ′σ where σ is a grounding substitution.

Denote the set of all ground instances of F ′ as

Gr(F ′) = {F ′σ | σ is a grounding substitution}

For a set of formulas Φ, Gr(Φ) = {Gr(F ) | F ∈ Φ}For clauses and set of clauses definitions of ground instances are similar.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}).

Ground instances of p(x) ∨ ¬p(f (x)) consist of:

p(a)∨¬p(f (a)), p(f (a))∨¬p(f (f (a))), . . . , p(f n(a))∨¬p(f n+1(a))), . . .

101 / 144

Page 102: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Grounding

Consider a universally quantified formula:

F = ∀x1, . . . , xnF ′(x1, . . . , xn) where F ′(x1, . . . , xn) is quantifier-free.

A ground instance of F ′ (ambiguously also of F ) is a ground formula

F ′σ where σ is a grounding substitution.

Denote the set of all ground instances of F ′ as

Gr(F ′) = {F ′σ | σ is a grounding substitution}

For a set of formulas Φ, Gr(Φ) = {Gr(F ) | F ∈ Φ}For clauses and set of clauses definitions of ground instances are similar.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}).

Ground instances of p(x) ∨ ¬p(f (x)) consist of:

p(a)∨¬p(f (a)), p(f (a))∨¬p(f (f (a))), . . . , p(f n(a))∨¬p(f n+1(a))), . . .

102 / 144

Page 103: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Grounding

Consider a universally quantified formula:

F = ∀x1, . . . , xnF ′(x1, . . . , xn) where F ′(x1, . . . , xn) is quantifier-free.

A ground instance of F ′ (ambiguously also of F ) is a ground formula

F ′σ where σ is a grounding substitution.

Denote the set of all ground instances of F ′ as

Gr(F ′) = {F ′σ | σ is a grounding substitution}

For a set of formulas Φ, Gr(Φ) = {Gr(F ) | F ∈ Φ}For clauses and set of clauses definitions of ground instances are similar.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}).

Ground instances of p(x) ∨ ¬p(f (x)) consist of:

p(a)∨¬p(f (a)), p(f (a))∨¬p(f (f (a))), . . . , p(f n(a))∨¬p(f n+1(a))), . . .

103 / 144

Page 104: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction of first-order to ground

Theorem. A set of first-order universal formulas Φ is satisfiable

if and only the set of its ground instances Gr(Φ) is satisfiable.

Proof. ⇒) is trivial.

⇐) Assume Gr(Φ) is satisfiable. Then there is a Herbrand model

H |= Gr(Φ). Since the domain of H is exactly all ground terms, H |= Φ.

104 / 144

Page 105: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction of first-order to ground

Theorem. A set of first-order universal formulas Φ is satisfiable

if and only the set of its ground instances Gr(Φ) is satisfiable.

Proof. ⇒) is trivial.

⇐) Assume Gr(Φ) is satisfiable. Then there is a Herbrand model

H |= Gr(Φ). Since the domain of H is exactly all ground terms, H |= Φ.

105 / 144

Page 106: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction first-order to propositional

Ground formulas can be seen as propositional formulas as follows:

Consider a ground formula F .

I With each ground atom A in F associate a propositional variable xA.

I Let Prop(F ) be a propositional formula obtained from F by

replacing all atoms by the corresponding propositional variables.

I F is satisfiable if and only if Prop(F ) is satisfiable.

Example:

F = {p(f (a)) ∨ ¬p(a), p(a) ∨ ¬p(f (a))}Prop(F ) = {xp(f (a)) ∨ ¬xp(a), xp(a) ∨ ¬xp(f (a))}

Corollary. A set of first-order universal formulas Φ is satisfiable

if and only the set of propositional formulas Prop(Gr(Φ)) is satisfiable.

We will not distinguish between ground atoms and their propositional

encodings.106 / 144

Page 107: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction first-order to propositional

Ground formulas can be seen as propositional formulas as follows:

Consider a ground formula F .

I With each ground atom A in F associate a propositional variable xA.

I Let Prop(F ) be a propositional formula obtained from F by

replacing all atoms by the corresponding propositional variables.

I F is satisfiable if and only if Prop(F ) is satisfiable.

Example:

F = {p(f (a)) ∨ ¬p(a), p(a) ∨ ¬p(f (a))}Prop(F ) = {xp(f (a)) ∨ ¬xp(a), xp(a) ∨ ¬xp(f (a))}

Corollary. A set of first-order universal formulas Φ is satisfiable

if and only the set of propositional formulas Prop(Gr(Φ)) is satisfiable.

We will not distinguish between ground atoms and their propositional

encodings.107 / 144

Page 108: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction first-order to propositional

Ground formulas can be seen as propositional formulas as follows:

Consider a ground formula F .

I With each ground atom A in F associate a propositional variable xA.

I Let Prop(F ) be a propositional formula obtained from F by

replacing all atoms by the corresponding propositional variables.

I F is satisfiable if and only if Prop(F ) is satisfiable.

Example:

F = {p(f (a)) ∨ ¬p(a), p(a) ∨ ¬p(f (a))}Prop(F ) = {xp(f (a)) ∨ ¬xp(a), xp(a) ∨ ¬xp(f (a))}

Corollary. A set of first-order universal formulas Φ is satisfiable

if and only the set of propositional formulas Prop(Gr(Φ)) is satisfiable.

We will not distinguish between ground atoms and their propositional

encodings.108 / 144

Page 109: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Reduction first-order to propositional

Ground formulas can be seen as propositional formulas as follows:

Consider a ground formula F .

I With each ground atom A in F associate a propositional variable xA.

I Let Prop(F ) be a propositional formula obtained from F by

replacing all atoms by the corresponding propositional variables.

I F is satisfiable if and only if Prop(F ) is satisfiable.

Example:

F = {p(f (a)) ∨ ¬p(a), p(a) ∨ ¬p(f (a))}Prop(F ) = {xp(f (a)) ∨ ¬xp(a), xp(a) ∨ ¬xp(f (a))}

Corollary. A set of first-order universal formulas Φ is satisfiable

if and only the set of propositional formulas Prop(Gr(Φ)) is satisfiable.

We will not distinguish between ground atoms and their propositional

encodings.109 / 144

Page 110: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Examples

Example: Consider a signature Σ = ({a/0, b/0}, {p/1, q/2}) and a set of

clauses S = {¬p(x) ∨ q(x , a),¬q(x , x) ∨ p(x)}. Is S satisfiable?.

Gr(S) = { ¬p(a) ∨ q(a, a)

¬p(b) ∨ q(b, a)

¬q(a, a) ∨ p(a)

¬q(b, b) ∨ p(b) }Apply any propositional method to check whether Gr(S) is satisfiable.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}) and a set of

clauses S = {p(x) ∨ ¬p(f (x)),¬p(x) ∨ p(f (x))}. Is S satisfiable?.

The set of ground instances Gr(S) is infinite:

p(a) ∨ ¬p(f (a)), p(f (a)) ∨ ¬p(f (f (a))), . . . , p(f n(a)) ∨ ¬p(f n+1(a))), . . .

¬p(a) ∨ p(f (a)), ¬p(f (a)) ∨ p(f (f (a))), . . . ,¬p(f n(a)) ∨ p(f n+1(a))), . . .

110 / 144

Page 111: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Examples

Example: Consider a signature Σ = ({a/0, b/0}, {p/1, q/2}) and a set of

clauses S = {¬p(x) ∨ q(x , a),¬q(x , x) ∨ p(x)}. Is S satisfiable?.

Gr(S) = { ¬p(a) ∨ q(a, a)

¬p(b) ∨ q(b, a)

¬q(a, a) ∨ p(a)

¬q(b, b) ∨ p(b) }Apply any propositional method to check whether Gr(S) is satisfiable.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}) and a set of

clauses S = {p(x) ∨ ¬p(f (x)),¬p(x) ∨ p(f (x))}. Is S satisfiable?.

The set of ground instances Gr(S) is infinite:

p(a) ∨ ¬p(f (a)), p(f (a)) ∨ ¬p(f (f (a))), . . . , p(f n(a)) ∨ ¬p(f n+1(a))), . . .

¬p(a) ∨ p(f (a)), ¬p(f (a)) ∨ p(f (f (a))), . . . ,¬p(f n(a)) ∨ p(f n+1(a))), . . .

111 / 144

Page 112: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Examples

Example: Consider a signature Σ = ({a/0, b/0}, {p/1, q/2}) and a set of

clauses S = {¬p(x) ∨ q(x , a),¬q(x , x) ∨ p(x)}. Is S satisfiable?.

Gr(S) = { ¬p(a) ∨ q(a, a)

¬p(b) ∨ q(b, a)

¬q(a, a) ∨ p(a)

¬q(b, b) ∨ p(b) }Apply any propositional method to check whether Gr(S) is satisfiable.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}) and a set of

clauses S = {p(x) ∨ ¬p(f (x)),¬p(x) ∨ p(f (x))}. Is S satisfiable?.

The set of ground instances Gr(S) is infinite:

p(a) ∨ ¬p(f (a)), p(f (a)) ∨ ¬p(f (f (a))), . . . , p(f n(a)) ∨ ¬p(f n+1(a))), . . .

¬p(a) ∨ p(f (a)), ¬p(f (a)) ∨ p(f (f (a))), . . . ,¬p(f n(a)) ∨ p(f n+1(a))), . . .

112 / 144

Page 113: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Examples

Example: Consider a signature Σ = ({a/0, b/0}, {p/1, q/2}) and a set of

clauses S = {¬p(x) ∨ q(x , a),¬q(x , x) ∨ p(x)}. Is S satisfiable?.

Gr(S) = { ¬p(a) ∨ q(a, a)

¬p(b) ∨ q(b, a)

¬q(a, a) ∨ p(a)

¬q(b, b) ∨ p(b) }Apply any propositional method to check whether Gr(S) is satisfiable.

Example: Consider a signature Σ = ({f /1, a/0}, {p/1}) and a set of

clauses S = {p(x) ∨ ¬p(f (x)),¬p(x) ∨ p(f (x))}. Is S satisfiable?.

The set of ground instances Gr(S) is infinite:

p(a) ∨ ¬p(f (a)), p(f (a)) ∨ ¬p(f (f (a))), . . . , p(f n(a)) ∨ ¬p(f n+1(a))), . . .

¬p(a) ∨ p(f (a)), ¬p(f (a)) ∨ p(f (f (a))), . . . ,¬p(f n(a)) ∨ p(f n+1(a))), . . .

113 / 144

Page 114: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Inference systems

Page 115: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Deduction, Inference Systems

An inference has the form:

F1 . . . Fn

G

where n ≥ 0, F1, . . . ,Fn,G are formulas.

I F1 . . .Fn are called premises.

I G is called conclusion.

An inference rule R is a set of inferences.

An inference system, (or a calculus) I is a set of inference rules.

115 / 144

Page 116: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Deduction, Inference Systems

An inference has the form:

F1 . . . Fn

G

where n ≥ 0, F1, . . . ,Fn,G are formulas.

I F1 . . .Fn are called premises.

I G is called conclusion.

An inference rule R is a set of inferences.

An inference system, (or a calculus) I is a set of inference rules.

116 / 144

Page 117: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Derivation, proofs

I A derivation tree in I is a tree built from inferences.

I A proof of F (in I) from F1, . . . ,Fn is a tree with leaves in

F1, . . . ,Fn and the root F .

I A refutation proof is a proof of �.

I F is derivable, (or provable) in I from a set of formulas S , denoted

S `I F , if there is a proof of F from formulas in S .

117 / 144

Page 118: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Soundness/CompletenessSoundness.

I An inference is sound if the conclusion of this inference logically

follows from the premises (|=).

I An inference rule is sound if all its inferences are sound.

I An inference system is sound if all its inference rules are sound.

Lemma. If an inference system I is sound then for any set of formulas S :

S `I � implies S |= ⊥

Completeness. An inference system I is refutationally complete if for any

set of formulas S we have:

S |= ⊥ implies S `I �.

118 / 144

Page 119: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Soundness/CompletenessSoundness.

I An inference is sound if the conclusion of this inference logically

follows from the premises (|=).

I An inference rule is sound if all its inferences are sound.

I An inference system is sound if all its inference rules are sound.

Lemma. If an inference system I is sound then for any set of formulas S :

S `I � implies S |= ⊥

Completeness. An inference system I is refutationally complete if for any

set of formulas S we have:

S |= ⊥ implies S `I �.

119 / 144

Page 120: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Soundness/CompletenessSoundness.

I An inference is sound if the conclusion of this inference logically

follows from the premises (|=).

I An inference rule is sound if all its inferences are sound.

I An inference system is sound if all its inference rules are sound.

Lemma. If an inference system I is sound then for any set of formulas S :

S `I � implies S |= ⊥

Completeness. An inference system I is refutationally complete if for any

set of formulas S we have:

S |= ⊥ implies S `I �.

120 / 144

Page 121: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Proofs and reasoning methods

Formal Proofs:

I each step of a proof is easy to check

I proofs – certificates of correctness

I independent proof checking

Reasoning methods based on inference systems:

I efficient proof search

I restrictions on applicability of inference rules

I proof search strategies

121 / 144

Page 122: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Proofs and reasoning methods

Formal Proofs:

I each step of a proof is easy to check

I proofs – certificates of correctness

I independent proof checking

Reasoning methods based on inference systems:

I efficient proof search

I restrictions on applicability of inference rules

I proof search strategies

122 / 144

Page 123: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Propositional resolution

Page 124: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Propositional Resolution

Propositional Resolution inference system BR, consists of the following

inference rules:

I Binary resolution rule (BR):

C ∨ p ¬p ∨ D(BR)

C ∨ DI Binary positive factoring rule (BF):

C ∨ p ∨ p(BF )

C ∨ p

where p is an atom.

124 / 144

Page 125: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

125 / 144

Page 126: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

126 / 144

Page 127: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

127 / 144

Page 128: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

128 / 144

Page 129: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

129 / 144

Page 130: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

130 / 144

Page 131: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

131 / 144

Page 132: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Example

Given: S = {q ∨ ¬p, p ∨ q,¬q}

A proof in resolution calculus:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Another proof in resolution calculus:

q ∨ ¬p ¬q(BR)¬p p ∨ q

(BR)q ¬q

(BR)

132 / 144

Page 133: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Linear Proofs

Tree Proof:

q ∨ ¬p p ∨ q(BR)

q ∨ q(BF)

q ¬q(BR)

Linear Proof:1. q ∨ ¬p input

2. p ∨ q input

3. ¬q input

4. q ∨ q BR (1,2)

5. q BF (4)

6. � BR (3,5)

133 / 144

Page 134: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Soundness of resolution

Theorem. [Soundness] The resolution inference system BR is sound.

Proof. Conclusions of BR and BF are logically implied by the premises.

I {C ∨ p,¬p ∨ D} |= C ∨ D

I {C ∨ L ∨ L} |= C ∨ L

Theorem. [Completeness] The resolution inference system BR is

refutationally complete.

We need to show that for any set of clauses S :

S |= � implies S `BR �.

or equivalently:

S 6`BR � implies S is satisfiable

Completeness of resolution is one of the key results in automated

reasoning. We will present the proof after some preparations. 134 / 144

Page 135: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Soundness of resolution

Theorem. [Soundness] The resolution inference system BR is sound.

Proof. Conclusions of BR and BF are logically implied by the premises.

I {C ∨ p,¬p ∨ D} |= C ∨ D

I {C ∨ L ∨ L} |= C ∨ L

Theorem. [Completeness] The resolution inference system BR is

refutationally complete.

We need to show that for any set of clauses S :

S |= � implies S `BR �.

or equivalently:

S 6`BR � implies S is satisfiable

Completeness of resolution is one of the key results in automated

reasoning. We will present the proof after some preparations. 135 / 144

Page 136: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Search for unsatisfiability

Basic Idea. A Saturation Process:

Given set of clauses S we exhaustively apply all inference rules adding the

conclusions to this set until the contradiction (�) is derived.

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

More formally: define one-step resolution expansion

Res(S) = {C | C is a conclusion of BR applied to clauses in S}

Define

S0 = S ,S1 = Res(S0), . . . ,Sn = Res(Sn−1), . . .

is called the basic saturation process.

The limit of the basic saturation process is Res∗(S) =⋃

0≤i<ω Si

Lemma. A clause C is derivable from S using BR if and only if

C ∈ Res∗(S).136 / 144

Page 137: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Search for unsatisfiability

Basic Idea. A Saturation Process:

Given set of clauses S we exhaustively apply all inference rules adding the

conclusions to this set until the contradiction (�) is derived.

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

More formally: define one-step resolution expansion

Res(S) = {C | C is a conclusion of BR applied to clauses in S}

Define

S0 = S ,S1 = Res(S0), . . . ,Sn = Res(Sn−1), . . .

is called the basic saturation process.

The limit of the basic saturation process is Res∗(S) =⋃

0≤i<ω Si

Lemma. A clause C is derivable from S using BR if and only if

C ∈ Res∗(S).137 / 144

Page 138: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Search for unsatisfiability

Basic Idea. A Saturation Process:

Given set of clauses S we exhaustively apply all inference rules adding the

conclusions to this set until the contradiction (�) is derived.

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

More formally: define one-step resolution expansion

Res(S) = {C | C is a conclusion of BR applied to clauses in S}

Define

S0 = S ,S1 = Res(S0), . . . ,Sn = Res(Sn−1), . . .

is called the basic saturation process.

The limit of the basic saturation process is Res∗(S) =⋃

0≤i<ω Si

Lemma. A clause C is derivable from S using BR if and only if

C ∈ Res∗(S).138 / 144

Page 139: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Search for unsatisfiability

Basic Idea. A Saturation Process:

Given set of clauses S we exhaustively apply all inference rules adding the

conclusions to this set until the contradiction (�) is derived.

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

More formally: define one-step resolution expansion

Res(S) = {C | C is a conclusion of BR applied to clauses in S}

Define

S0 = S ,S1 = Res(S0), . . . ,Sn = Res(Sn−1), . . .

is called the basic saturation process.

The limit of the basic saturation process is Res∗(S) =⋃

0≤i<ω Si

Lemma. A clause C is derivable from S using BR if and only if

C ∈ Res∗(S).139 / 144

Page 140: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Saturated sets and completeness

A set of clauses S is saturated if Res(S) ⊆ S .

Note: The limit of any basic saturation process is a saturated set.

Completeness of the resolution calculus BR can be reformulated as

follows. For any saturated set of clauses S :

� 6∈ S implies S is satisfiable

140 / 144

Page 141: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Saturated sets and completeness

A set of clauses S is saturated if Res(S) ⊆ S .

Note: The limit of any basic saturation process is a saturated set.

Completeness of the resolution calculus BR can be reformulated as

follows. For any saturated set of clauses S :

� 6∈ S implies S is satisfiable

141 / 144

Page 142: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution

Page 143: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

143 / 144

Page 144: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

144 / 144

Page 145: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

145 / 144

Page 146: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

146 / 144

Page 147: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

147 / 144

Page 148: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Main idea

Consider a saturated set of clauses S such that � 6∈ S .

How we can show that S is satisfiable?

Model construction:

1. Build a “candidate” Herbrand model I with the goal to satisfy

clauses in S . The model is built inductively based on a

well-founded order � on clauses.

2. show that if S is saturated then I is indeed a model of S .

Clause representation: multi-sets of literals.

Next: multi-sets, well-founded orders on atoms, literals and clauses.

148 / 144

Page 149: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Multi-Sets

Clauses will be represented as multi-sets of literals.

I Multi-sets are “sets which allow repetition”.

Example: {a, a, b}, {a, b, a}, {a, b}

I Formally, let X be a set.

A multi-set S over X is a mapping S : X → N.

I Intuitively, S(x) specifies the number of occurrences of the element

x (of the base set X ) within S .

I Example: S = {a, a, a, b, b} is a multi-set over {a, b, c},where S(a) = 3, S(b) = 2, S(c) = 0.

I We say that x is an element of S , if S(x) > 0.

149 / 144

Page 150: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Multi-Sets (cont’d)

I We use set notation (∈, ⊂, ⊆, ∪, ∩, etc.) with analogous meaning

also for multi-sets, e.g.,

(S1 ∪ S2)(x) = S1(x) + S2(x)

(S1 ∩ S2)(x) = min{S1(x),S2(x)}

(S1\S2)(x) = S1(x) −̇ S2(x)

I A multi-set S over X is called finite, if

|{x ∈ X | S(x) > 0}| <∞.

I From now on we consider finite multi-sets only.

150 / 144

Page 151: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Multi-Set Orderings �mul

Definition

Let (X ,�) be a (strict) ordering. The multi-set extension �mul of � to

(finite) multi-sets over X is defined by

S1 �mul S2 ⇐⇒ S1 6= S2 and

∀x ∈ S2\S1. ∃y ∈ S1\S2. y � x

1. Remove common occurrences of elements from S1 and S2. Assume

this gives S ′1 6= S ′2.

2. Then check that for every element x in S ′2 there is an element

y ∈ S ′1 that is greater than x . Then S1 �mul S2.

Example {5, 5, 4, 3, 2} �mul {5, 4, 4, 3, 3, 2}151 / 144

Page 152: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Multi-Set Orderings �mul

Definition

Let (X ,�) be a (strict) ordering. The multi-set extension �mul of � to

(finite) multi-sets over X is defined by

S1 �mul S2 ⇐⇒ S1 6= S2 and

∀x ∈ S2\S1. ∃y ∈ S1\S2. y � x

1. Remove common occurrences of elements from S1 and S2. Assume

this gives S ′1 6= S ′2.

2. Then check that for every element x in S ′2 there is an element

y ∈ S ′1 that is greater than x . Then S1 �mul S2.

Example {5, 5, 4, 3, 2} �mul {5, 4, 4, 3, 3, 2}152 / 144

Page 153: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Multi-Set Orderings �mul

Definition

Let (X ,�) be a (strict) ordering. The multi-set extension �mul of � to

(finite) multi-sets over X is defined by

S1 �mul S2 ⇐⇒ S1 6= S2 and

∀x ∈ S2\S1. ∃y ∈ S1\S2. y � x

1. Remove common occurrences of elements from S1 and S2. Assume

this gives S ′1 6= S ′2.

2. Then check that for every element x in S ′2 there is an element

y ∈ S ′1 that is greater than x . Then S1 �mul S2.

Example {5, 5, 4, 3, 2} �mul {5, 4, 4, 3, 3, 2}153 / 144

Page 154: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Properties of Multi-Set Orderings

An ordering over X is well-founded if if there is no infinite decreasing

chain x0 � x1 � x2 � . . . of elements xi ∈ X .

Lemma

(X ,�) is well-founded iff every non-empty subset Y of X has a minimal

element.

Theorem

Let � be an ordering. Then

1. �mul is an ordering.

2. if � well-founded then �mul well-founded.

3. if � total then �mul total

Q: How many multi-sets less than {3} ?154 / 144

Page 155: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Properties of Multi-Set Orderings

An ordering over X is well-founded if if there is no infinite decreasing

chain x0 � x1 � x2 � . . . of elements xi ∈ X .

Lemma

(X ,�) is well-founded iff every non-empty subset Y of X has a minimal

element.

Theorem

Let � be an ordering. Then

1. �mul is an ordering.

2. if � well-founded then �mul well-founded.

3. if � total then �mul total

Q: How many multi-sets less than {3} ?155 / 144

Page 156: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Properties of Multi-Set Orderings

An ordering over X is well-founded if if there is no infinite decreasing

chain x0 � x1 � x2 � . . . of elements xi ∈ X .

Lemma

(X ,�) is well-founded iff every non-empty subset Y of X has a minimal

element.

Theorem

Let � be an ordering. Then

1. �mul is an ordering.

2. if � well-founded then �mul well-founded.

3. if � total then �mul total

Q: How many multi-sets less than {3} ?156 / 144

Page 157: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Properties of Multi-Set Orderings

An ordering over X is well-founded if if there is no infinite decreasing

chain x0 � x1 � x2 � . . . of elements xi ∈ X .

Lemma

(X ,�) is well-founded iff every non-empty subset Y of X has a minimal

element.

Theorem

Let � be an ordering. Then

1. �mul is an ordering.

2. if � well-founded then �mul well-founded.

3. if � total then �mul total

Q: How many multi-sets less than {3} ?157 / 144

Page 158: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Order on atoms, literals and clauses

Consider a set of ground atoms P.

Let � be any well-founded, total order on P.

I Extend � to a total well-founded order on literals as follows:

I if A � B then (¬)A � (¬)B, and

I ¬A � A.

I Extend � to a total well-founded order on ground clauses as follows:

L1 ∨ . . . ∨ Ln � M1 ∨ . . . ∨Mk iff

{L1, . . . , Ln} �mul {M1, . . . ,Mk}.

Clauses are considered as multi-sets of literals.

We will ambiguously use � for �mul.

Q: What is the smallest clause ?

Q: Consider A1 ≺ A2 ≺ . . .An ≺ . . .How many clauses are less than A2 ∨ A1 ?

158 / 144

Page 159: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Order on atoms, literals and clauses

Consider a set of ground atoms P.

Let � be any well-founded, total order on P.

I Extend � to a total well-founded order on literals as follows:

I if A � B then (¬)A � (¬)B, and

I ¬A � A.

I Extend � to a total well-founded order on ground clauses as follows:

L1 ∨ . . . ∨ Ln � M1 ∨ . . . ∨Mk iff

{L1, . . . , Ln} �mul {M1, . . . ,Mk}.

Clauses are considered as multi-sets of literals.

We will ambiguously use � for �mul.

Q: What is the smallest clause ?

Q: Consider A1 ≺ A2 ≺ . . .An ≺ . . .How many clauses are less than A2 ∨ A1 ?

159 / 144

Page 160: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Order on atoms, literals and clauses

Consider a set of ground atoms P.

Let � be any well-founded, total order on P.

I Extend � to a total well-founded order on literals as follows:

I if A � B then (¬)A � (¬)B, and

I ¬A � A.

I Extend � to a total well-founded order on ground clauses as follows:

L1 ∨ . . . ∨ Ln � M1 ∨ . . . ∨Mk iff

{L1, . . . , Ln} �mul {M1, . . . ,Mk}.

Clauses are considered as multi-sets of literals.

We will ambiguously use � for �mul.

Q: What is the smallest clause ?

Q: Consider A1 ≺ A2 ≺ . . .An ≺ . . .How many clauses are less than A2 ∨ A1 ?

160 / 144

Page 161: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Order on atoms, literals and clauses

Consider a set of ground atoms P.

Let � be any well-founded, total order on P.

I Extend � to a total well-founded order on literals as follows:

I if A � B then (¬)A � (¬)B, and

I ¬A � A.

I Extend � to a total well-founded order on ground clauses as follows:

L1 ∨ . . . ∨ Ln � M1 ∨ . . . ∨Mk iff

{L1, . . . , Ln} �mul {M1, . . . ,Mk}.

Clauses are considered as multi-sets of literals.

We will ambiguously use � for �mul.

Q: What is the smallest clause ?

Q: Consider A1 ≺ A2 ≺ . . .An ≺ . . .How many clauses are less than A2 ∨ A1 ?

161 / 144

Page 162: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Order on atoms, literals and clauses

Consider a set of ground atoms P.

Let � be any well-founded, total order on P.

I Extend � to a total well-founded order on literals as follows:

I if A � B then (¬)A � (¬)B, and

I ¬A � A.

I Extend � to a total well-founded order on ground clauses as follows:

L1 ∨ . . . ∨ Ln � M1 ∨ . . . ∨Mk iff

{L1, . . . , Ln} �mul {M1, . . . ,Mk}.

Clauses are considered as multi-sets of literals.

We will ambiguously use � for �mul.

Q: What is the smallest clause ?

Q: Consider A1 ≺ A2 ≺ . . .An ≺ . . .How many clauses are less than A2 ∨ A1 ?

162 / 144

Page 163: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

Consider S is a set of clauses.

Construct a Herbrand interpretation IS aiming at satisfying clauses in S .

I consider clauses in the order � from small to large

I satisfy the next clause A ∨ C by adding A to IS

provided certain conditions are met.

163 / 144

Page 164: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

164 / 144

Page 165: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

165 / 144

Page 166: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

166 / 144

Page 167: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

167 / 144

Page 168: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

168 / 144

Page 169: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

169 / 144

Page 170: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The model construction [Bachmair, Ganzinger]

More formally: Goal construct IS such that IS |= S if S is saturated.

Consider a clause C ∈ S that we would like to satisfy.

By induction assume that for all smaller clauses D ≺ C we constructed:

I εD =

{{A}, such that A ∈ D, or

∅Define: interpretation up-to C as IC =

⋃D≺C εD .

Define: satisfying atom εC for C as

I εC = {A} (in this case C is called productive) if

I C is false in IC : IC 6|= C , and

I C = A ∨ C ′ and A is maximal: {A} � C ′.

I εC = ∅ otherwise.

Define: interpretation at C to be IC = IC ∪ εC .

Candidate model: IS =⋃

C∈S IC =

⋃C∈S εC .

170 / 144

Page 171: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Counter-example reduction [Bachmair, Ganzinger]

Lemma Model construction is monotone:

If IC |= C then for all D � C : ID |= C and IS |= C .

If IC 6|= C then for all D � C : ID 6|= C and IS 6|= C .

Theorem. If S is saturated and � 6∈ S then IS |= S .

Poof. (Main ideas) Assume S is saturated and IS 6|= S .

I The smallest counter-example: there is the smallest clause C ∈ S

such IS 6|= C . (Because � is well-founded).

I Inference by BR is applicable to C in S with the conclusion G s.t.

I G ≺ C , and

I IS 6|= G , and

I G ∈ S

I G is a smaller counter-example! Contradiction with minimality of C .

Key property: resolution reduces counter-examples171 / 144

Page 172: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Counter-example reduction [Bachmair, Ganzinger]

Lemma Model construction is monotone:

If IC |= C then for all D � C : ID |= C and IS |= C .

If IC 6|= C then for all D � C : ID 6|= C and IS 6|= C .

Theorem. If S is saturated and � 6∈ S then IS |= S .

Poof. (Main ideas) Assume S is saturated and IS 6|= S .

I The smallest counter-example: there is the smallest clause C ∈ S

such IS 6|= C . (Because � is well-founded).

I Inference by BR is applicable to C in S with the conclusion G s.t.

I G ≺ C , and

I IS 6|= G , and

I G ∈ S

I G is a smaller counter-example! Contradiction with minimality of C .

Key property: resolution reduces counter-examples172 / 144

Page 173: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Counter-example reduction [Bachmair, Ganzinger]

Lemma Model construction is monotone:

If IC |= C then for all D � C : ID |= C and IS |= C .

If IC 6|= C then for all D � C : ID 6|= C and IS 6|= C .

Theorem. If S is saturated and � 6∈ S then IS |= S .

Poof. (Main ideas) Assume S is saturated and IS 6|= S .

I The smallest counter-example: there is the smallest clause C ∈ S

such IS 6|= C . (Because � is well-founded).

I Inference by BR is applicable to C in S with the conclusion G s.t.

I G ≺ C , and

I IS 6|= G , and

I G ∈ S

I G is a smaller counter-example! Contradiction with minimality of C .

Key property: resolution reduces counter-examples173 / 144

Page 174: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Counter-example reduction [Bachmair, Ganzinger]

Lemma Model construction is monotone:

If IC |= C then for all D � C : ID |= C and IS |= C .

If IC 6|= C then for all D � C : ID 6|= C and IS 6|= C .

Theorem. If S is saturated and � 6∈ S then IS |= S .

Poof. (Main ideas) Assume S is saturated and IS 6|= S .

I The smallest counter-example: there is the smallest clause C ∈ S

such IS 6|= C . (Because � is well-founded).

I Inference by BR is applicable to C in S with the conclusion G s.t.

I G ≺ C , and

I IS 6|= G , and

I G ∈ S

I G is a smaller counter-example! Contradiction with minimality of C .

Key property: resolution reduces counter-examples174 / 144

Page 175: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Counter-example reduction [Bachmair, Ganzinger]

Lemma Model construction is monotone:

If IC |= C then for all D � C : ID |= C and IS |= C .

If IC 6|= C then for all D � C : ID 6|= C and IS 6|= C .

Theorem. If S is saturated and � 6∈ S then IS |= S .

Poof. (Main ideas) Assume S is saturated and IS 6|= S .

I The smallest counter-example: there is the smallest clause C ∈ S

such IS 6|= C . (Because � is well-founded).

I Inference by BR is applicable to C in S with the conclusion G s.t.

I G ≺ C , and

I IS 6|= G , and

I G ∈ S

I G is a smaller counter-example! Contradiction with minimality of C .

Key property: resolution reduces counter-examples175 / 144

Page 176: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal selection functions

Unrestricted resolution is a very prolific inference system.

Use selection function to restrict applicability of rules to selected literals.

Selection function: selects a subset of literals in a clause sel(C ) ⊆ C .

Informally: only selected literals are eligible for inferences.

A selection function sel is admissible if

I sel(C ) = ∅ only when C is the empty clause.

I if sel(C ) consists of only positive literals then sel(C ) also contains

all maximal literals in C .

We will underline selected literals: ¬A ∨ B ∨ C

176 / 144

Page 177: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal selection functions

Unrestricted resolution is a very prolific inference system.

Use selection function to restrict applicability of rules to selected literals.

Selection function: selects a subset of literals in a clause sel(C ) ⊆ C .

Informally: only selected literals are eligible for inferences.

A selection function sel is admissible if

I sel(C ) = ∅ only when C is the empty clause.

I if sel(C ) consists of only positive literals then sel(C ) also contains

all maximal literals in C .

We will underline selected literals: ¬A ∨ B ∨ C

177 / 144

Page 178: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal selection functions

Unrestricted resolution is a very prolific inference system.

Use selection function to restrict applicability of rules to selected literals.

Selection function: selects a subset of literals in a clause sel(C ) ⊆ C .

Informally: only selected literals are eligible for inferences.

A selection function sel is admissible if

I sel(C ) = ∅ only when C is the empty clause.

I if sel(C ) consists of only positive literals then sel(C ) also contains

all maximal literals in C .

We will underline selected literals: ¬A ∨ B ∨ C

178 / 144

Page 179: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Literal selection functions

Unrestricted resolution is a very prolific inference system.

Use selection function to restrict applicability of rules to selected literals.

Selection function: selects a subset of literals in a clause sel(C ) ⊆ C .

Informally: only selected literals are eligible for inferences.

A selection function sel is admissible if

I sel(C ) = ∅ only when C is the empty clause.

I if sel(C ) consists of only positive literals then sel(C ) also contains

all maximal literals in C .

We will underline selected literals: ¬A ∨ B ∨ C

179 / 144

Page 180: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Ordered resolution with selection

Let sel be a selection function.

Ordered resolution with selection function sel , denoted BRS, consists of

the following inference rules:

I Resolution with selection rule (BRS):

C ∨ p ¬p ∨ D(BR)

C ∨ DI Ordered factoring with selection rule (BFS):

C ∨ p ∨ p(BF )

C ∨ p

Applications of the inference rules are restricted to selected literals only.

Theorem. BRS with any admissible selection functions is complete.

Exercise Resolution with arbitrary selection is incomplete.180 / 144

Page 181: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Ordered resolution with selection

Let sel be a selection function.

Ordered resolution with selection function sel , denoted BRS, consists of

the following inference rules:

I Resolution with selection rule (BRS):

C ∨ p ¬p ∨ D(BR)

C ∨ DI Ordered factoring with selection rule (BFS):

C ∨ p ∨ p(BF )

C ∨ p

Applications of the inference rules are restricted to selected literals only.

Theorem. BRS with any admissible selection functions is complete.

Exercise Resolution with arbitrary selection is incomplete.181 / 144

Page 182: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Ordered resolution with selection

Let sel be a selection function.

Ordered resolution with selection function sel , denoted BRS, consists of

the following inference rules:

I Resolution with selection rule (BRS):

C ∨ p ¬p ∨ D(BR)

C ∨ DI Ordered factoring with selection rule (BFS):

C ∨ p ∨ p(BF )

C ∨ p

Applications of the inference rules are restricted to selected literals only.

Theorem. BRS with any admissible selection functions is complete.

Exercise Resolution with arbitrary selection is incomplete.182 / 144

Page 183: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Redundancy elimination

Abstract notion of redundancy.

A clause C is redundant in S if there exists {C1, . . . ,Cn} ⊆ S such that

I {C1, . . . ,Cn} |= C

I C1 ≺ C , . . . ,Cn ≺ C

We can remove redundant clauses from the search space!

Practical redundancies:

I tautology elimination: p ∨ ¬p ∨ C can be eliminated

indeed: |= p ∨ ¬p ∨ C

I subsumption elimination: if C ⊂ D, D can be eliminated

indeed: C |= D and C ≺ D.

183 / 144

Page 184: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Redundancy elimination

Abstract notion of redundancy.

A clause C is redundant in S if there exists {C1, . . . ,Cn} ⊆ S such that

I {C1, . . . ,Cn} |= C

I C1 ≺ C , . . . ,Cn ≺ C

We can remove redundant clauses from the search space!

Practical redundancies:

I tautology elimination: p ∨ ¬p ∨ C can be eliminated

indeed: |= p ∨ ¬p ∨ C

I subsumption elimination: if C ⊂ D, D can be eliminated

indeed: C |= D and C ≺ D.

184 / 144

Page 185: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Redundancy elimination

Abstract notion of redundancy.

A clause C is redundant in S if there exists {C1, . . . ,Cn} ⊆ S such that

I {C1, . . . ,Cn} |= C

I C1 ≺ C , . . . ,Cn ≺ C

We can remove redundant clauses from the search space!

Practical redundancies:

I tautology elimination: p ∨ ¬p ∨ C can be eliminated

indeed: |= p ∨ ¬p ∨ C

I subsumption elimination: if C ⊂ D, D can be eliminated

indeed: C |= D and C ≺ D.

185 / 144

Page 186: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Non-ground resolution

I A non-ground clause can be seen as representation of a (possibly

infinite) set of its ground instances.

I Consider q(x , a) ∨ p(x) and q(y , z) ∨ ¬p(f (y)).

A common instance to which ground resolution is applicable:

q(f (a), a) ∨ p(f (a)) and q(a, a) ∨ ¬p(f (a))

I There are other ground instances e.g.:

q(f (f (a)), a) ∨ p(f (f (a))) and q(f (a), f (f (f (a))) ∨ ¬p(f (f (a))

I In order to apply ground resolution we need find substitution which

make atoms p(x) and p(f (y)) equal.

I Such substitutions are called unifiers.

186 / 144

Page 187: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Non-ground resolution

I A non-ground clause can be seen as representation of a (possibly

infinite) set of its ground instances.

I Consider q(x , a) ∨ p(x) and q(y , z) ∨ ¬p(f (y)).

A common instance to which ground resolution is applicable:

q(f (a), a) ∨ p(f (a)) and q(a, a) ∨ ¬p(f (a))

I There are other ground instances e.g.:

q(f (f (a)), a) ∨ p(f (f (a))) and q(f (a), f (f (f (a))) ∨ ¬p(f (f (a))

I In order to apply ground resolution we need find substitution which

make atoms p(x) and p(f (y)) equal.

I Such substitutions are called unifiers.

187 / 144

Page 188: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Non-ground resolution

I A non-ground clause can be seen as representation of a (possibly

infinite) set of its ground instances.

I Consider q(x , a) ∨ p(x) and q(y , z) ∨ ¬p(f (y)).

A common instance to which ground resolution is applicable:

q(f (a), a) ∨ p(f (a)) and q(a, a) ∨ ¬p(f (a))

I There are other ground instances e.g.:

q(f (f (a)), a) ∨ p(f (f (a))) and q(f (a), f (f (f (a))) ∨ ¬p(f (f (a))

I In order to apply ground resolution we need find substitution which

make atoms p(x) and p(f (y)) equal.

I Such substitutions are called unifiers.

188 / 144

Page 189: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Non-ground resolution

I A non-ground clause can be seen as representation of a (possibly

infinite) set of its ground instances.

I Consider q(x , a) ∨ p(x) and q(y , z) ∨ ¬p(f (y)).

A common instance to which ground resolution is applicable:

q(f (a), a) ∨ p(f (a)) and q(a, a) ∨ ¬p(f (a))

I There are other ground instances e.g.:

q(f (f (a)), a) ∨ p(f (f (a))) and q(f (a), f (f (f (a))) ∨ ¬p(f (f (a))

I In order to apply ground resolution we need find substitution which

make atoms p(x) and p(f (y)) equal.

I Such substitutions are called unifiers.

189 / 144

Page 190: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Non-ground resolution

I A non-ground clause can be seen as representation of a (possibly

infinite) set of its ground instances.

I Consider q(x , a) ∨ p(x) and q(y , z) ∨ ¬p(f (y)).

A common instance to which ground resolution is applicable:

q(f (a), a) ∨ p(f (a)) and q(a, a) ∨ ¬p(f (a))

I There are other ground instances e.g.:

q(f (f (a)), a) ∨ p(f (f (a))) and q(f (a), f (f (f (a))) ∨ ¬p(f (f (a))

I In order to apply ground resolution we need find substitution which

make atoms p(x) and p(f (y)) equal.

I Such substitutions are called unifiers.

190 / 144

Page 191: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Unifiers

I Consider

E = {s1.

= t1, . . . , sn.

= tn}

a simultaneous unification problem, where si and ti are terms or

atoms.

I A substitution σ is a unifier of E , if siσ = tiσ for each 1 ≤ i ≤ n.

I If a unifier of E exists, then E is said to be unifiable.

I σ is called a simultaneous unifier of E .

191 / 144

Page 192: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Unifiers

I Consider

E = {s1.

= t1, . . . , sn.

= tn}

a simultaneous unification problem, where si and ti are terms or

atoms.

I A substitution σ is a unifier of E , if siσ = tiσ for each 1 ≤ i ≤ n.

I If a unifier of E exists, then E is said to be unifiable.

I σ is called a simultaneous unifier of E .

192 / 144

Page 193: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Unifiers

I Consider

E = {s1.

= t1, . . . , sn.

= tn}

a simultaneous unification problem, where si and ti are terms or

atoms.

I A substitution σ is a unifier of E , if siσ = tiσ for each 1 ≤ i ≤ n.

I If a unifier of E exists, then E is said to be unifiable.

I σ is called a simultaneous unifier of E .

193 / 144

Page 194: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Unifiers

I Consider

E = {s1.

= t1, . . . , sn.

= tn}

a simultaneous unification problem, where si and ti are terms or

atoms.

I A substitution σ is a unifier of E , if siσ = tiσ for each 1 ≤ i ≤ n.

I If a unifier of E exists, then E is said to be unifiable.

I σ is called a simultaneous unifier of E .

194 / 144

Page 195: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Most general unifiers

I The most general unifier of σ = mgu({s .= t}):

I is a unifier sσ.

= tσ.

I any other unifier is an instance of σ:

if γ : sγ = tγ then there is γ′ such that γ = σγ′.

I mgu({g(x , x) ' g(z , f (y))}) is σ = {f (y)/x , f (y)/z}I g(x , x)σ

.= g(f (y), f (y)) = g(z , f (y))σ

I any other unifier γ that makes g(x , x)γ = g(z , f (y))γ e.g.

γ = {f (f (a))/x , f (f (a))/z} is an instance of σ: γ = σ · {f (a)/y}

Theorem [Robinson 1965] For any unifiable system of equations

E = {s1.

= t1, . . . , sn.

= tn} there is the most general unifier mgu(E ),

which is unique up to renaming.

195 / 144

Page 196: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Most general unifiers

I The most general unifier of σ = mgu({s .= t}):

I is a unifier sσ.

= tσ.

I any other unifier is an instance of σ:

if γ : sγ = tγ then there is γ′ such that γ = σγ′.

I mgu({g(x , x) ' g(z , f (y))}) is σ = {f (y)/x , f (y)/z}I g(x , x)σ

.= g(f (y), f (y)) = g(z , f (y))σ

I any other unifier γ that makes g(x , x)γ = g(z , f (y))γ e.g.

γ = {f (f (a))/x , f (f (a))/z} is an instance of σ: γ = σ · {f (a)/y}

Theorem [Robinson 1965] For any unifiable system of equations

E = {s1.

= t1, . . . , sn.

= tn} there is the most general unifier mgu(E ),

which is unique up to renaming.

196 / 144

Page 197: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Most general unifiers

I The most general unifier of σ = mgu({s .= t}):

I is a unifier sσ.

= tσ.

I any other unifier is an instance of σ:

if γ : sγ = tγ then there is γ′ such that γ = σγ′.

I mgu({g(x , x) ' g(z , f (y))}) is σ = {f (y)/x , f (y)/z}I g(x , x)σ

.= g(f (y), f (y)) = g(z , f (y))σ

I any other unifier γ that makes g(x , x)γ = g(z , f (y))γ e.g.

γ = {f (f (a))/x , f (f (a))/z} is an instance of σ: γ = σ · {f (a)/y}

Theorem [Robinson 1965] For any unifiable system of equations

E = {s1.

= t1, . . . , sn.

= tn} there is the most general unifier mgu(E ),

which is unique up to renaming.

197 / 144

Page 198: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Most general unifiers

I The most general unifier of σ = mgu({s .= t}):

I is a unifier sσ.

= tσ.

I any other unifier is an instance of σ:

if γ : sγ = tγ then there is γ′ such that γ = σγ′.

I mgu({g(x , x) ' g(z , f (y))}) is σ = {f (y)/x , f (y)/z}I g(x , x)σ

.= g(f (y), f (y)) = g(z , f (y))σ

I any other unifier γ that makes g(x , x)γ = g(z , f (y))γ e.g.

γ = {f (f (a))/x , f (f (a))/z} is an instance of σ: γ = σ · {f (a)/y}

Theorem [Robinson 1965] For any unifiable system of equations

E = {s1.

= t1, . . . , sn.

= tn} there is the most general unifier mgu(E ),

which is unique up to renaming.

198 / 144

Page 199: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Unification algorithm:

Apply unification transformation rules to E to obtain mgu(E ).

I Orientation: t.

= x , E ⇒U x.

= t, E if t 6∈ X

I Trivial: t.

= t, E ⇒U E

I Clash: f (. . .).

= g(. . .), E ⇒U ⊥

I Decomposition:

f (s1, . . . , sn).

= f (t1, . . . , tn), E ⇒U

s1.

= t1, . . . , sn.

= tn, E

I Occur-check: x.

= t, E ⇒U ⊥if x ∈ var(t), x 6= t

I Substitution: x.

= t, E ⇒U x.

= t, E{t 7→ x}if x ∈ var(E ), x 6∈ var(t)

199 / 144

Page 200: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

General resolution with selection:

I Resolution rule (BRS):

C ∨ p ¬p′ ∨ D(BR)

(C ∨ D)σ

where σ = mgu(p, p′)

I Binary positive factoring (BFS):

C ∨ p ∨ p′(BF )

(C ∨ p)σ

where σ = mgu(p, p′)

Ordered resolution with selection:

Extend � from order on ground atoms to any order �′ on (non-ground)

atoms:

I requirement (stability under substitutions)

if A(x̄) � B(x̄) then for every ground substitution γ :

A(x̄)γ �′ Q(x̄)γ.200 / 144

Page 201: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

General resolution with selection:

I Resolution rule (BRS):

C ∨ p ¬p′ ∨ D(BR)

(C ∨ D)σ

where σ = mgu(p, p′)

I Binary positive factoring (BFS):

C ∨ p ∨ p′(BF )

(C ∨ p)σ

where σ = mgu(p, p′)

Ordered resolution with selection:

Extend � from order on ground atoms to any order �′ on (non-ground)

atoms:

I requirement (stability under substitutions)

if A(x̄) � B(x̄) then for every ground substitution γ :

A(x̄)γ �′ Q(x̄)γ.201 / 144

Page 202: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

General resolution with selection:

I Resolution rule (BRS):

C ∨ p ¬p′ ∨ D(BR)

(C ∨ D)σ

where σ = mgu(p, p′)

I Binary positive factoring (BFS):

C ∨ p ∨ p′(BF )

(C ∨ p)σ

where σ = mgu(p, p′)

Ordered resolution with selection:

Extend � from order on ground atoms to any order �′ on (non-ground)

atoms:

I requirement (stability under substitutions)

if A(x̄) � B(x̄) then for every ground substitution γ :

A(x̄)γ �′ Q(x̄)γ.202 / 144

Page 203: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

203 / 144

Page 204: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

204 / 144

Page 205: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

205 / 144

Page 206: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

206 / 144

Page 207: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

207 / 144

Page 208: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

208 / 144

Page 209: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Completeness of resolution in the general case

Theorem. BRS with any admissible selection functions is complete for

general first-order clauses.

Proof. Consider a set of first-order clauses S .

Need to show: If S is saturated and � 6∈ S then S is satisfiable.

Lifting argument: Gr(S) is also saturated and does not contain �.

Indeed for any inference by ground resolution in Gr(S) there is more

general non-ground inference in S .

Therefore Gr(S) is satisfiable on a Herbrand model IS .

Finally IS |= S .

209 / 144

Page 210: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Resolution as a decision procedure

Consider a fair saturation process by a sound and complete calculi C

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

There are three possible outcomes:

1. � is derived (� ∈ Sn for some n), then S is unsatisfiable

(soundness);

2. no new clauses can be derived from Si , i. e. Res(Si ) ⊆ Si , for some

0 ≤ i < ω and � 6∈ S , then S is satisfiable (completeness);

3. S grows ad infinitum, the process does not terminate, in this case S

is satisfiable (completeness).

In cases 1) and 2) the procedure terminates.

A sound and complete calculus C together with a fair saturation strategy

is a decision procedure for a fragment Φ if the saturation process

terminates for any clause set in Φ.210 / 144

Page 211: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

Resolution as a decision procedure

Consider a fair saturation process by a sound and complete calculi C

S0 ⇒ S1 ⇒ . . . Sn ⇒ . . .

There are three possible outcomes:

1. � is derived (� ∈ Sn for some n), then S is unsatisfiable

(soundness);

2. no new clauses can be derived from Si , i. e. Res(Si ) ⊆ Si , for some

0 ≤ i < ω and � 6∈ S , then S is satisfiable (completeness);

3. S grows ad infinitum, the process does not terminate, in this case S

is satisfiable (completeness).

In cases 1) and 2) the procedure terminates.

A sound and complete calculus C together with a fair saturation strategy

is a decision procedure for a fragment Φ if the saturation process

terminates for any clause set in Φ.211 / 144

Page 212: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures212 / 144

Page 213: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures213 / 144

Page 214: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures214 / 144

Page 215: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures215 / 144

Page 216: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures216 / 144

Page 217: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures217 / 144

Page 218: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures218 / 144

Page 219: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures219 / 144

Page 220: Automated reasoning for first-order logic Theory, Practice ...korovink/korovin_vtsa_2013_part_1.pdf · Logic and Automated Reasoning Applications: I software and hardware veri cation:Intel,

The magic of resolution

Resolution calculus with appropriate simplifications, selection functions

and saturation strategies is a decision procedure for many fragments:

I monadic fragment [Bachmair, Ganzinger, Waldmann]

I modal logic translations [Hustadt, Schmidt]

I guarded fragment [Ganzinger, de Nivelle]

I two variable fragment [de Nivelle, Pratt-Hartmann]

I fluted fragment [Hustadt, Schmidt, Georgieva]

I many description logic fragments [Kazakov, Motik, Sattler, . . .]

I . . .

I Original proofs of decidability for these fragments are based on

diverse, complicated, model theoretic arguments.

I One can speculate that the model construction in the proof of

completeness of resolution unifies these model theoretic arguments.

I Resolution-based methods provide practical procedures220 / 144