Course notes1

11
PART I: MATHEMATICAL LOGIC “Although mathematics is both a science and an art, special characteristics distinguish mathematics from the humanities and from other sciences. Particularly important is the kind of reasoning that typifies mathematics. The natural or social scientist generally makes observations of particular cases or phenomena and seeks a general theory that describes or explains the observations. This approach is called inductive reasoning, and it is tested by making further observations. If the results are incompatible with theoretical expectations, the scientist usually must reject or modify his theory. The mathematician, too, frequently uses inductive reasoning in attempting to describe patterns and relationships among quantities and structures. The characteristic thinking of the mathematician, however, is deductive reasoning, in which one uses logic to draw conclusions based on statements accepted as true. The conclusions of a mathematician are proved to be true, provided that assumptions are true. If a mathematical theory predicts results incompatible with reality, the fault will lie not in the theory but with the inapplicability of the theory to that portion of reality. Indeed, the mathematician is not restricted to the study of observable phenomena, even though mathematics can trace its development back to the need to describe spatial relations (Geometry) and motion (Calculus) or to solve numerical problems (Algebra). Using logic, the mathematician can draw conclusions about any mathematical structure imaginable.” The basics of logic and the idea of proof are important in many areas other than mathematics. For example, the thought processes used to construct an algorithm for a computer program are much like those used to develop the proof of a theorem. What is Logic? An instrument used to appraise the correctness of reasoning. The study of propositions / reasoning What is a proposition? Declarative statement that is either true or false, but not both. Examples: The square root of 2 is irrational. 1+1 = 5 In the year 2000, more than a thousand Filipinos migrated to Canada. -5 < 75 Examples of sentences that are not propositions: What did you say? x = 6. This sentence is false. Notation: The truth values of propositions are: 1 or T for true 0 or F for false Capital letters are used to denote propositions. PROPOSITIONS AND CONNECTIVES: 1. Negation of Propositions ( P ) Formed by introducing the word “not” in a proper place in the proposition. Suppose P is a proposition P is the negation of P

description

 

Transcript of Course notes1

Page 1: Course notes1

PART I: MATHEMATICAL LOGIC “Although mathematics is both a science and an art, special characteristics distinguish

mathematics from the humanities and from other sciences. Particularly important is the kind of reasoning that typifies mathematics. The natural or social scientist generally makes observations of particular cases or phenomena and seeks a general theory that describes or explains the observations. This approach is called inductive reasoning, and it is tested by making further observations. If the results are incompatible with theoretical expectations, the scientist usually must reject or modify his theory.

The mathematician, too, frequently uses inductive reasoning in attempting to describe patterns and relationships among quantities and structures. The characteristic thinking of the mathematician, however, is deductive reasoning, in which one uses logic to draw conclusions based on statements accepted as true. The conclusions of a mathematician are proved to be true, provided that assumptions are true. If a mathematical theory predicts results incompatible with reality, the fault will lie not in the theory but with the inapplicability of the theory to that portion of reality. Indeed, the mathematician is not restricted to the study of observable phenomena, even though mathematics can trace its development back to the need to describe spatial relations (Geometry) and motion (Calculus) or to solve numerical problems (Algebra). Using logic, the mathematician can draw conclusions about any mathematical structure imaginable.”

The basics of logic and the idea of proof are important in many areas other than mathematics. For example, the thought processes used to construct an algorithm for a computer program are much like those used to develop the proof of a theorem.

What is Logic?

• An instrument used to appraise the correctness of reasoning. • The study of propositions / reasoning

What is a proposition?

• Declarative statement that is either true or false, but not both. Examples: The square root of 2 is irrational. 1+1 = 5 In the year 2000, more than a thousand Filipinos migrated to Canada. -5 < 75 Examples of sentences that are not propositions: What did you say? x = 6. This sentence is false.

Notation:

• The truth values of propositions are: 1 or T for true

0 or F for false

• Capital letters are used to denote propositions. PROPOSITIONS AND CONNECTIVES:

1. Negation of Propositions ( P ) • Formed by introducing the word “not” in a proper place in the proposition. • Suppose P is a proposition

P is the negation of P

Page 2: Course notes1

• Truth table

P P 1 0 0 1

EXAMPLE: It is not the case that the square root of 10 is greater than 4. 10 is not divisible by 2.

2. Conjunction ( P ∧ Q ) • Truth table

P Q P ∧ Q 1 1 1 1 0 0 0 1 0 0 0 0

