A2 Part A Mathematical Logic

Slides:



Advertisements
Similar presentations
Logic ChAPTER 3.
Advertisements

Lecture 3 – February 17, 2003.
Introduction to Proofs
PROOF BY CONTRADICTION
Appetizer: True or False 1.2  2 2.If 2 = 3, then 5 = 6. 3.If 1 = 2, then I am the Pope. 4.Open the window. 5.If the proof is wrong, then the proposition.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
2/17/2008Sultan Almuhammadi1 ICS Logic & Sets (An Overview) Week 1.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Inference Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Copyright © Cengage Learning. All rights reserved.
Propositional Logic Lecture 2: Sep 9. Conditional Statement If p then q p is called the hypothesis; q is called the conclusion “If your GPA is 4.0, then.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
Logic ChAPTER 3.
Propositional Logic.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference.
Discrete Maths 2. Propositional Logic Objective
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Methods of Proof CS/APMA 202 Epp, chapter 3 Aaron Bloomfield.
Ch 1.5: Basic Proof Methods II Proof by Contraposition of P => Q Suppose ~Q …proof details here…. Therefore, ~P (via a direct proof) Thus, ~Q => ~P. Therefore,
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Review I Rosen , 3.1 Know your definitions!
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
CSci 2011 Discrete Mathematics Lecture 6
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
Homework Review notes Complete Worksheet #1. Homework Let A = {a,b,c,d}, B = {a,b,c,d,e}, C = {a,d}, D = {b, c} Describe any subset relationships. 1.
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Chapter 3 section 3. Conditional pqpqpq TTT TFF FTT FFT The p is called the hypothesis and the q is called the conclusion.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
Do you agree with the following proofs? 1.Prove that  2 is irrational. Proof: Suppose that  2 is not irrational, then  2 = p/q for some natural numbers.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
CS104:Discrete Structures Chapter 2: Proof Techniques.
Methods of Proof – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Methods of Proof Reading: Kolman, Section 2.3.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Methods of Proof Lecture 4: Sep 20 (chapter 3 of the book, except 3.5 and 3.8)
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Propositional and predicate logic
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Aim 1.4: To work with conditionals and biconditionals Do Now: Determine the truth value of the following sentences: 1.9 is a prime number and New York.
Law of logic Lecture 4.
Chapter 1 Logic and proofs
Indirect Argument: Contradiction and Contraposition
(CSC 102) Discrete Structures Lecture 2.
Copyright © Cengage Learning. All rights reserved.
Elementary Number Theory & Proofs
Indirect Argument: Contradiction and Contraposition
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

A2 Part A Mathematical Logic Section 1 Simple Proposition (Statements) Hong Kong is an international city. Opposite angles of a parallelogram are equal. Blind men can see. 2+3=7. True or False T F

Composite proposition True or False T Proposition John is a boy and Mary is a girl. Snow is white or the sun rises from the West. If today is Friday then the earth is spherical.

Example 1.1 Determine the truth values of the following: Paris is the capital of France and 2+2=5. Christine is a girl and the sun rises from the East. Yellow river is in Europe or snow is black. 22

Truth Tables (I) “P and Q”, denoted by PQ F Sometimes composite proposition is so complicated that its true value is not obvious, we need to study it in a more systematic way I.e. by constructing truth tables.

Truth Table for “P or Q”, denoted by P Q

Truth Table for negation of P, denoted by ~P

Negate the following statements: (i) The sun is spherical and the plane can fly. (ii) London is not the capital of China or the house is made of wood.

Section 2 Equivalence of Two Propositions Two propositions with the same components P, Q, R,… are said to be logically equivalent(or equivalent) if they have the same truth value for any truth values of their components.

De Morgan’s Law Let P, Q be two propositions, then (I) ~(PQ)  (II) ~(PQ) 

Proof of ~(PQ)  (~P)(~Q) T F

Proof of ~(P  Q)  (~P)  (~Q) T F

Section 3 Conditional Propositions: If P then Q, denoted by P Q Determine the truth value of the following: If Confucius was Chinese then London is the capital of China. If a man can live without air then the earth will explode at the end of the century. If x = 2 then x2 = 4. If a triangle is isosceles then the base angles are equal. If n2 is an even integer then n is an even integer. Sometimes it is very difficult to determine the truth value of a complicated statement, we therefore need truth table very much.

Truth Table for P Q P Q P  Q T F

Definition 3.4 Make the truth tables for these four propositions. Are they equivalent? Definition 3.4 Let P Q be a conditional proposition. This proposition has the following three derivatives(衍生命題): The converse(逆命題) Q P, The inverse(否命題) (~P) (~Q) The contrapositive(逆反命題) (~Q)  (~P)

