introduction to set theory and logic (intoset) · introduction to set theory and logic (intoset)...

35
Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics Department De La Salle University-Manila

Upload: others

Post on 11-Oct-2020

20 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Introduction to Set theory and Logic(INTOSET)

Relations,Partitions and Functions

Francis Joseph Campena,PhDMathematics and Statistics Department

De La Salle University-Manila

Page 2: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation

DefinitionLet A and B be sets. A binary relation from A to B is a subset ofA× B.

Most of the time when we talk about binary relation, we will justrefer to it as a relation.

This means that a binary relation from A to B is a set R ofordered pairs where the first element comes from A andthe second element comes from B.

Notation: The symbol aRb would denote that (a,b) ∈ Rand that the element a is ”related" the the element b.

EXAMPLEConsider the sets A = {0,1,2} and B = {a,b}. Then the set{(0,a), (0,b), (1,a), (2,b)} is a relation from A to B.

Page 3: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation

DefinitionLet A and B be sets. A binary relation from A to B is a subset ofA× B.

Most of the time when we talk about binary relation, we will justrefer to it as a relation.

This means that a binary relation from A to B is a set R ofordered pairs where the first element comes from A andthe second element comes from B.

Notation: The symbol aRb would denote that (a,b) ∈ Rand that the element a is ”related" the the element b.

EXAMPLEConsider the sets A = {0,1,2} and B = {a,b}. Then the set{(0,a), (0,b), (1,a), (2,b)} is a relation from A to B.

Page 4: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation

DefinitionLet A and B be sets. A binary relation from A to B is a subset ofA× B.

Most of the time when we talk about binary relation, we will justrefer to it as a relation.

This means that a binary relation from A to B is a set R ofordered pairs where the first element comes from A andthe second element comes from B.

Notation: The symbol aRb would denote that (a,b) ∈ Rand that the element a is ”related" the the element b.

EXAMPLEConsider the sets A = {0,1,2} and B = {a,b}. Then the set{(0,a), (0,b), (1,a), (2,b)} is a relation from A to B.

Page 5: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation on a Set

DefinitionA relation on a set A is a relation from A to A.

This means that a relation on a set A is a subset of A× A.

Example

Let A = {1,2,3,4}. If Ri is a relation on A, which of the orderedpairs belong to relation

1 R1 = {(a,b) : a divides b}.2 R2 = {(a,b) : a = b}.3 R3 = {(a,b) : a ≤ b}.4 R4 = {(a,b) : a > b}.

Page 6: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation on a Set

DefinitionA relation on a set A is a relation from A to A.

This means that a relation on a set A is a subset of A× A.

Example

Let A = {1,2,3,4}. If Ri is a relation on A, which of the orderedpairs belong to relation

1 R1 = {(a,b) : a divides b}.2 R2 = {(a,b) : a = b}.3 R3 = {(a,b) : a ≤ b}.4 R4 = {(a,b) : a > b}.

Page 7: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation on a Set

DefinitionA relation on a set A is a relation from A to A.

This means that a relation on a set A is a subset of A× A.

Example

Let A = {1,2,3,4}. If Ri is a relation on A, which of the orderedpairs belong to relation

1 R1 = {(a,b) : a divides b}.2 R2 = {(a,b) : a = b}.3 R3 = {(a,b) : a ≤ b}.4 R4 = {(a,b) : a > b}.

Page 8: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation on a Set

DefinitionA relation on a set A is a relation from A to A.

This means that a relation on a set A is a subset of A× A.

Example

Let A = {1,2,3,4}. If Ri is a relation on A, which of the orderedpairs belong to relation

1 R1 = {(a,b) : a divides b}.2 R2 = {(a,b) : a = b}.3 R3 = {(a,b) : a ≤ b}.4 R4 = {(a,b) : a > b}.

Page 9: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Relation on a Set

DefinitionA relation on a set A is a relation from A to A.

This means that a relation on a set A is a subset of A× A.

Example

Let A = {1,2,3,4}. If Ri is a relation on A, which of the orderedpairs belong to relation

1 R1 = {(a,b) : a divides b}.2 R2 = {(a,b) : a = b}.3 R3 = {(a,b) : a ≤ b}.4 R4 = {(a,b) : a > b}.

Page 10: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = {−2,−1,0,1,2} and the followingrelations

1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

List all the elements of each relations given above.

