predicate logic

73
Predicate Logic

Upload: denise

Post on 22-Feb-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Predicate Logic. Truth-table reminders. The problem people had the most trouble with was 1e: construct a truth-table for: (P & (~Q & R)) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Predicate Logic

Predicate Logic

Page 2: Predicate Logic

TRUTH-TABLE REMINDERS

Page 3: Predicate Logic

The problem people had the most trouble with was 1e: construct a truth-table for:

(P & (~Q & R))

Many of you only had four rows. The very first principle of truth-tables is to write out ALL your variables to the left, and ALL the possible combinations of truth values under them.

Page 4: Predicate Logic

This is OKP Q R (P & (~ Q & R))T T TT T FT F TT F FF T TF T FF F TF F F

Page 5: Predicate Logic

This is also OKP Q R (P & (~ Q & R))T T TF T TT F TF F TT T FF T FT F FF F F

Page 6: Predicate Logic

This is also OKP Q R (P & (~ Q & R))F F FF F TF T FF T TT F FT F TT T FT T T

Page 7: Predicate Logic

The important point is that each possible combination of truth-values for P, Q, and R shows up in the rows.

Notice that if I want to find, for example, P = T, Q = F, and R = T, I can.

Page 8: Predicate Logic

P Q R (P & (~ Q & R))T T TT T FT F TT F FF T TF T FF F TF F F

Page 9: Predicate Logic

P Q R (P & (~ Q & R))T T TF T TT F TF F TT T FF T FT F FF F F

Page 10: Predicate Logic

P Q R (P & (~ Q & R))F F FF F TF T FF T TT F FT F TT T FT T T

Page 11: Predicate Logic

For a WFF containing only one variable, like “~(P&~~~P),” you only need two rows on the truth-table, because there are only two possibilities: P is true or P is false.

Page 12: Predicate Logic

Only Two Rows

P ~ (P & ~ ~ ~ P)T T T F F T F TF T F F T F T F

Page 13: Predicate Logic

For a WFF with 2 variables, you’re going to need 4 rows, to represent the four possibilities:

• P = T, Q = T• P = T, Q = F• P = F, Q = T• P = F, Q = F

Page 14: Predicate Logic

For a WFF with 3 variables (for example, P, Q, and R) you need 8 rows, because there are two possibilities for P (T or F), 2 possibilities for Q (T or F) and two possibilities for R (T or F), for a total of 8 possibilities:

2 x 2 x 2 = 8

Page 15: Predicate Logic

But not just any 8 lines will do. You have to have 8 lines that represent all 8 unique possibilities.

Page 16: Predicate Logic

Bad Truth-Table ConstructionP Q R (P & (~ Q & R))T T TT F TF T FF F FT T TT F TF T FF F F

Page 17: Predicate Logic

Only Represents 4 Different Possibilities

P Q R (P & (~ Q & R))T T TT F TF T FF F FT T TT F TF T FF F F

Page 18: Predicate Logic

Standard Form

This is why logicians always use a standard way of writing truth-tables. Suppose I had to write a table for 4 variables (16 rows). Here’s what I’d do:P rows: TTTTTTTTFFFFFFFFQ rows: TTTTFFFFTTTTFFFFR rows: TTFFTTFFTTFFTTFFS rows: TFTFTFTFTFTFTFTF

Page 19: Predicate Logic

HOMEWORK #2

Page 20: Predicate Logic

(P → Q) ((P & R) → Q)├1 1. (P → Q) A2 2. (P & R) A2 3. P 2 &E1,2 4. Q 1,3 →E1 5. ((P & R) → Q) 2,4 →I

Page 21: Predicate Logic

Proving Conditionals

Remember our strategy: if you want to prove a conditional:

1. Assume the antecedent.2. Prove the consequent.3. Use →I

Page 22: Predicate Logic

~~P P├1 1. ~~P A2 2. ~P A (for ~E)1,2 3. (~P & ~~P) 1,2 &I1 4. P 2,3 ~E

Page 23: Predicate Logic

Hard Problems

If you run into a problem that looks difficult, often your best option is to use ~E or ~I.