EXAMPLE: 6<7 and 7<8. 2*4=16 and a quart is larger than a liter. 3. Disjunction ( P ∨ Q )

• Truth table

P Q P ∨ Q 1 1 1 1 0 1 0 1 1 0 0 0

EXAMPLES: Venus is smaller than earth or 1+4 = 5. The square root of 2 is less than the square root of 3 or chicken have lips. 4. Implication or Conditional Statement (P⇒Q) read as: If P then Q • P is called the hypothesis or the premise • Q is called the conclusion

• Truth table

P Q P ⇒ Q 1 1 1 1 0 0 0 1 1 0 0 1

EXAMPLES: If triangle ABC is isosceles, then the base angles A and B are equal. Mars has 10 moons implies that 1+1 = 2. 1+2=3 implies that 1<0. If the sun shines tomorrow then I will play basketball. If you get 100 in the final exam then you will pass this course.

Page 3: Course notes1

5. Logical Equivalence or the Biconditional Statement (P⇔Q) read as: P if and only if Q • P ⇔ Q is equal to (( P ⇒ Q ) ∧ (Q ⇒ P)) • Truth table

P Q P ⇒ Q Q ⇒ P P ⇔ Q

or ( P ⇒ Q ) ∧ ( Q⇒P)

1 1 1 1 1 1 0 0 1 0 0 1 1 0 0 0 0 1 1 1

EXAMPLES : A rectangle is a square if and only if the rectangle’s diagonals are perpendicular. 5+6=6 if and only if 7+1=10. Types of Propositional Forms

Tautology • A proposition that is always true under all possible combination of truth values for all

component propositions.

example: (P∧Q) ⇒ P P Q P∧Q (P∧Q) ⇒ P 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 1 Contradiction

• A proposition that is always false under all possible combination of truth values of the component propositions.

example: P∧¬P P ¬P P∧¬P 0 1 0 1 0 0

Contingency • The combination of tautology and Contradiction

a proposition which is neither a tautology nor a contradiction ex. (P v Q ) ⇒ P P Q P v Q ( P v Q) ⇒ P 1 1 1 1 1 0 1 1 0 1 1 0 0 0 0 1

Page 4: Course notes1

Rules of Replacement

( equivalent propositions) Any logically equivalent expressions can replace each other wherever they occur. 1. Idempotence

P ⇔ ( P ∨ P )

P ⇔ ( P ∧ P )

2. Commutativity ( P ∨ Q ) ⇔ ( Q ∨ P ) ( P ∧ Q ) ⇔ ( Q ∧ P )

3. Associativity ( P ∨ Q ) ∨ R ⇔ P ∨ ( Q ∨ R ) ( P ∧ Q ) ∧ R ⇔ P ∧ ( Q ∧ R )

4. De Morgan’s Laws

( P ∨ Q ) ⇔ P ∧ Q

( P ∧ Q ) ⇔ P ∨ Q 5. Distributivity of ∧ over ∨

P ∧ ( Q ∨ R ) ⇔ ( P ∧ Q ) ∨ ( P ∧ R ) 6. Distributivity of ∨ over ∧

P ∨ ( Q ∧ R ) ⇔ ( P ∨ Q ) ∧ ( P ∨ R )

7. Double Negation

P ⇔ P

8. Material Implication ( P ⇒ Q ) ⇔ ( P ∨ Q )

9. Material Equivalence ( P ⇔ Q ) ⇔ ( P ⇒ Q ) ∧ ( Q⇒P )

10. Exportation

[ ( P ∧ Q ) ⇒ R ] ⇔ [ P ⇒ ( Q ⇒ R ) ]

11. Absurdity [ ( P ⇒ Q ) ∧ ( P ⇒ Q )] ⇔ P

12. Contrapositive ( P ⇒ Q ) ⇔ ( Q ⇒ P )

13. Identity P ∨ 1 ⇔ 1 P ∧ 1 ⇔ P P ∨ 0 ⇔ P P ∧ 0 ⇔ 0 P ∨ P ⇔ 1 P ∧ P ⇔ 0 0 ⇔ 1 1 ⇔ 0

13. Absorption P ∧ ( P ∨ R ) ⇔ P P ∨ ( P ∧ R ) ⇔ P

EXAMPLES: 1. SHOW THAT [P<=>Q] <=>[(P∧Q) ∨ (¬P ∧ ¬Q)] P Q P<=>Q P∧Q ¬P∧¬Q (P∧Q)∨(¬P∧¬Q) 1 1 1 1 0 1 1 0 0 0 0 0

