Docsity

Set Theory, Relations, and Logic: Properties and Examples, Lecture notes of Mathematics

Partial preview of the text

Download Set Theory, Relations, and Logic: Properties and Examples and more Lecture notes Mathematics in PDF only on Docsity!

DRAFT

Lecture Notes on Discrete Mathematics

July 30, 2019

DRAFT

DRAFT

  • 1 Basic Set Theory Contents
    • 1.1 Sets
    • 1.2 Operations on sets
    • 1.3 Relations
    • 1.4 Functions
    • 1.5 Composition of functions
    • 1.6 Equivalence relation
  • 2 The Natural Number System
    • 2.1 Peano Axioms
    • 2.2 Other forms of Principle of Mathematical Induction
    • 2.3 Applications of Principle of Mathematical Induction
    • 2.4 Well Ordering Property of Natural Numbers
    • 2.5 Recursion Theorem
    • 2.6 Construction of Integers
    • 2.7 Construction of Rational Numbers
  • 3 Countable and Uncountable Sets
    • 3.1 Finite and infinite sets
    • 3.2 Families of sets
    • 3.3 Constructing bijections
    • 3.4 Cantor-Schrยจoder-Bernstein Theorem
    • 3.5 Countable and uncountable sets
  • 4 Elementary Number Theory
    • 4.1 Division algorithm and its applications
    • 4.2 Modular arithmetic
    • 4.3 Chinese Remainder Theorem
  • 5 Combinatorics - I
    • 5.1 Addition and multiplication rules
    • 5.2 Permutations and combinations
      • 5.2.1 Counting words made with elements of a set S
      • 5.2.2 Counting words with distinct letters made with elements of a set S
      • 5.2.3 Counting words where letters may repeat
      • 5.2.4 Counting subsets
      • 5.2.5 Pascalโ€™s identity and its combinatorial proof
      • 5.2.6 Counting in two ways 4 CONTENTS
    • 5.3 Solutions in non-negative integers
    • 5.4 Binomial and multinomial theorems
    • 5.5 Circular arrangements
    • 5.6 Set partitions
    • 5.7 Number partitions
    • 5.8 Lattice paths and Catalan numbers
  • 6 Combinatorics - II
    • 6.1 Pigeonhole Principle
    • 6.2 Principle of Inclusion and Exclusion
    • 6.3 Generating Functions
      • 6.3.1 Generating Functions and Partitions of n
    • 6.4 Recurrence Relation
    • 6.5 Generating Function from Recurrence Relation
  • 7 Introduction to Logic
    • 7.1 Logic of Statements (SL)
    • 7.2 Formulas and truth values in SL
    • 7.3 Equivalence and Normal forms in SL
    • 7.4 Inferences in SL
    • 7.5 Predicate logic (PL)
    • 7.6 Equivalences and Validity in PL
    • 7.7 Inferences in PL
  • 8 Partially Ordered Sets, Lattices and Boolean Algebra
    • 8.1 Partial Orders
    • 8.2 Lattices
    • 8.3 Boolean Algebras
    • 8.4 Axiom of choice and its equivalents
  • 9 Graphs - I
    • 9.1 Basic concepts
    • 9.2 Connectedness
    • 9.3 Isomorphism in graphs
    • 9.4 Trees
    • 9.5 Eulerian graphs
    • 9.6 Hamiltonian graphs
    • 9.7 Bipartite graphs
    • 9.8 Planar graphs
    • 9.9 Vertex coloring
  • 10 Graphs - II
    • 10.1 Connectivity
    • 10.2 Matching in graphs
    • 10.3 Ramsey numbers
    • 10.4 Degree sequence
  • CONTENTS DRAFT
    • 10.5 Representing graphs with matrices
  • 11 Polya Theoryโˆ—
    • 11.1 Groups
    • 11.2 Lagrangeโ€™s Theorem
    • 11.3 Group action
    • 11.4 The Cycle index polynomial
    • 11.5 Polyaโ€™s inventory polynomial
  • Index

DRAFT

Chapter 1

Basic Set Theory

The following notations will be followed throughout the book.

  1. The empty set, denoted โˆ…, is the set that has no element.
  2. N := { 1 , 2 ,.. .}, the set of Natural numbers;
  3. W := { 0 , 1 , 2 ,.. .}, the set of whole numbers
  4. Z := { 0 , 1 , โˆ’ 1 , 2 , โˆ’ 2 ,.. .}, the set of Integers;
  5. Q := { pq : p, q โˆˆ Z, q 6 = 0}, the set of Rational numbers;
  6. R := the set of Real numbers; and
  7. C := the set of Complex numbers.

This chapter will be devoted to understanding set theory, relations, functions. We start with the basic set theory.

