Top Banner
Formal Methods: First-Order Logic 3.2 Semantics Johns Hopkins University, Fall 2017
38

Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Aug 02, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Formal Methods: First-Order Logic

3.2 Semantics

Johns Hopkins University, Fall 2017

Page 2: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

FOL Semantics

Now that we are familiar with the syntax of first-order, or elementarylanguages, it is time to give a formal semantics.

Recall that the truth makers for the semantics for sentential logic weretruth-valuations on a set of sentence letters. This sufficed since all wffswere constructed recursively from sentence letters using connectives thatwere truth-functional.

In FOL, however, even the atomic wffs are built up from morefundamental syntactic items, viz., terms and predicate symbols, wherethe terms in turn are constructed from individual variables and/orindividual constants and function symbols.

Hence, the truth-makers for FOL are going to have to be built out ofitems corresponding to these syntactic categories.

Page 3: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Elements of FOL Semantics• Individual constants (and other closed terms) are supposed to play

the role of singly denoting expressions of English, so we will needindividuals for them to denote.

• Individual variables vary over items suitable to be named byindividual constants. So, they vary over individuals. However, theycannot vary limitlessly. Their variation must be restricted to aparticular domain of discourse, D, i.e., a prescribed set ofindividuals.

• Function symbols make terms from previously given terms. Sinceterms are suitable for naming individuals in D, they should tosomething that takes us from individuals of D to individuals of D.I.e., they should correspond to operations on the domain ofdiscourse.

• Finally, predicate symbols are intended to express properties ofindividuals or relations between individuals. Consequently, theyshould correspond to subsets of D or relations on D.

Page 4: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Models for First-Order Languages

We saw above that what a structure or model must do, besides choosinga domain of discourse, is to map the appropriate symbols to appropriateset-theoretic objects associated with the domain of discourse D:

• individual constant 7→ element of D• n-place function symbol 7→ n-ary operation on D• n-adic predicate symbol 7→ subset of Dn

Def 3.2.1. A modelM for a 1st-order language L is an ordered pairM = 〈D, I〉 where D is a non-empty set and I is a function with domainL s.t.

• for each individual constant c ∈ L, I(c) ∈ D,

• for each n-ary function symbol f ∈ L, I(f ) : Dn → D, and

• for each n-adic predicate symbol P ∈ L, I(P) ⊆ Dn.

Notational conventions: cI for I(c), f I for I(f ), and PI for I(P).

Page 5: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Open Terms, Open Wffs

As we saw earlier, only sentences, and not wffs with free variables, can beinterpreted into English (under a dictionary, or scheme of abbreviation) asa sentence that has a truth value.

This is because open terms, that is terms containing variables, fail todenote under translation.

Similarly, since structures/models for a language interpret only individualconstants, function symbols, (and predicates) on a prescribed domain ofdiscourse, open terms fail to denote elements of the domain and thusopen wffs are not candidates for being true or false in a structure/model.

Yet, we want our semantics to be compositional. Sentences can beformed from wffs by quantifying over free variables. Hence, we need toassign some semantic values for open wffs. How are we to do this?

Page 6: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Variable Assignments / Sequences on Domains

The solution is to provide provisional denotations for all variables. Thisprovides unique denotata in the domain of discourse for all terms of thelanguage. Then truth can be assessed relative to the provisionalassignment of denotata.

Recall that Var = {v0, v1, v2, . . .} is the set of all variables.

Def 3.2.2. A variable assignment s for a domain of discourse D is afunction s : Var → D.

We can call s a sequence on D. The reason is that the variables standin one-to-one correspondence with the natural numbers, and a(n infinite)sequence on a set A is just a function from N to A.

Page 7: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

“Lifting” a Variable Assigment to the Set of Terms

Let Terms(L) be the set of terms of a 1st-order language L.

Def 3.2.3. The denotation/extension J KsM of each term in Terms(L)(open and closed) in model M under assignment s is recursively definedas follows:

• JxKsM = s(x) for any x ∈ Var

• JcKsM = cI for an individual constant c ∈ L• Jft1 · · · tnKsM = f I(Jt1KsM, . . . , JtnKsM) for each n-ary function

symbol f ∈ L and terms t1, . . . , tn ∈ Terms(L)

This is another example of a definition by recursion. Note that in thethird clause, the denotation of ft1 · · · tn is computed by first computingthe denotations of the terms t1, . . . , tn and then applying the operationf I on D that I assigns to f to that n-tuple of individuals in D.

Page 8: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Introducing the Addams Family

