predicate logic

92
Predicate Logic

Upload: symona

Post on 25-Feb-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Predicate Logic. Goal of Logic. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Predicate Logic

Predicate Logic

Page 2: 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.

Page 3: Predicate Logic

Example

For example, here is a valid logical form:

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

Page 4: Predicate Logic

Example

We translate it into SL:

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

Page 5: Predicate Logic

Truth-Table TestP QT TT FF TF F

Page 6: Predicate Logic

Write Down PremisesP Q (P → Q) ~QT TT FF TF F

Page 7: Predicate Logic

Write Down Truth-Table for Premises

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

Page 8: Predicate Logic

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

Page 9: Predicate Logic

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

Page 10: Predicate Logic

Check Whether Conclusion is TrueP Q (P → Q) ~Q ~PT T T F* FT F F* T FF T T F* TF F T T T

Page 11: Predicate Logic

(P → Q), ~Q ├ ~P

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

Page 12: Predicate Logic

(P → Q), ~Q ├ ~P

We can also use a proof to establish validity.

Page 13: Predicate Logic

(P → Q), ~Q ├ ~P

1 1. (P → Q) A

First, we write down the premises.

Page 14: Predicate Logic

(P → Q), ~Q ├ ~P

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

Page 15: Predicate Logic

(P → Q), ~Q ├ ~P

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

Page 16: Predicate Logic

~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.

Page 17: Predicate Logic

(P → Q), ~Q ├ ~P

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

Assume the opposite.

Page 18: Predicate Logic

(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.

Page 19: Predicate Logic

(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.

Page 20: Predicate Logic

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.

Page 21: Predicate Logic

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.

Page 22: Predicate Logic

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.

Page 23: Predicate Logic

Other Examples

Premise: CPremise: BConclusion: A

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

Page 24: Predicate Logic

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

Page 25: Predicate Logic

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

Page 26: Predicate Logic

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

Page 27: Predicate Logic

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

Page 28: Predicate Logic

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

Page 29: Predicate Logic

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

Page 30: Predicate Logic

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.

Page 31: Predicate Logic

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.

Page 32: Predicate Logic

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:

Page 33: Predicate Logic

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.

Page 34: Predicate Logic

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.

Page 35: Predicate Logic

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.

Page 36: Predicate Logic

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!

Page 37: Predicate Logic

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.

Page 38: Predicate Logic

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

Page 39: Predicate Logic

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.

Page 40: Predicate Logic

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.

Page 41: Predicate Logic

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.

Page 42: Predicate Logic

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.

Page 43: Predicate Logic

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

Page 44: Predicate Logic

Sample TranslationsEnglish 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

Page 45: Predicate Logic

More Complicated WFFs

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

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

Page 46: Predicate Logic

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”?

Page 47: Predicate Logic

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.

Page 48: Predicate Logic

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).”

Page 49: Predicate Logic

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.

Page 50: Predicate Logic

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

Page 51: Predicate Logic

∃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.”

Page 52: Predicate Logic

∃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.∃

Page 53: Predicate Logic

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).

Page 54: Predicate Logic

Note

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

∃xRx∃yRy∃zRz

Page 55: Predicate Logic

Note

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

YES: zRz∃NO: yRz∃

Page 56: Predicate Logic

“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.”

Page 57: Predicate Logic

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!

Page 58: Predicate Logic

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

Page 59: Predicate Logic

∀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.”

Page 60: Predicate Logic

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.

Page 61: Predicate Logic

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.

Page 62: Predicate Logic

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.∀ ∃

Page 63: Predicate Logic

“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.

Page 64: Predicate Logic

“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!

Page 65: Predicate Logic

“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.”

Page 66: Predicate Logic

Relation between and ∀ ∃The quantifiers are related in the following way:

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

Page 67: Predicate Logic

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.

Page 68: Predicate Logic

Relation between and ∀ ∃Let’s suppose we put all the blue things in the circle:

Page 69: Predicate Logic

Relation between and ∀ ∃If there is some x where x is in the circle, then not everythingis outside thecircle.

Page 70: Predicate Logic

Relation between and ∀ ∃If there is some x where x is in the circle, then not everythingis outside thecircle.

Page 71: Predicate Logic

Relation between and ∀ ∃If there is some x where x is in the circle, then not everythingis not in thecircle.

Page 72: Predicate Logic

Relation between and ∀ ∃~ x~Bx = xBx∀ ∃

Page 73: Predicate Logic

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.

Page 74: Predicate Logic

Relation between and ∀ ∃Imagine that all of the green things are in this circle.

Page 75: Predicate Logic

Relation between and ∀ ∃Now suppose that everything is not in thecircle.

Page 76: Predicate Logic

Relation between and ∀ ∃So there aren’t any green things.

Page 77: Predicate Logic

Relation between and ∀ ∃So there is not something that is inside the circle.

Page 78: Predicate Logic

Relation between and ∀ ∃So there is not something that is inside the circle.

Page 79: Predicate Logic

Relation between and ∀ ∃∀x~Fx = ~ xFx∃

Page 80: Predicate Logic

“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)∀

Page 81: Predicate Logic
Page 82: Predicate Logic

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)∀ ∀

Page 83: Predicate Logic

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?∀

Page 84: Predicate Logic

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

Page 85: Predicate Logic

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.

Page 86: Predicate Logic

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

Page 87: Predicate Logic

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) ?∀ ∀

Page 88: Predicate Logic

“( 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.

Page 89: Predicate Logic

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)∀

Page 90: Predicate Logic

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.”

Page 91: Predicate Logic

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

Page 92: Predicate Logic

∀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). ∀ ∀ ∀