Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically,...
Transcript of Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically,...
![Page 1: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/1.jpg)
Order Relationsand
Functions
![Page 2: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/2.jpg)
Problem Session Tonight
7:00PM – 7:50PM380-380X
Optional, but highly recommended!
![Page 3: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/3.jpg)
Recap from Last Time
![Page 4: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/4.jpg)
Relations
● A binary relation is a property that describes whether two objects are related in some way.
● Examples:● Less-than: x < y● Divisibility: x divides y evenly● Friendship: x is a friend of y● Tastiness: x is tastier than y
● Given binary relation R, we write aRb iff a is related to b by relation R.
![Page 5: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/5.jpg)
Order Relations
![Page 6: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/6.jpg)
“x is larger than y”
“x is faster than y”
“x is tastier than y”
“x is a subset of y”
“x divides y”
“x is a part of y”
![Page 7: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/7.jpg)
Informally
An order relation is a relation that ranks elements against one another.
Do not use this definition in proofs!It's just an intuition!
![Page 8: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/8.jpg)
Properties of Order Relations
x ≤ y
![Page 9: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/9.jpg)
Properties of Order Relations
x ≤ y
1 ≤ 5 5 ≤ 8and
![Page 10: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/10.jpg)
Properties of Order Relations
x ≤ y
1 ≤ 5 5 ≤ 8and
1 ≤ 8
![Page 11: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/11.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 99 99 ≤ 137and
![Page 12: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/12.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 99 99 ≤ 137and
42 ≤ 137
![Page 13: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/13.jpg)
Properties of Order Relations
x ≤ y
x ≤ y y ≤ zand
![Page 14: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/14.jpg)
Properties of Order Relations
x ≤ y
x ≤ y y ≤ zand
x ≤ z
![Page 15: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/15.jpg)
Properties of Order Relations
x ≤ y
x ≤ y y ≤ zand
x ≤ z
Transitivity
![Page 16: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/16.jpg)
Properties of Order Relations
x ≤ y
![Page 17: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/17.jpg)
Properties of Order Relations
x ≤ y
1 ≤ 1
![Page 18: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/18.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 42
![Page 19: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/19.jpg)
Properties of Order Relations
x ≤ y
137 ≤ 137
![Page 20: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/20.jpg)
Properties of Order Relations
x ≤ y
x ≤ x
![Page 21: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/21.jpg)
Properties of Order Relations
x ≤ y
x ≤ x
Reflexivity
![Page 22: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/22.jpg)
Properties of Order Relations
x ≤ y
![Page 23: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/23.jpg)
Properties of Order Relations
x ≤ y
19 ≤ 21
![Page 24: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/24.jpg)
Properties of Order Relations
x ≤ y
19 ≤ 2121 ≤ 19?
![Page 25: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/25.jpg)
Properties of Order Relations
x ≤ y
19 ≤ 2121 ≤ 19?
![Page 26: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/26.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 137
![Page 27: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/27.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 137137 ≤ 42?
![Page 28: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/28.jpg)
Properties of Order Relations
x ≤ y
42 ≤ 137137 ≤ 42?
![Page 29: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/29.jpg)
Properties of Order Relations
x ≤ y
137 ≤ 137
![Page 30: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/30.jpg)
Properties of Order Relations
x ≤ y
137 ≤ 137137 ≤ 137?
![Page 31: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/31.jpg)
Properties of Order Relations
x ≤ y
137 ≤ 137137 ≤ 137
![Page 32: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/32.jpg)
Antisymmetry
A binary relation R over a set A is called antisymmetric iff
For any x ∈ A and y ∈ A,If xRy and y ≠ x, then yRx.
Equivalently:
For any x ∈ A and y ∈ A,if xRy and yRx, then x = y.
![Page 33: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/33.jpg)
An Intuition for Antisymmetry
Self-loops allowed
Only one edge between nodes
For any x ∈ A and y ∈ A,If xRy and y ≠ x, then yRx.
![Page 34: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/34.jpg)
Partial Orders
● A binary relation R is a partial order over a set A iff it is
● reflexive,● antisymmetric, and● transitive.
● A pair (A, R), where R is a partial order over A, is called a partially ordered set or poset.
![Page 35: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/35.jpg)
Partial Orders
Why “partial”?
● A binary relation R is a partial order over a set A iff it is
● reflexive,● antisymmetric, and● transitive.
● A pair (A, R), where R is a partial order over A, is called a partially ordered set or poset.
![Page 36: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/36.jpg)
Gold Silver Bronze
46 29 29
38 27 23
29 17 19
24 26 32
14 15 17
Total
104
88
65
82
4613 8 7 28
2012 Summer Olympics
Inspired by http://tartarus.org/simon/2008-olympics-hasse/Data from http://www.london2012.com/medals/medal-count/
14 15 17 4611 19 14 44
14 15 17 4611 11 12 34
![Page 37: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/37.jpg)
Gold Silver Bronze
46 29 29
38 27 23
29 17 19
24 26 32
14 15 17
Total
104
88
65
82
4613 8 7 28
2012 Summer Olympics
Inspired by http://tartarus.org/simon/2008-olympics-hasse/Data from http://www.london2012.com/medals/medal-count/
14 15 17 4611 19 14 44
14 15 17 4611 11 12 34
![Page 38: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/38.jpg)
Define the relationship
(gold0, total0)R(gold1, total1)
to be true when
gold0 ≤ gold1 and total0 ≤ total1
![Page 39: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/39.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 40: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/40.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 41: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/41.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 42: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/42.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 43: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/43.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 44: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/44.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 45: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/45.jpg)
10446
8838
29 8224
2813
4411
3411
65
![Page 46: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/46.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 47: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/47.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 48: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/48.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 49: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/49.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 50: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/50.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 51: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/51.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 52: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/52.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 53: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/53.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 54: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/54.jpg)
Partial and Total Orders
● A binary relation R over a set A is called total iff for any x ∈ A and y ∈ A, that xRy or yRx.● It's possible for both to be true.
● A binary relation R over a set A is called a total order iff it is a partial order and it is total.
● Examples:● Integers ordered by ≤.● Strings ordered alphabetically.
![Page 55: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/55.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 56: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/56.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 57: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/57.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 58: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/58.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 59: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/59.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 60: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/60.jpg)
10446
8838
6529 8224
2813
4411
3411
![Page 61: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/61.jpg)
10446
8838
6529 8224
2813
4411
3411
More Medals
Fewer Medals
![Page 62: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/62.jpg)
10446
8838
6529 8224
2813
4411
3411
More Medals
Fewer Medals
![Page 63: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/63.jpg)
Hasse Diagrams
● A Hasse diagram is a graphical representation of a partial order.
● No self-loops: by reflexivity, we can always add them back in.
● Higher elements are bigger than lower elements: by antisymmetry, the edges can only go in one direction.
● No redundant edges: by transitivity, we can infer the missing edges.
![Page 64: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/64.jpg)
Indian Mediterranean
Mexican
Chinese Italian
American
Tasty
Not Tasty
Dorm
![Page 65: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/65.jpg)
0
3
1
2
4
...Larger
Smaller
![Page 66: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/66.jpg)
Hasse Artichokes
![Page 67: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/67.jpg)
Hasse Artichokes
![Page 68: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/68.jpg)
Summary of Order Relations
● A partial order is a relation that is reflexive, antisymmetric, and transitive.
● A Hasse diagram is a drawing of a partial order that has no self-loops, arrowheads, or redundant edges.
● A total order is a partial order in which any pair of elements are comparable.
![Page 69: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/69.jpg)
For More on the Olympics:
http://www.nytimes.com/interactive/2012/08/07/sports/olympics/the-best-and-worst-countries-in-the-medal-count.html
![Page 70: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/70.jpg)
Functions
![Page 71: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/71.jpg)
A function is a means of associating each object in one set with an object in some
other set.
![Page 72: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/72.jpg)
DikdikNubian
IbexSloth
![Page 73: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/73.jpg)
![Page 74: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/74.jpg)
Black and White
![Page 75: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/75.jpg)
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) = b1, then b0 = b1.
● 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'll discuss “range” in a few minutes.
● We denote that f is a function from A to B by writing
f : A → B
![Page 76: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/76.jpg)
Is This a Function from A to B?
A B
![Page 77: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/77.jpg)
Is This a Function from A to B?
A B
![Page 78: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/78.jpg)
Is This a Function from A to B?
Each object in the domain has to be associated with exactly one object in the
codomain!
Each object in the domain has to be associated with exactly one object in the
codomain!
A B
![Page 79: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/79.jpg)
Is This a Function from A to B?
California
New York
Delaware
Washington DC
Sacramento
Dover
Albany
A B
Each object in the domain has to be associated with exactly one object in the
codomain!
Each object in the domain has to be associated with exactly one object in the
codomain!
![Page 80: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/80.jpg)
Is This a Function from A to B?
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.
It's fine that nothing is associated with Friend; functions do not need
to use the entire codomain.
A B
![Page 81: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/81.jpg)
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.
![Page 82: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/82.jpg)
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.⌈π⌉
![Page 83: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/83.jpg)
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.
![Page 84: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/84.jpg)
Piecewise Functions
● Functions may be specified piecewise, with different rules applying to different elements.
● Example:
● When defining a function piecewise, it's up to you to confirm that it defines a legal function!
f (n)={ −n /2 if n is even(n+1)/2 otherwise
![Page 85: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/85.jpg)
♀☿
♂♃♄♅♆
♀
![Page 86: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/86.jpg)
♀☿
♂♃♄♅♆
♀
![Page 87: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/87.jpg)
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
♀☿
♂♃♄♅♆
♀
![Page 88: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/88.jpg)
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
Pluto
♀☿
♂♃♄♅♆
♀
![Page 89: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/89.jpg)
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
![Page 90: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/90.jpg)
Mercury
Venus
Earth
Mars
Jupiter
Saturn
Uranus
Neptune
♀☿
♂♃♄♅♆
♀
![Page 91: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/91.jpg)
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.
● Formally:
If f(x0) = f(x1), then x0 = x1
● An intuition: injective functions label the objects from A using names from B.
![Page 92: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/92.jpg)
![Page 93: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/93.jpg)
![Page 94: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/94.jpg)
Front Door
BalconyWindow
BedroomWindow
![Page 95: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/95.jpg)
Front Door
BalconyWindow
BedroomWindow
![Page 96: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/96.jpg)
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.● Formally:
For any b ∈ B, there exists atleast one a ∈ A such that f(a) = b.
● An intuition: surjective functions cover every element of B with at least one element of A.
![Page 97: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/97.jpg)
Injections and Surjections
● 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?
![Page 98: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/98.jpg)
Katniss Everdeen
Merida
Hermione Granger
![Page 99: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/99.jpg)
Katniss Everdeen
Merida
Hermione Granger
![Page 100: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/100.jpg)
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.
![Page 101: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/101.jpg)
Compositions
![Page 102: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/102.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 103: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/103.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 104: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/104.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 105: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/105.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 106: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/106.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 107: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/107.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 108: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/108.jpg)
www.microsoft.com www.apple.com www.google.com
![Page 109: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/109.jpg)
Function Composition
● Let f : A → B and g : B → C.● The composition of f and g (denoted
g ∘ f) is the function g ∘ f : A → C 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
![Page 110: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/110.jpg)
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
![Page 111: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/111.jpg)
Cardinality Revisited
![Page 112: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/112.jpg)
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
![Page 113: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/113.jpg)
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
, , ,
, ,,
![Page 114: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/114.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 115: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/115.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 116: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/116.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 117: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/117.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 118: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/118.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
R S T
![Page 119: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/119.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
R S T
g
g
g
![Page 120: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/120.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
R S T
g
g
g
h
h
h
![Page 121: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/121.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
R S T
g
g
g
h
h
h
h ∘ g
h ∘ g
h ∘ g
![Page 122: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/122.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 123: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/123.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = t and f(r1) = t, we know (h ∘ g)(r0) = tand (h ∘ g)(r1) = t. By definition of composition, we haveh(g(r0)) = h(g(r1)). Since h is a bijection, h is injective, we havethat g(r0) = g(r1). Since g is a bijection, g is injective, we havethat r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 124: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/124.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 125: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/125.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 126: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/126.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 127: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/127.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 128: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/128.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 129: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/129.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 130: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/130.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 131: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/131.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 132: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/132.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 133: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/133.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 134: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/134.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 135: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/135.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 136: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/136.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 137: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/137.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 138: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/138.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 139: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/139.jpg)
Theorem: If |R| = |S| and |S| = |T|, then |R| = |T|.
Proof: We will exhibit a bijection f : R → T. Since |R| = |S|, there is abijection 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 abijection by showing that it is injective and surjective.
To see that f is injective, suppose that f(r0) = f(r1). We will showthat r0 = r1. Since f(r0) = f(r1), we know (h ∘ g)(r0) = (h ∘ g)(r1).By definition of composition, we have h(g(r0)) = h(g(r1)). Since his a bijection, h is injective. Thus since h(g(r0)) = h(g(r1)), we havethat g(r0) = g(r1). Since g is a bijection, g is injective, so becauseg(r0) = g(r1) we have that r0 = r1. Therefore, f is injective.
To see that f is surjective, consider any t ∈ T. We will show thatthere is some r ∈ R such that f(r) = t. Since h is a bijection fromS 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 somer ∈ R such that g(r) = s. Thus f(r) = (h ∘ g)(r) = h(g(r)) = h(s) = tas required, so f is surjective.
Since f is injective and surjective, it is bijective. Thus there is abijection from R to T, so |R| = |T|. ■
![Page 140: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/140.jpg)
Properties of Cardinality
● Equality of cardinality is an equivalence relation. For any sets R, S, and T:● |S| = |S|. (reflexivity)● If |S| = |T|, then |T| = |S|. (symmetry)● If |R| = |S| and |S| = |T|, then |R| = |T|.
(transitivity)
![Page 141: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/141.jpg)
Comparing Cardinalities
● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T
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.
Totality requires the axiom of choice. Take Math 161 for more details.
![Page 142: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/142.jpg)
Comparing Cardinalities
● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T
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.
Totality requires the axiom of choice. Take Math 161 for more details.
![Page 143: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/143.jpg)
Comparing Cardinalities
● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T
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.
Totality requires the axiom of choice. Take Math 161 for more details.
![Page 144: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/144.jpg)
Comparing Cardinalities
● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T
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.
Totality requires the axiom of choice. Take Math 161 for more details.
![Page 145: Order Relations and Functions - Stanford University · 2012-10-09 · Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain](https://reader033.fdocuments.net/reader033/viewer/2022042620/5f4556bf73870a7b3a16fcda/html5/thumbnails/145.jpg)
Comparing Cardinalities
● We define |S| ≤ |T| as follows:
|S| ≤ |T| iff there is an injection f : S → T● 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.● Totality requires the axiom of choice. Take Math 161 for more
details.