1.1 Sets

Mathematicians over the last two centuries have been used to the idea of considering a collection of objects/numbers as a single entity. These entities are what are typically called sets. The technique of using the concept of a set to answer questions is hardly new. It has been in use since ancient times. However, the rigorous treatment of sets happened only in the 19-th century due to the German math- ematician Georg Cantor. He was solely responsible in ensuring that sets had a home in mathematics. Cantor developed the concept of the set during his study of the trigonometric series, which is now known as the limit point or the derived set operator. He developed two types of transfinite numbers, namely, transfinite ordinals and transfinite cardinals. His new and path-breaking ideas were not well received by his contemporaries. Further, from his definition of a set, a number of contradictions and paradoxes arose. One of the most famous paradoxes is the Russellโ€™s Paradox, due to Bertrand Russell in 1918. This paradox amongst others, opened the stage for the development of axiomatic set theory. The interested reader may refer to Katz [8]. In this book, we will consider the intuitive or naive view point of sets. The notion of a set is taken as a primitive and so we will not try to define it explicitly. We only give an informal description of sets and then proceed to establish their properties. A โ€œwell-defined collectionโ€ of distinct objects can be considered to be a set. Thus, the principal property of a set is that of โ€œmembershipโ€ or โ€œbelongingโ€. Well-defined, in this context, would enable us to determine whether a particular object is a member of a set or not.

7

DRAFT

8 CHAPTER 1. BASIC SET THEORY

Members of the collection comprising the set are also referred to as elements of the set. Elements of a set can be just about anything from real physical objects to abstract mathematical objects. An important feature of a set is that its elements are โ€œdistinctโ€ or โ€œuniquely identifiable.โ€ A set is typically expressed by curly braces, { } enclosing its elements. If A is a set and a is an element of it, we write a โˆˆ A. The fact that a is not an element of A is written as a 6 โˆˆ A. For instance, if A is the set { 1 , 4 , 9 , 2 }, then 1 โˆˆ A, 4 โˆˆ A, 2 โˆˆ A and 9 โˆˆ A. But 7 6 โˆˆ A, ฯ€ 6 โˆˆ A, the English word โ€˜fourโ€™ is not in A, etc.

Example 1.1.1. 1. Let X = {apple, tomato, orange}. Here, orange โˆˆ X, but potato 6 โˆˆ X.

  1. X = {a 1 , a 2 ,... , a 10 }. Then, a 100 6 โˆˆ X.
  2. Observe that the sets { 1 , 2 , 3 }, { 3 , 1 , 2 } and {digits in the number 12321} are the same as the order in which the elements appear doesnโ€™t matter.

We now address the idea of distinctness of elements of a set, which comes with its own subtleties.

Example 1.1.2. 1. Consider the list of digits 1, 2 , 1 , 4 , 2. Is it a set?

  1. Let X = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }. Then X is the set of first 10 natural numbers. Or equivalently, X is the set of integers between 0 and 11.

Definition 1.1.3. The set S that contains no element is called the empty set or the null set and is denoted by { } or โˆ…. A set that has only one element is called a singleton set.

One has three main ways for specifying a set. They are:

  1. Listing all its elements (list notation), e.g., X = { 2 , 4 , 6 , 8 , 10 }. Then X is the set of even integers between 0 and 12.
  2. Stating a property with notation (predicate notation), e.g., (a) X = {x : x is a prime number}. This is read as โ€œX is the set of all x such that x is a prime numberโ€. Here, x is a variable and stands for any object that meets the criteria after the colon. (b) The set X = { 2 , 4 , 6 , 8 , 10 } in the predicate notation can be written as i. X = {x : 0 < x โ‰ค 10 , x is an even integer }, or ii. X = {x : 1 < x < 11 , x is an even integer }, or iii. x = {x : 2 โ‰ค x โ‰ค 10 , x is an even integer } etc.

Note that the above expressions are certain rules that help in defining the elements of the set X. In general, one writes X = {x : p(x)} or X = {x | p(x)} to denote the set of all elements x (variable) such that property p(x) holds. In the above, note that โ€œcolonโ€ is sometimes replaced by โ€œ|โ€.

  1. Defining a set of rules which generate its members (recursive notation), e.g., let

X = {x : x is an even integer greater than 3}.

Then, X can also be specified by (a) 4 โˆˆ X, (b) whenever x โˆˆ X, then x + 2 โˆˆ X, and (c) every element of X satisfies the above two rules.

DRAFT

10 CHAPTER 1. BASIC SET THEORY

