Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 - - PowerPoint PPT Presentation

logic as a tool chapter 3 understanding first order logic
SMART_READER_LITE
LIVE PREVIEW

Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 - - PowerPoint PPT Presentation

Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 Truth, validity, logical consequence and equivalence in first-order logic Valentin Goranko Stockholm University December 2020 Goranko Truth of sentences in structures Goranko


slide-1
SLIDE 1

Goranko

Logic as a Tool Chapter 3: Understanding First-order Logic 3.4 Truth, validity, logical consequence and equivalence in first-order logic

Valentin Goranko Stockholm University December 2020

slide-2
SLIDE 2

Goranko

Truth of sentences in structures

slide-3
SLIDE 3

Goranko

Truth of sentences in structures. Models and countermodels.

slide-4
SLIDE 4

Goranko

Truth of sentences in structures. Models and countermodels.

A sentence is a formula with no free variables.

slide-5
SLIDE 5

Goranko

Truth of sentences in structures. Models and countermodels.

A sentence is a formula with no free variables. Hence, the truth of a sentence in a given structure does not depend on the variable assignment.

slide-6
SLIDE 6

Goranko

Truth of sentences in structures. Models and countermodels.

A sentence is a formula with no free variables. Hence, the truth of a sentence in a given structure does not depend on the variable assignment. Therefore, for a structure S and sentence A we can simply write S | = A if S, v | = A for any/every variable assignment v.

slide-7
SLIDE 7

Goranko

Truth of sentences in structures. Models and countermodels.

A sentence is a formula with no free variables. Hence, the truth of a sentence in a given structure does not depend on the variable assignment. Therefore, for a structure S and sentence A we can simply write S | = A if S, v | = A for any/every variable assignment v. We then say that S is a model of A and that A is true in S, or that A is satisfied by S.

slide-8
SLIDE 8

Goranko

Truth of sentences in structures. Models and countermodels.

A sentence is a formula with no free variables. Hence, the truth of a sentence in a given structure does not depend on the variable assignment. Therefore, for a structure S and sentence A we can simply write S | = A if S, v | = A for any/every variable assignment v. We then say that S is a model of A and that A is true in S, or that A is satisfied by S. Otherwise we write S | = A and say that S is a counter-model for A.

slide-9
SLIDE 9

Goranko

Truth of first-order sentences: more examples

slide-10
SLIDE 10

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

slide-11
SLIDE 11

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

slide-12
SLIDE 12

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

slide-13
SLIDE 13

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

slide-14
SLIDE 14

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

slide-15
SLIDE 15

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

slide-16
SLIDE 16

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

  • H |

= ∀x∀y(∃z(x = m(z) ∧ y = m(z)) → x = y).

slide-17
SLIDE 17

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

  • H |

= ∀x∀y(∃z(x = m(z) ∧ y = m(z)) → x = y). (Is this sentence only true for the standard interpretation of m?)

slide-18
SLIDE 18

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

  • H |

= ∀x∀y(∃z(x = m(z) ∧ y = m(z)) → x = y). (Is this sentence only true for the standard interpretation of m?)

  • N

?

| = (∀x(∀y(y < x → P(y)) → P(x)) → ∀xP(x)), where P is any (uninterpreted) unary predicate. True or false?

slide-19
SLIDE 19

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

  • H |

= ∀x∀y(∃z(x = m(z) ∧ y = m(z)) → x = y). (Is this sentence only true for the standard interpretation of m?)

  • N

?

| = (∀x(∀y(y < x → P(y)) → P(x)) → ∀xP(x)), where P is any (uninterpreted) unary predicate. True or false? What does this sentence say about N?

slide-20
SLIDE 20

Goranko

Truth of first-order sentences: more examples

  • H

?

| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∀x∃y(C(x, y) ∨ C(y, x)).

  • H

?

| = ∃x∀y(C(x, y) → C(y, x)).

  • H

?

| = ∀x∀y∀z(C(x, y) ∧ C(y, x) → C(z, z)).

  • H

?

| = ∃x(Drinks(x) → ∀xDrinks(x)).

  • H |

= ∀x∀y(∃z(x = m(z) ∧ y = m(z)) → x = y). (Is this sentence only true for the standard interpretation of m?)

  • N

?

| = (∀x(∀y(y < x → P(y)) → P(x)) → ∀xP(x)), where P is any (uninterpreted) unary predicate. True or false? What does this sentence say about N? Is it true in Z, too?

slide-21
SLIDE 21

Goranko

Satisfiability, validity, and logical consequence

slide-22
SLIDE 22

Goranko

Satisfiability and validity of sentences

slide-23
SLIDE 23

Goranko

Satisfiability and validity of sentences

A sentence A is:

slide-24
SLIDE 24

Goranko

Satisfiability and validity of sentences

A sentence A is:

  • satisfiable if S |

= A for some structure S;

slide-25
SLIDE 25

Goranko

Satisfiability and validity of sentences

A sentence A is:

  • satisfiable if S |

= A for some structure S;

  • (logically) valid, denoted |