The Addams family, or at least the part of it that we will be concernedwith here, consists of Gomez, Morticia, Fester, and Pugsley. Gomez andMorticia are best of friends, as are Fester and Pugsley. Gomez and Festerdelight in the macabre. Gomez and Morticia are married to one another.

This suggests the following formal language LAddams with logicalconstants g , m, p (for Gomez, Morticia, and Pugsley, respectively—forsake of illustration, Fester goes nameless), the unary function symbol fto indicate the best friend of, monadic predicates A for being an Addams,and D for delighting in the macabre, and finally a dyadic predicate M forstanding in the relation of spouse.

To sum up, LAddams = {g ,m, p, f ,A,D,M}. The family situation can becaptured in a model MAd = 〈DAd , IAd〉 for LAddams .

Page 9: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

The Addams Family Model

Let DAd = {Gomez ,Morticia,Fester ,Pugsley}.

The situation described above is captured by interpreting the vocabularyof LAddams as follows.

• IAd(g) = Gomez ; IAd(m) = Morticia; IAd(p) = Pugsley ;

• f IAd (Gomez) = Morticia; f IAd (Morticia) = Gomez ;f IAd (Pugsley) = Fester ; f IAd (Fester) = Pugsley

• IAd(A) = {Gomez ,Morticia,Pugsley ,Fester}• IAd(D) = {Gomez ,Fester}• IAd(M) = {〈Gomez ,Morticia〉, 〈Morticia,Gomez〉}

Page 10: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Denotation/Extension of Terms of LAddams in DAd

Fix some assignment of variables s : Var → DAd , let us say,s(v0) = Gomez ; s(v1) = Morticia, s(vn) = Gomez if n > 1.

Now, we can compute the denotation/extension of any term of LAddams .

Jfv3KsMAd= f IAd (Jv3KsMAd

) = f IAd (s(v3)) = f IAd (Gomez) = Morticia.

JfpKsMAd= f IAd (JpKsMAd

) = f IAd (IAd(p)) = f IAd (Pugsley) = Fester .

Jffv0KsMAd= f IAd (Jfv0KsMAd

)

= f IAd (f IAd (Jv0KsMAd))

= f IAd (f IAd (s(v0)))

= f IAd (f IAd (Gomez))

= f IAd (Morticia)

= Gomez .

Page 11: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Standard Arithmetic

For another example, take the standard model of arithmetic. Thisconsists of the natural numbers N, the 0-ary constant function which isthe number 0, the successor operation S which, applied to each numbergives the next number, and the operations of addition and multiplication.

In standard notation from the mathematical community, this is thestructure or model

N = (N, 0,S ,+, ·).

What we need to do is to invent a 1st-order language with theappropriate vocabulary for this structure. To avoid begging confusion, wedon’t want to use the same symbols we’ve used for the operationsthemselves. So, let’s settle on the following. Let’s use the individualconstant c to denote the number 0, f the successor operation S , and gand h the addition and multiplication operations, respectively.

Page 12: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Standard Arithmetic (cont.)

In other words, we’re choosing a 1st-order language LA = {c , f , g , h} anda model N for LA such that

DN = NcN = 0

f N = S

gN = +

hN = ·

Of course, denotata are provided for all the terms of LA only courtesy ofsome variable assignment s. Let’s pick one that’s non-trivial, yetmnemonically easy, say s(vn) = 2n, so that only the even numbers are inthe range of s.

Page 13: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Denotations of Terms in the Language of Arithmetic

Examples:

Jv2KsN = s(v2)

= 4

Jfv1KsN = f N(Jv1KsN)

= S(Jv1KsN)

= S(s(v1))

= S(2)

= 3

Page 14: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Denotations of Terms in the Language ofArithmetic (cont.)

Jgv5fcKsN = gN(Jv5KsN, JfcKsN)

= Jv5KsN + JfcKsN= Jv5KsN + f N(JcKsN)

= Jv5KsN + S(JcKsN)

= s(v5) + S(cN)

= 10 + S(0)

= 10 + 1

= 11

Page 15: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth in a Model under a Variable Assignment

Now we know how to compute the denotations in the domain ofdiscourse of a structure/model of arbitrary terms under a variableassignment s. Under a variable assignment s, each and every term t ofthe language receives a denotation JtKsM.

This makes it possible to define the conditions under which a wff ϕ (withor without free variables) is true in a model M for the language under s.

Let M = 〈D, I〉 be a model for L, ϕ a wff of L, and s : Var → D be avariable assignment into D.

JϕKsM = T is to be read as “ϕ is true in M under s.”