(b) R โˆช (S โˆช T ) = (R โˆช S) โˆช T and R โˆฉ (S โˆฉ T ) = (R โˆฉ S) โˆฉ T (union and intersection are associative operations). (c) S โІ S โˆช T, T โІ S โˆช T. (d) S โˆฉ T โІ S, S โˆฉ T โІ T. (e) S โˆช โˆ… = S, S โˆฉ โˆ… = โˆ…. (f ) S โˆช S = S โˆฉ S = S.

  1. Distributive laws (combines union and intersection): (a) R โˆช (S โˆฉ T ) = (R โˆช S) โˆฉ (R โˆช T ) (union distributes over intersection). (b) R โˆฉ (S โˆช T ) = (R โˆฉ S) โˆช (R โˆช T ) (intersection distributes over union).

Proof. 2 a. Let x โˆˆ R โˆช (S โˆฉ T ). Then, x โˆˆ R or x โˆˆ S โˆฉ T. If x โˆˆ R then, x โˆˆ R โˆช S and x โˆˆ R โˆช T. Thus, x โˆˆ (R โˆช S) โˆฉ (R โˆช T ). If x 6 โˆˆ R, then x โˆˆ S โˆฉ T. So, x โˆˆ S and x โˆˆ T. Here, x โˆˆ R โˆช S and x โˆˆ R โˆช T. Thus, x โˆˆ (R โˆช S) โˆฉ (R โˆช T ). In other words, R โˆช (S โˆฉ T ) โІ (R โˆช S) โˆฉ (R โˆช T ). Now, let y โˆˆ (R โˆช S) โˆฉ (R โˆช T ). Then, y โˆˆ R โˆช S and y โˆˆ R โˆช T. Now, if y โˆˆ R โˆช S then either y โˆˆ R or y โˆˆ S or both. If y โˆˆ R, then y โˆˆ Rโˆช(SโˆฉT ). If y 6 โˆˆ R then the conditions y โˆˆ RโˆชS and y โˆˆ RโˆชT imply that y โˆˆ S and y โˆˆ T. Thus, y โˆˆ S โˆฉT and hence y โˆˆ Rโˆช(S โˆฉT ). This shows that (RโˆชS)โˆฉ(RโˆชT ) โІ Rโˆช(S โˆฉT ), and thereby proving the first distributive law. The remaining proofs are left as exercises.

Exercise 1.2.4. 1. Complete the proof of Lemma 1.2.3.

  1. Prove the following: (a) S โˆช (S โˆฉ T ) = S โˆฉ (S โˆช T ) = S. (b) S โІ T if and only if S โˆช T = T. (c) If R โІ T and S โІ T then R โˆช S โІ T. (d) If R โІ S and R โІ T then R โІ S โˆฉ T. (e) If S โІ T then R โˆช S โІ R โˆช T and R โˆฉ S โІ R โˆฉ T. (f ) If S โˆช T 6 = โˆ… then either S 6 = โˆ… or T 6 = โˆ…. (g) If S โˆฉ T 6 = โˆ… then both S 6 = โˆ… and T 6 = โˆ…. (h) S = T if and only if S โˆช T = S โˆฉ T.

Definition 1.2.5. Let X and Y be two sets.

  1. The set difference of X and Y , denoted by X \ Y , is defined by X \ Y = {x โˆˆ X : x 6 โˆˆ Y }.
  2. The set (X \ Y ) โˆช (Y \ X), denoted by Xโˆ†Y , is called the symmetric difference of X and Y.

Example 1.2.6. 1. Let A = { 1 , 2 , 4 , 18 } and B = {x โˆˆ Z : 0 < x โ‰ค 5 }. Then,

A \ B = { 18 }, B \ A = { 3 , 5 } and Aโˆ†B = { 3 , 5 , 18 }.

  1. Let S = {x โˆˆ R : 0 โ‰ค x โ‰ค 1 } and T = {x โˆˆ R : 0. 5 โ‰ค x < 7 }. Then,

S \ T = {x โˆˆ R : 0 โ‰ค x < 0. 5 } and T \ S = {x โˆˆ R : 1 < x < 7 }.

  1. Let X = {{b, c}, {{b}, {c}}, b} and Y = {a, b, c}. Then

X \ Y = {{b, c}, {{b}, {c}}}, Y \ X = {a, c} and Xโˆ†Y = {a, c, {b, c}, {{b}, {c}}}.

DRAFT

1.3. RELATIONS 11

In naive set theory, all sets are essentially defined to be subsets of some reference set, referred to as the universal set, and is denoted by U. We now define the complement of a set.

Definition 1.2.7. Let U be the universal set and X โІ U. Then, the complement of X, denoted by Xc, is defined by Xc^ = {x โˆˆ U : x 6 โˆˆ X}.

We state more properties of sets.

