Warm-Up Problem
Determine 훼[(푦 − 푧)/푥] where
훼 =def (∃푧 (푃 (푧) → (푄(푥, 푦) ∧ (∀푦 (푃 (푦) ∨ (∃푥 푃 (푥))))))) with 푃 (1) and 푄(2) predicates and 푥, 푦, 푧 variables.
...... 1/48 Predicate Logic: Semantics, Interpretations and Environments
Carmen Bruni Lecture 11
Based on slides by Jonathan Buss, Lila Kari, Anna Lubiw and Steve Wolfman with thanks to B. Bonakdarpour, A. Gao, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek
...... Predicate Logic Semantics 2/48 Last Time
• Did another substitution example (Please Review!) • Discussed Interpretations with respect to Predicate Logic
...... Predicate Logic Semantics 3/48 Learning Goals
• Define an interpretation and an environment. • Give examples of interpretations and environments in specific situations. • Define validity, satisfiable and unsatisfiable.
...... Predicate Logic Semantics 4/48 Leading Question
Given a well-formed Predicate logic formula, is it T or F in some context?
• In Propositional logic, a truth valuation was enough to assign a meaning to our atoms (propositional variables) • In Predicate logic, we need a lot more.
...... Predicate Logic Semantics 5/48 However, if we consider an interpretation 풥 satisfying 푃 (푥, 푥) is 푥 is greater than 푥 and still consider the domain 풟 = {1}, then 훼 is false under this interpretation.
We will formalize the notation of interpretations (and later environments) and explain what it means for a Predicate logic formula to be valid, satisfiable, and unsatisfiable.
Motivating Example
For example, if we consider the formula (for 푃 (2) a predicate symbol and variable 푥) 훼 =def (∀푥 푃 (푥, 푥)) and we use an interpretation ℐ of 푃 (푥, 푥) to mean 푥 is equal to 푥 and consider a domain 풟 = {1}, then indeed, 훼 is true under this interpretation.
...... Predicate Logic Semantics 6/48 We will formalize the notation of interpretations (and later environments) and explain what it means for a Predicate logic formula to be valid, satisfiable, and unsatisfiable.
Motivating Example
For example, if we consider the formula (for 푃 (2) a predicate symbol and variable 푥) 훼 =def (∀푥 푃 (푥, 푥)) and we use an interpretation ℐ of 푃 (푥, 푥) to mean 푥 is equal to 푥 and consider a domain 풟 = {1}, then indeed, 훼 is true under this interpretation.
However, if we consider an interpretation 풥 satisfying 푃 (푥, 푥) is 푥 is greater than 푥 and still consider the domain 풟 = {1}, then 훼 is false under this interpretation.
...... Predicate Logic Semantics 6/48 Motivating Example
For example, if we consider the formula (for 푃 (2) a predicate symbol and variable 푥) 훼 =def (∀푥 푃 (푥, 푥)) and we use an interpretation ℐ of 푃 (푥, 푥) to mean 푥 is equal to 푥 and consider a domain 풟 = {1}, then indeed, 훼 is true under this interpretation.
However, if we consider an interpretation 풥 satisfying 푃 (푥, 푥) is 푥 is greater than 푥 and still consider the domain 풟 = {1}, then 훼 is false under this interpretation.
We will formalize the notation of interpretations (and later environments) and explain what it means for a Predicate logic formula to be valid, satisfiable, and unsatisfiable...... Predicate Logic Semantics 6/48 Brief Definition
An interpretation consists of a domain as well as meanings for all of the constant, function and predicate symbols.
Huth and Ryan use the term “model” instead of “interpretation”.
More formally...
...... Predicate Logic Semantics 7/48 Semantics: Interpretations
Definition: Fix a set ℒ of constant symbols, function symbols, variable symbols and predicate symbols. (The “language” of our formulas.) An interpretation ℐ (for the set ℒ) consists of
• A non-empty set dom(ℐ) or 풟ℐ or more simply 풟 , called the domain (or universe) of ℐ. • For each constant symbol 푐, a member 푐ℐ of dom(ℐ). • For each function symbol 푓(푖), an 푖-ary function 푓ℐ. • For each predicate symbol 푃 (푖), an 푖-ary predicate (relation) 푃 ℐ.
When there are no variables and no quantifiers, this is more than enough to specify meaning to a formula.
...... Predicate Logic Semantics 8/48 High Brow Comment
Technically, our language should have all of the variable symbols we will ever need. In practice this is a bit cumbersome so we will usually forgo including variables in our language explicitly and simply use them as they appear in our formulas.
...... Predicate Logic Semantics 9/48 Values of Variable-Free Terms
Definition: Fix an interpretation ℐ. For each term 푡 containing no variables, the value of 푡 under interpretation ℐ, denoted 푡ℐ, is as follows.
• If 푡 is a constant 푐, the value 푡ℐ is 푐ℐ. ℐ ℐ ℐ ℐ • If 푡 is 푓(푡1, … , 푡푛), the value 푡 is 푓 (푡1, … , 푡푛).
The value of a term is always a member of the domain of ℐ.
For example, consider 푓 a unary function and 0 a constant. If we have an interpretation ℐ with domain ℕ, 0ℐ the usual zero and 푓ℐ the usual successor function (increment by 1), then
푓(0)ℐ = 푓ℐ(0ℐ) = 1
...... Predicate Logic Semantics 10/48 Watch out!
Notice that in the previous example, even though we used the constant symbol 0, we still needed to specify that the interpretation of 0 is indeed the usual zero.
For example, consider 푓 a unary function and 0 a constant. If we have an interpretation ℐ with domain ℕ, 0ℐ to be the usual number 1 and 푓ℐ the usual successor function (increment by 1), then
푓(0)ℐ = 푓ℐ(0ℐ) = 2
While doable, this is not advised...
...... Predicate Logic Semantics 11/48 Clarity
Most of these issues are taken care of by not using a symbol that could be misinterpreted as being in the domain.
For example, consider 푓 a unary function and 푎 a constant. If we have an interpretation ℐ with domain ℕ, 푎ℐ to be the usual number 1 and 푓ℐ the usual successor function (increment by 1), then
푓(푎)ℐ = 푓ℐ(푎ℐ) = 2
...... Predicate Logic Semantics 12/48 Total Function
Another issue arises that your function’s interpretation must be defined on the entire domain! for a function with arity 푘, we need to define an interpretation such that the function 푓ℐ satisfies:
푓ℐ ∶ 풟푘 → 풟 that is, every 푘-tuple from the domain must map into the domain. Such functions capable of doing this are called total functions.
• For example, the usual addition over the natural numbers is total since the sum of any two natural numbers gives another natural number. • However, the usual subtraction over the natural numbers is not total. For example, we cannot perform 2 − 6 and get a natural number. • Similarly, square roots over the integers (or even the real numbers!) is not a total function since the square root of −1 is not an integer (or a real number)...... Predicate Logic Semantics 13/48 Formulas with Variable-Free Terms
Formulas get values in much the same fashion as terms, except that values of formulas lie in {T, F}.
Definition: Fix an interpretation ℐ. For each formula 훼 containing no variables, the value of 훼 under interpretation ℐ, denoted 훼ℐ, is as follows.
• If 훼 is 푃 (푡1, … , 푡푛), then
{⎧T if ⟨푡ℐ , … , 푡ℐ ⟩ ∈ 푃 ℐ 훼ℐ = 1 푛 ⎨ ⎩{F otherwise. • If 훼 is (¬훽) or (훽 ⋆ 훾), then 훼ℐ is determined by 훽ℐ and 훾ℐ in the same way as for propositional logic.
...... Predicate Logic Semantics 14/48 Example
Let 푓(1) and ℎ(2) be function symbols. Let 푃 (1) and 푄(2) be predicate symbols and let 푎, 푏, 푐 be constant symbols. Define an interpretation by:
• Domain: 풟 = {1, 2, 3} • Constants: 푎ℐ = 1, 푏ℐ = 2, 푐ℐ = 3 • Functions: 푓ℐ ∶ 푓ℐ(1) = 2, 푓ℐ(2) = 3, 푓ℐ(3) = 1 • ℎℐ ∶ (푥, 푦) ↦ min{푥, 푦} (min is the minimum function) • Predicates: 푃 ℐ = {1, 3} • 푄ℐ = {⟨1, 2⟩, ⟨3, 3⟩, ⟨3, 1⟩}
What is the meaning of each of these formulas in this interpretation?
• 푓(ℎ(푓(푎), 푓(푐)))ℐ • 푓(ℎ(푏, 푓(푎)))ℐ • 푄(푓(푐), 푎)ℐ ℐ • 푃 (ℎ(푓(푎), 푓(푐))) ...... Predicate Logic Semantics 15/48 Notice that 푓(푐)ℐ = 1 and 푎ℐ = 1. So if we set 풥 = ℐ except we define
푄풥 = {⟨1, 1⟩}
then we see that ⟨푓풥 (푐풥 ), 푎풥 ⟩ ∈ 푄풥 .
Follow Ups
We saw that under ℐ we have that ⟨푓ℐ(푐ℐ), 푎ℐ⟩ ∉ 푄ℐ. Is there another interpretation 풥 such that ⟨푓풥 (푐풥 ), 푎풥 ⟩ ∈ 푄풥 ?
...... Predicate Logic Semantics 16/48 Follow Ups
We saw that under ℐ we have that ⟨푓ℐ(푐ℐ), 푎ℐ⟩ ∉ 푄ℐ. Is there another interpretation 풥 such that ⟨푓풥 (푐풥 ), 푎풥 ⟩ ∈ 푄풥 ?
Notice that 푓(푐)ℐ = 1 and 푎ℐ = 1. So if we set 풥 = ℐ except we define
푄풥 = {⟨1, 1⟩} then we see that ⟨푓풥 (푐풥 ), 푎풥 ⟩ ∈ 푄풥 .
...... Predicate Logic Semantics 16/48 Notice that 푓(푐)ℐ = 1 and 푓(푎)ℐ = 2 and so ℎ(푓(푎), 푓(푐))ℐ = 1. Thus, if we set 풦 = ℐ except we define
푃 풦 = ∅
so that 1 ∉ 푃 풦, we see that 푃 (ℎ(푓(푎), 푓(푐)))풦 = F.
Follow Ups
We saw that under ℐ we have that 푃 (ℎ(푓(푎), 푓(푐)))ℐ = T. Is there another interpretation 풦 such that 푃 (ℎ(푓(푎), 푓(푐)))풦 = F?
...... Predicate Logic Semantics 17/48 Follow Ups
We saw that under ℐ we have that 푃 (ℎ(푓(푎), 푓(푐)))ℐ = T. Is there another interpretation 풦 such that 푃 (ℎ(푓(푎), 푓(푐)))풦 = F?
Notice that 푓(푐)ℐ = 1 and 푓(푎)ℐ = 2 and so ℎ(푓(푎), 푓(푐))ℐ = 1. Thus, if we set 풦 = ℐ except we define
푃 풦 = ∅ so that 1 ∉ 푃 풦, we see that 푃 (ℎ(푓(푎), 푓(푐)))풦 = F.
...... Predicate Logic Semantics 17/48 Environments
How do we deal with variables and quantifiers?
Definition: An environment is a function that assigns a value in the domain to every variable symbol in the language.
• An environment needs to be defined on all variables [in the language]! • We will see in practice, environments will only be used to interpret free variables but must nonetheless be defined on all variables including bound variables. • Bound variables will get their meaning primarily through the corresponding quantifier.
...... Predicate Logic Semantics 18/48 Meaning of Terms
The combination of an interpretation and an environment supplies a value for every term. Definition: Fix an interpretation ℐ and environment 퐸. For each term 푡, the value of 푡 under ℐ and 퐸, denoted 푡(ℐ,퐸), is as follows.
• If 푡 is a constant 푐, the value 푡(ℐ,퐸) is 푐ℐ. • If 푡 is a variable 푥, the value 푡(ℐ,퐸) is 푥퐸. (ℐ,퐸) ℐ (ℐ,퐸) (ℐ,퐸) • If 푡 is 푓(푡1, … , 푡푛), the value 푡 is 푓 (푡1 , … , 푡푛 ).
To extend this definition to formulas, we must consider quantifiers.
But first, a few examples.
...... Predicate Logic Semantics 19/48 To give 훼2 a value, we must also specify an environment. For example, if (ℐ,퐸) 퐸(푥) = 2, then 훼2 = T.
Constants Vs. Variables
Example: Let 훼1 be 푃 (푐) (where 푐 is a constant), and let 훼2 be 푃 (푥) (where 푥 a variable). Let ℐ be the interpretation with domain ℕ, 푐ℐ = 2 and 푃 ℐ = “is even”. ℐ ℐ Then 훼1 = T, but 훼2 is undefined.
...... Predicate Logic Semantics 20/48 Constants Vs. Variables
Example: Let 훼1 be 푃 (푐) (where 푐 is a constant), and let 훼2 be 푃 (푥) (where 푥 a variable). Let ℐ be the interpretation with domain ℕ, 푐ℐ = 2 and 푃 ℐ = “is even”. ℐ ℐ Then 훼1 = T, but 훼2 is undefined.
To give 훼2 a value, we must also specify an environment. For example, if (ℐ,퐸) 퐸(푥) = 2, then 훼2 = T.
...... Predicate Logic Semantics 20/48 Example
Let 푓(1) and ℎ(2) be function symbols. Let 푃 (1) and 푄(2) be predicate symbols, let 푎, 푏, 푐 be constant symbols and let 푥, 푦, 푧 be variable symbols. Define an interpretation ℐ by:
• Domain: 풟 = {1, 2, 3} • Constants: 푎ℐ = 1, 푏ℐ = 2, 푐ℐ = 3 • Functions: 푓ℐ ∶ 푓ℐ(1) = 2, 푓ℐ(2) = 3, 푓ℐ(3) = 1 • ℎℐ ∶ (푥, 푦) ↦ min{푥, 푦} (min is the minimum function) • Predicates: 푃 ℐ = {1, 3} • 푄ℐ = {⟨1, 2⟩, ⟨3, 3⟩, ⟨3, 1⟩} and define an environment 퐸 by
퐸(푥) = 3, 퐸(푦) = 3, 퐸(푧) = 1.
(see next slide...) ...... Predicate Logic Semantics 21/48 Interpretations
What is the meaning of each of these formulas in the interpretation and environment on the previous slide ?
• 푓(ℎ(푓(푎), 푧))(ℐ,퐸) • 푓(ℎ(푦, 푐))(ℐ,퐸) • 푄(푥, ℎ(푎, 푏))(ℐ,퐸) • 푃 (ℎ(푓(푎), 푥))(ℐ,퐸)
...... Predicate Logic Semantics 22/48 Meaning of Terms—Example
Example. Suppose a language has constant symbol 0, a unary function 푠, and a binary function +. We shall write + in infix position: (푥 + 푦) instead of +(푥, 푦). The expressions 푠((푠(0) + 푠(푥))) and 푠((푥 + 푠((푥 + 푠(0))))) are both terms.
The following are examples of interpretations and environments.
• 풟 = dom{ℐ} = ℕ, 0ℐ = 0, 푠ℐ is the successor function and +ℐ is the addition operation. Then, if 퐸(푥) = 3, the terms get values (ℐ,퐸) (ℐ,퐸) (푠((푠(0) + 푠(푥)))) = 6 and (푠((푥 + 푠((푥 + 푠(0)))))) = 9.
...... Predicate Logic Semantics 23/48 Meaning of Terms—Example 2
• 풟 = dom{풥 } is the collection of all words over the alphabet {푎, 푏}, 0풥 = 푎, 푠풥 appends 푎 to the end of a string, and +풥 is concatenation. Let 퐺(푥) = 푎푏푎. Then
( ,퐺) 푠((푠(0) + 푠(푥))) 풥 = 푎푎푎푏푎푎푎
and (풥 ,퐺) 푠((푥 + 푠((푥 + 푠(0))))) = 푎푏푎푎푏푎푎푎푎푎 .
...... Predicate Logic Semantics 24/48 Quantifiers
• Finally, we can evaluate formulas with free and bound variables. • How can we evaluate a formula of the form (∀푥 훼) or (∃푥 훼)? • For (∀푥 훼), we need to verify that 훼 is true for every possible value of 푥 in the domain • For (∃푥 훼) we need to verify that 훼 is true for at least one possible value of 푥 in the domain
We formalize this on the next few slides.
...... Predicate Logic Semantics 25/48 Quantifiers Over Finite Domains
The universal and existential quantifiers may be understood respectively as generalizations of conjunction and disjunction. If the domain
퐷 = {푎1, … , 푎푘} is finite then:
For all 푥, 푃 (푥) iff 푃 (푎1) and ... and 푃 (푎푘)
There exists 푥, 푃 (푥) iff 푃 (푎1) or ... or 푃 (푎푘) where 푃 is a predicate (a property).
...... Predicate Logic Semantics 26/48 Quantified Formulas
Definition: For any environment 퐸 and domain element d, the environment “퐸 with 푥 re-assigned to d”, denoted 퐸[푥 ↦ d], is given by {⎧d if 푦 is 푥 퐸[푥 ↦ d](푦) = ⎨ ⎩{퐸(푦) if 푦 is not 푥. In other words, 퐸[푥 ↦ d](푥) = 푑 and for any other variable 푦, 퐸[푥 ↦ d](푦) = 퐸(푦).
Key point: 퐸[푥 ↦ d] is just a new environment!
...... Predicate Logic Semantics 27/48 Example
Let 풟 = {1, 2, 3} for some interpretation ℐ and consider 퐸 as defined by
퐸(푥) = 3 퐸(푦) = 3 퐸(푧) = 1
Then
퐸[푥 ↦ 2](푥) = 2 퐸[푥 ↦ 2](푦) = 3 퐸[푥 ↦ 2](푧) = 1
What about the following?
퐸[푥 ↦ 2][푦 ↦ 2](푥) 퐸[푥 ↦ 2][푦 ↦ 2](푦) 퐸[푥 ↦ 2][푦 ↦ 2](푧)
...... Predicate Logic Semantics 28/48 Values of Quantified Formulas
Definition: The values of (∀푥 훼) and (∃푥 훼) are given by
{⎧T if 훼(ℐ,퐸[푥↦d]) = T for every d in dom(ℐ) • (ℐ,퐸) (∀푥 훼) = ⎨ ⎩{F otherwise {⎧T if 훼(ℐ,퐸[푥↦d]) = T for some d in dom(ℐ) • (ℐ,퐸) (∃푥 훼) = ⎨ ⎩{F otherwise
Note: The values of (∀푥 훼)(ℐ,퐸) and (∃푥 훼)(ℐ,퐸) do not depend on the value of 퐸(푥). The value 퐸(푥) only matters for free occurrences of 푥 but nonetheless environments must be specified for all variables!
...... Predicate Logic Semantics 29/48 Examples: Value of a Quantified Formula
Example. Let dom(ℐ) = {a, b} and 푃 ℐ = {⟨a, a⟩, ⟨a, b⟩, ⟨b, b⟩}. Let 퐸(푥) = 푎 and 퐸(푦) = 푏. We have
• 푃 (푥, 푥)(ℐ,퐸) = T, since ⟨퐸(푥), 퐸(푥)⟩ = ⟨a, a⟩ ∈ 푃 ℐ.
• 푃 (푦, 푥)(ℐ,퐸) = F, since ⟨퐸(푦), 퐸(푥)⟩ = ⟨b, a⟩ ∉ 푃 ℐ.
(ℐ,퐸) • (∃푦 푃 (푦, 푥)) = T, since 푃 (푦, 푥)(ℐ,퐸[푦↦a]) = T. (That is, ⟨퐸[푦 ↦ a](푦), 퐸[푦 ↦ a](푥)⟩ = ⟨a, a⟩ ∈ 푃 ℐ).
(ℐ,퐸) • What is (∀푥 (∀푦 푃 (푥, 푦))) ?
...... Predicate Logic Semantics 30/48 (ℐ,퐸) • What about (∀푥 (∃푦 푃 (푥, 푦))) ?
Examples: Continued
Example. Let dom(ℐ) = {a, b} and 푃 ℐ = {⟨a, a⟩, ⟨a, b⟩, ⟨b, b⟩}. Let 퐸(푥) = a and 퐸(푦) = b.
(ℐ,퐸) • What is (∀푥 (∀푦 푃 (푥, 푦))) ?
Since ⟨b, a⟩ ∉ 푃 ℐ, we have
푃 (푥, 푦)(ℐ,퐸[푥↦b][푦↦a]) = F ,
and thus (ℐ,퐸) (∀푥 (∀푦 푃 (푥, 푦))) = F .
...... Predicate Logic Semantics 31/48 Examples: Continued
Example. Let dom(ℐ) = {a, b} and 푃 ℐ = {⟨a, a⟩, ⟨a, b⟩, ⟨b, b⟩}. Let 퐸(푥) = a and 퐸(푦) = b.
(ℐ,퐸) • What is (∀푥 (∀푦 푃 (푥, 푦))) ?
Since ⟨b, a⟩ ∉ 푃 ℐ, we have
푃 (푥, 푦)(ℐ,퐸[푥↦b][푦↦a]) = F ,
and thus (ℐ,퐸) (∀푥 (∀푦 푃 (푥, 푦))) = F .
(ℐ,퐸) • What about (∀푥 (∃푦 푃 (푥, 푦))) ?
...... Predicate Logic Semantics 31/48 Because “푃 (b, a)” is not a formula. The elements a and b of dom(ℐ) are not symbols in the language; they cannot appear in a formula.
A Question of Syntax
In the previous example, we wrote
푃 (푥, 푦)(ℐ,퐸[푥↦b][푦↦a]) = F .
Why did we not write simply
푃 (b, a) = F or perhaps 푃 (b, a)(ℐ,퐸) = F ?
...... Predicate Logic Semantics 32/48 A Question of Syntax
In the previous example, we wrote
푃 (푥, 푦)(ℐ,퐸[푥↦b][푦↦a]) = F .
Why did we not write simply
푃 (b, a) = F or perhaps 푃 (b, a)(ℐ,퐸) = F ?
Because “푃 (b, a)” is not a formula. The elements a and b of dom(ℐ) are not symbols in the language; they cannot appear in a formula.
...... Predicate Logic Semantics 32/48 Satisfaction of Formulas
An interpretation ℐ and environment 퐸 satisfy a formula 훼, denoted (ℐ,퐸) ℐ ⊨퐸 훼, if 훼 = T; (ℐ,퐸) they do not satisfy 훼, denoted ℐ ⊭퐸 훼, if 훼 = F.
Form of 훼 Condition for ℐ ⊨퐸 훼
(ℐ,퐸) (ℐ,퐸) ℐ 푃 (푡1, … , 푡푘) ⟨푡1 , … , 푡푘 ⟩ ∈ 푃
(¬훽) ℐ ⊭퐸 훽 (훽 ∧ 훾) both ℐ ⊨퐸 훽 and ℐ ⊨퐸 훾 (훽 ∨ 훾) either ℐ ⊨퐸 훽 or ℐ ⊨퐸 훾 (or both) (훽 → 훾) either ℐ ⊭퐸 훽 or ℐ ⊨퐸 훾 (or both) (∀푥 훽) for every a ∈ dom(ℐ), ℐ ⊨퐸[푥↦a] 훽 (∃푥 훽) there is some a ∈ dom(ℐ) such that ℐ ⊨퐸[푥↦a] 훽
If ℐ ⊨퐸 훼 for every 퐸, then ℐ satisfies 훼, denoted ℐ ⊨ 훼...... Predicate Logic Satisfaction of Formulas 33/48 ℐ ⊨퐸 (∃푦 푃 (푥, (푦 ⊕ 푦))) iff 퐸(푥) is an even number.
Example: Satisfaction
Example. Consider the formula (∃푦 푃 (푥, 푦 ⊕ 푦)). (For 푃 a binary predicate and ⊕ a binary function.)
Suppose dom(ℐ) = {1, 2, 3, …}, ⊕ℐ is the addition operation, and 푃 ℐ is the equality predicate.
Give a simple condition that determines when
ℐ ⊨퐸 (∃푦 푃 (푥, (푦 ⊕ 푦))) holds.
...... Predicate Logic Satisfaction of Formulas 34/48 Example: Satisfaction
Example. Consider the formula (∃푦 푃 (푥, 푦 ⊕ 푦)). (For 푃 a binary predicate and ⊕ a binary function.)
Suppose dom(ℐ) = {1, 2, 3, …}, ⊕ℐ is the addition operation, and 푃 ℐ is the equality predicate.
Give a simple condition that determines when
ℐ ⊨퐸 (∃푦 푃 (푥, (푦 ⊕ 푦))) holds.
ℐ ⊨퐸 (∃푦 푃 (푥, (푦 ⊕ 푦))) iff 퐸(푥) is an even number.
...... Predicate Logic Satisfaction of Formulas 34/48 Validity and Satisfiability
Validity and satisfiability of formulas have definitions analogous tothe ones for propositional logic. Definition: A formula 훼 is
• valid if every interpretation and environment satisfy 훼; that is, if
ℐ ⊨퐸 훼 for every ℐ and 퐸, • satisfiable if some interpretation and environment satisfy 훼; that is, if
ℐ ⊨퐸 훼 for some ℐ and 퐸, and • unsatisfiable if no interpretation and environment satisfy 훼; that is, if
ℐ ⊭퐸 훼 for every ℐ and 퐸. (The term “tautology” is not used in predicate logic.)
...... Predicate Logic Satisfaction of Formulas 35/48 Note
If there is no need to specify an environment, then simply defining an interpretation ℐ and writing ℐ ⊨ 훼 will suffice.
...... Predicate Logic Satisfaction of Formulas 36/48 Revisit Example
Let 푓(1) and ℎ(2) be function symbols. Let 푃 (1) and 푄(2) be predicate symbols, let 푎, 푏, 푐 be constant symbols and let 푥, 푦, 푧 be variable symbols. Define an interpretation by:
• Domain: 풟 = {1, 2, 3} • Constants: 푎ℐ = 1, 푏ℐ = 2, 푐ℐ = 3 • Functions: 푓ℐ ∶ 푓ℐ(1) = 2, 푓ℐ(2) = 3, 푓ℐ(3) = 1 • ℎℐ ∶ (푥, 푦) ↦ min{푥, 푦} (min is the minimum function) • Predicates: 푃 ℐ = {1, 3} • 푄ℐ = {⟨1, 2⟩, ⟨3, 3⟩, ⟨3, 1⟩} and define an environment 퐸 by 퐸(푥) = 3, 퐸(푦) = 3, 퐸(푧) = 1.
• Give a new interpretation 풥1 and environment 퐺1 satisfying 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1 • Give a new interpretation 풥2 and environment 퐺2 satisfying 풥 ⊭ 푄(푦, ℎ(푎, 푏))...... 2 퐺2 ...... Predicate Logic Satisfaction of Formulas 37/48 풥1 Solution: Set 퐺1 = 퐸 and 풥1 to be ℐ except, let 푃 = ∅. Then 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
Give a new interpretation 풥2 and environment 퐺2 satisfying 풥 ⊭ 푄(푦, ℎ(푎, 푏)). 2 퐺2
풥2 Solution: Set 퐺2 = 퐸 and 풥2 to be ℐ except, let 푄 = ∅. Then 풥 ⊭ 푄(푦, ℎ(푎, 푏)).. 2 퐺2
Solution
Give a new interpretation 풥1 and environment 퐺1 satisfying 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
...... Predicate Logic Satisfaction of Formulas 38/48 Give a new interpretation 풥2 and environment 퐺2 satisfying 풥 ⊭ 푄(푦, ℎ(푎, 푏)). 2 퐺2
풥2 Solution: Set 퐺2 = 퐸 and 풥2 to be ℐ except, let 푄 = ∅. Then 풥 ⊭ 푄(푦, ℎ(푎, 푏)).. 2 퐺2
Solution
Give a new interpretation 풥1 and environment 퐺1 satisfying 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
풥1 Solution: Set 퐺1 = 퐸 and 풥1 to be ℐ except, let 푃 = ∅. Then 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
...... Predicate Logic Satisfaction of Formulas 38/48 풥2 Solution: Set 퐺2 = 퐸 and 풥2 to be ℐ except, let 푄 = ∅. Then 풥 ⊭ 푄(푦, ℎ(푎, 푏)).. 2 퐺2
Solution
Give a new interpretation 풥1 and environment 퐺1 satisfying 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
풥1 Solution: Set 퐺1 = 퐸 and 풥1 to be ℐ except, let 푃 = ∅. Then 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
Give a new interpretation 풥2 and environment 퐺2 satisfying 풥 ⊭ 푄(푦, ℎ(푎, 푏)). 2 퐺2
...... Predicate Logic Satisfaction of Formulas 38/48 Solution
Give a new interpretation 풥1 and environment 퐺1 satisfying 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
풥1 Solution: Set 퐺1 = 퐸 and 풥1 to be ℐ except, let 푃 = ∅. Then 풥 ⊭ 푃 (ℎ(푓(푎), 푧)). 1 퐺1
Give a new interpretation 풥2 and environment 퐺2 satisfying 풥 ⊭ 푄(푦, ℎ(푎, 푏)). 2 퐺2
풥2 Solution: Set 퐺2 = 퐸 and 풥2 to be ℐ except, let 푄 = ∅. Then 풥 ⊭ 푄(푦, ℎ(푎, 푏)).. 2 퐺2
...... Predicate Logic Satisfaction of Formulas 38/48 Relevance Lemma
Lemma:
Let 훼 be a first-order formula, ℐ be an interpretation, and 퐸1 and 퐸2 be two environments such that
퐸1(푥) = 퐸2(푥) for every 푥 that occurs free in 훼.
Then ℐ ⊨ 훼 if and only if ℐ ⊨ 훼 . 퐸1 퐸2
Proof by induction on the structure of 훼.
...... Predicate Logic Satisfaction of Formulas 39/48 Example: Satisfiability and Validity
Let ℒ be a language consisting of variables 푥, 푦, 푧, function symbols 푓(2), 푔(1) and predicate symbol 푃 (2). Let 훼 be the formula 푃 (푓(푔(푥), 푔(푦)), 푔(푧)). The formula is satisfiable:
• dom(ℐ): ℕ • 푓ℐ: summation • 푔ℐ: squaring • 푃 ℐ: equality • 퐸(푥) = 3, 퐸(푦) = 4 and 퐸(푧) = 5.
훼 is not valid. (Why?)
...... Predicate Logic Satisfaction of Formulas 40/48 Another Example
Let ℒ be a language consisting of variables 푥, 푦, predicate symbol 푄(2). Let ℐ be the interpretation defined by
• Domain: 풟 = {1, 2} 푄ℐ = ∅ and environment 퐸 given by:
• 퐸(푥) = 1 퐸(푦) = 2
def 1. Show that ℐ ⊭퐸 훼 where 훼 = (∃푥 (∀푦 푄(푥, 푦))). 2. Give an interpretation 풥 and an environment 퐺 such that 풥 ⊨퐺 (∃푥 푄(푥, 푦)) 3. Give an interpretation 풥 and an environment 퐺 such that 풥 ⊨퐺 (∀푥 푄(푥, 푦)) 4. Give an interpretation 풥 and an environment 퐺 such that 풥 ⊨퐺 (∃푥 (∀푦 푄(푥, 푦)))
5. Is (∀푥 (∃푦 푄(푥, 푦))) valid? Why or why not?...... Predicate Logic Satisfaction of Formulas 41/48 Semantic Entailment
Let Σ be a set of well-formed Predicate logic formulas and 훼 is a well-formed predicate logic formula.
For interpretation ℐ and environment 퐸, we write ℐ ⊨퐸 Σ if and only if for every 휑 ∈ Σ, we have that ℐ ⊨퐸 휑.
We say that Σ is a semantically entails 훼, written as Σ ⊨ 훼, if and only if for any interpretation ℐ and environment 퐸, we have ℐ ⊨퐸 Σ implies (ℐ,퐸) ℐ ⊨퐸 훼. This can also be written as 훼 = T.
∅ ⊨ 훼 means that 훼 is valid.
...... Predicate Logic Satisfaction of Formulas 42/48 Notes
Suppose Σ = {훼1, 훼2, ..., 훼푛} Then Σ ⊨ 훽 means...
• ...that every pair of interpretation and environment that makes Σ true must also make 훽 true.
• ...that ∅ ⊨ ((훼1 ∧ (훼2 ∧ (... ∧ 훼푛))) → 훽)
• ...that ((훼1 ∧ (훼2 ∧ (... ∧ 훼푛))) → 훽) is valid
To prove these, take an arbitrary interpretation ℐ and environment 퐸 and show that if this satisfied Σ then it must also satisfy 훽. You may also assume towards a contradiction that ℐ ⊭퐸 훽 and proceed from there if this helps.
To prove that Σ ⊭ 훽 find an interpretation ℐ and environment 퐸 that satisfies Σ but that doesn’t satisfy 훽, that is, show that ℐ ⊭퐸 훽.
...... Predicate Logic Satisfaction of Formulas 43/48 Proof by contradiction. Suppose there are ℐ and 퐸 such that
ℐ ⊭퐸 ((∀푥 (훼 → 훽)) → ((∀푥 훼) → (∀푥 훽))) .
Then we must have ℐ ⊨퐸 (∀푥 (훼 → 훽)) and ℐ ⊭퐸 ((∀푥 훼) → (∀푥 훽));
the second gives ℐ ⊨퐸 (∀푥 훼) and ℐ ⊭퐸 (∀푥 훽). Using the definition of ⊨ for formulas with ∀, we have
for every a ∈ dom(ℐ), ℐ ⊨퐸[푥↦a] (훼 → 훽) and ℐ ⊨퐸[푥↦a] 훼. Thus also ℐ ⊨퐸[푥↦a] 훽 for every a ∈ dom(ℐ).
Thus ℐ ⊨퐸 (∀푥 훽), a contradiction.
Example: Semantic Entailment
Example: Show that for any well-formed Predicate formulas 훼 and 훽:
∅ ⊨ ((∀푥 (훼 → 훽)) → ((∀푥 훼) → (∀푥 훽))) .
...... Predicate Logic Satisfaction of Formulas 44/48 Example: Semantic Entailment
Example: Show that for any well-formed Predicate formulas 훼 and 훽:
∅ ⊨ ((∀푥 (훼 → 훽)) → ((∀푥 훼) → (∀푥 훽))) .
Proof by contradiction. Suppose there are ℐ and 퐸 such that
ℐ ⊭퐸 ((∀푥 (훼 → 훽)) → ((∀푥 훼) → (∀푥 훽))) .
Then we must have ℐ ⊨퐸 (∀푥 (훼 → 훽)) and ℐ ⊭퐸 ((∀푥 훼) → (∀푥 훽)); the second gives ℐ ⊨퐸 (∀푥 훼) and ℐ ⊭퐸 (∀푥 훽). Using the definition of ⊨ for formulas with ∀, we have for every a ∈ dom(ℐ), ℐ ⊨퐸[푥↦a] (훼 → 훽) and ℐ ⊨퐸[푥↦a] 훼. Thus also ℐ ⊨퐸[푥↦a] 훽 for every a ∈ dom(ℐ).
Thus ℐ ⊨퐸 (∀푥 훽), a contradiction...... Predicate Logic Satisfaction of Formulas 44/48 Proof: Suppose that ℐ ⊨퐸 (∀푥 (¬훾)). By definition, this means
for every a ∈ dom(ℐ), ℐ ⊨퐸[푥↦a] (¬훾). that is, ( ,퐸[푥↦a]) (¬훾) ℐ = T. Again by definition (for a formula with ¬), this is equivalent to
(ℐ,퐸[푥↦a]) for every a ∈ dom(ℐ), ℐ ⊭퐸[푥↦a] 훾 that is, 훾 = F. and also
there is no a ∈ dom(ℐ) such that ℐ ⊨퐸[푥↦a] 훾. ( ,퐸) Assuming towards a contradiction that (∃푥 훾) ℐ = T, this would mean
that there is an b ∈ dom(ℐ) such that ℐ ⊨퐸[푥↦b] 훾 which contradicts the previous line. Hence ℐ ⊨퐸 (¬(∃푥 훾)) holds as required.
Example
Example. Show that {(∀푥 (¬훾))} ⊨ (¬(∃푥 훾)).
...... Predicate Logic Satisfaction of Formulas 45/48 Example
Example. Show that {(∀푥 (¬훾))} ⊨ (¬(∃푥 훾)).
Proof: Suppose that ℐ ⊨퐸 (∀푥 (¬훾)). By definition, this means
for every a ∈ dom(ℐ), ℐ ⊨퐸[푥↦a] (¬훾). that is, ( ,퐸[푥↦a]) (¬훾) ℐ = T. Again by definition (for a formula with ¬), this is equivalent to
(ℐ,퐸[푥↦a]) for every a ∈ dom(ℐ), ℐ ⊭퐸[푥↦a] 훾 that is, 훾 = F. and also
there is no a ∈ dom(ℐ) such that ℐ ⊨퐸[푥↦a] 훾. ( ,퐸) Assuming towards a contradiction that (∃푥 훾) ℐ = T, this would mean that there is an b ∈ dom(ℐ) such that ℐ ⊨퐸[푥↦b] 훾 which contradicts the previous line. Hence ℐ ⊨퐸 (¬(∃푥 훾)) holds as required...... Predicate Logic Satisfaction of Formulas 45/48 Key idea: 휑1 → 휑2 yields true whenever 휑1 is false.
Let 훼 be 푃 (푥). Let ℐ have domain {a, b} and 푃 ℐ = {a}. Then ℐ ⊨ (∀푥 훼) → (∀푥 훽) for any 훽. (Why?)
To obtain ℐ ⊭ ∀푥 (훼 → 훽), we can use ¬푃 (푥) for 훽. (Why?) Thus ((∀푥 훼) → (∀푥 훽)) ⊭ (∀푥 (훼 → 훽)), as required. (Why?)
Example
Example: Find well-formed Predicate formulas 훼 and 훽 such that
{((∀푥 훼) → (∀푥 훽))} ⊭ (∀푥 (훼 → 훽)) .
...... Predicate Logic Satisfaction of Formulas 46/48 To obtain ℐ ⊭ ∀푥 (훼 → 훽), we can use ¬푃 (푥) for 훽. (Why?) Thus ((∀푥 훼) → (∀푥 훽)) ⊭ (∀푥 (훼 → 훽)), as required. (Why?)
Example
Example: Find well-formed Predicate formulas 훼 and 훽 such that
{((∀푥 훼) → (∀푥 훽))} ⊭ (∀푥 (훼 → 훽)) .
Key idea: 휑1 → 휑2 yields true whenever 휑1 is false.
Let 훼 be 푃 (푥). Let ℐ have domain {a, b} and 푃 ℐ = {a}. Then ℐ ⊨ (∀푥 훼) → (∀푥 훽) for any 훽. (Why?)
...... Predicate Logic Satisfaction of Formulas 46/48 Example
Example: Find well-formed Predicate formulas 훼 and 훽 such that
{((∀푥 훼) → (∀푥 훽))} ⊭ (∀푥 (훼 → 훽)) .
Key idea: 휑1 → 휑2 yields true whenever 휑1 is false.
Let 훼 be 푃 (푥). Let ℐ have domain {a, b} and 푃 ℐ = {a}. Then ℐ ⊨ (∀푥 훼) → (∀푥 훽) for any 훽. (Why?)
To obtain ℐ ⊭ ∀푥 (훼 → 훽), we can use ¬푃 (푥) for 훽. (Why?) Thus ((∀푥 훼) → (∀푥 훽)) ⊭ (∀푥 (훼 → 훽)), as required. (Why?)
...... Predicate Logic Satisfaction of Formulas 46/48 Example
Example: For any formula 훼 and term 푡, show that
∅ ⊨ ((∀푥 훼) → 훼[푡/푥]) .
Recall that functions must be total!
...... Predicate Logic Satisfaction of Formulas 47/48 Proof. Let 풟 be the domain of ℐ. Since 푥 is not free in 훼, therefore 퐸(푦) = 퐸[푥 ↦ 푎](푦), for every 푎 ∈ 풟 and for every 푦 that occurs free in 훼. Then by the Relevance Lemma, we have that
• ℐ ⊨퐸 훼
• if and only if ℐ ⊨퐸[푥↦푎] 훼, for any 푎 ∈ 풟.
• if and only if ℐ ⊨퐸 (∀푥 훼), which establishes the desired result.
Another Example
Let 훼 be any well-formed Predicate formula without a free variable 푥. Let ℐ be any interpretation and let 퐸 be any environment. Then
훼(ℐ,퐸) = (∀푥 훼)(ℐ,퐸).
...... Predicate Logic Satisfaction of Formulas 48/48 Another Example
Let 훼 be any well-formed Predicate formula without a free variable 푥. Let ℐ be any interpretation and let 퐸 be any environment. Then
훼(ℐ,퐸) = (∀푥 훼)(ℐ,퐸).
Proof. Let 풟 be the domain of ℐ. Since 푥 is not free in 훼, therefore 퐸(푦) = 퐸[푥 ↦ 푎](푦), for every 푎 ∈ 풟 and for every 푦 that occurs free in 훼. Then by the Relevance Lemma, we have that
• ℐ ⊨퐸 훼
• if and only if ℐ ⊨퐸[푥↦푎] 훼, for any 푎 ∈ 풟.
• if and only if ℐ ⊨퐸 (∀푥 훼), which establishes the desired result...... Predicate Logic Satisfaction of Formulas 48/48