Predicate Logic. Goal of Logic The goal of logic is to develop formal tests for validity. This is done by finding deductively valid argument forms. In.

Post on 23-Dec-2015

225 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Predicate Logic

Goal of Logic

The goal of logic is to develop formal tests for validity. This is done by finding deductively valid argument forms. In SL, we have two tests to determine valid argument forms: the truth-table test, and derivations. Any argument that has a form that is valid according to the truth-table test is valid, and any argument that has a form that can be proven is valid.

Example

For example, here is a valid logical form:

Premise: If P, then Q.Premise: Not-Q.Conclusion: Therefore, not-P.

Example

We translate it into SL:

Premise: (P → Q)Premise: ~QConclusion: ~P

Truth-Table Test

P QT TT FF TF F

Write Down Premises

P Q (P → Q) ~QT TT FF TF F

Write Down Truth-Table for Premises

P Q (P → Q) ~QT T T FT F F TF T T FF F T T

Write Down Conclusion

P Q (P → Q) ~Q ~PT T T F FT F F T FF T T F TF F T T T

Look at Lines Where ALL Premises are True

P Q (P → Q) ~Q ~PT T T F* FT F F* T FF T T F* TF F T T T

Check Whether Conclusion is True

P Q (P → Q) ~Q ~PT T T F* FT F F* T FF T T F* TF F T T T

(P → Q), ~Q ├ ~P

This is how the truth-table test establishes the validity of the argument.

(P → Q), ~Q ├ ~P

We can also use a proof to establish validity.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A

First, we write down the premises.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A2 2. ~Q AFirst, we write down the premises.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A2 2. ~Q AThen we look at what we want to prove.

~I

To prove a negation, we often have to use the following strategy:

1. Assume the opposite of what we’re trying to prove.

2. Derive a contradiction.3. Use ~I to get what we want.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A2 2. ~Q A3 3. P A

Assume the opposite.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A2 2. ~Q A3 3. P A1,3 4. Q 1,3 →E1,2,3 5. (Q & ~Q) 4,2 &IDerive a contradiction.

(P → Q), ~Q ├ ~P

1 1. (P → Q) A2 2. ~Q A3 3. P A1,3 4. Q 1,3 →E1,2,3 5. (Q & ~Q) 4,2 &I1,2 6. ~P 3,5 ~IUse ~I to get the opposite of what you assumed.

Valid Arguments that Don’t Pass

But, there are still valid arguments that don’t pass the truth-table test for validity and aren’t provable in SL. (This is why failing the truth-table test does not show that an argument is invalid). For example:

Premise: Michael is human.Conclusion: Therefore, someone is human.

Other Examples

Premise: Every chicken is a bird.Premise: Every bird is an animal.Conclusion: Every chicken is an animal.

Premise: No one comes to class on Saturday.Conclusion: Michael doesn’t come to class on Saturday.

Other Examples

Premise: Every chicken is a bird = CPremise: Every bird is an animal = BConclusion: Every chicken is an animal = A

Premise: No one comes to class on Saturday.Conclusion: Michael doesn’t come to class on Saturday.

Other Examples

Premise: CPremise: BConclusion: A

Premise: No one comes to class on Saturday.Conclusion: Michael doesn’t come to class on Saturday.

Truth-Table TestC B AT T TT T FT F TT F FF T TF T FF F TF F F

Write Down PremisesC B A C BT T T T TT T F T TT F T T FT F F T FF T T F TF T F F TF F T F FF F F F F

Write Down ConclusionC B A C B AT T T T T TT T F T T FT F T T F TT F F T F FF T T F T TF T F F T FF F T F F TF F F F F F

Look at Lines Where ALL Premises are True

C B A C B AT T T T T TT T F T T FT F T T F* TT F F T F* FF T T F* T TF T F F* T FF F T F* F* TF F F F* F* F

Is Conclusion Always True?C B A C B AT T T T T TT T F T T FT F T T F* TT F F T F* FF T T F* T TF T F F* T FF F T F* F* TF F F F* F* F