Lemma 1.2.8. Let U be the universal set and S, T โІ U. Then,

  1. U c^ = โˆ… and โˆ…c^ = U.
  2. S โˆช Sc^ = U and S โˆฉ Sc^ = โˆ….
  3. S โˆช U = U and S โˆฉ U = S.
  4. (Sc)c^ = S.
  5. S โІ Sc^ if and only if S = โˆ….
  6. S โІ T if and only if T c^ โІ Sc.
  7. S = T c^ if and only if S โˆฉ T = โˆ… and S โˆช T = U.
  8. S \ T = S โˆฉ T c^ and T \ S = T โˆฉ Sc.
  9. Sโˆ†T = (S โˆช T ) \ (S โˆฉ T ).
  10. De-Morganโ€™s Laws: (a) (S โˆช T )c^ = Sc^ โˆฉ T c. (b) (S โˆฉ T )c^ = Sc^ โˆช T c.

The De-Morganโ€™s laws help us to convert arbitrary set expressions into those that involve only complements and unions or only complements and intersections.

Exercise 1.2.9. Let S and T be subsets of a universal set U.

  1. Then prove Lemma 1.2.8.
  2. Suppose that Sโˆ†T = T. Is S = โˆ…?

Definition 1.2.10. Let X be a set. Then, the set that contains all subsets of X is called the power set of X and is denoted by P(X) or 2X^.

Example 1.2.11. 1. Let X = โˆ…. Then P(โˆ…) = P(X) = {โˆ…, X} = {โˆ…}.

  1. Let X = {โˆ…}. Then P({โˆ…}) = P(X) = {โˆ…, X} = {โˆ…, {โˆ…}}.
  2. Let X = {a, b, c}. Then P(X) = {โˆ…, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
  3. Let X = {{b, c}, {{b}, {c}}}. Then P(X) = {โˆ…, {{b, c}}, {{{b}, {c}}}, {{b, c}, {{b}, {c}}} }.

1.3 Relations

In this section, we introduce the set theoretic concepts of relations and functions. We will use these concepts to relate different sets. This method also helps in constructing new sets from existing ones.

DRAFT

1.3. RELATIONS 13

(b) R = {(a, a), (b, b), (c, c), (d, d), (a, b), (a, c), (b, c)}. (c) R = {(a, a), (b, b), (c, c)}. (d) R = {(a, a), (a, b), (b, a), (b, b), (c, d)}. (e) R = {(a, a), (a, b), (b, a), (a, c), (c, a), (c, c), (b, b)}. (f) R = {(a, b), (b, c), (a, c), (d, d)}. (g) R = {(a, a), (b, b), (c, c), (d, d), (a, b), (b, c)}. (h) R = {(a, a), (b, b), (c, c), (d, d), (a, b), (b, a), (b, c), (c, b)}. (i) R = {(a, a), (b, b), (c, c), (a, b), (b, c)}.

Sometimes, we draw pictures to have a better understanding of different relations. For example, to draw pictures for relations on a set X, we first put a node for each element x โˆˆ X and label it x. Then, for each (x, y) โˆˆ R, we draw a directed line from x to y. If (x, x) โˆˆ R then a loop is drawn at x. The pictures for some of the relations is given in Figure 1.1.

a (^) b

c (^) d

A ร— A

a (^) b

c (^) d

Example 2.b

a (^) b

c (^) d

Example 2.c

Figure 1.1: Pictorial representation of some relations from Example 2

  1. Let A = { 1 , 2 , 3 }, B = {a, b, c} and let R = {(1, a), (1, b), (2, c)}. Figure 1.2 represents the relation R. 1

a

b c

R Figure 1.2: Pictorial representation of the relation in Example 3

  1. Let R = {(x, y) : x, y โˆˆ Z and y = x + 5m for some m โˆˆ Z} is a relation on Z. If we try to draw a picture for this relation then there is no arrow between any two elements of { 1 , 2 , 3 , 4 , 5 }.
  2. Fix n โˆˆ N. Let R = {(x, y) : x, y โˆˆ Z and y = x + nm for some m โˆˆ Z}. Then, R is a relation on Z. A picture for this relation has no arrow between any two elements of { 1 , 2 , 3 ,... , n}. (^1) We use pictures to help our understanding and they are not parts of proof.

DRAFT

14 CHAPTER 1. BASIC SET THEORY

Definition 1.3.7. Let X and Y be two nonempty sets and let R be a relation from X to Y. Then, the inverse relation, denoted by Rโˆ’^1 , is a relation from Y to X, defined by Rโˆ’^1 = {(y, x) โˆˆ Y ร— X : (x, y) โˆˆ R}. So, for all x โˆˆ X and y โˆˆ Y

(x, y) โˆˆ R if and only if (y, x) โˆˆ Rโˆ’^1.

Example 1.3.8. 1. If R = {(1, a), (1, b), (2, c)} then Rโˆ’^1 = {(a, 1), (b, 1), (c, 2)}.

  1. Let R = {(a, b), (b, c), (a, c)} be a relation on A = {a, b, c} then Rโˆ’^1 = {(b, a), (c, b), (c, a)} is also a relation on A. Let R be a relation from X to Y. Consider an element x โˆˆ X. It is natural to ask if there exists y โˆˆ Y such that (x, y) โˆˆ R. This gives rise to the following three possibilities:
  2. (x, y) 6 โˆˆ R for all y โˆˆ Y.
  3. There is a unique y โˆˆ Y such that (x, y) โˆˆ R.
  4. There exists at least two elements y 1 , y 2 โˆˆ Y such that (x, y 1 ), (x, y 2 ) โˆˆ R.

One can ask similar questions for an element y โˆˆ Y. To accommodate all these, we introduce a notation in the following definition.

Definition 1.3.9. Let R be a nonempty relation from X to Y. Then,

  1. the set dom R:= {x : (x, y) โˆˆ R} is called the domain of R^1 , and
  2. the set rng R:= {y โˆˆ Y : (x, y) โˆˆ R} is called the range of R.

Notation 1.3.10. Let R be a nonempty relation from X to Y. Then,

  1. for any set Z, one writes R(Z) := {y : (z, y) โˆˆ R for some z โˆˆ Z}.
  2. for any set W , one writes Rโˆ’^1 (W ) := {x โˆˆ X : (x, w) โˆˆ R for some w โˆˆ W }.

Example 1.3.11. Let a, b, c, and d be distinct symbols and let R = { 1 , a), (1, b), (2, c)}. Then,

  1. dom R = { 1 , 2 }, rng R = {a, b, c},
  2. R({ 1 }) = {a, b}, R({ 2 }) = {c}, R({ 1 , 2 }) = {a, b, c}, R({ 1 , 2 , 3 }) = {a, b, c}, R({ 4 }) = โˆ….
  3. dom Rโˆ’^1 = {a, b, c}, rng Rโˆ’^1 = { 1 , 2 },
  4. Rโˆ’^1 ({a}) = { 1 }, Rโˆ’^1 ({a, b}) = { 1 }, Rโˆ’^1 ({b, c}) = { 1 , 2 }, Rโˆ’^1 ({a, d}) = { 1 }, Rโˆ’^1 ({d}) = โˆ…. The following is an immediate consequence of the definition, but we give the proof of a few parts for the sake of better understanding.

