=========================================================================== CSC 165H Lecture Summary for Week 3 Winter 2003/4 =========================================================================== -------------------------------- Implication in everyday language -------------------------------- The following are various ways of saying P implies Q in everyday language: [Venn diagram for implication: two intersecting sets for P and Q, with P /\ ~ Q crossed out.] - If P, [then] Q. - When[ever] P, [then] Q. Whenever the robot detects an obstacle, it turns. The robot turns whenever it detects an obstacle. - P is sufficient / enough for Q. Catching IOException is sufficient for a method to catch all EOFExceptions. To catch all EOFExceptions, it is enough to catch IOException. - Can't have P without Q. An object can't be referred to as a Queue without its class implementing Queue. - P requires Q. Using cutting-edge Computer Science requires understanding mathematics. - For P to be true, Q must be true / needs to be true / is necessary. To pass CSC148, it is necessary to get at least 40% on the exam. A student needs to get 40% on the exam to pass CSC148. - P only if / when Q. Canada will join a US-led war on Iraq only if the action is sanctioned by the UN. Only when the action is sanctioned by the UN will Canada join a US-led war on Iraq. Summary: P: if, when, enough, sufficient. Q: then, required, must, need, necessary, only if / when. ----------- Equivalence ----------- Consider: Every male employee makes between 35000 and 55000. Is it true? Is its converse true? [Venn diagrams: cross out L /\ ~M, M /\ ~L.] The two properties describe the same set of employees; they are called "equivalent". (Think of the converse as "completing" the equivalence.) Equivalence often phrased using "if and only if": An employee is male if and only if the employee makes between 35000 and 55000. This contains two statements: An employee is male if the employee makes between 35000 and 55000. An employee is male only if he makes between 35000 and 55000. Other everyday language forms for equivalence are: - P iff Q ("iff" is abbreviation of "if and only if") - P is necessary and sufficient for Q - P -> Q, and conversely (These all include both implications "P -> Q" and "Q -> P" explicitly.) - P exactly / precisely when Q (e.g., x^2 + 4x + 4 = 0 precisely when x = -2). (This form is getting at the `sameness' of P and Q.) Symbolically, equivalence is written using "<->". So each statement above is written: P <-> Q. For example: An employee is male <-> the employee makes between 35000 and 55000. Consider the following: (2) Only male employees make less than 55000. It is the converse of: (1) If an employee is male, he makes less than 55000. We can view it as a claim about the non-male employees: (2a) Every non-male employee doesn't make less than 55000. This is just the contrapositive of (2). In general, the contrapositive of the converse of P -> Q is ~P -> ~Q. Useful way of thinking: "P -> Q" tells us about Ps, converse "Q -> P" tells us about ~Ps (since equivalent to "~P -> ~Q"). And "P <-> Q" is viewed as: "P -> Q and ~P -> ~Q". Everyday language: people often confuse (sometimes on purpose) an implication and its converse: If you are a criminal you have something to hide. Suppose you have something to hide. Then you are a criminal. -------------------------------- More on universal quantification -------------------------------- Recall that we considered (3) If an employee is male then he makes less than 55K. to be the universally quantified statement: Every male employee makes less than 55K. What sentence is being universally quantified? (4) If the employee is male then he makes less than 55K. In everyday language, the indefinite article "a" or "an" often signals a quantified statement, the definite article "the" often signals an open sentence. In symbolic notation: Let E = the set of employees. Let L(e) = e makes less than 55K. Let M(e) = e is male. (5) \-/ e in E, M(e) -> L(e). [What about \-/ m in M, L(m)? Domain is usually the largest universe where the predicate makes sense. Restricting ourselves to just males doesn't allow reasoning about non-males.] We're led to checking: If Anya is male then Anya makes less than 55K. If Buffy is male then Buffy makes less than 55K. ... If Xander is male then Xander makes less than 55K. Anyone uncomfortable saying that some of these are true? Implication statements can seem strange, especially when causality is involved. For example: (5) If it rained on Dec 25th 2002, then there were no clouds. Do you consider (5) true, false, or something else? What if you know it didn't rain that day. Is (6) true? Implication "P -> Q" false exactly when P is true and Q is false, true at all other times. -------------- Vacuously true -------------- Consider (for real numbers x only): If x^2 - 2x + 2 = 0 then x != 3. Is it true? Consider the contrapositive. There are actually no x's such that x^2 + 2x + 2 = 0. But we want to allow the reasoning that leads to the above statement, so we consider the statement true. This is sometimes called "vacuously true". In general, if there are no Ps we consider P -> Q true (regardless of whether there are any Qs). Notice that if there are no Ps then there can be no counterexample. What does this mean for the claim: All employees making over 60K are male? This claim is considered true (although you may consider it misleading!).