= A, if S | = A for every structure S;

slide-26
SLIDE 26

Goranko

Satisfiability and validity of sentences

A sentence A is:

  • satisfiable if S |

= A for some structure S;

  • (logically) valid, denoted |

= A, if S | = A for every structure S;

  • falsifiable, if it is not logically valid, i.e. if it has a counter-model.
slide-27
SLIDE 27

Goranko

Satisfiability and validity of any first-order formulae

slide-28
SLIDE 28

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

slide-29
SLIDE 29

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

slide-30
SLIDE 30

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

slide-31
SLIDE 31

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.
slide-32
SLIDE 32

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn.

slide-33
SLIDE 33

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn. The sentence ∃x1 . . . ∃xnA(x1, . . . , xn) is a existential closure of A;

slide-34
SLIDE 34

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn. The sentence ∃x1 . . . ∃xnA(x1, . . . , xn) is a existential closure of A; the sentence ∀x1 . . . ∀xnA(x1, . . . , xn) is a universal closure of A.

slide-35
SLIDE 35

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn. The sentence ∃x1 . . . ∃xnA(x1, . . . , xn) is a existential closure of A; the sentence ∀x1 . . . ∀xnA(x1, . . . , xn) is a universal closure of A. Claim:

slide-36
SLIDE 36

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn. The sentence ∃x1 . . . ∃xnA(x1, . . . , xn) is a existential closure of A; the sentence ∀x1 . . . ∀xnA(x1, . . . , xn) is a universal closure of A. Claim:

  • A(x1, . . . , xn) is satisfiable iff ∃x1 . . . ∃xnA(x1, . . . , xn) is satisfiable.
slide-37
SLIDE 37

Goranko

Satisfiability and validity of any first-order formulae

A first-order formula A is:

  • A is satisfiable if S, v |

= A for some structure S and some variable assignment v in S.

  • (logically) valid, denoted |

= A, if S, v | = A for every structure S and every variable assignment v in S.

  • falsifiable, if it is not logically valid.

Let A = A(x1, . . . , xn) be any first-order formula all free variables in which are amongst x1, . . . , xn. The sentence ∃x1 . . . ∃xnA(x1, . . . , xn) is a existential closure of A; the sentence ∀x1 . . . ∀xnA(x1, . . . , xn) is a universal closure of A. Claim:

  • A(x1, . . . , xn) is satisfiable iff ∃x1 . . . ∃xnA(x1, . . . , xn) is satisfiable.
  • |

= A(x1, . . . , xn) iff | = ∀x1 . . . ∀xnA(x1, . . . , xn).

slide-38
SLIDE 38

Goranko

Satisfiability and validity of formulae: examples

slide-39
SLIDE 39

Goranko

Satisfiability and validity of formulae: examples

  • The formula P(x) is satisfiable,

because its existential closure ∃xP(x) is satisfiable.

slide-40
SLIDE 40

Goranko

Satisfiability and validity of formulae: examples

  • The formula P(x) is satisfiable,

because its existential closure ∃xP(x) is satisfiable.

  • However, P(x) is not valid,

because its universal closure ∀xP(x) is not valid.

slide-41
SLIDE 41

Goranko

Satisfiability and validity of formulae: examples

  • The formula P(x) is satisfiable,

because its existential closure ∃xP(x) is satisfiable.

  • However, P(x) is not valid,

because its universal closure ∀xP(x) is not valid.

  • The formula P(x) ∨ ¬P(x) is valid,

because ∀x(P(x) ∨ ¬P(x)) is valid.

slide-42
SLIDE 42

Goranko

Satisfiability and validity of formulae: examples

  • The formula P(x) is satisfiable,

because its existential closure ∃xP(x) is satisfiable.

  • However, P(x) is not valid,

because its universal closure ∀xP(x) is not valid.

  • The formula P(x) ∨ ¬P(x) is valid,

because ∀x(P(x) ∨ ¬P(x)) is valid.

  • The formula P(x) ∧ ¬P(x) is not satisfiable,

because its existential closure ∃x(P(x) ∧ ¬P(x)) is not satisfiable.

slide-43
SLIDE 43

Goranko

First-order instances of propositional formulae

slide-44
SLIDE 44

Goranko

First-order instances of propositional formulae

Any uniform substitution of first-order formulae for the propositional variables in a propositional formula A produces a first-order formula, called a first-order instance of A.

slide-45
SLIDE 45

Goranko

First-order instances of propositional formulae

Any uniform substitution of first-order formulae for the propositional variables in a propositional formula A produces a first-order formula, called a first-order instance of A. Example: take the propositional formula A = (p ∧ ¬q) → (q ∨ p).

slide-46
SLIDE 46

Goranko

First-order instances of propositional formulae

Any uniform substitution of first-order formulae for the propositional variables in a propositional formula A produces a first-order formula, called a first-order instance of A. Example: take the propositional formula A = (p ∧ ¬q) → (q ∨ p). The uniform substitution of (5 < x) for p and ∃y(x = y2) for q in A results in the first-order instance ((5 < x) ∧ ¬∃y(x = y2)) → (∃y(x = y2) ∨ (5 < x)).

