1 Introduction to Abstract Mathematics The Logic of Compound Statements 2.1 and 2.2 Instructor: Hayk Melikya

Slides:



Advertisements
Similar presentations
Introduction to Proofs
Advertisements

Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
CS128 – Discrete Mathematics for Computer Science
2.2 Conditional Statements. Goals Identify statements which are conditional Identify the antecedent and consequent of a conditional statement Negate conditional.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
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.
Adapted from Discrete Math
The Foundations: Logic and Proofs
Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference.
The Foundations: Logic and Proofs
MATERI II PROPOSISI. 2 Tautology and Contradiction Definition A tautology is a statement form that is always true. A statement whose form is a tautology.
Discrete Mathematics and Its Applications
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
1 Introduction to Abstract Mathematics The Logic and Language of Proofs Instructor: Hayk Melikya Proposition: Informal introduction to.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
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.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Chapter 7 Logic, Sets, and Counting
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
6.1 Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
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.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Chapter 1: The Foundations: Logic and Proofs
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Section 1.1 Propositions and Logical Operations. Introduction Remember that discrete is –the study of decision making in non-continuous systems. That.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
CS104:Discrete Structures Chapter 2: Proof Techniques.
رياضيات متقطعة لعلوم الحاسب 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.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
Section 1.3 Implications. Vocabulary Words conditional operation ( ⇒ or →) conditional proposition conditional statement (implication statement) hypothesis.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Chapter 1 Logic and proofs
Chapter 1 Propositional Logic
Logic.
2. The Logic of Compound Statements Summary
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
Discrete Mathematics Logic of Compound Statements
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
COMP 1380 Discrete Structures I Thompson Rivers University
(CSC 102) Discrete Structures Lecture 2.
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS201: Data Structures and Discrete Mathematics I
Discrete Mathematics and Its Applications Kenneth H
COMP 1380 Discrete Structures I Thompson Rivers University
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

1 Introduction to Abstract Mathematics The Logic of Compound Statements 2.1 and 2.2 Instructor: Hayk Melikya

2 Introduction to Abstract Mathematics Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the study of logic originated in antiquity, it was rebuilt and formalized in the 19 th and early 20 th century. George Boole (Boolean algebra) introduced Mathematical methods to logic in 1847 while Georg Cantor did Theoretical work on sets and discovered that there are many different sizes of infinite sets.

3 Introduction to Abstract Mathematics Logic v Mathematical logic is a tool for dealing with formal reasoning v Logic does: –Assess if an argument is valid/invalid v Logic does not directly: –Assess the truth of atomic statements

4 Introduction to Abstract Mathematics v Logic can deduce that: –NCCU is in North Carolina v given these facts: –NCCU is in Durham –Durham is in North Carolina v Logic knows nothing of whether these facts actually hold in real life!

5 Introduction to Abstract Mathematics Argument #1 v All men are mortal v Socrates is a man v Therefore, Socrates is mortal

6 Introduction to Abstract Mathematics Where is COMP2200 ? v How do we find such bugs in software? –Tracing –Debug statements –Test cases –Many software testers working in parallel… v All of that had been employed in the previous cases v Yet the disasters occurred … Logic : means to prove correctness of software Sometimes can be semi-automated Can also verify a provided correctness proof

7 Introduction to Abstract Mathematics Validity v An argument is valid if and only if given that its premises hold its conclusion also holds –Socrates argument: Valid or Invalid? –Sandwich argument: Valid or Invalid? How can we tell ? v Common sense? v Voting? v Authority? v What is valid argument anyway? v Who cares? v ???

8 Introduction to Abstract Mathematics Arguments in Puzzles v The Island of Knights and Knaves Never lie Always lie v You meet two people: A, B v A says: I am a Knave or B is a Knight v B says A and I are of opposite type v Who is A? v Who is B?

9 Introduction to Abstract Mathematics Solution v The original statement can be written as: v S = X or Y v X = “A is a Knave” v Y = “B is a Knight” v Suppose A is a Knave v Then S must be false since A said it v Then both X and Y are false v If X is false then A is not a Knave v Contradiction : A cannot be a Knave and not a Knave v So A must be a Knight v So S is true and X is not true v Thus, to keep S true Y must be true v So B is a Knight too v You meet just one guy : A v A says:“I’m a Knave!” v Who is A?

