Sets and Logic…. Chapter 2 An experiment….. Sets and Logic…. Chapter 2
Logical Laws DeMorgan’s Laws Commutative, Associative, and Idempotent ¬ 𝑃∧𝑄 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 ¬𝑃∨¬𝑄 ¬ 𝑃∨𝑄 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 ¬𝑃∧¬𝑄 Commutative, Associative, and Idempotent Distributive 𝑃∧ 𝑄∨𝑅 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 (𝑃∧𝑄)∨(𝑃∧𝑅) 𝑃∨ Q∧𝑅 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 𝑃∨𝑄 ∧ 𝑃∨𝑅 Absorption: 𝑃∨ 𝑃∧𝑅 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 𝑃 𝑃∧ 𝑃∨𝑅 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 𝑃
Tautologies and Contradictions Statements or Formulas which are always true are Tautologies Formulas that are always false are Contradictions 𝑃∧ 𝑡𝑎𝑢𝑡𝑜𝑙𝑜𝑔𝑦 ; 𝑃∨ 𝑡𝑎𝑢𝑡𝑎𝑜𝑙𝑜𝑔𝑦 𝑃∧ 𝑐𝑜𝑛𝑡𝑟𝑎𝑑𝑖𝑐𝑡𝑖𝑜𝑛 ; 𝑃∨(𝑐𝑜𝑛𝑡𝑟𝑎𝑑𝑖𝑐𝑡𝑖𝑜𝑛)
Variables and Sets We will consider statements dependent upon a variable or a number of variables Ex’s P(x): x is a prime number D(x,y): x is divisible by y In this case we don’t have truth tables… we have truth sets
Conditional Statements P implies Q: 𝑃→𝑄 If its raining and I don’t have my umbrella, then I’ll get wet. If Mary did her homework, then the teacher won’t collect it, and if she didn’t, the he’ll ask her to do it on the board
Equivalences 𝑃→𝑄 is equivalent to ¬𝑃∨𝑄 𝑃→𝑄 is equivalent to ¬(𝑃∧¬𝑄)
The Converse and Contrapositive Consider 𝑃→𝑄 and 𝑄→𝑃 𝑄→𝑃 is called the converse of 𝑃→𝑄 ¬𝑄→¬𝑃 is the contrapositive of 𝑃→𝑄 The converse of 𝑃→𝑄 is not equivalent The contrapositive is…….. 𝑃→𝑄 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 ¬𝑄→¬𝑃
Chapter 2: Quantifiers Three ideas For all or for every, we use the notation: ∀ There is one, or there exists: ∃ The universe……
Seven Operators Connectives Quantifiers ¬ ∧ ∨ → ↔ Quantifiers ∀ 𝑎𝑛𝑑 ∃ This is really all we need to write any mathematical statement!
New Notation ∀𝑥 𝑥>2→ 𝑥 2 >4 Is there and implied universe?
Examples ∀𝑥 𝑥 2 >0 in what universe? ∃𝑥 𝑥 2 −2𝑥+3=0 , Universe ∀𝑥 𝑀 𝑥 ∧𝐵 𝑥 , where M(x) is ( x is a man) and B(x) is ( x has brown hair ) ∀𝑥 𝑀 𝑥 →𝐵 𝑥 ∀𝑥𝐿(𝑥,𝑦) where L(x,y) is a like function from x to y.
Write as Logical Statements Someone didn’t do the homework Everything in that store is either overpriced or poorly made Nobody’s perfect Susan likes everyone who dislikes Joe 𝐴⊆𝐵 𝐴∩𝐵⊆𝐵\C
Write as Statements Everybody in the dorm has a roommate he doesn’t like Nobody likes a sore loser Anyone who has a friend who has the measles will have to be quarantined If anyone in the dorm has a friend who has the measles, then everyone in the dorm will have to be quarantined If 𝐴⊆𝐵, then A and C\B are disjoint
Multiple Quantifiers ∀𝑥∃𝑦 𝑥<𝑦 ∃𝑦∀𝑥 𝑥<𝑦 ∃𝑥∀𝑦 𝑥<𝑦 ∀𝑦∃𝑥 𝑥<𝑦 ∃𝑥∃𝑦 𝑥<𝑦 ∀𝑥∀𝑦(𝑥<𝑦)
EquivaleNce Involving Quantifiers Quantifier Negation Laws ¬∃𝑥𝑃 𝑥 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜∀𝑥¬𝑃 𝑥 ¬∀𝑥𝑃 𝑥 𝑖𝑠 𝑒𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 𝑡𝑜 ∃𝑥¬𝑃(𝑥)
Examples Negate the statements, and then reexpress the results as equivalent positive statements 𝐴⊆𝐵 Everyone has a relative he doesn’t like
Analyze the logical forms All married couples have fights Everyone likes at least two people John likes exactly one person
Anayze the Logical Forms Statements about the natural numbers ℕ x is a perfect square x is a multiple of y x is prime x is the smallest number that is a multiple of both y and z
Analyze the statements Statements about real numbers ℝ The identity element for addition is 0. Every real number has and additive inverse Negative numbers don’t have square roots Every positive number has exactly two square roots
2.3…. More on Sets Instead of just 𝑥 𝑃(𝑥) we can consider more general forms 𝑓(𝑥) 𝑥∈[0,1] 𝑎𝑥+𝑏 𝑐𝑥+𝑑 𝑥𝜖[0,1]
More Examples 𝑦𝜖 3 𝑥 𝑥𝜖ℚ 𝑥 𝑖 𝑖𝜖𝐼 ⊆𝐴 𝑛 2 𝑛𝜖ℕ and 𝑛 3 𝑛𝜖ℕ are disjoint
The Power Set The Power Set ℘ 𝐴 = 𝐵 𝐵⊆𝐴 ℘ 𝐴 = 𝐵 𝐵⊆𝐴 Find the Power Set for 𝐴= 𝑎,𝑏,𝑐
AnAlyze the logical forms 𝑥𝜖℘ 𝐴 ℘ 𝐴 ⊆℘ 𝐵 𝐵𝜖 ℘(𝐴) 𝐴⊆ℱ 𝑥𝜖℘ 𝐴∩𝐵 𝑥𝜖℘(𝐴)⋂℘(𝐵)
Intersections and Unions ℱ= 1,2,3,4 , 2,3,4,5}, 3,4,5,6 Find ∩ℱ…∪ℱ
Definitions: Unions and Intersections ∩ℱ= 𝑥 ∀𝐴𝜖ℱ 𝑥𝜖𝐴 = 𝑥 ∀𝐴(𝐴𝜖ℱ→𝑥𝜖𝐴 ∪ℱ= 𝑥 ∃𝐴𝜖ℱ 𝑥𝜖𝐴 = 𝑥 ∃𝐴(𝐴𝜖ℱ∧𝑥𝜖𝐴
Analyze the logical forms 𝑥𝜖∩ℱ ∩ℱ⊈∩G 𝑥𝜖℘ ∪ℱ 𝑥𝜖∪ ℘(𝐴) 𝐴𝜖ℱ
Another Example 𝐼= 1,2,3 𝐴 𝑖 = 𝑖,𝑖+1,𝑖+2,𝑖+3 𝐼= 1,2,3 𝐴 𝑖 = 𝑖,𝑖+1,𝑖+2,𝑖+3 Find ∪ 𝑖𝜖𝐼 𝐴 𝑖 and ∩ 𝑖𝜖𝐼 𝐴 𝑖