slide-47
SLIDE 47

Goranko

Satisfiability and validity of first-order instances

slide-48
SLIDE 48

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid.

slide-49
SLIDE 49

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0)

slide-50
SLIDE 50

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0) and | = Q(x, y) ∨ ¬Q(x, y).

slide-51
SLIDE 51

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0) and | = Q(x, y) ∨ ¬Q(x, y). What about vice versa?

slide-52
SLIDE 52

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0) and | = Q(x, y) ∨ ¬Q(x, y). What about vice versa? Yes. Why?

slide-53
SLIDE 53

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0) and | = Q(x, y) ∨ ¬Q(x, y). What about vice versa? Yes. Why?

  • Likewise, a propositional formula A is satisfiable

if and only if some first-order instance of A is satisfiable.

slide-54
SLIDE 54

Goranko

Satisfiability and validity of first-order instances

  • If a propositional formula A is valid (tautology),

then every first-order instance of A is valid. Thus, for instance, | = ¬¬(x > 0) → (x > 0) and | = Q(x, y) ∨ ¬Q(x, y). What about vice versa? Yes. Why?

  • Likewise, a propositional formula A is satisfiable

if and only if some first-order instance of A is satisfiable. Why?

slide-55
SLIDE 55

Goranko

Logical consequence in first order logic

slide-56
SLIDE 56

Goranko

Logical consequence in first order logic

We fix an arbitrary first-order language L.

slide-57
SLIDE 57

Goranko

Logical consequence in first order logic

We fix an arbitrary first-order language L. Given a set of L-formulae Γ, an L-structure S, and a variable assignment v in S, we write S, v | = Γ to say that S, v | = A for every A ∈ Γ.

slide-58
SLIDE 58

Goranko

Logical consequence in first order logic

We fix an arbitrary first-order language L. Given a set of L-formulae Γ, an L-structure S, and a variable assignment v in S, we write S, v | = Γ to say that S, v | = A for every A ∈ Γ. A formula A follows logically from a set of formulae Γ, denoted Γ | = A, if for every structure S and a variable assignment v : VAR →S: S, v | = Γ implies S, v | = A.

slide-59
SLIDE 59

Goranko

Logical consequence in first order logic

We fix an arbitrary first-order language L. Given a set of L-formulae Γ, an L-structure S, and a variable assignment v in S, we write S, v | = Γ to say that S, v | = A for every A ∈ Γ. A formula A follows logically from a set of formulae Γ, denoted Γ | = A, if for every structure S and a variable assignment v : VAR →S: S, v | = Γ implies S, v | = A. Note that ∅ | = A iff | = A. Why?

slide-60
SLIDE 60

Goranko

Logical consequence: examples

slide-61
SLIDE 61

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B,

slide-62
SLIDE 62

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution,

slide-63
SLIDE 63

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′.

slide-64
SLIDE 64

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example:

slide-65
SLIDE 65

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

slide-66
SLIDE 66

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

  • ∀xP(x), ∀x(P(x) → Q(x)) |

= ∀xQ(x).

slide-67
SLIDE 67

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

  • ∀xP(x), ∀x(P(x) → Q(x)) |

= ∀xQ(x). NB: this is not an instance of a propositional logical consequence.

slide-68
SLIDE 68

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

  • ∀xP(x), ∀x(P(x) → Q(x)) |

= ∀xQ(x). NB: this is not an instance of a propositional logical consequence.

  • ∃xP(x) ∧ ∃xQ(x) |

= ∃x(P(x) ∧ Q(x)).

slide-69
SLIDE 69

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

  • ∀xP(x), ∀x(P(x) → Q(x)) |

= ∀xQ(x). NB: this is not an instance of a propositional logical consequence.

  • ∃xP(x) ∧ ∃xQ(x) |

= ∃x(P(x) ∧ Q(x)). Indeed, the structure N ′ obtained from N where P(x) is interpreted as ‘x is even’ and Q(x) is interpreted as ‘x is odd’ is a counter-model: N ′ | = ∃xP(x) ∧ ∃xQ(x)

slide-70
SLIDE 70

Goranko

Logical consequence: examples

  • If A1, . . . , An, B are prop. formulae such that A1, . . . , An |

= B, and A′

1, . . . , A′ n, B′ are first-order instances of A1, . . . , An, B obtained by

the same substitution, then A′

1, . . . , A′ n |

= B′. For example: ∃xA, ∃xA → ∀yB | = ∀yB.

  • ∀xP(x), ∀x(P(x) → Q(x)) |

= ∀xQ(x). NB: this is not an instance of a propositional logical consequence.

  • ∃xP(x) ∧ ∃xQ(x) |

= ∃x(P(x) ∧ Q(x)). Indeed, the structure N ′ obtained from N where P(x) is interpreted as ‘x is even’ and Q(x) is interpreted as ‘x is odd’ is a counter-model: N ′ | = ∃xP(x) ∧ ∃xQ(x), while N ′ | = ∃x(P(x) ∧ Q(x)).