No!C B A C B AT T T T T TT T F T T FT F T T F* TT F F T F* FF T T F* T TF T F F* T FF F T F* F* TF F F F* F* F

SL Not Expressive Enough

The problem here is that our logic is not expressive enough.

All simple English sentences get translated as sentence letters in SL. Therefore, no argument involving only simple sentences has a valid SL form, even though many such arguments are valid.

PL

Therefore, we have a more expressive logic, predicate logic PL, which represents the parts of simple sentences.

In PL, a sentence like “Michael is human” will have its parts “Michael” and “is human” translated separately. In particular, PL has a specific grammatical category for singular terms.

Singular Terms

A singular term is an expression that names or identifies a particular individual, like a person or a city. English singular terms include:

Singular Terms

• Proper names: ‘Michael,’ ‘Jenny,’ ‘Hong Kong,’ etc.

• ‘the’ + description: ‘the tallest man in the world,’ ‘the country with the second largest economy,’ ‘the third Wednesday of March,’ etc.

• ‘that’ ‘this’ or ‘that’ + description, ‘this’ + description: ‘this pencil,’ ‘that table,’ etc.

NOT Singular Terms

• ‘Every happy person’• ‘No one in Hong Kong’• ‘A bird with red feathers’• ‘Beautiful dresses’

None of these expressions name a particular individual or thing.

Translating Singular Terms

To translate singular terms into PL, we will use lowercase Roman letters:

a, b, c, d, e, f, g, etc.

So we might translate “Michael” as “m.” If we’re just doing logic (and not translating) usually we choose a, b, and c to be our singular terms.

Variables

In addition, PL contains a special grammatical category called variables. Variables are a lot like singular terms, but they do not name or represent anything in particular.

Variables: x, y, z (and if need be w, v, and u)

We do not use these letters to translate singular terms!

Variables Replace Singular Terms

Consider how variables are used in arithmetic:• 5 + 7 = 12• 5 + x = 12• y + x = 12• y + x = z“5,” “7,” and “12” all name particular numbers. “x,” “y,” and “z” do not. But they go in the same places singular terms go.

Variables Replace Singular Terms

In logic, things are very similar, except variables can replace more than just singular terms for numbers:• Michael gave that book to Sam• Michael gave x to Sam• y gave x to Sam• y gave x to z

Open Sentences

If you take an English sentence, remove one or more singular terms and replace them with variables, the result is an open sentence.• Michael gave x to Sam• x gave y to z• This past winter, x went home to visit x’s

grandmother.• John went to the party but z stayed home.

Predicates

Predicate logic also contains expressions that translate predicates. In traditional grammar, a sentence like “Michael is human” has “Michael” as its subject and “is human” as its predicate. In logic, we simply identify predicates as open sentences. So “x is human” is a predicate, but “is human” is not.

Translating Predicates

Predicates in PL are translated as capital Roman letters:

A, B, C, D, E, F, G, etc.

We have a preference for the letters F, G, and H when there is no other reason to choose.

Our Fragment

Predicate logic is a lot harder than sentential logic, so to make it easier, the system in the reading (PL) only has “monadic” or “one-place” predicates– predicates containing only one place for a singular term.

Only 1-Place Predicates

OK:• x is human• Michael gave z to Sam• y gave that book to Sam• Michael gave that book to yNOT OK:• x gave that book to y• x admires z

Sample Translations

English PLMichael is human. HmJapan is an island. IjThat dog ate my homework. AdThe Chief Executive likes beans. Bcx likes beans. BxIt is raining in Hong Kong. Rh

More Complicated WFFs

Just as in SL, we can combine PL WFFs with truth-functional connectives:

• (Hm & Bc)• ((Rh ↔ Ij) v (Ad → ~Bc))

Quantifiers

Some words in English are not appropriately translated as either singular terms or predicates.

Consider the sentence: “Something is red.”

Here we know that “x is red” translates as “Rx.” How should we represent “something”?

Not a Singular Term

It would be a bad idea to translate “something” as a singular term:

First, “something” doesn’t identify a particular individual.

Not a Singular Term

It would be a bad idea to translate “something” as a singular term:

Second, if we translated “Something” as a singular term “s” and “something is red” as “Rs,” then we would have to translate “something is red and something is not red” as “(Rs & ~Rs).”

Not a Contradiction

But it’s not a contradiction if something is red and something (else) is not red.

This is why singular terms have to identify particular individuals, and why we can’t translate words like “something” as singular terms.

Quantifiers

In PL, there is a special symbol that translates “something”: (called “backwards E” or “the ∃existential quantifier”).

In the grammar of PL, to write “something is red” we write followed by a variable, followed by an ∃open sentence with that variable in it:

∃xRx

∃xRx

We can say this like: “there is some thing x, and x is red.”“for at least one object x, x is red.”“something is red.”

∃xRx

Continuing to translate “Rx” as x is red:

∃xRx is true when there is some object o where Ro is true.

For example, if “p” translates “this red pen” then xRx is true because Rp is true.∃

Not a Contradiction

This is how it’s possible that “something is red and something is not red”:

( xRx & x~Rx)∃ ∃

The first conjunct is true if there’s some object that is red (this red pen) and the second is true if there’s some object that’s not red (my shirt).

Note

Which variable we use after doesn’t matter, ∃these statements are all equivalent:

∃xRx∃yRy∃zRz

Note

However, we must use the same variable in the open formula that we wish to bind:

YES: zRz∃NO: yRz∃

“Everything”

Let’s look now at the sentence “Everything is red.” “Everything” does not identify a particular individual, and it would be wrong to translate “everything” as a singular term like “e.”

Bad Translation

(P v ~P) is a logical truth (its truth-table has only T’s in it). So (Re v ~Re) is also a logical truth. If we translated “x is red” as “Rx” and “everything” as “e” we would have:

(Re v ~Re)Everything is red or everything is not red.

But that’s not true, it’s false!

Universal Quantifier: ∀

In PL we have a special symbol for “everything”: (called “upside-down A”– it’s supposed to ∀

suggest All). So if I want to say “everything is red” in PL, I write:

∀xRxOr:

∀yRy∀zRz

∀xRx

The way to read this is:

“For all things x, x is red.”“Every x is such that x is red.”“Everything is red.”

Now if we wanted to translate “Everything is red or everything is not red,” we would write:

( xRx v x~Rx)∀ ∀

This is not a logical truth.

It is always true to say

( xRx v ~ xRx)∀ ∀

But this just means “everything is red, or not everything is red,” which is true after all.

Restricted Quantifiers

Often we don’t talk about something or everything, but instead talk about some person or every person, or some dog or every dog, or some student or every student. We can use the quantifiers and here too.∀ ∃

“Some Student is Happy”

Let:Sx := x is a student

Hx := x is happyThen

∃x(Sx & Hx)Means that some student is happy; at least one student is happy; there is some thing x where x is a student and x is happy.

“Every Student is Happy”

What about “every student is happy.” Can we write:

∀x(Sx & Hx)No. This says “For every thing x that exists, x is a student and x is happy.” But even if every student is happy, it’s not true that everything is a student, and it’s not true that everything is happy!

“Every Student is Happy”

Instead, we write:

∀x(Sx → Hx)

This may seem strange, but think about what it means. It says “for every thing x that exists, IF that thing is a student, THEN that thing is happy.”

Relation between and ∀ ∃

The quantifiers are related in the following way:

∀xFx = ~ x~Fx∃∀x~Fx = ~ xFx∃~ xFx = x~Fx∀ ∃~ x~Fx = xFx∀ ∃

Relation between and ∀ ∃

Why is this true? Let’s think about ~ x~Fx = xFx∀ ∃

The first part “~ x~Fx” says “not everything is ∀not F.”The second part “ xFx” says “something is F.”∃If not everything is not F, then something must be F.

Relation between and ∀ ∃

Let’s suppose we put all the blue things in the circle:

Relation between and ∀ ∃

If there is some x where x is in the circle, then not everythingis outside thecircle.

Relation between and ∀ ∃

If there is some x where x is in the circle, then not everythingis outside thecircle.

Relation between and ∀ ∃

