III. Elementary Logic

Similar documents
Mat 243 Exam 1 Review

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

1.1 Language and Logic

Chapter 1 Elementary Logic

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Logic Overview, I. and T T T T F F F T F F F F

A Little Deductive Logic

For all For every For each For any There exists at least one There exists There is Some

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Logic and Propositional Calculus

A Little Deductive Logic

Logic and Propositional Calculus

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

CSC Discrete Math I, Spring Propositional Logic

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Compound Propositions

On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA

1.1 Language and Logic

Logic and Proofs. (A brief summary)

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

DISCRETE MATHEMATICS BA202

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Logic and Proof. Aiichiro Nakano

Propositional Logic Not Enough

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Introduction to Sets and Logic (MATH 1190)

Rules Build Arguments Rules Building Arguments

A. Propositional Logic

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

HANDOUT AND SET THEORY. Ariyadi Wijaya

Discrete Mathematics and Its Applications

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.

2-4: The Use of Quantifiers

MAT2345 Discrete Math

Logic, Sets, and Proofs

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

2.2: Logical Equivalence: The Laws of Logic

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Foundation of proofs. Jim Hefferon.

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

2. Use quantifiers to express the associative law for multiplication of real numbers.

THE LOGIC OF COMPOUND STATEMENTS

Propositional logic (revision) & semantic entailment. p. 1/34

Definition 2. Conjunction of p and q

Propositional and First-Order Logic

Propositional Logic. Spring Propositional Logic Spring / 32

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

First order Logic ( Predicate Logic) and Methods of Proof

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

ECOM Discrete Mathematics

PROPOSITIONAL CALCULUS

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

The Process of Mathematical Proof

Section 1.3. Let I be a set. When I is used in the following context,

Predicates, Quantifiers and Nested Quantifiers

Review: Potential stumbling blocks

Section Summary. Section 1.5 9/9/2014

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Introduction to Decision Sciences Lecture 2

Discrete Structures for Computer Science

Logic and Proofs. (A brief summary)

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

CSC 125 :: Final Exam May 3 & 5, 2010

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

1 The Foundation: Logic and Proofs

Predicate Calculus - Syntax

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Proofs. Joe Patten August 10, 2018

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

1 The Foundation: Logic and Proofs

LIN1032 Formal Foundations for Linguistics

Chapter 3. The Logic of Quantified Statements

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

1.1 Statements and Compound Statements

AMTH140 Lecture 8. Symbolic Logic

Equivalence and Implication

STRATEGIES OF PROBLEM SOLVING

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

The Logic of Compound Statements cont.

Announcements CompSci 102 Discrete Math for Computer Science

HOMEWORK 1: SOLUTIONS - MATH 215 INSTRUCTOR: George Voutsadakis

Mathematical Reasoning (Part I) 1

Math.3336: Discrete Mathematics. Nested Quantifiers

Chapter 1: The Logic of Compound Statements. January 7, 2008

A statement is a sentence that is definitely either true or false but not both.

Transcription:

III. Elementary Logic

The Language of Mathematics While we use our natural language to transmit our mathematical ideas, the language has some undesirable features which are not acceptable in mathematics. Alice saw a man with a telescope. Two sisters were reunited after 10 years in the checkout line at King Soopers. The mayor said that bus passengers should be belted. To avoid such problems, the language used in mathematics is more restrictive than the natural language of which it is a part.

Propositions and Connectives A Proposition (or statement) is a sentence that is either true or false (without additional information). The logical connectives are defined by truth tables (but have English language counterparts). Logic Math English Conjunction and Disjunction or (inclusive) Negation ~ not Conditional if... then... Biconditional if and only if

Truth Tables P Q P Q T T T T F F F T F F F F P Q P Q T T T T F T F T T F F F P Q P Q T T T T F F F T T F F T P Q P Q T T T T F F F T F F F T P P T F F T

Logical Equivalence The truth table for ~ (P (Q P)). Two statements are equivalent (logically equivalent) if they have the same truth table values. P Q ~ (P ~ Q) P Q Q P P Q P P Q P T T T T F T F T T F F T T F T F F F F T P Q Q P Q P Q P Q T T F F T T T F T T F F F T F F T T F F T F T T

