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.

Slides:



Advertisements
Similar presentations
Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
Advertisements

© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
CS128 – Discrete Mathematics for Computer Science
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Discrete Mathematics Lecture 2 Alexander Bukharovich New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
Discrete Mathematics Math 6A Instructor: M. Welling.
Introduction to Logic Logical Form: general rules
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
Harper Langston New York University Summer 2015
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Chapter 2 – Fundamentals of Logic. Outline Basic Connectives and Truth Tables Logical Equivalence: The Laws of Logic Ligical Implication: Rules of Inference.
Copyright © Curt Hill Rules of Inference What is a valid argument?
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
Review I Rosen , 3.1 Know your definitions!
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Chapter 1 Logic Section 1-1 Statements Open your book to page 1 and read the section titled “To the Student” Now turn to page 3 where we will read the.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
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.
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.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
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.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
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.
CS203 Discrete Mathematical Structures
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
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?
CSci 2011 Discrete Mathematics Lecture 4 CSci 2011.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
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
2. The Logic of Compound Statements Summary
3. The Logic of Quantified Statements Summary
Chapter 2 Fundamentals of Mathematical Logic
CSE15 Discrete Mathematics 01/23/17
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Discrete Mathematics Logic.
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
CMSC Discrete Structures
CS100: Discrete structures
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
CMSC Discrete Structures
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Logic.
Discrete Mathematics Lecture 4 Logic of Quantified Statements
Foundations of Discrete Mathematics
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:

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 are needed, which cannot be taught Chapter 2

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables statements (propositions): declarative sentences that are either true or false--but not both. Eg. Margaret Mitchell wrote Gone with the Wind. 2+3=5. not statements: What a beautiful morning! Get up and do your exercises.

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables primitive and compound statements combined from primitive statements by logical connectives or by negation ( ) logical connectives: (a) conjunction (AND): (b) disjunction(inclusive OR): (c) exclusive or: (d) implication: (if p then q) (e) biconditional: (p if and only if q, or p iff q)

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables "The number x is an integer." is not a statement because its truth value cannot be determined until a numerical value is assigned for x. First order logic vs. predicate logic

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables Truth Tables p q

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables Ex. 2.1s: Phyllis goes out for a walk. t: The moon is out. u: It is snowing. : If the moon is out and it is not snowing, then Phyllis goes out for a walk. If it is snowing and the moon is not out, then Phyllis will not go out for a walk.

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables Def A compound statement is called a tautology(T 0 ) if it is true for all truth value assignments for its component statements. If a compound statement is false for all such assignments, then it is called a contradiction(F 0 ). : tautology : contradiction

Chapter 2. Fundamentals of Logic 2.1 Basic connectives and truth tables an argument: premisesconclusion If any one ofis false, then no matter what truth value q has, the implication is true. Consequently, if we start with the premises --each with truth value 1--and find that under these circumstances q also has value 1, then the implication is a tautology and we have a valid argument.

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Ex pq Def 2.2. logically equivalent

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic logically equivalent We can eliminate the connectivesand from compound statements. (and,or,not) is a complete set.

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Ex 2.8. DeMorgan's Laws p and q can be any compound statements.

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Law of Double Negation Demorgan's Laws Commutative Laws Associative Laws

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Distributive Law Idempotent Law Identity Law Inverse Law Domination Law Absorption Law

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic All the laws, aside from the Law of Double Negation, all fall naturally into pairs. Def. 2.3 Let s be a statement. If s contains no logical connectives other than and, then the dual of s, denoted s d, is the statement obtained from s by replacing each occurrence of and by and, respectively, and each occurrence of T 0 and F 0 by F 0 and T 0, respectively. Eg. The dual of is

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Theorem 2.1 (The Principle of Duality) Let s and t be statements. If, then. Ex. 2.10is a tautology. Replace each occurrence of p by is also a tautology. First Substitution Rule (replace each p by another statement q)

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Second Substitution Rule Ex. 2.11Then, because Ex Negate and simplify the compound statement

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Ex What is the negation of "If Joan goes to Lake George, then Mary will pay for Joan's shopping spree."? Because The negation is "Joan goes to Lake George, but (or and) Mary does not pay for Joan's shopping spree."

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Ex pq contrapositive of converse inverse

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic Compare the efficiency of two program segments. z:=4; for i:=1 to 10 do begin x:=z-1; y:=z+3*i; if ((x>0) and (y>0)) then writeln(‘The value of the sum x+y is’, x+y) end. if x>0 then if y>0 then … Number of comparisons? 20 vs. 10+3=13 logically equivalent