1. Figure out what you want to prove.2. Assume the opposite.3. Prove a contradiction.4. Use ~E or ~I.

Page 24: Predicate Logic

(P → (Q → R)) ((P & Q) → R)├1 1. (P → (Q → R)) A2 2. (P & Q) A (for →I)2 3. P 2 &E2 4. Q 2 &E1,2 5. (Q → R) 1,3 →E1,2 6. R 4,5 →E1 7. ((P & Q) → R) 2,6 →I

Page 25: Predicate Logic

Assume the Antecedent for →I

It’s very important here to continue to follow our strategy for proving conditionals. In line #2 I assumed the antecedent. This is because the rule for →I requires that I assume the antecedent. It says that if I assume φ and derive ψ, then I can write down (φ → ψ) on any future line (depending on whatever ψ depended on except φ).

Page 26: Predicate Logic

Bad Strategy

1 1. (P → (Q → R)) A2 2. P A 3 3. Q A1,2 4. (Q → R) 1,2 →E1,2,3 5. R 3,4 →E? 6. ??? ?

Page 27: Predicate Logic

Correct Step, Bad Result

1 1. (P → (Q → R)) A2 2. P A 3 3. Q A1,2 4. (Q → R) 1,2 →E1,2,3 5. R 3,4 →E1,3 6. (P → R) 2,5 →I

Page 28: Predicate Logic

Correct Step…

1 1. (P → (Q → R)) A2 2. P A 3 3. Q A1,2 4. (Q → R) 1,2 →E1,2,3 5. R 3,4 →E2,3 6. (P & Q) 2,3 &I

Page 29: Predicate Logic

Incorrect Step!

1 1. (P → (Q → R)) A2 2. P A 3 3. Q A1,2 4. (Q → R) 1,2 →E1,2,3 5. R 3,4 →E2,3 6. (P & Q) 2,3 &I1 7. ((P & Q) → R) 6,5 →I

Page 30: Predicate Logic

~(P v Q) ~P├1 1. ~(P v Q) A2 2. P A (for ~I)2 3. (P v Q) 2 vI1,2 4. ((P v Q) & ~(P v Q)) 1,3 &I1 5. ~P 2,4 ~I

Page 31: Predicate Logic

(P ↔ ~P) Q├1 1. (P ↔ ~P) A2 2. P A (for ~I)1 3. ((P → ~P) & (~P → P)) 1 ↔E1 4. (P → ~P) 3 &E1,2 5. ~P 2,4 →E1,2 6. (P & ~P) 2,5 &I1 7. ~P 2,6 ~I

Page 32: Predicate Logic

(P ↔ ~P) Q├1 7. ~P A1 8. (~P → P) 3 &E1 9. P 7,8 →E1 10. (P v Q) 9 vI1 11. Q 7,10 vE

Page 33: Predicate Logic

Dependencies

Even though I had P and ~P at lines 2 and 5 in my proof and I could have proved Q (my goal), I did not. Why? Because both P and ~P depended on line 2.

Page 34: Predicate Logic

(P ↔ ~P) Q├1 1. (P ↔ ~P) A2 2. P A (for ~I)1 3. ((P → ~P) & (~P → P)) 1 ↔E1 4. (P → ~P) 3 &E1,2 5. ~P 2,4 →E

Page 35: Predicate Logic

(P ↔ ~P) Q├1 1. (P ↔ ~P) A2 2. P A (for ~I)1 3. ((P → ~P) & (~P → P)) 1 ↔E1 4. (P → ~P) 3 &E1,2 5. ~P 2,4 →E2 6. (P v Q) 2 vI1,2 7. Q 2,6 ~I

Page 36: Predicate Logic

Dependencies

1,2 7. Q 2,6 ~I

What does this line mean? Another way of writing it is:

(P ↔ ~P), P ├ Q

This is not what we want to show!

Page 37: Predicate Logic

Instead, what I do is prove ~P again– this time depending only on 1. Then I prove P again, this time depending only on 1. Then I’m free to prove Q, depending only on 1, and my proof is complete.

Page 38: Predicate Logic

Prove ~P Again