Proposition 1.3.12. Let R be a nonempty relation from X to Y , and let Z be any set.

  1. R(Z) = R(X โˆฉ Z) โІ Y, Rโˆ’^1 (Z) = Rโˆ’^1 (Z โˆฉ Y ) โІ X.
  2. dom R = Rโˆ’^1 (Y ) = rng Rโˆ’^1 โІ X, rng R = R(X) = dom Rโˆ’^1 โІ Y.
  3. R(Z) 6 = โˆ… if and only if dom R โˆฉ Z 6 = โˆ….
  4. Rโˆ’^1 (Z) 6 = โˆ… if and only if rng R โˆฉ Z 6 = โˆ….

Proof. We prove the last two parts. The proof of the first two parts is left as an exercise.

  1. Let f (S) 6 = โˆ…. There exist a โˆˆ S โˆฉ A and b โˆˆ B such that (a, b) โˆˆ f. It implies that a โˆˆ dom f โˆฉ S (a โˆˆ S). Converse is proved in a similar way.
  2. Let rng f โˆฉ S 6 = โˆ…. There exist b โˆˆ rng f โˆฉ S and a โˆˆ A such that (a, b) โˆˆ f. Then a โˆˆ f โˆ’^1 (b) โІ f โˆ’^1 (S). Similarly, the converse follows.

(^1) In some texts, the set X is referred to as the domain set of R and it should not be confused with dom R.

DRAFT

16 CHAPTER 1. BASIC SET THEORY

  1. Define f : Q+^ โ†’ N by f = {( pq , 2 p 3 q) : p, q โˆˆ N, q 6 = 0, p and q are coprime}. Then, f is a function.

Remark 1.4.4. 1. If X = โˆ…, then by convention, one assumes that there is a function, called the empty function, from X to Y.

  1. If Y = โˆ… and X 6 = โˆ…, then by convention, we say that there is no function from X to Y.
  2. Individual relations and functions are also sets. Therefore, one can have equality between rela- tions and functions, i.e., they are equal if and only if they contain the same set of pairs. For exam- ple, let X = {โˆ’ 1 , 0 , 1 }. Then, the functions f, g, h : X โ†’ X defined by f (x) = x, g(x) = x|x| and h(x) = x^3 are equal as the three functions correspond to the relation R = {(โˆ’ 1 , โˆ’1), (0, 0), (1, 1)} on X.
  3. A function is also called a map.
  4. Throughout the book, whenever the phrase โ€˜let f : X โ†’ Y be a functionโ€™ is used, it will be assumed that both X and Y are nonempty sets. Some important functions are now defined.