JϕKsM = F is to be read as “ϕ is false in M under s.”

These concepts are interdefinable: JϕKsM = T iff JϕKsM 6= F .

Page 16: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth Conditions for Equations

We said that, in standing with tradition, we are taking identity to be alogical concept. That’s why no interpretation of the identity symbol hasto be given in the specification of a structure/model for a language.

The identity symbol is always interpreted as diagD, i.e., as the identityrelation on the domain of discourse. For any terms t, t ′:

Def 3.2.4. Jt = t ′KsM = T iff JtKsM = Jt ′KsM.

Example. Take the standard model of arithmetic N and s the assignmentof variables s(vn) = 2n.

Then Jgv1v1 = hv1v1KsN = T .

Page 17: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth Conditions for Equations (cont.)

Why? Because

Jgv1v1KsN = gN(Jv1KsN, Jv1KsN)

= Jv1KsN + Jv1KsN= 2 + 2

= 2 · 2= Jv1KsN · Jv1KsN= hN(Jv1KsN, Jv1KsN)

= Jhv1v1KsN

Page 18: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth Conditions for Simple Predication

What about the truth/satisfaction conditions for a wff of the formPt1 · · · tn where P is an n-adic predicate and t1, . . . , tn terms? This is amatter of the n-tuple of the denotation of the terms being a member ofthe extension of the predicate.

Def 3.2.4 (cont.) JPt1 · · · tnKsM = T iff 〈Jt1KsM, . . . , JtnKsM〉 ∈ PI .

In order to illustrate, we need a language that actually has somepredicates in it, as well as a structure/model for that language. AlthoughLAddams is such a language, let’s begin with a language that consistssolely of a single dyadic predicate.

Page 19: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

A Relational Example

Let LE = {R}, where R is a dyadic (relational) predicate.

Here is a simple model M = 〈D, I〉 for LE .

D = {a, a′, b, b′}RI = {〈a, a〉, 〈a, a′〉, 〈a′, a〉, 〈a′, a′〉, 〈b, b〉, 〈b, b′〉, 〈b′, b〉, 〈b′, b′〉}

Now let s : Var → D be such that s(v0) = a, s(v1) = a′ and s(vn) = b ifn > 1. (Note: Nobody said that the range of an assignment of variableshas to be the entire domain of discourse.)

Page 20: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

A Relational Example (cont.)

In this example we have:

JRv0v1KsM = T iff 〈Jv0KsM, Jv1KsM〉 ∈ RI

iff 〈a, a′〉 ∈ RI

Since 〈a, a′〉 ∈ RI , it follows that JRv0v1KsM = T .

Alternatively, we find that

JRv0v3KsM = F

since s(v0) = a and s(v3) = b, but 〈a, b〉 6∈ RI .

Page 21: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Simple Predication in the Addams Family

We trust you recall the details of the language LAddams and the modelMAd = 〈DAd , IAd〉 introduced for it representing the family situation.

Let us use the same variable assignment s as introduced earlier, viz.,s(v0) = Gomez , s(v1) = Morticia, s(vn) = Gomez if n > 1.

Then JDv0KsMAd= T . Why?

JDv0KsMAd= T iff Jv0KsMAd

∈ DIAd iff s(v0) ∈ DIAd iff Gomez ∈ DIAd .

JDpKsMAd= F . Why?

JDpKsMAd= T iff JpKsMAd

∈ DIAd iff IAd(p) ∈ DIAd iff Pugsley ∈ DIAd .

Page 22: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Simple Predication in the Addams Family (cont.)

JMv1mKsMAd= F . Why?

JMv1mKsMAd= T iff 〈Jv1KsMAd

, JmKsMAd〉 ∈ MIAd

iff 〈s(v1), IAd(m)〉 ∈ MIAd

iff 〈Morticia,Morticia〉 ∈ MIAd .

But 〈Morticia,Morticia〉 6∈ MIAd .

Page 23: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth Conditions for ConnectivesFrom atomic wffs, there are two ways of constructing more complicatedwffs. One is by applying quantifier expressions of the form ∀x or ∃x . Theother is by use of the connectives familiar from sentential logic. Since thetruth/satisfaction conditions for the latter are essentially borrowed fromsentential logic, we state those first before addressing the trickier case ofthe treatment of quantifiers.

Def 3.2.4 (cont.)

J¬ϕKsM = T iff JϕKsM = F

Jϕ ∧ ψKsM = T iff JϕKsM = JψKsM = T

Jϕ ∨ ψKsM = T iff JϕKgM = T or JψKgM = T

