Sets and Logic…. Chapters 5 and 6 An experiment….. Sets and Logic…. Chapters 5 and 6
Chapter 4: Relations Let A and B be sets, then the cartesian product 𝐴×𝐵= (𝑎,𝑏) 𝑎∈𝐴 𝑎𝑛𝑑 𝑏∈𝐵 . Order matters!
Relations Suppose that A and B are sets. We say that any set 𝑅⊆𝐴×𝐵 is a relation from A to B Examples 𝐺= (𝑥,𝑦)∈ℝ×ℝ 𝑦<𝑥
Chapter 5: Functions Let F be a relation from A to B. F is called a function if for every 𝑎∈𝐴 there is exactly one 𝑏∈𝐵 such that 𝑎,𝑏 ∈𝐹. We then write 𝐹:𝐴→𝐵
Functions Alleged Theorem: Suppose f and g are function from A to B. If ∀𝑎∈𝐴(𝑓 𝑎 =𝑔 𝑎 ) then f = g. Ran(f) = 𝑓(𝑎) 𝑎∈𝐴
Composition Let 𝑓:𝐴→𝐵 𝑎𝑛𝑑 𝑔:𝐵→𝐶, then 𝑔∘𝑓:𝐴→𝐶, and for any 𝑎∈𝐴, 𝑔∘𝑓=𝑔 𝑓 𝑎 .
5.2 One to One and Onto Definitions Suppose that 𝑓:𝐴→𝐵. We will say that f is one-to-one if ¬∃ 𝑎 1 ∃ 𝑎 2 ∈𝐴(𝑓( 𝑎 1 )=𝑓( 𝑎 2 )∧ 𝑎 1 ≠ 𝑎 2 ) We say that f is onto if ∀𝑏∈𝐵∃𝑎∈𝐴(𝑓 𝑎 =𝑏)
One to One and Onto Suppose that 𝑓:𝐴→𝐵. 1. f is one-to-one iff ∀ 𝑎 1 ∈𝐴∀ 𝑎 2 ∈𝐴(𝑓 𝑎 1 =𝑓( 𝑎 2 )→ 𝑎 1 = 𝑎 2 ) 2. f is onto iff 𝑅𝑎𝑛 𝑓 =𝐵
Example Let 𝐴=ℝ\{−1} 𝑎𝑛𝑑 𝑓:𝐴→ℝ 𝑏𝑦 𝑓 𝑎 = 2𝑎 𝑎+1 , 𝑓 𝑎 = 2𝑎 𝑎+1 , Then f is one to one but not onto.
Inverses of Functions Suppose that 𝑓:𝐴→𝐵 is one to one and onto, then 𝑓 −1 :𝐵→𝐴. Suppose f is a function from A to B and 𝑓 −1 is a function from B to A. Then 𝑓 −1 ∘𝑓= 𝑖 𝐴 and 𝑓∘ 𝑓 −1 = 𝑖 𝐵 .
More Inverses Theorem. Suppose 𝑓:𝐴→𝐵. 1. If there is a function 𝑔:𝐵→𝐴, such that 𝑔∘𝑓= 𝑖 𝐴 then f is one to one 2. If there is a function 𝑔: 𝐵→𝐴, such that 𝑓∘𝑔= 𝑖 𝐵 then f is onto.
Inverses Theorem. Suppose 𝑓:𝐴→𝐵. Then the following statements are equivalent 1. f is one to one and onto 2. 𝑓 −1 :𝐵→𝐴. 3. There is a function 𝑔:𝐵→𝐴 such that 𝑔∘𝑓= 𝑖 𝐴 𝑎𝑛𝑑 𝑓∘𝑔= 𝑖 𝐵 .
Inverses Theorem: Suppose 𝑓:𝐴→𝐵, 𝑔:𝐵→𝐴, 𝑔∘𝑓= 𝑖 𝐴 , 𝑎𝑛𝑑 𝑓∘𝑔= 𝑖 𝐵 . Then 𝑔= 𝑓 −1 .
Examples Let 𝐴=ℝ\ 0 𝑎𝑛𝑑 𝐵=ℝ\ 2 , and define 𝑓:𝐴→𝐵 𝑏𝑦 𝑓= 1 𝑥 +2. Show that f is one-to-one and onto and find 𝑓 −1 . Let 𝐴=ℝ, 𝑎𝑛𝑑 𝐵= 𝑥𝜖ℝ|𝑥≥0 , 𝑙𝑒𝑡 𝑓= 𝑥 2 .
Basic Induction To prove that ∀𝑛≥𝐾∈ℕ 𝑃 𝑛 , 1. Prove P(K) 2. Prove for ∀𝑛≥𝐾𝜖ℕ(𝑃(𝑛)→𝑃(𝑛+1)
Example Prove that for every n, 𝑘=0 𝑛 2 𝑘 = 2 𝑛+1 −1
Examples Let R be a partial order on A. Prove that every finite nonempty set 𝐵⊆𝐴 has an R-minimal element.
Let 𝑅⊆𝐴×𝐴 R is a Partial Order on A if it is reflexive, transitive, and antisymmetric. It is a Total Order on A if it is a partial order and in addition ∀𝑥∀𝑦𝜖𝐴(𝑥𝑅𝑦∨𝑦𝑅𝑥)
Fun and Games with Triangles For all 𝑛≥3, if n distinct points on a circle are connected in consecutive order with straight lines, then the interior angles of the resulting polygon add up to 𝑛−2 180°.
Fun and Games with tiles Theorem: For any positive integer n, a 2 𝑛 × 2 𝑛 square grid with any one square removed can be covered with L-shaped tiles.
Recursion ∀𝑛∈ℕ, 𝑙𝑒𝑡 𝑓 𝑛+1 =𝑔 𝑓 𝑛 Ex: ∀𝑛∈ℕ, 𝑓 𝑛+1 = 𝑛+1 𝑓 𝑛 .
Example Prove that for every 𝑛≥4, 𝑛!> 2 𝑛 . Define a sequence, 𝑎 0 =0; ∀𝑛∈ℕ, 𝑎 𝑛+1 =2 𝑎 𝑛 +1. Find a formula and prove its correctness.
Example For every 𝑥>−1 and every natural number n, (1+𝑥) 𝑛 ≥1+𝑛𝑥.
Strong Induction Simple Induction… Prove P(k) Prove for n>k, 𝑃 𝑛−1 →𝑃 𝑛 Strong Induction….. ∀𝑛[(∀𝑘<𝑛𝑃 𝑘 )→𝑃(𝑛)]
Examples Theorem: For all natural number n and m, if m>0, then there are q and r such that n = mq+r. ( q is the quotient, and r is the remainder )
Example Theorem: Every integer n>1 is either a prime or a product of primes.
Example Theorem: Every non-empty set of natural numbers has a smallest element. Theorem: 2 is irrational. I.e. there are no integers p and q such that 2 = 𝑝 𝑞 .