Page 11: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 12: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 13: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 14: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 15: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 16: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the relations above contain the pair1 (1,1)?2 (1,2)?3 (1,−1)?4 (−1,1)?5 (2,1)?

Page 17: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Properties

DefinitionConsider a set A and a relation R on A.

R is said to be reflexive if (a,a) ∈ R for every a ∈ A.R is said to be symmetric if (a,b) ∈ R then (b,a) ∈ R fora,b ∈ A.R is said to be antisymmetric if (a,b) ∈ R then (b,a) /∈ Rfor a,b ∈ A.R is said to be transitive if (a,b) ∈ R and (b, c) ∈ R then(a, c) ∈ R for a,b, c ∈ A.

Page 18: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Consider the set A = Z and the following relations1 R1 = {(a,b) : a ≤ b}.2 R2 = {(a,b) : a > b}.3 R3 = {(a,b) : a = b or a = −b}.4 R4 = {(a,b) : a = b + 1}.5 R5 = {(a,b) : a + b ≤ 3}.

Which of the following relations are1 reflexive?2 symmetric?3 antisymmetric?4 transitive?

Page 19: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

EXERCISES

Determine whether the relation R on the set of all people isreflexive, symmetric, antisymmetric, and/or transitive, where(a,b) ∈ R if and only if

1 a is taller than b.2 a and b were born on the same day.3 a has the same first name as b.

REFLECT: Think of another relation on the set of all peoplewhich is reflexive, symmetric and transitive.

Page 20: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

EXERCISES

Determine whether the relation R on the set of all people isreflexive, symmetric, antisymmetric, and/or transitive, where(a,b) ∈ R if and only if

1 a is taller than b.2 a and b were born on the same day.3 a has the same first name as b.

REFLECT: Think of another relation on the set of all peoplewhich is reflexive, symmetric and transitive.

Page 21: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Equivalence Relation

DefinitionA relation R on a set A is called an equivalence relation if it isreflexive, symmetric and transitive.

ExampleSuppose R is a relation on the set of strings of English letterssuch that aRb if and only if l(a) = l(b) where l(x) is the lengthof the string x . Is R an equivalence relation?

ExampleLet R be a relation on the set of real number such that aRb ifand only if a− b is an integer. Is R an equivalence relation?

Page 22: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Equivalence Relation

DefinitionA relation R on a set A is called an equivalence relation if it isreflexive, symmetric and transitive.

ExampleSuppose R is a relation on the set of strings of English letterssuch that aRb if and only if l(a) = l(b) where l(x) is the lengthof the string x . Is R an equivalence relation?

ExampleLet R be a relation on the set of real number such that aRb ifand only if a− b is an integer. Is R an equivalence relation?

Page 23: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

DefinitionLet m be a positive integer greater than 1. If a and b areintegers, then a is congruent to b modulo m if m divides a− b.We use the notation a ≡ b mod m to indicate that a iscongruent to b modulo m.

Show that if A = Z and R = {(a,b) : a ≡ b mod m}, then R isan equivalence relation.

Page 24: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

DefinitionLet m be a positive integer greater than 1. If a and b areintegers, then a is congruent to b modulo m if m divides a− b.We use the notation a ≡ b mod m to indicate that a iscongruent to b modulo m.

Show that if A = Z and R = {(a,b) : a ≡ b mod m}, then R isan equivalence relation.

Page 25: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Equivalence Class

DefinitionLet R be an equivalence relation of a set A. The set of allelements that are related to an element a ∈ A is called theequivalence class of a.

The equivalence class of a with respect the the relation R isdenoted by [a]R. When only one relation is being consideredand is clear from the discussion, we omit the subscript R andwrite [a] the equivalence class of a.If b ∈ [a]R, we call b a representative of this equivalence class.

Page 26: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

1 Let A = Z. Let R be the relation such that aRb if and only ifa = b or a = −b.What is the equivalence class on aninteger for this equivalence relation?

2 What is the equivalence class of 0 for the congruencemodulo 4 on the set of all integers?

3 What are the equivalence classes of 0 and 3 for thecongruence modulo 5 on the set of all integers?

4 Consider the set A = {1,2,3,4,5,6,7,8,9,10}. Let R bethe relation aRb if and only if a ≡ b mod 5. What are thedistinct equivalence classes for this relation?

Page 27: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

1 Let A = Z. Let R be the relation such that aRb if and only ifa = b or a = −b.What is the equivalence class on aninteger for this equivalence relation?