1 1. (P ↔ ~P) A2 2. P A (for ~I)1 3. ((P → ~P) & (~P → P)) 1 ↔E1 4. (P → ~P) 3 &E1,2 5. ~P 2,4 →E1,2 6. (P & ~P) 2,5 &I1 7. ~P 2,6 ~I

Page 39: Predicate Logic

Prove P Again

1 7. ~P A1 8. (~P → P) 3 &E1 9. P 7,8 →E

Page 40: Predicate Logic

Then Prove Q

1 7. ~P A1 8. (~P → P) 3 &E1 9. P 7,8 →E1 10. (P v Q) 9 vI1 11. Q 7,10 vE

Page 41: Predicate Logic

Very Hard Bonus Question!

The very hard bonus question asked you to prove: ├ (((P → Q) → P) → P)

Here’s some strategy. We want to prove a conditional, so we should assume its antecedent, ((P → Q) → P). Now we want to derive its consequent, P. One way to do this is if we had (P → Q). Since that’s a conditional, we assume its antecedent, P and try to prove Q.

Page 42: Predicate Logic

├ (((P → Q) → P) → P)

1 1. ((P → Q) → P) A (for →I)2 2. P A (for →I)3 3. ~P A (for ~E)2 4. (P v Q) 2 vI2,3 5. Q 3,4 vE3 6. (P → Q) 2,5 →I1,3 7. P 1,6 →E

Page 43: Predicate Logic

├ (((P → Q) → P) → P)

1,3 8. (P & ~P) 3,7 &I1 9. P 3,8 ~E

10. (((P → Q) → P) → P) 1,9 →I

Page 44: Predicate Logic

Here P shows up in the proof 3 times. Only on the third time am I done with the proof, because only then can I conclude (((P → Q) → P) → P) depending on no assumptions at all.

Page 45: Predicate Logic

├ (((P → Q) → P) → P)

1 1. ((P → Q) → P) A (for →I)2 2. P A (for →I)2 3. (((P → Q) → P) → P) 1,2 →I

Page 46: Predicate Logic

├ (((P → Q) → P) → P)

1 1. ((P → Q) → P) A (for →I)2 2. P A (for →I)3 3. ~P A (for ~E)2 4. (P v Q) 2 vI2,3 5. Q 3,4 vE3 6. (P → Q) 2,5 →I1,3 7. P 1,6 →E3 8. (((P → Q) → P) → P) 1,7 →I

Page 47: Predicate Logic

├ (((P → Q) → P) → P)

1,3 8. (P & ~P) 3,7 &I1 9. P 3,8 ~E----- 10. (((P → Q) → P) → P) 1,9 →I

Page 48: Predicate Logic

PREDICATE LOGIC

Page 49: Predicate Logic

Remember that 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 50: Predicate Logic

Write Down ALL Possibilities

P QT TT FF TF F

Page 51: Predicate Logic

Write Down Truth-Table for Premises

P Q ~(P v Q)T T FT F FF T FF F T

Page 52: Predicate Logic

Write Down Truth-Table for Conclusion

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

Page 53: Predicate Logic

Is the Conclusion True When the Premises are ALL True?

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

Page 54: Predicate Logic

Soundness and Completeness

In fact, SL is sound and complete, meaning:

[sound] if you can prove φ├ ψ, then the truth-table test will show φ╞ ψ

[complete] if the truth-table test shows φ╞ ψ, then you can prove φ├ ψ.

Page 55: 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 56: Predicate Logic

SL Translations

In SL, we’d translate “Michael is human” as a single sentence letter, for example: M.

How would we translate “Someone is human”? It’s not a conjunction, or a disjunction, or a conditional, or a biconditional. So we have to translate it as a single sentence letter, for example: S.

Page 57: Predicate Logic

Invalid Argument Form

M S M ST T T TT F T FF T F* TF F F* F

Page 58: 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:Everyone will die (at some point).Therefore, Michael will die (at some point).

Page 59: Predicate Logic

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 60: 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 61: 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 62: 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 63: 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 64: 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 65: 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 66: 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 67: 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 68: 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 69: 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 70: 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 71: 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 72: 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 73: 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))