Logical Equivalence A denial is a statement equivalent to the negation of a statement. The negation of P Q is ~ (P Q). A denial of P Q is P ~ Q. For 2 logical variables there are 16 ways to combine them, but we can get all of them with combinations of conjunction, disjunction and negation. In fact, we can get them all with just one symbol (nand ). P Q P Q T T F T F T F T T F F T

On a real mythical island... If I am telling the truth, then he is a truth teller (What tribes?) Let P := I am telling the truth & Q := he is a truth teller. There are 3 truth values involved, P, Q and P Q If the speaker is a liar, then P would be false. If P is false then P Q is true, and the liar would be speaking the truth!! If the speaker is a truth teller, then P is true and P Q is true, so Q is true and both natives are from the truth telling tribe.

On a real mythical island... Gold on island iff I am a truth teller (Which tribe? is there Gold?) P := Gold on island Q := I am a truth teller If speaker is a truth teller, then Q is true and P Q is true so there is gold on the island. If speaker is a liar, then Q is false and P Q is false, so P must be true, there is gold on the island. So there is gold on the island, but we don't know which tribe the speaker is from!

On a real mythical island... Two natives, tall and short. Are you a truth teller? Goom! says the tall one. Other says, He says yes, but he is a liar. (What tribes?) Notice that "Goom" must be "yes". If the short native is a truth teller, then the tall one is a liar (by the truth of the compound P Q). If the short native is a liar, then the tall one is a truth teller, since the claim that he is a liar must be false.... we can only say that they are from different tribes.

On a real mythical island... Classic: A native stands at a road intersection. What single question can you ask to determine if the road will lead to the village? If I were to ask you if this road leads to the village, would you say "yes"? NB: Truth values of these logical forms have nothing to do with meaning!!!! (content)... that is a philosophical concept, not a mathematical one.

Problem: 1 C B 2 You see the four cards above. Every card has a number on one side and a letter on the other side. Which of these cards must be turned over to determine the truth of the statement: If a card has a B on one side, then it has a 2 on the other side.

Tautologies and Contradictions: A tautology is a statement which is always true. A contradiction is a statement which is always false. These are all tautologies: A (B C) (A B) (A C) ~ (A B) ~A ~B P ~(~ P) Distributive Law DeMorgan's Law Law of the Excluded Middle

Tautologies and Contradictions: (A ~ A) (B ~B) a contradiction A B A A B B A A B B T T T F F T F T F F F T T F F F F T F F (P (P Q)) Q modus ponens, a tautology P Q P Q P P Q P P Q Q T T T T T T F F F T F T T F T F F T F T

Tautologies and Contradictions: P (Q R) (P Q) R a tautology P Q R P Q R P Q R P Q R P Q R T T T T T T T T F F F T T F T T T T T F F T T T F T T T T T F T F T T T F F T T T T F F F T T T

Contrapositive The contrapositive of the statement if P then Q is if ~Q then ~P. An implication and its contrapositive are logically equivalent, so one can always be used in place of the other. P Q P Q Q P T T T T T F F F F T T T F F T T P Q Q P T T T T F F T T Inverse Converse

Transitivity of Implication (P Q) (Q R) (P R) P Q R P Q Q R P R P Q Q R P R T T T T T T T T T F T F F T T F T F T T T T F F F T F T F T T T T T T F T F T F T T F F T T T T T F F F T T T T Reading from Martin Gardner if time permits.

Predicates A predicate (open sentence) is a sentence containing one or more variables which becomes a proposition upon replacement of the variables. Examples: The integer x is even. y = 5. Triangle ABC is isosceles.

Universal and Existential quantifiers A predicate is not a proposition, it does not have a truth value. One can however use quantifiers to make propositions about predicates. For instance, the universal quantifier ( ) is used to say that a given predicate is true for all possible values of its variables. This is a proposition, since it is either true or false. Similarly, the existential quantifier ( ) is used to say that there is some value of the variables which makes the predicate a true statement.

