<<

Section 1.2 Propositional

CS 130 – Discrete Structures Where Does the Name Come From?

• Statements are sometimes called . • Wffs are also called propositional wffs. • We want to learn: – how to reach logical conclusions based on given statements • The that uses propositional wffs is called propositional logic.

• Deriving logical conclusion by combining many and using formal logic: hence, determining the of .

CS 130 – Discrete Structures 31

of Argument: – An argument is a sequence of statements in which the conjunction of the initial statements (called the /hypotheses) is said to imply the final statement (called the conclusion). An argument can be presented symbolically as:

– (P1 Λ P2 Λ ... Λ Pn)  Q

– Where P1, P2, ..., Pn represent the hypotheses and Q represents the conclusion – The question can be stated as:

• when can Q be logically deduced from P1, P2, ..., Pn?

• when is Q a logical conclusion from P1, P2, ..., Pn?

CS 130 – Discrete Structures 32 Focus on Relationships Between Hypothesis and Conclusion

• Note: we need to focus on the relationship of the conclusion to the hypotheses and not just any knowledge we might have about the conclusion Q.

• For example:

– P1: Neil Armstrong was the first to step on the moon. – P2 : Mars is a red planet. – and the conclusion – No human has ever been to Mars.

• A valid argument should be true based entirely on its internal structure.

CS 130 – Discrete Structures 33 Valid Arguments

• Definition of valid argument: – An argument is valid if whenever the hypotheses are all true, the conclusion must also be true.

– That is, when (P1 Λ P2 Λ ... Λ Pn)  Q is a . – The previous example had a wff representation of A Λ B  C which is not a tautology • Example: – If George Bush is the current president of the US, then Dick Cheney is the current vice president. George Bush is not the current president of the US. Therefore Dick Cheney is not the current vice president. – (A  B) Λ A’  B’

CS 130 – Discrete Structures 34 Sequence

• To test whether (P1 Λ P2 Λ ... Λ Pn)  Q is a tautology: – build a – generate a proof sequence (new way) by applying derivation rules

• Definition of Proof Sequence: – A sequence of wffs in which each wff is either a hypothesis or the result of applying one of the formal system’s derivation rules to earlier wffs in the sequence – The above proof sequence results in many numbers of wffs and finally it will result in the conclusion

CS 130 – Discrete Structures 35 Derivation Rules

• Formal logic system that is: – correct: only valid arguments should be provable – complete: every valid argument should be provable – minimum: to make the formal system manageable

• Derivation rules for Propositional Logic – Equivalence rules: allows individual wffs to be replaced – rules: allows new wffs to be derived from previous wffs

CS 130 – Discrete Structures 36 Equivalence Rules

• These rules state that certain pairs of wffs are equivalent, hence one can be substituted for the other with no change to its truth values. • Allows substitution in either direction

Expression Equivalent to Name/Abbreviation R V S S V R communicative / comm R Λ S S Λ R (R V S) V Q R V (S V Q) associative / ass (R Λ S) Λ Q R Λ (S Λ Q) (R V S)’ R’ Λ S’ De Morgan’s laws / (R Λ S)’ R’ V S’ De Morgan R  S R’ V S implication / imp R (R’)’ double / dn R  S (RS) Λ (SR) equivalence / equ

CS 130 – Discrete Structures 37 Examples

• Assume we have the following hypotheses, we can start a proof sequence as follows: 1. (A’ V B’) V C hyp (hypothesis) 2. (A Λ B)’ V C 1, De Morgan 3. (A Λ B)  C 2, imp

CS 130 – Discrete Structures 38 Inference Rules

• Inference rules allow us to add a wff to match the last part of the proof sequence, if one or more wffs that match the first part already exist in the proof sequence From Can Derive Abbreviation for rule R, R  S S - mp R  S, S’ R’ - mt

R, S R Λ S Conjunction-con

R Λ S R, S Simplification- sim R R V S Addition- add • Note: Inference rules do NOT work in both directions unlike equivalence rules • Example: – R: It’s bright and sunny today. S: I’ll wear my sunglass. – mp, mt

CS 130 – Discrete Structures 39 General Process in Proving a Valid Argument

• First, write down all the hypotheses • Then use the inference and equivalence rules to get to the conclusion step by step • The idea is to keep focused on the result and sometimes it is very easy to go down a longer path

CS 130 – Discrete Structures 40 Examples

• Use propositional logic, prove that the following arguments are valid: – A Λ (B  C) Λ [(A Λ B)  (D V C’)] Λ B  D

• Your turn – [(A V B’)  C] Λ (C  D) Λ A  D

CS 130 – Discrete Structures 41 Derivation Hints

• MP is the most intuitive inference rule. Try to use it more often.

• Wffs of the form (P ^ Q)’ or (P v Q)’ are seldom helpful in a proof sequence. Try to use De Morgan’s laws.

• Wffs of the form P v Q are also seldom helpful, try using to convert it into implication.

CS 130 – Discrete Structures 42 Deduction Method

• To prove an argument of the form:

– P1 Λ P2 Λ ... Λ Pn  (R  Q) • Deduction method allows for the use of R as an additional hypothesis and prove:

– P1 Λ P2 Λ ... Λ Pn Λ R  Q • Example: prove [A (A B)] (A B) • Example, prove (A  B) Λ (B  C)  (A  C) • The above is called rule of Hypothetical or hs in short • Many such other rules can be derived from existing rules which thus provide an easier and faster proofs

CS 130 – Discrete Structures 43 More Inference Rules (See Exercise 1.2)

From Can Derive Name / Abbreviation P  Q, Q  R P  R - hs

P V Q, P´ Q - ds

P  Q Q´  P´ - cont

Q´  P´ P  Q Contraposition- cont

P P Λ P Self-reference - self

P V P P Self-reference - self

(P Λ Q)  R P  (Q R) Exportation - exp

P, P´ Q Inconsistency - inc

P Λ (Q V R) (P Λ Q) V (P Λ R) Distributive - dist

P V (Q Λ R) (P V Q) Λ (P V R) Distributive - dist

CS 130 – Discrete Structures 44 Proofs of Inference Rules

• Prove that (P  Q)  (Q´ P´) is a valid argument (Contraposition – con) • Hence prove, (P  Q) Λ Q´  P´ (using deduction method) • The above is true using the modus tollens inference rule • Prove P Λ P´  Q (Inconsistency -- inc) 1. P hyp 2. P´ hyp 3. P V Q 1, add 4. Q V P 3, comm 5. (Q´)´ V P 4, dn 6. Q´  P 5, imp 7. (Q´)´ 2, 6, mt 8. Q 7, dn

CS 130 – Discrete Structures 45 Proofs Using New Rules

• (A’ V B) Λ (B  C)  (A  C)

• Additional rules can shorten proof sequences but at the expense of having to remember additional rules.

• Your turn: – (A  B) ^ (C’ v A) ^ C  B – (A Λ B)’ Λ (C’ Λ A)’ Λ (C Λ B’)’  A’ – A ^ (B  C)  (B  (A ^ C)) – [A  (B v C)] ^ B’ ^ C’  A’

CS 130 – Discrete Structures 46 Proving Verbal Arguments

• An argument in English that consists of simple statements can be tested for by a two- step process: – Symbolize the argument using propositional wffs – Prove that the argument is valid by constructing a proof sequence for it using the derivation rules for propositional logic

CS 130 – Discrete Structures 47 Example In Proving Verbal Arguments

• Russia was a superior power, and either France was not strong or Napoleon made an error. Napoleon did not make an error, but if the army did not fail, then France was strong. Hence the army failed and Russia was a superior power.

• Converting it to a propostional form using letters A, B, C and D – A : Russia was a superior power – B: France was strong – B’ : France was not strong – C: Napoleon made an error – C’ : Napoleon did not make an error – D: The army failed – D’ : The army did not fail

CS 130 – Discrete Structures 48 Continue…

• Combining, the statements using logic – A Λ (B´ V C) hypothesis – C´ hypothesis – (D´  B) hypothesis – (D Λ A) conclusion

• Combining them, the propositional form is • A Λ (B´ V C) Λ C´ Λ (D´  B)  (D Λ A) • Prove it

CS 130 – Discrete Structures 49 Exercises

• Prove the following arguments: – (A’  B’) Λ (A  C)  (B  C) – (Y  Z’) Λ (X’  Y) Λ [Y  (X  W)] Λ (Y  Z)  (Y  W) – [A (B C)] [B (A C)] – P ^ (Q V R)  (P ^ Q) V (P ^ R)

– If the program is efficient, it executes quickly. Either the program is efficient, or it has a bug. However, the program does not execute quickly. Therefore it has a bug. (Use letters E, Q, B) – The crop is good, but there is not enough water. If there is a lot of rain or not a lot of sun, then there is enough water. Therefore the crop is good and there is a lot of sun. (Use letters C, W, R, S)

CS 130 – Discrete Structures 50 Prove the following arguments

• If the program is efficient, it executes quickly. Either the program is efficient, or it has a bug. However, the program does not execute quickly. Therefore it has a bug. (Use letters E, Q, B) – E: the program is efficient – Q: the program executes quickly – B: the program has a bug – (E->Q) ^ (E’->B) ^ Q’ -> B

CS 130 – Discrete Structures 51 Prove the following argument

• The crop is good, but there is not enough water. If there is a lot of rain or not a lot of sun, then there is enough water. Therefore the crop is good and there is a lot of sun. (Use letters C, W, R, S) – C: the crop is good – W: there is enough water – R: there is a lot of rain – S: there is a lot of sun – C ^ W’ ^ ((R V S’) -> W) -> C ^ S

CS 130 – Discrete Structures 52 More Exercises

• Write down the propositional form of the following argument: – If my client is guilty, then the knife was in the drawer. Either the knife was not in the drawer or Jason Pritchard saw the knife. If the knife was not there on October 10, it follows that Jason Pritchard didn’t see the knife. Furthermore, if the knife was there on October 10, then the knife was in the drawer and also the hammer was in the barn. But we all know that the hammer was not in the barn. Therefore, ladies and gentlemen of the jury, my client is innocent.

CS 130 – Discrete Structures 53