Chapter 1 Elementary Logic
Total Page:16
File Type:pdf, Size:1020Kb
Principles of Mathematics (Math 2450) A®Ë@ Õæ Aë áÖ ß @.X.@ 2017-2018 ÈðB@ É®Ë@ Chapter 1 Elementary Logic The study of logic is the study of the principles and methods used in distinguishing valid argu- ments from those that are not valid. The aim of this chapter is to help the student to understand the principles and methods used in each step of a proof. The starting point in logic is the term statement (or proposition) which is used in a technical sense. We introduce a minimal amount of mathematical logic which lies behind the concept of proof. In mathematics and computer science, as well as in many places in everyday life, we face the problem of determining whether something is true or not. Often the decision is easy. If we were to say that 2 + 3 = 4, most people would immediately say that the statement was false. If we were to say 2 + 2 = 4, then undoubtedly the response would be \of course" or \everybody knows that". However, many statements are not so clear. A statement such as \the sum of the first n odd integers is equal to n2" in addition to meeting with a good deal of consternation, might be greeted with a response of \Is that really true?" or \why?" This natural response lies behind one of the most important concepts of mathematics, that of proof. 1.1 Statements and their connectives When we prove theorems in mathematics, we are demonstrating the truth of certain statements. We therefore need to start our discussion of logic with a look at statements, and at how we recognize certain statements as true or false. Definition. (Statement) QKQ®K, éJ ¯ A statement is a declarative sentence that is either true or false. Remark. A statement is also called a proposition. Example 1. The following sentences are statements (a) Gaza is a Palestinian city. (b)2 − 1 equals 3. (c) The equation x2 + 1 = 0 has two real solutions. (d) IUG is a Palestinian university. (e) Earth is the closest planet to the sun. Example 2. The following sentences are NOT statements (a) How are you? 1 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ (b) Gaza is a beautiful city. (c) The sky is reach. (d) 4+1. (e) I will come to school next week. (f) Would you visit us tomorrow. (g) He lives in Gaza. (h) x2 = 9. Remark. Commends, questions, and opinions are not statements. Compound statements The statements in Example 1 are simple statements since they do not include any logical connective. A compound statement is statement that has at least one logical connective. Example 1. The following sentences are compound statements (a) Gaza is a Palestinian city and Palestine is an arabic country. (b)2 − 1 equals 3 or 7 is divisible by 2. (c) If 5 is an integer, then 5 is a real number. (d) 2 divides 6 if and only if 2 × 3 = 6. (e) π is not a rational number. Notation. We will denote simple statements by lowercase letters p; q; r; ::: and we will denote com- pound statements by uppercase letters P; Q; R; :::. Fundamental connectives To form new compound statements out of old ones we use the following five fundamental connectives: 1. \not" symbolized by ∼. 2. \and" symbolized by ^. 3. \or" symbolized by _. 4. \If..., then ..." symbolized by −!. 5. \...if and only if ..." symbolized by !. 2018-2017 ÈðB@ É®Ë@ Page 2 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ Truth tables( ) YË@ Èð@Yg. A truth table is a mathematical table used in logic which determines the truth values of a compound statement form for all logical possibilities of its components. A truth table has one column for each component and one final column for the compound statement. Each row of the truth table contains one possible truth value for each component and the result of the logical operation for those values. We will use "T" for true and "F" for false. Negation Definition. (Negation) The connective ∼ is called the negation and it may be placed before any statement p to form a compound statement ∼ p (read: not p or the negation of p). The truth values for ∼ p are defined as follows: p ∼ p T F F T Example. Write the negation of each of the following: p (a) 2 is a rational number. (b) The sine function is continuous at x = 0. (c) 2 divides 6. Solution. Conjunction Definition. (Conjunction) The connective ^ is called the conjunction and it may be placed between any two statements p and q to form a compound statement p ^ q (read: p and q or conjunction of p and q). The truth values for p ^ q are defined as follows: p q p ^ q T T T T F F F T F F F F 2018-2017 ÈðB@ É®Ë@ Page 3 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ Remarks. (1) The statement p ^ q is true only when both p and q are true. (2) In a compound statement with two components p and q there are 2 × 2 = 4 possibilities, called the logical possibilities. In general, if a compound statement has n components, then there are 2n logical possibilities. Example 1. Indicate which of the following statements is T and which is F: (a) 1 + 1 = 2 and 3 − 1 = 2. (b) 5 is an integer and 1 − 3 = 1. (c) 5 − 0 = 4 and 5 − 1 = 4. (d) 5 × 2 = 5 and 5 × 3 = 10. Solution. Example 2. Construct a truth table for the compound statement p ^ (∼ q). Solution. Remark. The English words but, while, and although are usually translated symbolically with the conjunction connective, because they have the same meaning as and. Example. Translate the following statement into logical form using connectives: \8 is divisible by 2 but it is not divisible by 3." Solution. Exercise 1.1 (1-24) 2018-2017 ÈðB@ É®Ë@ Page 4 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ 1.2 Three more connectives In this section we will study the connectives \or", \If..., then ...", and \...if and only if ...". Disjunction In English language there is an ambiguity involved in the use of \or". Inclusive or: The statement \I will get a Master degree or a Ph.D" indicate that the speaker will get both the Master degree and the Ph. D. Exclusive or: But in the statement \I will study mathematics or physics " means that only one of the two fields will be chosen. In mathematics and logic we can not allow ambiguity. Hence we must decide on the meaning of the word \or". Definition. (Disjunction) The connective _ is called the disjunction and it may be placed between any two statements p and q to form the compound statement p _ q (read: p or q or the disjunction of p and q). The truth values for p _ q are defined as follows: p q p _ q T T T T F T F T T F F F Remark. The statement p _ q is true when at least one of p and q is true. Example 1. Indicate which of the following statements is T and which is F: (a) 1 − 1 = 1 or 3 + 3 = 6. (b) 4 = 4 or 4 > 4. p (c) −1 = 2 or (2)2 = −1. (d) 7 is a prime number or 7 is an odd number. Solution. Example 2. Construct the truth table for the compound statement ∼ [p _ (∼ q)]. Solution. 2018-2017 ÈðB@ É®Ë@ Page 5 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ Definition. (Equivalent statements) Two statements P and Q, simple or compound, are said to be ( logically) equivalent if P and Q have the same truth values in each of all the logical possibilities. In such case we write P ≡ Q. Example. Show that ∼ [p _ (∼ q)] ≡∼ p ^ q. Solution. Exercise. Show that ∼ [p _ q] ≡ (∼ p) ^ (∼ q) and ∼ [p ^ q] ≡ (∼ p) _ (∼ q). Conditional Definition. (Conditional) The connective ! is called the conditional and it may be placed between any two statements p and q to form the compound statement p ! q (read: if p then q). The statement p ! q is defined to be equivalent to the statement ∼ [p ^ (∼ q)]. The truth values of p ! q The truth values of p ! q are given by the following table p q p ! q T T T T F F F T T F F T Remarks. (1) The statement p ! q is false only when p is true and q is false. (2) In a conditional statement p ! q, p is called the antecedent or sufficient condition and q is called the consequent or necessary condition. Example 1. Determine whether the following statements are T or F: (a) If 2 − 4 = 2, then 2 − 2 = 4: 2018-2017 ÈðB@ É®Ë@ Page 6 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ (b) If 7 < 9, then 7 < 8. (c) If 3 > 3, then 4 > 3. (d) If 5 < 6, then 5 is even. Solution. Example 2. Construct the truth table for the compound statement (p _ q) ! r. Solution. Example 3. Write the following conditional statement as a conjunction: \If 3 + 2 = 5, then 5 − 2 = 3:" Solution. Example 4. Is the statement p ! q equivalent to the statement ∼ q →∼ p? Explain. Solution. 2018-2017 ÈðB@ É®Ë@ Page 7 of 39 Principles of Mathematics (Math 2450) A®Ë@ áÖ ß @.X.@ Remark.