Chapter 2. Fundamentals of Logic 2.2 Logical Equivalence: The Laws of Logic simplification of compound statement Ex Demorgan's Law Law of Double Negation Distributive Law Inverse Law and Identity Law

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference an argument: premisesconclusion is a valid argument is a tautology

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex statements: p: Roger studies. q: Roger plays tennis. r: Roger passes discrete mathematics. premises: p 1 : If Roger studies, then he will pass discrete math. p 2 : If Roger doesn't play tennis, then he'll study. p 3 : Roger failed discrete mathematics. Determine whether the argumentis valid. which is a tautology, the original argument is true

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference p r s Ex a tautology deduced or inferred from the two premises

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Def If p, q are any arbitrary statements such that is a tautology, then we say that p logically implies q and we to denote this situation.write meansis a tautology. meansis a tautology.

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference rule of inference: use to validate or invalidate a logical implication without resorting to truth table (which will be prohibitively large if the number of variables are large) Ex 2.22 Modus Ponens (the method of affirming) or the Rule of Detachment

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Example 2.23 Law of the Syllogism Ex 2.25

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Modus Tollens (method of denying) example:

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Modus Tollens (method of denying) example: another reasoning

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference fallacy (1) If Margaret Thatcher is the president of the U.S., then she is at least 35 years old. (2) Margaret Thatcher is at least 35 years old. (3) Therefore, Margaret Thatcher is the president of the US.

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference fallacy (1) If 2+3=6, then 2+4=6. (2) 2+3 (3) Therefore,

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.26 Rule of Conjunction Ex Rule of Disjunctive Syllogism

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex Rule of Contradiction Proof by Contradiction To prove we prove

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex. 2.29

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex p, t q r, s u No systematic way to prove except by truth table (2 n ).

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.32 Proof by Contradiction q r F0F0

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference reasoning

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference Ex 2.33 u, s r p

Chapter 2. Fundamentals of Logic 2.3 Logical Implication: Rules of Inference How to prove that an argument is invalid? Just find a counterexample (of assignments) for it ! Ex 2.34 Show the following to be invalid. 0 1 s=0,t=1 p=1 r=1 q=0

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Def. 2.5 A declarative sentence is an open statement if (1) it contains one or more variables, and (2) it is not a statement, but (3) it becomes a statement when the variables in it are replaced by certain allowable choices. examples: The number x+2 is an even integer. x=y, x>y, x<y,... universe

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers notations:p(x): The number x+2 is an even integer. q(x,y): The numbers y+2, x-y, and x+2y are even integers. p(5): FALSE,: TRUE, q(4,2): TRUE p(6): TRUE, : FALSE, q(3,4): FALSE For some x, p(x) is true. For some x,y, q(x,y) is true. For some x, is true. For some x,y, is true. Therefore,

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers existential quantifier: For some x: universal quantifier: For all x: x in p(x): free variable x in : bound variable is either true or false.

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex 2.36 x=4 x=1 x=5,6,... x=-1 universe: real numbers

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex 2.37 implicit quantification is "The integer 41 is equal to the sum of two perfect squares." is

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Def. 2.6 logically equivalent for open statement p(x) and q(x) p(x) logically implies q(x), i.e.,for any x

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex Universe: all integers thenis false butis true Therefore, but for any p(x), q(x) and universe

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers For a prescribed universe and any open statements p(x), q(x): Note this!

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers How do we negate quantified statements that involve a single variable?

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex p(x): x is odd. q(x): x 2 -1 is even. Negate(If x is odd, then x 2 -1 is even.) There exists an integer x such that x is odd and x 2 -1 is odd. (a false statement, the original is true)

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers multiple variables

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers BUT Ex p(x,y): x+y=17. : For every integer x, there exists an integer y such that x+y=17. (TRUE) : There exists an integer y so that for all integer x, x+y=17. (FALSE) Therefore,

Chapter 2. Fundamentals of Logic 2.4 The Use of Quantifiers Ex 2.49