slide-71
SLIDE 71

Goranko

Logical consequence: some basic properties

slide-72
SLIDE 72

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

slide-73
SLIDE 73

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

slide-74
SLIDE 74

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

slide-75
SLIDE 75

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

  • 3. |

= A1 ∧ · · · ∧ An → B.

slide-76
SLIDE 76

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

  • 3. |

= A1 ∧ · · · ∧ An → B.

  • 4. |

= A1 → (A2 → · · · (An → B) . . .).

slide-77
SLIDE 77

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

  • 3. |

= A1 ∧ · · · ∧ An → B.

  • 4. |

= A1 → (A2 → · · · (An → B) . . .). Furthermore, for any first-order formula A and a term t that is free for substitution for x in A:

slide-78
SLIDE 78

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

  • 3. |

= A1 ∧ · · · ∧ An → B.

  • 4. |

= A1 → (A2 → · · · (An → B) . . .). Furthermore, for any first-order formula A and a term t that is free for substitution for x in A:

  • 1. ∀xA |

= A[t/x].

slide-79
SLIDE 79

Goranko

Logical consequence: some basic properties

Logical equivalence in first-order logic satisfies all basic properties of propositional logical consequence. In particular, the following are equivalent:

  • 1. A1, . . . , An |

= B.

  • 2. A1 ∧ · · · ∧ An |

= B.

  • 3. |

= A1 ∧ · · · ∧ An → B.

  • 4. |

= A1 → (A2 → · · · (An → B) . . .). Furthermore, for any first-order formula A and a term t that is free for substitution for x in A:

  • 1. ∀xA |

= A[t/x].

  • 2. A[t/x] |

= ∃xA.

slide-80
SLIDE 80

Goranko

First-order logical consequence: more basic properties

slide-81
SLIDE 81

Goranko

First-order logical consequence: more basic properties

  • 1. If A1, . . . , An |

= B then ∀xA1, . . . , ∀xAn | = ∀xB.

slide-82
SLIDE 82

Goranko

First-order logical consequence: more basic properties

  • 1. If A1, . . . , An |

= B then ∀xA1, . . . , ∀xAn | = ∀xB.

  • 2. If A1, . . . , An |

= B and x does not occur free in A1, . . . , An then A1, . . . , An | = ∀xB.

slide-83
SLIDE 83

Goranko

First-order logical consequence: more basic properties

  • 1. If A1, . . . , An |

= B then ∀xA1, . . . , ∀xAn | = ∀xB.

  • 2. If A1, . . . , An |

= B and x does not occur free in A1, . . . , An then A1, . . . , An | = ∀xB.

  • 3. If A1, . . . , An |

= B and A1, . . . , An are sentences, then A1, . . . , An | = ∀xB, and hence A1, . . . , An | = B, where B is any universal closure of B.

slide-84
SLIDE 84

Goranko

First-order logical consequence: more basic properties

  • 1. If A1, . . . , An |

= B then ∀xA1, . . . , ∀xAn | = ∀xB.

  • 2. If A1, . . . , An |

= B and x does not occur free in A1, . . . , An then A1, . . . , An | = ∀xB.

  • 3. If A1, . . . , An |

= B and A1, . . . , An are sentences, then A1, . . . , An | = ∀xB, and hence A1, . . . , An | = B, where B is any universal closure of B.

  • 4. If A1, . . . , An |

= B[c/x], where c is a constant symbol not occurring in A1, . . . , An, B, then A1, . . . , An | = ∀xB(x).

slide-85
SLIDE 85

Goranko

First-order logical consequence: more basic properties

  • 1. If A1, . . . , An |

= B then ∀xA1, . . . , ∀xAn | = ∀xB.

  • 2. If A1, . . . , An |

= B and x does not occur free in A1, . . . , An then A1, . . . , An | = ∀xB.

  • 3. If A1, . . . , An |

= B and A1, . . . , An are sentences, then A1, . . . , An | = ∀xB, and hence A1, . . . , An | = B, where B is any universal closure of B.

  • 4. If A1, . . . , An |

= B[c/x], where c is a constant symbol not occurring in A1, . . . , An, B, then A1, . . . , An | = ∀xB(x).

  • 5. If A1, . . . , An, A[c/x] |

= B, where c is a constant symbol not occurring in A1, . . . , An, A, or B, then A1, . . . , An, ∃xA | = B.

slide-86
SLIDE 86

Goranko

Equality in first-order logic

slide-87
SLIDE 87

Goranko

Equality in first-order logic

slide-88
SLIDE 88

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.
slide-89
SLIDE 89

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.

The equality is very useful to specify constraints on the size of the model:

slide-90
SLIDE 90

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.

The equality is very useful to specify constraints on the size of the model:

  • 1. The sentence

λn = ∃x1 · · · ∃xn(

  • 1≤i=j≤n

¬xi = xj) states that the domain has at least n elements.