Definition 1.4.5. Let X be a nonempty set.

  1. The relation Id := {(x, x) : x โˆˆ X} is called the identity relation on X.
  2. The function f : X โ†’ X defined by f (x) = x, for all x โˆˆ X, is called the identity function and is denoted by Id.
  3. The function f : X โ†’ R with f (x) = 0, for all x โˆˆ X, is called the zero function and is denoted by 0.

Exercise 1.4.6. 1. Do the following relations represent functions? Why?

(a) f : Z โ†’ Z defined by i. f = {(x, 1) : 2 divides x} โˆช {(x, 5) : 3 divides x}. ii. f = {(x, 1) : x โˆˆ S} โˆช {(x, โˆ’1) : x โˆˆ Sc}, where S = {n^2 : n โˆˆ Z} and Sc^ = Z \ S. iii. f = {(x, x^3 ) : x โˆˆ Z}. (b) f : R+^ โ†’ R defined by f = {(x, ยฑ

x) : x โˆˆ R+}, where R+^ is the set of all positive real numbers. (c) f : R โ†’ R defined by f = {(x,

x) : x โˆˆ R}. (d) f : R โ†’ C defined by f = {(x,

x) : x โˆˆ R}. (e) f : Rโˆ’^ โ†’ R defined by f = {(x, loge |x|) : x โˆˆ Rโˆ’}, where Rโˆ’^ is the set of all negative real numbers. (f ) f : R โ†’ R defined by f = {(x, tan x) : x โˆˆ R}.

  1. Let f : X โ†’ Y be a function. Then f โˆ’^1 is a relation from Y to X. Show that the following results hold for f โˆ’^1 : (a) f โˆ’^1 (A โˆช B) = f โˆ’^1 (A) โˆช f โˆ’^1 (B) for all A, B โІ Y. (b) f โˆ’^1 (A โˆฉ B) = f โˆ’^1 (A) โˆฉ f โˆ’^1 (B) for all A, B โІ Y. (c) f โˆ’^1 (โˆ…) = โˆ…. (d) f โˆ’^1 (Y ) = X. (e) f โˆ’^1 (Y \ B) = X \

f โˆ’^1 (B)

for each B โІ Y.

  1. Let S = {(x, y) โˆˆ R^2 : x^2 + y^2 = 1, x โ‰ฅ 0 }. It is a relation from R to R. Draw a picture of the inverse of this relation.

DRAFT

1.4. FUNCTIONS 17

Definition 1.4.7. A function f : X โ†’ Y is said to be injective (also called one-one or an injection) if for all x, y โˆˆ X, x 6 = y implies f (x) 6 = f (y). Equivalently, f is one-one if for all x, y โˆˆ X, f (x) = f (y) implies x = y.

Example 1.4.8. 1. Let X be a nonempty set. Then, the identity map Id on X is one-one.

  1. Let X be a nonempty proper subset of Y. Then f (x) = x is a one-one map from X to Y.
  2. The function f : Z โ†’ Z defined by f (x) = x^2 is not one-one as f (โˆ’1) = f (1) = 1.
  3. The function f : { 1 , 2 , 3 } โ†’ {a, b, c, d} defined by f (1) = c, f (2) = b and f (3) = a, is one-one. It can be checked that there are 24 one-one functions f : { 1 , 2 , 3 } โ†’ {a, b, c, d}.
  4. There is no one-one function from the set { 1 , 2 , 3 } to its proper subset { 1 , 2 }.
  5. There are one-one functions from the set N of natural numbers to its proper subset { 2 , 3 ,.. .}. One of them is given by f (1) = 4, f (2) = 3, f (3) = 2 and f (n) = n + 1, for all n โ‰ฅ 4.

Definition 1.4.9. Let f : X โ†’ Y be a function. Let A โІ X and A 6 = โˆ…. The restriction of f to A, denoted by fA, is the function fA = {(x, y) : (x, y) โˆˆ f, x โˆˆ A}.

Example 1.4.10. Define f : R โ†’ R by f (x) = 0 if x is rational, and f (x) = 1 if x is irrational. Then, fQ : Q โ†’ R is the zero function.

Proposition 1.4.11. Let f : X โ†’ Y be a one-one function and let Z be a nonempty subset of X. Then fZ is also one-one.

