Goranko
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 - - 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
Goranko
Truth of sentences in structures
Goranko
Truth of sentences in structures. Models and countermodels.
Goranko
Truth of sentences in structures. Models and countermodels.
A sentence is a formula with no free variables.
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.
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.
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.
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.
Goranko
Truth of first-order sentences: more examples
Goranko
Truth of first-order sentences: more examples
- H
?
| = ∀x∀y(C(x, y) ∨ ¬C(y, x)).
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)).
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)).
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)).
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)).
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)).
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).
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?)
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?
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?
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?
Goranko
Satisfiability, validity, and logical consequence
Goranko
Satisfiability and validity of sentences
Goranko
Satisfiability and validity of sentences
A sentence A is:
Goranko
Satisfiability and validity of sentences
A sentence A is:
- satisfiable if S |
= A for some structure S;
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;
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.
Goranko
Satisfiability and validity of any first-order formulae
Goranko
Satisfiability and validity of any first-order formulae
A first-order formula A is:
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.
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.
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.
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.
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;
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.
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:
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.
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).
Goranko
Satisfiability and validity of formulae: examples
Goranko
Satisfiability and validity of formulae: examples
- The formula P(x) is satisfiable,
because its existential closure ∃xP(x) is satisfiable.
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.
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.
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.
Goranko
First-order instances of propositional formulae
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.
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).
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)).
Goranko
Satisfiability and validity of first-order instances
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.
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)
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).
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?
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?
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.
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?
Goranko
Logical consequence in first order logic
Goranko
Logical consequence in first order logic
We fix an arbitrary first-order language L.
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 ∈ Γ.
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.
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?
Goranko
Logical consequence: examples
Goranko
Logical consequence: examples
- If A1, . . . , An, B are prop. formulae such that A1, . . . , An |
= B,
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,
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′.
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:
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.
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).
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.
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)).
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)
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)).
Goranko
Logical consequence: some basic properties
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:
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.
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.
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.
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) . . .).
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:
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].
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.
Goranko
First-order logical consequence: more basic properties
Goranko
First-order logical consequence: more basic properties
- 1. If A1, . . . , An |
= B then ∀xA1, . . . , ∀xAn | = ∀xB.
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.
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.
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).
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.
Goranko
Equality in first-order logic
Goranko
Equality in first-order logic
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.
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:
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.
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.
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.
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.
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.
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))
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 ¬ =)
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
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.
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.
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.
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.”.
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.”
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
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.
Goranko
Axioms for the equality
Proposition
The following sentences, in an arbitrary first-order language L are logically valid:
Goranko
Axioms for the equality
Proposition
The following sentences, in an arbitrary first-order language L are logically valid: (Eq1) x = x
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
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.
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.
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.
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.
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.
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]).
Goranko
Logical equivalence in first-order logic
Goranko
Logical equivalence in first order logic
Goranko
Logical equivalence in first order logic
Formulae A and B are logically equivalent, denoted A ≡ B, iff A | = B and B | = A.
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.
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.
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:
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
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.
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.
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.
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 ↔.
Goranko
Some logical equivalences involving quantifiers
- ¬∀xA ≡ ∃x¬A.
Goranko
Some logical equivalences involving quantifiers
- ¬∀xA ≡ ∃x¬A.
- ¬∃xA ≡ ∀x¬A.
Goranko
Some logical equivalences involving quantifiers
- ¬∀xA ≡ ∃x¬A.
- ¬∃xA ≡ ∀x¬A.
- ∀xA ≡ ¬∃x¬A.
Goranko
Some logical equivalences involving quantifiers
- ¬∀xA ≡ ∃x¬A.
- ¬∃xA ≡ ∀x¬A.
- ∀xA ≡ ¬∃x¬A.
- ∃xA ≡ ¬∀x¬A.
Goranko
Some logical equivalences involving quantifiers
- ¬∀xA ≡ ∃x¬A.
- ¬∃xA ≡ ∀x¬A.
- ∀xA ≡ ¬∃x¬A.
- ∃xA ≡ ¬∀x¬A.
- ∃x∃yA ≡ ∃y∃xA.
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.
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?
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
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.”
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.
Goranko
More logical equivalences and non-equivalences
- ∀x(P(x) ∧ Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
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)
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)
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)
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)
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?)
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?)
Goranko
Negation normal form
Goranko
Transforming first-order formulae to negation normal form
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.
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.
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.
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.”
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)))).
Goranko
Transforming first-order formulae to NNF continued
Now negating: ¬∀x(Car(x) → ∃y(Driver(y) ∧ (Start(x, y) → Stop(x, y))))
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))))
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))))
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))))
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))))
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)))).
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)))).
Goranko
Transforming first-order formulae to NNF completed
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.”
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))))
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))))
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:
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.
Goranko
Negating restricted quantifiers
¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A)
Goranko
Negating restricted quantifiers
¬∀x(P(x) → A) ≡ ∃x(P(x) ∧ ¬A) ¬∃x(P(x) ∧ A) ≡ ∀x(P(x) → ¬A),
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)
Goranko