If there is some x where x is in the circle, then not everythingis not in thecircle.

Relation between and ∀ ∃

~ x~Bx = xBx∀ ∃

Relation between and ∀ ∃

Let’s think about ∀x~Fx = ~ xFx∃

The first part “ x~Fx” says “everything is not F.”∀The second part “~ xFx” says “it’s not true that ∃something is F.”If everything is not F, then nothing is F, so it’s not true that something is F.

Relation between and ∀ ∃

Imagine that all of the green things are in this circle.

Relation between and ∀ ∃

Now suppose that everything is not in thecircle.

Relation between and ∀ ∃

So there aren’t any green things.

Relation between and ∀ ∃

So there is not something that is inside the circle.

Relation between and ∀ ∃

So there is not something that is inside the circle.

Relation between and ∀ ∃

∀x~Fx = ~ xFx∃

“Nothing”

This also suggests how we should translate sentences involving “nothing” or “no”:

Nothing is red: ~ xRx∃Nothing is red: x~Rx∀No dog is red: ~ x(Dx & Rx)∃No dog is red: x(Dx → ~Rx)∀

Entailment

Here’s a problem that’s VERY SIMILAR to one that will appear on the final.

Which of these two formulas entails the other? Explain your answer.

∀x~(Fx & Gx)( x~Fx & x~Gx)∀ ∀

Entailment

φ entails ψ when there is a valid argument from φ as its only premise to ψ as its conclusion. That is, if φ is true then ψ is true.

Suppose that ( x~Fx & x~Gx) is true. Does that ∀ ∀mean that x~(Fx & Gx) is also true?∀

Suppose that x~(Fx & Gx) is true. Does that ∀mean that ( x~Fx & x~Gx) is also true?∀ ∀

Example

Let’s imagine a concrete example. You go to a private kitchen with your friends. You know that half of them are vegetarians and cannot eat meat, and half of them are allergic to nuts and cannot eat nuts. You ask the restaurant to make a menu where nothing has both meat and nuts in it: x~(Fx & Gx): for every x that you eat, it is ∀not true that x has meat AND x has nuts.

Example

Here’s the menu they come up with:

MenuBroccoli & cashews (nuts) w/ no meat

Chicken (meat) & rice w/ no nutsIce cream w/ no meat, no nuts

The restaurant has accepted your premise. Nothing has both meat and nuts in it: x~(Fx & ∀Gx). But is it true that ( x~Fx & x~Gx) ?∀ ∀

“( x~Fx & x~Gx)”∀ ∀

Well, what does “( x~Fx & x~Gx)” mean? It ∀ ∀means “Everything is not F and everything is not G.” This is the same as saying “nothing is F and nothing is G.”

But it’s not true that nothing has meat: the chicken does. And it’s not true that nothing has nuts: the broccoli does.

This inference is invalid:Premise: x~(Fx & Gx)∀Conclusion: ( x~Fx & x~Gx)∀ ∀

What about the other inference?Premise: ( x~Fx & x~Gx)∀ ∀Conclusion: x~(Fx & Gx)∀

Example

Let’s imagine a concrete example. You go to a private kitchen with your friends and you call ahead to make sure that nothing has meat in it =

x~Fx (because some of your friends are ∀vegetarians) and that nothing has nuts in it =

x~Gx (because some of your friends are ∀allergic). The restaurant says: “Yes, we can handle your request.”

Menu

To accommodate you, the restaurant makes a menu where no dishes have meat and no dishes have nuts:

Menu:1. Broccoli w/ no meat, no nuts

2. Tofu w/ no meat, no nuts3. Ice cream w/ no meat, no nuts

∀x~(Fx & Gx)

The restaurant has accepted your premise: it’s true that ( x~Fx & x~Gx): no dishes have meat ∀ ∀(1, 2, and 3) and also no dishes have nuts (1, 2, and 3 again). But is it true that: x~(Fx & Gx) ? ∀This says nothing has both meat and nuts in it. And nothing does! So this inference is valid, and ( x~Fx & x~Gx) entails x~(Fx & Gx). ∀ ∀ ∀

top related