Proof. Suppose fZ (x) = fZ (y) for some x, y โˆˆ Z. Then f (x) = f (y). As f is one-one, x = y. Thus, fZ is one-one.

Definition 1.4.12. A function f : X โ†’ Y is said to be surjective (also called onto or a surjection) if f โˆ’^1 ({b}) 6 = โˆ… for each b โˆˆ Y. Equivalently, f : X โ†’ Y is onto if there exists a pre-image under f , for each b โˆˆ Y.

Example 1.4.13. 1. Let X be a nonempty set. Then the identity map on X is onto.

  1. Let X be a nonempty proper subset of Y. Then the identity map f : X โ†’ Y is not onto.
  2. There are 6 onto functions from {a, b, c} to {a, b}. For example, f (a) = a, f (b) = b, and f (c) = b is one such function.
  3. Let X be a nonempty subset of Y. Fix an element a โˆˆ X. Define g : Y โ†’ X by

g(y) =

y, if y โˆˆ X, a, if y โˆˆ Y \ X.

Then g is an onto function.

  1. There does not exist any onto function from the set {a, b} to its proper superset {a, b, c}.
  2. There exist onto functions from the set { 2 , 3 ,.. .} to its proper superset N. An example of such a function is f (n) = n โˆ’ 1 for all n โ‰ฅ 2.

Definition 1.4.14. Let X and Y be sets. A function f : X โ†’ Y is said to be bijective (also call a bijection) if f is both one-one and onto. The set X is said to be equinumerous^1 with the set Y if there exists a bijection f : X โ†’ Y. (^1) If X is equinumerous with Y then X is also said to be equivalent to Y.

DRAFT

1.6. EQUIVALENCE RELATION 19

  1. [Extension] If dom f โˆฉ dom h = โˆ… and rng f โˆฉ rng h = โˆ… then the function f โˆช h from X โˆช Z to Y โˆช W defined by f โˆช h = {(a, f (a)) : a โˆˆ X} โˆช {(c, h(c)) : c โˆˆ Z} is a bijection.
  2. Let X and Y be sets with at least two elements each and let f : X โ†’ Y be a bijection. Then the number of bijections from X to Y is at least 2.

Theorem 1.5.4. [Properties of the identity function] Let X and Y be two nonempty sets and Id be the identity function on X. Then, for any two functions f : X โ†’ Y and g : Y โ†’ X,

f โ—ฆ Id = f and Id โ—ฆ g = g.

Proof. By definition, (f โ—ฆ Id)(x) = f (Id(x)) = f (x), for all x โˆˆ X. Hence, f โ—ฆ Id = f. Similarly, the other equality follows.

We now give a very important bijection principle.

Theorem 1.5.5. [Bijection principle] Let f : X โ†’ Y and g : Y โ†’ X be functions such that (g โ—ฆ f )(x) = x for each x โˆˆ X. Then f is one-one and g is onto.

Proof. To show that f is one-one, suppose f (a) = f (b) for some a, b โˆˆ X. Then

a = (g โ—ฆ f )(a) = g (f (a)) = g (f (b)) = (g โ—ฆ f )(b) = b.

Thus, f is one-one. To show that g is onto, let a โˆˆ X. Write b = f (a). Now, a = (g โ—ฆ f )(a) = g(f (a)) = g(b). That is, we have found b โˆˆ Y such that g(b) = a. Hence, g is onto.

Exercise 1.5.6. 1. Let f, g : W โ†’ W be defined by f = {(x, 2 x) : x โˆˆ W} and g = {

x, x 2

x is even} โˆช {(x, 0) : x is odd}. Verify that g โ—ฆ f is the identity function on W, whereas f โ—ฆ g maps even numbers to even numbers and odd numbers to 0.

  1. Let f : X โ†’ Y be a function. Prove that f โˆ’^1 : Y โ†’ X is a function if and only if f is a bijection.
  2. Define f : N ร— N โ†’ N by f (m, n) = 2mโˆ’^1 (2n โˆ’ 1). Is f a bijection?
  3. Let f : X โ†’ Y be a bijection and let A โІ X. Is f (X \ A) = Y \ f (A)?
  4. Let f : X โ†’ Y and g : Y โ†’ X be two functions such that (a) (f โ—ฆ g)(y) = y for each y โˆˆ Y , (b) (g โ—ฆ f )(x) = x for each x โˆˆ X.

Show that f is a bijection and g = f โˆ’^1. Can we conclude the same without assuming the second condition?

1.6 Equivalence relation

We look at some relations that are of interest in mathematics.