slide-91
SLIDE 91

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.

The equality is very useful to specify constraints on the size of the model:

  • 1. The sentence

λn = ∃x1 · · · ∃xn(

  • 1≤i=j≤n

¬xi = xj) states that the domain has at least n elements.

  • 2. The sentence µn = ¬λn+1 or, equivalently,

µn = ∀x1 · · · ∀xn+1(

  • 1≤i=j≤n+1

xi = xj) states that the domain has at most n elements.

slide-92
SLIDE 92

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.

The equality is very useful to specify constraints on the size of the model:

  • 1. The sentence

λn = ∃x1 · · · ∃xn(

  • 1≤i=j≤n

¬xi = xj) states that the domain has at least n elements.

  • 2. The sentence µn = ¬λn+1 or, equivalently,

µn = ∀x1 · · · ∀xn+1(

  • 1≤i=j≤n+1

xi = xj) states that the domain has at most n elements.

  • 3. The sentence σn = λn ∧ µn states that the domain has exactly n

elements.

slide-93
SLIDE 93

Goranko

Equality in first-order logic

The equality symbol =, sometimes also called identity, is a special binary relational symbol, always meant to be interpreted as the identity of

  • bjects in the domain of discourse.

The equality is very useful to specify constraints on the size of the model:

  • 1. The sentence

λn = ∃x1 · · · ∃xn(

  • 1≤i=j≤n

¬xi = xj) states that the domain has at least n elements.

  • 2. The sentence µn = ¬λn+1 or, equivalently,

µn = ∀x1 · · · ∀xn+1(

  • 1≤i=j≤n+1

xi = xj) states that the domain has at most n elements.

  • 3. The sentence σn = λn ∧ µn states that the domain has exactly n

elements. Proof: exercises.

slide-94
SLIDE 94

Goranko

Using equality for counting

The sentences λn, µn, σn are easily relativised for every formula A(x) containing (possibly amongst others) the free variable x to the subset of the domain consisting of the elements satisfying A.

slide-95
SLIDE 95

Goranko

Using equality for counting

The sentences λn, µn, σn are easily relativised for every formula A(x) containing (possibly amongst others) the free variable x to the subset of the domain consisting of the elements satisfying A. For instance:

  • “At least two students scored distinction in the exam”

can be formalised in the domain of all humans as ∃x1∃x2(Student(x1) ∧ Student(x2) ∧ ¬x1 = x2 ∧ Dist(x1) ∧ Dist(x2))

slide-96
SLIDE 96

Goranko

Using equality for counting

The sentences λn, µn, σn are easily relativised for every formula A(x) containing (possibly amongst others) the free variable x to the subset of the domain consisting of the elements satisfying A. For instance:

  • “At least two students scored distinction in the exam”

can be formalised in the domain of all humans as ∃x1∃x2(Student(x1) ∧ Student(x2) ∧ ¬x1 = x2 ∧ Dist(x1) ∧ Dist(x2))

  • “Exactly two students scored distinction in the exam”

can likewise be formalised as: ∃x1∃x2(Student(x1) ∧ Student(x2) ∧ x1 = x2 ∧ Dist(x1) ∧ Dist(x2))∧ ∀y((Student(y) ∧ y = x1 ∧ y = x2) → ¬Dist(y)) (where = stands for ¬ =)

slide-97
SLIDE 97

Goranko

Using equality to express uniqueness, functionality, etc.

  • 1. For any formula A(x) (which may also contain other free variables),

the formula ∃!xA(x) := (A(x) ∧ ∀y(A(y) → x = y)) states

slide-98
SLIDE 98

Goranko

Using equality to express uniqueness, functionality, etc.

  • 1. For any formula A(x) (which may also contain other free variables),

the formula ∃!xA(x) := (A(x) ∧ ∀y(A(y) → x = y)) states that there is a unique element in the domain of discourse satisfying A, for the current values of the parameters ¯ z.

slide-99
SLIDE 99

Goranko

Using equality to express uniqueness, functionality, etc.

  • 1. For any formula A(x) (which may also contain other free variables),

the formula ∃!xA(x) := (A(x) ∧ ∀y(A(y) → x = y)) states that there is a unique element in the domain of discourse satisfying A, for the current values of the parameters ¯ z.

  • 2. Thus, the sentence ∀x∃!yR(x, y) in the language with = and a

binary relational symbol R states that the relation R is functional, i.e. every element of the domain is R-related to a unique element.

slide-100
SLIDE 100

Goranko

Using equality to express uniqueness, functionality, etc.

  • 1. For any formula A(x) (which may also contain other free variables),

the formula ∃!xA(x) := (A(x) ∧ ∀y(A(y) → x = y)) states that there is a unique element in the domain of discourse satisfying A, for the current values of the parameters ¯ z.

  • 2. Thus, the sentence ∀x∃!yR(x, y) in the language with = and a

binary relational symbol R states that the relation R is functional, i.e. every element of the domain is R-related to a unique element.

  • 3. The sentence ∀x∀y(f (x) = f (y) → x = y)) in the language with =