Proof by contrapositive(反證法) P Q  (~Q) (~P) Example 1 If n2 is an even integer then n is an even integer. Proof: If n is odd, then n = 2k + 1 and (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1 is odd. Thus by contrapositive, the proposition is correct.

Example 2 Given that p and m are real numbers such that p3+m3=2, prove that p + m  2. Proof: Assume that p+m>2, then p3+m3>(2-m)3+m3=6m2-12m+8=6(m-1)2+2>2. Thus, by contrapositive, p + m  2.

Write down the contrapositive of the following propositions: If you pass both Physics and Chemistry, then you are able to promote to F.7. If x2  4 and x > 0, then x  2.

Proof by contradiction(歸謬法) (~P)  F Class work : Use the method of contradiction to prove that 3 is irrational. Proof by contradiction(歸謬法) (~P)  F Example 3.3 Use the method of contradiction to prove that 2 is irrational. Proof: Suppose that 2 is not irrational, then 2 = p/q for some natural numbers p, q where (p, q) = 1. Since 2 =p2/q2, therefore 2q2=p2. This implies that 2|p2 and hence 2|p. So p=2k for some integer k. Putting it back to 2q2=p2, 2q2=(2k)2 i.e. q2=2k2. Again, we have 2|q and 2|(p, q) , which is a contradiction.

Theorem (proved by Euclid): There are infinitely many prime numbers. Proof: Assume there are only n prime numbers, say p1, p2, p3,…,pn. Now construct a new number p= p1p2p3…pn + 1, then p is a new prime number since p is not divisible by pi’s and p > pi’s. This leads to a contradiction that p1, p2, p3,…,pn are the only prime numbers. So there are infinitely many prime numbers.

Sometimes the proposition is conditional i.e. PQ, We need to negate it in order to prove it by contradiction.i.e. ~ (PQ) F. But ~ (PQ)  ? (Hint: Find an equivalent statement for PQ which involves P, Q, ~ and .)

PQ  (~P)Q P Q P  Q (~P )  Q T F T T F F F F T T T T T F

~(PQ) ~( (~P)Q)  P(~Q) Write down the negation of P Q If today is Sunday, you need not go to school. If I can live without food, then I need not earn money. P (P Q) In the classroom, all students are girls.

Write the negation of: Nobody can answer the question. All triangles having equal bases and equal heights have equal areas. Some people cannot swim. At least there is man who does not like watching television programs. For every positive M, there exists a real number x0 such that x0+logxo>M

Examples of proof by contradiction ~(PQ) ~( (~P)Q)  P(~Q) F If x=2, then x is irrational. Proof: Assume that x= 2 and x is not rational, then … If x=n and y=n+1, then x and y are relatively prime. Proof: Assume that x=n and y=n+1 and x and y have common factor other than 1, say f, then n=fg and n+1=fh. So 1 = f(h-g) and hence f=1, which is a contradiction. Thus the proposition is true. P.65, Q.6

Illustrative Examples If ABC is a acute triangle and A>B>C, prove that B> 45. Proof: Assume that ABC is a acute triangle and B 45, then C < 45. But A=180 - B- C > 90 leads to a contradiction that ABC is a acute triangle. Thus,by the method of contradiction, B> 45.

4. Given that a, b,c and d are real numbers and ad-bc=1, prove that a2+b2+c2+d2+ab+cd1. Proof: Assume that a, b,c and d are real numbers and ad-bc=1, but a2+b2+c2+d2+ab+cd=1, then a2+b2+c2+d2+ab+cd=ad-bc. Multiplying it by 2, we get 2a2+2b2+2c2+2d2+2ab+2cd-2ad+2bc=0 i.e.(a+b)2+(b+c)2+(c+d)2+(a-d)2=0 a+b=b+c=c+d=a-d=0 i.e.a=b=c=d=0, which contradict to that ad-cd=1. Thus, by the method of contradiction, a2+b2+c2+d2+ab+cd  1.

Write the negation of: Nobody can answer the question. For any positive integer n, n + 8 > 0. All students are clever and some of them are lazy. For any even number x, if x is divisible by 3 then x is divisible by 6. There exist natural numbers p and q such that 2 = p/q.

Definition 3.2 When the conditional proposition P Q is always true, we write P Q and read as P implies Q. For instance, it is correct to write “x = 2  x2 = 4”, but incorrect to write “x + a = b  x = a + b”

Definition 3.3 Let P Q be a conditional proposition. Then P is called the sufficient condition (充分條件) for Q, and Q is the necessary condition(必要條件) for P.

Pick out the different one from the following statements: If I receive a bonus, I shall have a holiday in Spain. I shall have a holiday in Spain if I receive a bonus. I shall have a holiday in Spain provided that I receive a bonus. I receive a bonus only if I shall have a holiday in Spain. Receiving a bonus is a sufficient condition for a holiday in Spain. Having a holiday in Spain is a necessary condition for receiving a bonus.

Universal Quantifier :  for all Existential Quantifier:  for some Classwork:1.Translate the propositions on P.64 Q4 to symbols. 2.Negate the above Propositions. Universal Quantifier :  for all Existential Quantifier:  for some Some birds are white. In symbol, (bird B)(B is white) 2. For any integer n , the equation x2-nx+1=0 must have a real solution. (integer n)(x2-nx+1=0 has a real solution) The equation xn+yn=zn has no integral solutions for all integers n  3. (integer n 3)(xn+yn=zn has no integral solutions.) For some real numbers n, if n2=4 then n = 2. (real n)(n2=4  n = 2)

Section 4 Biconditional Propositions Definition 4.1 Let P and Q be two propositions. The biconditional proposition PQ (read as “P if and only if Q”) is defined as P Q  (PQ) (QP)

Complete the Truth Table of P Q  (PQ) (QP)

B Example 4.1 h A m n C In the Figure, P is a point on AC such that BPAC, PA = m, PB = h and PC = n. Prove that h2= mn iff ABC = 90.

Theorem 4.1 If (PQ)(Q R) then P R. If (PQ)(Q  R) then P  R. P Q  Q  P Group discussion: Prove proposition 1-3

If (PQ)(Q R) then P R. Proof:  P R T F

Exercise on Logic Prove that if 3|n2 then 3|n. Prove that for any real numbers a, b, c and d, if a + bi = c + di then a = c and b=d, where i2= -1. Prove that 3 is irrational. Prove that log2 is irrational. Prove that if 0 x < y for any real number y, then x = 0. Prove that if f(x) is not identically zero and f(xy) = f(x)f(y), the f(x)  0 for any non-zero real number x. The product of any five consecutive natural numbers is not a perfect square.