Definition 1.6.1. Let A be a nonempty set. Then, a relation R on A is said to be

  1. reflexive if for each a โˆˆ A, (a, a) โˆˆ R.
  2. symmetric if for each pair of elements a, b โˆˆ A, (a, b) โˆˆ R implies (b, a) โˆˆ R.
  3. transitive if for each triple of elements a, b, c โˆˆ A, (a, b), (b, c) โˆˆ R imply (a, c) โˆˆ R.

DRAFT

20 CHAPTER 1. BASIC SET THEORY

Exercise 1.6.2. For relations defined in Example 1.3.6, determine which of them are

  1. reflexive.
  2. symmetric.
  3. transitive.

Definition 1.6.3. Let A be a nonempty set. A relation on A is called an equivalence relation if it is reflexive, symmetric and transitive. It is customary to write a supposed equivalence relation as โˆผ rather than R. The equivalence class of the equivalence relation โˆผ containing an element a โˆˆ A is denoted by [a], and is defined as [a] := {x โˆˆ A : x โˆผ a}.

Example 1.6.4. 1. Consider the relations on A of Example 1.3.6.

(a) The relation in Example 1.3.6.1 is not an equivalence relation; it is not symmetric. (b) The relation in Example 1.3.6.2a is an equivalence relation with [a] = {a, b, c, d} as the only equivalence class. (c) Other relations in Example 1.3.6.2 are not equivalence relations. (d) The relation in Example 1.3.6.4 is an equivalence relation with the equivalence classes as i. [0] = {... , โˆ’ 15 , โˆ’ 10 , โˆ’ 5 , 0 , 5 , 10 ,.. .}. ii. [1] = {... , โˆ’ 14 , โˆ’ 9 , โˆ’ 4 , 1 , 6 , 11 ,.. .}. iii. [2] = {... , โˆ’ 13 , โˆ’ 8 , โˆ’ 3 , 2 , 7 , 12 ,.. .}. iv. [3] = {... , โˆ’ 12 , โˆ’ 7 , โˆ’ 2 , 3 , 8 , 13 ,.. .}. v. [4] = {... , โˆ’ 11 , โˆ’ 6 , โˆ’ 1 , 4 , 9 , 14 ,.. .}. (e) The relation in Example 1.3.6.5 is an equivalence relation with the equivalence classes as [0] = {... , โˆ’ 3 n, โˆ’ 2 n, โˆ’n, 0 , n, 2 n,.. .}. [1] = {... , โˆ’ 3 n + 1, โˆ’ 2 n + 1, โˆ’n + 1, 1 , n + 1, 2 n + 1,.. .}. [2] = {... , โˆ’ 3 n + 2, โˆ’ 2 n + 2, โˆ’n + 2, 2 , n + 2, 2 n + 2,.. .}. .. . [n โˆ’ 2] = {... , โˆ’ 2 n โˆ’ 2 , โˆ’n โˆ’ 2 , โˆ’ 2 , n โˆ’ 2 , 2 n โˆ’ 2 , 3 n โˆ’ 2 ,.. .}. [n โˆ’ 1] = {... , โˆ’ 2 n โˆ’ 1 , โˆ’n โˆ’ 1 , โˆ’ 1 , n โˆ’ 1 , 2 n โˆ’ 1 , 3 n โˆ’ 1 ,.. .}.

  1. Consider the relation R = {(a, a), (b, b), (c, c)} on the set A = {a, b, c}. Then R is an equivalence relation with three equivalence classes, namely [a] = {a}, [b] = {b} and [c] = {c}.
  2. The relation R = {(a, a), (b, b), (c, c), (a, c), (c, a)} is an equivalence relation on A = {a, b, c}. It has two equivalence classes, namely [a] = [c] = {a, c} and [b] = {b}.

Proposition 1.6.5. [Equivalence relation divides a set into disjoint classes] Let โˆผ be an equivalence relation on a nonempty set X. Then,

  1. any two equivalence classes are either disjoint or identical ;
  2. the set X is equal to the union of all equivalence classes of โˆผ.

That is, an equivalence relation โˆผ on X divides X into disjoint equivalence classes.

Proof. 1. Let a, b โˆˆ X be distinct elements of X. If the equivalence classes [a] and [b] are disjoint, then there is nothing to prove. So, assume that there exists c โˆˆ X such that c โˆˆ [a] โˆฉ [b]. That is, c โˆผ a and c โˆผ b. By symmetry of โˆผ it follows that a โˆผ c and b โˆผ c. We will show that [a] = [b]. For this, let x โˆˆ [a]. Then x โˆผ a. Since a โˆผ c and โˆผ is transitive, we have x โˆผ c. Again, c โˆผ b and transitivity of โˆผ imply that x โˆผ b. Thus, x โˆˆ [b]. That is, [a] โІ [b]. A similar argument proves that [b] โІ [a]. Thus, whenever two equivalence classes intersect, they are indeed equal.