and a unary functional symbol f states that the function f is injective, that is (read by contraposition), assigns different values to different arguments.

slide-101
SLIDE 101

Goranko

Using equality in first-order logic: more examples

Sometimes the equality is implicit in natural language expressions, such as

  • “Everyone, except possibly John, understood the joke.”.
slide-102
SLIDE 102

Goranko

Using equality in first-order logic: more examples

Sometimes the equality is implicit in natural language expressions, such as

  • “Everyone, except possibly John, understood the joke.”.

It becomes explicit and readily translatable (exercise) to FOL when rephrased as “Everyone, who is not (equal to) John, understood the joke.”

slide-103
SLIDE 103

Goranko

Using equality in first-order logic: more examples

Sometimes the equality is implicit in natural language expressions, such as

  • “Everyone, except possibly John, understood the joke.”.

It becomes explicit and readily translatable (exercise) to FOL when rephrased as “Everyone, who is not (equal to) John, understood the joke.”

  • Likewise, “Only John and Mary enjoyed the party.”

can be rephrased as

slide-104
SLIDE 104

Goranko

Using equality in first-order logic: more examples

Sometimes the equality is implicit in natural language expressions, such as

  • “Everyone, except possibly John, understood the joke.”.

It becomes explicit and readily translatable (exercise) to FOL when rephrased as “Everyone, who is not (equal to) John, understood the joke.”

  • Likewise, “Only John and Mary enjoyed the party.”

can be rephrased as “John and Mary enjoyed the party and everyone who is not (equal to) John and not (equal to) Mary, did not enjoy the party”. Exercise: Formalise these in FOL with equality.

slide-105
SLIDE 105

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid:

slide-106
SLIDE 106

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x

slide-107
SLIDE 107

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x (Eq2) x = y → y = x

slide-108
SLIDE 108

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x (Eq2) x = y → y = x (Eq3) x = y ∧ y = z → x = z.

slide-109
SLIDE 109

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x (Eq2) x = y → y = x (Eq3) x = y ∧ y = z → x = z. (Eqf ) x1 = y1 ∧ ... ∧ xn = yn → f (x1, ..., xn) = f (y1, ..., yn) for n-ary functional symbol f in L.

slide-110
SLIDE 110

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x (Eq2) x = y → y = x (Eq3) x = y ∧ y = z → x = z. (Eqf ) x1 = y1 ∧ ... ∧ xn = yn → f (x1, ..., xn) = f (y1, ..., yn) for n-ary functional symbol f in L. (Eqr) x1 = y1 ∧ ... ∧ xn = yn → (p(x1, ..., xn) → p(y1, ..., yn)) for n-ary predicate symbol p in L.

slide-111
SLIDE 111

Goranko

Axioms for the equality

Proposition

The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x (Eq2) x = y → y = x (Eq3) x = y ∧ y = z → x = z. (Eqf ) x1 = y1 ∧ ... ∧ xn = yn → f (x1, ..., xn) = f (y1, ..., yn) for n-ary functional symbol f in L. (Eqr) x1 = y1 ∧ ... ∧ xn = yn → (p(x1, ..., xn) → p(y1, ..., yn)) for n-ary predicate symbol p in L. These axioms, however, cannot guarantee that the interpretation

  • f the binary relational symbol = satisfying them is equality,

but only that it is a congruence in the given structure.

slide-112
SLIDE 112

Goranko

Equivalent replacement of equals

The following theorem states an important generalisation of the properties of the equality on the previous slide, saying that equal terms can be equivalently replaced for each other in any formula.

slide-113
SLIDE 113

Goranko

Equivalent replacement of equals

The following theorem states an important generalisation of the properties of the equality on the previous slide, saying that equal terms can be equivalently replaced for each other in any formula.

Theorem (Equivalent replacement)

For any formula A(x) and any terms s and t that are free for x in A, the following holds: | = s = t → (A[s/x] ↔ A[t/x]).

slide-114
SLIDE 114

Goranko

Logical equivalence in first-order logic

slide-115
SLIDE 115

Goranko

Logical equivalence in first order logic

slide-116
SLIDE 116

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A.

slide-117
SLIDE 117

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B.

slide-118
SLIDE 118

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae.

slide-119
SLIDE 119

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

slide-120
SLIDE 120

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

  • 1. A ≡ A
slide-121
SLIDE 121

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

  • 1. A ≡ A
  • 2. If A ≡ B then B ≡ A.
slide-122
SLIDE 122

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

  • 1. A ≡ A
  • 2. If A ≡ B then B ≡ A.
  • 3. If A ≡ B and B ≡ C then A ≡ C.
slide-123
SLIDE 123

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

  • 1. A ≡ A
  • 2. If A ≡ B then B ≡ A.
  • 3. If A ≡ B and B ≡ C then A ≡ C.
  • 4. If A ≡ B then ¬A ≡ ¬B, ∀xA ≡ ∀xB, and ∃xA ≡ ∃xB.
slide-124
SLIDE 124

