Predicate Logic. TRUTH-TABLE REMINDERS The problem people had the most trouble with was 1e:...

Post on 03-Jan-2016

213 views 1 download

Transcript of Predicate Logic. TRUTH-TABLE REMINDERS The problem people had the most trouble with was 1e:...

Predicate Logic

TRUTH-TABLE REMINDERS

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.

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

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

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

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.

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

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

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

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.

Only Two Rows

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

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

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

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

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

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

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

HOMEWORK #2

(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

Proving Conditionals

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

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

~~P P├

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

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.

(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

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

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

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

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

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

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

(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

(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

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.

(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

(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

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!

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.

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

Prove P Again

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

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

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.

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

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

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.

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

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

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

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.

Write Down ALL Possibilities

P QT TT FF TF F

Write Down Truth-Table for Premises

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

Write Down Truth-Table for Conclusion

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

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

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 φ├ ψ.

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.

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.

Invalid Argument Form

M S M ST T T TT F T FF T F* TF 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:Everyone will die (at some point).Therefore, Michael will die (at some point).

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