WUCT121. Discrete Mathematics. Logic
|
|
- Vanessa McGee
- 6 years ago
- Views:
Transcription
1 WUCT11 Discrete Mathematics Logic 1. Logic. Predicate Logic 3. Proofs 4. Set Theor 5. Relations and Functions WUCT11 Logic 1
2 Section 1. Logic 1.1. Introduction. In developing a mathematical theor, assertions or statements are made. These statements are made in the form of sentences using words and mathematical smbols. When proving a theor, a mathematician uses a sstem of logic. This is also the case when developing an algorithm for a program or sstem of programs in computer science. The sstem of logic is applied to decide if a statement follows from, or is a logical consequence of, one or more other statements. You are familiar with using numbers in arithmetic and smbols in algebra. You are also familiar with the rules of arithmetic and algebra. Eamples: Associativit Distributivit WUCT11 Logic
3 In a similar wa, Logic deals with statements or sentences b defining smbols and establishing rules. Roughl speaking, in arithmetic an operation is a rule for producing new numbers from a pair of given numbers, like addition + or multiplication. In logic, we form new statements b combining short statements using connectives, like the words and, or. Eamples: This room is hot and I am tired. < 1 or > Statements Definition Definition: Statement. A statement or proposition is an assertion or declarative sentence which is true or false, but not both. The truth value of a mathematical statement can be determined b application of known rules, aioms and laws of mathematics. WUCT11 Logic 3
4 A statement which is true requires a proof. Eamples: Is the following statement True or False? For a real number, if 1, then 1 or 1. The statement is TRUE. Therefore, we must prove it. Consider 1. Adding 1 to both sides gives 1 0. Factorising this equation, we have Therefore, 1 0 or Case 1: 1 0. Add 1 to both sides and we have 1. Case : Add 1 to both sides and we have 1.. WUCT11 Logic 4
5 A statement which is false requires a demonstration. Eample: Is the following statement True or False? The statement is FALSE. Therefore, we must demonstrate it WUCT11 Logic 5
6 Eercise: Determine which of the following sentences are statements. For those which are statements, determine their truth value. i Statement True ii It is hot and sunn outside. Statement iii Statement False iv Is it raining? v Go awa! vi There eists an even prime number. vii There are si people in this room. viii For some real number,, < Not a statement Not a statement Statement Statement Statement True True i < See comment in notes + + See comment in notes WUCT11 Logic 6
7 Strictl speaking, as we don t know what or are, in parts i and, these should not be statements. In Mathematics, and usuall represent real numbers and we will assume this is the case here. Therefore, i is either true or false even if we don t know which and is alwas true, so we will allow both Simple Statements Definition: Simple Statement. A simple or primitive statement is a statement which cannot be broken down into anthing simpler. A simple statement is denoted b use of letters p, q, r... Eamples: p: There are seven das in a week p is a simple statement p : p is a simple statement WUCT11 Logic 7
8 1..3. Compound Statements Definition: Compound Statement. A compound or composite statement is a statement which is comprised of simple statements and logical operations. A compound statement is denoted b use of letters P, Q, R... Eamples: P: There are seven das in a week and twelve months in a ear. Is a compound statement. p: There are seven das in a week q: There twelve months in a ear Operation: and P: or Is a compound statement. p: q: Operation: or WUCT11 Logic 8
9 P: If it is not raining then I will go outside and eat m lunch. Is a compound statement p: It is raining q: I will go outside r: I will eat m lunch Negation of p Operations: If then, and WUCT11 Logic 9
10 Eercises: Determine which of the following are simple statements, and which are not. For those which are not, identif the simple statements used. Simple Statement Operation i is a simple Statement ii It is hot and sunn outside. p: It is hot q: It is sunn outside and iii p: negation iv p: < q: v 5 < < p: 5 < q: < or and vi If I stud hard then I will pass m eam p: I stud hard q: I will pass m eam If..then WUCT11 Logic 10
11 1.3. Truth Tables A statement P can hold one of two truth values, true or false. These are denoted T and F respectivel. Note: Some books ma use 1 for true and 0 for false. When determining the truth value of a compound statement all possible combinations of the truth values of the statements comprising it must be considered. This is done sstematicall b the use of truth tables. Each connective is defined b its own unique truth table. There are five fundamental truth tables which will be covered in the following sections Truth Table Construction To construct a truth table assign each statement a column. The number of rows in the table is determined b the number of statements. For n statements, required. n rows will be Sstematicall assign truth vales to each of the statements, beginning in the first column. WUCT11 Logic 11
12 Once all possible truth values for the simple statements are inserted, determine the truth vales of the compound statements following the rules for the operations. Eample: Given three statements P, Q, R. The table setup is: P Q R Compound Statement T T T T T F T F T T F F F T T F T F F F T F F F WUCT11 Logic 1
13 1.4. Logical Operations There are five main operations which when applied to a statement will return a statement. If P and Q are statements, the five primar operations used are: not P, the negation of P. P or Q, the disjunction of P and Q. P and Q, the conjunction of P and Q. P implies Q, the conditional of P and Q. P if and onl if Q, the biconditional of P and Q Negation, not Definition: Statement Negation. If P is a statement, the negation of P is not P or it is not the case that P and is denoted ~P. WUCT11 Logic 13
14 Eamples: There are not seven das in a week p: There are seven das in a week P: It is raining outside. ~P: ~It is raining outside. It is not raining outside. Q: > or < ~Q: ~ > or < Simplified:. Eercises: For each statement P, write down ~P. P: Discrete Maths is interesting. ~P: ~ Discrete Maths is interesting Discrete Maths is not interesting. P 1 0 ~ P : ~ WUCT11 Logic 14
15 Truth Table for Negation The negation of P has the opposite truth value from P, ~P is false when P is true; ~P is true when P is false. P ~P All possible truth values for P T F F T All possible truth values for ~P depending on the value of P. Eample: Write down the truth value of the following statements. P ~P T This room is empt F F This room is not empt T WUCT11 Logic 15
16 Eercise: Write down the truth value of the following statements. P ~P 1 1 T Division is a closed operation on F F Division is not a closed operation on T Note: The truth table for negation tells us that for an statement P, eactl one of P or ~P is true. So, to prove P is true, we have two methods: Direct: Start with some facts and end up proving P in a direct step-b-step manner. prove that ~P is false. Indirect: Don t prove P is true directl, but Generall, brackets are left out around ~ P. Thus, ~ P Q means ~ P Q, and not ~ P Q. This is similar to arithmetic where and not +. + means + WUCT11 Logic 16
17 1.4.. Disjunction, or Definition: Disjunction. If P and Q are statements the disjunction of P and Q is P or Q, denoted P Q. Eamples: Given P : + 3 5, Q : + 3 6, write down P Q. P Q : + 3 5or alternativel : simplified : or 6 6 Write P : 5 using. < 5 5 Eercises: Write the following statements using I am catching the bus or train home. I am catching the bus home I am catching the train home A month has 30 or 31 das. A month has 30 das A month has 31 das WUCT11 Logic 17
18 For the statements P and Q, write down P Q. P : > 0 Q : 0 P Q : simplified : > P: is the square of an integer, Q: is prime is the square of an integer is prime P Q : Truth Table for Disjunction The disjunction of P and Q is true when either P is true, or Q is true, or both P and Q are true; it is false onl when both P and Q are false. P Q P Q T T T T F T F T T F F F WUCT11 Logic 18
19 Eample: Write down the truth value of the following statements. P Q P Q T F T 1 0 F F F Eercise: Write down the truth value of the following statements. P Q P Q > T T T is odd 5 is odd F T T < 1 This room is empt F F F WUCT11 Logic 19
20 Conjunction, and Definition: Conjunction. If P and Q are statements the conjunction of P and Q is P and Q, denoted Eamples: P Q. Given P: It is hot, Q: It is sunn, write down P Q. P Q : It is hot It is sunn Simplified: It is hot and sunn Write P : 0 < < 5 using. 0 < < 5 Eercises: Write the following statements using Snow is cold and wet. Snow is cold Snow is wet numbers. Natural numbers are positive and whole Natural numbers are positive numbers Natural numbers are whole numbers WUCT11 Logic 0
21 For the statements P and Q, write down P Q. P : > 0 Q : < 1 P Q : simplified : > 0 < 1 0 < < 1 P P: is even, Q: is a natural number is even is a natural number Q : Truth Table for Conjunction The conjunction of P and Q is true when, and onl when, both P and Q are true. If either P or Q are false, of if both are false, P Q P Q T T T T F F F T F F F F P Q is false. WUCT11 Logic 1
22 Eample: Write down the truth value of the following statements. P Q P Q T F F 1 0 F F F Eercise: Write down the truth value of the following statements. P Q P Q > 1 6 > π T T T is odd 5 is odd F T F < F F F WUCT11 Logic
23 Conditional, If then, implies Definition: Conditional. If P and Q are statements the conditional of P b Q is If P then Q or P implies Q, and is denoted Eamples: P Q. Given P: It is raining, Q: I will go home, write down P Q. P Q : It is raining I will go home Simplified: If it raining then I will go home Write If is even then is even using. is even Eercises: is even Write the following statements using If the snow is good then I will go skiing. The snow is good I will go skiing If is a natural number then is an integer. is a natural number is an integer WUCT11 Logic 3
24 For the statements P and Q, write down P Q. P : > 1 Q : > 0 P > 1 0 Q : > P: is even, Q: is a natural number P Q : is even is a natural number If is even then is a natural number Truth Table for Conditional The conditional of P b Q is false when P is true and Q false, otherwise it is true. We call P the hpothesis or antecedent of the conditional and Q the conclusion or consequent. In determining the truth values for conditional, consider the following eample. Suppose our lecturer sa to ou: If ou arrive for the lecture on time, then I will mark ou present. Under what circumstances are ou justified in saing the lecturer lied? In other words under what circumstances is the above statement false? WUCT11 Logic 4
25 It is false when ou show up on time and are not marked present. The lecturers promise onl sas ou will be marked present if a certain condition arriving on time is met; it sas nothing about what will happen if the condition is not met. So if the condition arriving on time is not met, ou cannot in fairness sa the promise is false regardless of whether or not ou are marked present. This eample demonstrates that the onl combination of circumstances in which ou have a conditional statement false is when the hpothesis is true and the conclusion is false. Thus the truth table for conditional is: P Q P Q T T T T F F F T T F F T WUCT11 Logic 5
26 Eample: Write down the truth value of the following statements. P Q P Q T F F 1 0 Eercise: F F T Write down the truth value of the following statements. P Q P Q > 1 > 1 T T T is even 5 is even T F F < 1 4 < 1 F F T WUCT11 Logic 6
27 Alternative wording for P Q can be: If P then Q. P implies Q. Q if P. Q provided P. Q whenever P. P is a sufficient condition for Q. Q is a necessar condition for P. P onl if Q. WUCT11 Logic 7
28 Biconditional, If and onl if Definition: Biconditional. If P and Q are statements the biconditional of P and Q is P if, and onl if Q and is denoted P Q. Eamples: Given P: Mark can stud algebra, Q: Mark passes pre-algebra, write down P Q. P Q : Mark can stud algebra Mark passes pre-algebra Simplified: Mark can stud algebra if, and onl if, he passes pre-algebra Write Water boils if, and onl if, it s temperature is over 100 o C using. o Water boils Water temperature is over 100 C Eercises: Write the following statements using warm. I will go swimming if, and onl if, the water is I will go swimming The water is warm WUCT11 Logic 8
29 integer. is a natural number if, and onl if, is an is a natural number is an integer For the statements P and Q, write down P Q. P : Q : > 0 P Q : > 0 P P: is positive, Q: is a natural number is positive is a natural number Q : Truth Table for Biconditional The biconditional of P and Q is true if both P and Q have the same truth value, and is false if P and Q have opposite truth values. P Q P Q T T T T F F F T F F F T WUCT11 Logic 9
30 Eample: Write down the truth value of the following statements. P Q P Q T F F 1 0 Eercise: F F T Write down the truth value of the following statements. P Q P Q > 1 > 1 T T T is odd 5 is odd F T F < 1 4 < 1 F F T WUCT11 Logic 30
31 Alternative wording for P Q can be: P if, and onl if Q. P iff Q. P implies and is implied b Q. P is equivalent to Q. P is a necessar and sufficient condition for Q. WUCT11 Logic 31
32 Order of Operation for Logical Operators. The order of operation for logical operators is as follows: 1. Evaluate negations first. Evaluate and second. When both are present, parenthesis ma be needed, otherwise work left to right. 3. Evaluate and third. When both are present, parenthesis ma be needed, otherwise work left to right. Note: Use of parenthesis will determine order of operations which over ride the above order. Eamples: Indicate the order of operations in the following: ~ { { q 1 p { p { q { r ~ 1 3 { p { q ~ 1 ~ { { q { r p 1 3 Eercises: Indicate the order of operations in the following: ~ { { q { r p 1 3 { p { q ~ 1 ~ { { q { r p 1 3 ~ { { q { r p 1 3 WUCT11 Logic 3
33 Main Connective Definition: Main Connective. The main connective is the operation which binds the statement together. It is the final operation performed and is denoted with *. Eamples: Indicate the main connective in the following: ~ { { q p 1 * { p { q ~ * 1 { p { q { r ~ 1 3* ~ { { q { r p 1 3* Eercises: Indicate the main connective in the following: ~ { { q { r p 1 3* { p { q ~ * 1 ~ { { q { r p 1 3* ~ { { q { r p 1 3* WUCT11 Logic 33
34 Eample: Construct a truth table for ~ p ~ q, indicating order of operations and the main connective p q ~ p ~ q T T T F F T F F T T F T T F F F F T F T Step: 3* 1 Eercises: Construct a truth table for ~ p ~ q p, indicating order of operations and the main connective p q ~ p ~ q p T T F T F F T F F T T T F T T F F F F F T F T F Step: 1 3* 1 WUCT11 Logic 34
35 Construct a truth table for p q r q order of operations and the main connective, indicating p q r p q r q T T T T T T T T F T T T T F T T T T T F F T F F F T T T T T F T F T T T F F T F F T F F F F F F Step: 1 * 1 Construct a truth table for q r ~ p r ~, indicating order of operations and the main connective p q r ~ q r ~ p r T T T F F F F T T T F F F T T F T F T T T T F T T F F T F T T F F T T F F T T F F T F F F T T F F F T T T T T F F F F T F T T F Step: 1 3* 1 WUCT11 Logic 35
36 1.5. Tautologies and Contradictions Tautolog Definition: Tautolog. An statement that is true regardless of the truth values of the constituent parts is called a tautolog or tautological statement. Eamples: Complete the truth table for the statement P Q P P Q P Q P T T T T T F T T F T T F F F T T Step: * 1 WUCT11 Logic 36
37 Eercises: Complete the truth table for the statement P Q P Q to show it is a tautolog. P Q P Q P Q T T T T T T F F F T F T T F T F F T F T Step: 1 3* Complete the truth table for the statement P Q ~ Q ~ P to show it is a tautolog. P Q P Q ~Q ~ P T T T F F T F T F F F T T F F T T F F T T F F T T T T T Step: 3 1 4* 1 WUCT11 Logic 37
38 Quick Method for Showing a Tautolog In constructing a truth table for a compound statement comprised of n statements, there will be n combinations of truth values. This method can be long for large numbers of statements. We will consider a quicker method for determining if a compound statement is a tautolog. However, truth tables are reliable safe and are highl recommended if the quick method is confusing or leading nowhere! The quick method relies on the fact that if a truth value of F can occur under the main connective for some combination of truth values for the components, then the statement is not a tautolog. If this truth value is not possible, then we have a tautolog. Therefore, to determine whether a statement is a tautolog, we place an F under the main connective and work backwards. WUCT11 Logic 38
39 Eamples: Determine if P Q P is a tautolog, using the quick method P Q P Step * 1 1.Place F under main connective F. For F to occur under the main connective, P must be T and must be F T F 3. For F to occur under, Q must be T and P must be F T F P cannot be both T and F, thus P Q P ever be true and is a tautolog. can onl WUCT11 Logic 39
40 Determine if P Q R S is a tautolog, using the quick method P Q R S Step 1 3* 1.Place F under main F connective. For F to occur under the main connective, P Q must be T and R S must be F T F 3. For T to occur under P Q, P must be T and Q must be T T T 3. For F to occur under R S can be F, R can be T and S T F As there is a valid combination of truth values which gives F under the main connective, P Q R S tautolog. is not a WUCT11 Logic 40
41 Eercises: Use the quick method for the statement P Q P Q to determine if it is a tautolog. P Q P Q Step 1 3* 1. Place F under main connective. F. For F to occur under the main connective, must be T and Q must be F T F 3. For T to occur under, P must be T and be T P Q must T T 4. For T to occur under P Q,when P is T Q must be T T T Q cannot be both T and F, thus ever be true and is a tautolog. P Q P Q can onl WUCT11 Logic 41
42 Determine if the statement P Q ~ Q ~ P is a tautolog, using the quick method. P Q ~Q ~P Step: 3 1 4* 1 1.Place F under main connective F. For F to occur under the main connective, must be T and ~P must be F 3. For T to occur under, ~Q must be T and P Q must be T T T F T 4. For T to occur under P Q,when P is T, Q must be T T T At step, ~P is F, thus P is T. Step 3 shows ~Q is T thus Q is F and step 4 gives Q is T. Q cannot be both T and F, thus P Q ~ Q ~ P can onl ever be true and is a tautolog. WUCT11 Logic 4
43 1.5.. Contradiction Definition: Contradiction. An statement that is false regardless of the truth values of the constituent parts is called a contradiction or contradictor statement. Eamples: Complete the truth table for the statement ~ P Q Q P P Q ~ P Q Q P T T F T F T T F T F F F F T T F F F F F T F F F Step: 1 4* 3 WUCT11 Logic 43
44 Eercises: Complete the truth table for the statement ~ P Q P to show it is a contradiction. P Q ~P Q P T T F T F T F F T F F T F T F F F T F F Step: 1 3* Complete the truth table for the statement P Q ~ Q to show it is a contradiction. P Q P Q ~Q T T T F F T F F F T F T F F F F F F T T Step: 3* 1 WUCT11 Logic 44
45 Quick Method for Showing a Contradiction The quick method for determining if a compound statement is a tautolog can be used similarl for showing a contradiction. The quick method relies on the fact that if a truth value of T can occur under the main connective for some combination of truth values for the components, then the statement is not a contradiction. If this truth value is not possible, then we have a contradiction. Therefore, to determine whether a statement is a contradiction, we place a T under the main connective and work backwards. WUCT11 Logic 45
46 Eample: Use the quick method for the statement ~ P Q P to determine if it is a contradiction. ~ P Q P Step: 1 3* 1.Place T under main connective T. For T to occur under the main connective, ~ must be T and P must be T T T 3. For T to occur under ~, F. P Q must be F 4. For F to occur under P Q, P must be F and Q must be F F F P cannot be both T and F, thus ~ P Q P can onl ever be false and is a contradiction. WUCT11 Logic 46
47 Eercise: Use the quick method for the statement P Q ~ Q to determine if it is a contradiction. P Q ~Q Step: 3* 1 1.Place T under main connective. T. For T to occur under the main connective, P Q must be T and ~Q must be T T T 3. For T to occur under P Q, P must be T and Q must be T. T T At Step, ~Q is T, thus Q is F. Step 3 shows Q is T. Q cannot be both T and F, thus P Q ~ Q can onl ever be false and is a contradiction. WUCT11 Logic 47
48 Contingent Definition: Contingent. An statement that is neither a tautolog nor a contradiction is called a contingent or intermediate statement. Eamples: Complete the truth table for the statement Q Q P P Q Q Q P T T T T T F T T F T F F F F T T Step: * 1 WUCT11 Logic 48
49 Eercises: Complete the truth table for the statement p r p q to show it is contingent. p q r p r p q T T T T T T T T F T T T T F T T F F T F F T F F F T T T F F F T F F T F F F T T F F F F F F T F Step: 1 3* Complete the truth table for the statement p ~ q r r q ~ to show it is contingent. p q r ~ p ~ q r r q T T T F F F T F T T T F T F F F T T T F T F T T T T F T F F F T T T F T F T T F F F T F T F T F T F F F T T F F T F F T T T F F F F T F T F T T Step: * 5 WUCT11 Logic 49
50 1.6. Logical Equivalence Definition: Logical Equivalence. Two statements are logicall equivalent if, and onl if, the have identical truth values for each possible substitution of statements for their statements variables. The logical equivalence of two statements P and Q is denoted P Q. If two statements P and Q are logicall equivalent then P Q is a tautolog Determining Logical Equivalence. To determine if two statements P and Q are logicall equivalent, construct a full truth table for each statement. If their truth values at the main connective are identical, the statements are equivalent. Alternativel show conclude P Q. P Q is a tautolog and hence WUCT11 Logic 50
51 Eamples: Determine if the following statements are logicall equivalent. P : p q, Q :~ p q p q p q ~p q T T T F T T F F F F F T T T T F F T T T Step: 1* 1 * Since the main connectives * are identical, the statements P and Q are equivalent. Thus P Q i.e. p q ~ p q Determine if the following statements are logicall equivalent. P :~ p q, Q :~ p ~ q p q ~ p q ~p ~q T T F T F F F T F T F F F T F T T F T F F F F T F T T T Step: * 1 1 * 1 Since the main connectives * are not identical, the statements P and Q are not equivalent. WUCT11 Logic 51
52 Eercises: Determine if the following statements are logicall equivalent. P :~ p q, Q :~ p ~ q p q ~ p q ~p ~q T T F T F F F T F F T F F T F T F T T F F F F T F T T T Step: * 1 1 * 1 Since the main connectives are identical, the statements P and Q are equivalent. Thus P Q i.e. ~ p q ~ p ~ q Determine if ~ p q ~ p ~ q is a tautolog, and hence if ~ p q ~ p ~ q. p q ~ p q ~p ~q T T F T T F F F T F T F T F T T F T T F T T T F F F T F T T T T Step: * 1 3* 1 * 1 Since the main connective is all T, the statement ~ p q ~ p ~ q is a tautolog, and hence ~ p q ~ p ~ q. WUCT11 Logic 5
53 1.6.. Substitution There are two different tpes of substitution into statements. Rule of Substitution: If in a tautolog all occurrences of a variable are replaced b a statement, the result is still a tautolog. Eamples: We know P ~ P is a tautolog. Thus, b the rule of substitution, so too are: Q ~ Q, b letting Q P. p q r ~ p q r, b letting p q r P. Note: We have simpl replaced ever occurrence of P in the tautolog P ~ P, b some other statement. WUCT11 Logic 53
54 Rule of Substitution of Equivalence: If in a tautolog we replace an part of a statement b a statement equivalent to that part, the result is still a tautolog. Eample: Determine if P ~ Q P is a tautolog. We know: P Q P is a tautolog and P Q ~ P Q B the rule of substitution Q P ~ Q P Thus, b the rule of substitution of equivalence, P Q P P ~ Q P, and hence P ~ Q P is also a tautolog. Eercise: ~ T ~ S T a tautolog? Yes. We know P Q ~ P Q. So, S T ~ S T and T ~ S T ~ T ~ S T b RoS. Hence, ~ T ~ S T T S T b SoE. P Q P is a known tautolog, thus b SoE T S T is a tautolog, and since ~ T ~ S T T S T, ~ T ~ S T is a tautolog. WUCT11 Logic 54
55 WUCT11 Logic Laws The following logical equivalences hold: 1. Commutative Laws: P Q Q P P Q Q P P Q Q P. Associative Laws: R Q P R Q P R Q P R Q P R Q P R Q P 3. Distributive Laws: R P Q P R Q P R P Q P R Q P 4. Double Negation Involution Law: P P ~~ 5. De Morgan s Laws: ~ ~ ~ ~ ~ ~ Q P Q P Q P Q P
56 WUCT11 Logic Implication Laws: Biconditional Implication ~ P Q Q P Q P Q P Q P 7. Identit Laws: P T P P F P 8. Negation Complement Laws: F P P T P P ~ ~ 9. Dominance Laws: F F P T T P 10. Idempotent Laws: P P P P P P 11. Absorption Laws: P Q P P P Q P P 1. Propert of Implication: R Q R P R Q P R P Q P R Q P
57 Eample: Prove the first of De Morgan s Laws using truth tables. P Q ~ P Q ~P ~Q T T F T F F F T F F T F F T F T F T T F F F F T F T T T Step: * 1 1 * 1 Since the main connectives are identical, the statements are equivalent., and first of De Morgan s Laws is true. Eercise: Prove the second of De Morgan s Laws using truth tables. P Q ~ P Q ~P ~Q T T F T F F F T F T F F T T F T T F T T F F F T F T T T Step: * 1 1 * 1 Since the main connectives are identical, the statements are equivalent, and second of De Morgan s Laws is true. WUCT11 Logic 57
58 Eample: Using logicall equivalent statements, without the direct use of truth tables, show: ~ ~ p q p q p ~ ~ p q p q ~ ~ p ~ q p q De Morgan p ~ q p q Double Negation p ~ q q Distributivit p q ~ q Commutativit p F Negation p Identit Eercises: Using logicall equivalent statements, without the direct use of truth tables, show: ~ p q p ~ q q ~ p ~ p q ~ p q q p Biconditional ~ p q ~ q p De Morgan ~ ~ p q ~ ~ q p Implication ~ ~ p ~ q ~ ~ q ~ p De Morgan p ~ q q ~ p Double Negation WUCT11 Logic 58
59 p q ~ q ~ p p q ~ p q Implication q ~ p Commutativit ~ ~ q ~ p Double Negation ~ q ~ p Implication p q r p q p r, without using the propert of implication p q r ~ ~ p p q r p q ~ p r q p r Implication Distributive Implication WUCT11 Logic 59
60 Section. Predicate Logic Discussion: In Maths we use variables usuall ranging over numbers in various was. How does differ in what it represents in the following statements? is real. 0 represents one value, 0 > represents some, but not all values + 0 represents all values represents no values Definition: Predicate A predicate is a sentence that contains one or more variables and becomes a statement when specific values are substituted for the variables. Definition: Domain The domain of a predicate variable consists of all values that ma be substituted in place of the variable WUCT11 Logic 60
61 Definition: Truth Set If P is a predicate and has domain D, the truth set of P is the set of all elements of D that make P true. The truth set is denoted { D : P } and is read the set of all in D such that P. Eamples: Let P be the predicate > domain the set of real numbers. with i.e. Write down P, P1, P and indicate which are true and which are false. Determine the truth set of P P : P1 : P : 1 > > 1 > or or or 4 > 1 > 1 4 > True False True { : > } { : < 0 > 1} Let Qn be the predicate n is factor of 8. Determine the truth set of Qn if 8 ± 1 ± 8, { n + 8 ± ± 4 + n :" n isa factor of 8"} {1,,4,8} WUCT11 Logic 61
62 Eercises: 3 Let P be the predicate > domain the set of integers,. with i.e. Write down P, P0, P and indicate which are true and which are false. Determine the truth set of P P : 3 > or 8 > True P0 : 0 3 > 0 or 0 > 0 False P : > or 8 > False { : 3 > } { : > 1} Let Qn be the predicate n is factor of 6. Determine the truth set of Qn if n 6 ± 1 ± 6, 6 ± ± 3 { n :" n isa factor of 6"} { ± 1, ±, ± 3, ± 6} WUCT11 Logic 6
63 .1. Quantifiers A wa to obtain statements from predicates is to add quantifiers. Quantifiers are words that refer to quantities such as all, ever, or some and tell for how man elements a given predicate is true Universal Quantifier The smbol denotes for all and is called the universal quantifier. Definition: Universal Statement Let P be a predicate and D the domain of. A universal statement is a statement of the form D, P. It is defined to be true if, and onl if, P is true for ever in D. It is defined to be false if, and onl if, P is false for at least one in D. A value of for which P is false is called a countereample to the universal statement. Eamples: Write the sentence All human beings are mortal using the universal quantifier. Let H be the set of human beings. h H,h is mortal WUCT11 Logic 63
64 Consider A {,, }. With A, P, the 1 following must hold: P P P 1 Thus there will be 3 predicates which must hold. Eercises: Write the following statements using the universal quantifier. Determine whether each statement is true or false. All dogs are animals Let D be the set of dogs and A the set of animals d D, d A. True The square of an real number is positive. >, False, consider 0, 0 u0. Hence the statement is false b countereample Ever integer is a rational number.,. True WUCT11 Logic 64
65 Eercises: Write the following statements in words. Determine whether each statement is true or false., The square root of an natural number is a natural number. False. Consider,. Hence the statement is false b countereample., 1. The square of an real number does not equal 1. True. WUCT11 Logic 65
66 .1.. Eistential Quantifier The smbol denotes there eists and is called the eistential quantifier. Definition: Eistential Statement Let P be a predicate and D the domain of. An eistential statement is a statement of the form D, P. It is defined to be true if, and onl if, P is true for at least one in D. It is defined to be false if, and onl if, P is false for all in D. Eamples: Write the sentence Some people are vegetarians using the eistential quantifier. Let H be the set of human beings. h H,h is a vegetarian Consider A {,, }. With A, P, the 1 following must hold: P P P Thus there will be 1 predicate which must hold WUCT11 Logic 66
67 Eercises: Write the following statements using the eistential quantifier. Determine whether each statement is true or false. Some cats are black Let C be the set of cats. c C,c is black. True There is a real number whose square is negative. <, 0.False. Some programs are structured. Let P be the set of programs. p P, p is structured. True WUCT11 Logic 67
68 Eercises: Write the following statements in words. Determine whether each statement is true or false. m, m m There is an integer whose square is equal to itself. True. Consider m 1, m 1 1 m. Hence the statement is true., 1. There is a real number whose square is 1. False. 1, The reciprocal of some integer is not rational. 1 1 True. Consider 0,. 0 Hence the statement is true. WUCT11 Logic 68
69 .1.3. Negation of Universal Statements Let P be a predicate and D the domain of. The negation of a universal statement of the form: D, P is logicall equivalent to D, ~ P Smbolicall ~ D, P D,~ P Eample: Write down the negation of the following statement., + 1 Negation: False. ~,,~, < WUCT11 Logic 69
70 WUCT11 Logic 70 Eercises: Write down the negation of the following statement. 0, Negation: 0, 0,~ 0, ~ < False. Write down the negation of the following statement. < , Negation: 1 1 0, 1 1 ~ 0, ~,~ 1 1 0,~ 1 1 0, ~ + < + < + < + < + True, choose 1.
71 Eample: Write the following statement using quantifiers. Find its negation and determine whether the statement or its negation is true, giving a brief reason.. Ever real number is either positive or negative. Statement:, < 0 > 0 Negation: ~, < 0 > 0, ~, ~,, 0 < 0 > 0 < 0 0 ~ > 0 0 The true statement is the negation because 0 is neither positive nor negative. WUCT11 Logic 71
72 Eercises: Write the following statement using quantifiers. Find the negation. The square of an integer is positive. > Statement:, 0 Negation: ~, > 0,~ > 0, 0 There is an integer whose square is not positive. The negation is true, choose 0. Write the following statement using quantifiers. Find the negation. All computer programs are finite. Let C be the set of computer programs Statement: C, is finite Negation: ~ C, is finite C, is not finite Not all computer programs are finite. Some computer programs are not finite. True? WUCT11 Logic 7
73 .1.4. Negation of Eistential Quantifiers Let P be a predicate and D the domain of. The negation of an eistential statement of the form: D, P is logicall equivalent to D, ~ P Smbolicall ~ D, P D,~ P Eample: Write down the negation of the following statement., Negation: ~,,~, The negation is true. WUCT11 Logic 73
74 Eercises: Write down the negation of the following statement. z, z is odd z Negation: is even ~ z, z is odd z is z,~ z is odd z even is even z,~ z is odd ~ z is even z, z is not odd z is not even The negation is false Write down the negation of the following statement. n, n is even n Negation: is prime ~ n, n is even n is prime n,~ n is even n is prime n,~ n n, n The negation is false. is even ~ n is prime is not even n is not prime WUCT11 Logic 74
75 Eample: Write the following statement using quantifiers. Find its negation Some dogs are vegetarians. Let D be the set of dogs. Statement: d D, d is vegetarian Negation: ~ d D, d is vegetarian d D, ~ d is vegetarian d D, d is not vegetarian All dogs are not vegetarian Eercises: Write the following statement using quantifiers. Find the negation. There is a real number that is rational. Statement:, Negation: ~,,~, False All real numbers are not rational WUCT11 Logic 75
76 Write the following statement using quantifiers. Find the negation. Pp: Some computer hackers are over 40. Let C be the set of computer hackers. P p : p C, p isover 40 ~ P p : ~ p C, p isover 40 p C, ~ p is over 40 p C, p is not over 40 p C, p is 40 or under All computer hackers are 40 or under False Write the following statement using quantifiers. Find the negation. Some animals are dogs. Let A be the set of animals Statement: A, isa dog Negation: ~ A, isa dog A, is not a dog All animals are not dogs. False WUCT11 Logic 76
77 .1.5. Multiple Quantifiers When a statement contains multiple quantifiers their order must be applied as written and will produce different results for the truth set. Eamples: Write the following statements using quantifiers: Everbod loves somebod. Let H be the set of people. Statement: H, H, loves. Somebod loves everone. Let H be the set of people. Statement: H, H, loves. WUCT11 Logic 77
78 Eercises: Write the following statements using quantifiers: Everbod loves everbod. Let H be the set of people. Statement: H, H, loves. The Commutative Law of Addition for Statement:,,, + + Everone had a mother. Let H be the set of humans. Statement: H, H, was the motherof or was the child of. There is an oldest person. Let H be the set of humans. Statement: H, H, is older than WUCT11 Logic 78
79 Eamples: Write the following statements without using quantifiers:,,, + 0 Statement: Given an real number, ou can find a real number so that the sum of the two is zero. Alternativel: Ever real number has an additive inverse.,,, + Statement: There is a real number, which added to an other real number results in the other number. Alternativel: Ever real number has an additive identit. Eercises: Write the following statements without using quantifiers: c colours, a animals, a is coloured c Statement: For ever colour, there is an animal of that colour. Alternativel: There are animals of ever colour. b books, p people, p has read b Statement: There is a book everone has read. WUCT11 Logic 79
80 WUCT11 Logic Interpreting Statements with Multiple Quantifiers To establish the truth of a statement with more than one quantifier, take the action suggested b the quantifiers as being performed in the order in which the quantifiers occur. Consider }, { },,, { B A and the predicate, P. There will be 6 possible predicates:.,,,,,,,,,,, P P P P P P For,,, P B A to be true the following must hold:,,,,,, P P P P P P Thus there will be 6 predicates which must all be true. That is for all pairs,, P, must be true. It will be false if there is one pair,, for which P, is false.
81 WUCT11 Logic 81 For,,, P B A to be true, the following must hold:,,,,,, P P P P P P Thus there will be 3 predicates which must be true. That is for ever there must be at least one so that P, is true. Given an element in A ou can find an element in B, so that P, is true. It will be false if there is one in A for which P, is false for ever in B. For,,, P B A to be true, the following must hold:,,,,,, P P P P P P Thus there will be predicates which must be true. That is there is one that when paired with an, P, is true. You can find one element in A that with all elements in B, P, is true. It will be false if for ever in A, there is a in B for which P, is false.
82 For A, B, P, to be true, the following must hold: P 1, 1 P 1, P, 1 P, P 3, 1 P 3, Thus there will be 1 predicate which must be true. That is there is one that when paired with one, P, is true. You can find one element in A and one element in B, P, is true. It will be false if for all pairs,, P, is false. Summar: Statement When true? When false?,, P, P, is true for all pairs, There is a pair, for which P, is false,, P, For ever, there is a for which P, is true There is an such that P, is false for ever,, P, There is an such that P, is true for ever For ever, there is a for which P, is false,, P, There is a pair, for which P, is false for all pairs, P, is true WUCT11 Logic 8
83 WUCT11 Logic Negation of Statements with Multiple Quantifiers. To negate statements with multiple quantifiers, each quantifier is negated and the predicate must be negated. To negate,,, P B A,,~,,,, ~ P B A P B A To negate,,, P B A,,~,,,, ~ P B A P B A To negate,,, P B A,,~,,,, ~ P B A P B A To negate,,, P B A,,~,,,, ~ P B A P B A Eamples: Write the negation of the following: Statement: 0,, +, Negation: 0 then, Take False: 0,, 0,, ~ + + +,,
84 Statement:,,, 1 Negation: ~,,, 1,,, 1 True : Take, then 1 Eercises: Write the negation of the following: Statement: c colours, a animals, a is coloured c Negation: ~ c colours, a animals, a is coloured c c colours, a animals, a is not coloured c There is a colour which ever animal is not. True, m cat is not purple. Statement: b books, p people, p has read b Negation: ~ b books, p people, p has read b b books, p people, p has not read b There is someone who has not read ever book. True, me, I ve not read ever book. WUCT11 Logic 84
85 Section 3. Proofs 3.1. Introduction. A proof is a carefull reasoned argument which establishes that a given statement is true. Logic is a tool for the analsis of proofs. Each statement within a proof is an assumption, an aiom, a previousl proven theorem, or follows from previous statements in the proof b a mathematical or logical rules and definitions Assumptions. Assumptions are the statements ou assume to be true as ou tr to prove the result. Eample: If ou want to prove: If and n is even, then > 0 n Your proof should start with the assumptions that and n is even. Further, ou can use the definition of an even natural number, and write the assumptions as follows: Let, and n be even, that is, p, n p. WUCT11 Logic 85
86 Assumptions are often thought to be the given information or information we know that can be used in our proof. As in the eample above, when ou are proving statements of the form statement P. Eercise: P Q, then the assumption is the Write the statement to be proven in the previous eample using logical notation: [ n : p, n p] > Aioms. Aioms are laws in Mathematics that hold true and require no proof. Eamples: + 0,, z,[ z] z n WUCT11 Logic 86
87 Mathematical Rules. Mathematical Rules are known rules that are often used. Eample:,, z, + z + z Logical Rules. Logical Rules are rules of logic such as Substitution and Substitution of Equivalence using the laws introduced earlier 3.. The Law of Sllogism If P Q and Q R are both tautologies, then so is P R. Eercise: Write the Law of Sllogism using logical notation: P Q Q R P R WUCT11 Logic 87
88 Show, using the quick method that the Law of Sllogism is a tautolog. P Q Q R P R Step: 1 3 5* 4 1. F. T F 3. T F 4. T T 5. T T F F 1. Place F under main connective. For F to occur under the main connective, must be T and must be F 3. For F to occur under, P must be T and R must be F. 4. For T under, both must be T 5. For the first to be true, given P is T, Q must be T. For the second to be true, given R is F, Q must be F. Q cannot be both T and F, thus P Q Q R P R can onl ever be true and is a tautolog. WUCT11 Logic 88
89 WUCT11 Logic 89 Eamples: s is a square s is a rectangle s is a rectangle s is a parallelogram s is a parallelogram s is a quadrilateral s is a square s is a quadrilateral Eercise: Complete the following using the Law of Sllogism: t is studing WUCT11 t is enrolled in a diploma t is enrolled in a diploma t is student at WCA. t is studing WUCT11 t is student at WCA.
90 Most results in Mathematics that require proofs are of the form P Q. The Law of Sllogism provides the most common method of performing proofs of such statements. The Law of Sllogism is a kind of transitivit that can appl to. To use the Law of Sllogism, we set up a sequence of statements, P P1, P1 P, P P3, K, Pn Q. Then, b successive applications of the law, we have P Q. Eample. We wish to prove that for even. In logic notation, we wish to prove: n is even P This has the form includes n is even Q. n, if n is even, then n is P Qand we note that our assumption n and P: n is even. WUCT11 Logic 90
91 WUCT11 Logic 91 Proof: even is 4 4,, even is Q P P P P P P P n p n p n p n p n p n p p n p n K K K K Completing the proof is simpl a matter of appling the Law of Sllogism three times to get n is even n is even. The previous proof can be simplified to: even is, 4, even is n p p n p n p n p n The use of Law of Sllogism is a matter of common sense. We shall use the Law of Sllogism without direct reference. Note. The use of the connective in the previous proof seems a little repetitive, albeit valid. For variet, the connective can be replaced b words such as therefore, thus, so we have, and hence.
92 3.3. Modus Ponens Rule of Modus Ponens: If P and P Q are both tautologies, then so is Q. In other words, Modus Ponens simpl sas that if we know P to be true, and we know that P implies Q, then Q must also be true. Eercise: Write the rule of Modus Ponens using logical notation: P P Q Q WUCT11 Logic 9
93 Show, using the quick method that the rule of Modus Ponens is a tautolog. P P Q Q Step 1 3* 1. Place F under main connective. F. For F to occur under the main connective, must be T and Q must be F T F 3. For T to occur under, P must be T and be T P Q must T T 4. For T to occur under P Q,when P is F P must be F F F P cannot be both T and F, thus ever be true and is a tautolog. P Q P Q can onl WUCT11 Logic 93
94 Eamples: If Zak is a cheater, then Zak sits in the back row Zak is a cheater Therefore Zak sits in the back row. If 3 then I will eat m hat 3 Therefore I will eat m hat Eercise: Complete the following using Modus Ponens If Zeus is a God, then Zeus is immortal Zeus is a God Therefore Zeus is immortal. If it is sunn then I will go to the beach It is sunn Therefore I will go to the beach If I stud hard then I will pass I stud hard Therefore I will pass WUCT11 Logic 94
95 3.3.. Universal Rule of Modus Ponens: If P and Q are predicates, the universal rule of Modus Ponens is P Q P a Q a. This means Modus Ponens can be applied to predicates using specific values for the variables in the domain. Eamples: If is even [P], then [Pa] Therefore is even. [Qa] is even [Q] The Principle of Mathematical Induction sas that when ou have a statement, Claimn, that concerns n, Claim1 If P : then Claimn is Claim k Claim k + 1, k true for all n Q Thus we have P Q. WUCT11 Logic 95
96 Eercise: According to Modus Ponens, what must we establish so we can appl this principle to the following statement and be able to sa Claimn is true for all n Claimn: 4 1 n? is a multiple of 3. We must show that Claimn satisfies P. So we need to establish two things: 1. Claim1, i.e is a multiple of 3; AND. Claim k Claim k + 1, k, i.e. If 4 1 is a multiple of 3 for all of 3. k, then 4 k+1 k 1 is a multiple WUCT11 Logic 96
97 3.4. Modus Tollens Rule of Modus Tollens: If ~Q and P Q are both tautologies, then so is ~P. In other words, Modus Ponens simpl sas that if we know ~Q to be true, and we know that P implies Q, then ~P must also be true. Similarl if we know Q to be false, and we know that P implies Q, then P must also be false Eercise: Write the rule of Modus Ponens using logical notation: P Q ~ Q ~ P WUCT11 Logic 97
98 Show, using the quick method that the rule of Modus Tollens is a tautolog. P Q ~Q ~P Step: 3 1 4* 5 1.Place F under main connective F. For F to occur under the main connective, must be T and ~P must be F T F 3. For T to occur under, ~Q must be T and P Q must be T T T 4. For T to occur under P Q,when P is T, Q must be T T T At step, ~P is F, thus P is T. Step 3 shows ~Q is T thus Q is F and step 4 gives Q is T. Q cannot be both T and F, thus P Q ~ Q ~ P can onl ever be true and is a tautolog. WUCT11 Logic 98
99 Eamples: If Zak is a cheater, then Zak sits in the back row Zak sits in the front row Therefore Zak is not a cheater. If > 3 then Earth is flat The Earth is not flat Therefore u 3 Eercise: Complete the following using Modus Tollens If Zeus is a God, then Zeus is immortal Zeus is not immortal Therefore Zeus is not a God. If I go to the beach then it is sunn It is not sunn Therefore I don t go to the beach If I arrive on time then I will be marked present I was marked absent Therefore I did not arrive on time. WUCT11 Logic 99
100 3.4.. Universal Rule of Modus Tollens: If P and Q are predicates, the universal rule of Modus Tollens is: P Q ~ Q a ~ P a. This means Modus Tollens can be applied to predicates using specific values for the variables in the domain. Eample: If, then Therefore. a, b, b 0, a b Eercise: Complete the following using the universal rule of Modus Tollens If, then 1 1 Therefore 1. WUCT11 Logic 100
101 3.5. Proving Quantified Statements Proving Eistential Statements A statement of the form D, P P is true for at least one D. is true if and onl if To prove this kind of statement, we need to find one that makes P true. D Eamples: Prove that there eists an even integer that can be written two was as the sum of two primes. The statement is of the form D, P, where D is the set of even integers and P is the statement can be written as the sum of two primes Thus we need find onl one even integer which satisfies P. Essentiall, to find the appropriate number, we have to guess. Consider is prime; and and 11 are prime. Therefore, there eists an even integer that can be written two was as the sum of two primes. WUCT11 Logic 101
102 Let r, s. Prove k, r + 18s k The statement is of the form k D, P k, where D is the set of integers and Pk is the statement: r + 18s k. Thus we need find onl one integer which satisfies Pk r + 18s 11r + 9s k where k 11r + 9s Eercises: Prove, Let 5, then Prove that if a, b,then 10 a + 8b is divisible b i.e., is even. 5a b 10 a + 8b + 4 and 5 a + 4b. Thus, 10a + 8b. WUCT11 Logic 10
103 3.5.. Proving Universal Statements A statement of the form D, P P is true for at ever D. is true if and onl if To prove this kind of statement, we need prove that for ever D, P is true. In order to prove this kind of statement, there are two methods: Method 1: Method of Ehaustion. The method of ehaustion is used when the domain is finite. Ehaustion cannot be used when the domain is infinite. To perform the method of ehaustion, ever member of the domain is tested to determine if it satisfies the predicate. WUCT11 Logic 103
104 Eample: Prove the following statement: Ever even number between and 16 can be written as a sum of two prime numbers. The statement is of the form D, P, where D {4,6,8,10,1,14},and P is the statement can be written as the sum of two prime numbers. The domain D is finite so the method of ehaustion can be used. Thus we must test ever number in D to show the can be written as the sum of two primes Thus b the method of ehaustion ever even number between and 16 can be written as a sum of two prime numbers. WUCT11 Logic 104
105 Eercise: Prove for each integer n with 1 n 10, n n + 11 is prime. The statement is of the form n D, P n, where D {1,,3,4,5,6,7,8,9,10},and Pn is the statement n n + 11 is prime. Thus we must show all numbers in D satisf Pn. P is prime P is prime P is prime P is prime P is prime P is prime P is prime P is prime P is prime P is prime Thus b the method of ehaustion for each integer n with 1 n 10, n n + 11 is prime. WUCT11 Logic 105
106 Method : Generalised Proof. The generalised proof method is used when the domain is infinite. It is called the method of generalizing from the generic particular. In order to show that ever element of the domain satisfies the predicate, a particular but arbitrar element of the domain is chosen and shown to satisf the predicate. The method to show the predicate is satisfied will var depending on the form of the predicate. Specific techniques of generalized proof will be outlined later in this section. WUCT11 Logic 106
107 Eample: Pick an number, add 3, multipl b 4, subtract 6, divide b two and subtract twice the original. The result is 3. Proof: Choose a particular but arbitrar number, sa, and then determine if it satisfies the statement. Step Pick a number Result Add Multipl b Subtract Divide b Subtract twice the original In this eample, is particular in that it represents a single quantit, but arbitraril chosen as it can represent an number. WUCT11 Logic 107
108 3.6. Disproving Quantified Statements Disproving Eistential Statements A statement of the form D, P if P is false for all D. is false if and onl To disprove this kind of statement, we need to show the for all D, P is false. That is we need to prove it s negation: ~ D, P D,~ P This is equivalent to proving a universal statement and so the method of ehaustion or the generalized proof method is used. Eample: Disprove: There eists a positive number n such that n + 3n + is prime. Proving the given statement is false is equivalent to proving its negation is true. That is proving that for all numbers n, n + 3n + is not prime. Since this statement is universal, its proof requires the generalised proof method. WUCT11 Logic 108
109 3.6.. Disproving Universal Statements A statement of the form D, P if P is false for at least one D. is false if and onl To disprove this kind of statement, we need to find one D such that P is false. That is we need to prove it s negation: ~ D, P D,~ P This is known as finding a countereample. Eample: Disprove: a, b, a b a b. Let P a, b : a b a b. We need to show a, b,~ P a, b Countereample: Let a 1, b 1. Then a b however a b. Now true false is false, thus P a, b is false, and ~ P a, b is true So, we have shown, b countereample a, b,~ P a, b WUCT11 Logic 109
110 Eercises: Disprove:, > 0 < 0. Need to prove:, ~ > 0 < 0. That is, 0 0. Let 0. z 1 Disprove z, z is odd is odd Let z 5, z is odd, is even. Prove or disprove:,, + 0. To prove the statement: Find a specific for each general. Consider an. Let, then WUCT11 Logic 110
111 3.7. Generalised Proof Methods Before proving a statement, it is of great use to write the statement using logic notation, including quantifiers, where appropriate. Doing this means ou have clearl written the assumptions ou can make AND the conclusion ou are aiming to reach. Eample: Prove: For all integers n, if n is odd, then n is odd. Rewritten using logic notation: n, n is odd n is odd Here the domain is given as,, and the predicate involves the statements: Pn is n is odd, Qn is The form of the predicate is P n Q n. n is odd. Thus the assumption that can be made is Pn and the conclusion to be reached is Qn. WUCT11 Logic 111
112 Direct Proof A direct proof is one in which we begin with the assumptions and work in a straightforward fashion to the conclusion. The steps in the final proof must proceed in the correct direction beginning with the initial assumption and following known laws, rules, definitions etc. until the final conclusion is reached. The proof must not start with what ou are tring to prove. Eample: Prove that if then 8. Assuming the domain to be, then the statement is of the form, P Q. Thus the assumption is P : , and the conclusion Q : WUCT11 Logic 11
113 Eercise: Prove: For all integers n, if n is odd, then n is odd. Rewritten using logic notation: n, n is odd n is odd Here the domain is given as,, and the predicate involves the statements: Pn is n is odd, Qn is The form of the predicate is P n Q n. n is odd. Thus the assumption that can be made is Pn and the conclusion to be reached is Qn. Proof: n is odd n n n n n n p + 1 p p p + 4 p + 1 p + p + 1 q + 1 q p definition of + p is odd definition of odd odd WUCT11 Logic 113
114 When the statement to be proven is of the form: P Q, the assumption which begins the proof is P. If the form is not P Q, or P is not clear, it ma be necessar to eamine what ou are aiming to prove and establish an assumption from which to begin. Eample: Prove that for, Do not start with this!. In this case, the form is not P Q. B eamining what we are aiming to prove, i.e a beginning to the proof can be found. working : We can now put the proof together: We know that 1 0 Thus, 1 0 for an. is true. WUCT11 Logic 114
115 what is known epanding subtracting from both multipling b 1 sides Note. In the eample, we did NOT start with the statement + + 1, as we technicall do not know whether it is true or not. We started our proof with a statement we know to be true. Eercise: Prove the following: If the right angled triangle XYZ with sides of length and z and hpotenuse z has an area of 4, then the triangle is isosceles. X z Y Z WUCT11 Logic 115
116 The form of statement is P Q. What is known. i.e. the assumptions that can be made are: Area of the triangle: z A, 1 4 Area of an triangle: 1 base height 1 The sides are of length and and hpotenuse z so b Pthagoras: z +. 3 What is to be proven: That triangle XYZ is isosceles. Thus we must show two sides have equal length. Proof: Substituting 3 into 1 and equating with gives: multipling both sides b 4 So two sides are equal and thus triangle XZY is isosceles. WUCT11 Logic 116
117 3.8. Indirect Proofs Method of Proof b Contradiction The method of proof b contradiction can be used when the statement to be proven is not of the form P Q. The method is as follows: 1. Suppose the statement to be proven is false. That is, suppose that the negation of the statement is true.. Show that this supposition leads to a contradiction 3. Conclude that the statement to be proven is true. Eample: Prove there is no greatest integer. Suppose not, that is suppose there is a greatest integer. N. Then N n for ever integer n. Let M N + 1. Now M is an integer since it is the sum of integers. Also M N +1 M > N since Thus M is an integer that is greater than N. So N is the greatest integer and N is not the greatest integer, which is a contradiction. Thus the assumption that there is a greatest integer is false, hence there is no greatest integer is true. WUCT11 Logic 117
118 Eercise: Prove there is no integer that is both even and odd. Suppose not, that is suppose there is a greatest integer an integer n, that is both even and odd. B the definition of even n k, k K1, and b the definition of odd n l + 1, l K. If n is both even and odd then equation 1 and gives: k l k + 1 k l l k l Now since k and l are integers, the difference k l must be an integer. However k l 1. Thus k l is an integer and k l is not an integer, which is a contradiction. Thus the supposition is false and hence the statement There is no integer that is both even and odd is true. WUCT11 Logic 118
119 3.8.. Proof b Contraposition Recall the following logical equivalence: P Q ~ Q ~ P. ~ Q ~ P is known as the contrapositive of P Q. This equivalence indicates that if ~ Q ~ P is a true statement, then so too is P Q. Thus, in order to prove P Q, we prove the contrapositive, that is ~ Q ~ P, is true. The method of proof b contraposition can be used when the statement to be proven is of the form P Q. The method is as follows: 1. Epress the statement to be proven in the form: D, P Q.. Rewrite the statement in the contrapositive form: D, ~ Q ~ P. 3. Prove the contrapositive b a direct proof. a. Suppose that is a particular but arbitrar element of D, such that Q is false. b. Show that P is false. WUCT11 Logic 119
120 Eample: Prove that for all integers n if n is even, n is even. The statement can be epressed in the form: n, n is even nis even. Thus the contrapositive is n, n is not even n is not even. That is n, n is odd n is odd. To prove the contrapositive: Let n be an odd integer. Then n k + 1, k K1 Show n is odd, i.e. show n l + 1, l So n k 4k k l k b k + 1 l k + k n is odd, and the contrapositive is true. Hence the statement for all integers n if even is also true. n.is even, n is WUCT11 Logic 10
121 Eercise: Prove that for all integers n if 5 / n.then 5 / n. The statement can be epressed in the form: n, 5 / n 5 / n. Thus the contrapositive is n, 5 n 5 n. To prove the contrapositive: Let n be an odd integer. Then 5 n n 5k, k K1 Show 5 n, i.e. show n 5l, l So n 5k b 1 5k 55k 5l l 5k 5 n, and the contrapositive is true. Hence the statement for all integers n if is also true. 5 / n.then 5 / n WUCT11 Logic 11
122 Eercise: Prove if is irrational, then + 7 is irrational. The statement can be epressed in the form:, + 7 Thus the contrapositive is, + 7 To prove the contrapositive: Let. Show + 7 a, + 7, so + 7, a, b, b 0. b c, that is, c, d, d 0 d a b a 7b b c d Therefore a b 7 c a 7b, d b, d, and the contrapositive is true. Hence the statement if is irrational, then + 7 is irrational is also true. 0 WUCT11 Logic 1
123 Proof b Cases When the statement to be proven is of the form, or can be written in the form: cases can be used. It relies on the logical equivalence P Q R, the method of proof b P R Q R P Q R. The method is as follows: 1. Prove P R. Prove Q R. 3. Conclude P Q R. If the statement is not written in the form P Q R, it is necessar to establish the particular cases b ehaustion. WUCT11 Logic 13
124 Eample: Prove: If 0 or 0, then + > 0. The statement can be epressed in the form: > 0 We assume,, thus 0, 0. Proof: Case 1: Prove 0 + > 0 > Let 0, then 0 and 0. Thus + > 0. Case : Prove 0 + > 0 > Let 0, then 0 and 0. Thus + > 0. Therefore If 0 or 0, then + > 0. WUCT11 Logic 14
125 WUCT11 Logic 15 Eercise. Prove: If or, then 0 4. The statement can be epressed in the form: 0 4 Proof: Case 1: Prove Therefore 0 4 Case : Prove Therefore 0 4 Thus if or, then 0 4.
126 If the statement is not written in the form P Q R, it is necessar to establish the particular cases b ehaustion. Eample. Prove: m, m + m + 1 is odd. The statement is not in the form P Q R. However b considering m m is even m is odd. Then the statement can be epressed in the form: m is even m is odd m + m + 1 is odd Case 1: Prove m is even m + m + 1 is odd m is even m p, p K1. m + m + 1 p + p + 1 b1 4 p + p + 1 p + p + 1 k + 1, where k p + p Therefore, m is even m + m + 1 is odd. WUCT11 Logic 16
127 Case : Prove m is odd m + m + 1 is odd m is odd m q + 1, q K. m + m + 1 q + 1 4q 4q + 4q + 1+ q q q + 3q l 1, where l q + 3q q b Therefore, m is odd m + m + 1 is odd. Therefore, m is even m is odd m + m + 1 is odd. Therefore, m, m + m + 1 is odd. WUCT11 Logic 17
128 Eercise. Prove: n, n n + 3 is odd. The statement is not in the form P Q R. However b considering n n is even n is odd. Then the statement can be epressed in the form: n is even n is odd n n + 3 is odd Case 1: Prove n is even n n + 3 is odd n is even n p, p K1. n n + 3 p 4 p p + 3 b1 p p p + 1 k + 1, where k + 1 p p + 1 Therefore, n is even n n + 3 is odd. WUCT11 Logic 18
129 Case : Prove n is odd n n + 3 is odd n is odd n q + 1, q K. n n + 3 q + 1 4q 4q + 4q + 1 q q q + q + 1 l + 1, where l q b + 1 q + q + 1 Therefore, n is odd n n + 3is odd. Therefore, n is even n is odd n n + 3 is odd. Therefore, n, n n + 3 is odd. WUCT11 Logic 19
130 Section 4. Set Theor 4.1. Definitions A set ma be viewed as an well defined collection of objects, called elements or members of the set. Sets are usuall denoted with upper case letters, A, B, X, Y, while lower case letters are used to denote elements a, b,,, of a set. Membership in a set is denoted as follows: a S denotes that a is a member or element of a set S. Similarl elements of a set S. a, b S denotes that a and b are both a S denotes that a is not an element of a set S. Similarl elements of a set S. a, b S denotes that neither of a and b are In Set Theor, we work within a Universe, U, and consider sets containing elements from U. WUCT11 Logic 130
131 A set ma be specified in essentiall two was: 1. The elements of the set are listed within braces, { }, and separated b commas. Technicall, the listing of elements can be done onl for finite sets. However, if an infinite set is defined b a simple rule, we sometimes write a few elements and then use to mean roughl and so on or b the same rule. Eamples: A {1,3,5,7,9 }. The set A is the finite collection of odd integers, 1 to 9 inclusive B { K, 4,,0,,4, K}. The set B is the infinite collection of even integers. Eercises: List a finite set, C, containing even integers between 10 and 0 inclusive. C {10,1,14,16,18,0} List an infinite set, D, containing natural numbers that are divisible b 3 D { 0,3,6,9, K} WUCT11 Logic 131
132 . A statement defining the properties which characterise the elements in the set is written within braces Eamples: A { z : z isodd 1 z 9}. The set A is the finite collection of odd integers, 1 to 9 inclusive B { z : k, z k}. The set B is the infinite collection of even integers. Eercises: Define a finite set, C, containing even integers between 10 and 0 inclusive C { z : z iseven 10 z 0} Define an infinite set, D, containing natural numbers that are divisible b 3 D { n : 3 n} WUCT11 Logic 13
133 4.1.. Aiom of Specification. Given a Universe U and an statement P involving U, then there eists a set A such that U, A P. Further, we write A { U : P }. In other words, the Aiom of Specification sas that we can pick a set and a propert and build a new set. This is wh the notation for A is sometimes referred to as set-builder notation. Eample: Let U {1,, 3, 4, 5, 6, 7, 8, 9, 10} and P be the statement is odd. \ b the Aiom of Specification, A { U : is odd}. Notes: 1. We know an element belongs to the set A { U : P } if satisfies the condition P.. This notation is more simpl written { D : P }. This is called set builder notation. In using this notation, the elements of the domain, D, must belong to the Universe, U, WUCT11 Logic 133
134 and P can be an predicate involving. D could be all of U. Eamples: The interval [0, 1] can be written in set builder notation as: { : 0 1} { : 0 1} The set of all rational numbers, can be written as: a : a, b b 0 b a : : a, b b b 0 3 { : } {0, 1, 1}. Eercises: Write down the following sets b listing their elements: { : } {1} 3 { : 9} { 3,3} { : 7} { } WUCT11 Logic 134
135 4.. Venn Diagrams Venn diagrams are a pictorial method of demonstrating the relationship between set. The universal set, U, is represented b a rectangle and sets within the universe are depicted with circles. While a Venn diagram ma be used to demonstrate the relationship between sets, it does not provide a method of proving those relationships. WUCT11 Logic 135
136 4.3. Special Sets The Singleton Set Sets having a single element are frequentl called singleton sets. Eample: {1} is read singleton 1. If a U, then { U : a} { a} Note: The singleton set { a } is NOT the same as the element a The Empt Set The empt set or null set is a set which contains no elements. It is denoted b the smbol or b empt braces { }. Using set builder notation, one wa of defining the empt set is: { : } WUCT11 Logic 136
137 4.4. Subsets Definition: Subset. If A and B are sets, then A is called a subset of B, written A B, if and onl if, ever element in A is also in B. Eamples: { 1,} {1,,3 } The Venn diagram demonstrating A B is: Eercises: Write the definition of subset using logic notation. A B U, A B Is {cat, dog} {bird, fish, cat, dog}? Yes WUCT11 Logic 137
138 4.4.. Definition: Proper Subset. If A and B are sets, then A is called a proper subset of B, written A B, if and onl if, ever element in A is also in B but there is at least one element of B that is not in A. A is a proper subset of B if A B but A B. Eamples: { 1, } {1,,3} Eercises: Draw a Venn diagram demonstrating A B, where A {1,} and B {1,,3,4,5 } Is { a, b, c} { c, b, a}? No WUCT11 Logic 138
139 Notes. 1. If A B, then each element of A belongs to B, or for each A, it is true that B.. If A is a subset of B, then B is sometimes called a superset of A. 3. If A and B are sets, then to prove A B, we need to prove, A B 4. If A is a proper subset of B, there must be at least one element in B that is not in A. 5. If A and B are sets, to prove A is not a subset of B, denoted A B, we need to prove ~ A B : ~, A B,~ A B,~ A B, A B 6. The following relationships hold in the number sstem: WUCT11 Logic 139
140 The null set as a subset. For an set A in a Universe U, A Proof: Suppose ~ A. Then, there eists such that A. This, therefore, means that is not empt, which is a contradiction. Therefore, A Distinction between elements and subsets Eamples: {1,,3 }, {1,,3 } { } {1,,3 }, { } {1,,3 } 1 { : 1}, { 1} { : 1} Eercises: Let S be a set in a Universe U. Determine whether the following are true or false. S S False S {S} True S {S} False {S} True WUCT11 Logic 140
141 {S} False { } { S} False 4.5. Set Equalit Definition: Set Equalit. If A and B are sets, then A equals B, written A B, if and onl if, ever element in A is also in B and ever element in B is also in A. Equivalentl, A B if, and onl if A B and B A. Note: To prove that two sets are equal two things must be shown:: Eamples: A B and B A. The Venn diagram demonstrating A B is: WUCT11 Logic 141
142 Eercises: Write the definition of set equalit using logic notation. A B U, A B B A U, A B B A Aiom of Etent. If A and B are sets then A B U, A B. The Aiom of Etent sas that a set is completel determined b its elements, the order in which the elements are listed is irrelevant, as is the fact that some members ma be listed more than once. Eamples: { 1,} {1, } { a, b, c} { c, b, a} Eercises: Is { a, b, c, d} { b, d, a, c} Yes Is { Ann, Bob, Cal} {Bob, Cal, Ann, Cal} Yes WUCT11 Logic 14
143 Theorem: Equalit b Specification Let U be a universe and let P be a statement. If U, P Q, that is U, P Q then { U : P } { U : Q } The Theorem states that subsets of the same universe U which are defined b equivalent statements are equal sets. This theorem allows the use of tautologies of logic to prove set theoretic statements, as will be outlined later. Eample: We know that Therefore { : 1} { 1 1 } { 1, 1} If a1, a, a3,k an U, then we can write A { U : a1 a K an} { a, a, a, K a } 1 3 n In other words, if we know the elements of a set, we know the set. A { : 1 3} { 1,, 3} WUCT11 Logic 143
144 Eercise: Are the following sets equal? Using logic, can ou prove our answer? { 1, 3,1, }, {3,,1}, {1,,3} Yes {1,3,1,} { : { : { : { : {1,,3} } 3} } } Are the following two sets equal? Give reasons. { n : n is even} E : and T { n : : n is even}. Yes, previousl is has been proven that n n is even is even, thus b equivalence of statements, the two sets are equal. WUCT11 Logic 144
145 4.6. Power Sets Definition: Power Set If X is an set, then { A : A X } is the power set of X. The power set of X is often written as X. So X { A : A X }. A power set is a set whose elements are sets. If the elements of X are in a universe U, those of X are in a universe U. Eamples: Let X {1} and let S be the set of all subsets of X. Write down the set S b listing its elements. S { A : A X }. {1} and { 1} {1}. Thus S {,{1}} Let X {1, } and S { A : A X }. Write down the set S b listing its elements. {1, }, { 1} {1, }, { } {1, }, and { 1, } {1, }. Thus S {,{1},{},{1, }} WUCT11 Logic 145
146 Eercises: Let X {1,,3 }. o Write down the set X b listing its elements. X {,{1},{},{3},{1, },{1,3},{,3},{1,,3}} o How man elements are there in X? 8 o Is X? Yes o Is X? Yes o Is 1 X? No o Is { 1} X? Yes o Is { } X? No o Is {{ 1, }} X? Yes WUCT11 Logic 146
147 4.7. Hasse Diagrams The elements of X can be represented b diagrams using the following procedure: 1. An upward directed line between two sets indicates that the lower set is a subset of the upper set.. is at the bottom and X is at the top. 3. Each pair of sets is joined b an upward directed line to the smallest set which contains each as a subset. 4. Each pair of sets is joined b a downward directed line to the largest set which is a subset of each. Eample: Let X {1, }, thus X {,{1},{},{1, }} and the Hasse diagram is given b: {1, } {1} {} ø WUCT11 Logic 147
148 4.8. Set Operations There are five main set theoretic operations, one corresponding to each of the logical connectives. Set Operation Name Logical Connective Name A Complement ~ P Negation A B Union P Q Disjunction A B Intersection P Q Conjunction A B Subset P Q Conditional A B Equalit P Q P Q Biconditional Equivalence The set operations can be defined in terms of the corresponding logical operations. This means that each of the tautologies proved b truth tables for the logical connectives will have a corresponding theorem in set theor. WUCT11 Logic 148
149 We have seen how the logical conditional operator, P Q is related to subset, biconditional operator, A B and how the logical P Q or equivalence, P Q is related to set equalit, A B. The following sections will cover the three remaining set operations: complement, union and intersection. In our discussion of set theor, we will let U be a fied set and all other sets, whether denoted A, B, C, etc, will be subsets of U. In other words, A, B, C U. Thus, each result should start with a statement similar to Let A, B, C be subsets of a universal set U or Let A, B, C U Definition: Compliment Let U be a universal set, and let A U. Then the complement of A, denoted b A, is given b { U ~ A } { U A} A : :. Notes. 1. U \ A, A and books. c A are also used for A in some WUCT11 Logic 149
150 . If the set U is fied in a discussion, then A is sometimes written as A { : A} Eample: The shaded area in the following Venn diagram depicts A: Eercises: Let U. Write down A for the following sets: A { 1,, 3} { : 1 3} A A { : is even} A { : is odd} A { : > 0 < 0} A {} 0 WUCT11 Logic 150
151 4.8.. Definition: Union Let A and B be subsets of a universe U. Then the union of A and B, denoted b A B, is given b { U A B} A B :. Eample: The shaded area in the following Venn diagram depicts A B : Eercises: Let U. Write down A B for the following sets: o A {} 1 and { } A B { 1, } B. o A is the set of all even integers, B is the set of all odd integers. A B. WUCT11 Logic 151
152 o A { : 0 } and B { : 1 3} A B { : 0 3} [ 0, 3] If A U and B U, is it true that A B U? Yes. A B A U U B U Definition: Intersection Let A and B be subsets of a universe U. Then the intersection of A and B, denoted b { U A B} A B :. A B, is given b Eample: The shaded area in the following Venn diagram depicts A B: WUCT11 Logic 15
153 Eercises: Let U. Write down A B for the following sets: o A { 1,, 3, 5} and { 1, 4, 5, 6} { 1, 5} A B. B. o A is the set of all even integers, B is the set of all odd integers. A B. o A { : 0 } and B { : 1 3} A B { :1 } [ 1, ] If A U and B U, is it true that A B U? Yes. A B A U U B U Definition: Difference Let A and B be subsets of a universe U. Then the difference of A and B, denoted b { U A B} A B :. A B, is given b WUCT11 Logic 153
154 Eample: The shaded area in the following Venn diagram depicts A B: Notes. 1. The difference of A B is sometimes called the relative complement of B in A.. If we let A U U B, then we have { U : U B} { U : B} B 3. Using Definitions for complement and intersection, we can simplif the definition of difference as follows: A B { U : A B} { U : A B} A B WUCT11 Logic 154
3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations
Logic Propositions and logical operations Main concepts: propositions truth values propositional variables logical operations 1 Propositions and logical operations A proposition is the most basic element
More informationCSC Discrete Math I, Spring Propositional Logic
CSC 125 - Discrete Math I, Spring 2017 Propositional Logic Propositions A proposition is a declarative sentence that is either true or false Propositional Variables A propositional variable (p, q, r, s,...)
More informationWUCT121. Discrete Mathematics. Logic. Tutorial Exercises
WUCT11 Discrete Mathematics Logic Tutorial Exercises 1 Logic Predicate Logic 3 Proofs 4 Set Theory 5 Relations and Functions WUCT11 Logic Tutorial Exercises 1 Section 1: Logic Question1 For each of the
More information2. The Logic of Compound Statements Summary. Aaron Tan August 2017
2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional
More informationLogic, Sets, and Proofs
Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.
More informationLogic Overview, I. and T T T T F F F T F F F F
Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition
More informationChapter 1: The Logic of Compound Statements. January 7, 2008
Chapter 1: The Logic of Compound Statements January 7, 2008 Outline 1 1.1 Logical Form and Logical Equivalence 2 1.2 Conditional Statements 3 1.3 Valid and Invalid Arguments Central notion of deductive
More information8. BOOLEAN ALGEBRAS x x
8. BOOLEAN ALGEBRAS 8.1. Definition of a Boolean Algebra There are man sstems of interest to computing scientists that have a common underling structure. It makes sense to describe such a mathematical
More informationCS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)
CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of
More informationEECS 1028 M: Discrete Mathematics for Engineers
EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 26 Why Study Logic?
More informationLogic and Propositional Calculus
CHAPTER 4 Logic and Propositional Calculus 4.1 INTRODUCTION Many algorithms and proofs use logical expressions such as: IF p THEN q or If p 1 AND p 2, THEN q 1 OR q 2 Therefore it is necessary to know
More information1.1 Language and Logic
c Oksana Shatalov, Fall 2017 1 1.1 Language and Logic Mathematical Statements DEFINITION 1. A proposition is any declarative sentence (i.e. it has both a subject and a verb) that is either true or false,
More informationUnit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9
Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Typeset September 23, 2005 1 Statements or propositions Defn: A statement is an assertion
More informationUnit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics
Unit I LOGIC AND PROOFS B. Thilaka Applied Mathematics UNIT I LOGIC AND PROOFS Propositional Logic Propositional equivalences Predicates and Quantifiers Nested Quantifiers Rules of inference Introduction
More informationSteinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)
Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning Terminology, Notations, Definitions, & Principles: Mathematical Proof and Proving (MPP) 1. A statement
More informationTHE LOGIC OF COMPOUND STATEMENTS
THE LOGIC OF COMPOUND STATEMENTS All dogs have four legs. All tables have four legs. Therefore, all dogs are tables LOGIC Logic is a science of the necessary laws of thought, without which no employment
More information1.1 Language and Logic
c Oksana Shatalov, Spring 2018 1 1.1 Language and Logic Mathematical Statements DEFINITION 1. A proposition is any declarative sentence (i.e. it has both a subject and a verb) that is either true or false,
More information11.4 Polar Coordinates
11. Polar Coordinates 917 11. Polar Coordinates In Section 1.1, we introduced the Cartesian coordinates of a point in the plane as a means of assigning ordered pairs of numbers to points in the plane.
More informationCHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic
CHAPER 1 MAHEMAICAL LOGIC 1.1 undamentals of Mathematical Logic Logic is commonly known as the science of reasoning. Some of the reasons to study logic are the following: At the hardware level the design
More informationPacket #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics
CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Packet #2: Set Theory & Predicate Calculus Applied Discrete Mathematics Table of Contents Full Adder Information Page 1 Predicate Calculus
More informationTools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:
Tools for reasoning: Logic Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications: 1 Why study propositional logic? A formal mathematical language for precise
More informationn logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)
Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional
More informationLogic and Proofs. (A brief summary)
Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations
More information5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.
Statements Compounds and Truth Tables. Statements, Negations, Compounds, Conjunctions, Disjunctions, Truth Tables, Logical Equivalence, De Morgan s Law, Tautology, Contradictions, Proofs with Logical Equivalent
More information10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference
Logic? Propositional Logic (Rosen, Chapter 1.1 1.3) TOPICS Propositional Logic Truth Tables Implication Logical Proofs 10/1/12 CS160 Fall Semester 2012 2 What is logic? Logic is a truth-preserving system
More informationCHAPTER 1 - LOGIC OF COMPOUND STATEMENTS
CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 1.1 - Logical Form and Logical Equivalence Definition. A statement or proposition is a sentence that is either true or false, but not both. ex. 1 + 2 = 3 IS a statement
More informationHANDOUT AND SET THEORY. Ariyadi Wijaya
HANDOUT LOGIC AND SET THEORY Ariyadi Wijaya Mathematics Education Department Faculty of Mathematics and Natural Science Yogyakarta State University 2009 1 Mathematics Education Department Faculty of Mathematics
More informationChapter 1 Elementary Logic
2017-2018 Chapter 1 Elementary Logic The study of logic is the study of the principles and methods used in distinguishing valid arguments from those that are not valid. The aim of this chapter is to help
More informationsoftware design & management Gachon University Chulyun Kim
Gachon University Chulyun Kim 2 Outline Propositional Logic Propositional Equivalences Predicates and Quantifiers Nested Quantifiers Rules of Inference Introduction to Proofs 3 1.1 Propositional Logic
More informationPROPOSITIONAL CALCULUS
PROPOSITIONAL CALCULUS A proposition is a complete declarative sentence that is either TRUE (truth value T or 1) or FALSE (truth value F or 0), but not both. These are not propositions! Connectives and
More informationLogic and Propositional Calculus
CHAPTER 4 Logic and Propositional Calculus 4.1 INTRODUCTION Many algorithms and proofs use logical expressions such as: IF p THEN q or If p 1 AND p 2, THEN q 1 OR q 2 Therefore it is necessary to know
More informationHandout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte
Handout on Logic, Axiomatic Methods, and Proofs MATH 3181 001 Spring 1999 David C. Royster UNC Charlotte January 18, 1999 Chapter 1 Logic and the Axiomatic Method 1.1 Introduction Mathematicians use a
More information2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic
CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares
More information1 The Foundation: Logic and Proofs
1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( 명제 ) a declarative sentence that is either true or false, but not both nor neither letters denoting propositions p, q, r, s, T:
More informationMathematical Reasoning (Part I) 1
c Oksana Shatalov, Spring 2017 1 Mathematical Reasoning (art I) 1 Statements DEFINITION 1. A statement is any declarative sentence 2 that is either true or false, but not both. A statement cannot be neither
More informationA. Propositional Logic
CmSc 175 Discrete Mathematics A. Propositional Logic 1. Statements (Propositions ): Statements are sentences that claim certain things. Can be either true or false, but not both. Propositional logic deals
More informationLogic and Proof. Aiichiro Nakano
Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science
More informationLogical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional
Logical Operators Conjunction Disjunction Negation Exclusive Or Implication Biconditional 1 Statement meaning p q p implies q if p, then q if p, q when p, q whenever p, q q if p q when p q whenever p p
More informationThe Logic of Compound Statements cont.
The Logic of Compound Statements cont. CSE 215, Computer Science 1, Fall 2011 Stony Brook University http://www.cs.stonybrook.edu/~cse215 Refresh from last time: Logical Equivalences Commutativity of :
More informationDefinition: div Let n, d 0. We define ndiv d as the least integer quotient obtained when n is divided by d. That is if
Section 5. Congruence Arithmetic A number of computer languages have built-in functions that compute the quotient and remainder of division. Definition: div Let n, d 0. We define ndiv d as the least integer
More informationn Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B
Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.7, 5.5) TOPICS Sets and Functions Propositional and Predicate Logic Logical Operators and Truth Tables Logical Equivalences and Inference
More informationTopic 1: Propositional logic
Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements
More informationDiscrete Mathematical Structures. Chapter 1 The Foundation: Logic
Discrete Mathematical Structures Chapter 1 he oundation: Logic 1 Lecture Overview 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Quantifiers l l l l l Statement Logical Connectives Conjunction
More informationMATHS 315 Mathematical Logic
MATHS 315 Mathematical Logic Second Semester, 2007 Contents 1 Informal Statement Logic 1 1.1 Statements and truth tables............................... 1 1.2 Tautologies, logical equivalence and logical
More informationProving logical equivalencies (1.3)
EECS 203 Spring 2016 Lecture 2 Page 1 of 6 Proving logical equivalencies (1.3) One thing we d like to do is prove that two logical statements are the same, or prove that they aren t. Vocabulary time In
More information1.1 Statements and Compound Statements
Chapter 1 Propositional Logic 1.1 Statements and Compound Statements A statement or proposition is an assertion which is either true or false, though you may not know which. That is, a statement is something
More informationHW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall
CSE 20 HW1 graded review form? HW2 released DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Translate sentences from English to propositional logic using appropriate
More informationCOMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University
COMP 182 Algorithmic Thinking Proofs Luay Nakhleh Computer Science Rice University 1 Reading Material Chapter 1, Section 3, 6, 7, 8 Propositional Equivalences The compound propositions p and q are called
More information15414/614 Optional Lecture 1: Propositional Logic
15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,
More informationDiscrete Structures & Algorithms. Propositional Logic EECE 320 // UBC
Discrete Structures & Algorithms Propositional Logic EECE 320 // UBC 1 Review of last lecture Pancake sorting A problem with many applications Bracketing (bounding a function) Proving bounds for pancake
More informationIntro to Logic and Proofs
Intro to Logic and Proofs Propositions A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. Examples: It is raining today. Washington
More informationChapter 2: The Logic of Quantified Statements
Chapter 2: The Logic of Quantified Statements Topics include 2.1, 2.2 Predicates and Quantified Statements, 2.3 Statements with Multiple Quantifiers, and 2.4 Arguments with Quantified Statements. cs1231y
More informationChapter 1, Part I: Propositional Logic. With Question/Answer Animations
Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary Propositional Logic The Language of Propositions Applications Logical Equivalences Predicate Logic The Language of
More informationLECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel
LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is
More information2.2: Logical Equivalence: The Laws of Logic
Example (2.7) For primitive statement p and q, construct a truth table for each of the following compound statements. a) p q b) p q Here we see that the corresponding truth tables for two statement p q
More informationLogic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.
Math 0413 Appendix A.0 Logic Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. This type of logic is called propositional.
More information1 The Foundation: Logic and Proofs
1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( ) a declarative sentence that is either true or false, but not both nor neither letters denoting propostions p, q, r, s, T: true
More informationSection 1.1 Propositions
Set Theory & Logic Section 1.1 Propositions Fall, 2009 Section 1.1 Propositions In Chapter 1, our main goals are to prove sentences about numbers, equations or functions and to write the proofs. Definition.
More informationNumbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:
3.4 THE CONDITIONAL & BICONDITIONAL Definition. Any statement that can be put in the form If p, then q, where p and q are basic statements, is called a conditional statement and is written symbolically
More informationChapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.
Chapter 1 Chapter Summary Propositional Logic The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.3) Predicate Logic The Language of Quantifiers (1.4) Logical Equivalences (1.4)
More informationCompound Propositions
Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth
More informationLecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)
Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or
More informationReview. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions
Review Propositions, propositional operators, truth tables Logical Equivalences. Tautologies & contradictions Some common logical equivalences Predicates & quantifiers Some logical equivalences involving
More informationLogic and Proofs. (A brief summary)
Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations
More information2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?
Logic: Truth Tables CS160 Rosen Chapter 1 Logic? 1 What is logic? Logic is a truth-preserving system of inference Truth-preserving: If the initial statements are true, the inferred statements will be true
More informationLogic. Propositional Logic: Syntax
Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about
More information5. And. 5.1 The conjunction
5. And 5.1 The conjunction To make our logical language more easy and intuitive to use, we can now add to it elements that make it able to express the equivalents of other sentences from a natural language
More informationWollongong College Australia
Wollongong College Australia University of Wollongong Diploma in Information Technology WUCT121 Discrete Mathematics Mid-Term Test #2 Autumn Session 2008 SOLUTIONS Time Allowed: 50 minutes DIRECTIONS TO
More information3 The Semantics of the Propositional Calculus
3 The Semantics of the Propositional Calculus 1. Interpretations Formulas of the propositional calculus express statement forms. In chapter two, we gave informal descriptions of the meanings of the logical
More informationProofs. Joe Patten August 10, 2018
Proofs Joe Patten August 10, 2018 1 Statements and Open Sentences 1.1 Statements A statement is a declarative sentence or assertion that is either true or false. They are often labelled with a capital
More informationProposition logic and argument. CISC2100, Spring 2017 X.Zhang
Proposition logic and argument CISC2100, Spring 2017 X.Zhang 1 Where are my glasses? I know the following statements are true. 1. If I was reading the newspaper in the kitchen, then my glasses are on the
More informationWhere are my glasses?
Proposition logic and argument CISC2100, Spring 2017 X.Zhang 1 Where are my glasses? I know the following statements are true. 1. If I was reading the newspaper in the kitchen, then my glasses are on the
More informationBoolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012
March 5, 2012 Webwork Homework. The handout on Logic is Chapter 4 from Mary Attenborough s book Mathematics for Electrical Engineering and Computing. Proving Propositions We combine basic propositions
More informationDISCRETE MATHEMATICS BA202
TOPIC 1 BASIC LOGIC This topic deals with propositional logic, logical connectives and truth tables and validity. Predicate logic, universal and existential quantification are discussed 1.1 PROPOSITION
More informationLecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel
Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical
More informationWhy Learning Logic? Logic. Propositional Logic. Compound Propositions
Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional
More informationThe following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof
Ch. 1.6 Introduction to Proofs The following techniques for methods of proofs are discussed in our text - Vacuous proof - Trivial proof - Direct proof - Indirect proof (our book calls this by contraposition)
More informationCITS2211 Discrete Structures Proofs
CITS2211 Discrete Structures Proofs Unit coordinator: Rachel Cardell-Oliver August 13, 2017 Highlights 1 Arguments vs Proofs. 2 Proof strategies 3 Famous proofs Reading Chapter 1: What is a proof? Mathematics
More informationSample Problems for all sections of CMSC250, Midterm 1 Fall 2014
Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical
More informationFoundations of Mathematics MATH 220 FALL 2017 Lecture Notes
Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements
More informationPropositional Logic. Spring Propositional Logic Spring / 32
Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements
More informationSection 1.1: Logical Form and Logical Equivalence
Section 1.1: Logical Form and Logical Equivalence An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of an argument is called the conclusion,
More informationProof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory
Proof Theorems Part 4 The Big Bang Theory Theorems A theorem is a statement we intend to prove using existing known facts (called axioms or lemmas) Used extensively in all mathematical proofs which should
More informationA Quick Lesson on Negation
A Quick Lesson on Negation Several of the argument forms we have looked at (modus tollens and disjunctive syllogism, for valid forms; denying the antecedent for invalid) involve a type of statement which
More informationSection 3.1. ; X = (0, 1]. (i) f : R R R, f (x, y) = x y
Paul J. Bruillard MATH 0.970 Problem Set 6 An Introduction to Abstract Mathematics R. Bond and W. Keane Section 3.1: 3b,c,e,i, 4bd, 6, 9, 15, 16, 18c,e, 19a, 0, 1b Section 3.: 1f,i, e, 6, 1e,f,h, 13e,
More informationPropositional Equivalence
Propositional Equivalence Tautologies and contradictions A compound proposition that is always true, regardless of the truth values of the individual propositions involved, is called a tautology. Example:
More information1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form
Math 378 Exam 1 Spring 2009 Show all Work Name 1) Let h = John is healthy, w = John is wealthy and s = John is wise Write the following statement is symbolic form a) In order for John to be wealthy it
More informationIntroduction to Metalogic
Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)
More informationExample. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives
Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement.
More informationDISCRETE MATH: FINAL REVIEW
DISCRETE MATH: FINAL REVIEW DR. DANIEL FREEMAN 1) a. Does 3 = {3}? b. Is 3 {3}? c. Is 3 {3}? c. Is {3} {3}? c. Is {3} {3}? d. Does {3} = {3, 3, 3, 3}? e. Is {x Z x > 0} {x R x > 0}? 1. Chapter 1 review
More informationPropositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013
Propositional Logic Argument Forms Ioan Despi despi@turing.une.edu.au University of New England July 19, 2013 Outline Ioan Despi Discrete Mathematics 2 of 1 Order of Precedence Ioan Despi Discrete Mathematics
More informationChapter 3. The Logic of Quantified Statements
Chapter 3. The Logic of Quantified Statements 3.1. Predicates and Quantified Statements I Predicate in grammar Predicate refers to the part of a sentence that gives information about the subject. Example:
More informationECOM Discrete Mathematics
ECOM 2311- Discrete Mathematics Chapter # 1 : The Foundations: Logic and Proofs Fall, 2013/2014 ECOM 2311- Discrete Mathematics - Ch.1 Dr. Musbah Shaat 1 / 85 Outline 1 Propositional Logic 2 Propositional
More informationReview Topics for MATH 1400 Elements of Calculus Table of Contents
Math 1400 - Mano Table of Contents - Review - page 1 of 2 Review Topics for MATH 1400 Elements of Calculus Table of Contents MATH 1400 Elements of Calculus is one of the Marquette Core Courses for Mathematical
More informationPSU MATH RELAYS LOGIC & SET THEORY 2017
PSU MATH RELAYS LOGIC & SET THEORY 2017 MULTIPLE CHOICE. There are 40 questions. Select the letter of the most appropriate answer and SHADE in the corresponding region of the answer sheet. If the correct
More informationIntroduction to Vector Spaces Linear Algebra, Spring 2011
Introduction to Vector Spaces Linear Algebra, Spring 2011 You probabl have heard the word vector before, perhaps in the contet of Calculus III or phsics. You probabl think of a vector like this: 5 3 or
More informationLogic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:
Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements. An inference mechanism (a collection of rules) to
More informationTopics in Logic and Proofs
Chapter 2 Topics in Logic and Proofs Some mathematical statements carry a logical value of being true or false, while some do not. For example, the statement 4 + 5 = 9 is true, whereas the statement 2
More informationChapter 4, Logic using Propositional Calculus Handout
ECS 20 Chapter 4, Logic using Propositional Calculus Handout 0. Introduction to Discrete Mathematics. 0.1. Discrete = Individually separate and distinct as opposed to continuous and capable of infinitesimal
More information