web.stanford.eduweb.stanford.edu/class/archive/cs/cs103/cs103.1126/lectures/06/sli… · defining...
TRANSCRIPT
Functions
A function is a means of associating each object in one set with an object in some other set.
Dikdik NubianIbex Sloth
Dikdik NubianIbex Sloth
Black and White
Black and White
Terminology
● A function f is a mapping such that every value in A is associated with a unique value in B.● For every a ∈ A, there exists some b ∈ B with f(a) = b.
● If f(a) = b0 and f(a) = b
1, then b
0 = b
1.
● If f is a function from A to B, we sometimes say that f is a mapping from A to B.● We call A the domain of f.● We call B the codomain of f.
● We denote that f is a function from A to B by writing
f : A → B
Is this a function?
Is this a function?
Is this a function?
Is this a function?
Each object in the domain has to be associated with exactly one object in the codomain!
Black and White
Is this a function?
Black and White
Is this a function?
Every element of the domain must be associated with an element of the
codomain!
Black and White
Is this a function?
Every element of the domain must be associated with an element of the
codomain!
Is this a function?
Is this a function?
Love-a-Lot
Tenderheart
Wish
Funshine
Friend
Is this a function?
Love-a-Lot
Tenderheart
Wish
Funshine
Friend
Is this a function?
Love-a-Lot
Tenderheart
Wish
Funshine
Friend
It's fine that nothing is associated with Friend; functions do not need to use the entire codomain.
Defining Functions
● Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain.
● Examples:● f(n) = n + 1, where f : → ℤ ℤ● f(x) = sin x, where f : → ℝ ℝ● f(x) = ⌈x , where ⌉ f : → ℝ ℤ
● When defining a function it is always a good idea to verify that● The function is uniquely defined for all elements in the
domain, and● The function's output is always in the codomain.
Defining Functions
Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain.
Examples:
f(n) = n + 1, where f : → ℤ ℤ
f(x) = sin x, where f : → ℝ ℝ● f(x) = ⌈x , where ⌉ f : → ℝ ℤ
When defining a function it is always a good idea to verify that
The function is uniquely defined for all elements in the domain, and
The function's output is always in the codomain.
This is the ceiling function – the smallest integer greater than or equal to x. For
example, 1 = 1, 1.37 = 2, ⌈ ⌉ ⌈ ⌉
and = 4.⌈π⌉
This is the ceiling function – the smallest integer greater than or equal to x. For
example, 1 = 1, 1.37 = 2, ⌈ ⌉ ⌈ ⌉
and = 4.⌈π⌉
Defining Functions
● Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain.
● Examples:● f(n) = n + 1, where f : → ℤ ℤ● f(x) = sin x, where f : → ℝ ℝ● f(x) = ⌈x , where ⌉ f : → ℝ ℤ
● When defining a function it is always a good idea to verify that● The function is uniquely defined for all elements in the
domain, and● The function's output is always in the codomain.
Piecewise Functions
● Some functions may be specified piecewise, with different rules applying to different elements.
● Example:
● Again, the burden is on you to ensure that this is a function!
f (n)={ −n/2 if n is even(n+1)/2 otherwise
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
The image of a function f : A → B is the setf [A] = { y | there is some x ∈ A where f(x) = y }
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
The image of a set X ⊆ A under f : A → B is the setf [X] = { y | there is some x ∈ X where f(x) = y }
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
The preimage of a set Y ⊆ B under f : A → B is the setf -1[Y] = { x | f(x) ∈ Y }
Classical
Country
R&B
Rock
Jazz
Classical
Country
R&B
Rock
Jazz
The preimage of a set may be empty.
Images and Preimages
● Let f : A → B.● The image of a set X ⊆ A is the set
f [X] = { y | there is an x ∈ X such that f(x) = y }● The preimage of a set Y B is the set⊆
f -1 [Y] = { x | f(x) ∈ Y }● The term range is sometimes used to refer to
the image of A, though sometimes range refers to the entire codomain.
♀☿
♂♃♄♅♆
♀
♀☿
♂♃♄♅♆
♀
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
♀☿
♂♃♄♅♆
♀
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
♀☿
♂♃♄♅♆
♀
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
Injective Functions
● A function f : A → B is called injective (or one-to-one) if each element of the codomain has at most one element of the domain associated with it.● A function with this property is called an injection.
● An intuition: injective functions label the objects from A using names from B.
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to .ℕ ℤ Note that since , for any ℕ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . ℕ ℤ Note that since , for any ℕ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. ∈ℤ Thus f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
We've completely glossed over the detail of showing that f(n) = n is defined for every
n . In general, unless there's a ∈ ℕ
reason to think otherwise, you don't need to justify why the function is defined for all elements of the domain. However, it's a good idea to show that the function does
indeed map into the codomain!
We've completely glossed over the detail of showing that f(n) = n is defined for every
n . In general, unless there's a ∈ ℕ
reason to think otherwise, you don't need to justify why the function is defined for all elements of the domain. However, it's a good idea to show that the function does
indeed map into the codomain!
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ℕ ℤ ■
Theorem: The function f : → defined by ℕ ℤ f(n) = n is injective.
Proof: First, we need to show that f is a legal function from to . Note that since , for any ℕ ℤ ℕ ⊆ ℤ n , we ∈ℕknow that n as well. Thus ∈ℤ f(n) for all ∈ℤ n .∈ℕ
Now, we need to show that for any x , that if ∈ℤ f(n0) = x
and f(n1) = x, then n
0 = n
1. Since f(n
0) = n
0 = x and
f(n1) = n
1 = x, this means that n
0 = n
1 as required.
Thus f is a function from to , and it is injective. ■ℕ ℤ
Front Door
BalconyWindow
BedroomWindow
Front Door
BalconyWindow
BedroomWindow
Surjective Functions
● A function f : A → B is called surjective (or onto) if each element of the codomain has at least one element of the domain associated with it.● A function with this property is called a surjection.
● An intuition: surjective functions cover every element of B with at least one element of A.
Theorem: The function f : → defined by ℤ ℕ f(x) = |x| is surjective.
Proof: First, we need to show that f is a function from to ℤ. Consider any x . If ℕ ∈ ℤ x ≥ 0, then |x| = x, and since x
is a nonnegative integer, f(x) = |x| = x . If ∈ℕ x < 0, then|x| = -x, so |x| is a positive integer, and thereforef(x) = |x| = -x . Thus ∈ℕ f is a function from to .ℤ ℕ
We need to show that for any n , that there is some∈ℕx such that ∈ℤ f(x) = n. Given any n, take x = n. Since x = n and n , this means that ∈ℕ x . Then∈ℤf(x) = |x| = |n|. Since n , ∈ℕ n ≥ 0, so |n| = n. Thusf(x) = n as required. ■
Recap
● An injective function associates at most one element of the domain with each element of the codomain.
● A surjective function associates at least one element of the domain with each element of the codomain.
● What about functions that associate exactly one element of the domain with each element of the codomain?
LOL
AWWWWWWYEAAAAHHH
Problem?
LOL
AWWWWWWYEAAAAHHH
Problem?
Bijections
● A function that associates each element of the codomain with a unique element of the domain is called bijective.● Such a function is a bijection.
● Formally, a bijection is a function that is both injective and surjective.
● A bijection is a one-to-one correspondence between two sets.
Compositions
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
www.microsoft.com www.apple.com www.google.com
Function Composition
● Let f : A → B and g : B → C● The function g ∘ f : A → C is defined as
(g ∘ f)(x) = g(f(x))● Note that f is applied first, but f is on the right
side!● Function composition is associative:
h (∘ g ∘ f) = (h ∘ g) ∘ f
Function Composition
● Suppose f : A → A and g : A → A.● Then both g ∘ f and f ∘ g are defined.● Does g ∘ f = f ∘ g?● In general, no:
● Let f(x) = 2x● Let g(x) = x + 1● (g ∘ f)(x) = g(f(x)) = g(2x) = 2x + 1● (f ∘ g)(x) = f(g(x)) = f(x + 1) = 2x + 2
Functions and Sets
Cardinality
● Recall (from lecture one!) that the cardinality of a set is the number of elements it contains.● Denoted |S|.
● For finite sets, cardinalities are natural numbers:● |{1, 2, 3}| = 3● |{100, 200, 300}| = 3
● For infinite sets, we introduce infinite cardinals to denote the size of sets:● | | = ℕ ℵ
0
Comparing Cardinalities
● The relationships between set cardinalities are defined in terms of functions between those sets.
● |S| = |T| is defined using bijections.
|S| = |T| iff there is a bijection f : S → T● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T● Be careful – despite the use of the notation = and ≤, to
rigorously reason about cardinalities, your proof must rely on appropriate definitions of functions.
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = t. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is a bijection g : R → S. Since |S| = |T|, there is a bijection h : S → T. Let f = h ∘ g; this means that f : R → T. We prove that f is a bijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r
1). We will show that r
0 = r
1.
Since f(r0) = t and f(r
1) = t, we know (h ∘ g)(r
0) = t and (h ∘ g)(r
1) = t. By
definition of composition, we have h(g(r0)) = h(g(r
1)). Since h is a bijection, h
is injective, so we have that g(r0) = g(r
1). Since g is a bijection, g is injective,
so we have that r0 = r
1. Therefore, f is injective.
To see that f is surjective, consider any t ∈T. We will show that there is some r ∈ R such that f(r) = t. Since h is a bijection from S to T, h is surjective, so there is some s ∈ S such that h(s) = t. Since g is a bijection from R to S, g is surjective, so there is some r ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = t as required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is a bijection from R to T, so |R| = |T|. ■
Operations on Cardinality
● Equality of cardinality is an equivalence relation. For any sets R, S, and T:● |S| = |S|. (reflexivity)● If |R| = |S| and |S| = |T|, then |R| = |T|. (transitivity)● If |S| = |T|, then |T| = |S|. (symmetry)
● How would you prove reflexivity?● One option: Set f(x) = x.
● We need to build up a bit more machinery to prove symmetry.
Operations on Cardinality
● The ≤ relation over set cardinalities is a total order. For any sets R, S, and T:● |S| ≤ |S|. (reflexivity)● If |R| ≤ |S| and |S| ≤ |T|, then |R| ≤ |T|. (transitivity)● If |S| ≤ |T| and |T| ≤ |S|, then |S| = |T|. (antisymmetry)● Either |S| ≤ |T| or |T| ≤ |S|. (totality)
● These last two proofs are extremely hard.● The antisymmetry result is the Cantor-Bernstein-Schroeder
Theorem; a fascinating read, but beyond the scope of this course.● The totality result requires the axiom of choice; also interesting but
far beyond the scope of this course.● Take Math 161 for more details.
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . ∈ℕ If we take n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ℕ ℵ₀ ■
Theorem: Let S = { 2n | n }. Then ∈ℕ |S| = ℵ .₀
Proof: We prove that |S| = | |; since | | = by definition, ℕ ℕ ℵ₀this proves that |S| = .ℵ₀
To show that |S| = | |, we will find a bijection between the two ℕof them. Consider the function f : → ℕ S defined as f(n) = 2n. By the definition of S, for any n , ∈ℕ f(n) = 2n ∈ S, so f is a function from to ℕ S.
To show that f is a bijection, we show that it is injective and surjective. To show that f is injective, consider any m and n where f(m) = f(n); we will prove that m = n. To see this, note that if f(m) = f(n), then 2m = 2n, and so m = n as required. To show that f is surjective, consider any m ∈ S; we show that there is an n such that ∈ℕ f(n) = m. Since m ∈ S, m = 2k for some k . If we take ∈ℕ n = k, then f(n) = 2n = 2k = m, as required. Thus f is injective and surjective, so it is a bijection, and |S| = | | = . ■ℕ ℵ₀
Comparing Cardinalities
● Formally, we define < on cardinalities as
|S| < |T| iff |S| ≤ |T| and |S| ≠ |T| ● In other words:
● There is an injection f : S → T.● There is no bijection f : S → T.
Cantor's Theorem
● Cantor's Theorem states that
For every set S, |S| < | (℘ S)| ● This is how we concluded that there are more
problems to solve than programs to solve them.● We informally sketched a proof of this in the
first lecture.● Let's now formally prove Cantor's Theorem.
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
Lemma: For any set S, |S| ≤ | (℘ S)|.
Proof: Consider any set S. We show that there is an injection f : S → (℘ S). Let f(x) = {x} for any x ∈ S. Since for anyx ∈ S, {x} ⊆ S, we have that {x} (∈ ℘ S), so f is a valid function from S to (℘ S).
To see that f is injective, consider any x0 and x
1 such that
f(x0) = f(x
1). We prove that x
0 = x
1. To see this, note that if
f(x0) = f(x
1), then {x
0} = {x
1}. Since two sets are equal iff their
elements are equal, this means that x0 = x
1 as required. Thus
f is an injection from S to (℘ S), so |S| ≤ | (℘ S)|. ■
The Key Step
● We now need to show that
For any set S, |S| ≠ | (℘ S)| ● By definition, |S| = | (℘ S)| iff there exists a bijection f :
S → (℘ S).● This means that
|S| ≠ | (℘ S)| iff there is no bijection f : S → (℘ S)● Prove this by contradiction:
● Assume that there is a bijection f : S → (℘ S).● Derive a contradiction by showing that f is not a bijection.
x0
x2
x3
x4
x5
x1
...
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
This string of Ys and Ns is called a characteristic
vector. Every characteristic vector defines a set, and
vice-versa.
This string of Ys and Ns is called a characteristic
vector. Every characteristic vector defines a set, and
vice-versa.
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y NN …N YN
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y Y Y Y Y …
Y NN …N YN
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ x0, x
2, x
4, ... }
{ x0, x
3, x
4, ... }
{ x4, ... }
{ x1, x
4, ... }
{ 0, 2, 4, ... }
{ 0, 2, 4, ... }
{ “b”, “ab”, ... }
{ x0, x
1, x
2, x
3, x
4, x
5, ... }
x1
...
{ x0, x
5, ... }
0 1 2 3 4 5 ...x0
x1
x2
x3
x4
x5 ...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y Y Y Y Y …
Y NN …N YN
… … … … … … …
x0
x2
x3
x4
x5
{ 0, 2, 4, ... }
...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
x1
{ 0, 2, 4, ... }{ “b”, “ab”, ... }Y NYN N …N YN
x0
x1
x2
x3
x4
x5 ...
{ 0, 2, 4, ... }
...
Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
{ 0, 2, 4, ... }{ “b”, “ab”, ... }Y NYN N …N YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … …
…Y N N N N Y
…...
{ 0, 2, 4, ... }{ “b”, “ab”, ... }Y NYN N …N YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y Y N ...
...
Y NYN N …N YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
Flip all Y's to N's and vice-versa to get a
new characteristic vector.
Flip all Y's to N's and vice-versa to get a
new characteristic vector.
…Y N N N N Y
x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
Flip all Y's to N's and vice-versa to get a
new characteristic vector.
Flip all Y's to N's and vice-versa to get a
new characteristic vector.
x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y Y N ...
...
Y NYN N …N YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN NN …
Y Y NNNN …
Y Y Y Y Y Y …
… … … … … … …
Y N N N Y YN Y Y Y N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
Which row in the table has this characteristic
vector?
Which row in the table has this characteristic
vector?x4
x5
Formalizing the Diagonal Argument
● We now have a sketch of an argument to prove that we don't have a bijection:● Construct the table given the bijection f.● Construct the complemented diagonal.● Show that the complemented diagonal cannot
appear anywhere in the table.● Conclude, therefore, that f is not a bijection.
For finite sets this is fine, but what if the set is infinitely large?
Formalizing the Diagonal Argument
● We now have a sketch of an argument to prove that we don't have a bijection:● Construct the table given the bijection f.● Construct the complemented diagonal.● Show that the complemented diagonal cannot
appear anywhere in the table.● Conclude, therefore, that f is not a bijection.
For finite sets this is fine, but what if the set is infinitely large?
Formalizing the Diagonal Argument
● We now have a sketch of an argument to prove that we don't have a bijection:● Construct the table given the bijection f.● Construct the complemented diagonal.● Show that the complemented diagonal cannot
appear anywhere in the table.● Conclude, therefore, that f is not a bijection.
● For finite sets this is fine, but what if the set is infinitely large?
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x4
x5
x1
x0
x1
x2
x3
x4
x5 ...
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x4
x5
x1
x0
x1
x2
x3
x4
x5 ...
f(x0) = { x
0, x
2, x
4, … }
f(x1) = { x
0, x
3, x
4, … }
f(x2) = { x
4, … }
f(x3) = { x
1, x
3, x
4, … }
f(x4) = { x
1, x
5, … }
f(x5) = { x
1, x
4, x
5, … }
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x4
x5
x1
x0
x1
x2
x3
x4
x5 ...
f(x0) = { x
0, x
2, x
4, … }
f(x1) = { x
0, x
3, x
4, … }
f(x2) = { x
4, … }
f(x3) = { x
1, x
3, x
4, … }
f(x4) = { x
1, x
5, … }
f(x5) = { x
1, x
4, x
5, … }
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x3
x4
x1
x0
x1
x2
x3
x4
x5 ...
x4
x5
f(x0) = { x
0, x
2, x
4, … }
f(x1) = { x
0, x
3, x
4, … }
f(x2) = { x
4, … }
f(x3) = { x
1, x
3, x
4, … }
f(x4) = { x
1, x
5, … }
f(x5) = { x
1, x
4, x
5, … }
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x4
x5
x1
x0
x1
x2
x3
x4
x5 ...
f(x0) = { x
0, x
2, x
4, … }
f(x1) = { x
0, x
3, x
4, … }
f(x2) = { x
4, … }
f(x3) = { x
1, x
3, x
4, … }
f(x4) = { x
1, x
5, … }
f(x5) = { x
1, x
4, x
5, … }
...
{ 0, 2, 4, ... }Y Y YN N N …
Y Y Y NN N …
Y NN N N N …
Y Y NN YN …
Y Y NNNN …
N Y N N Y Y …
… … … … … … …
Y N N N Y YN Y Y N N N ...
...
Y NYN N …N
Y
YN
x0
x2
x3
x4
x5
x1
x0
x1
x2
x3
x4
x5 ...
f(x0) = { x
0, x
2, x
4, … }
f(x1) = { x
0, x
3, x
4, … }
f(x2) = { x
4, … }
f(x3) = { x
1, x
3, x
4, … }
f(x4) = { x
1, x
5, … }
f(x5) = { x
1, x
4, x
5, … }
The diagonal set D is the set
D = { x S∈ | x ∉ f(x) }
There is no longer a dependence on theexistence of the two-dimensional table.
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(S) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(S) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(S) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of d, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of d, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of D, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of D, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of D, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of D, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Lemma: For any set S, |S| ≠ | (℘ S)|.
Proof: By contradiction; assume that there exists a set S such that|S| = | (℘ S)|. This means that there is a bijection f : S → (℘ S). Consider the set D = { x ∈ S | x ∉ f(x) }. Since by construction every x ∈ D satisfies x ∈ S, D ⊆ S, so D (∈ ℘ S).
Since f is a bijection, it is surjective, so there must be some d ∈ S such that f(d) = D. Now, either d ∈ D, or d ∉ D. We consider these cases separately:
Case 1: d ∈ D. By our definition of D, this means that d ∉ f(d). However, we know that f(d) = D, so this means that d ∉ D, contradicting the fact that d ∈ D.
Case 2: d ∉ D. By our definition of D, this means that d ∈ f(d). However, we know that f(d) = D, so this means that d ∈ D, contradicting the fact that d ∉ D.
In either case we reach a contradiction, so our assumption must have been wrong. Thus for every set S, |S| ≠ | (℘ S)|. ■
Theorem (Cantor's Theorem): For any set S, |S| < | (S)|.℘
Proof: Consider any set S. By our first lemma, |S| ≤ |℘(S)|. By our second lemma, |S| ≠ | (℘ S)|. Thus |S| < |℘(S)|. ■
What This Means
A Formal Definition of Functions
Formalizing Functions
● Formally, a function f : A → B is a subset of A × B.
● By definition:
f(a) = b iff (a, b) ∈ f● In other words, a function is a relation with the
extra property that
For all a ∈ A, there exists someunique b such that (a, b) ∈ f.
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
Front Door
BalconyWindow
BedroomWindow
Front Door
BalconyWindow
BedroomWindow
Inverses
● Given any function f : A → B, the inverse of f is the relation f -1
f -1 = { (b, a) | (a, b) ∈ f }● Equivalently:
f -1 = { (b, a) | f(a) = b }● Note that this is not necessarily a function.
● If f(a0) = b and f(a
1) = b with a
0 ≠ a
1, then f -1(b) is not
uniquely defined.● If there is some b ∈ B with nothing mapping to it, then f -1
is not defined at all.
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
Theorem: If f : A → B is a bijection, then f -1 is a function from B to A.
Proof: Let f be a bijection from A to B. Consider the relation f -1. We need to show that for any b ∈ B, there is a unique a ∈ A such that(b, a) ∈ f -1.
We first prove that for any b ∈ B, there is at least one a ∈ A such that(b, a) ∈ f -1. Since f is a bijection, it is surjective, so for any b ∈ B, there is some a ∈ A such that f(a) = b. Since f(a) = b, (b, a) ∈ f -1, as required.
Now, we prove that for any b in B, there is at most one a ∈ A such that (b, a) ∈ f -1. To see this, consider any a
0, a
1 such that (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1. We will prove that a
0 = a
1. Since (b, a
0) ∈ f -1 and
(b, a1) ∈ f -1, we know that f(a
0) = b and f(a
1) = b. Since f is a bijection, f
is injective. Therefore, because f(a0) = f(a
1), we have that a
0 = a
1 as
required.
Thus for any b ∈ B, there is a unique a ∈ A such that (b, a) ∈ f -1. ■
The Other Direction
● We have just proven that
if f : A → B is a bijection, then f -1 : B → A.
● It can also be shown (fun times!) that
if f -1 : B → A, then f : A → B is a bijection.
● and
if f : A → B is a bijection, then f -1 : B → A is a bijection.
● Using the fact that (f -1)-1 = f, regardless of whether f is a function, we can use this to prove prove
f : A → B is a bijectioniff
f -1 : B → A is a bijection
Next Time
● The Pigeonhole Principle● Particularly pleasing and poignant pigeon-powered
proofs!