Goranko

Logical equivalence in first order logic

Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A. Equivalently, A ≡ B iff | = A ↔ B. For example, any first-order instance of a pair of equivalent propositional formulae is a pair of logically equivalent formulae. Some basic properties of logical equivalence:

  • 1. A ≡ A
  • 2. If A ≡ B then B ≡ A.
  • 3. If A ≡ B and B ≡ C then A ≡ C.
  • 4. If A ≡ B then ¬A ≡ ¬B, ∀xA ≡ ∀xB, and ∃xA ≡ ∃xB.
  • 5. If A1 ≡ B1 and A2 ≡ B2 then A1 ◦ A2 ≡ B1 ◦ B2 where ◦ is any of

∧, ∨, → and ↔.

slide-125
SLIDE 125

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
slide-126
SLIDE 126

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
slide-127
SLIDE 127

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
slide-128
SLIDE 128

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
slide-129
SLIDE 129

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
slide-130
SLIDE 130

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
  • ∀x∀yA ≡ ∀y∀xA.
slide-131
SLIDE 131

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
  • ∀x∀yA ≡ ∀y∀xA.

NB: ∀x∃yA ≡ ∃y∀xA. Why?

slide-132
SLIDE 132

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
  • ∀x∀yA ≡ ∀y∀xA.

NB: ∀x∃yA ≡ ∃y∀xA. Why? For instance, “For every integer x there is an integer y such that x < y” is true

slide-133
SLIDE 133

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
  • ∀x∀yA ≡ ∀y∀xA.

NB: ∀x∃yA ≡ ∃y∀xA. Why? For instance, “For every integer x there is an integer y such that x < y” is true, but it does not imply “There is an integer y such that for every integer x, x < y.”

slide-134
SLIDE 134

Goranko

Some logical equivalences involving quantifiers

  • ¬∀xA ≡ ∃x¬A.
  • ¬∃xA ≡ ∀x¬A.
  • ∀xA ≡ ¬∃x¬A.
  • ∃xA ≡ ¬∀x¬A.
  • ∃x∃yA ≡ ∃y∃xA.
  • ∀x∀yA ≡ ∀y∀xA.

NB: ∀x∃yA ≡ ∃y∀xA. Why? For instance, “For every integer x there is an integer y such that x < y” is true, but it does not imply “There is an integer y such that for every integer x, x < y.”, which is false.

slide-135
SLIDE 135

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
slide-136
SLIDE 136

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
slide-137
SLIDE 137

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
  • ∀x(P(x) → Q(x)) ≡ ∀xP(x) → ∀xQ(x)
slide-138
SLIDE 138

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
  • ∀x(P(x) → Q(x)) ≡ ∀xP(x) → ∀xQ(x)
  • ∃x(P(x) ∨ Q(x)) ≡ ∃xP(x) ∨ ∃xQ(x)
slide-139
SLIDE 139

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
  • ∀x(P(x) → Q(x)) ≡ ∀xP(x) → ∀xQ(x)
  • ∃x(P(x) ∨ Q(x)) ≡ ∃xP(x) ∨ ∃xQ(x)
  • ∃x(P(x) ∧ Q(x)) ≡ ∃xP(x) ∧ ∃xQ(x)
slide-140
SLIDE 140

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
  • ∀x(P(x) → Q(x)) ≡ ∀xP(x) → ∀xQ(x)
  • ∃x(P(x) ∨ Q(x)) ≡ ∃xP(x) ∨ ∃xQ(x)
  • ∃x(P(x) ∧ Q(x)) ≡ ∃xP(x) ∧ ∃xQ(x)
  • ∃x(P(x) → Q(x))

?

≡ ∃xP(x) → ∃xQ(x) (True or false?)

slide-141
SLIDE 141

Goranko

More logical equivalences and non-equivalences

  • ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
  • ∀x(P(x) ∨ Q(x)) ≡ ∀xP(x) ∨ ∀xQ(x)
  • ∀x(P(x) → Q(x)) ≡ ∀xP(x) → ∀xQ(x)
  • ∃x(P(x) ∨ Q(x)) ≡ ∃xP(x) ∨ ∃xQ(x)
  • ∃x(P(x) ∧ Q(x)) ≡ ∃xP(x) ∧ ∃xQ(x)
  • ∃x(P(x) → Q(x))

?

≡ ∃xP(x) → ∃xQ(x) (True or false?)

slide-142
SLIDE 142

Goranko

Negation normal form

slide-143
SLIDE 143

Goranko

Transforming first-order formulae to negation normal form

slide-144
SLIDE 144

Goranko

Transforming first-order formulae to negation normal form

A FO formula is in negation normal form (NNF) if the only occurrences

  • f negation are in front of atomic formulae.
slide-145
SLIDE 145

Goranko

Transforming first-order formulae to negation normal form

A FO formula is in negation normal form (NNF) if the only occurrences

  • f negation are in front of atomic formulae.

Using suitable equivalences, all negations in a first-order formula can be driven inwards, until they reach atomic formulae, thus transforming the formula to an equivalent one in NNF.