10 Introduction to Abstract Mathematics Statements or Propositions v A proposition or statement is a declaration (sentence) which is either true or false (but not both same time). v Some examples: v 2+2 = 5 is a statement because it is a false declaration. v Orange juice contains vitamin C is a statement that is true. v Open the door. This is not considered a statement since we cannot assign a true or false value to this sentence. It is a command, but not a statement or proposition. v WHAT TIME IS IT?. v v X + 5 = 13.

11 Introduction to Abstract Mathematics Negation( or denial) v The negation of a statement, p, is “not p” and is denoted by ~p ( also ┐ p ) v If p is true, then its negation is false. If p is false, then its negation is true.  Truth table: u p ┐p u T F u F T If p : “Jack went up the hill” then ~ p : “ Jack did not go up the hill”

12 Introduction to Abstract Mathematics Conjunction (Logical AND) In ordinary English, we are building new propositions from old ones via connectors. Similar way we will construct new propositions from old ones in mathematics too. Definition: If P and Q are proposition then P  Q is a new proposition which referred to as the conjunction of “P and Q”. The proposition P  Q is true if both P and Q are true propositions and it is false otherwise. PQ P  Q TT T TF F FT F FF F

13 Introduction to Abstract Mathematics Disjunction (Logical OR) Definition: If P and Q are proposition then P  Q is a new proposition which referred to as the disjunction of P and Q. The proposition P  Q is false if both P and Q are false propositions and it is true otherwise. PQ P  Q TT T TF T FT T FF F

14 Introduction to Abstract Mathematics The Implication (Conditional) Definition: If P and Q are proposition then P  Q is a new proposition which referred to as “P implies Q”. The proposition P  Q is false if P is true and Q is false and it is true otherwise PQ P  Q TT T TF F FT T FF T In conditional statements: p  q v p is called the hypothesis and q is called the conclusion v The only combination of circumstances in which a conditional sentence is false is when the hypothesis is true and the conclusion is false

15 Introduction to Abstract Mathematics Conditional Statements: P  Q P is also called: assumption or premise or antecedent A conditional statements is called vacuously true or true by default when its hypothesis is false Q is called : conclusion v There are several ways of expressing P  Q : 1. If P, then Q 2. Q if P 3. P implies Q 4. P only if Q 5. Q is necessary for P 6 P is sufficient for Q

16 Introduction to Abstract Mathematics Exercise: Rewrite each of the following sentences in "if, then" form ( a) You will pass the test only if you study for at least four hours. (b) Attending class regularly is a necessary condition for passing the course. (c) In order to be a square, it is sufficient that the quadrilateral have four equal angles. (d) In order to be a square, it is necessary that the quadrilateral have four equal angles. (e) An integer is an odd prime only if it is greater than 22

17 Introduction to Abstract Mathematics Conditional Statement : p  q v Contrapositive of p  q is another conditional statement ~q  ~p A conditional statement is equivalent to its contrapositive v The converse of p  q is q  p v The inverse of p  q is ~p  ~q v Conditional statement and its converse are not equivalent v Conditional statement and its inverse are not equivalent v What do you think about convers and inverse of statement???????

18 Introduction to Abstract Mathematics Conditional Statements v The converse and the inverse of a conditional statement are equivalent to each other v p only if q means ~q  ~p, or p  q v Biconditional of p and q means “p if and only if q” and is denoted as p  q v r is a sufficient condition for s means r  s v r is a necessary condition for s means ~r  ~ s “if not r then not s” which is same as s  r

19 Introduction to Abstract Mathematics Exercises: Write contrapositive, converse and inverse statements for –If P is a square, then P is a rectangle –If today is Thanksgiving, then tomorrow is Friday –If c is rational, then the decimal expansion of c is repeating –If n is prime, then n is odd or n is 2 –If x is nonnegative, then x is positive or x is 0 –If Tom is Ann’s father, then Jim is her uncle and Sue is her aunt –If n is divisible by 6, then n is divisible by 2 and n is divisible by 3

20 Introduction to Abstract Mathematics Contrapositive: Examples The contrapositive of “if p then q” is “if ~q then ~p”. Statement: If you don’t give me all your money, then you will die immediately. Statement: If you are a CS year 1 student, then you are taking COMP Contrapositive: If you don’t want to die immediately,then you give me all your money. Contrapositive: If you are not taking COMP 2200, then you are not a CS year 1 student. Fact: A conditional statement is logically equivalent to its contrapositive.