Page 5: Course notes1

0 1 0 0 0 0 0 0 1 0 1 1 Corresponding TRUTH VALUES OF THE PROPOSITIONS ARE EQUAL. Therefore, [P<=>Q] <=>[(P∧Q) ∨ (¬P ∧ ¬Q)] is a tautology. Hence, P<=>Q is equivalent to [(P∧Q) ∨ (¬P ∧ ¬Q)]. 2. SIMPLIFY [(P⇒Q) v (P⇒R)] ⇒( Q v R ) [(¬P v Q )v(¬P v R)] ⇒ (Q v R) MI [(¬P v¬P)v(Q v R)] ⇒( Q v R ) Assoc. [¬Pv(QvR) ] ⇒ ( Q v R ) Idempotence ¬[¬P v( Q v R ) v ( Q v R ) MI [P∧¬(QvR)]v(QvR) Dem, DN [Pv(QvR)]∧[¬(QvR)v(QvR)] Distributivity [Pv (QvR)]∧1 Identity Pv(QvR) Identity 3. On a rare TV game show, a young couple was shown three keys labeled A, B and C and was told

that they could win a beautiful new home simply by picking the key which opened its front door. To help the couple make their decision, the EMCEE of the show gave them the following pieces of information: “ Either key A will open the door, or key B will not and key C will. “

“ If key B will not open the door then key C will. “

“ It is impossible that either both keys A and B will open the door or both keys A and C will.”

After a few minute-reflection the couple made the correct choice. WHICH KEY DID THE COUPLE PICK? Show a solution that uses a TRUTH TABLE.

By truth table, show that every condition is true if key chosen is A or B or C.

Solution:

A B C A ∨ ( B ∧ C) B ⇒ C [(A ∧ B) ∨ (A ∧ C)] 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1

Key C is the one chosen. EXERCISE. Prove each of the rules of replacement using truth tables Argument

• An argument is a collection of propositions where it is claimed that one of the propositions ( the conclusion ), follows from the other propositions (the premises). Inductive Argument

• One where it is claimed that within a certain probability of error the conclusion follows from the premises

Deductive Argument • One where it is claimed that the conclusion absolutely follows from the premises.

valid Argument

Page 6: Course notes1

• A deductive argument is said to be valid if whenever the premises are all true and the conclusion is also true.

Rules of Inference ( Basic Valid Arguments ) 1.Addition

P ______ ∴P v Q

2.Conjunction

P Q ______ ∴P∧Q

3.Simplification

P∧Q _______ ∴P

4.Modus Ponens

P⇒ Q P ______ ∴ Q

5. Modus Tolens

P⇒ Q ¬Q ______ ∴¬P

6.Disjunctive Syllogism

P v Q ¬P ______ ∴Q

7. Hypothetical Syllogism

P⇒Q Q⇒R ______ ∴P⇒ R

8.Constructive Dilemma

(P⇒Q)∧(R⇒S) P v R

Page 7: Course notes1

______ ∴Q v S

9.Destructive Dilemma

(P⇒Q)∧(R⇒S) ¬Q v ¬S ______ ∴¬P v ¬R

Proving Invalidity

• To show that an argument is invalid , we make an argument of truth values to the component propositions that will make the premises true and the conclusion false.

example:

J ⇒ ( K ⇒ L ) 1 J = 1 K ⇒ (

L ⇒ M ) 1 K = 0 ( L ∨ M ) ⇒ N 1 L = 0 M = 0 ∴ J ⇒ N 0 N = 0 Invalid R=>P P = 1 P v Q Q = 0 ______ ∴P=>Q R = O Rule of conditional Proof

• To prove P ⇒ Q, include P among the premises and prove Q instead. Ex. 1. A=>(B=>C) 2. B=>(C=>D) _____ ∴ A=>(B=>D) 3. A Rule of conditional proof ∴B=>D 4.B Rule of conditional proof ∴D 5. C=>D MP 2,4 6. B =>C MP 1,3 7. C MP 4,6 8. D MP 5,7 Rule of Indirect Proof

• To Prove Q, include Q among the premises and derive a contradiction (prove 0). Ex. 1.P⇒Q

Page 8: Course notes1

2.Q⇒R 3.S⇒¬R 4.¬S⇒¬T 5.¬T⇒¬Q ----------- ∴ ¬P 6.¬¬P Rule of indirect proof ______ ∴ 0 7.P DN 6 8.Q MP 1,7 9.R MP 2,8 10.¬S MT 3,9 11.¬T MP 4,10 12. ¬Q MP 5,11 13. Q ∧ ¬Q Conj. 8,12 14. 0 identity 13 Examples:

1. Prove the following arguments a. (A v G )=> S

(A∧T) ______

∴ S Proof: (1) (A v G )⇒ S (2) (A∧T) ______ ∴ S (3) A Simp. 2 (4) A v G Add. 3 (5) S MP 1,4 b. (1) (A∧B)⇒[A ⇒(D∧E)] (2) (A∧B)∧C _____ ∴D v E (3) A∧B Simp. 2 (4) A ⇒(D∧E) MP 1,3 (5) A Simp. 3 (6) D∧E MP 4, 5 (7) D Simp. 6 (8) D v E Add. 7 2.“ If we are a rich nation then we can help the poor. If we can help the poor then surely we should.

On the other hand, if the poor can help themselves then we shouldn’t help them. But if the poor can’t help themselves then there are not sufficient jobs. If there are not sufficient jobs then we can’t help the poor. But either the poor can help themselves or they cannot. Hence, either way, it seems that we are not a rich nation! ”

Page 9: Course notes1

Let P = we are a rich nation, Q = we can help the poor, R = we should help the poor, S = the poor can help themselves,

T = there are sufficient jobs

Proof:

1. P ⇒ Q 2. Q ⇒ R 3. S ⇒ R 4. S ⇒ T 5. T ⇒ Q 6. S ∨ S

∴ P

7. ¬S ⇒ ¬Q HS (4,5) 8. Q ⇒ S Contrapositive (7) 9. Q ⇒ ¬R HS ( 8,3) 10. ¬R ⇒ ¬Q Contrapositive (2) 11 Q ⇒ ¬Q HS (9,10) 12. ¬Q ∨ ¬Q Material Implication (11) 13. ¬Q Idempotence (12) 14. ¬P MT (1,13) 3.“ If the test subject asks for food then he is hungry and if he is deprived of food for twenty-four hours,

he is hungry. Analysis of the test subject’s blood will indicate an absence of significant amount of glucose only if he is deprived of food or asks for food. Hence, if the analysis of the subjects blood shows an absence of significant amount of glucose, he is hungry.”

Let P = subject asks for food, Q = he is hungry, R = he is deprived of food, S = Analysis shows an absence of glucose

Proof:

1. ( P ⇒ Q ) ∧ ( R ⇒ Q ) 2. S ⇒ ( R ∨ P )

∴ S ⇒ Q

3. S Conditional Proof

∴ Q

4. R ∨ P MP (2,3) 5. P ∨ R Comm (4) 6. Q ∨ Q CD (1,5) 7. Q Idempotence

4. If universities charge no tuition, everyone will enter. If universities charge tuition, there is no equality of opportunity unless deserving students get scholarships. But universities must either not charge or charge tuition. Moreover, it is false that everyone will enter universities. Accordingly, if there is equality of opportunity, then deserving students get scholarship. Let P- universities charge tuition Q-everyone will enter R-there is equality in opportunity

Page 10: Course notes1

S-deserving students get scholarships 1. ¬P ⇒ Q 2. p ⇒ ¬RvS 3. P ∨ ¬P 4. ¬Q ______ ∴R⇒S 5.P 6.P∨Q 7.¬R∨S 8.R⇒S 5. If the world is chaos, then it cannot be reformed unless a sage appears. But no sage can appear if the world is chaos. The world surely is chaos. Hence, it cannot be reformed. Let P= The world is chaos, Q= The world can be reformed R-sage appears 1.P⇒(¬Q∨R) 2.P⇒¬R 3.P ______ ∴¬Q 1.P⇒(¬Q∨R) 2.P⇒¬R 3.P ______ ∴¬Q 4.¬Q∨R 5.¬R 6.¬Q USEFUL TRANSLATIONs P ∧ Q P and Q P despite Q P but Q Despite P, Q P although Q P inspite of Q Although P, Q P whereas Q Not only P, but also Q P yet Q While P, Q P while Q P ∨ Q P or Q P and/or Q P or Q or both P unless Q Either P or Q P ⇒ Q If P then Q Q if P If P, Q Q provided that P P only if Q Q incase of P

Page 11: Course notes1

P implies Q P ⇔ Q P if and only if Q If p and only then Q If and only if P, Q P just incase Q If P, and only if Q