Jϕ ⊃ ψKsM = T iff JϕKsM = F or JψKsM = T

Jϕ ≡ ψKsM = T iff JϕKsM = JψKsM

Page 24: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Some Notation for Variant Sequences

In order to state the truth/satisfaction conditions for the application ofquantifiers, we need the notion of a sequence which differs from anothersequence at most on what it assigns to a pre-chosen variable x .

The reason is that in quantifying over the variable x , we want to considerthe various values that x might take on, while keeping the values of allthe other variables fixed.

Def 3.2.5. Let M = 〈D, I〉, let s : Var → D, and let d ∈ D. For anyvariable x define the variable assignment s[x 7→d ] : Var → D as follows.For any y ∈ Var ,

s[x 7→d ](y) =

{s(y) if y 6= xd otherwise

N.B. If s(x) = d , then s[x 7→d ] = s.

Page 25: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Examples of Variant Sequences

Suppose that D = N. Let s : Var → D be defined so that s(vn) = n forall n ∈ N.

Example: Let x = v0 and d = 17. Then, while s(v0) = 0, we have

s[v0 7→17](v0) = 17,

while if n 6= 0,s[v0 7→17](vn) = n.

Example:s[v3 7→5](v5) = 5

s[v3 7→5](v3) = 5

Page 26: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Iteration of Variant Sequences

Once we have the concept of the one-variable variant variable assignments[x 7→d ] on s, we can consider a two-variable variant

s[x 7→d ][y 7→d′],

which can be viewed as(s[x 7→d ])[y 7→d′],

or directly defined as

s[x 7→d ][y 7→d′](z) =

d if z = xd ′ if z = ys(z) otherwise.

Clearly, this can be done for arbitrarily many variables.

Page 27: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth Conditions for Quantifiers

With the device of variant sequences in hand, we can now define thetruth conditions for both existential and universal quantification.

Def 3.2.4 (cont.) Let x be any variable, ϕ any wff.

• J∃xϕKsM = T iff JϕKs[x 7→d ]

M = T for some d ∈ D.

• J∀xϕKsM = T iff JϕKs[x 7→d ]

M = T for all d ∈ D.

Informally, ∃xϕ is true in M under s just in case there’s some way ofkeeping the values of all the other variables fixed but assigning somethingto x in order to make ϕ true in M under that variant assignment ofvariables. ∀xϕ is true in M under s iff no matter how s is varied on xthe result is to make ϕ true in M.

Page 28: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Quantification in the Addams Family

Let us use the same variable assignment s introduced earlier, viz.,s(v0) = Gomez , s(v1) = Morticia, s(vn) = Gomez if n > 1.

J∃v1Dv1KsMAd= T . Why?

AlthoughJDv1KsMAd

= F ,

nonethelesss[v1 7→Gomez](v1) = Gomez

and henceJDv1K

s[v1 7→Gomez]

MAd= T .

Thus,JDv1K

s[v1 7→d ]

MAd= T

for some d ∈ DAd .

Page 29: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

More Quantification in the Addams Family

J∀v1Av1KsMAd= T . Why?

Note that since

s[v1 7→Gomez](v1) = Gomez

s[v1 7→Morticia](v1) = Morticia

s[v1 7→Pugsley ](v1) = Pugsley

s[v1 7→Fester ](v1) = Fester

we have that

JAv1Ks[v1 7→Gomez]

MAd= JAv1K

s[v1 7→Morticia]

MAd= JAv1K

s[v1 7→Pugsley ]

MAd= JAv1K

s[v1 7→Fester ]

MAd= T .

Thus, JAv1Ks[v1 7→d ]

MAd= T for all d ∈ DAd .

Page 30: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Other Examples of QuantificationRecall the relational structure/model used to illustrate truth/satisfactionof atomic wffs. The language LE had a single dyadic predicate R, andthe model M = 〈D, I〉 for LE was such that

D = {a, a′, b, b′}RI = {〈a, a〉, 〈a, a′〉, 〈a′, a〉, 〈a′, a′〉, 〈b, b〉, 〈b, b′〉, 〈b′, b〉, 〈b′, b′〉}

Let s be any variable assignment, and consider the sentence ∃v0Rv0v0.

J∃v0Rv0v0KsM = T since choosing, e.g. a ∈ D, JRv0v0Ks[v0 7→a]

M = T .

In this example, we could have chosen a′, b, or b′ just as well. Since thatexhausts the domain of discourse D, we have that

J∀v0Rv0v0KsM = T ,

as well. This is to say that RI is reflexive, which you probably realizedwhen the model M was first given.

Page 31: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

More Examples of Quantification

Continuing with the same model for LE , let’s now let s(v0) = a ands(vn) = b for all n 6= 0. Then we have that ,

JRv0v1KsM = F ,

because 〈a, b〉 6∈ RI . Existentially quantifying over v1, now, we have

J∃v1Rv0v1KsM = T ,

since, e.g.,JRv0v1K

s[v1 7→a]

M = T .

Page 32: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

More Examples of Quantification (cont.)

Now, J∀v0∃v1Rv0v1KsM = T just in case J∃v1Rv0v1Ks[v0 7→d ]

M = T for allvalues d = a, a′, b, b′.

For that to happen, it must be the case that for each choice of d , thereis a d ′ such that

JRv0v1Ks[v0 7→d ][v1 7→d′ ]M = T .

But this is easily arranged. For

• if d = a, choose d ′ = a (or d ′ = a′),

• if d = a, choose d ′ = a (or d ′ = a′),

• if d = b, choose d ′ = b (or d ′ = b′), and

• if d = b′, choose d ′ = b (or d ′ = b′).

Page 33: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

A Final Example of Quantification

As a final example, J∃v0∀v1Rv0v1KsM = F .

To see why, it would have to be the case that for some d ∈ D,

J∀v1Rv0v1Ks[v0 7→d ]

M = T ,

i.e., for some d ∈ DJRv0v1K

s[v0 7→d ][v1 7→d′ ]M = T

for all choices of d ′.

To show this fails, you only have to consider:

• if d = a, choose d ′ = b (or d’ = b’) as a counterexample,

• if d = a′, choose d ′ = b (or d’ = b’) as a counterexample,

• if d = b, choose d ′ = a (or d’ = a’) as a counterexample, and

• if d = b′, choose d ′ = a (or d’ = a’) as a counterexample.

Page 34: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Truth of Sentences

You may have noticed that in the case of sentences, the truth value turnsout the same no matter what variable assignment you use. This is aspecial case of the following intuitively correct result.

Theorem. If s and s ′ are variable assignments that agree on all thevariables free in ϕ, then JϕKsM = T iff JϕKs

M = T .

Since a sentence σ has no free variables, we’ll have either thatJσKsM = T for all variable assignments s or else JσKsM = F for allvariable assignments s. Hence:

Def 3.2.6. If σ is a sentence, then JσKM = T iff JσKsM = T for some(and hence any) variable assignment s.

Page 35: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Logical Consequence

Let ϕ be a (perhaps open) wff and Γ be a set of wffs for a 1st-orderlanguage L.

Def 3.2.7. Γ |= ϕ (read “Gamma logically entails phi” or “phi is alogical consequence of Gamma”) iff for every model M = 〈D, I〉 for Land for every variable assignment s : Var → D, if JψKsM = T for eachψ ∈ Γ, then JϕKsM = T .

For a set of sentences Σ and sentence σ, we have

Def 3.2.8. Σ |= σ iff for every model M for the language, if JθKM = Tfor each θ ∈ Σ, then JσKM = T .

Page 36: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Related Logical Concepts

Notation: |= ϕ is short for ∅ |= ϕ.

Def 3.2.9. ϕ is a logical validity iff |= ϕ.

Lemma. ϕ is logically valid just in case JϕKsM = T for every modelM = 〈D, I〉 of the language and every variable assignment on D.

Def 3.2.10. A logical truth is a logically valid sentence.

Lemma. σ is a logical truth just in case σ is true in everystructure/model for the language.

Def 3.2.11. σ is a logical impossibility iff it is nowhere true.

Lemma. σ is a logical impossibility iff ¬σ is a logical truth.

Page 37: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Related Logical Concepts (cont.)

Defn 3.2.12. Wffs ϕ is said to be logically equivalent to ψ just in caseboth ϕ |= ψ and ψ |= ϕ.

Lemma. ϕ is logically equivalent to ψ iff |= ϕ ≡ ψ.

Page 38: Formal Methods: First-Order Logic 3.2 Semantics · 2017. 11. 7. · Gomez and Morticia are married to one another. This suggests the following formal language L Addams with logical

Caveat on Terminology

The terminology logical consequence has been adopted under theprovisional assumption that 1st-order logic is Logic. This attitudereflects the fact that 1st-order logic is the logic of classical mathematics.As we consider alternative logics or extensions of 1st-order logic, we willqualify, by saying 1st-order consequence instead, and make similarqualifications for logical truth, and so forth.