21 Introduction to Abstract Mathematics Biconditional v P  Q is often read as : P if and only if Q or P iff Q for shorthand. v phrasing of P  Q is P is a necessary and sufficient condition for Q. Definition: If P and Q are propositions then the biconditional P and Q is a proposition denoted by P  Q whose truth value is given by the truth table PQ P  Q TT T TF F FT F FF T

22 Introduction to Abstract Mathematics Propositional forms/ formulas /expressions: Alphabet: variables (letters upper/lower X, Y, Z, … A, B, C ) symbols , , ~, and parentheses (, ) also we add two more , , Propositional expressions (propositional forms) are formed using these elements of alphabet as follows: 1. Each variable is propositional expression 2. IF p and q are propositinal expressions then ~ p, p  q, p  q, p  q, p  q, (p), all are propositional expressions 3. Any expression is obtained by applying repeatedly steps 1 or 2.

23 Introduction to Abstract Mathematics Truth Tables Recall that propositional forms are made up of propositional variables and logical connectors in such a way that if one substitute the propositional variables by actual propositions then it becomes proposition. The truth table for a given propositional form displays the truth values that corresponds to all possible combinations of truth values for its propositional variables. Let us construct the truth table for propositional form (p  q)  ~(p  q) which often denoted as p  q (p XOR q) exclusive or pqp  qp  q~(p  q)p  q TTTTFF TFTFTT FTTFTT FFTTFF

24 Introduction to Abstract Mathematics Logical Equivalence Two propositional forms are cold logically equivalent if they have identical truth tables. If propositional forms p and q are logically equivalent we write p  q, p qp  q~p~p  q TTTFT TFFFF FTTTT FFTTT Show that p  q is logically equivalent to ~p  q

25 Introduction to Abstract Mathematics Tautology and contradiction Definition: A propositional form (compound proposition) is called a tautology if it is true for all possible combinations of truth values assigned to propositional variables (component propositions ). ( p  ~p )  t ( toutalogy) Definition: A propositional form (compound proposition ) is called a contradiction if it is false for all possible combinations of truth values of the propositional variables (component propositions) ( p  ~p )  c (contradiction) A compound proposition is a proposition composed of one or more given propositions (called the component propositions in this context) and at least one logical connective.

26 Introduction to Abstract Mathematics Examples: v Write truth table for: p  q  ~p v Show that (p  q)  r  (p  r)  (q  r) v Representation of  : p  q  ~p  q Re-write using if- then: Either you get in class on time, or you risk missing some material v Negation of  : ~(p  q)  p  ~q Write negation for: If it is raining, then I cannot go to the beach

27 Introduction to Abstract Mathematics Theorem RR ( See theorem 1.1.1) ( replacement rules) 1. Commutative Law [Com] 2. Associative Law [Assoc] P  Q  Q  P, (P  Q )  R  P  (Q  R) P  Q  Q  P (P  Q )  R  P  (Q  R) 3. Distributive Law [Dist] 4. Contrapositive Law [Contr] P  (Q  R)  (P  Q)  (P  R) (P  Q)  (~ Q  ~ P) P  (Q  R)  (P  Q)  (P  R) 5. DeMorgan Law [DeM] 6. Double Negation [DN] ~ ( P  Q)  (~ P  ~ Q ) ~ ~ (P)  P ~ ( P  Q)  (~ P  ~ Q ) 7. Implication Law [Impl] 8. Equivalence Law [Equiv] (P  Q)  (~ P  Q) P  Q  ( P  Q)  (Q  P) P  Q  (P  Q)  (~ Q  ~ P) 9. Exportation [Exp] 10. Tautology (Identity) [Taut] (P  Q)  R  P  (Q  R) P  P  P or P  P  P 11. P  t  P and P  c  c 12 P  t  t and P  c  P t-tautolagy and c-contradiction

28 Introduction to Abstract Mathematics Practice problems 1. Study the Sections 2.1 and 2.2 from your textbook. 2. Be sure that you understand all the examples discussed in class and in textbook. 3. Only after you complete the proof of the Theorem_RR from the notes 4. Do the following problems from the textbook: Exercise 2.1, # 2, 3, 7, 8, 15, 26, 36, 43, 44, 46, 51. Exercise 2.2, # 9, 15, 18, 21, 25, 27, 36, 44, 46, 48.