slide-146
SLIDE 146

Goranko

Transforming first-order formulae to negation normal form

A FO formula is in negation normal form (NNF) if the only occurrences

  • f negation are in front of atomic formulae.

Using suitable equivalences, all negations in a first-order formula can be driven inwards, until they reach atomic formulae, thus transforming the formula to an equivalent one in NNF. That can be used e.g. to understand negated natural language sentences with complex logical structure.

slide-147
SLIDE 147

Goranko

Transforming first-order formulae to negation normal form

A FO formula is in negation normal form (NNF) if the only occurrences

  • f negation are in front of atomic formulae.

Using suitable equivalences, all negations in a first-order formula can be driven inwards, until they reach atomic formulae, thus transforming the formula to an equivalent one in NNF. That can be used e.g. to understand negated natural language sentences with complex logical structure. For example, to negate “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.”

slide-148
SLIDE 148

Goranko

Transforming first-order formulae to negation normal form

A FO formula is in negation normal form (NNF) if the only occurrences

  • f negation are in front of atomic formulae.

Using suitable equivalences, all negations in a first-order formula can be driven inwards, until they reach atomic formulae, thus transforming the formula to an equivalent one in NNF. That can be used e.g. to understand negated natural language sentences with complex logical structure. For example, to negate “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.” we first translate it to first-order logic: ∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))).

slide-149
SLIDE 149

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y))))

slide-150
SLIDE 150

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y))))

slide-151
SLIDE 151

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ¬∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y))))

slide-152
SLIDE 152

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ¬∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y¬(Driver(y) ∧ (Start(x, y) → Stop(x, y))))

slide-153
SLIDE 153

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ¬∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y¬(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y(¬Driver(y) ∨ ¬(Start(x, y) → Stop(x, y))))

slide-154
SLIDE 154

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ¬∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y¬(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y(¬Driver(y) ∨ ¬(Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y(¬Driver(y) ∨ (Start(x, y) ∧ ¬Stop(x, y)))).

slide-155
SLIDE 155

Goranko

Transforming first-order formulae to NNF continued

Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x¬(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ¬∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y¬(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y(¬Driver(y) ∨ ¬(Start(x, y) → Stop(x, y)))) ≡ ∃x(Car(x) ∧ ∀y(¬Driver(y) ∨ (Start(x, y) ∧ ¬Stop(x, y)))). Since ¬A ∨ B ≡ A → B, the last formula is equivalent to ∃x(Car(x) ∧ ∀y(Driver(y) → (Start(x, y) ∧ ¬Stop(x, y)))).

slide-156
SLIDE 156

Goranko

Transforming first-order formulae to NNF completed

slide-157
SLIDE 157

Goranko

Transforming first-order formulae to NNF completed

Thus, the negation of the sentence “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.”

slide-158
SLIDE 158

Goranko

Transforming first-order formulae to NNF completed

Thus, the negation of the sentence “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.” formalized in first-order logic as ∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y))))

slide-159
SLIDE 159

Goranko

Transforming first-order formulae to NNF completed

Thus, the negation of the sentence “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.” formalized in first-order logic as ∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) is equivalent to ∃x(Car(x) ∧ ∀y(Driver(y) → (Start(x, y) ∧ ¬Stop(x, y))))

slide-160
SLIDE 160

Goranko

Transforming first-order formulae to NNF completed

Thus, the negation of the sentence “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.” formalized in first-order logic as ∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) is equivalent to ∃x(Car(x) ∧ ∀y(Driver(y) → (Start(x, y) ∧ ¬Stop(x, y)))) which, translated back to natural language, reads:

slide-161
SLIDE 161

Goranko

Transforming first-order formulae to NNF completed

Thus, the negation of the sentence “For every car, there is a driver who, if (s)he can start it, then (s)he can stop it.” formalized in first-order logic as ∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y)))) is equivalent to ∃x(Car(x) ∧ ∀y(Driver(y) → (Start(x, y) ∧ ¬Stop(x, y)))) which, translated back to natural language, reads: There is a car such that every driver can start it and cannot stop it.

slide-162
SLIDE 162

Goranko

Negating restricted quantifiers

¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A)

slide-163
SLIDE 163

Goranko

Negating restricted quantifiers

¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A) ¬∃x(P(x) ∧ A) ≡ ∀x(P(x) → ¬A),

slide-164
SLIDE 164

Goranko

Negating restricted quantifiers

¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A) ¬∃x(P(x) ∧ A) ≡ ∀x(P(x) → ¬A), In particular, for any set X: ¬∀x ∈ X A(x) ≡ ∃x ∈ X ¬A(x)

slide-165
SLIDE 165

Goranko

Negating restricted quantifiers

¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A) ¬∃x(P(x) ∧ A) ≡ ∀x(P(x) → ¬A), In particular, for any set X: ¬∀x ∈ X A(x) ≡ ∃x ∈ X ¬A(x) ¬∃x ∈ X A(x) ≡ ∀x ∈ X ¬A(x)