Quantified Statements Let x be a real number. x 2 1 = 0 is not a proposition, it is a predicate. "There exists an x so that x 2 1 = 0" is a proposition (true) "For all x, x 2 1 = 0" is also a proposition (false). These are written as: ( x R) (x 2 1 = 0) and ( x R) (x 2 1 = 0).

Counterexample To prove a universally quantified statement to be false, all that is needed is one set of values for the variables which makes the predicate a false proposition. Such an example is called a counterexample. For example, consider ( x R) (x 2 1 = 0). 2 is a counterexample since 2 is a real number and 2 2 1 = 3 0

More Examples x y (x + y = 0) x y (x + y = 0) x y ( x + y = 0) x y (x + y = 0) True False : Counterexample x = 1, y = 2 True : let y = -x False All poobahs are zots. x (P(x) Z(x)) Some poobahs are zots. x (P(x) Z(x)) Everybody has a friend who is always honest. x y (F(x,y) t H(y,t))

Denials of quantified statements A denial of a quantified statement is obtained by switching the quantifier (changing for all to there exists, or vice versa) and negating the predicate. Not all poobahs are zots. ~ x (P(x) Z(x)) x (P(x) ~Z(x)) Not some poobahs are zots. x (P(x) Z(x)) x(~p(x) ~Z(x)) Not everybody has a friend who is always honest. x y (F(x,y) t H(y,t)) x y ( F(x,y) t H(y,t)) There is someone, all of whose friends are sometimes not honest.

Denials A sequence {xn } is Cauchy iff for each ε > 0 there is a natural number N so that if n,m > N then x n - x m < ε. ( ε>0)( Ν N)(n,m > N x n - x m < ε) What does it mean for a sequence not to be Cauchy? ~ ( ε>0)( Ν N)(n,m > N x n - x m < ε) ( ε>0)( Ν N)(n,m > N x n - x m ε) Τhere is a positive number ε so that no two terms of the sequence are closer than ε apart.

Logical Arguments Starting with one or more statements that are assumed to be true (the premises), a chain of reasoning which leads to a statement (the conclusion) is called a valid argument. Note that this is a logic concept, it is only the "logical form" of the statements and not their "meaning" which is important. Example: If turtles can sing, then artichokes can fly. If artichokes can fly, then turtles can sing and dogs can't play chess. Dogs can play chess if and only if turtles can sing. Therefore, turtles can't sing. The first three lines are the premises, and the last line is the conclusion. Is this a valid argument?

By transitivity, the first two implications give S (S ~D). But, since S and D are logically equivalent, this means that S (D ~D), which is a contradiction. Since a true statement cannot imply a contradiction, we must have that S is false, i.e., ~S is true - turtles can not sing. Logical Arguments Let S = "turtles can sing", A = "artichokes can fly" and D = "dogs can play chess". The given statements can now be written symbolically as: If turtles can sing, then artichokes can fly. S A If artichokes can fly, then turtles can sing and dogs can't play chess. A (S ~D) Dogs can play chess if and only if turtles can sing. D S

Another Example There is an astronomer who is not nearsighted. Everyone who wears glasses is nearsighted. Furthermore, everyone either wears glasses or wears contact lenses. Therefore, some astronomer wears contact lenses. Let the universe of discourse be P the set of all people. If x is a person (x in P) then let A(x) be the predicate that x is an astronomer. Similarly, use the following predicates: N(x) means x is nearsighted. G(x) means x wears glasses. C(x) means x wears contact lenses.

Another Example x (A(x) ~N(x)) There is an astronomer who is not nearsighted. x (G(x) N(x)) Everyone who wears glasses is nearsighted. x (G(x) C(x)) everyone either wears glasses or wears contact lenses. By the first premise, there is an astronomer who is not nearsighted. Let's call her Alice. That is, A(Alice) and ~N(Alice) are true propositions. The contrapositive of the second premise is x(~n(x) ~G(x)), and as this must hold for Alice, we have ~G(Alice) is true. By the third premise, if ~G(x) then C(x) must be true, i.e., C(Alice) is true. So, there is an astronomer (namely, Alice) who wears contact lenses, and we see that x (A(x) C(x)) is a true proposition.