2 What is the equivalence class of 0 for the congruencemodulo 4 on the set of all integers?

3 What are the equivalence classes of 0 and 3 for thecongruence modulo 5 on the set of all integers?

4 Consider the set A = {1,2,3,4,5,6,7,8,9,10}. Let R bethe relation aRb if and only if a ≡ b mod 5. What are thedistinct equivalence classes for this relation?

Page 28: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

1 Let A = Z. Let R be the relation such that aRb if and only ifa = b or a = −b.What is the equivalence class on aninteger for this equivalence relation?

2 What is the equivalence class of 0 for the congruencemodulo 4 on the set of all integers?

3 What are the equivalence classes of 0 and 3 for thecongruence modulo 5 on the set of all integers?

4 Consider the set A = {1,2,3,4,5,6,7,8,9,10}. Let R bethe relation aRb if and only if a ≡ b mod 5. What are thedistinct equivalence classes for this relation?

Page 29: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

1 Let A = Z. Let R be the relation such that aRb if and only ifa = b or a = −b.What is the equivalence class on aninteger for this equivalence relation?

2 What is the equivalence class of 0 for the congruencemodulo 4 on the set of all integers?

3 What are the equivalence classes of 0 and 3 for thecongruence modulo 5 on the set of all integers?

4 Consider the set A = {1,2,3,4,5,6,7,8,9,10}. Let R bethe relation aRb if and only if a ≡ b mod 5. What are thedistinct equivalence classes for this relation?

Page 30: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Parititions

DefinitionA paritition of a set S is a collection of disjoint non-emptysubsets of S whose union is the set S.

Example

Consider S = {1,2,3,4,5,6}. The collection of setsA1 = {1,3,5},A2 = {2,4},A3 = {6} forms a partition of S.

Can you give other partitions of S?

Page 31: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Paritions

TheoremLet R be an equivalence relation of a set S. Then theequivalence classes of R form a partition of S. Conversely,given a partition {Ai : i ∈ I} of the set S, there is an equivalencerelation R that has the sets Ai , i ∈ I as its equivalence classes.

ExampleWhat are the sets in the partition of the intgers arising from thecongruence modulo 4?

Page 32: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Functions

DefinitionA function f from a set X into a set Y is a rule that assigns toeach x in X a unique element f (x) in Y . The collection G ofpairs of the form (x , f (x)) in X × Y is called the graph of thefunction f .

A subset G of X × Y is the graph of a function on X if andonly if for each x ∈ X there is a unique pair in G whose firstelement is x .The word mapping is often used as a synonym forfunction.We express the fact that f is a function from X to Y bywriting f : X 7→ Y . The set X is the domain and Y tocodomain

Page 33: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Functions

The set Im(f ) = f [X ] = {y ∈ Y : y = f (x)} is called therange of f .If B is a subset of Y , we define the inverse image f−1[B] ofB to be the set of those x ∈ X such that f (x) ∈ B.

Let A ⊂ X . By the set f [A] = {y ∈ A : y = f (x)} we meanthe image of the set A under the function f .A function f : X 7→ Y is called one-to-one or injective iff (x1) = f (x2) implies that x1 = x2.

If a function f : X 7→ Y has a range equal to Y , we call thefunction an onto function or a surjective function.A function that is both one-to-one and onto is called a 1-1correspondence or a bijective function.

Page 34: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

Examples

Identify whether the following function is 1− 1, onto or abijective function.

f (x) = x + 1f (x) = x2

f (x) =√

4− x2

f (x) = |x |

Page 35: Introduction to Set theory and Logic (INTOSET) · Introduction to Set theory and Logic (INTOSET) Relations,Partitions and Functions Francis Joseph Campena,PhD Mathematics and Statistics

RECALL: An indexed subset of X or a collection of subsets ofX is a function on an index set S to X .⋃

s∈S

As = {x ∈ X : ∃s(s ∈ S and x ∈ As)}⋂s∈S

As = {x ∈ X : ∀s(s ∈ S implies x ∈ As)}

If f : X 7→ Y and {Ak} is a collection of subsets of X , then

f

[⋃s∈S

As

]=

⋃s∈S

f [As]

f

[⋂s∈S

As

]⊂

⋂s∈S

f [As]

f−1

[⋃s∈S

As

]=

⋃s∈S

f−1 [As]

f−1

[⋂s∈S

As

]=

⋂s∈S

f−1 [As]