100% found this document useful (6 votes)
3K views171 pages

Concise Introduction To Logic and Set Theory

Uploaded by

MilosZecevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (6 votes)
3K views171 pages

Concise Introduction To Logic and Set Theory

Uploaded by

MilosZecevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 171

Concise Introduction

to Logic and Set


Theory
Concise Introduction
to Logic and Set
Theory

Iqbal H. Jebril, Hemen Dutta, and Ilwoo Cho


First edition published 2022
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742

and by CRC Press


2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

© 2022 Taylor & Francis Group, LLC

CRC Press is an imprint of Taylor & Francis Group, LLC

Reasonable efforts have been made to publish reliable data and information, but the author and pub-
lisher cannot assume responsibility for the validity of all materials or the consequences of their use.
The authors and publishers have attempted to trace the copyright holders of all material reproduced
in this publication and apologize to copyright holders if permission to publish in this form has not
been obtained. If any copyright material has not been acknowledged please write and let us know so
we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermis-
[email protected]

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.

Library of Congress Cataloging‑in‑Publication Data


Names: Jebril, Iqbal H., author. | Dutta, Hemen, 1981- author. | Cho, Ilwoo,
author.
Title: Concise introduction to logic and set theory / Iqbal H. Jebril,
Hemen Dutta, and Ilwoo Cho.
Description: First edition. | Boca Raton : CRC Press, 2022. | Series: Mathematics
and its applications: modelling, engineering, and social sciences |
Includes bibliographical references and index.
Identifiers: LCCN 2021020846 (print) | LCCN 2021020847 (ebook) |
ISBN 9780367077952 (hardback) | ISBN 9781032106229 (paperback) |
ISBN 9780429022838 (ebook)
Subjects: LCSH: Logic, Symbolic and mathematical. | Set theory.
Classification: LCC QA9.A5 J43 2022 (print) | LCC QA9.A5 (ebook) |
DDC 511.3--dc23
LC record available at https://lccn.loc.gov/2021020846
LC ebook record available at https://lccn.loc.gov/2021020847

ISBN: 978-0-367-07795-2 (hbk)


ISBN: 978-1-032-10622-9 (pbk)
ISBN: 978-0-429-02283-8 (ebk)

DOI: 10.1201/9780429022838

Typeset in Nimbus Roman


by KnowledgeWorks Global Ltd.
Contents

Preface......................................................................................................................vii

About Authors...........................................................................................................ix

Chapter 1 Mathematical Logic.........................................................................1


1.1 Sets..........................................................................................1
1.2 Propositions and Connectives.................................................3
1.3 Tautology and Contradiction ................................................10
1.4 Quantifiers.............................................................................12
1.5 Logical Reasoning ................................................................16
1.6 Mathematical Proof ..............................................................18
1.6.1 Direct and contrapositive Proof ...............................18
1.6.2 Contradiction Proof..................................................20
1.7 Induction ...............................................................................23
1.7.1 Introduction..............................................................23
1.7.2 Induction Principle...................................................24

Chapter 2 Set Theory .....................................................................................29


2.1 Basic Notions of Set Theory.................................................29
2.2 Elementary Properties of Sets...............................................32
2.2.1 Union of Sets............................................................32
2.2.2 Intersection of Sets...................................................34
2.2.3 Complement of Set ..................................................39
2.2.4 Difference and Symmetric Difference of Sets .........42
2.3 Indexed Families of Sets.......................................................45

Chapter 3 Relations ........................................................................................51


3.1 Ordered Pairs and Cartesian Product ....................................51
3.2 Relations on Sets...................................................................56
3.3 Type of Relations ..................................................................66
3.4 Equivalence Relations and Equivalence Classes ..................70
3.5 Congruence ...........................................................................76
3.6 Partial and Total Ordered Relations......................................83

Chapter 4 Functions .......................................................................................97


4.1 Functions...............................................................................97
4.1.1 Domain and Range...................................................97

v
vi Contents

4.1.2 Graph of a Function .................................................99


4.2 One-to-one Functions and Onto Functions.........................101
4.3 Composite Functions and Inverse Functions ......................114
4.4 Direct Images and Inverse Images under a Function..........125

Chapter 5 Cardinality of Sets .......................................................................133


5.1 Cardinal Number ................................................................133
5.1.1 Equipotent Sets ......................................................133
5.1.2 Countable Sets .......................................................140
5.1.3 Cardinal Arithmetic ...............................................144
5.1.4 Order Types............................................................150
5.1.5 More About Cardinal Numbers .............................151
5.2 Axiom of Choice.................................................................154

Bibliography ..........................................................................................................157

Index......................................................................................................................159
Preface
The book deals with two most important branches of mathematics, namely, logic
and set theory. Logic and set theory are two closely related branches of mathemat-
ics that play very crucial role in the foundations of mathematics, and together these
produced several beautiful results in all of mathematics. The book is designed for
various courses where mathematical logic and set theory are required either as com-
pulsory subjects or as parts of other subjects. The book consists of five chapters, and
they are organised as follows:
Chapter 1 deals with basics of mathematical logic. The chapter starts with the
concept of “set” briefly with examples. Then several topics and notions, such as
propositions, connectives, tautology, contradiction, quantifiers, logical reasoning,
mathematical proof, direct and contrapositive proof, contradiction proof, and in-
duction principle, are discussed with examples. Exercises are also incorporated at
different places of the chapter.
Chapter 2 starts with the basic notions of set theory. Then several elementary
properties and operations on sets, such as union of sets, intersection of sets, com-
plement of set, and difference and symmetric difference of sets, are discussed with
examples and diagrammatic representations. Finally, the chapter discusses indexed
families of sets. Several exercises relevant to the topics discussed are also incorpo-
rated at different places within the chapter.
Chapter 3 deals with the notion of relations with lots of examples, diagram-
matic representations, and exercises. In particular, the chapter discusses notions
such as ordered pairs and Cartesian product, relations on sets, type of relations,
equivalence relations, equivalence classes, congruence, and partial and total ordered
relations.
Chapter 4 discusses the concept of functions, and basic ideas associated with this
notion with the help of several examples and diagrammatic representations. In par-
ticular, the chapter discusses concepts such as domain and range of a function, graph
of a function, functions that are onto and one-to-one, composite function, inverse
function, and direct images and inverse images under function. Relevant exercises
are also added at different locations of the chapter.
Chapter 5 deals with the cardinality of sets. Several notions and associated ideas
on finite and infinite sets, equivalent sets, countable and uncountable sets, and car-
dinal arithmetic are also discussed. Finally, Cantor’s theorem, Schröder–Bernstein
theorem and axiom of choice are presented. This chapter also contains several exam-
ples and exercises.
We would like to offer our sincere thanks to all the authors who have con-
tributed extensively in the field of set theory and mathematical logic and our family

vii
viii Preface

members and friends who have encouraged us to develop this book. The authors
are also grateful to Ants Aasma (Estonia) for carefully reading/editing the book and
making several fruitful suggestions to improve the presentation of the book.

Iqbal H. Jebril
Hemen Dutta
Ilwoo Cho
March 2021
About Authors
Iqbal H. Jebril is Professor in the Department of Mathematics at Al-Zaytoonah
University of Jordan, Amman, Jordan. He obtained his Ph.D. from the National Uni-
versity of Malaysia (UKM), Malaysia. His fields of research interest include func-
tional analysis, operator theory, and fuzzy logic. He has several prestigious journal
and conference publications to his credit. He is also serving for several journals and
conferences in different capacities.

Hemen Dutta obtained his M.Phil and Ph.D. both in mathematics and also com-
pleted postgraduate Diploma in Computer Application from Gauhati University, In-
dia. He is a regular teaching faculty member in the Department of Mathematics at
Gauhati University, India. His current research interests include topics in nonlinear
analysis and mathematical modelling. He is currently a regular and guest editor of
several SCI/SCIE indexed journals. He has also published several thematic issues in
leading journals and books with reputed publishers.

Ilwoo Cho obtained his Ph.D. from the Department of Mathematics, University of
Iowa, USA. His major fields of research are free probability, operator theory, op-
erator algebra, and dynamical systems. He is full professor in the Department of
Mathematics & Statistics at Saint Ambrose University, USA. He is also an assistant
editor of Complex Analysis & Operator Theory and Mathematics Reviewer of the
American Mathematical Society.

ix
1 Mathematical Logic
Logic is the analysis of reasoning, and it concerns with the picture of thought not
with its subject. Mathematical logic, however, is one of the mathematical branches
that concerns with explaining types of reasoning used by mathematicians.
In this chapter, we present set concept briefly. Set theory is the cornerstone in
the foundations of mathematical logic, and it is the device of defining and analyzing
primary concepts. After that we define the proposition and explain the way to connect
simple propositions with one link or more to get a compound proposition. Then, we
talk about the qualified propositions and valid arguments. We conclude the chapter
with methods of mathematical proof.

1.1 SETS
In this section, we present a simple introduction of sets, which form a base of study-
ing logic. In chapter two, we will describe set theory in more detail, giving notations
and results, which we need later.
Although we will not formally define the word “set”, we will use it to refer to a
collection of objects of some sort. We indicate that an object x is in a set A by writing
x ∈ A. If x is not in A, we write x 6∈ A. The objects in a set A are usually called the
elements of A.

Example 1.1.1
(1) 2 ∈ {1, 2, 3, a, b},
(2) 3 6∈ {−1, 0, 1}.

We say that sets A and B are equal and write A = B in case A and B contain exactly
the same elements.

Example 1.1.2 ( √ )
3 n πo
0, , 6, 1 = 1, 6, sin 2π , cos .
2 6

We shall use the following notations for some common sets of numbers,

N = {1, 2, 3, . . . }, the set of natural numbers.

Z = {0, ±1, ±2, ±3, . . .}, the set of integers.


a
Q= b : a, b ∈ Z, b 6= 0 , the set of rational numbers.

DOI: 10.1201/9780429022838-1 1
2 Concise Introduction to Logic and Set Theory

R = the set of real numbers.

C = {a + bi : a, b ∈ R, i2 = −1}, the set of complex numbers.

Z+ = {1, 2, 3, . . .}, the set of positive integers.

Z− = {−1, −2, −3, . . .}, the set of negative integers.

Ze = {0, ±2, ±4, . . .}, the set of even integers.

Zo = {±1, ±3, ±5, . . .}, the set of odd integers.

Let a, b ∈ R such that a < b. Then,


the open interval (a, b) is the set of real numbers between a and b, but does not
include the endpoints a and b, that is

(a, b) = {x ∈ R | a < x < b},

(a, b)
a b
Whereas, the closed interval [a, b] is the set of real numbers between a and b, and
it includes the endpoints a and b, that is

[a, b] = {x ∈ R | a ≤ x ≤ b},

[a, b]
a b
the half-open interval (or half closed) [a, b) & (a, b]

[a, b) = {x ∈ R | a ≤ x < b}, x = a, x 6= b.

[a, b)
a b

(a, b] = {x ∈ R | a < x ≤ b},


(a, b]
a b
Mathematical Logic 3

Note that
[a, ∞) = {x ∈ R | x ≥ a}, (a, ∞) = {x ∈ R | x > a},
[a, )
a

(−∞, a] = {x ∈ R | x ≤ a}, (−∞, a) = {x ∈ R | x < a}.


( , a]
a

1.2 PROPOSITIONS AND CONNECTIVES


In English language, some sentences are interrogatory (Where is my book?), others
exclamatory (Oh!), and others have a definite sense of truth to them.

Definition 1.2.1 A proposition (or statement) is a sentence that is either true or false.
Thus, a proposition has exactly one truth value: true, which we denote by T, or false,
which we denote by F.

Some examples of propositions are


(a) 3 + 4 = 7 (true proposition),

(b) 3 is a rational number (false proposition),
(c) Amman is the capital of Jordan (true proposition),
(d) If f (x) = sin x, then f ′ (x) = cos x (true proposition),
(e) There exists a natural number n such that n < 0 (false proposition), and
(f) Al Riyadh is the capital of Saudi Arabia (true proposition).
The following sentences are not propositions:
(g) How are you?
(h) x + 9 = 100.
(i) Give me your book.

Remark 1.2.2 Propositions will be denoted by capital letters like:

P, Q, R, S, . . .

Definition 1.2.3 Any two propositions can be combined by the word “and” to form
a composite proposition, which is called conjunction of the original propositions.
Symbolically, the conjunction of two propositions P and Q is denoted by P ∧ Q.
4 Concise Introduction to Logic and Set Theory

Example 1.2.4 Let P be “it is raining” and let Q be “the sun is shining”. Then P ∧ Q
denotes the proposition “it is raining and the sun is shining”.

Example 1.2.5 Let P be “3 + 2 6= 7”, and let Q be “Paris is in France”. Then P ∧ Q


denotes the proposition “3 + 2 6= 7 and Paris is in France”.

The truth value of the composite proposition P ∧ Q satisfies the following property:

Property 1.2.6 If P is true and Q is true, then P ∧ Q is true; otherwise P ∧ Q is false.


In other words, the conjunction P ∧ Q of two propositions P and Q is true if and only
if both components P and Q are true.

Examples 1.2.7 Consider the following four propositions:


(a) Damascus is in Syria and 4 + 5 = 10,
(b) Damascus is in Syria and 4 + 5 = 9,
(c) Damascus is in Syria and 4 + 5 = 0,
(d) Damascus is in Syria and 4 + 5 = −9.
By the property 1.2.6, only (b) is true.
A convenient way to state the above property is by means of a truth table as
follows:
P Q P∧Q
T T T
T F F
F T F
F F F

Note that the first line is a short way of saying that if P is true and Q is true, then
P ∧ Q is true. The other lines have analogous meaning.

Definition 1.2.8 Any two propositions can be combined by the word “or” to form a
new proposition, which is called disjunction of the original two propositions. Sym-
bolically, the disjunction of propositions P and Q is denoted by P ∨ Q.

Any two propositions can be combined by the word “or” to form a new proposition,
which is called the disjunction of the original two propositions. Symbolically, the
disjunction of propositions P and Q is denoted by P ∨ Q.

Example 1.2.9 Let P √ be “1 6= 5” and let Q be “ 2 is irrational”. Then P ∨ Q is the
proposition “1 6= 5 or 2 is irrational”.

The truth value of the composite proposition P ∨ Q satisfies the following property:

Property 1.2.10 If P is true or Q is true or both P and Q are true, then P ∨ Q is true;
otherwise, P ∨ Q is false. In other words, the disjunction of two propositions is false
only if each component is false.
Mathematical Logic 5

Property 1.2.10 can be written in the form of table as follows:


P Q P∨Q
T T T
T F T
F T T
F F F

Definition 1.2.11 Given any proposition P, another proposition, called negation of


P, can be formed by writing “it is false that . . . ” before P, or, if possible, by adding
the word “not” to P. Symbolically, the negation of P is denoted by ∼ P.

Example 1.2.12 Consider the following propositions:


(a) Amman is in Jordan,
(b) It is false that Amman is in Jordan,
(c) Amman is not in Jordan.
Then (b) and (c) are each the negation of (a).

Example 1.2.13 Consider the following propositions:


(a) 3 + 4 = 9,
(b) It is false that 3 + 4 = 9,
(c) 3 + 4 6= 9.
Then both (b) and (c) are the negation of (a).

The truth value of the negation of a proposition satisfies the following property:

Property 1.2.14 If P is true, then ∼ P is false, and if P is false, then ∼ P is true. In


other words, the truth value of the negation of a proposition is always the opposite of
the truth value of the original proposition.

Property 1.2.14 can also be written in the form of a table as follows:


P ∼P
T F
F T

Example 1.2.15 Consider the propositions in Example 1.2.12 above. Notice that (a)
is true, and (b) and (c), its negations, are false.

Example 1.2.16 Consider the propositions in Example 1.2.13 above. Notice that (a)
is false, and (b) and (c), its negations, are true.

Definition 1.2.17 Many propositions, especially in mathematics, are of the form “if
P, then Q”. Such propositions are called conditional propositions and are denoted by
P ⇒ Q.
6 Concise Introduction to Logic and Set Theory

The conditional P ⇒ Q can also be read:


(1) P implies Q,
(2) P only if Q,
(3) P is sufficient for Q,
(4) Q is necessary for P.

The truth value of the conditional proposition P ⇒ Q satisfies the following property:

Property 1.2.18 The conditional P ⇒ Q is true unless P is true and Q is false.


In other words, property 1.2.18 states that a true proposition cannot imply a false
proposition.
Property 1.2.18 can be written in the form of a table as follows:
P Q P⇒Q
T T T
T F F
F T T
F F T

Example 1.2.19 Consider the following propositions:


(a) If Al Riyadh is in Saudi Arabia, then 7 + 2 = 13,
(b) If Al Riyadh is in Saudi Arabia, then 7 + 2 = 9,
(c) If Al Riyadh is in Jordan, then 7 + 2 = 9,
(d) If Al Riyadh is in Jordan, then 7 + 2 = 13.
By the property 1.2.18, only (a) is a false proposition. The others are true.

Definition 1.2.20 Another composite proposition is of the form “P if and only if Q”


or (shortly) “P iff Q”. Such propositions are called bi-conditional propositions and
are denoted by P ⇔ Q.
The truth value of the bi-conditional proposition P ⇔ Q satisfies the following:

Property 1.2.21 If P and Q have the same truth value, then P ⇔ Q is true; if P and
Q have opposite truth values, then P ⇔ Q is false.
Property 1.2.21 can be written in the form of a table as follows:
P Q P⇔Q
T T T
T F F
F T F
F F T
Mathematical Logic 7

Example 1.2.22 Consider the following propositions:


(a) 2 < 4 ⇔ −1 < 0,
(b) 2 + 3 = 5 ⇔ Amman is in Iraq,

(c) 2 is a rational number ⇔ Amman is in Jordan,
(d) −3 is a natural number ⇔ Baghdad is in Jordan.
According to property 1.2.21, (a) and (d) are true; however; (b) and (c) are false.

Remark 1.2.23 The following expressions give the same meaning:


(a) P ⇔ Q,
(b) P is necessary and sufficient for Q,
(c) Q is necessary and sufficient for P,
(d) P if and only if Q.

Definition 1.2.24 Two propositions P and Q are said to be logically equivalent if


their truth tables are identical. We denote the logical equivalence of P and Q by
P ≡ Q.

Example 1.2.25 The truth tables of (P ⇔ Q) ∧ (Q ⇒ P) and P ⇔ Q are as follows:


P Q P⇒Q Q⇒P (P ⇔ Q) ∧ (Q ⇒ P) P Q P⇔Q
T T T T T T T T
T F F T F T F F
F T T F F F T F
F F T T T F F T

Hence (P ⇔ Q) ∧ (Q ⇒ P) ≡ P ⇔ Q.

Example 1.2.26 The truth tables of P ⇒ Q and ∼ P ∨ Q are as follows:


P Q P⇒Q P Q ∼P ∼ P∨Q
T T T T T F T
T F F T F F F
F T T F T T T
F F T F F T T

Hence (P ⇒ Q) ≡∼ P ∨ Q.
8 Concise Introduction to Logic and Set Theory

Exercises
1. Which of the following sentences are propositions? Justify your answer.
(a) x < 5.
(b) x + y = y + x.
(c) ∃ x ∈ N, such that x < 3.
1
(d) lim = 0.
n→∞ n
(e) He is a good player.
(f) This sentence is true.
2. Find the solution set of the following sentences:
(a) x − 2 < 5 and x ∈ {0, 1, 2, 3},
(b) |x| + 1 < 3 in {0, 1, 2, 3, 5},
(c) (x + 2)(x − 1) = 0 in {5, 6, 8},
(d) 2x2 + 3x + 1 = 0 in Q,
(e) x2 + 1 = 0 in R.
3. Determine the truth value of each of the following propositions:
(a) For all real numbers x, x2 = 0.
(b) If f (x) = x3 , then f ′ (x) = 3x2 .
(c) For any natural number n, n2 = n.
(d) 2 is a real number ⇔ Damascus is in Syria.
(e) There exists a natural number n such that n2 = n.
(f) There exists a rational number q such that q < 2.
1
(g) e is a rational number and lim = 1.
n→∞ n

(h) For all x ∈ R, x2 = |x| and 9 6= 5.
(i) π is a rational number or π is a real number.

(j) Paris is in France or 25 = 4.
(k) ∼ (π is not a rational number).
(l) 2 < 1 ⇒ 2 < 3.
(m) 3 > 7 ⇒ 10 < 8.
(n) 5 is real number ⇔ 2/3 is natural number.

(o) 2 = 4 ⇒ x2 dx = x4 .
R
Mathematical Logic 9

4. Express the following propositions with out using the symbol ∼:


(a) ∼ (x < y),
(b) ∼ (x > y),
(c) ∼ (4 ≤ x),
(d) ∼ (y3 ≥ 2 + x).
5. Let P be “It is cold” and let Q be “It is raining”. Give a simple verbal sentence
which describes the following sentences:
(a) ∼ P,
(b) P ∧ Q,
(c) P ∨ Q,
(d) Q ⇔ P,
(e) P ⇒∼ Q,
(f) Q∨ ∼ Q,
(g) ∼ Q∧ ∼ Q,
(h) P ⇔∼ Q,
(i) ∼∼ Q,
(j) (P∧ ∼ Q) ⇒ P.
6. Determine the truth value of each of the following composite propositions:
(a) If 3 + 2 = 7, then 5 + 9 = 14.
(b) It is not true that 2 + 2 = 5 if and only if 4 + 4 = 13.
(c) Paris is in England or London is in France.
(d) It is not true that 1 + 1 = 3 or 2 + 1 = 3.
(e) It is false that if Paris is in England then London is in France.
7. Let P, Q, R, and S be propositions. Find the truth tables for each of the follow-
ing composite propositions:
(a) ∼ P ∧ Q,
(b) ∼ (P ⇒∼ Q),
(c) ∼ (P ∧ Q),
(d) ∼ P∨ ∼ Q,
(e) P ∧ P,
(f) ∼ (P ∧ Q),
(g) (P∨ ∼ Q) ∧ R,
(h) (P ∧ Q) ∨ (R∧ ∼ S),
(i) (P ∧ Q) ⇒ (P ∨ Q),
(j) ∼ (P ∧ Q)∨ ∼ (Q ⇔ P),
(k) (P ⇒ Q)∨ ∼ (P ⇔∼ Q),
(l) [P ⇒ (∼ Q ∨ R)]∧ ∼ [Q ∨ (P ⇔∼ R)].
10 Concise Introduction to Logic and Set Theory

1.3 TAUTOLOGY AND CONTRADICTION


Definition 1.3.1 A compound proposition S is a tautology if S is true for any original
propositions. In other words, a tautology will contain only T in the last column of its
truth table.

Example 1.3.2 The proposition “P or not P”, i.e. P∨ ∼ P, is a tautology. This fact
is verified by constructing a truth table.
P ∼P P∨ ∼ Q
T F T
F T T

Definition 1.3.3 A compound proposition S is a contradiction if S is false for any


original propositions. In other words, a contradiction will contain only F in the last
column of its truth table.

Example 1.3.4 The proposition “P and not P”, i.e. P∧ ∼ P, is a contradiction. The
fact is verified by the following table:
P ∼P P∧ ∼ Q
T F F
F T F

Remark 1.3.5 Let P and Q be propositions. Then


(a) (P ≡ Q) if and only if (P ⇔ Q) is a tautology,

(b) P is a contradiction if and only if ∼ P is a tautology.

Definition 1.3.6 The proposition Q ⇒ P is called the converse of P ⇒ Q.

Definition 1.3.7 The proposition ∼ P ⇒∼ Q is called the inverse of P ⇒ Q.

Definition 1.3.8 The proposition ∼ Q ⇒∼ P is called the contrapositive of P ⇒ Q.

Exercises
1. Show that (P ⇒ Q) 6≡ (Q ⇒ P).
2. Show that (P ⇒ Q) ≡ (∼ Q ⇒∼ P).
3. The inverse of P ⇒ Q is ∼ P ⇒∼ Q. Show (P ⇒ Q) 6≡ (∼ P ⇒∼ Q).
4. Show that P ⇒ Q iff P∧ ∼ Q is a contradiction.
5. Put the proposition
“Every differentiable function at a point is continuous at that point” in form
P ⇒ Q, and write its inverse and its contrapositive.
Mathematical Logic 11

6. Prove the (Algebra of propositions):


1. Idempotent laws. Let P be a proposition. Then
(a) P ∨ P ≡ P,
(b) P ∧ P ≡ P.
2. Associative laws. Let P, Q, and R be propositions. Then
(a) (P ∨ Q) ∨ R ≡ P ∨ (Q ∨ R),
(b) (P ∧ Q) ∧ R ≡ P ∧ (Q ∧ R).
3. Commutative laws. Let P and Q be propositions. Then
(a) P ∨ Q ≡ Q ∨ P,
(b) P ∧ Q ≡ Q ∧ P.
4. Distribution laws. Let P, Q, and R be propositions. Then
(a) P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R),
(b) P ∧ (Q ∧ R) ≡ (P ∧ Q) ∨ (P ∧ R).
5. Identity laws. Let P be a proposition. Then
(a) P ∨ 0 ≡ P,
(b) P ∧ I ≡ P,
(c) P ∨ I ≡ I,
(d) P ∧ 0 ≡ 0.
where I represents tautology and 0 represents contradiction.
6. Complement laws. Let P be a proposition. Then
(a) P∨ ∼ P ≡ I,
(b) P∧ ∼ P ≡ 0,
(c) ∼ (∼ P) ≡ P,
(d) ∼ I ≡ 0 and ∼ 0 ≡ I.
7. De Morgan’s laws. Let P and Q be propositions. Then
(a) ∼ (P ∧ Q) ≡∼ P∨ ∼ Q,
(b) ∼ (P ∧ Q) ≡∼ P∧ ∼ Q.
We prove, for example, that the distribution law 4(b) holds. For this purpose,
we compose the following table:

P Q R Q∨R P ∧ (Q ∨ R) P∧Q P∧R (P ∧ Q) ∨ (P ∧ R)


T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F

From this table we see that 4.(b) holds.


7. Prove that P ⇒ (Q ∧ R) ≡ (P ⇒ Q) ∧ (P ⇒ R).
12 Concise Introduction to Logic and Set Theory

8. Prove that P ∨ Q ≡∼ (∼ P∧ ∼ Q).


9. Use Algebra of propositions (or law 6) to show that:
(a) (P ∨ Q)∧ ∼ P ≡∼ P ∧ Q,
(b) ∼ (P ∨ Q) ∨ (∼ P ∧ Q) ≡∼ P,
(c) ∼ (P∨ ∼ Q) ≡∼ P ∧ Q.
10. Determine which of the following is a tautology:
(a) P ⇒ P ∧ Q,
(b) P ⇒ P ∨ Q,
(c) (P ∧ Q) ⇒ (P ⇔ Q).
11. Find the truth table of each of the following propositions:
(a) ∼ P∧ ∼ Q,
(b) ∼ (∼ P ⇔ Q),
(c) P ⇒ (∼ P ∨ Q),
(d) (P∧ ∼ Q) ⇒ (∼ P ∨ Q).
12. Prove (a) (P ⇒∼ Q) ≡ (Q ⇒∼ P),
(b) [(P ∧ Q) ⇒ R] ≡ (P ⇒ R) ∨ (Q ⇒ R),
(c) [(P ⇒ Q) ⇒ R] ≡ [(P∧ ∼ R) ⇒∼ Q].

1.4 QUANTIFIERS
Let A be a set. An open sentence on A is an expression, denoted by P(x), which has
the property that P(a) is true or false for each a ∈ A.

Example 1.4.1 Let P(x) be “x + 3 > 8”. Then P(x) is an open sentence on N.

Example 1.4.2 Let P(x) be “x + 3 > 8”. Then P(x) is not an open sentence on C
since inequalities are not defined for all complex numbers.
If P(x) is an open sentence on a set A, then the set of elements a ∈ A with the
property that P(a) is true, is called truth set Tp of P(x). In other words,

Tp = {x : x ∈ A, P(x) is true },

or, simply,
Tp = {x : P(x)}.

Example 1.4.3 Let P(x) be “x + 3 > 8” defined on N. Then the truth set of P(x) on
N is
Tp = {x : x ∈ N, x + 3 > 8} = {6, 7, 8, 9, . . .}.

Example 1.4.4 Let P(x) be “x + 2 < 1”, defined on N. Then

Tp = {x; x ∈ N, x + 2 < 1} = φ .

Example 1.4.5 Let P(x) be “x + 3 ≥ 4”, defined on N. Then

Tp = {x : x ∈ N, x + 3 ≥ 4} = {1, 2, 3, . . .} = N.
Mathematical Logic 13

Definition 1.4.6 Let P(x) be an open sentence on a set A. Then the proposition
(∀ x ∈ A) or ∀ x P(x) can be read as “For every element x in A, P(x) holds” or
simply, “For all x, P(x)”.
The symbol ∀, which reads “for all” or “for every”, is called the universal quan-
tifier.

Example 1.4.7 The proposition for all natural number n, n + 3 ≥ 4 is true since

{n : n + 3 ≥ 4} = {1, 2, 3, . . . } = N.

Example 1.4.8 The proposition for all natural number n, n + 2 > 5 is false since

{n : n + 2 > 5} = {4, 5, 6, . . . } 6= N.

Definition 1.4.9 Let P(x) be an open sentence on a set A. Then the proposition
“∃ x ∈ A) P(x)” or “∃ x, P(x)” reads “There exists x ∈ A such that P(x) holds” or
simply, “For some x, P(x)”.
The symbol ∃, which reads “there exists” or “for some” or “for at least”, is called
the existential quantifier.

Example 1.4.10 The proposition exists n ∈ N, n + 4 < 7 is true since

{n ∈ N : n + 4 < 7} = {1, 2} 6= φ .

Example 1.4.11 The proposition exists n ∈ N, n + 6 < 5 is false since

{n ∈ N : n + 6 < 5} = φ .

Definition 1.4.12 For an open sentence P(x), the proposition “(∃ !x), P(x)” is read
“There exists a unique x, such that P(x)”. The sentence “(∃ !x), P(x)” is true, when
the truth set for P(x) contains exactly one element from the universe; hence ∃ ! is
called the unique existence quantifier.

Definition 1.4.13 Now we define the negation of propositions, which contain quan-
tifiers. The negation of the proposition “All the integers are positive” reads “It is not
true that all integers are positive”; in other words, there exists at least one integer,
which is not positive.
Symbolically, if Z denotes the set of integer, then the above can be written as

∼ (∀ x ∈ Z)(x is positive) ≡ (∃ x ∈ Z)(x is not positive).

Furthermore, if P(x) denotes “x is positive”, then the above can be written as

∼ (∀ x ∈ Z)P(x) ≡ (∃ x ∈ Z) ∼ P(x).

Theorem 1.4.14 (De Morgan) If P(x) is an open sentence, then

(a) ∼ (∀ x)P(x) ≡ (∃ x) ∼ P(x),


(b) ∼ (∃ x)P(x) ≡ (∀ x) ∼ P(x).
14 Concise Introduction to Logic and Set Theory

Proof (a) The sentence ∼ (∀ x)P(x) is true

iff (∀ x)P(x) is false,


iff the truth set of P(x) is not the universe,
iff the truth set of ∼ P(x) is not empty,
iff (∃ x) ∼ P(x) is true.

Thus, ∼ (∀ x)P(x) is true if and only if (∃ x) ∼ P(x) is true. So the proposition is


true.
(b) See Exercise 1.

Example 1.4.15 The negation of the proposition

“For all natural numbers n, n + 3 > 7”

is equivalent to the proposition

“There exists an n such that n + 3 ≤ 7”.

In other words,

∼ (∀ n ∈ N)(n + 3 > 7) ≡ (∃ n ∈ N)(n + 3 ≤ 7).

Example 1.4.16 The negation of the proposition “All prime numbers are odd” is
equivalent to the proposition “there exists a number that is prime and not odd”.
In other words, if A is the set of prime numbers, then

∼ (∀ x ∈ A)(x is odd) ≡ (∃ x ∈ A)(x is not odd).

Exercises
1. Complete the proof of Theorem 1.4.14.
2. Translate the following English sentences into symbolic sentences with quan-
tifiers:
(a) There exists a rational number between arbitrary two different real
numbers.
(b) The set of real numbers contains a smallest positive integer.
(c) For every positive real number x, there is a unique real number y, such
that 2y = x.
(d) For every nonzero complex number, there is a unique complex number,
such that their product is π .
(e) For every complex number, there is at least one complex number, such
that the product of the two complex numbers is a real number.
Mathematical Logic 15

3. Which of the following propositions are true? (Here the universal set is R.)
(a) (∀ x), |x| = x.
(b) (∀ x), x2 = x.
(c) (∀x), x + 1 > x.
(d) (∃x), x + 2 = x.
(e) (∃x), |x| = 0.
4. Negate each of the propositions in Exercise 3.
5. Let A = {1, 2, 3, 4, 5}. Determine the truth value of each of the propositions.
(a) (∃ x ∈ A) x + 3 = 10.
(b) (∀ x ∈ A) x + 3 < 10.
(c) (∃ x ∈ A) x + 3 < 5.
(d) (∀ x ∈ A) x + 3 ≤ 7.
6. Negate each of the propositions in Exercise 5.
7. Let {1, 2, 3} be the universal set. Determine the truth value of each of the
following propositions:
(a) (∃ x) (∀ y), x2 < y + 1.
(b) (∀ x) (∀ y), x2 + y2 < 12.
(c) (∀ x) (∀ y), x2 + y2 < 12.
(d) (∃ x) (∀ y) (∃ z), x2 + y2 < 2z2 .
(e) (∃ x) (∃ y) (∀ z), x2 + y2 < 2z2 .
8. Negate each of the following propositions:
(a) (∀ x) (∃ y) P(x) ∨ Q(x).
(b) (∃ x) (∀ y) P(x) ⇒ Q(x).
(c) (∃ x) (∃ y) P(x) ∧ Q(x).
9. Which of the following are true?
(a) (∀ x ∈ N) x + x ≥ x.
(b) (∀ x ∈ R) x + x ≥ x.
(c) (∃ x ∈ N) 2x + 3 = 6x + 7.
(d) (∃ x ∈ R) 3x = x2 .
(e) (∃ x ∈ R) 3x = x.
(f) (∀ x ∈ R) x2 + 6x + 5 ≥ 0.
(g) (∀ x ∈ R) x2 + 4x + 5 ≥ 0.
16 Concise Introduction to Logic and Set Theory

(h) (∃ x ∈ N) x2 + x + 41 is prime.
(i) (∀ x ∈ N) x2 + x + 41 is prime.
10. Which of the following are true? (Here the universal set is the set of real num-
bers).
(a) (∀ x) (∃ y) x + y = 0.
(b) (∃ x) (∀ y) x + y = 0.
(c) (∃ x) (∀ y) x2 + y2 = −1.
(d) (∀ x) x > 0 ⇒ (∃ y)y < 0 ∧ xy > 0.
(e) (∀ y) (∃ x) (∀ z) xy = xz.
(f) (∃ !y) y < 0 ∧ y + 3 = 0.
(g) (∀ y) (∃ !x) x = y2 .

1.5 LOGICAL REASONING


Definition 1.5.1 An argument is an assertion that a given set of propositions
S1 , S2 , . . . , Sn , called premises, yields another proposition S, called the conclusion.
Such an argument will be denoted by S1 , S2 , . . . , Sn ⊢ S.
Note that an argument is a proposition and therefore has a truth value. If an
argument is true, it is called a valid argument; if not, it is called a fallacy.

Example 1.5.2
1. Consider the following propositions:
S1 : Some mathematicians are philosophers,
S2 : Ahmad is a mathematician,
S : Then Ahmad is a philosopher.
The argument S1 , S2 ⊢ S does not valid, because not all mathematicians are
philosophers.
2. Consider the following propositions:
S1 : All poets are interesting people,
S2 : Ahmad is an interesting person,
S : Ahmad is a poet.
The argument S1 , S2 ⊢ S is fallacy.
3. Consider the following propositions:
S1 : No college professor is wealthy,
S2 : Some poets are wealthy,
S : Some poets are not college professors.
The argument S1 , S2 ⊢ S is valid.
Mathematical Logic 17

4. Consider the following propositions:


S1 : If it rains, Nazar will be sick,
S2 : Nazar was not sick,
S : It did not rain.
The argument S1 , S2 ⊢ S is valid.

Remark 1.5.3
1. Note that the truth value of an argument
S1 , S2 , . . . , Sn ⊢ S
does not depend upon the particular truth value of each of the propositions in
the argument.
2. Note that the argument
S1 , S2 , . . . , Sn ⊢ S
is valid if and only if the proposition
(S1 ∧ S2 ∧ · · · ∧ Sn ) ⇒ S is a tautology.

3. Note that Venn diagrams are very often used to determine the validity of an
argument.

Example 1.5.4 Let the propositions be:


S1 : Some students are lazy,
S2 : All males are lazy,

S : Some students are males.

Show that the argument S1 , S2 ⊢ S does not valid by constructing a Venn diagram, in
which the premises S1 and S2 hold, but the conclusion S does not hold.

Solution: Consider the following diagram:

Lazy People
Students

Males

Notice that both premises hold, but the conclusion does not hold.

Example 1.5.5 Let the propositions be:


S1 : All students are lazy.
S2 : Nobody who is wealthy is a student.

S : Lazy people are not wealthy.

Show that the argument S1 , S2 ⊢ S does not valid by constructing a Venn diagram, in
which the premises S1 and S2 hold, but the conclusion S does not hold.
18 Concise Introduction to Logic and Set Theory

Solution: Consider the following Venn diagram:


Lazy People

Students Wealthy People

Notice that the premises hold, but the conclusion does not hold. Hence the argu-
ment is not valid.

Example 1.5.6 Determine the validity of the following argument:

P ⇒ Q, ∼ P ⊢∼ Q.

Solution: Construct the necessary truth tables.

P Q P⇒Q (P ⇒ Q)∧ ∼ P [(P ⇒ Q)∧ ∼ P] ⇒∼ Q


T T T F T
T F F F T
F T T T F
F F T T T

Since [(P ⇒ Q)∧ ∼ P] ⇒∼ Q is not a tautology, then the argument is fallacy.

Example 1.5.7 Prove that the argument P ⇒∼ Q, R ⇒ Q, R ⊢∼ P is valid.

Solution: Construct the following truth tables:


P Q R P ⇒∼ Q R⇒Q ∼P [(P ⇒∼ Q) ∧ (R ⇒ Q) ∧ R] ⇒∼ P
T T T F T F T
T T F F T F T
T F T T F F T
T F F T T F T
F T T T T T T
F T F T T T T
F F T T F T T
F F F T T T T

Since the proposition [(P ⇒∼ Q) ∧ (R ⇒ Q) ∧ R] ⇒∼ P is a tautology, then the


argument P ⇒∼ Q, R ⇒ Q, R ⊢∼ P is valid.

1.6 MATHEMATICAL PROOF


1.6.1 DIRECT AND CONTRAPOSITIVE PROOF
Definition 1.6.1 Let S1 , S2 , . . . , Sn be a set of propositions yielding another proposi-
tion S. If the argument
S1 , S2 , . . . , Sn ⊢ S
is valid, then it is called a proof.

The first method of proof, which we will examine, is the direct proof of a conditional
sentence. How do we prove a statement in the form P ⇒ Q?
This implication is false only when P is true and Q is false. A direct proof of
P ⇒ Q will have the following form:
Mathematical Logic 19

Proof.
Assume P
:
:
Therefore Q
Thus P ⇒ Q.

Example 1.6.2 Prove that if x is even integer, then x2 is even.

Proof Suppose x is an even integer


Then x = 2k for some integer k.
Thus x2 = 4k2
= 2(2k2 )
= 2t for some integer t.
Since x2 is twice the integer t, x2 is even.

Remark 1.6.3 In the above proof, we used the tautology


[(P ⇒ S1 ) ∧ (S1 ⇒ S2 ) ∧ . . . (Sn ⇒ R)] ⇒ (P ⇒ R),
where
P : x is even,
S1 : x = 2k,
S2 : x2 = 4k2 ,
R : x2 is even.
A second form of proof for a conditional sentence is a proof by contrapositive.
The idea here is that since P ⇒ Q ≡∼ Q ⇒∼ P, we first give a direct proof of
∼ Q ⇒∼ P and then conclude P ⇒ Q. That is, instead of proving P ⇒ Q, we prove
its equivalent statement ∼ Q ⇒∼ P. Such a form of proof by contrapositive is as
follows:

Proof Suppose ∼ Q.
:
:
Therefore ∼ P (Via a direct proof).
Thus ∼ Q ⇒∼ P.
Therefore P ⇒ Q.

Example 1.6.4 Prove that a2 is even ⇒ a is even.

Proof Consider the contrapositive


∼ (a is even) ⇒∼ (a2 is even).
That is,
a is odd ⇒ a2 is odd.
20 Concise Introduction to Logic and Set Theory

Since a is odd, then


a = 2k + 1, for some integer k.
Then
a2 = (2k + 1)2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
= 2r + 1, where r is an integer.

Thus a2 is odd.
So, by contrapositive, if a2 is even, then a is even.

1.6.2 CONTRADICTION PROOF


A third form of proof is by contradiction, making use of the tautology
P ⇔ [∼ P ⇒ (Q∧ ∼ Q)].
To prove a proposition P, it is sufficient to prove that
∼ P ⇒ (Q∧ ∼ Q).
A proof by contradiction has the following form:
Proof Suppose ∼ P.
:
:
Therefore Q.
:
:
Therefore ∼ Q.
Hence Q∧ ∼ Q, a contradiction.
Thus P.

Example 1.6.5 Prove that x 6= 0 ⇒ x−1 6= 0 as rational numbers.

Proof Consider P : x 6= 0,
Q : x−1 6= 0.
We need to show that P ⇒ Q.
Suppose ∼ (P ⇒ Q) is true.
Since ∼ (P ⇒ Q) ≡ P∧ ∼ Q,
then P∧ ∼ Q is true, that is x 6= 0 ∧ x−1 = 0 is true.
Since x · x−1 = 1 and x−1 = 0 ⇒ x · x−1 = x · 0 = 0,
then 1 = 0.
So, one has (1 = 0) and (1 6= 0).
It contradicts the number equality. Consequently ∼ (P ⇒ Q) is false.
Thus P ⇒ Q is true.
Hence x 6= 0 ⇒ x−1 6= 0.
Mathematical Logic 21

Example 1.6.6 Prove that 2 is an irrational number.

Proof Suppose
√ that 2 is a rational number.
Then 2 = ba , where a, b are positive integers with gcd(a, b) = 1.
Hence we obtain
√ a
2 = ⇒ a2 = 2b2
b
⇒ a2 is even
⇒ a is even
⇒ a = 2k, for some integer k.

Then

a2 = 2b2 ⇒ (2k)2 = 2b2


⇒ 4k2 = 2b2
⇒ 2k2 = b2
⇒ b2 is even
⇒ b is even
⇒ b = 2t, for some integer t.

Thus 2 divides gcd(a, b) and hence gcd(a, b) ≥ 2.


is gcd(a, b) = 1 and gcd(a, b) = 2.
The contradiction √
We conclude that 2 is an irrational number.

Exercises
1. For each set of premises, find a conclusion, such that the argument is valid,
and such that the premise is necessary for the conclusion.
(a) S1 , S2 , S3 ⊢ S,
S1 : No student is lazy,
S2 : Jallal is an artist,
S3 : All artists are lazy,
S: .

(b) S1 , S2 , S3 , S4 ⊢ S,
S1 : All lawyers are wealthy,
S2 : Poets are temperamental,
S3 : Ahmad is a lawyer,
S4 : No temperamental person is wealthy,
S: .
2. Determine the validity of the following argument:

P ⇒ Q, Q ⊢ P
22 Concise Introduction to Logic and Set Theory

3. Determine the validity of the following argument:


S1 : If it rains, Anwar will be sick,
S2 : It did not rain,

S : Anwar was not sick.


4. Determine the validity of the following argument for the proposed conclusion:
S1 : All poets are poor,
S2 : In order to be a teacher, one must graduate from college,
S3 : Some mathematicians,
S4 : No college graduate is poor.

S : Teachers are not poor.


5. Determine the validity of the following argument for the proposed conclusion.:
S1 : All mathematicians are interesting people,
S2 : Some teachers sell insurance,
S3 : Some philosophers are mathematicians,
S4 : Only uninteresting people become insurance salesman.

S : Some teachers are not philosophers.


6. Determine the validity of the following arguments:
(a) P ⇒ Q, R ⇒∼ Q ⊢∼ P.

(b) P ⇒ Q, ∼ R ⇒∼ Q ⊢ P ⇒∼ R.
7. For the given premises, determine a suitable conclusion so that the argument
is valid.
(a) P ⇒∼ Q, Q.
(b) P ⇒∼ Q, R ⇒ Q.
(c) P ⇒∼ Q, ∼ P ⇒ R.
(d) P ⇒∼ Q, R ⇒ P, Q.
8. Prove that if a, b are even integers, then a + b is even.
9. Prove that if a is an even integer and b is an odd integer, then a + b is odd.
10. Prove that x is odd integer iff x + 1 is even integer.
11. Prove that if x is a real number, then |x| ≥ 0.
12. Prove that if x, y are real numbers, then |xy| = |x||y|.
13. Prove that ∀ x ∈ R, x ≤ |x|.
Mathematical Logic 23

14. Prove that ∃ x ∈ R, x2 = x.


15. Prove that ∃ y ∈ R, ∀ x ∈ R, x + y = x.
16. Prove that ∃ y ∈ R, ∀ x ∈ R, xy = x.
17. Prove that
∀ x[P(x) ∧ Q(x)] ⇔ [∀ xP(x) ∧ ∀ xQ(x)].
18. Let A = {2, 3}. Prove that ∀ x ∈ A (1 < x ⇒ 1 < x2 ).
19. Prove that ∀ x ∈ N (1 < x ⇒ 1 < x2 ).
20. Prove that the polynomial f (x) = x − 3 has a unique zero.
21. Prove that every nonzero real number has a unique multiplicative inverse.
22. Find the contrapositive of each of the following propositions:
(a) If he has courage, he will win.
(b) It is necessary to be strong, in order to be sailor.
(c) Only if he does not tire, he will win.
(d) It is sufficient for it to be a square, in order to be a rectangle.
23. Determine the following contrapositive of the
(a) Contrapositive of P ⇒ Q,
(b) Converse of P ⇒ Q,
(c) Inverse of P ⇒ Q.
24. Prove that if x is a rational number and y is an irrational number, then x + y is
an irrational number.
25. Prove that if x is an integer, then (x2 − x) is an even integer.
26. Prove that if f (x) = f (x + p) for all p > 0, then f is constant function.

1.7 INDUCTION
1.7.1 INTRODUCTION
Proof by induction involves propositions, which depend on the natural numbers, n =
1, 2, 3, . . .. It often uses summation notation, which we now briefly review before
discussing induction itself.
We use the symbol ∑ to denote a sum over its argument for each natural number
i from the lowest value for i (appears below) to the maximum value for i (appears
above).
For example, we write the sum of natural numbers up to a value n as:
i
1 + 2 + 3 + · · ·+ (n − 1) + n = ∑ .
i=1
24 Concise Introduction to Logic and Set Theory

Example 1.7.1 Write the following sums without the summation notation:
4
1
(a) ∑ 3i ,
i=1

3
(b) ∑ (2i + 1),
i=1

5
i−1
(c) ∑ .
i=1 i

The above sums, written out without summation notation, are:


4
1 1 1 1 1
(a) ∑ 3i = 3 + 9 + 27 + 81 ,
i=1

3
(b) ∑ (2i + 1) = (2 × 1 + 1) + (2 × 2 + 1) + (2 × 3 + 1) = 3 + 5 + 7,
i=1

5
i−1 1−1 2−1 3−1 4−1 5−1 1 2 3 4
(c) ∑ =
1
+
2
+
3
+
4
+
5
= 0+ + + + .
2 3 4 5
i=1 i

1.7.2 INDUCTION PRINCIPLE


In Section 1.6, we have studied some types of mathematical proofs. Here we discuss
another proof technique, called mathematical induction. This technique will be used
to prove a variety of mathematical propositions.
We illustrate the induction principle by the following:
Let P(n) be a proposition, which involves a natural numbers n, i.e., n = 1, 2, 3, . . . .
Then P(n) is true for all n if and only if
(a) P(1) is true, and
(b) P(k) ⇒ P(k + 1) for all natural number k.

Example 1.7.2 Prove that for all positive integers n,

n(n + 1)
1 + 2 + 3 + · · ·+ n = ,
2
n
n(n + 1)
i.e., P(n) = ∑ i = .
i=1 2
Mathematical Logic 25

Solution:
Step (a) Let us check whether the formula is true for n = 1. Indeed
1
• ∑ i = 1,
i=1
1(1+1) 1(2) 2
• 2 = 2 = 2 = 1,
i.e., the formula is true for n = 1.
Step (b) Now suppose that the formula is true for n = k and prove that it remains true
for n = k + 1. In other words, the question is:
k
k(k + 1) ? k+1 (k + 1)(k + 2)
∑i= 2
−→ ∑ i =
2
.
i=1 i=1

The sum for n = k + 1 may be written as


k+1 k
∑ i = ∑ i + (k + 1)
i=1 i=1
k(k + 1)
= + (k + 1)
2
k(k + 1) + 2(k + 1)
=
2
(k + 1)(k + 2)
= .
2
So, we have shown that if p(k) is true, then P(k + 1) is true.

Example 1.7.3 Prove that for all positive integers n, the following results hold.
n
1. ∑ (2i − 1) = n2 ,
i=1

1 2n −1
2. 2 + 41 + 81 + · · · + 21n = 2n .

Solution:
1. Step (a) For n = 1 the formula is true, since

• ∑1i=1 (2i − 1) = 2 · 1 − 1 = 2 − 1 = 1,

• (1)2 = 1.
Step (b) Assume that the result is true for n = k, i.e
k
∑ (2i − 1) = k2 .
i=1
26 Concise Introduction to Logic and Set Theory

As for n = k + 1 the sum may be written as


k+1 k
∑ (2i − 1) = ∑ (2i − 1) + (2(k + 1) − 1)
i=1 i=1
= k2 + 2k + 1
= (k + 1)2 ,

then we have shown that if p(k) is true, then P(k + 1) is true.


2. Step (a) For n = 1 the formula is true, since
1
• 21
= 12 ,
21 −1 2−1
• 21
= 2 = 21 .
Step (b) Assume the result is true for n = k, i.e.

1 1 1 1 2k − 1
+ + + ···+ k =
2 4 8 2 2k
As for n = k + 1 the sum may be written as

1 1 1 1 1 2k − 1 1
+ + + · · · + k + k+1 = + k+1
2 4 8 2 2 2k 2
2k − 1 2 1
= . +
2k 2 2k+1
2k+1 − 2 1
= k+1
+ k+1
2 2
2k+1 − 1
= .
2k+1
then we have shown that if p(k) is true, then P(k + 1) is true.

Example 1.7.4 For a natural number n prove the following propositions:


(1) If n ≥ 2, then n3 − n is divisible by 3.
(2) n < 2n .

Solution:
1. Step (a) for n = 2,
2 ≥ 2.
n3 − n = (2)3 − 2 = 6 = 3 × 2, so divisible by 3.

An integer n is divisible by 3 if and only if there


exists an integer r such that n = 3r.
Mathematical Logic 27

Step (b) Assume the result is true for n = k, i.e. is


?
(k3 − k = 3r) −→ (k + 1)3 − (k + 1) = 3r,

we have

(k + 1)3 − (k + 1) = k3 + 3k2 + 3k + 1 − (k + 1)
= (k3 − k) + 3k2 + 3k
= 3r + 3k2 + 3k
= 3(r + k2 + k)

The principle of induction thus implies that n3 − n is indeed divisible by 3 for


all n ≥ 2.
2. 1. Step (a) For n = 1,
n = 1.
2n = 21 . (1 < 2)
2. Step (b) Assume the result is true for n = k, i.e. is
?
k < 2k −→ k + 1 < 2k+1 .

We have

k < 2k ⇒ k + 1 < 2k + 1
⇒ k + 1 < 2k + 2k , (1 < 2k )
⇒ k + 1 < 2x2k = 2k+1

Hence k + 1 > 2k+1 .


From the principle of induction thus implies that n < 2n natural number n.

Exercises
1. Write the first four terms for each given sequence.
(a) an = n − 1,
(b) an = n + 2,
n−2
(c) an = n+1 ,
(d) an = (1 + n2 )n ,
(e) an = (−3)n−1 ,
(−1)n+1
(f) an = n2 .
28 Concise Introduction to Logic and Set Theory

2. Find a general term an for the given sequence a1 , a2 , a3 , a4


(a) −2, −1, o, 1, . . .
(b) −3, 3, −3, 3, . . .
(c) 2, 23 , 34 , 54 , . . .
(d) 5, 25, 125, 625, . . .
2 3 4
(e) x, x2 , x3 , x4 , . . .
3. Expand the sums
3
(a) ∑ (3i − 1),
i=1
3
(b) ∑ 3(2i + 1),
i=o
3
1
(c) ∑ j2
.
j=1

4. Express the following in summation notation.


(a) 1 + 20 + 400 + 8000.
(b) −3 − 1 + 1 + 5 + 7.
5. Use the principle of induction to prove the following results.
Unless otherwise, assume n is a positive integer number.
(a) 2 + 22 + 23 + · · · + 2n = 2n+1 − 2.
n
n(n + 1)(2n + 1)
(b) ∑ i2 = .
i=1 6
(c) 5n − 1 is divisible by 4.
(d) gn + 3 is divisible by 4.
(e) 3n > n2 .
n
1 1
(f) ∑ 2 ≤ 2 − .
i=1 i n
2 Set Theory
In this chapter, we shall discuss a basic language that is useful in describing all the
branches of mathematics, namely the language of sets. We will use the word “set”
to refer to any specified collection of objects. The objects in a given set are called
elements (or members) of the set.

2.1 BASIC NOTIONS OF SET THEORY


In general, sets will be denoted by capital letters

A, B,C, D, E, . . . .

The elements in our sets will be represented by lowercase letters

a, b, c, d, e . . . .

If the object a is an element of set B (a an element belongs to a set B), we write a ∈ B,


if not—that is, if
∼ (a ∈ B) − we write a 6∈ B.
For example, if Z is the set of integers, we write 8 ∈ Z and 5/6 6∈ Z.
One way to describe a set is simply to list its elements between curly braces. For
example, we can define the set A having exactly the four numbers 2, 4, 6, and 8 as
elements by A = {2, 4, 6, 8}.
We call this the tabular form of a set. But if we define a particular set by stat-
ing properties that its elements must satisfy, for example let B be the set of all odd
numbers, then we use a letter, usually x, to represent an arbitrary element and we
write:
B = {x : x is odd},
which reads “B is the set of numbers x such that x is odd”. We call this the builder
form of a set.

Definition 2.1.1
Let φ = {x : x 6= x}. Then φ is a set with no elements and is called an empty set.

Example 2.1.2
{x ∈ R : x = x + 1} = φ = {x ∈ N : x < 0}.

Definition 2.1.3
Let A and B be sets. We say that A is a subset of B iff every element of A is also an
element of B. In symbols this is

A ⊆ B ⇔ (∀ x)(x ∈ A ⇐ x ∈ B).

DOI: 10.1201/9780429022838-2 29
30 Concise Introduction to Logic and Set Theory

Example 2.1.4
Let A = {1, 3, 4}, B = {−1, 0, 1, 3, 4}. Then A ⊂ B.

Example 2.1.5
N ⊂ R, Z ⊂ Q.

Theorem 2.1.6
(a) For any set A, φ is a subset of A.
(b) For any set A, A ⊆ A.

Proof
(a) Let A be any set. We need to show that

∀ x(x ∈ φ ⇒ x ∈ A).

Which is equivalent to

x 6∈ A ⇐ x 6∈ φ (contrapositive condition).

It is clear that x 6∈ φ (since φ is a set with no elements).


Then x 6∈ A ⇒ x 6∈ φ .
That is, x ∈ φ ⇒ x ∈ A.
Therefore φ ⊆ A.
(b) The proof is left as Exercise 1.

Theorem 2.1.7
If A is a subset of B and B is a subset of C, then A is a subset of C. That is

(A ⊆ B ∧ B ⊆ C) ⇒ A ⊆ C.

Proof
To prove that A ⊆ C, we must show that

∀ x(x ∈ A ⇒ x ∈ C).

Since A ⊆ B, then
∀ x(x ∈ A ⇒ x ∈ B),
and since B ⊆ C, then
∀ x(x ∈ B ⇒ x ∈ C).
Hence ∀ x(x ∈ A ⇒ x ∈ C).
Therefore A ⊆ C.

Remark 2.1.8
For a given set A, the subsets φ and A are called improper subsets of A, while any
subset of A other than φ or A is called a proper subset.
Set Theory 31

Definition 2.1.9
For an arbitrary set A, the set of all the subsets of A is called the power set of A. We
denote the power set of A by P(A). Thus
P(A) = {B : B ⊆ A}.
Example 2.1.10
Let A = {4, 7}. Then
P(A) = {φ , {4}, {7}, A}.

Example 2.1.11
Let M = {a, b, c}. Then
P(M) = {φ , {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, M}.
Theorem 2.1.12
If A is a set with n elements, the power set P(A) has 2n elements.

Proof
Suppose A has n elements. We may write A as A = {x1 , x2 , . . . , xn }. To describe a
subset B of A, we need to know for each xi ∈ A whether the element is in B. For
each xi , there are two possibilities (xi ∈ B or xi 6∈ B), so there are 2 · 2 · 2 · · · . . . · · · 2 (n
factors) different ways of i making a subset of A. Therefore, P(A) has 2n elements.

Definition 2.1.13
Let A and B be sets. Then A = B iff A ⊆ B and B ⊆ A.

Example 2.1.14
Let A = {x : x is a solution to x2 − 4 = 0} and B = {2, −2}. Prove that A = B.

Proof
We must show that A ⊆ B and B ⊆ A.
Let
t ∈ A ⇒ t2 − 4 = 0
⇒ (t − 2)(t + 2) = 0
⇒ t = 2 or t = −2,
so t ∈ B. This proves the inclusion
A ⊆ B. (2.1)
By substitution we see that both 2 and −2 are solutions to
x2 − 4 = 0.
Thus
B ⊆ A. (2.2)
It follows from Equations (2.1) and (2.2) that A = B.
32 Concise Introduction to Logic and Set Theory

Definition 2.1.15
All the sets under investigation will likely be subsets of a fixed set. We call this set
the universal set or universe of discourse. We denote this set by U.

2.2 ELEMENTARY PROPERTIES OF SETS


2.2.1 UNION OF SETS
Definition 2.2.1
If A and B are sets. The union of A and B, denoted by A ∪ B, is the set defined by

A ∪ B = {x : x ∈ A or x ∈ B}.

That is, x ∈ A ∪ B ⇔ x ∈ A ∨ x ∈ B.

Example 2.2.2
In the Venn diagram, we have shaded A ∪ B, that is the area of A and the area of B

B B
B
A
A
A

A ∪ B is shaded A ∪ B is shaded A ∪ B is shaded

Example 2.2.3
Let X = {a, b, c, d}, Y = {e, b, a, r}. Then

X ∪Y = {a, b, c, d, e, r}.

Example 2.2.4
Let A = {x ∈ N : 3 < x < 10} and B = {x ∈ N : 1 ≤ x ≤ 3}.
Then A ∪ B = {x ∈ N : 1 ≤ x < 10}.

Example 2.2.5
Let Ne = {x ∈ N : x is an even number}
= {2, 4, 6, 8, . . .},
No = {x ∈ N : x is an odd number}
= {1, 3, 5, 7, . . .}.
Then
Ne ∪ No = {1, 2, 3, 4, 5, 6, . . .} = N.

Theorem 2.2.6
Let A and B be sets. Then
(a) A ⊆ A ∪ B and B ⊆ A ∪ B,
(b) A ⊆ B ⇔ A ∪ B = B.
Set Theory 33

Proof
(a) Let x ∈ A,
then

x ∈ A ⇒ x ∈ A∨x ∈ B
⇒ x ∈ A ∪ B.

Thus A ⊆ A ∪ B.
By the same manner, we prove that B ⊆ A ∪ B.
(b) Suppose A ⊆ B and x ∈ A ∪ B.
Then

x ∈ A∪B ⇒ x ∈ A∨x ∈ B
⇒ x ∈ B ∨ x ∈ B (since A ⊆ B)
⇒ x ∈ B.

Thus A ∪ B ⊆ B.
Since B ⊆ A ∪ B (by part (a)), then A ∪ B = B.
Conversely, suppose that A ∪ B = B.
Since A ⊆ A ∪ B (by part (a)), then A ⊆ B.

Theorem 2.2.7
Let A, B, and C be sets. Then
(a) A ∪ A = A (Idempotent law),
(b) A ∪ B = B ∪ A (Commutative law),
(c) A ∪ (B ∪C) = (A ∪ B) ∪C (Associative law).

Proof
We prove (b) and leave (a), (c) as Exercise 2. Suppose x ∈ A ∪ B,
then

x ∈ A∪B ⇔ x ∈ A∨x ∈ B
⇔ x ∈ B ∨ x ∈ A.

Thus A ∪ B = B ∪ A.

Theorem 2.2.8
Let A be a set. Then
(a) A ∪ φ = A,
(b) A ∪U = U, where U is the universal set.
34 Concise Introduction to Logic and Set Theory

Proof
(a) Since φ ⊆ A, then

A ∪ φ = A( by Theorem 2.2.6).

(b) Since A ⊆ U, then

A ∪U = U( by Theorem 2.2.6).

2.2.2 INTERSECTION OF SETS


Definition 2.2.9
If A and B are sets. The intersection of A and B, denoted by A ∩ B, is defined by

A ∩ B = {x : x ∈ A and x ∈ B}.

That is,
x ∈ A ∩ B ⇔ x ∈ A ∧ x ∈ B.

Example 2.2.10
In the Venn diagram, we have shaded A ∩ B.

B A

A B
A B

A ∩ B is shaded A ∩ B is shaded A ∩ B is shaded

Example 2.2.11
Let A = {1, 2, x, y}, B = {2, 3, x, 4}. Then

A ∩ B = {2, x}.

Example 2.2.12
Let A = {x ∈ N : x ≤ 6}, B = {x : x is a prime number and ≤ 6}.
Then

A ∩ B = {1, 2, 3, 4, 5, 6} ∩ {2, 3, 5}
= {2, 3, 5}.

Example 2.2.13
Let A = {x ∈ R : 0 ≤ x ≤ 5} and B = {x ∈ R : 1/3 ≤ x ≤ 7}.
Then
A ∩ B = {x ∈ R : 1/3 ≤ x ≤ 5}.
Set Theory 35

Definition 2.2.14
Let A, B be sets. We say that A and B are disjoint iff

A ∩ B = φ.

Example 2.2.15
Let A = {x ∈ N : x is an odd number} and B = {x ∈ N : x is an even number}.
Since A ∩ B = φ , then A and B are disjoint. But A ∩ N 6= φ , thus A and N are not
disjoint.

Theorem 2.2.16
Let A and B be sets. Then
(a) A ∩ B ⊆ A and A ∩ B ⊆ B,
(b) A ⊆ B ⇔ A ∩ B = A.

Proof
(a) To prove A ∩ B ⊆ A, let x ∈ A ∩ B. Then

x ∈ A∩B ⇒ x ∈ A∧x ∈ B
⇒ x ∈ A.

So, A ∩ B ⊆ A
By the same manner, we prove that A ∩ B ⊆ B.
(b) Assume that A ⊆ B and let x ∈ A. Then

x ∈ A ⇒ x ∈ B.

Then x ∈ A ∧ x ∈ B.
That is

x ∈ A ⇒ x ∈ A∧x ∈ B
⇒ x ∈ A ∩ B.

Then A ⊆ A ∩ B.
Since A ∩ B ⊆ A (by part (a)), then A ∩ B = A.
Conversely, assume that A ∩ B = A. As A ∩ B ⊆ B (by part (a)), then A ⊆ B.

Theorem 2.2.17
Let A, B, and C be sets. Then
(a) A ∩ A = A (Idempotent law),
(b) A ∩ B = B ∩ A (Commutative law),
(c) A ∩ (B ∩C) = (A ∩ B) ∩C (Associative law).
36 Concise Introduction to Logic and Set Theory

Proof
We prove (c) only, and leave (a), (c) as Exercise 3. Let x ∈ A ∩ (B ∩C).
Then

x ∈ A ∩ (B ∩C) ⇔ x ∈ A ∧ x ∈ (B ∩C)
⇔ x ∈ A ∧ (x ∈ B ∧ x ∈ C)
⇔ (x ∈ A ∧ x ∈ B) ∧ x ∈ C
⇔ x ∈ (A ∩ B) ∧ x ∈ C
⇔ x ∈ (A ∩ B) ∩C.

Thus A ∩ (B ∩C) = (A ∩ B) ∩C.

Theorem 2.2.18
Let A be a set. Then
(a) A ∩ φ = φ ,
(b) A ∩U = A, where U is the universal set.

Proof
(a) Since φ ⊆ A, then φ ∩ A = φ (by Theorem 2.2.16).
(b) Since A ⊆ U, then A ∩U = A (by Theorem 2.2.16).

Theorem 2.2.19 (Distributive law)


Let A, B, and C be sets. Then
(a) A ∩ (B ∪C) = (A ∩ B) ∪ (A ∩C),

(b) A ∪ (B ∩C) = (A ∪ B) ∩ (A ∪C).

Proof
(a) Let x ∈ A ∩ (B ∪C). Then

x ∈ A ∩ (B ∪C) ⇔ x ∈ A ∧ x ∈ (B ∪C)
⇔ x ∈ A ∧ (x ∈ B ∨ x ∈ C)
⇔ (x ∈ A ∧ x ∈ B) ∨ (x ∈ A ∧ x ∈ C)
⇔ x ∈ (A ∩ B) ∨ x ∈ (A ∩C)
⇔ x ∈ (A ∩ B) ∪ (A ∩C).

Therefore A ∩ (B ∪C) = (A ∩ B) ∪ (A ∩C).


(b) The proof is left as Exercise 4.
Set Theory 37

Theorem 2.2.20
Let A and B be sets. Then
(a) A ⊆ B ⇔ P(A) ⊆ P(B),
(b) P(A) ∩ P(B) = P(A ∩ B),
(c) P(A) ∪ P(B) ⊇ P(A ∪ B).

Proof
(a) Suppose A ⊆ B and let X ∈ P(A). Then
X ∈ P(A) ⇒ X ⊆ A
⇒ X ⊆ B (since A ⊆ B)
⇒ X ∈ P(B).
Thus P(A) ⊆ P(B).
Conversely, suppose that P(A) ⊆ P(B) and let x ∈ A.
Then
x ∈ A ⇒ {x} ⊆ A
⇒ {x} ∈ P(A)
⇒ {x} ∈ P(B) (since P(A) ⊆ P(B))
⇒ x ∈ B.
Thus A ⊆ B.
(b) Let X ∈ P(A) ∩ P(B). Then
X ∈ P(A) ∩ P(B) ⇒ X ∈ P(A) ∧ X ∈ P(B)
⇒ X ⊆ A∧X ⊆ B
⇒ X ⊆ A∩B
⇒ X ∈ P(A ∩ B).
Thus
P(A) ∩ P(B) ⊆ P(A ∩ B). (2.3)
Now, let X ∈ P(A ∩ B). Then
X ∈ P(A ∩ B) ⇒ X ⊆ A ∩ B
⇒ X ⊆ A∧X ⊆ B
⇒ X ∈ P(A) ∧ X ∈ P(B)
⇒ X ∈ P(A) ∩ P(B).
Thus
P(A ∩ B) ⊆ P(A) ∩ P(B). (2.4)
From (2.3) and (2.4), we conclude that P(A) ∩ P(B) = P(A ∩ B).
(c) The proof is left as Exercise 5.
38 Concise Introduction to Logic and Set Theory

Exercises
1. Complete the proof of Theorem 2.1.6.
2. Complete the proof of Theorem 2.2.7.
3. Complete the proof of Theorem 2.2.17.
4. Complete the proof of Theorem 2.2.19.
5. Complete the proof of Theorem 2.2.20.
6. Let X ∪Y = X for every set X. Show that Y = φ .
7. Describe the set

{x ∈ R : x2 > 2} ∩ {x ∈ R : |x − 2| < |x + 3|.

8. Let A and B be sets. Prove that

φ ⊆ A ∩ B ⊆ A ∪ B.

9. Consider the following sets

A = {x ∈ Z+ : x = 2y, y ∈ Z},
B = {x ∈ Z+ : x = 2y + 1, y ∈ Z},
C = {x ∈ Z+ : x = 3y, y ∈ Z}.

(a) Describe A ∩C and B ∪C.


(b) Verify the validity of A ∩ (B ∪C) = (A ∩ B) ∪ (A ∩C).
10. Let A, B, and C be sets. Prove that

(A ∩ B) ∪C = A ∩ (B ∪C) iff C ⊆ A.

11. Let A and B be sets. Prove that


(a) A ∪ (A ∩ B) = A,
(b) A ∩ (A ∪ B) = A.
12. Let A, B, and C be sets. Prove that

A ∩C = φ ⇒ A ∩ (B ∪C) = A ∩ B.

13. Let A and B be sets. Prove that

A ∪ B = φ ⇒ A = φ ∧ B = φ.

14. Let A, B, and C be sets. When

A ∪C = B ∪C?
Set Theory 39

15. Let #(A) be the number of the elements of A. Prove that

#(A ∪ B) = #(A) + #(B) − #(A ∩ B).

16. Let C ⊆ A and C ⊆ B. Prove that

C ⊆ A ∩ B.

17. Let X and Y be sets. Prove that if A ⊆ X, B ⊆ Y , then

A ∩ B ⊆ X ∩Y.

18. Let A and B be sets. Prove that


(a) A = B ⇔ P(A) = P(B).
(b) P(A) ∪ P(B) ⊆ P(A ∪ B).
(c) A ∩ B = φ ⇔ P(A) ∩ P(B) = {φ }.
19. Let A and B be sets. Give an example to show that

P(A) ∪ P(B) 6= P(A ∪ B).

20. Write the power set, P(X), for each of the following sets:
(a) X = {a, {a}},
(b) X = {1, 2, 3, 4},
(c) X = {φ , {φ }},
(d) X = {φ , a, b, {a, b}}.
21. True or false?
(a) For every set A, φ ⊆ A.
(b) For every set A, {φ } ⊆ A.
(c) φ ∈ {φ , {φ }}.
(d) {φ } ∈ {φ , {φ }}.
(e) {φ } ⊆ {φ , {φ }}.
(f) {1, 2, 5} ⊆ {1, 2, 5, {6, 7}}.

2.2.3 COMPLEMENT OF SET


Definition 2.2.21
Let U be the universal set and A ⊆ U. The set

AC = {x : x ∈ U, x ∈ A}

is said to be the complement of A.

Example 2.2.22
In the Venn diagram, we have shaded the complement of A;
that is the area outside of A.
40 Concise Introduction to Logic and Set Theory

Example 2.2.23
Let the universal set U be Z and let A = {x : x ≤ 3}. Then

AC = {4, 5, 6, 7, . . .}.

Example 2.2.24
Let the universal set U be N and let

A = {2, 4, 6, 8, . . .}.

Then
AC = {1, 3, 5, 7, . . .}.

Theorem 2.2.25
Let A and B be sets. Then
A ⊆ B ⇒ BC ⊆ AC .

Proof
Since A ⊆ B, then x ∈ A ⇒ x ∈ B.
Thus x 6∈ B ⇒ x 6∈ A.
That is, x ∈ BC ⇒ x ∈ AC .
Hence BC ⊆ AC .

Theorem 2.2.26
Let A be a set. Then
(AC )C = A.

Proof
It is clear that

x ∈ (AC )C ⇔ x 6∈ AC
⇔ x ∈ A.

Thus (AC )C = A.

Definition 2.2.27
Let A and B be sets. The difference of A and B is defined by

A − B = {x : x ∈ A and x 6∈ B}.
Set Theory 41

Remark 2.2.28
A − B = A ∩ BC .

Example 2.2.29
Let A = N and let B = No . Then

A − B = Ne .

Example 2.2.30
Let A and B be sets. Then
A − B = BC − AC .

Proof
We have

x ∈ A − B ⇔ x ∈ A ∧ x 6∈ B
⇔ x 6∈ AC ∧ x ∈ BC
⇔ x ∈ BC − AC .

Thus A − B = BC − AC .

Theorem 2.2.31
Let A be a set. Then
(a) U C = φ ,
(b) φ C = U,
(c) A ∩ AC = φ ,
(d) A ∪ AC = U.

Proof
(a) Since U is the universal set, then

U C = {x ∈ U ∧ xU}
= φ.

(b) See Exercise 1.


(c)

A ∩ AC = {x ∈ A ∧ x ∈ AC }
= {x ∈ A ∧ x 6∈ A}
= φ.
42 Concise Introduction to Logic and Set Theory

(d)

A ∪ AC = {x ∈ A ∨ x ∈ AC }
= {x ∈ A ∨ x ∈ U − A}
= U.

Theorem 2.2.32 (De Morgan’s laws)


Let A and B be sets. Then

(a) (A ∪ B)C = AC ∩ BC ,
(b) (A ∩ B)C = AC ∪ BC .

Proof
(a) We have

x ∈ (A ∪ B)C ⇔ x 6∈ A ∪ B
⇔ x 6∈ A ∧ x 6∈ B
⇔ x ∈ AC ∧ x ∈ BC
⇔ x ∈ AC ∩ BC .

Thus (A ∪ B)C = AC ∩ BC .
(b) See Exercise 2.

2.2.4 DIFFERENCE AND SYMMETRIC DIFFERENCE OF SETS


Definition 2.2.33
Let A and B be sets. The symmetric difference of A and B is defined by

A∆B = (A − B) ∪ (B − A).

Example 2.2.34
In the Venn diagram, we have shaded A∆B.

B A

A B A B

A ∆ B is shaded A ∆ B is shaded A ∆ B is shaded


Set Theory 43

Theorem 2.2.35
Let A and B be sets. Then
1. A∆φ = A,
2. A∆B = φ ⇔ A = B.

Proof
(a)
A∆φ = (A − φ ) ∪ (φ − A)
= A∪φ
= A.

(b) Suppose A∆B = φ .


Then
A∆B = φ ⇔ (A − B) ∪ (B − A) = φ
⇔ A−B = φ ∧B−A = φ
⇔ A = B.

Remark 2.2.36
By using the laws of sets algebra, we can prove the properties of the sets without
using the definitions of ⊆, ∩, and ∪.

Example 2.2.37
Prove that A ∪ (A ∩ B) = A.

Proof
A ∩ B ⊆ A (by Theorem 2.2.16). Thus
A ∪ (A ∩ B) = A.
Example 2.2.38
Prove that A ∩ (A ∪ B) = A.

Proof
We have always A ⊆ A ∪ B. Thus
A ∩ (A ∪ B) = A (by Theorem 2.2.16).
Example 2.2.39
Prove that A ∩ (AC ∪ B) = A ∩ B.

Proof
A ∩ (AC ∪ B) = (A ∩ AC ) ∪ (A ∩ B)
= φ ∪ (A ∩ B)
= A ∩ B.
44 Concise Introduction to Logic and Set Theory

Example 2.2.40
Prove that A ∪ (A ∪ BC )C = A ∪ B.

Proof

A ∪ (A ∪ BC )C = A ∪ (AC ∩ (BC )C )
= A ∪ (AC ∩ B)
= (A ∪ AC ) ∩ (A ∪ B)
= U ∩ (A ∪ B)
= A ∪ B.

Exercises
1. Complete the proof of Theorem 2.2.31 (b).
2. Complete the proof of Theorem 2.2.32 (b).
3. Let A, B be the subsets of U. Prove that
(a) A ⊆ B ⇔ A ∩ BC = φ ,
(b) A ⊆ B ⇔ AC ∪ B = U,
(c) A ⊆ B ⇔ (A ∩ BC ) ⊂ AC ,
(d) A ⊆ B ⇔ (A ∩ BC ) ⊂ B.
4. Prove that
(a) A∆φ = A,
(b) A∆B = B∆A,
(c) A∆(B∆C) = (A∆B)∆C,
(d) A ∩ (B∆C) = (A ∩ B)∆(A ∩C),
(e) A∆A = φ ,
(f) (A∆C = B∆C) ⇒ A = B.
5. Prove that the equation

(A ∩ X) ∪ (B ∩ X C ) = φ

has a solution iff B ⊆ AC , and any set X, verifying the relation B ⊆ X ⊆ AC , is


a solution of the equation.
6. Prove that the equation

(A ∩ X) ∪ (B ∩ X C) = (C ∩ X) ∪ (D ∩ X C )

has a solution iff B∆D ⊆ (A∆CC ), and find all the solutions.
Set Theory 45

7. Prove that
(a) A ∩ (B − C) = (A ∩ B) − C,
(b) (A ∪ B) − C = (A − C) ∪ (B − C),
(c) A − (B ∪C) = (A − B) ∩ (A − C),
(d) A − (B ∩C) = (A − B) ∪ (A − C).
8. Prove that
(a) A ∪C = B ∪C iff A∆B ⊆ C,
(b) (A ∪C)∆(B ∪C) = (A∆B) − C.
9. Prove that if A ⊆ B and C = B − A, then A = B − C.
10. Prove that (Generalized of De Morgan’s laws)
(a) (A1 ∪ A2 ∪ · · · ∪ An )C = AC1 ∩ AC2 ∩ · · · ∩ ACn ,
(b) (A1 ∩ A2 ∩ · · · ∩ An )C = AC1 ∪ AC2 ∪ · · · ∪ ACn .

2.3 INDEXED FAMILIES OF SETS


Definition 2.3.1
Let I be a non-empty set. Suppose for each i ∈ I there is a corresponding set Ai . Then
the family of sets
A = {Ai : i ∈ I}
is an indexed family of sets. Each i ∈ I is called an index, and I is called an indexing
set.

Example 2.3.2
Let I = N. For all k ∈ N, let

Ak = {1, 2, 3, . . . , k}.

Then A1 = {1}, A2 = {1, 2}, A3 = {1, 2, 3}, and so forth.


The set with index 12 is
A12 = {1, 2, 3, 4, . . ., 12}.

Example 2.3.3
Let I = {1, 2, 3, 4, 5}. Consider the sets A1 = {1, 10}, A2 = {2, 4, 6, 8, 10}, A3 =
{3, 6, 9}, A4 = {4, 8}, A5 = {5, 6, 10}. Then A = {A1 , A2 , A3 , A4 , A5 } is an indexed
family of sets. Furthermore, such an indexed family of sets is denoted by

{Ai }i∈I .
46 Concise Introduction to Logic and Set Theory

Definition 2.3.4 (Generalized union and intersection)


Let {Ai }i∈I be an indexed family of sets. Then
[
Ai = {x : ∃ i ∈ I, x ∈ Ai }, i ∈ I,
\
Ai = {x : ∀ i ∈ I, x ∈ Ai }, i ∈ I.

Example 2.3.5
Let A1 = {1, 10}, A2 = {2, 4, 6, 10}, A3 = {3, 6, 9}, A4 = {4, 8}, A5 = {5, 6, 10}, and
I = {2, 3, 5}. Then
[ \
Ai = {2, 3, 4, 5, 6, 9, 10}, and Ai = {6}.
i∈I i∈I

Example 2.3.6
Let Bn = [0, 1/n], where n ∈ N. Then
[ \
Bi = [0, 1], and Bi = {0}.
i∈N i∈N

Theorem 2.3.7
Let {Ai }i∈I be an indexed family of sets.
(a) If Ai ⊆ B, ∀ i ∈ I, then ⊆ B.
S
i∈I Ai

(b) If B ⊆ Ai , ∀ i ∈ I, then B ⊆
S
i∈I Ai .

Proof
[
(a) Suppose Ai ⊆ B, ∀ i ∈ I and let x ∈ Ai .
i∈I
Then ∃ j ∈ I, x ∈ A j .
A j ⊆ B, then x ∈ B.
Since[
Thus Ai ⊆ B.
i∈I

(b) Exercise.

Theorem 2.3.8 (Generalized De Morgan’s laws) Let {Ai }i∈I be an indexed family
of sets. Then
Ai )C = ACi ,
[ \
(a) (
i∈I i∈I
\
Ai )C =
[
(b) ( ACi .
i∈I i∈I
Set Theory 47

Proof
(a) Let x ∈ ( Si∈I Ai )C .
S

Then x 6∈ i∈I ACi ⇒ x 6∈ Ai , ∀ i ∈ I


⇒ x ∈ Ai , ∀ i ∈ I
⇒ x ∈ i∈I ACi .
T

Thus
[
Ai )C ⊆
\
( ACi . (2.5)
i∈I i∈I
\
Conversely, suppose that y ∈ ACi .
i∈I
Then y ∈ ACi , ∀ i ∈ I ⇒ y 6∈ Ai , ∀ i ∈ I
⇒ y 6∈ Si∈I Ai
S

⇒ y ∈ ( i∈I Ai )C .
Thus
\
ACi ⊆ (
[
Ai )C . (2.6)
i∈I i∈I

It follows from Equations (2.5) and (2.6) that

Ai )C = ACi .
[ \
(
i∈I i∈I

(b) Exercise.

Theorem 2.3.9 (Generalized distribution law) Let {Ai }i∈I and {B j } j∈J be indexed
families of sets. Then
[ [ [
(a) ( Ai ) ∩ ( B j) = (Ai ∩ B j ),
i∈I j∈J (i, j)∈I×J
\ \ \
(b) ( Ai ) ∪ ( B j) = (Ai ∪ B j ).
i∈I j∈J (i, j)∈I×J

Proof
[ [
(a) Suppose x ∈ ( Ai ) ∩ ( B j)
i∈I j∈J
⇒ (∃ h ∈ I, x ∈ Ah ) ∧ (∃ k ∈ J, x ∈ Bk )
⇒ ∃(h, k) ∈ I × J, x ∈ Ah ∩ Bk
[
⇒ ∃x ∈ (Ai ∩ B j ).
(i, j)∈I×J
Thus
[ [ [
( Ai ) ∩ ( B j) = (Ai ∩ B j ). (2.7)
i∈I j∈J (i, j)∈I×J
48 Concise Introduction to Logic and Set Theory
[
Conversely, let y ∈ (Ai ∩ B j ).
(i, j)∈I×J
Then, there exists (s,t) ∈ I × J, such that y ∈ As ∩ Bt , that is (∃s ∈ I ∧ t ∈ J)
such that (y ∈ As , y ∈ Bt ). Thus

(∃s ∈ I, y ∈ As ) ∧ (∃t ∈ J, y ∈ Bt ).

Therefore
[ [
y∈ Ai ∧ y ∈ Bj
i∈I j∈J
[ [
⇒y∈( Ai ) ∩ ( B j)
i∈I j∈J
[ [ [
⇒ (Ai ∩ B j ) ⊆ ( Ai ) ∩ ( B j ). (2.8)
(i, j)∈I×J i∈I j∈J

From Equations (2.7) and (2.8), we conclude that


[ [ [
( Ai ) ∩ ( B j) = (Ai ∩ B j ).
i∈I j∈J (i, j)∈I×J

Exercises
1. Let {Ai }i∈I and {B j } j∈J be indexed families of sets. Prove that
[ [ [ \
(a) ( Ai ) − ( B j) = [ (Ai − B j )],
i∈I j∈J i∈I j∈J
\ \ \ [
(b) ( Ai ) − ( B j) = [ (Ai − B j )].
i∈I j∈J i∈I j∈J

[ indexed family of sets {Bi }i∈I is said to be a covering of a set A if A ⊆


2. The
B j . Prove that if {Bi }i∈I and {C j } j∈J are distinct coverings of a set A, then
j∈J

{Bi ∩C j }(i, j)∈I×J

is also a covering of A.
3. Consider
1 1 1
Aα = 1, , , . . . , , ∀ α ∈ Z+
2 3 α
For X = {x ∈ R : 0 ≤ x ≤ 1} to find
(a) ∩{Aα : α ∈ Z+ },
(b) ∪{X − Aα : α ∈ Z+ },
(c) ∪{Aα : α ∈ Z+ },
(d) ∪{X − Aα : α ∈ Z+ }.
Set Theory 49

4. Let {Aα : α ∈ Z+ } be an indexed family of subsets of a set X, such that


∩{Aα : α ∈ Z+ } = φ .
Prove that
∪{X − Aα : α ∈ Z+ } = X.
5. Let A = {Ai : i ∈ I} be an arbitrary family of sets and let B be a set. Prove that

[ [
(a) B ∩ ( Ai ) = (B ∩ Ai ),
i∈I i∈I
\ \
(b) B ∪ ( Ai ) = (B ∩ Ai ).
i∈I i∈I

6. Let A = {Ai : i ∈ I} be a family of sets and J ⊆ I. Prove that


[ [
(a) Ai ⊆ Ai ,
i∈J i∈I
\ \
(b) Ai ⊆ Ai .
i∈I i∈J

7. Let A be a family of sets and suppose that A ⊆ B, ∀ A ∈ A. Prove that


[
A ⊆ B.
A∈A

8. Let A be a family of sets and suppose that B ⊆ A, ∀ A ∈ A. Prove that


\
B⊆ A.
A∈A

9. Find the union and intersection of each of the following families or indexed
collections A, where
(a) A = {{1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}, {3, 4, 5, 6, 7}, {4, 5, 6, 7, 8}},
(b) A = {{1, 3, 5}, {2, 4, 6}, {7, 9, 11, 13}, {8, 10, 12}},
(c) A = {An : n ∈ N}, An = {1, 2, 3, . . . , n}, ∀ n ∈ N,
(d) A = {An : n ∈ N}, An = N − {1, 2, 3, . . ., n}, ∀ n ∈ N,
(e) A is the collection of all sets of integers that contain 10,
(f) A = {An : n ∈ {1, 2, 3, . . ., 10}}, A1 = {1}, A2 = {2, 3}, A3 = {3, 4, 5}, . . . ,
A10 = {10, 11, . . ., 19},
(g) A = {An : n ∈ N}, An = (0, n1 ), ∀ n ∈ N,
(h) A = {Ar : r ∈ R+ }, R+ = (0, ∞), Ar = [−π , r) for r ∈ R+ ,
(i) A = {Ar : r ∈ R}, Ar = [|r|, 2|r| + 1], ∀ r ∈ R,
(j) A = {An : n ≥ 3}, An = [ 1n , 2 + 12 ], ∀ n ≥ 3,
(k) A = {Cn : n ∈ Z}, Cn = [n, n + 1], ∀ n ∈ Z.
3 Relations
If x and y are integers, we might say that x is related to y when x is less than y. In this
chapter, we will study the idea of “is related to” by making the notion of a relation
precise.

3.1 ORDERED PAIRS AND CARTESIAN PRODUCT


The study of relations begins with the concept of an ordered pair.

Definition 3.1.1
An ordered pair consists of two elements, say a and b, in which one of them, say a, is
designated as the first element and the other as the second element. An ordered pair
is denoted by (a, b).

Example 3.1.2
The ordered pairs (5, 6) and (6, 5) are different,
that is (5, 6) 6= (6, 5).

Example 3.1.3
The set {5, 6} is not an ordered pair since the elements 5 and 6 are not designated.

Remark 3.1.4
An ordered pair (a, b) can be defined rigorously by

(a, b) ≡ {a, {a, b}},

from this definition, the fundamental property of ordered pairs can be proven:

(a, b) = (c, d) ⇔ a = c ∧ b = d.

Definition 3.1.5
Let A and B be sets. The Cartesian product of A and B consists of all ordered pairs
(a, b), where a ∈ A and b ∈ B. It is denoted by

A × B,

which reads “A cross B”. More concisely,

A × B = {(a, b) : a ∈ A, b ∈ B}.

Example 3.1.6
Let A = {a, b} and B = {1, 2, 3}. Then

A × B = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)}.

DOI: 10.1201/9780429022838-3 51
52 Concise Introduction to Logic and Set Theory

Example 3.1.7
Let C = {x, y}. Then

C × C = {(x, x), (x, y), (y, x), (y, y)}.

Example 3.1.8
Let A = R the set of real numbers. Then

R × R = {(x, y) : x, y ∈ R}.

The elements of R × R are the points of the xy-plane (Cartesian plane).

Remark 3.1.9

1. If the set A has n elements and the set B has m elements, then A × B has nm
elements.
2. The Cartesian product of two sets is not commutative, that is A × B 6= B × A.
3. If A or B is empty set, then A × B = φ .
4. If either A or B is infinite and the other is not empty, then A × B is infinite.
The concept of the Cartesian product can be extended to more than two sets in a
natural way.
The Cartesian product of sets A, B, and C, denoted by

A × B × C,

consists of all ordered triples (a, b, c), where a ∈ A, b ∈ B, and c ∈ C;


that is, A × B × C = {(a, b, c) : a ∈ A, b ∈ B, and c ∈ C}.
Analogously, the Cartesian product of n sets

A1 , A2 , . . . , An

denoted by
A1 × A2 × · · · × An ,
consists of all ordered n-tuples (a1 , a2 , . . . , an ), where

a 1 ∈ A1 , a 2 ∈ A2 , . . . , a n ∈ An ,

that is, A1 × A2 × · · · × An = {(a1 , a2 , . . . , an ) : ai ∈ Ai ∀ i = 1, 2, . . . , n}.

Example 3.1.10
Let A = {x, y}, B = {1, 2, 3}, and C = {a, b}. Then

A × B × C = {(x, 1, a), (x, 1, b), (x, 2, a), (x, 2, b), (x, 3, a), (x, 3, b),
(y, 1, a), (y, 1, b), (y, 2, a), (y, 2, b), (y, 3, a), (y, 3, b)}.
Relations 53

Example 3.1.11
If Ai = R, 1 ≤ i ≤ n. Then

A1 × A2 × · · · × An = {(a1 , a2 , . . . , an ) : ai ∈ R, 1 ≤ i ≤ n}

and is denoted by Rn .

Theorem 3.1.12
Let A and B be nonempty sets. Then

A × B = B × A iff A = B

Proof
Suppose A × B = B × A.
Let a ∈ A, then
∀ b ∈ B, (a, b) ∈ A × B
⇒ (a, b) ∈ B × A
⇒ a ∈ B ∧ b ∈ A.
Hence a ∈ A ⇒ a ∈ B, and
therefore, A ⊆ B
Similarly we prove that B ⊆ A.
Thus A = B.
Conversely, suppose that A = B.
It is clear that A × A = A × A.
Thus A × B = B × A.

Theorem 3.1.13
Let A, B, and C be sets. Then
(a) A × (B ∩C) = (A × B) ∩ (A × C),
(b) A × (B ∪C) = (A × B ∪ (A × C),
(c) (A × B) ∩ (C × D) = (A ∩C) × (B ∩ D).

Proof
(a) Suppose (x, y) ∈ A × (B ∩C). Then

(x, y) ∈ A × (B ∩C) ⇔ x ∈ A ∧ y ∈ (B ∩C)


⇔ x ∈ A ∧ [y ∈ B ∧ y ∈ C]
⇔ (x ∈ A ∧ y ∈ B) ∧ (x ∈ A ∧ y ∈ C)
⇔ (x, y) ∈ A × B ∧ (x, y) ∈ A × C
⇔ (x, y) ∈ (A × B) ∩ (A × C).

(b) See Exercise 1.


54 Concise Introduction to Logic and Set Theory

(c) It is obvious that


(x, y) ∈ (A × B) ∩ (C × D) ⇒ (x, y) ∈ A × B ∧ (x, y) ∈ C × D
⇒ (x ∈ A ∧ y ∈ B) ∧ (x ∈ C ∧ y ∈ D)
⇒ (x ∈ A ∧ x ∈ C) ∧ (y ∈ B ∧ y ∈ D)
⇒ x ∈ (A ∩C) ∧ y ∈ (B ∩ D)
⇒ (x, y) ∈ (A ∩C) × (B ∩ D).
Thus
(A × B) ∩ (C × D) ⊆ (A ∩C) × (B ∩ D) (3.1)
Conversely,
(x, y) ∈ (A ∩C) × (B ∩ D) ⇒ x ∈ (A ∩C) ∧ y ∈ (B ∩ D)
⇒ (x ∈ A ∧ x ∈ C) ∧ (y ∈ B ∧ y ∈ D)
⇒ (x ∈ A ∧ y ∈ B) ∧ (x ∈ C ∧ y ∈ D)
⇒ (x, y) ∈ A × B ∧ (x, y) ∈ C × D
⇒ (x, y) ∈ (A × B) ∩ (C × D).
Thus
(A ∩C) × (B ∩ D) ⊆ (A × B) ∩ (C × D) (3.2)
From Equations (3.1) and (3.2) we conclude that
(A × B) ∩ (C × D) = (A ∩C) × (B ∩ D).

EXERCISES
1. Prove the part (b) of Theorem 3.1.13.
2. If A, B, and C are sets, prove that
(a) A × φ = φ ,
(b) (A × B) ∪ (C × D) ⊆ (A ∪C) × (B ∪ D).
3. Find a and b if
(a + b, 3a + 5b) = (a − b, 2a − 7b).
4. Prove that if (x, y, z) = (u, v, w), then
x = u ∧ y = v ∧ z = w.
5. Let A = {1, 3, 5, 7}, B = {−2, −9, 6}, C = {x, y, z}. Find
(a) (A ∪ B) × C,
(b) (A × C) ∪ (B × C),
(c) (A ∪ B) × (B ∪C).
Relations 55

6. For arbitrary sets A, B, and C to prove that


(a) (A × A) ∩ (B × C) = (A ∩ B) × (A ∩C),
(b) (A × B) − (C × C) = [(A − C) × B] ∪ [A × (B −C)],
(c) (A × A) − (B × C) = [(A − B) × A] ∪ [A × (A −C)].
7. For arbitrary sets A, B,C, and D to prove that
(a) A × (B − D) = (A × B) − (A × D),
(b) (A × B) ∩ (C × V ) = (A × D) ∩ (C × B).
8. Let A, B, and C are sets, such that A 6= φ , B 6= φ , and
(A × B) ∪ (B × A) = C × C.
Prove that A = B = C.
9. Let A and B be sets. Prove that
A ∩ B = φ iff (A × C) ∩ (B × C) = φ ,
for any nonempty set C.
10. Let A, B, and C are sets, such that A ⊆ B. Prove that
A × C ⊆ B × C.

11. Prove that


{1, 2, 3, . . ., n} × A = ({1} × A) ∪ ({2} × A) ∪ · · ·∪ ({n} × A)
for an arbitrary set A.
12. Give an example of sets A, B, and C, such that
A ∪ (B × C) 6= (A ∪ B) × (A ∪C).

13. Prove that if A × A = B × B, then A = B.


14. Prove that if X × Y = X × Z and X 6= φ , then Y = Z.
15. Let A and C be nonempty sets. Prove that
A ⊆ B ∧C ⊆ D iff A × C ⊆ B × D.

16. Let A, B,C, and D be nonempty sets. Prove that


A × B = C × D ⇔ A = C ∧ B = D.

17. Let A = {a, b}, B = {2, 3}, and C = {3, 4}. Find
(a) A × (b ∪C),
(b) (A × B) ∪ (A × C),
(c) A × (B ∩C),
(d) (A × B) ∩ (A × C).
18. Suppose that the ordered pairs (x + y, 1) and (3, x − y) are equal. Find x and y.
56 Concise Introduction to Logic and Set Theory

3.2 RELATIONS ON SETS


Definition 3.2.1
Let A and B be sets. Then any subset of A × B is called a relation from A to B.
If R is a relation from A to B, then
R ⊆ A × B.
Subsets of A × A are called relations on A.
If R is a relation from A to B and (a, b) ∈ R, we write aRb and we read “a is related
to b”. a 6R b means that (a, b) 6∈ R.

Example 3.2.2
Let A = {1, 5}, B = {2, 4, 6}, then
R = {(1, 2), (1, 6), (5, 6)} is a relation from A to B.
We have 1R2, 5R6. Also the following sets
S = {(2, 1), (2, 5), (6, 1), (6, 5)}
T = {(4, 1)} are relations from B to A.

Example 3.2.3
Let X = {a, b, c, 3}, Y = {1, 2, 5}, then
R = {(a, 1), (b, 1), (c, 2), (3, 2), (3, 5)}
is a relation from X to Y . We have aR1, 3R2, and 3R5. However, 3 6R 1 and b 6R 2. The
sets
S = {(1, a), (2, 3), (5, a)}
T = {(2, c)}
are relations from Y to X.

Example 3.2.4
Let R = {(x, y) ∈ R × R : x ≤ y}. Then
(1, 1) ∈ R and (3, 7) ∈ R. But (3, 2) 6∈ R, and (10, 6) 6∈ R.

Example 3.2.5
Let X be a set. Then the set
R = {(A, B) ∈ P(X) × P(X) : A ⊆ B}
is a relation on the set P(X).

Example 3.2.6
Let A be the set of the lines in the xy-plane. The set
R = {(a, b) ∈ A × A : a//b}
is a relation on A.
Relations 57

Example 3.2.7
Consider the relation R on the set N × N given by

R = {((a, b), (c, d)) ∈ (N × N) × (N × N) : a + b = c + d}.

Then (1, 5)R(2, 4) but (6, 7) 6R (4, 10).

Remark 3.2.8
Since the relation is a set, then we can define union, intersection, and difference of
two relations.
For example, if R and S are relations from A to B, that is

R ⊆ A × B and S ⊆ A × B, then R ∪ S ⊆ A × B, R ∩ S ⊆ A × B,

and R − S ⊆ A × B. Also R ∪ S, R ∩ S, and R − S are relations from A to B.


In symbols,

R ∪ S = {(x, y) ∈ A × B : (x, y) ∈ R ∨ (x, y) ∈ S},


R ∩ S = {(x, y) ∈ A × B : (x, y) ∈ R ∧ (x, y) ∈ S},
R − S = {(x, y) ∈ A × B : (x, y) ∈ R ∧ (x, y) 6∈ S}.

Example 3.2.9
Let

R = {(x, y) ∈ R × R : x + y = 5},
S = {(x, y) ∈ R × R : 2x − y = 4}.

Then

R ∩ S = {(x, y) ∈ R × R : x + y = 5 ∧ 2x − y = 4}
= {(3, 2)}.

Definition 3.2.10
Let R be a relation from A to B, the domain of R, denoted by Dom(R), is

Dom(R) = {a ∈ A : ∃ b ∈ B, such that (a, b) ∈ R}.

The range of R, denoted by Rng(R), is

Rng(R) = {b ∈ B : ∃ a ∈ A, such that (a, b) ∈ R}.

Thus, the domain of R is the set of all first coordinates of ordered pairs in R, and
the range of R is the set of all second coordinates. By definition, Dom(R) ⊆ A and
Rng(R) ⊆ B.
58 Concise Introduction to Logic and Set Theory

Example 3.2.11
Let A = {1, 2, 3, 4}, B = {x, y, z}, and

R = {(1, x), (2, x), (2, z), (4, z)}.

Then
Dom(R) = {1, 2, 4},
and
Rng(R) = {x, z}.

Example 3.2.12
Let R be a relation on R defined by

R = {(x, y) ∈ R × R : y = x2 }.

Then

Dom(R) = {x ∈ R : ∃ y ∈ R, such that (x, y) ∈ R}


= {x ∈ R : ∃ y ∈ R, such that y = x2 }.

Then Dom(R) = R and

Rng(R) = {y ∈ R : ∃ x ∈ R, such that (x, y) ∈ R}


= {y ∈ R : ∃ x ∈ R, such that y = x2 }.

Then,
Rng(R) = {y ∈ R : y ≥ 0}.

Definition 3.2.13
Let R be a relation from A to B, then the inverse of R is

R−1 = {(y, x) : (x, y) ∈ R}.

Example 3.2.14
Let R = {(1, b), (1, c), (3, c)}. Then

R−1 = {(b, 1), (c, 1), (c, 3)}.

Example 3.2.15
Let R = {(x, y) ∈ R × R : x ≤ y}. Then

R−1 = {(x, y) ∈ R × R : x ≥ y}.

Example 3.2.16
Let S be a relation on A = N ∪ {0}, defined by

S = {(a, b) ∈ A × A : a = 0}
= {(0, 0), (0, 1), (0, 2), . . . }.
Relations 59

Then

S−1 = {(x, y) ∈ A × A : y = 0}
= {(0, 0), (1, 0), (2, 0), . . . }.

Example 3.2.17
Let T be a relation on R, defined by

T = {(x, y) ∈ R × R : y = x2 }.

Then
T −1 = {(x, y) ∈ R × R : x = y2 }.

Theorem 3.2.18
Let R be a relation on A. Then
(R−1 )−1 = R.

Proof
Let (x, y) ∈ (R−1 )−1 , then

(x, y) ∈ (R−1 )−1 ⇒ (y, x) ∈ R−1


⇒ (x, y) ∈ R.

Thus

(R−1 )−1 ⊆ R (3.3)

Now, let (x, y) ∈ R. Then

(x, y) ∈ R ⇒ (y, x) ∈ R−1


⇒ (x, y) ∈ (R−1 )−1 .

Hence

R ⊆ (R−1 )−1 (3.4)

From Equations (3.3) and (3.4), we conclude that

(R−1 )−1 = R.

Theorem 3.2.19
If R is a relation from A to B, then
(a) Dom(R) = Rng(R−1 ),
(b) Rng(R) = Dom(R−1 ).
60 Concise Introduction to Logic and Set Theory

Proof
(a) We have

x ∈ Dom(R) ⇒ ∃ y ∈ B such that (x, y) ∈ R


⇒ ∃ y ∈ B such that (y, x) ∈ R−1
⇒ x ∈ Rng(R−1 ).

Then

Dom(R) ⊆ Rng(R−1 ) (3.5)

Now, let x ∈ Rng(R−1 ). Then

x ∈ Rng(R−1 ) ⇒ ∃ y ∈ B, such that (y, x) ∈ R−1


⇒ y ∈ B, such that (x, y) ∈ R ⇒ x ∈ Dom(R).

Thus,

Rng(R−1 ) ⊆ Dom(R) (3.6)

From Equations (3.5) and (3.6), we deduce that

Dom(R) = Rng(R−1 ).

(b) See Exercise 1.

Definition 3.2.20
Let R be a relation from A to B and let

C ⊆ A, D ⊆ B. Then the set R ∩ (C × D) is

called restriction of relation R from C to D.

Remark 3.2.21
If R is a relation on A and C = D, then

R ∩ (C × C) is called restriction of R on C,

denoted by R|C .

Example 3.2.22
Let A = {x ∈ N : x is even},
B = {x ∈ N : x is odd},
C = {2, 4, 6},
and
D = {1, 3, 5}.
Relations 61

If R is a relation from A to B, defined by

R = {(x, y) : x ∈ A ∧ y ∈ B, such that y|x},

then the restriction of R from C to D is the set

R ∩ (C × D) = {(2, 1), (4, 1), (6, 1), (6, 3)}.

Example 3.2.23
Let

A = {x ∈ Z : −16 ≤ x ≤ 16},
B = {x ∈ N : x ≤ 16}.

If R is a relation on A defined by

R = {(x, y) ∈ A × A : y = x2 + 1},

then R|B = {(0, 1), (1, 2), (2, 5), (3, 10)}.

Definition 3.2.24
If R is a relation from A to B and S is a relation from B to C, then the composite of R
and S, denoted by S ◦ R, is defined by

S ◦ R = {(x, z) : ∃ y ∈ B, such that (x, y) ∈ R and (y, z) ∈ S}.

Since S ◦ R ⊆ A × C, then S ◦ R is a relation from A to C.

Example 3.2.25 Let A = {1, 2, 3, 4}, B = {x, y, z, w}, and C = {a, b, c}.
Let R be a relation from A to B, defined by

R = {(1, x), (1, y), (2, y), (3, z), (4, w)},

and S a relation from B to C, defined by

S = {(x, a), (y, a), (y, b), (w, c)}.

1 x a
2 y
b
3 z
c
4 w

The relations R and S are illustrated in the figure above. We have

S ◦ R = {(1, a), (1, b), (2, a), (2, b), (4, c)}.
62 Concise Introduction to Logic and Set Theory

Example 3.2.26 Let

R = {(x, y) ∈ R × R : y = x + 1},
S = {(x, y) ∈ R × R : y = x2 }.

Then

R ◦ S = {(x, y) : ∃z ∈ R, such that (x, z) ∈ S ∧ (z, y) ∈ R}


= {(x, y) : z = x2 ∧ y = z + 1}
= {(x, y) : y = x2 + 1},

and

S ◦ R = {(x, y) : ∃z ∈ R, such that (x, z) ∈ R ∧ (z, y) ∈ S}


= {(x, y) : z = x + 1 ∧ y = z2 }
= {(x, y) : y = (x + 1)2}.

Clearly, S ◦ R 6= R ◦ S.

Theorem 3.2.27 Let R be a relation on A. Then

IA ◦ R = R ◦ IA = R,

where IA is the identity relation on A, that is

IA = {(x, x) : x ∈ A}.

Proof We have

(x, y) ∈ IA ◦ R ⇒ ∃z ∈ A, such that (x, z) ∈ R ∧ (z, y) ∈ IA .

Since (z, y) ∈ IA , then z = y. Thus (x, z) ∈ R ⇒ (x, y) ∈ R.


Hence

IA ◦ R ⊆ R (3.7)

Now, let (x, y) ∈ R. Since


(x, y) ∈ R ∧ (y, y) ∈ IA ,
then (x, y) ∈ IA ◦ R. Thus

R ⊆ IA ◦ R (3.8)

From Equations (3.7) and (3.8), we conclude that IA ◦ R = R.


Analogously, we prove that R ◦ IA = R.
Relations 63

Theorem 3.2.28 Let R, S, and T be relations on a set A. Then


(a) (T ◦ S) ◦ R = T ◦ (S ◦ R),
(b) (S ∪ T ) ◦ R = (S ◦ R) ∪ (T ◦ R),
(c) (S ∩ T ) ◦ R = (S ◦ R) ∪ (T ◦ R),
(d) If R ⊆ S, then T ◦ R ⊆ T ◦ S and
R ◦ T ⊆ S ◦ T,
(e) (S ◦ R) ∩ T = φ ⇒ (T ◦ R−1) ∩ S = φ ,
(f) (S ◦ R)−1 = R−1 ◦ S−1.

Proof (a) Suppose that (x, w) ∈ (T ◦ S) ◦ R.


Then ∃ y, such that (x, y) ∈ R ∧ (y, w) ∈ T ◦ S
and ∃ z, such that (y, z) ∈ S ∧ (z, w) ∈ T .
Since
(x, y) ∈ R ∧ (y, z) ∈ S,
then (x, z) ∈ S ◦ R.
As (x, z) ∈ S ◦ R and (z, w) ∈ T , then (x, w) ∈ T ◦ (S ◦ R). Thus

(T ◦ S) ◦ R ⊆ T ◦ (S ◦ R). (3.9)

By the same manner, we show that

T ◦ (S ◦ R) ⊆ (T ◦ S) ◦ R. (3.10)

From Equations (3.9) and (3.10), we get

T ◦ (S ◦ R) = (T ◦ S) ◦ R.

(b) See Exercise 2.


(c) See Exercise 2.
(d) See Exercise 2.
(e) Suppose that (S ◦ R) ∩ T 6= φ . Then ∃ (x, y) such that (x, y) ∈ (S ◦ R) ∩ T ; i.e.
(x, y) ∈ S ◦ R ∧ (x, y) ∈ T .
Since (x, y) ∈ S ◦ R, then ∃ z such that (x, z) ∈ R ∧ (z, y) ∈ S. (x, z) ∈ R ⇒ (z, x) ∈ R−1 .
Then ((z, x) ∈ R−1 ∧ (x, y) ∈ T ) ⇒ (z, y) ∈ T ◦ R−1 . As (z, y) ∈ S, then (z, y) ∈ (T ◦
R−1 ) ∩ S, i.e., (T ◦ R−1) ∩ S 6= φ .
Analogously we prove that

(T ◦ R−1) ∩ S 6= φ ⇒ (S ◦ R) ∩ T 6= φ .

Thus
(S ◦ R) ∩ T = φ ⇔ (T ◦ R−1) ∩ S = φ .
64 Concise Introduction to Logic and Set Theory

Exercises
1. Complete the proof of Theorem 3.2.19.
2. Complete the proof of Theorem 3.2.28.
3. Let X = {a, b, c}, and Y = {r}. Find all the relations from X to Y .
4. Suppose that A has n elements. How many relations are there on A?
5. Let S be a relation from X to Y , T be a relation from Y to Z and let A ⊆ X.
Define
S(A) = {y : (x, y) ∈ S, x ∈ A}.
Prove that
(a) S(A) ⊆ Y ,
(b) (T ◦ S)(A) = T (S(A)),
(c) S(A ∪ B) = S(A) ∪ S(B),
(d) S(A ∩ B) = S(A) ∩ S(B).
6. Let S and T be relations from X to Y . Prove that
(a) (S ∩ T )−1 = S−1 ∩ T −1 ,
(b) (S ∪ T )−1 = S−1 ∪ T −1 .
7. Show by an example that S ◦ R 6= R ◦ S, where R and S are relations on a set A.
8. Let G be a relation from X to Y and H be a relation from Y to Z. Prove that
(a) Dom(G ◦ H) ⊆ Dom(H),
(b) Rng(G ◦ H) ⊆ Rng(G),
(c) if Rng(H) ⊆ Rng(G), then Dom(G ◦ H) = Dom(H).
9. Let G, H, J, and K be relations on a set A. Prove that
(a) G ⊆ H ∧ J ⊆ K ⇒ G ◦ J ⊆ H ◦ K,
(b) G ⊆ H ⇔ G−1 ⊆ H −1 .
10. Let G and H be relations on a set A. Prove that
(a) Dom(G ∪ H) = Dom(G) ∪ Dom(H),
(b) Rng(G ∪ H) = Rng(G) ∪ Rng(H).
11. Let R be a relation on a set A and let B,C ⊆ A. Prove that
(a) R|B∩C = (R|B ) ∩ (R|C ),
(b) R|B∪C = (R|B ) ∪ (R|C ).
12. Find the domain and range for the relation T on R given by xTy iff

(a) y = 2x + 1, (b) y = x − 1,
(c) y ≤ x2 , (d) |x| < 2 ∧ y = 3,
2
(e) y = x + 3, (f) y = x12 ,
(g) y 6= x, (h) |x| < 2 ∧ y = 3.
Relations 65

13. Find the inverse of the following relations:


(a) R1 = {(x, y) ∈ R × R : y = x},
(b) R2 = {(x, y) ∈ R × R : y = −5x + 2},
(c) R3 = {(x, y) ∈ R × R : y = 7x − 10},
(d) R4 = {(x, y) ∈ R × R : y = x2 + 2},
(e) R5 = {(x, y) ∈ R × R : y = −4x2 − 5},
(f) R6 = {(x, y) ∈ R × R : y < x + 1},
(g) R7 = {(x, y) ∈ R × R : y > 3x − 4},
2x
(h) R8 = {(x, y) ∈ R × R : y = x−2 },
(i) R9 = {(x, y) ∈ P × P : y is the father of x}
where P is the set of all people,
(j) R10 = {(x, y) ∈ P × P : y is sibling of x},
(k) R11 = {(x, y) ∈ P × P : y loves x}.
14. Let
R = {(1, 5), (2, 2), (3, 4), (5, 2)},
S = {(2, 4), (3, 4), (3, 1), (5, 5)},
T = {(1, 4), (3, 5), (4, 1)}.
Find

(a) (R ◦ S) ◦ T, (b) R ◦ (S ◦ T),


(c) T ◦ T , (d) S ◦ R,
(e) R ◦ R, (f) T ◦ S,
(g) R ◦ T , (h) R ◦ S.

15. Find the composites for the relations defined in Exercise 11.

(a) R10 ◦ R9 , (b) R11 ◦ R9,


(c) R9 ◦ R9 , (d) R8 ◦ R3 ,
(e) R3 ◦ R8 , (f) R8 ◦ R8 ,
(g) R6 ◦ R6, (h) R2 ◦ R3 ,
(i) R4 ◦ R5 , (j) R1 ◦ R1,
(k) R1 ◦ R2, (l) R2 ◦ R2,
(m) R2 ◦ R4 , (n) R6 ◦ R4 .

16. Let A = {1, 2, 3, 4}. Give an example of relations R and S on A, such that
S ◦ R 6= R ◦ S and (S ◦ R)−1 6= S−1 ◦ R−1 .

17. Complete the proof of Theorem 3.2.27.


18. Let S and R be relations on a set A.
(a) Show by an example that one of the inclusions:
Dom(R) ⊆ Dom(S ◦ R),
Dom(S ◦ R) ⊆ Dom(R)
may be false.
66 Concise Introduction to Logic and Set Theory

(b) Which of these two statements must be true:


Rng(S) ⊆ Rng(S ◦ R) or Rng(S ◦ R) ⊆ Rng(S)?
(c) Give an example of nonempty relations R and S on a set A = {1, 2, 3, 4},
such that R ◦ S and S ◦ R are empty.
19. Prove that (A × B) × C = A × (B × C) is false unless one of the sets is empty.
20. (a) Let R be a relation from A to B. For a ∈ A, define the vertical section of R
at a by
Ra = {y ∈ B : (a, y) ∈ R}.
Prove that
[
Ra = Rng(R).
a∈A

(b) Let R be a relation from A to B. For b ∈ B, define the horizontal section of


R at b by the relation
bR = {x ∈ A : (x, b) ∈ R}.
Prove that [
bR = Dom(R).
b∈B

3.3 TYPE OF RELATIONS


Definition 3.3.1 Let R be a relation on a set A. R is called reflexive relation if

(x, x) ∈ R, ∀ x ∈ A.

Example 3.3.2 Let A = {a, b, c, d} and let R be a relation on A, defined by

R = {(a, a), (a, c), (b, b), (b, d), (c, c), (c, d), (d, d)}.

Then R is reflexive relation, since (a, a), (b, b), (c, c), (d, d) ∈ R.
If T = {(a, a), (a, c), (b, d), (c, c), (d, d)} is a relation on A,
then T is not reflexive, since (b, b) 6∈ T .

Example 3.3.3 Let R1 , R2 , R3 , and R4 be relations on N defined as follows:

R1 = {(x, y) ∈ N × N : x < y},


R2 = {(x, y) ∈ N × N : x ≤ y},
R3 = {(x, y) ∈ N × N : y 6= 0, y | x},
R4 = {(x, y) ∈ N × N : x + y = 5}.

The relations R2 and R3 are reflexive but R1 and R4 are not reflexive. Why?
Relations 67

Example 3.3.4 Let X be arbitrary set and let R1 , R2 be two relations on P(X) defined
as follows:
R1 = {(A, B) ∈ P(X) × P(X) : A ⊆ B},
R2 = {(A, B) ∈ P(X) × P(X) : A ∩ B = φ }.
R1 is reflexive, since A ⊆ A, ∀ A ∈ P(X). But R2 is not reflexive, since A∩A = A 6= φ .

Remark 3.3.5 If R is a reflexive relation on a set A, then the identity relation IA is a


subset of R. i.e.,
IA ⊆ R.

Definition 3.3.6 Let R be a relation on a set A. R is called symmetric relation if


∀ x, y ∈ A, (x, y) ∈ R ⇒ (y, x) ∈ R.
Example 3.3.7 Let A = {1, 2, 3, 4} and let R be a relation on A defined by
R = {(1, 3), (4, 2), (2, 4), (3, 1)}.
Then R is symmetric.

Example 3.3.8 Let A = N − {0} and let R1 , R2 , and R3 be relations on A defined by


R1 = {(x, y) ∈ A × A : x | y},
R2 = {(x, y) ∈ A × A : x + y = 10},
R3 = {(x, y) ∈ A × A : x + 3y = 10}.
Then R2 is symmetric but R1 and R3 are not symmetric. Why?

Example 3.3.9 Let X be a nonempty set and let R1 and R2 be relations on P(X)
defined by
R1 = {(A, B) ∈ P(X) × P(X) : A ⊂ B},
R2 = {(A, B) ∈ P(X) × P(X) : A = X − B}.
R1 is not but R2 is symmetric.

Theorem 3.3.10 Let R be a relation on a set A. Then R is symmetric iff


R = R−1 .
Proof Suppose R is symmetric, then
(x, y) ∈ R ⇒ (y, x) ∈ R ⇔ (x, y) ∈ R−1 .
Thus R = R−1 .
Conversely, suppose R = R−1 , then
(x, y) ∈ R ⇒ (x, y) ∈ R−1
⇒ (y, x) ∈ R.
Hence, R is symmetric.
68 Concise Introduction to Logic and Set Theory

Definition 3.3.11 Let R be a relation on a set A. R is called transitive relation if

∀ x, y, z ∈ A, [(x, y) ∈ R ∧ (y, z) ∈ R] ⇒ (x, z) ∈ R.

Example 3.3.12 Let R be a relation on N defined by

R = {(x, y)inN × N : x < y}.

R is transitive, since
x < y ∧ y < z ⇒ x < z.
That is
(x, y) ∈ R ∧ (y, z) ∈ R ⇒ (x, z) ∈ R.

Example 3.3.13 Let A = {1, 2, 3}. Let R1 , R2 , and R3 be relations on A defined by

R1 = {(1, 2), (2, 2)},


R2 = {(1, 1)},
R3 = {(1, 2), (2, 3), (1, 3), (2, 1), (1, 1)}.

R1 and R2 are transitive. Why? But R3 is not transitive. Why?

Definition 3.3.14 Let R be a relation on a set A. R is called antisymmetric relation if

(x, y) ∈ R ∧ (y, x) ∈ R ⇒ x = y.

Remark 3.3.15 The statement: “R is not symmetric” does not mean that R is anti-
symmetric.

Example 3.3.16 Let X be an arbitrary set and let R be a relation on P(X) defined by

R = {(A, B) ∈ P(X) × P(X) : A ⊆ B}.

R is antisymmetric, since

A ⊆ B ∧ B ⊆ A ⇒ A = B.

Example 3.3.17 Let T be a relation on N defined by

T = {(x, y) ∈ N × N : x ≤ y}.

T is antisymmetric, since
x ≤ y ∧ y ≤ x ⇒ x = y.

Example 3.3.18 Let A = {1, 2, 3, 4}, and let R be a relation on A defined by

R = {(1, 3), (3, 1), (3, 3), (3, 2)}.

R is not antisymmetric, since (1, 3), (3, 1) ∈ R, but 1 6= 3.


Relations 69

Theorem 3.3.19 Let R be a relation on a set A. Then R is antisymmetric iff

R ∩ R−1 = IA .

Proof Suppose that R is antisymmetric and let (x, y) ∈ R ∩ R−1. Then

(x, y) ∈ R ∩ R−1 ⇔ (x, y) ∈ R ∧ (x, y) ∈ R−1


⇔ (x, y) ∈ R ∧ (y, x) ∈ R
⇔ x = y(since R is antisymmetric)
⇔ (x, y) ∈ IA .

Thus R ∩ R−1 = IA .
Conversely, suppose that R ∩ R−1 = IA , and let

(x, y) ∈ R ∧ (y, x) ∈ R.

Then (x, y) ∈ R ∧ (x, y) ∈ R−1 . Hence (x, y) ∈ R ∩ R−1 . Therefore (x, y) ∈ IA and thus
x = y. This proves that R is antisymmetric.

Exercises
1. Let S be a relation on a set X. Prove that
(a) S is transitive iff S ◦ S = S.
(b) if S is reflexive and transitive, then

S ◦ S = S.

2. Let S and T be transitive relations on a set X. Is S ∩ T transitive?


3. Consider the following relations on the set A = {0, 1, 2, . . . , 11}:
(a) R1 = {(x, y) : y − x ∈ A},
(b) R2 = {(x, y) : y − x ∈ A and y − x 6= 0},
(c) R3 = {(x, y) : 1 < x − y},
(d) R4 = {(x, y) : y − x = 1}.
Determine the type of relation in each case.
4. Let R be a relation on a set X. Prove that R ∪ R−1 is the smallest symmetric
relation, such that R ⊂ R ∪ R−1 , and R ∩ R−1 is the greatest symmetric relation,
such that R ∩ R−1 ⊂ R.
5. Let G and H be relations on a set A. Suppose that G is reflexive and H is both
reflexive and transitive. Prove that

G ⊆ H ⇔ G ◦ H = H.

6. Let H be a reflexive relation and G be an arbitrary relation on a set A. Prove


that
G ⊆ H ◦ G and G ⊆ G ◦ H.
70 Concise Introduction to Logic and Set Theory

7. Give an example, if possible, of a set A, such that every relation on A is sym-


metric.
8. Give an example, if possible, of a relation R on a set A, such that R is symmetric
and antisymmetric in the same time.
9. Let R and R′ be relations on a set A, such that R is reflexive. Prove that R ∪ R′
is reflexive.
10. Let R and R′ be relations on a set A. Show that the following statements are
false:
(a) If R is antisymmetric and R′ is also antisymmetric, then R ∪ R′ is antisym-
metric. (b) If R is transitive and R′ is also transitive, then R ∪ R′ is transitive.

3.4 EQUIVALENCE RELATIONS AND EQUIVALENCE CLASSES


Definition 3.4.1 Let R be a relation on a set A. Then R is called an equivalence
relation iff R is reflexive, symmetric, and transitive.

Example 3.4.2 Let R1 and R2 be relations on R defined by

R1 = {(x, y) ∈ R × R : x = y},
R2 = {(x, y) ∈ R × R : x < y}.

R1 is an equivalence relation on R, since


1. x = x, ∀ x ∈ R, that is (x, x) ∈ R1 , ∀ x ∈ R,
2. x = y ⇒ y = x, that is (x, y) ∈ R1 ⇒ (y, x) ∈ R1 ,
3. [x = y ∧ y = z] ⇒ x = z, that is
[(x, y) ∈ R1 ∧ (y, z) ∈ R1 ] ⇒ (x, z) ∈ R1 .
Therefore R1 is reflexive, symmetric, and transitive on R.
Thus R1 is an equivalence relation on R.
But R2 is not an equivalence relation, since it is neither reflexive nor symmetric.

Example 3.4.3 Let X be a nonempty set and let S and T be relations on P(X) defined
by

S = {(A, B) ∈ P(X) × P(X) : A = B}


T = {(A, B) ∈ P(X) × P(X) : A ⊆ B}

S is an equivalence relation. Why? But T is not an equivalence relation. Why?

Example 3.4.4 Let A be the set of all the lines on a plane and let R and S be relations
on A defined by

R = {(x, y) ∈ A × A : x//y},
S = {(x, y) ∈ A × A : x⌊y}.

R is an equivalence relation, but S is not. Why?


Relations 71

Example 3.4.5 Let A = R × R and let R be a relation on A, defined by

R = {(a, b), (c, d) ∈ A × A : a + b = c + d}.

“Below we show that R is an equivalence relation on A.”


1. If (a, b) ∈ A, then a + b = a + b. Therefore ((a, b), (a, b)) ∈ R, ∀ (a, b) ∈ A.
Thus R is a reflexive relation.
2. If ((a, b), (c, d)) ∈ R, then a + b = c + d. But

a + b = c + d ⇒ c + d = a + b.

Therefore ((c, d), (a, b)) ∈ R. Thus R is a symmetric relation.


3. If ((a, b), (c, d)) ∈ R ∧ ((c, d), (e, f )) ∈ R, then

a + b = c + d ∧ c + d = e + f ; i.e., a + b = e + f .

Hence ((a, b), (e, f )) ∈ R. Thus R is transitive relation.

Theorem 3.4.6 If R and S are equivalence relations on a set A. Then R ∩ S is an


equivalence relation.

Proof
1. Since R and S are reflexive, then

∀ x ∈ A, (x, x) ∈ R ∧ (x, x) ∈ S.
Thus (x, x) ∈ R ∩ S, ∀ x ∈ A. Hence R ∩ S is a reflexive relation on A.
2. Suppose (x, y) ∈ R ∩ S, then

(x, y) ∈ R ∩ S ⇒ (x, y) ∈ R ∧ (x, y) ∈ S


⇒ (y, x) ∈ R ∧ (y, x) ∈ S (since R and S are symmetric)
⇒ (y, x) ∈ R ∩ S.

Thus R ∩ S is symmetric.
3. Suppose (x, y) ∈ R ∩ S ∧ (y, z) ∈ R ∩ S, then

[(x, y) ∈ R ∧ (x, y) ∈ S] ∧ [(y, z) ∈ R ∧ (y, z) ∈ S].

That is [(x, y) ∈ R ∧ (y, z) ∈ R] ∧ [(x, y) ∈ S ∧ (y, z) ∈ S].


This implies (x, z) ∈ R ∧ (x, z) ∈ S, since R and S are transitive.
Hence, (x, z) ∈ R ∩ S. Thus, R ∩ S is transitive relation. Therefore, R ∩ S is an
equivalence relation.
72 Concise Introduction to Logic and Set Theory

Theorem 3.4.7 If R is an equivalence relation on a set A. Then

R ◦ R = R.

Proof Suppose that (x, z) ∈ R ◦ R, then ∃ y ∈ A, such that

(x, y) ∈ R ∧ (y, z) ∈ R.

Since R is a transitive relation, then

(x, y) ∈ R ∧ (y, z) ∈ R ⇒ (x, z) ∈ R.

Thus

R ◦ R ⊆ R. (3.11)

Now, suppose that (x, y) ∈ R. Then (x, x) ∈ R, since R is reflexive. Thus,


∃ x ∈ A, such that
(x, x) ∈ R ∧ (x, y) ∈ R.
This implies (x, y) ∈ R ◦ R and hence

R ⊆ R ◦ R. (3.12)

From Equations (3.11) and (3.12), we conclude

R ◦ R = R.

Definition 3.4.8 Let R be an equivalence relation on a nonempty set A and let a ∈ A.


The equivalence class of a, determined by R, is the set

[a] = a/R = {b ∈ A : (a, b) ∈ R}.

Example 3.4.9 Let A = {1, 2, 3, 4} and let R be a relation on A defined by

R = {(1, 1), (2, 2), (3, 3), (4, 4), (1, 3), (3, 1)}.

It is clear that R is an equivalence relation on A and the equivalence classes are

[1] = {x ∈ A : (x, 1) ∈ R} = {1, 3},


[2] = {x ∈ A : (x, 2) ∈ R} = {2},
[3] = {x ∈ A : (x, 3) ∈ R} = {1, 3} = [1],
[4] = {x ∈ A : (x, 4) ∈ R} = {4}.

Since [1] = [3], then the equivalence classes are

[1], [2], [4].


Relations 73

Theorem 3.4.10 (Properties of equivalence classes) Let R be an equivalence relation


on a set A and let (a, b) ∈ A. Then
(a) a ∈ [a],
(b) if b ∈ [a], then [a] = [b],
(c) [a] = [b] iff (a, b) ∈ R,
(d) if [a] ∩ [b] 6= φ , then [a] = [b].

Proof (a) By definition of [a], we have


[a] = {x ∈ A : (x, a) ∈ R}.
Since R is a reflexive relation, then
(a, a) ∈ R, ∀ a ∈ A.
Thus a ∈ [a].
(b) Suppose that b ∈ [a] and let x ∈ [b]. Then x ∈ [b] ⇒ (x, b) ∈ R.
Since b ∈ [a], then (b, a) ∈ R. Hence
(x, b) ∈ R ∧ (b, a) ∈ R ⇒ (x, a) ∈ R (since R is transitive),
⇒ x ∈ [a].
Thus
[b] ⊆ [a]. (3.13)

Now, suppose that y ∈ [a]. Then


y ∈ [a] ⇒ (y, a) ∈ R.
Hence
b ∈ [a] ⇒ (b, a) ∈ R
⇒ (a, b) ∈ R,
since R is symmetric. Consequently
(y, a) ∈ R ∧ (a, b) ∈ R ⇒ (y, b) ∈ R
⇒ y ∈ [b],
since R is transitive. Therefore
[a] ⊆ [b]. (3.14)
Thus, it follows from Equations (3.13) and (3.14) that
[a] = [b].
(c) Firstly, suppose that [a] = [b]. Then by part (a), we have

a ∈ [a].
74 Concise Introduction to Logic and Set Theory

Since [a] = [b], then

a ∈ [a] ⇒ a ∈ [b]
⇒ (a, b) ∈ R.

Conversely, suppose that x ∈ [a]. Then,

x ∈ [a] ⇒ (x, a) ∈ R.

This implies (x, a) ∈ R ∧ (a, b) ∈ R. Hence,

(x, a) ∈ R ∧ (a, b) ∈ R ⇒ (x, b) ∈ R


⇒ x ∈ [b].

Thus,

[a] ⊆ [b]. (3.15)

By the same manner, we prove that

[b] ⊆ [a]. (3.16)

From Equations (3.15) and (3.16), we conclude

[a] = [b].

(d) Suppose that [a] ∩ [b] 6= φ , and let x ∈ [a] ∩ [b]. Then

x ∈ [a] ∩ [b] ⇒ x ∈ [a] ∧ x ∈ [b]


⇒ (x, a) ∈ R ∧ (x, b) ∈ R
⇒ (x, b) ∈ R ∧ (x, a) ∈ R
⇒ (b, x) ∈ R ∧ (x, a) ∈ R(since R is symmetric)
⇒ (b, a) ∈ R(since R is transitive)
⇒ (a, b) ∈ R(since R is symmetric)
⇒ [a] = [b](see part (c))

Definition 3.4.11 Let {Ai }i∈I be a family of nonempty subsets of A. Then {Ai }i∈I is
called partition of A iff
∈ I, Ai ∩ A j = φ ∧ Ai = A j .
1. ∀ i, j[
2. A = Ai .
i∈I

Example 3.4.12 Let A = Z and let X = Ze and Y = Zo . It is clear that X and Y are
nonempty subsets of A and X ∩Y = φ , also A = X ∪Y . Therefore, the set {X,Y } is a
partition of A.

Theorem 3.4.13 Let R be an equivalence relation on a set A and let {[a]}a∈A be the
family of all the equivalence classes of R in A. Then {[a]}a∈A is a partition of A.
Relations 75

Proof It is clear that [a] ⊆ A, ∀ a ∈ A. Since R is a reflexive relation, then (a, a) ∈ R


and a ∈ [a] (by Theorem 3.4.10 part (a)). Thus [a] 6= φ , ∀ a ∈ A.
Now, suppose that ∃ a, b ∈ A, such that [a] ∩ [b] 6= φ . Then [a] = [b] (by Theorem
3.4.10 part (d)). [
Finally, we must show that A = [a].
a∈A
Suppose
[ that x ∈ A,[
then x ∈ [x] (by Theorem[3.4.10 part (a)). Thus,
x∈ [a], that is A ⊆ [a] and it is clear that [a] ⊆ A.
a∈A a∈A a∈A
[
Thus, A = [a]. Hence, {[a]}a∈A is a partition of A.
a∈A

Theorem 3.4.14 If A is a nonempty set and {Ai }i∈I is a partition of A, then there
exists an equivalence relation R on A, such that {Ai }i∈I are the equivalence classes
of R.

Proof Let R be a relation on A defined by

R = {(x, y) ∈ A × A : ∃ Ai , such that x, y ∈ Ai }.

Below we show that R is an equivalence relation.


1. Let x ∈ A. Since {Ai }i∈I is a partition of A, then
[
A= Ai .
i∈I

So, ∃ Ai , such that x ∈ Ai . Then

x ∈ Ai ∧ x ∈ Ai ⇒ (x, x) ∈ R.

Thus R is a reflexive relation.


2. Suppose that (x, y) ∈ R. Then ∃ Ai , such that x, y ∈ Ai . That is ∃ Ai , y ∈ Ai ∧ x ∈
Ai . Hence (y, x) ∈ R. Hence R is symmetric.
3. Suppose that (x, y) ∈ R ∧ (y, z) ∈ R. Then ∃ Ai , A j , such that x, y ∈ Ai ∧ y, z ∈ A j .
Thus y ∈ Ai ∩ A j . Hence Ai ∩ A j 6= φ , and {Ai }i∈I is a partition of the set A.
Consequently Ai = A j .
So, ∃ Ai , such that x ∈ Ai ∧ z ∈ Ai and from the definition of R, we have (x, z) ∈
R. Therefore, R is a transitive relation.
Thus R is an equivalence relation.
Now, we show that every subset Ai in {Ai }i∈I is an equivalence class for R. As Ai 6= φ ,
∀ i ∈ I, then Ai has at least one element x, so [x] is an equivalence class for R.
We claim that Ai = [x]. Suppose that y ∈ [x]. Then (y, x) ∈ R, and since x ∈ Ai ,
then by definition of R, y ∈ Ai . That is

y ∈ [x] ⇒ y ∈ Ai .
76 Concise Introduction to Logic and Set Theory

Then

z ∈ Ai ∧ x ∈ Ai
⇒ (z, x) ∈ R
⇒ z ∈ [x].

Consequently,
z ∈ Ai ⇒ z ∈ [x],
that is Ai ⊆ [x]. Hence Ai = [x].

Example 3.4.15 Let A = {1, 3, 5, 7, 9}, X = {1, 3}, Y = {5, 7}, and Z = {9}. Then
by Theorem 4.2.47, there exists an equivalence relation R, such that the equivalence
classes of R form the partition {X,Y, Z}.
The relation R is
R = IA ∪ {(1, 3), (3, 1), (5, 7), (7, 5)}.
It is easy to prove the following properties:
1. The set {X,Y, Z} is a partition of the set A.
2. R is an equivalence relation on A.
The equivalence classes of R are

[1] = [3], [5] = [7], [9].

We note that

X = [1] = [3],
Y = [5] = [7],
Z = [9].

Example 3.4.16 Let A = Z, X = Ze , and Y = Zo . The set {X,Y } is a partition of A.


Consider
R = {(x, y) ∈ A × A : (x − y) is an even integer}.
The relation R is an equivalence relation on A and the equivalence classes of R in A
are
[0] and [1], where X = [0],Y = [1].

3.5 CONGRUENCE
Definition 3.5.1 Let n be a positive integer. If a and b are integers, we say that a is
congruent to b modulo n, and we write

a ≡ b (mod n) ⇔ n divides (a − b).

Thus “≡” defines a relation on Z.


For example,
21 ≡ 1 (mod 5)
Relations 77

because 5 | (21 − 1). Likewise,

35 ≡ −7 (mod 6)
19 ≡ 82 (mod 9).

On the other hand, 67 ≡ 5 (mod 11) is false, since

11 | (67 − 5).

If a ≡ b (mod n) is false, then we write

a ≡ b (mod n).

Thus 67 ≡ 5 (mod 11) and − 17 ≡ 2 (mod 4).

Theorem 3.5.2 For a fixed positive integer n, the relation of congruence modulo n
is an equivalence relation on Z.

Proof
1. As

n | 0 ⇒ n | (a − a)
⇒ a ≡ a (mod n),

then ≡ is a reflexive relation on Z.


2. As

a ≡ b (mod n) ⇔ n | (a − b)
⇔ n | −(b − a)
⇔ n | (b − a).

then b ≡ a (mod n). Thus ≡ is a symmetric relation on Z.


3. We show that ≡ is transitive. Suppose

a ≡ b (mod n) ∧ b ≡ c (mod n).

Then n | (a − b) ∧ n | (b − c).
Therefore, there exists integers r, s, such that

a − b = rn ∧ b − c = sn.

Then a − c = (r + s)n, where r + s is an integer. Thus n | (a − c), so a ≡


c (mod n). Therefore ≡ is a transitive relation on Z. As ≡ is reflexive, sym-
metric, and transitive relation on Z, then ≡ is an equivalence relation on Z.
78 Concise Introduction to Logic and Set Theory

By the preceding theorem, congruence (modulo n) divides Z into equivalence classes


for any fixed positive integer n. For example, if n = 3, then
[7] = {x ∈ Z : x ≡ 7 (mod 3)}
= {x ∈ Z : 3 | (x − 7)}
= {x ∈ Z : x − 7 = 3k, k ∈ Z}
= {x ∈ Z : x = 7 + 3k, k ∈ Z}
= {. . . , −2, 1, 4, 7, 10, 13, 16, 19, . . .}.
By the same computation, we find
[1] = {. . . , −2, 1, 4, 7, 10, 13, 16, 19, . . .}.
Thus [1] = [7]. Likewise
[0] = [3] = [6] = [9] = . . .
We see that the equivalence relation congruence (modulo 3) divides Z into exactly 3
distinct equivalence classes, namely [0], [1], and [2]. A similar result is true in general.

Theorem 3.5.3 If n is a positive integer, then congruence (modulo n) divides Z into


exactly n distinct equivalence classes, namely
[0], [1], [2], . . ., [n − 1].
In fact, if r is an integer with 0 ≤ r < n, then x ∈ [r] iff r is the remainder when x is
divided by n using the division algorithm.

Proof Let x = nq + r, 0 ≤ r < n. Then


x − r = nq, and so n | (x − r).
Thus
x ≡ r (mod n), and so x ∈ [r].
Conversely, let x ∈ [r], where 0 ≤ r < n. Then
x ≡ r (mod n) and so n | (x − r).
Let x − r = nk, k ∈ Z. Then
x = nk + r, 0 ≤ r < n.
By the uniqueness of the quotient and the remainder in the division algorithm, r must
be the remainder, when x is divided by n.

Theorem 3.5.4 Suppose that a, b, c, d, and n, are integers with n > 1. If


a ≡ b (mod n) and c ≡ d (mod n),
then
(a) a + c ≡ b + d (mod n),
(b) ac ≡ bd (mod n).
Relations 79

Proof
(a) As
a ≡ b (mod n) ⇔ a = b + sn, s ∈ Z
and

c ≡ d (mod n) ⇔ c = d + tn, t ∈ Z
⇔ a + c = b + d + (s + t)n
⇔ a + c = b + d + kn, k ∈ Z,

then a + c ≡ b + d (mod n).


(b) By hypothesis, we have

a ≡ b (mod n) ⇒ n | (a − b)

and
c ≡ d (mod n) ⇒ n | (c − d).
Then
n | (a − b)c + (c − d)b; i.e., n | ac − bd.
This means that ac ≡ bd (mod n).

Example 3.5.5 Suppose that a ≡ 2 (mod 7) and b ≡ 5 (mod 7). We will determine
the remainder, when 45a + b is divided by 7.
For this purpose, we write

45 = 7.6 + 3; i.e., 45 ≡ 3 (mod 7),

and
a ≡ 2 (mod 7).
Multiplying these congruence’s, we obtain

45a ≡ 6(mod 7).

Adding b ≡ 5 (mod 7) to the latter congruence, we get

45a + b ≡ 11 (mod 7).


Hence
45a + b ∈ [11] = [4].
80 Concise Introduction to Logic and Set Theory

Exercises
1. When is a relation R on a set A not reflexive?
2. Let A = {1, 2, 3, 4} and R = {(1, 10), (1, 3), (2, 2), (3, 1), (4, 4)}. Is R reflexive?
3. Let R, S, T , and H be relations on N, defined by
R = {(x, y) ∈ N × N : x | y},
S = {(x, y) ∈ N × N : x ≤ y},
T = {(x, y) ∈ N × N : x and y are relatively prime},
H = {(x, y) ∈ N × N : x + y = 10}.
State whether or not each of these relations is reflexive.
4. Let B = {1, 2, 3}. Consider the following relations on B:
G = {(1, 2), (3, 2), (2, 2), (2, 3)},
H = {(1, 20), (2, 3), (1, 3)},
K = {(1, 1), (2, 2), (2, 3), (3, 2), (3, 3)},
L = {(1, 2)},
P = B × B.
State whether or not each of these relations is reflexive.
5. When is a relation R on a set A not symmetric?
6. Is there a set A, in which every relation is symmetric?
7. State whether or not each relation in Exercise 3 is symmetric.
8. State whether or not each relation in Exercise 4 is symmetric.
9. State whether or not each relation in Exercise 3 is transitive.
10. State whether or not each relation in Exercise 4 is transitive.
11. State whether or not each relation in Exercise 3 is antisymmetric.
12. Let C = {i, −1, −i, 1}, where i2 = −1, and let R be a relation on C defined by

R = {(x, y) ∈ C × C : xy = ±1}.

Show that R is an equivalence relation on C. Give the partition of C associated


with R.
13. List the ordered pairs in the equivalence relation on

A = {1, 2, 3, 4, 5}

associated with the following partitions


(a) {{1, 2}, {3, 4, 5}},
(b) {{1}, {2}, {3}, {4}, {5}},
(c) {{2, 3, 4, 5}, {1}}.
Relations 81

14. Let C = {i, −1, −i, 1}, where i2 = −1, and let R be a relation on C ×C defined
by
R = {((x, y), (u, v)) ∈ (C × C) × (C × C) : xy = uv}.
Show that R is an equivalence relation, and give the partition of C × C associ-
ated with R.
15. Describe the partition for each of the following relation:
(a) R = {(x, y) ∈ R × R : x − y ∈ Z},
(b) S = {(x, y) ∈ Z × Z : x + y is even},
(c) T = {(x, y) ∈ R × R : sin x = sin y}.
16. Describe the equivalence relation on each of the following sets with the given
partition:
(a) N.{{1}, {2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11, 12, 13, 14, 15}, . . .},
(b) Z.{. . . , {−2}, {−1}, {0}, {1}, {2}, {3, 4, 5, . . .}},
(c) R.{(−∞, 0), {0}, (0, ∞)},
(d) Z.{A, B}, where A = {x ∈ Z : x < 3} and B = Z − A.
17. Let A be the set of all people and let R be a relation on A defined by

R = {(x, y) ∈ A × A : x is the brother of y}.

Is R reflexive, symmetric or transitive?


18. Let A be the set of all people and let R be a relation on A defined by

R = {(x, y) ∈ A × A : x is the mother of y}.

Is R reflexive or symmetric or transitive?


19. Let A = Z and let R be a relation on A defined by

R = {(x, y) ∈ A × A : |x − y| < 2}.

Is R reflexive, symmetric or transitive?


20. Let A = Z and let R be a relation on A defined by

R = {(x, y) ∈ A × A : x − y is even or xy > 5}.

Is R reflexive, symmetric or transitive?


21. Let A = Z and let R be a relation on A defined by

R = {(x, y) ∈ A × A : xy = 1}.

Is R reflexive? Symmetric? Transitive?


82 Concise Introduction to Logic and Set Theory

22. Let A = R and let R be a relation on A defined by

R = {(x, y) ∈ A × A : x − y ∈ Q}.

Is R reflexive, symmetric or transitive?


23. Let A = R and let T be a relation on A defined by

T = {(x, y) ∈ A × A : xy = 0}.

Is R reflexive, symmetric or transitive?


24. Determine the equivalence classes of the equivalence relation R on A:
(a) A = {1, 2, 3, 4, 5, 6}, R = {(x, y) ∈ A × A : x − y ∈ {−3, 0, 3}},
(b) A = {1, 2, 3, 4, 5, 6}, R = {(x, y) ∈ A × A : |3 − x| = |3 − y|},
(c) A = {n ∈ Z : n 6= 0}, R = {(x, y) ∈ A × A : xy > 0},
(d) A = R, R = {(x, y) ∈ A × A : x2 = y2 }.
25. Prove that if R is an equivalence relation on a set A, then

(x, y) ∈ R iff [x] = [y].

26. Let A = {1, 2, 3}. Give an example of a relation on A with the following spec-
ified properties:
(a) Reflexive and symmetric, but not transitive,
(b) Symmetric and transitive, but not reflexive,
(c) Transitive, but not reflexive or symmetric.
27. Let R and S be relations on a set A. State whether each of the following state-
ments is true or false:
(a) If R is symmetric, then R−1 is symmetric.
(b) If R is transitive and S is transitive, then R ∪ S is transitive.
(c) If R is reflexive and S is reflexive, then R ∩ S is reflexive.
28. What type of relation is R if
(a) R ∩ R−1 = φ ?
(b) R = R−1 ?
29. Write all the equivalence relations on the set

A = {0, 1, 2}.

30. Is φ an equivalence relation?


31. Let R and S be equivalence relations on a set A. Prove that S ◦ R is an equiva-
lence relation on A iff S ◦ R = R ◦ S.
Relations 83

32. Let R be a relation on R × R defined by

R = {(a, b), (c, d)) : b − a = d − c}.

Prove that R is an equivalence relation on R × R.


33. Let S be an equivalence relation on a set X and T be an equivalence relation
on a set Y . Define the relation R on X × Y by

(x, y)R(z, w) ⇔ (x, z) ∈ S ∧ (y, w) ∈ T.

Prove that R is an equivalence relation on X × Y .


34. Let R be a reflexive and transitive relation on a set A. Let ∼ be a relation on A
defined by
a ∼ b iff aRb ∧ bRa.
Prove that ∼ is an equivalence relation on A.
35. Let R and S be relations on a set A. State whether each of the following state-
ments is true or false:
(a) If R and S are antisymmetric, then R ∪ S is antisymmetric.
(b) If R and S are antisymmetric, then
R ∩ S is antisymmetric.
(c) If R is antisymmetric, then R−1 is antisymmetric.
36. Calculate the equivalence classes for the relation of
(a) congruence modulo 1,
(b) congruence modulo 5,
(c) congruence modulo 7,
(d) congruence modulo 8.
37. Prove that if
(a) x ≡ y (modulo n), then [x] = [y],
(b) [x] = [y], then x ≡ y (mod n),
(c) [x] ∩ [y] 6= φ , then [x] = [y].
38. Let R and S be relations on N defined by
R = {(x, y) ∈ N × N : 2 | (x + y)},
S = {(x, y) ∈ N × N : 3 | (x + y)}.
Prove that R is an equivalence relation but S is not.

3.6 PARTIAL AND TOTAL ORDERED RELATIONS


Definition 3.6.1 Let R be a relation on a set A. Then R is called a partial order (or
partial ordering) relation for A if R is reflexive, antisymmetric, and transitive. The set
A is called a partially ordered set, or poset.
84 Concise Introduction to Logic and Set Theory

Example 3.6.2 Let R be a relation on Z defined by

R = {(x, y) ∈ Z × Z : x ≤ y},

R is a partial order relation on Z. Why ?

Example 3.6.3 Let S be a relation on Z defined by

S = {(x, y) ∈ Z × Z : 3 | (x − y),

S is not a partial order relation on Z, because S is not antisymmetric. For example,

(8, 2) ∈ S ∧ (2, 8) ∈ S, but 2 6= 8.

Example 3.6.4 Let X be a nonempty set and R be a relation on P(X) defined by

R = {(A, B) ∈ P(X) × P(X) : A ⊆ B},

R is a partial order relation on P(X).

Remark 3.6.5 Let < be the usual “strict” inequality on the natural numbers (or, in-
tegers, or rational numbers, or real numbers). Then it is not a partial ordering because
it is not reflexive.

Example 3.6.6 Let S be a relation on R defined by

S = {(x, y) ∈ R × R : x < y}.

Then this relation S is not a partial ordering on R.

Theorem 3.6.7 If R is a partial order relation on a set A, then R−1 is a partial order
relation on A.

Proof
1. Since R is reflexive; i.e., (x, x) ∈ R, ∀ x ∈ A, then

∀ x ∈ A, (x, x) ∈ R ⇒ (x, x) ∈ R−1 .

Thus R−1 is reflexive.


2. Since R is antisymmetric; i.e.,

∀ x, y ∈ A, (x, y) ∈ R ∧ (y, x) ∈ R ⇒ x = y,

then
∀ x, y ∈ A, (y, x) ∈ R−1 ∧ (x, y) ∈ R−1 ⇒ x = y.
Thus R−1 is antisymmetric.
Relations 85

3. Since R is transitive; i.e.,

∀ x, y, z ∈ A, (x, y) ∈ R ∧ (y, z) ∈ R ⇒ (x, z) ∈ R,

then
∀ x, y, z ∈ A, (y, x) ∈ R−1 ∧ (z, y) ∈ R−1 ⇒ (z, x) ∈ R−1
Thus R−1 is transitive.
As R−1 is reflexive, antisymmetric, and transitive, then R−1 is a partial order
relation on A.

Theorem 3.6.8 Let R be a relation on a set A. Then R is a partial order relation on A


iff R ∩ R−1 = IA ∧ R ◦ R = R.

Proof Suppose that R ∩ R−1 = IA ∧ R ◦ R = R. We prove that R is a partial order


relation. First we see that
∀ a ∈ A, (a, a) ∈ IA ,
by definition of IA . Then

∀ a ∈ A, (a, a) ∈ R ∩ R−1 .

That is, ∀ a ∈ A, (a, a) ∈ R.


Thus R is reflexive relation.
Now, suppose (a, b) ∈ R ∧ (b, a) ∈ R, but (a, b) ∈ R ⇒ (b, a) ∈ R−1 .
Then
(b, a) ∈ R ∩ R−1 = IA ; i.e., (b, a) ∈ IA .
Hence a = b. This implies that R is symmetric.
Finally, suppose (a, b) ∈ R ∧ (b, c) ∈ R. Since R ◦ R = R, then

(a, b) ∈ R ◦ R ∧ (b, c) ∈ R ◦ R ⇒ ∃ x ∈ A

such that
(a, x) ∈ R ∧ (x, b) ∈ R,
and ∃ y ∈ A such that
(b, y) ∈ R ∧ (y, c) ∈ R.
Then

(a, b) ∈ R ∧ (b, y) ∈ R ⇒ (a, y) ∈ R ◦ R


⇒ (a, y) ∈ R,

and

(a, y) ∈ R ∧ (y, c) ∈ R ⇒ (a, c) ∈ R ◦ R


⇒ (a, c) ∈ R.
86 Concise Introduction to Logic and Set Theory

That is,
(a, b) ∈ R ∧ (b, c) ∈ R ⇒ (a, c) ∈ R.
Then R is transitive.
As R is reflexive, antisymmetric, and transitive, then R is a partial order relation
on A.
Necessity (see Exercise 1).

Definition 3.6.9 Let A be a partially ordered set by the partial order relation R and
let (a, b) ∈ A, such that aRb. We can express that by one of the following diagrams,
called Hasse diagram.

Example 3.6.10 Let A = {1, 3, 5, 12} and R = {(x, y) ∈ A × A : x ≤ y}. It is clear that
R is a partial order relation on A. The Hasse diagram of the partial order relation R is

Example 3.6.11 Let A = {2, 6, 20, 15} and let R = {(x, y) ∈ A × A : x | y}. Then R is
a partial order relation on A. The Hasse diagram of R is

Example 3.6.12 Let A = {1, 2, 3}. Let R be a relation on P(A) defined by

R = {A, B) ∈ P(A) × P(A) : A ⊆ B}.

R is a partial order relation on P(A). A Hasse diagram for P(A) is


(1, 2, 3)

(2, 3)
(1, 2) (1, 3)

(3)
(1)
(2)


Relations 87

Definition 3.6.13 Let A be a partially ordered set by the relation R. The element
b ∈ A is called the least element of A if and only if

bRx, ∀ x ∈ A.

Example 3.6.14 Let A = {3, 6, 9, 12, 15} and let R, S, and T , be relations on A de-
fined by

R = {(x, y) ∈ A × A : x ≤ y},
S = {(x, y) ∈ A × A : x ≥ y},
T = {(x, y) ∈ A × A : x | y}.

It is clear that R, S, and T are partial order relations.


The element 3 is the least element for A associated to R, since

3 ≤ x, ∀ x ∈ A.

The element 15 is the least element for A associated to S, since

15 ≥ x, ∀ x ∈ A.

The element 3 is the least element for A associated to T , since

3 | x, ∀ x ∈ A.

Example 3.6.15 Let X be any set and let R be a relation on P(X) defined by

R = {(A, B) ∈ P(X) × P(X) : A ⊆ B}.

It is clear that R is a partial order relation on P(X).


The empty set φ is the least element for P(X) associated to R, since

φ ⊆ A, ∀ A ∈ P(X).
Theorem 3.6.16 Let R be a partial order relation on a set A. If A has a least element,
then it is unique.

Proof Suppose R has two least elements b and c. Then

bRc ∧ cRb,

by definition of least element. Since R is antisymmetric, then

bRc ∧ cRb ⇒ b = c.

Thus the least element, if exist, is unique.

Definition 3.6.17 Let R be a partial order relation on a set A. The element a ∈ A is


called greatest element of A associated to R if and only if

xRa, ∀ x ∈ A.
88 Concise Introduction to Logic and Set Theory

Example 3.6.18 Let A = {3, 5, 6, 9, 10, 12, 13}, and let G, H, and K be relations on
A defined by

G = {(x, y) ∈ A × A : x ≤ y},
H = {(x, y) ∈ A × A : x ≥ y},
K = {(x, y) ∈ A × A : x | y}.

The relations G, H, and K are partial order relations on A. The number 13 is the
greatest element for A associated to G, since

x ≤ 13, ∀ x ∈ A.

The number 3 is the greatest element for A associated to H, since

x ≥ 3, ∀ x ∈ A.

But there does not exist the greatest element associated to K, because there does not
exist an element a ∈ A that divides by each element of A.

Example 3.6.19 Let X be an arbitrary set, and let R be a relation on P(X) defined
by
R = {(A, B) ∈ P(X) × P(X) : A ⊆ B}.
R is a partial order relation on P(X). Since A ⊆ X, ∀ A ∈ P(X), then X is the greatest
element for P(X) associated to R.

Theorem 3.6.20 Let R be a partial order relation on a set A. If A has a greatest


element, then it is unique.

Proof Suppose that A has two greatest elements a and b. Then aRb ∧ bRa, by defi-
nition of the greatest element.
Hence
aRb ∧ bRa ⇒ a = b,
since R is antisymmetric.
Thus the greatest element, if exist, is unique.

Definition 3.6.21 Let R be a partial order relation on a set A. The element m ∈ A is


called maximal element of A associated to R if there does not exist x ∈ A, such that

mRx and m 6= x.

Example 3.6.22 Let A = {3, 6, 7, 12, 13, 15, 18} and let R, S, and T be relations on A
defined by

R = {(x, y) ∈ A × A : x ≥ y},
S = {(x, y) ∈ A × A : x ≤ y},
T = {(x, y) ∈ A × A : x | y}.
Relations 89

The relations R, S, and T are partial order relations on A. The number 3 is maximal
element for A associated to R, since there does not exist x ∈ A such that
3 ≥ x and 3 6= x.
The number 18 is the maximal element for A associated to S, since there does not
exist x ∈ A, such that
18 ≤ x and 18 6= x.
The number 7 is a maximal element for A associated to T , since there does not exist
x ∈ A, such that
7 | x and 7 6= x.
Also 12, 13, 15, and 18 are maximal elements associated to T .

Example 3.6.23 Let X = {1, 3, 5, 6, 7} and E = {{1, 3}, {5, 7}, {1, 3, 5}, {1, 3, 7},
X}. Let G and H be relations on E defined by
G = {(A, B) ∈ E × E : A ⊆ B},
H = {(A, B) ∈ E × E : A ⊇ B}.
The relations G and H are partial order relations on E. The set X is the maximal
element for E associated to G. The set {5, 7} is a maximal element for E associated
to H, since there does not exist B ∈ E, such that
{5, 7} ⊇ B and {5, 7} 6= B.
Definition 3.6.24 Let R be a partial order relation on a set A. The element n ∈ A is
called minimal element of A associated to R if there does not exist an element x ∈ A,
such that xRn and x 6= n.

Example 3.6.25 Let A = {3, 5, 9} and let R, S, and T be relations on A defined by


R = {(x, y) ∈ A × A : x ≥ y},
S = {(x, y) ∈ A × A : x ≤ y},
T = {(x, y) ∈ A × A : x | y}.
R, S, and T are partial order relations on A. The number 3 is the minimal element of
A associated to R. The number 9 is the minimal element of A associated to S. Both
the numbers 5 and 7 are minimal elements for A associated to T .

Example 3.6.26 Let


X = {a, b, c, d},
E = {{a, b}, {b, d}, {a, b, c}, X},
and let
R = {(A, B) ∈ E × E : A ⊆ B},
S = {(A, B) ∈ E × E : A ⊇ B}.
90 Concise Introduction to Logic and Set Theory

R and S are partial order relations on E. Both {a, b} and {b, d} are minimal elements
of E associated to R. X is the minimal element of E associated to S.

Definition 3.6.27 Let A be a partially ordered set with respect to the relation ≤, and
let B be a subset of A. An element a ∈ A is called upper bound of B in A if

∀ x ∈ B, a ≥ x(xRa, ∀ x ∈ B).

In this case, we say that B is bounded above. An element a ∈ A is called lower bound
of B in A if
∀ x ∈ B, a ≤ x(aRx, ∀ x ∈ B).
In this case, we say that B is bounded below.

Example 3.6.28 Let R be a relation on R defined by

R = {(x, y) ∈ R × R : x ≤ y},

and let B = [2, 3]. The number 5 ∈ R is an upper bound of B. The number 1 ∈ R is a
lower bound of B.

Example 3.6.29 Let A = {5, 3, 10, 12, 30} and let R be a relation on A defined by

R = {(x, y) ∈ A × A : x | y},

and let B = {5, 10}. The number 30 ∈ A is an upper bound of B. The number 5 ∈ A
is a lower bound of B.

Definition 3.6.30 Let R be a partial order relation on a set A and let B be a subset of
A. The element x ∈ A is called a least upper bound (or supremum) of B if
x is an upper bound of B and
xRy, for every upper bound y of B.
We write Sup(B) (or LUB(B)) to denote the supremum of B.

Definition 3.6.31 Let R be a partial order relation on a set A and let B be a subset of
A. The element x ∈ A is called a greatest lower bound (or infimum) of B if
x is a lower bound of B, and
yRx, for every lower bound y of B.
We write Inf(B) (or GLB(B)) to denote the infimum of B.

Example 3.6.32 Let T be a relation on R defined by

T = {(x, y) ∈ R × R : x ≤ y},

and let B = [−1, 5]. It is clear that T is a partial order relation on R. Then Sup(B) = 5
and Inf(B) = −1.
Relations 91

Remark 3.6.33 Let ≤ be a partial order relation on a set A, and let B be a subset of
A. Then the following assertion hold.
1. If Sup(B) exists, it is unique, and if Inf(B) exists, it is unique.
2. b is an upper bound of B associated to the relation ≤ iff b is a lower bound of
B associated to the relation ≥.
3. b = Sup(B) associated to ≤ iff b = Inf(B) associated to ≥.

Definition 3.6.34 Let R be a partial order relation on a set A. A is said to be a lattice


if and only if for any elements (a, b) ∈ A, In f {a, b}, and Sup{a, b} exist.

Definition 3.6.35 Let ≤ be a partial order relation on a set A. If x, y ∈ A, we say that


x, y are comparable if
x ≤ y or y ≤ x.
Otherwise x, y are incomparable.

Example 3.6.36 Let R be a relation on the set Z defined by

R = {(x, y) ∈ Z × Z : x ≤ y}.

It is clear that R is a partial order relation on Z. Any pair of numbers x, y ∈ Z are


comparable because either
x ≤ y or y ≤ x.

Example 3.6.37 Let R be a relation on A = Z+ defined by

R = {(x, y) ∈ A × A : x | y}.

R is a partial order set on A. It is not necessary that any pair x, y ∈ A are comparable.
For example 3, 5 ∈ A, but 3 ∤ 5 and 5 ∤ 3.

Example 3.6.38 Let X = {1, 2, 3} and let R be a relation on P(X) defined by

R = {(A, B) ∈ P(X) × P(X) : A ⊆ B}.

R is a partial order relation on P(X). It is not necessary that any pair of subsets A, B
are comparable. For example, if A = {1}, B = {5}, we see that A 6⊆ B, B 6⊆ A.

Definition 3.6.39 Let R be a partial order relation on a set A, and let B be a subset
of A.B is called a totally ordered subset (or B is a chain in A) if any pair of elements
(a, b) ∈ B are comparable, i.e., aRb or bRa.
If any pair of elements (a, b) ∈ A are comparable, A is called totally ordered set.

Example 3.6.40 The set Z is a totally ordered set with the relation ≤.
92 Concise Introduction to Logic and Set Theory

Example 3.6.41 Let

A = {1, 2, 3, 4, 5, 6, 7, 8, 9},
B = {2, 4, 8},

and
R = {(x, y) ∈ A × A : y | x}.
The set A is not totally ordered set, but B is a totally ordered set.

Example 3.6.42 Let A, B be totally ordered sets with the relations R and S, respec-
tively. Then the Cartesian product A × B can be totally ordered by the relation T as
follows:
(a, c)T (b, d) if and only if aRb, a, b ∈ A,
or
a = b, cSd, c, d ∈ B.
This order is called lexicographical order of A × B. For example, let A = {1, 3, 5},
B = {2, 4} and let

R = {(x, y) ∈ A × A : x ≤ y},
S = {(x, y) ∈ B × B : x | y}.

It is clear that R and S are total order relations on A and on B, respectively. Suppose
T is the lexicographical order of

A × B = {(1, 2), (1, 4), (3, 4), (3, 2), (5, 2), (5, 4)}.

See that (1, 2)T (1, 4), since 1 = 1 and 2 | 4. Also (1, 2)T (3, 2), since 1 < 3. The fol-
lowing graph explains (A × B, R × S):

Theorem 3.6.43 Let R be a total order relation on a set A. Then A has at most one
minimal element, which is the least element of A. Also A has at most one maximal
element, which is the greatest element of A.

Proof Assume that a1 , a2 are maximal elements with a1 6= a2 . Then there does not
exist x ∈ A, such that
xRa1 and x 6= a1 .
Relations 93

Also there does not exist x ∈ A, such that

xRa2 and x 6= a2 .

As A is the totally ordered set, then a1 Ra2 or a2 Ra1 . This contradicts that a1 6= a2 .
Thus a1 = a2 .
Now, we prove that a1 is the least element of A, that is a1 Rx, ∀ x ∈ A.
Suppose there exists x ∈ A, such that a1 R6 x. Then xRa1 , since A is the totally ordered
set. But this contradicts that a1 is the least element, thus a1 is the least element of A.
The proof of the second part is left as Exercise 2.

Definition 3.6.44 Let R be a partial order relation on a set A. Set A is said to be


well-ordered set if and only if arbitrary nonempty subset of A has a least element.

Theorem 3.6.45 Every well-ordered set is totally ordered.

Proof Let A be a well-ordered set and x, y ∈ A. Let

B = {x, y} ⊆ A.

Then B has a least element x or y. So, for any two elements x, y ∈ A, we have that x, y
are comparable. Thus A is totally ordered.

Example 3.6.46 Let A = {2, 3, 4, 5, 6} and R = {(x, y) ∈ A × A : x ≤ y}. Thus the set
A is well-ordered.

Example 3.6.47 Let A = N and R = {(x, y) ∈ N× N : x ≤ y}. Thus N is well-ordered.

Example 3.6.48 The set of integers Z, with the total order relation ≤, is not well-
ordered, since the subset

A = {. . . , −2, −1, 0} ⊂ Z

has not a least element.

Theorem 3.6.49 If A is a well-ordered set, then ∀ a ∈ A (except the greatest element)


has an immediate successor.

Proof Let
T = {y ∈ A : y > a}.
T is not empty subset of A, why?
Then T has a least element, say b. Thus b is the immediate successor of a.

Definition 3.6.50 Let R be a partial order relation on a set A, and let B ⊆ A. B is


called a section of A if

∀ x ∈ A, (y ∈ B, xRy) ⇒ x ∈ B.
94 Concise Introduction to Logic and Set Theory

Theorem 3.6.51 (Principal of transfinite induction) Let A be a well-ordered set and


P(x) is an open sentence on A.
Then
[P(y) is true ∀ y < x ⇒ P(x) is true] ⇒ P(x) is true ∀ x ∈ A.

Proof Suppose P(x) is not true for all x ∈ A. We define the set

T = {y ∈ A : P(x) is false}.

As T is a subset of A, then T has a least element, say m. Since P(x) is true ∀ x < m,
then P(m) is true. But P(m) is false, since m is the least element of T such that P(m)
is false. Thus P(x) is true ∀ x ∈ A.

Exercises
1. Complete the proof of Theorem 3.6.8.
2. Complete the proof of Theorem 3.6.43.
3. Let A = {0, 1, 2}. Write all the partial order relations, possible, on A. Which of
those relations are total order relations?
4. Is φ a partial order relation?
5. Let S be a nonempty \
family of partial order relations on a set A. Prove that
δ is a partial order relation on A.
δ ∈S

6. Let S be a partial order relation on a set X and A ⊆ X. Prove that


(a) S ∩ (A × A) is a partial order relation on A,
(b) if S is a total order relation on X, then S ∩ (A × A) is a total order relation
on A.
7. Let R be a partial order relation on a set X. Prove that R − IX is a strict order
relation on X.
8. Let R be a strict order relation on a set X. Prove that R ∪ IX is a partial order
relation on X.
9. Give an example of a set X with a set T of partial order relations on X, such
that [
δ
δ ∈T

is not a partial order relation.


Relations 95

10. Draw the Hasse diagram for the partial ordered set (X, S), where

X = {a, b, c, d, e},
S = {(a, d), (a, c), (a, b), (a, e), (b, e), (c, e), (d, e)}.

11. Let (X, S) be a partial ordered set, where

X = {a, b, c, d},
S = {(c, d)} ∪ IX .

Determine the maximal elements, minimal elements, the least element, and the
greatest element.
12. Prove that every finite set is a well-ordered set.
13. Prove that any subset of a well-ordered set is a well-ordered set.
14. Let {Si }i∈I be a nonempty family of equivalence relations on X, such that

({Si }i∈I , ⊆)
[
is a total ordered set. Prove that Si is an equivalence relation on X.
i∈I

15. Let (A, R), (B, S) be partially ordered sets, and A × B an ordered set by the
lexicographical relation T . Prove that if (a, b) is a greatest element of A × B,
then a is a greatest element of A.
16. Show that if R is an antisymmetric relation, then x 6= y and imply yR6 x.
17. Let R be a relation on N given by

R = {(a, b) ∈ N × N : b = 2k a for some integer k ≥ 0}.

Prove that R is a partial order relation on N.


18. Let A = R × R and let S be a relation on A given by

S = {((a, b), (c, d)) ∈ A × A : a ≤ c ∧ b ≤ d}.

Prove that S is a partial order relation on A.


19. Let T be a relation on C given by

T = {(a + bi, c + di) : a2 + b2 ≤ c2 + d 2}.

Is T a partial order relation on C? Justify your answer.


20. Draw the Hasse diagram for the poset P(X) with respect to the relation set
inclusion, where
A = {a, b, c, d}.
96 Concise Introduction to Logic and Set Theory

21. Let X be a set. Consider the partial order relation ⊆ on P(X). Let C and D
be subsets of X. Prove that the least upper bound of {C, D} is C ∪ D and the
greatest lower bound of {C, D} is C ∩ D.
22. Let R be a relation on N given by

R = {(m, n) ∈ N × N : m < 2n}.

Is R a total order relation on N?


23. Let A be a family of subsets of B. Prove that the least upper bound of A is
[
A,
A
A∈A

and the greatest lower bound of A is


\
A.
A
A∈A
Functions
4
The word “function” was first used by G.W. Leibnitz in 1694. J. Bernoulli defined a
function as “any expression including variables and constants” in 1698. The familiar
notation f (x) was first used by L. Euler in 1734. We shall present in this chapter the
basic properties of functions and induced set functions.

4.1 FUNCTIONS
4.1.1 DOMAIN AND RANGE
Definition 4.1.1 Let A and B be sets and let f be a relation from A to B. f is said to
be a function if the following conditions hold:
1. ∀ x ∈ A, ∃ y ∈ B, such that (x, y) ∈ f .
2. If (x, y) ∈ f and (x, z) ∈ f , then y = z.

By the above definition, a relation f is a function from A to B, if it is wholly defined


on A, and it has a unique image in B for an arbitrarily fixed element of A.

Example 4.1.2 Let

A = {1, 3, 5, 7},
B = {2, 4, 6},

and let f be a relation defined by

f = {(1, 2), (3, 4), (5, 2), (7, 6)}.

Then f is a function from A to B.

Example 4.1.3 Let

A = {1, 3, 5, 9},
B = {3, 7, 11, 16, 19},

and let f be a relation from A to B defined by

f = {(x, y) : y = 2x + 1}.

It is clear that f is a function from A to B.

Example 4.1.4 Let

A = {1, 3, 5, 9},
B = {3, 7, 11, 16},

DOI: 10.1201/9780429022838-4 97
98 Concise Introduction to Logic and Set Theory

and let
f = {(x, y) : y = 2x + 1}.
Then f is not a function, since 9 ∈ A, but there does not exist y ∈ B, such that (9, y) ∈
f.
A function f from A to B is also called a mapping from A to B.
We write
f : A → B,
and this is read “ f maps A to B” or “ f is a function from A to B”. The set A is called
the domain of f , denoted by Dom( f ). The set B is called the codomain of f , denoted
by codom( f ).

Definition 4.1.5 Let f : A → B. If (x, y) ∈ f , then we write y = f (x), and we say that
y is the value of f at x, or the image of x under f . In such a case, x is said to be the
pre mage of y under f .

Remark 4.1.6 One can use Venn diagram to clarify a function from A to B.

Example 4.1.7 Let

A = {a, b, c},
B = {2, 1, −1},

We define the function f : A → B by

f = {(a, 2), (b, 2), (c, 1)}.

The following diagram represents the function f :


A f B

a –1

b 1

c 2

This diagram indeed indicates that the mapping f is wholly defined on A, and each
element of A is uniquely assigned to be a single corresponding element of B, and
hence, it is a function.

Definition 4.1.8 For every functions f : A → B, we define the range Rng( f ) of f by


the relation

Rng( f ) = {y ∈ B : ∃ x ∈ A, such that (x, y) ∈ f }


= {y ∈ B : ∃ x ∈ A, such that y = f (x)}.
Functions 99

By definition, the range Rng( f ) is the set of all images of A under f . So, sometimes,
Rng( f ) is also denoted by f (A).

Remark 4.1.9 If f : A → B is a function, then

Dom( f ) = A and Rng( f ) ⊆ B.

Example 4.1.10 Let A = B = R and let

f = {(x, y) : y = x2 }.

Then f is a function from A to B with

Rng( f ) = {y ∈ R : y ≥ 0}.

Example 4.1.11 Let


1 1
A = {0, , , 1, 2, 3},
4 2
B = R,

and let f be a relation from A to B defined by


(
x2 , if x is integer,
f = {(x, y) ∈ A × B : y =
1/2, if x is not integer.

Then f is a function from A to B and


1
Rng( f ) = {0, 1, 4, 9, },
2
Dom( f ) = A.

4.1.2 GRAPH OF A FUNCTION


In this section, we study the graph of a function f : A → B, as a subset of the Cartesian
product set A × B of A and B.

Definition 4.1.12 Let f : A → B be a function from A to B. The set

G = {(x, y) ∈ A × B : y = f (x)}

is called the graph of the function f .

Remark 4.1.13 If f : A → B is a function having its graph G, then


G ⊆ A × B, by the very definition, and
G = f , by regarding f as a relation.
100 Concise Introduction to Logic and Set Theory

Example 4.1.14 Let f : R → R be a function defined by

f (x) = x2 .

Then,

G = {(x, y) ∈ R × R : y = x2 }
1 1 1 1
= {(0, 0), (1, 1), (−1, 1), ( , ), (− , ), . . . }.
2 4 2 4
Example 4.1.15 Let

A = {1, 3, 4, 5},
B = {3, 7, 9, 11, 13, 15},

and let f : A → B be a function defined by

f (x) = 2x + 1.

The graph G of f is

G = {(x, y) ∈ A × B : y = 2x + 1}
= {(1, 3), (3, 7), (4, 9), (5, 11)}.

Notion 4.1.16 Let A and B be sets. The set of all functions from A to B is denoted
by
BA .

Theorem 4.1.17 If A is a set containing m-many elements and B is a set containing


n-many elements, then BA has nm -many elements.

Proof Suppose

A = {x1 , x2 , . . . , xm } and
B = {y1 , y2 , . . . , yn }.

Any element of A is related to one element of B in n ways, that is

x1 is related to y1
or to y2
:
:
:
or to yn ,
Functions 101

x is related to y1
or to y2
:
:
or to yn .

So, every element of {x1 , x2 , . . . , xm } has n-different ways to be related to one element
of {y1 , y2 , . . . , yn }. Thus the number of the ways, making the m-many elements of A
related to n-many elements of B, is

n · n · n . . .n(m times) = nm .

4.2 ONE-TO-ONE FUNCTIONS AND ONTO FUNCTIONS


In this section, we study certain types of functions, categorized by ways of assign-
ments.

Definition 4.2.1 Let f : A → B be a function. We say that

“ f is a function from A onto B”or “ f maps A onto B”,

or “ f is an onto function,”
if
Rng( f ) = B.
In other words, “ f is onto function” if and only if

∀ y ∈ B, ∃x ∈ A, such that y = f (x).

An onto function is also called a surjection.

Example 4.2.2 Let A = B = R and let

f = {(x, y) ∈ A × B : y = 5x + 1}.

Then, the function f is onto. Indeed, for all y ∈ B, there exists


y−1
x= , where x ∈ A,
5
such that
y−1
f (x) = 5x + 1 = 5. + 1 = y.
5
Thus ∀ y ∈ B, ∃ x ∈ A, such that f (x) = y.
102 Concise Introduction to Logic and Set Theory

Example 4.2.3 Let A = {3, 5, 7, 9, 11}, B = {4, 6, 8, 10}, and

f = {(3, 4), (5, 6), (7, 8), (9, 10), (11, 4)}.

Since Rng( f ) = {4, 6, 8, 10}, then f is onto function.

Example 4.2.4 Let A = {x ∈ R : x ≥ 0}, B = R, and

f = {(x, y) : y = x2 + 1}.

Since Rng( f ) = {y ∈ B : y ≥ 1} 6= B, then f is not onto function.

Definition 4.2.5 Let f : A → B be a function. Then f is called a one-to-one function,


if
∀ a, a′ ∈ A, (a 6= a′ ⇒ f (a) 6= f (a′ )).
A one-to-one function is also called an injection.

Example 4.2.6 Let A = {3, 5, 8}, B = {1, 2, 4, 6}, and let f , g be functions from A to
B defined by

f = {(3, 1), (5, 4), (8, 2)},


g = {(3, 2), (5, 2), (8, 4)}.

Then f is one-to-one. Meanwhile, g is not one-to-one, since

3 6= 5, but g(3) = g(5) = 2.

Example 4.2.7 Let A = {x ∈ R : −2 ≤ x ≤ 5}, B = R, and let f , g be functions from


A to B defined by

f = {(x, y) ∈ A × B : y = x3 },
g = {(x, y) ∈ A × B : y = 3x2 + 1}.

The function f is one-to-one, since

x31 = x32 ⇒ x1 = x2 ,

that is, f (x1 ) = f (x2 ) ⇒ x1 = x2 , which is equivalent to

x1 6= x2 ⇒ f (x1 ) 6= f (x2 ).

However, the function g is not one-to-one, since

−2 = x1 6= x2 = 2; however , 13 = f (x1 ) = f (x2 ) = 13.


Functions 103

Example 4.2.8 Let f : R → R be a function defined by


1
f (x) = .
x2 + 1
Is f one-to-one?
Assume that f (x1 ) = f (x2 ). Then

1 1
= .
x21 + 1 x22 + 1

Therefore, x21 + 1 = x22 + 1. So


x21 = x22 .
It does not follow from this that x1 = x2 . For example

f (2) = f (−2) = 5,

Therefore, f is not one-to-one.

Definition 4.2.9 A function f : A → B, which is both one-to-one and onto is called


a bijection, or an one–one correspondence.

Example 4.2.10 Let

A = {1, 3, 5, 7, . . . } = {2n + 1|n is an integer},


B = {2, 4, 6, 8 . . . } = {2n|n is an integer},

and let

f = {(x, y) ∈ A × B : y = 2x},
g = {(x, y) ∈ A × B : y = x + 1}.

The function f : A → B is not a bijection, because it is not onto, meanwhile, the


function g : A → B is a bijection, since it is both one-to-one and onto.

Example 4.2.11 Let A = B = R, and let

f = {(x, y) ∈ R × R : y = 2x3 − 7}.

Then f is a bijection from A to B.

Definition 4.2.12 Let f : A → B and g : C → D be functions. The two functions f


and g are equal, denoted by
f = g,
104 Concise Introduction to Logic and Set Theory

if
1. A = C,
2. B = D,
3. f (x) = g(x), ∀ x ∈ A.

Example 4.2.13 Let f : R → R be a function defined by

f (x) = |x|,

and let g : R → R be a function defined by



g(x) = x2 .

The two functions are equal.

Example 4.2.14 Let f : R → R be a function defined by

f (x) = x2 ,

and let g : C → C be a function defined by

g(x) = x2 .

The functions are not equal, since Dom( f ) 6= Dom(g).

Definition 4.2.15 The function f : A → A is called the identity function, if

f (x) = x, ∀ x ∈ A.

Example 4.2.16 Let A = {1, 2, 3}, and let

f = {(x, y) ∈ A × A : x = y}
= {(1, 1), (2, 2), (3, 3)}.

Then f : A → A is the identity function.

Remark 4.2.17 The identity function is one-to-one and onto, and hence, it is a bi-
jection.

Definition 4.2.18 The function f : A → B is called a constant function, if there exists


a fixed element c ∈ B, such that

f (x) = c, ∀ x ∈ A.

Example 4.2.19 Let f : R → R be defined by

f (x) = 3, ∀ x ∈ R.

Then f is a constant function.


Functions 105

Remark 4.2.20 If f : A → B is a constant function. Then the following assertions


are true:
1. If A contains more than one element, then f is not one-to-one.
2. If B contains more than one element, then f is not onto.

Definition 4.2.21 Let A be a nonempty subset of B. Then the function


f :A→B
is called an inclusion function (or, an embedding), if
f (x) = x, ∀ x ∈ A.
Example 4.2.22 Let A = N, B = Z, and let
f = {(x, y) ∈ N × Z : y = x}.
Since N ⊆ Z and f (x) = x, ∀ x ∈ N, it follows that f : N → Z is an inclusion function.

Example 4.2.23 Let A = {x ∈ R : −2 ≤ x ≤ 2}, B = R, and let


f = {(x, y) ∈ A × B : y = x}.
Since A ⊂ R and f (x) = x, then f : A → B is an inclusion function.

Remark 4.2.24 Let f : A → B be an inclusion function. Then the following asser-


tions are true:
1. If A = B, then f = IA .
2. The function f is one-to-one.
3. If A ⊂ B, then f is not onto.

Definition 4.2.25 Let B be a subset of A and C = {0, 1}, and let f be the relation
from A to C defined by (
0 if x ∈ B,
f (x) =
1 if x ∈ A − B.
The function f : A → C is called the characteristic function of B in A.

By definition, characteristic functions are onto {0, 1}, if and only if B is a non
empty proper subset of A. It is not hard to check that a characteristic function of a
non empty subset B in A is not onto {0, 1}, if and only if B = A.

Definition 4.2.26 Let f : A → B be a function, and let C be a subset of A. Then the


function,
g : C → B,
which is defined by g(x) = f (x), ∀ x ∈ C, is called the restriction of f to C. We denote
this restriction g by
f |C .
106 Concise Introduction to Logic and Set Theory

Example 4.2.27 Let f be a function on R defined by

f = {(x, y) ∈ R × R : y = f (x) = x2 },

and let g be a function from N to R defined by

g = {(x, y) ∈ N × R : y = g(x) = x2 }.

Since N ⊂ R and f (x) = g(x), ∀ x ∈ N, then g : N → R is the restriction of f to N.

One can check that if a function is one-to-one, then its restrictions are one-to-one,
however, even though a function is onto, the corresponding restrictions are not onto,
in general. By definitions, every inclusion function is understood to be a restriction.

Definition 4.2.28 Let f : A → B be a function, and let A ⊆ D. Then the function,

g : D → B,

is called an extension of f from A to D, if

g(x) = f (x), ∀ x ∈ A,

that is g|A = f .

Example 4.2.29 In Example 4.2.27, the function

f :R→R

is an extension of the function


g : N → R.

It can be verified that, even though f is onto (or, one-to-one), its extensions are
not onto (respectively, one-to-one), in general. That is, the one-to-one-ness, and the
onto-ness of functions do not affect those of extensions in general.

Definition 4.2.30 A function f : A → B is called a numerical function, if B is a set


of numbers.

Majority of the exercises and examples above are numerical functions.

Definition 4.2.31 Let A = B = R, and let

f = {(x, y) ∈ R × R : y = |x|},

where (
x if x ≥ 0,
|x| =
−x if x < 0.
This function is called the absolute value function.
Functions 107

By definition, the absolute value function is neither one-to-one nor onto on R.

Definition 4.2.32 Let A be an arbitrary set. A function,

f : N → A,

is called a sequence in A. By denoting the images of f by

{ fn } or f1 , f2 , . . . , where fn = f (n) for all n ∈ N,

one can obtain a sequence in A.

Remark 4.2.33 If A = R, the sequence is called sequence of real numbers.

Example 4.2.34 21n , {(−1)n } are sequences of real numbers.




Depending on sequences, they can be either one-to-one or onto case-by-case. How-


ever, in general, sequences are neither one-to-one nor onto.

Definition 4.2.35 Let A be a nonempty finite set. Every bijection f from A to A


is called a permutation of A. That is, all bijections on “finite” sets are said to be
permutations.

Example 4.2.36 Let A = {1, 3, 5}, and let f : A → A be defined by

f (1) = 3,
f (3) = 5,
f (5) = 1.

Since f : A → A is a bijection on a finite set A, it is a permutation of A.

Definition 4.2.37 Let A be a set, and R be an equivalence relation on A. The function


f : A → A/R, defined by
f (x) = [x],
is called a canonical function (or, a quotient map).

By the very definition, every canonical function is onto the quotient set A/R, but it
is not one-to-one, because if two distinct elements x and y of A are related under an
equivalence relation R, then they induce the same equivalence class, that is, [x] = [y],
implying f (x) = f (y).

Example 4.2.38 Let A = Z, and let R be the relation on Z defined by

R = {(x, y) ∈ Z × Z : y − x is even}.

It is clear that R is an equivalence relation on Z and

Z/R = {[0], [1]}.


108 Concise Introduction to Logic and Set Theory

The function f : Z → Z/R, defined by f (n) = [n], is a canonical function. For exam-
ple,
f (2) = [2] = [0],
f (5) = [5] = [1].
We remark that f : Z → Z/R is onto but not one–one.

Definition 4.2.39 Let A and B be sets. If f is a function with


Dom( f ) = A × B,
then f is called a function of several (or, multi) variables.

Example 4.2.40 Let f : R × R → R be a function defined by


1
f (x, y) = π x2 y, ∀ (x, y) ∈ R × R.
3
Then f is a function of two variables x and y, its domain is R × R.

One can generalize this concept with Dom( f ). In addition, codom( f ) are the Carte-
sian product of more than two sets. For example,

f : R4 → R2 ,
defined by
f (x, y, z, w) = (3x + y, 4z + w),
is a function in four variables.

Definition 4.2.41 Let A be a set, and let


R+ = {x ∈ R : x ≥ 0}.

The function d : A × A → R+ is called the distance function (or a metric, or a metric


function) on A, if the following conditions hold for ∀ a, b, c ∈ A:
1. 0 ≤ d(a, b),
2. d(a, b) = 0 ⇔ a = b,
3. d(a, b) = d(b, a),
4. d(a, b) ≤ d(a, c) + d(c, b).

In general, a distance function is neither one-to-one nor onto.

Example 4.2.42 Let d be a relation from R × R to R+ defined by


d(a, b) = |a − b|, ∀ (a, b) ∈ R × R.
Then d : R × R → R+ is a distance function. In this case, it is onto.
Functions 109

Example 4.2.43 Let A be a set, and let d be a relation from A × A to R+ defined by


(
1 if a 6= b,
d(a, b) =
0 if a = b.

Then, d : A× A → R+ is a distance function, called the discrete distance (or, the Dirac
measure). In this case, if A contains more than one element, then d is onto {0, 1}.

Definition 4.2.44 Let A1 , A2 be sets. Functions,

Pi : A1 × A2 → Ai (i = 1, 2),

which are defined by


Pi (a1 , a2 ) = ai (i = 1, 2),
are called the projection functions (or, projections).

Remark 4.2.45 The function Pi : A1 × A2 → Ai is onto, but not one-to-one. It is


possible to generalize this concept to n sets A1 , A2 , . . . , An .
The functions
Pi : A1 × A2 × . . . An → Ai (i = 1, 2, . . . , n)
defined by
Pi (a1 , a2 , . . . , an ) = ai (i = 1, 2, . . . , n),
are called the projections of the Cartesian product A1 × A2 × . . .An on Ai .

Example 4.2.46 The function

Pi : R2 → R, defined by Pi (x1 , x2 ) = xi , (i = 1, 2),

is the projection of R2 on R.

As we have seen, projection functions are onto, but not one-to-one.

Theorem 4.2.47 Let

f1 : B → A,
f2 : C → A,

be functions, such that B ∩C = φ . If f = f1 ∪ f2 , then


1. f : B ∪C → A is a function,
2. f1 = f |B and f2 = f |C .

Proof First we prove that


(a) (x, y) ∈ f ∧ x ∈ B ⇔ (x, y) ∈ f1 ,
(b) (x, y) ∈ f ∧ x ∈ C ⇔ (x, y) ∈ f2 .
110 Concise Introduction to Logic and Set Theory

(a) Suppose that (x, y) ∈ f ∧ x ∈ B. Then


(x, y) ∈ f ⇒ (x, y) ∈ f1 ∧ (x, y) ∈ f2 .
If (x, y) ∈ f2 , then x ∈ C, and since x ∈ B, then it follows that x ∈ B ∩ C, a
contradiction.
Hence, (x, y) 6∈ f2 , and therefore (x, y) ∈ f1 .
Conversely, suppose that (x, y) ∈ f1 . Then x ∈ B.
Since f = f1 ∪ f2 , then (x, y) ∈ f . Thus
(x, y) ∈ f1 ⇒ (x, y) ∈ f ∧ x ∈ B.
So, we get (x, y) ∈ f ∧ x ∈ B ⇔ (x, y) ∈ f1 .
(b) We leave the proof, to the reader, as exercise.
Now, we prove the theorem.
1. Suppose that x ∈ B ∪C, then x ∈ B ∧ x ∈ C.
Assume that x ∈ B. Since f1 : B → A is a function, then ∃ y ∈ A, such that
(x, y) ∈ f1 .
Since f1 ⊆ f , then (x, y) ∈ f , that is ∃ y ∈ A, such that
(x, y) ∈ f (4.1)
Now, assume that x ∈ C. Since
f2 : C → A is a function, then ∃ w ∈ A, such that (x, w) ∈ f2 .
As f2 ⊆ f , then (x, y) ∈ f , that is
∃w ∈ A, such that (x, w) ∈ f . (4.2)
Thus, one has
∃ x ∈ B ∪C, ∃ z ∈ A, such that (x, z) ∈ f , where z = y, or z = w.
Suppose (x, y1 ) ∈ f ∧ (x, y2 ) ∈ f . Then x ∈ B ∪C by definition of the function.
Thus x ∈ B ∨ x ∈ C. Assume x ∈ B, from (a), that we find
(x, y1 ) ∈ f ∧ x ∈ B ⇒ (x, y1 ) ∈ f1
also,
(x, y2 ) ∈ f ∧ x ∈ B ⇒ (x, y2 ) ∈ f1 .
Since f1 : B → A is a function, then y1 = y2 .
Now, assume x ∈ C. From (b), we have
(x, y1 ) ∈ f ∧ x ∈ C ⇒ (x, y1 ) ∈ f2 ,
(x, y2 ) ∈ f ∧ x ∈ C ⇒ (x, y2 ) ∈ f2 .
Since f2 : C → A is a function, then y1 = y2 .
Thus in both cases, we have y1 = y2 . Hence f : B ∪C → A is a function.
2. We leave the proof of 2, as an exercise for readers.
Functions 111

Exercises
1. Let f : [1, ∞) → R be a function defined by

f (x) = 4x − 1.

Find Dom( f ).
2. Draw the graph of the following relations and determine which of the follow-
ing graphs represents a function:
(a) f = {(x, y) ∈ R × R : 2x − y = 4}.
(b) g = {(x, g(x)) ∈ R × R : g(x) = x2 + 4}.
(
2x, x ∈ (−2, 4).
(c) h = {(x, y) : y = 3x+1
2 , x ∈ (−4, 2).

3. Discus each of the following statements:


(a) the volume of a sphere is a function of its radius,
(b) the radius of a sphere is a function of its volume.
4. Let by f (n) be denoted the number of prime numbers. Find f (5), f (79), if
f (n) ≤ n.
5. Let f : A → B be one-to-one function, and let C ⊆ A.
Prove that f |C : C → B is a one-to-one function.
6. Let f : A → B, g : C → D be functions. We define

( f × g)(x, y) = ( f (x), g(y)), ∀(x, y) ∈ A × C.

Prove that

(a) f × g is a function from A × C to B × D,


(b) if f and g are one-to-one (onto) functions, then f × g is a one-to-one (onto)
function.
7. Let f : B → A, g : C → A be functions and assume that

f |B∩C = g|B∩C .

If h = f ∪ g, prove that
h : B ∪C → A
is a function with g = h|C and f = h|B .
8. Let S and T be nonempty sets. Prove that there exists a bijection between S × T
and T × S.
112 Concise Introduction to Logic and Set Theory

9. Let A and B be sets. Prove that

BA = φ ⇔ A = φ ∧ B = φ .

10. Let A be a set, and let


f :A→A
be a function defined by f (x) = x, ∀ x ∈ A. Prove that f is a bijection.
11. Let f : A → B, g : A → B be functions. Prove that if f ⊆ g, then f = g.
12. Prove that each of the following is a Metric for the indicated set:
p
(a) X = R × R, d((x, y), (z, w)) = (x − z)2 + (y − w)2,
(b) X = R × R, d((x, y), (z, w)) = |x − z| + |y − w|.
13. Suppose A has m elements and B has n elements. We have seen that A × B has
mn elements and that there are 2mn relations from A to B. Find the number of
relations from A to B that are
(a) functions from A to B,
(b) functions with one element in the domain,
(c) functions two elements in the domain,
(d) function with whose domain is a subset of A.
14. For the canonical map f : Z → Z6 , find
(a) f (3),
(b) The image of 6,
(c) All the pre images of [3],
(d) All the pre images of [1].
9−x2
15. Explain why the functions f (x) = x+3 and g(x) = 3 − x are not equal.
16. Show that the following relations are not functions on R:
(a) {(x, y) ∈ R × R : x2 = y2 },
(b) {(x, y) ∈ R × R : x2 + y2 = 1},
(c) {(x, y) ∈ R × R : x = cos y},

(d) {(x, y) ∈ R × R : y = x}.
17. Let G be a relation from A to B. Prove that G is the graph of the function

f :A→B

if and only if, there exist relations J and H from A to B, such that

(H ∩ J) ◦ G = (H ◦ G) ∩ (J ◦ G).
Functions 113

18. Let f : Z × Z → Z be a function defined by


f (x, y) = xy.
Show that f is onto.
19. Let f : N × N → N be a function given by
f (m, n) = 2m−1 (2n − 1).
Show that f is onto.
20. Let f : N × N → N be a function given by
f (m, n) = 2m−1 (2n − 1).
Show that f is one-one.
21. Let f : [0, ∞) → [0, ∞) be a function defined by
f (x) = x2 .
Show that f is one-one.
22. For each pair of functions h and g, determine whether h ∪ g is a function.
(a) h : (−∞, 0] → R
h(x) = 3x + 4
g : (0, ∞) → R
g(x) = 1x .
(b) h : [−1, ∞) → R
h(x) = x2 + 1
g : (−∞, −1] → R
g(x) = x + 3.
(c) h : (−∞, 1] → R
h(x) = |x|
g : [0, ∞) → R
g(x) = 3 − |x − 3|.
(d) Let f1 : R → R and f2 : R → R. Define the point-wise sum f1 + f2 and
point-wise product f1 . f2 as follows:
f1 + f2 = {(a, c + d) : (a, c) ∈ f1 ∧ (a, d) ∈ f2 },
f1 . f2 = {(a, cd) : (a, c) ∈ f1 ∧ (a, d) ∈ f2 }.

(i) Prove that f1 + f2 and f1 . f2 are functions with domain R.


(ii) Show that ( f1 + f2 )(x) = f1 (x) + f2 (x) and that
( f1 . f2 )(x) = f1 (x). f2 (x).

23. Complete the proof of Theorem 4.2.47.


114 Concise Introduction to Logic and Set Theory

4.3 COMPOSITE FUNCTIONS AND INVERSE FUNCTIONS


In this section, we consider a certain transitivity on functions, called the composition.
Note that such a property holds well since every function is defined wholly from its
domain, and assigns each element of its domain to a unique image in its range.

Theorem 4.3.1 Let f : A → B and g : B → C be functions. Then

g ◦ f : A → C is a function.

Proof Let x ∈ A. Since f : A → B is a function, then ∃ y ∈ B, such that (x, y) ∈ f .


Similarly, since g : B → C is a function, then ∃ z ∈ C, such that (y, z) ∈ g. Then
(x, z) ∈ g ◦ f , by definition of composite relations. That is,
∀ x ∈ A, ∃ z ∈ C, such that

(x, z) ∈ g ◦ f . (4.3)

Now, suppose that


(x, z1 ) ∈ g ◦ f ∧ (x, z2 ) ∈ g ◦ f .
Then
(x, z1 ) ∈ g ◦ f ⇒ ∃ y1 ∈ B,
such that
(x, y1 ) ∈ f ∧ (y1 , z1 ) ∈ g
and
(x, z2 ) ∈ g ◦ f ⇒ ∃ y2 ∈ B,
such that
(x, y2 ) ∈ f ∧ (y2 , z2 ) ∈ g.
As f : A → B is a function, then

(x, y1 ) ∈ f ∧ (x, y2 ) ∈ f ⇒ y1 = y2 .

x1 y1 z1

x2 y2 z2

Thus (y1 , z2 ) ∈ g.
Since g : B → C is a function, then

(y1 , z1 ) ∈ g ∧ (y1 , z2 ) ∈ g ⇒ z1 = z2 ,

so, if
(x, z1 ) ∈ g ◦ f ∧ (x, z2 ) ∈ g ◦ f ,
Functions 115

then
z1 = z2 . (4.4)
By Equations (4.3) and (4.4), one can conclude that
g◦ f : A →C
is a function.
The above theorem can be re-stated as follows:

Corollary 4.3.2 Let f : A → B, g : B → C be functions. Then


∀ x ∈ A, (g ◦ f )(x) = g( f (x)).
Proof Suppose that z = (g ◦ f )(x). Then (x, z) ∈ g ◦ f . Therefore ∃ y ∈ B, such that
(x, y) ∈ f ∧ (y, z) ∈ g, but
(x, y) ∈ f ⇔ y = f (x) and (y, z) ∈ g ⇔ z = g(y).
Hence z = g(y) = g( f (x)), so (g ◦ f )(x) = g( f (x)).

Definition 4.3.3 Let f : A → B, g : B → C be functions. The function g ◦ f : A → C,


which is defined by g ◦ f := g( f (x)), ∀ x ∈ A, is called the composite function of f
and g. And the construction of composite functions, or the operation (◦) is called the
composition.

One can illustrate the composition diagramatically as follows:


A B C

f g

g˚f

Example 4.3.4 Let f : A → B, g : B → C be functions defined by the diagram,


a x r

b y s

t
c z
Then the composite function g ◦ f : A → C is defined to be a function satisfying,
(g ◦ f )(a) = g( f (a)) = g(y) = t,
(g ◦ f )(b) = g( f (b)) = g(z) = r,
(g ◦ f )(c) = g( f (c)) = g(y) = t,
116 Concise Introduction to Logic and Set Theory

having its domain A, and its range contained in C. That is, it satisfies the following
diagram:

a g˚f r

b s

c t

Example 4.3.5 Let f : R → R be the function defined by f (x) = 4x2 , and g : R → R


be the function defined by g(x) = 3x + 1. Then g ◦ f : R → R is the function defined
by

(g ◦ f )(x) = g( f (x))
= g(4x2 )
= 3(4x2 ) + 1
= 12x2 + 1,

and f ◦ g : R → R is the function defined by

( f ◦ g)(x) = f (g(x))
= f (3x + 1)
= 4(3x + 1)2
= 36x2 + 24x + 4.

Note that f ◦ g and g ◦ f are not the same functions.

The above example demonstrates that the composite functions f ◦ g and g ◦ f are
not identical, in general, and hence, the composition (◦) is not commutative (as an
operation on functions).

Theorem 4.3.6 Let f : A → B, g : B → C be functions.


1. If f and g are one-to-one, then g ◦ f : A → C is one-to-one.
2. If f and g are onto, then g ◦ f : A → C is onto.
3. If f and g are bijective, then g ◦ f : A → C is bijective.

Proof By Theorem 4.3.1, the composite function f ◦ g is indeed a well-defined


function. So, it suffices to check the one-to-one-ness, onto-ness, and bijectivity, re-
spectively.
Functions 117

1. Suppose x1 , x2 ∈ A, such that (g ◦ f )(x1 ) = (g ◦ f )(x2 ).


Then
g( f (x1 )) = g( f (x2 )).
Since g is one-to-one,

g( f (x1 )) = g( f (x2 ) ⇒ f (x1 ) = f (x2 ),

and since f is one-to-one,

f (x1 ) = f (x2 ) ⇒ x1 = x2 .

Thus, the composition function g ◦ f : A → C is an one–one function.


2. Let z ∈ C. Since g is an onto function,

∃ y ∈ B, such that z = g(y),

and since f is onto,


∃ x ∈ A, such that y = f (x).
Therefore, ∃ x ∈ A, such that z = g( f (x)) = (g ◦ f )(x).
Thus, the composite function g ◦ f : A → C is onto.
3. Since the composite function g ◦ f is one-to-one whenever f and g are, and
since g ◦ f is onto whenever f and g are, it is not hard to verify that g ◦ f is
bijective, if f and g are bijective. We leave the detailed proof to the readers.
Now, let’s consider the converse of Theorem 4.3.6. The converse does not hold true
in general, however, we obtain the following results.

Theorem 4.3.7 Let f : A → B and g : B → C be function.


1. If g ◦ f : A → C is one-to-one, then f is one-to-one,
2. If g ◦ f : A → C is onto, then g is onto.

Proof By definition, if the composition g ◦ f is well-defined as a function, then both


f and g are well-defined functions.
1. Let x1 , x2 ∈ A, such that
f (x1 ) = f (x2 ).
Then g( f (x1 )) = g( f (x2 )). So (g ◦ f )(x1 ) = (g ◦ f )(x2 ). As g ◦ f is one-to-one,
then it follows that

(g ◦ f )(x1 ) = (g ◦ f )(x2 ) ⇒ x1 = x2 .

Thus f is one-to-one.
118 Concise Introduction to Logic and Set Theory

2. Let z ∈ C. Since g ◦ f is onto, then ∃ x ∈ A such that

(g ◦ f )(x) = z,

that is, ∃ x ∈ A, such that g( f (x)) = z. Moreover, f (x) ∈ B. Hence g is onto.


By the above theorem, we obtain the following result, too.

Theorem 4.3.8 Let f : A → B and g : B → C be functions. If g ◦ f is a bijection, then


f is one-to-one and g is onto.

We leave the proof of Theorem 4.3.8 to the readers.

Remark 4.3.9 Note that the converse of Theorem 4.3.8 does not hold true. Even
though f is one-to-one, and g is onto, the composite function g ◦ f is not necessarily
a bijection. See Example 4.3.10 below.

Example 4.3.10 Let f : R → R be the function defined by

f (x) = x,

and let g : R → R+ be the function defined by

g(x) = x2 .

Then g ◦ f : R → R+ is defined by

(g ◦ f )(x) = x2 .

We see that f is one-one and g is onto, but g ◦ f is not bijective.

Definition 4.3.11 If f : A → B is a function, then the inverse of f is the “relation”,

f −1 = {(x, y) : (y, x) ∈ f }.

Remark 4.3.12 By Definition 4.3.11, it is not necessary that f −1 is a function from


B to A, in general. Also if
f −1 : B → A
is a function, it is not necessary that f : A → B is a function.

Example 4.3.13 Let

A = {5, 7, 9},
B = {−2, 4},

and let f = {(5, −2), (7, −2), (9, 4)}. Then the corresponding inverse f −1 is deter-
mined to be
f −1 = {(−2, 5), (−2, 7), (4, 9)},
as a relation. It is clear that f : A → B is a function, but f −1 : B → A is not a function.
Functions 119

Example 4.3.14 Let A = {3}, B = {2, 4, 6}, and let


f = {(3, 2), (3, 4), (3, 6)},
−1
f = {(2, 3), (4, 3), (6, 3)}.

It is clear that f : A → B is a relation, which is not a function, but f −1 : B → A is a


function.

Definition 4.3.15 A function f : A → B is said to be invertible, if the inverse f −1 :


B → A is a function. In this case, the function f −1 is called the inverse function of f .

Remark 4.3.16 If f : A → B is a function, then


(x, y) ∈ f if and only if (y, x) ∈ f −1 .
In other words, y = f (x), if and only if x = f −1 (y). Therefore, ( f −1 )−1 = f .

Example 4.3.17 Let f : R → R be a function, such that


f = {(x, y) ∈ R × R : y = x3 } ⇒ f −1 = {(x, y) ∈ R × R : x = y3 }.
It is clear that f −1 : R → R is a function. And hence, f is invertible with its inverse
function f −1 .

Example 4.3.18 Let g : R → R be a function defined by


g = {(x, y) : y = x2 }.
Then,
g−1 = {(x, y) ∈ R × R : x = y2 }.
So, the relation g−1 is not a function, equivalently, the function f : R → R is not
invertible.

The following theorem gives us a characterization for a function to be invertible.

Theorem 4.3.19 The function f : A → B is invertible, if and only if it is bijective.

Proof Suppose f : A → B is invertible, then the inverse f −1 : B → A of f is a function.


So, it suffices to prove that f : A → B is both one-to-one and onto.
Suppose x1 , x2 ∈ A, such that f (x1 ) = f (x2 ) = y.
Then,
(x1 , y) ∈ f ∧ (x2 , y) ∈ f ⇒ (y, x1 ) ∈ f −1 ∧ (y, x2 ) ∈ f −1
⇒ x1 = x2 .

since the inverse f −1 is a function. Thus f : A → B is one-to-one.


Now, let y ∈ B. Since f −1 : B → A is a function, then ∃ x ∈ A, such that (y, x) ∈ f −1 .
So, ∃ x ∈ A, such that (x, y) ∈ f ; that is, ∃ x ∈ A, such that y = f (x). Thus f : A → B
is onto.
120 Concise Introduction to Logic and Set Theory

Therefore, f : A → B is a bijective function.


Conversely, suppose f : A → B is a bijective function. Show that f : A → B is invert-
ible, that is, the inverse f −1 : A → B is a function.
First, we assume y ∈ B. Since f : A → B is onto, then ∃ x ∈ A such that f (x) = y; that
is, ∃ x ∈ A, such that (x, y) ∈ f . But

(x, y) ∈ f ⇒ (y, x) ∈ f −1 .

Thus ∃ x ∈ A, such that (y, x) ∈ f −1 ; i.e.,

Dom( f −1 ) = B (4.5)

Now, suppose (y, x1 ) ∈ f −1 ∧ (y, x2 ) ∈ f −1 . Then,

(x1 , y) ∈ f ∧ (x2 , y) ∈ f ; i.e., f (x1 ) = y ∧ f (x2 ) = y,

implying that, f (x1 ) = f (x2 ).


Since f is one-to-one, then f (x1 ) = f (x2 ) ⇒ x1 = x2 . Thus (y, x1 ) ∈ f −1 ∧ (y, x2 ) ∈
f −1 ⇒

x1 = x2 . (4.6)

Therefore, from Equations (4.5) and (4.6), the inverse

f −1 : B → A

is a function.
By Theorem 4.3.19 and by the invertibility ( f −1 )−1 = f , we obtain the following
result.

Corollary 4.3.20 If f : A → B is an invertible function, then

f −1 : B → A

is a bijective function.

Proof Suppose f is invertible, then the inverse f −1 of f is a function.


1. Let y1 , y2 ∈ B, such that

f −1 (y1 ) = f −1 (y2 ) = x.

Then
(y1 , x) ∈ f −1 ∧ (y2 , x) ∈ f −1 .
So,
(x, y1 ) ∈ f ∧ (x, y2 ) ∈ f .
That is
y1 = f (x) ∧ y2 = f (x).
This implies y1 = y2 . Thus, f −1 : B → A is one-to-one.
Functions 121

2. Let x ∈ A. Since f : A → B is a function, then

∃ y ∈ B such that (x, y) ∈ f ,

showing that ∃ y ∈ B, such that (y, x) ∈ f −1 . In other words, ∃ y ∈ B, such that


f −1 (y) = x. Thus, f −1 : B → A is onto.
Therefore, the inverse function f −1 : B → A of f is a bijection.
Thus, one can find connections between the composition (◦) and the invertibility.

Theorem 4.3.21 If f : A → B is invertible function, then


1. f −1 ◦ f = IA ,
2. f ◦ f −1 = IB ,
where IA and IB are the identity functions on A, respectively, on B.

Proof We here prove part 1, and leave the proof of part 2, for readers, as exercise.
1. Since f : A → B is invertible, then

f −1 : B → A

is a function, and f −1 ◦ f : A → A is a function. Suppose x ∈ A and f (x) = y.


Then
( f −1 ◦ f )(x) = f −1 ( f (x)) = f −1 (y) = x.
Since IA : A → A is defined by

IA (x) = x, ∀ x ∈ A,

i.e., ∀ x ∈ A, ( f −1 ◦ f )(x) = x = IA (x). i.e., f −1 ◦ f = IA .

Exercises
1. Let f : A → B, g : B → C, and h : C → D be functions. Then h ◦ (g ◦ f ) : A → C
is a function. Prove that

h ◦ (g ◦ f ) = (h ◦ g) ◦ f .

2. Find f ◦ g and g ◦ f for each pair of functions f and g.


(a) f : R → R given by f (x) = 2x + 5,
g : R → R given by g(x) = 6 − 7x.
(b) f : R → R given by f (x) = x2 + 2x,
g : R → R given by g(x) = 2x + 1.
122 Concise Introduction to Logic and Set Theory

x+1
(c) f : R → R given by f (x) = x+2 ,
g : R → R given by g(x) = x2 + 1.
3. Find the domain and range of each composite function in Exercise 2.
4. Describe two extensions with domain R for the function
(a) f = {(x, y) ∈ N × N : y = x2 },
(b) f = {(x, y) ∈ N × N : y = 3}.
5. Let A = R − {3} and B = R − {1}. Let the function

f :A→B
x−2
be defined by f (x) = x−3 . Show that f is both one-one and onto.
Find a formula for f −1 .
6. Suppose f : A → B. Which of the following assertions is always true?
(a) f (A) ⊂ B.
(b) f (A) = B.
(c) f (A) ⊃ B.
[a.]
7. Let f : A → B, g : B → A, and let g ◦ f = IA . Are the following assertions true
or false?
(a) g = f −1 .
(b) f is an one-one function.
(c) f is onto function.
(d) g is an onto function.
(e) g is an one-to-one function.
8. Consider the following functions:
(a) f1 : [−2, 2] → R,
(b) f2 : [0, 3] → R,
(c) f3 : [−3, 0] → R,
(d) f4 : [−5, 3) → R.
Find the rang of f1 , f2 , f3 , and f4 , if each of these functions is defined by the
same formula
fi (x) = x2 , i = 1, 2, 3, 4.
Functions 123

9. Let f : X → Y and g : Y → X be functions, and let g ◦ f = IX .


Prove that f is one-to-one and g is onto.
10. Let f : X → Y and g : Y → X be functions. Let g ◦ f = IX and f ◦ g = IY . Prove
that f and g are bijective functions and g = f −1 .
11. Let h ∈ X X . Prove that h is one-one if and only if

h ◦ f = h ◦ g ⇒ f = g, ∀ f , g ∈ X X .

12. Let h ∈ X X . Prove that h is onto, if and only if

f ◦ h = g ◦ h ⇒ f = g, ∀ f , g ∈ X X .

13. Let f : A → B be a function and let C ⊆ A. Prove that

f |C = f ◦ EC ,

where EC is the inclusion function from C to A.


14. Let h : B → C and g : B → C be functions. Suppose g ◦ f = h ◦ f for each
function f : A → B. Prove that g = h.
15. Let h : A → B and g : A → B be functions, and let C be a set, which contains
more than one element. Suppose f ◦ g = f ◦ h, for each function f : B → C.
Prove that g = h.
16. Prove that a function f : A → B is one-one, if and only if there exists a function
g : B → A, such that g ◦ f = IA .
17. Let f : A → B be a function. Prove that

IB ◦ f = f and f ◦ IA = f .

18. Prove that f : A → B is invertible, if and only if there exists a function g : B →


A, such that f ◦ g = IB and g ◦ f = IA .
19. Let X and Y be sets. Prove that X Y = Y X ⇒ X = Y .
20. Let A, B, and W be sets. Prove that

A ⊆ B ⇒ AW ⊆ BW .

21. Let A, B be sets. The symbol A ∼ B denotes that there exists a bijective function
from A to B. Prove that

A ∼ B ⇒ AW ∼ BW , for any set W.

22. Let A, B, and C be sets, such that B ∩C = φ .


(a) Prove that AB∪C ∼ AB × AC .
124 Concise Introduction to Logic and Set Theory

(b) Is (AB )C ∼ AB×C ?


(c) Prove that (A × B)C ∼ AC × BC .
23. Give an example of functions f : A → B and g : B → C, such that
(a) f is onto B, but g ◦ f is not onto C,
(b) g is onto C, but g ◦ f is not onto C,
(c) f is one-to-one, but g ◦ f is not one-one,
(d) g ◦ f is onto C, but f is not onto B,
(e) g is one-to-one, but g ◦ f is not one-to-one,
(f) g ◦ f is one-to-one, but g is not one-to-one.
24. Which of the following functions maps onto its indicated codomain? Justify
your answers:
(a) f :R→R (g) f : R → [1,∞)
f (x) = 21 x2 + 6 f (x) = x2 + 1
(b) f :R→R (h) f :R→R
f (x) = x2 f (x) = x3
(c) f :R→R (i) f :R→R
f (x) = 2x f (x) = sin x
(d) f : R → [−1,1] (j) f : R×R → R
f (x) = cos x f (x,y) = x − y
(e) f : (1,∞) → (1,∞) (k) f : R →√R
x
f (x) = x−1 f (x) = x2 + 5
(f) f : [2,3] → [0,∞]
f (x) = x−2
3−x

25. Which of the functions in Exercise 24 are one-to-one? Justify your answers.
26. Prove that
(
x−2
(a) f (x) = x−4 ,
if x 6= 4,
1, if x = 4
is one-to-one and onto R,

x + 4, if x ≤ −2,

(b) f (x) = −x, if − 2 < x < 2 − x,

x − 4 if x ≥ 2

is onto R, but not one-to-one.
27. Prove that
(a) f : Z4 → Z8 defined by
f ([x]) = 2[x]
is one-one, but not onto,
Functions 125

(b) f : Z4 → Z2 defined by
f ([x]) = [3x]
is one-one but not onto,
(c) f : Z6 → Z6 defined by
f ([x]) = [x + 1]
is one-one and onto,
(d) f : Z4 → Z4 defined by
f ([x]) = [2x]
is neither one-to-one nor onto.
28. Suppose the set A has n elements and the set B has m elements. Find the num-
ber of
(a) one–one functions from A to B, assuming that
1. m < n 2. m = n 3. m > n
(b) onto functions from A to B, assuming that
1. m = n 2. m > n 3. m = n + 1

4.4 DIRECT IMAGES AND INVERSE IMAGES UNDER A FUNCTION


Definition 4.4.1 Let f : A → B be a function and let C ⊆ A. The set

f (C) = {y ∈ B : y = f (x) for some x ∈ C}

is called the direct image of C under f .

By definition, if f : A → B is a function, then the direct image f (A) of A under f is


nothing but the range Rng( f ) of f . Also, direct images of all subsets of A become
subsets of B, under an additional axiomatization: the direct image of the empty set
becomes the empty set.

Example 4.4.2 Let f : Z → R be a function defined by

f (x) = x2 + 2.

Let C = {−3, −1, 0, 1, 3}, then f (C) = {11, 3, 2}.

Example 4.4.3 Let f : R − {0} → R be a function defined by


1
f (x) = .
x
Let C = (0, 1], then f (C) = {y ∈ R : 1 ≤ y < ∞}.

Theorem 4.4.4 Let f : X → Y be a function and let A, B be subsets of X. If A = B,


then f (A) = f (B).
126 Concise Introduction to Logic and Set Theory

Proof Suppose A = B, and let y ∈ f (A). Then ∃ x ∈ A, such that y = f (x). Since
A = B, then x ∈ B. Thus y = f (x) ∈ f (B). Hence

f (A) ⊆ f (B). (4.7)

Similarly, we have

f (B) ⊆ f (A). (4.8)

From Equations (4.7) and (4.8), one has f (A) = f (B).

Remark 4.4.5 Even though f (A) = f (B), it is not necessary that A = B. See Example
4.4.6 below.

Example 4.4.6 Let X = Z, Y = R and let

f : X →Y

be a function defined by f (x) = x2 . Let A = {−2, 1, 3}, B = {2, 1, −3}, then

f (A) = {4, 1, 9} and f (B) = {4, 1, 9}.

Notice that f (A) = f (B), but A 6= B.

Theorem 4.4.7 Let f : X → Y be a function and f ∗ be a relation from P(X) to P(Y )


defined by
f ∗ = {(A, B) ∈ P(X) × P(Y ) : f (A) = B}.
Then f ∗ is a function from P(X) to P(Y ), where P(Z) is the power set of a set Z.

Proof First, suppose A ∈ P(X), then A ⊆ X. Thus, f (A) ⊆ Y from which we get
f (A) ∈ P(Y ). Suppose f (A) = B, then

∀ A ∈ P(X), ∃ B ∈ P(Y ), such that (A, B) ∈ f ∗ .

Now, supposing (A, B1 ) ∈ f ∗ ∧ (A, B2 ) ∈ f ∗ , we obtain

B1 = f ∗ (A) ∧ B2 = f ∗ (A),

and hence, B1 = B2 . Therefore, f ∗ : P(X) → P(Y ) is a well-defined function.


One can have the following relations on direct images.

Theorem 4.4.8 If f : A → B is a mapping and C, D are subsets of A, then


(a) f (C ∪ D) = f (C) ∪ f (D),
(b) f (C ∩ D) ⊆ f (C) ∩ f (D),
(c) f (C − D) ⊇ f (C) − f (D).
Functions 127

Proof We here prove parts (a) and (c), and leave the proof of part (b) to the readers
as exercise.
(a) Suppose y ∈ f (C ∪ D). Then y ∈ f (C ∪ D) ⇔ ∃x ∈ C ∪ D, such that y = f (x)
⇔ ∃x ∈ C ∧ x ∈ D, such that y = f (x)
⇔ (∃x ∈ C, such that y = f (x)) ∧ (∃x ∈ D, such that y = f (x))
⇔ f (x) ∈ f (C) ∧ f (X) ∈ f (D)
⇔ y ∈ f (C) ∧ y ∈ f (D)
⇔ y ∈ ( f (C) ∪ f (D)).
Consequently, f (C ∪ D) = f (C) ∪ f (D).
(c) Suppose y ∈ f (C) − f (D). Then y ∈ f (C) ∧ y 6∈ f (D). Since y ∈ f (C), ∃ x ∈ C,
such that y = f (x). This implies

y = f (x) 6∈ f (D), since y 6∈ f (D).

Therefore, x 6∈ D; i.e.,
∃ x ∈ C ∧ x 6∈ D
such that
y = f (x).
So, ∃ x ∈ C − D such that y = f (x). This implies that y ∈ f (C − D). In con-
clusion,
y ∈ f (C) − f (D) ⇒ y ∈ f (C − D).
Thus, f (C) − f (D) ⊆ f (C − D).

Remark 4.4.9 The following example shows that

f (C) ∩ f (D) 6⊆ f (C ∩ D).

Let A = {3, 5}, B = {2}, and let

f :A→B

be constant function. Suppose C = {3}, D = {5}. Then

f (C ∩ D) = f (φ ) = φ ,

and
f (C) = f ({3}) = {2}, f (D) = f ({5}) = {2}.
Thus,
f (C) ∩ f (D) = {2},
from which we obtain that

f (C) ∩ f (D) 6⊆ f (C ∩ D).


128 Concise Introduction to Logic and Set Theory

Definition 4.4.10 Let f : A → B be a function, and let D ⊆ B. The set

f −1 (D) = {x ∈ A : f (x) ∈ D}

is called the inverse image (or, the pre image) of D under f .

Note that, even though the inverse images are expressed under the symbol f −1 ,
this symbol does not mean the inverse function of f . It is simply used pure symboli-
cally. Even if f is not invertible, one can define and write the corresponding inverse
images as above.

Example 4.4.11 Let f : R → R be a function defined by

f (x) = x2 + 1,

then

f −1 (17) = {x ∈ R : f (x) = 17}


= {x ∈ R : x2 + 1 = 17}
= {x ∈ R : x2 = 16}
= {−4, 4}.

Also

f −1 ({5, 10}) = {x ∈ A : f (x) ∈ {5, 10}


= {x ∈ A : x2 + 1 = 5 ∨ x2 + 1 = 10}
= {−2, 2, −3, 3}.

Theorem 4.4.12 Let f : X → Y be a function and C, D be subsets of Y . If C = D,


then f −1 (C) = f −1 (D).

Proof Suppose C = D and let x ∈ f −1 (C). Then

x ∈ f −1 (C) ⇔ f (x) ∈ C
⇔ f (x) ∈ D(since C = D)
⇔ x ∈ f −1 (D).

Hence, f −1 (C) = f −1 (D).

Remark 4.4.13 Even though f −1 (C) = f −1 (D), it is not necessary that C = D. See
Example 4.4.14 below.

Example 4.4.14 Let f : R → R be a function defined by

f (x) = |x|,
Functions 129

and let C = (0, 1), D = (−2, 1). Then

f −1 ((0, 1)) = (−1, 1),


f −1 ((−2, 1)) = (−1, 1).

Notice that f −1 ((−2, 1)) = f −1 ((−1, 1)), but (−2, 1) 6= (−1, 1).

Theorem 4.4.15 Let f : A → B be a function and C, D be subsets of B. Then


(a) f −1 (C ∪ D) = f −1 (C) ∪ f −1 (D),
(b) f −1 (C ∩ D) = f −1 (C) ∩ f −1 (D),
(c) f −1 (C − D) = f −1 (C) − f −1 (D).

Proof We show part (b) and leave the proof of parts (a) and (c) to the readers as
exercise.
(b) Suppose x ∈ f −1 (C ∩ D). Then

x ∈ f −1 (C ∩ D) ⇔ f (x) ∈ C ∩ D
⇔ f (x) ∈ C ∧ f (x) ∈ (D)
⇔ x ∈ f −1 (C) ∧ x ∈ f −1 (D)
⇔ x ∈ f −1 (C) ∩ f −1 (D).

Thus f −1 (C ∩ D) = f −1 (C) ∩ f −1 (D).

Notion 4.4.16 For a set A, by 2A , we denote the set of all the functions from A to
{a, b}.

Theorem 4.4.17 For every set A, then there exists a bijection between 2A and the
power set P(A) of A.

Proof Suppose we let 2 = {0, 1}, notationally. We define a relation R from P(A) to
2A by
R = {(B, F) ∈ P(A) × 2A : f = λB },
where λB is the characteristic function, i.e.,
(
0, x ∈ B,
λB (x) =
1, x ∈ A − B,

First, we prove that R is a function from P(A) to 2A . Assuming that B ∈ P(A), we


obtain ∃ λB ∈ 2A . Thus,
∀ B ∈ P(A), ∃ λB ∈ 2A , so that

(B, λB ) ∈ R. (4.9)
130 Concise Introduction to Logic and Set Theory

Let (B, f1 ) ∈ R, (B, f2 ) ∈ R. Then f1 = λB ∧ f2 = λB . Hence f1 = f2 .


Therefore, by Equation (4.9),
R : P(A) → 2A
is a function.
Now, we show that R is one-to-one. To do that, we let B1 , B2 ∈ P(A), satisfying
R(B1 ) = R(B2 ). Since R(B1 ) = λB1 , R(B2 ) = λB2 , then λB1 = λB2 . Thus,

B1 = {x ∈ A : λB1 (x) = 0} = {x ∈ A : λB2 (x) = 0} = B2 .

So, R : P(A) → 2A is one-one function.


Finally, we prove that R is onto function. Suppose f ∈ 2A , then f : A → 2 = {0, 1}.
Assuming B = f −1 (0), we obtain that B ∈ P(A), but R(B) = λB . Since
(
0, x ∈ B,
f (x) =
1, x ∈ A − B,

then R(B) = λB = f . So, R : P(A) → 2A is onto.


As R is both one-to-one and onto, it is a bijection from P(A) to 2A .

Exercises
1. Let X = {a, b, c, d}, Y = {x, y, z, w}, and let
f : X → Y be a function defined by
f (a) = x, f (b) = y
f (c) = z, f (d) = w.
Find each of
f ({a, b}), f ({b, c}), f ({c, d})
f −1 ({x, z}), f −1 ({y, z, w}).
2. Let f : R → R be defined by f (x) = 2x2 + 1. Find f ((0, 2)).
3. Let f : R → R be defined by f (x) = 2x − 1. Find f ((−1, 1)).
4. Let f : R → R be defined by
(
x − 2, x ≥ 2,
f (x) =
2x + 1, x < 2.

Find f −1 ((1, 3)).


5. Let f : R → R be defined by f (x) = x2 − 6x + 9. Find and sketch each of
f ([0, 1)), f ([2, 4)), f ((0, 3))
f −1 ([−2, 0]), f −1 ((1, 3)), f −1 ([0, 1)).
Functions 131

6. Let f : A → B be a function and let C ⊆ A, D ⊆ B.


Prove each of the following assertions:
(a) C ⊆ f −1 ( f (C)),
(b) f ( f −1 (D)) ⊆ D,
(c) C = f −1 ( f (C)) if f is one–one,
(d) f ( f −1 (D)) = D if f is onto.
7. Let f : A → B be a function. Prove that if f is a bijection, then f ∗ : P(A) → P(B)
is a bijection.
8. Let f : R × R → R be a function defined by

f (x, y) = x2 + y2 .

(a) Find f −1 ([0, 1]).


(b) Find Rng( f ).

(c) Find f (A), if A = {(x, y) : x + y = 2}.
9. Let X be a nonempty set. Define a relation R on X X by

f Rg if and only if Im( f ) = Im(g).

Prove that R is an equivalence relation on X X .


10. Let f : N × N → N be a function defined by

f (m, n) = 2m (2n + 1).

Find
(a) f −1 ({1, 2, 3, 4, 5, 6}).
(b) f −1 ({4, 6, 8, 10}).
(c) f ({(1, 1), (2, 2), (4, 1), (1, 4)}).
11. Let f : N × N → N be a function defined by f (m, n) = 2m 3n .
Find
(a) f (A × B), where A = {1, 2, 4}, B = {3, 4},
(b) f −1 ({5, 6, 7, 8, 9, 10}).
12. Let f : N × N → N be a function defined by

f (m, n) = 2m−1 (2n − 1).

Show that f is one-one and onto N.


5 Cardinality of Sets
Let A and B be sets. It is natural to ask whether or not A and B have the same number
of elements. In this chapter, we concentrate on studying when the given two sets A
and B have the same number of elements.
If both A and B are finite sets, it is relatively easy to check these sets have the
same number of elements, by directly counting the number of elements of the sets.
But this counting technique cannot be used for infinite sets. In such a case, we then
try to find a function,
f : A → B,
which is both one-to-one and onto. That is, if there exists at least one one-to-one
correspondence, or a bijection f from A onto B, then one can verify that the two sets
A and B have the same number of elements.

5.1 CARDINAL NUMBER


5.1.1 EQUIPOTENT SETS
We here concentrate on considering given two sets have the same number of elements
by the existence of at least one bijection between them.

Definition 5.1.1 Two sets A and B are said to be equipotent, denoted by A ≈ B, if


there exists at least one bijection (or one one-to-one correspondence),
f : A → B, or f : B → A,
which is both one-to-one and onto. If there are no bijections between two sets, then
A and B are said to be not equipotent, and we write A 6≈ B.

As we considered in Chapter 4, if a function f : A → B is a bijection, then its inverse


function naturally exists,
f −1 : B → A.
So, the above definition can be simply re-defined by that: A ≈ B, if there exists a
bijection,
f : A → B.

Example 5.1.2 Let A = {a, b, c, d} and B = {1, 4, 7, 10}, and let


f :A→B
be the function defined by
f (a) = 1, f (b) = 4, f (c) = 7, f (d) = 10.
It is clear that f is a bijection, hence A ≈ B.

DOI: 10.1201/9780429022838-5 133


134 Concise Introduction to Logic and Set Theory

Example 5.1.3 Let X = {x, y, z} and Y = {a, b}. It is impossible to find a bijection
between X and Y . Hence X and Y are not equivalent; that is, X 6≈ Y .

Example 5.1.4 Let A and B be the open intervals (0, 1) and (2, 5), respectively. Let
f : A → B be a function defined by

f (x) = 3x + 2.

Since f is a bijection, A ≈ B.

Example 5.1.5 Let N be the set of all natural numbers, and M be the set of all even
numbers, and let f : N → M be a function defined by

f (n) = 2n.

Note that f is a bijection. Consequently, N ≈ M.

In the very above example, we note that M ⊂ N, and N ≈ M, showing that set N of
natural numbers is equipotent to a proper subset M of all even numbers. It provides
a difference between finiteness and infiniteness of sets.

Definition 5.1.6 A set A is an infinite set, if it is equipotent to a proper subset of


itself.

By Example 5.1.5 and Definition 5.1.6, one can conclude that, indeed, set N of nat-
ural numbers is infinite.

Theorem 5.1.7 The relation ≈ is an equivalence relation.

Proof Let A be a set. Then there exists a well-defined function,

idA : A → A,

defined by
idA (a) = a, for all a ∈ A.
It is not hard to check this function idA is a bijection.
Suppose now two sets A and B are equipotent. Since A ≈ B, there exists a bijec-
tion,
f : A → B,
implying the existence of a bijection,

f −1 : B → A,

where f −1 is the inverse of f . It shows that B ≈ A.


Now, assume that sets A and B are equipotent, and the sets B and C are equipotent,
that is,
A ≈ B, and B ≈ C.
Cardinality of Sets 135

Then there exists bijections,

g : A → B, and h : B → C.

So, one can define the composition,

h ◦ g : A → C,

of h and g. Note and recall that this function h ◦ g is not only invertible, but also,

(h ◦ g)−1 = g−1 ◦ h−1 : C → A,

implying the bijectivity of h ◦ g. Thus,

A ≈ C.

Therefore, the relation ≈ is an equivalence relation.


The equipotent property, or the equipotence, also satisfies the following result as
an equivalence relation.

Theorem 5.1.8 Let A, B,C, and D be sets with A ≈ C and B ≈ D. If A and B are
disjoint, and if C and D are disjoint, then A ∪ B ≈ C ∪ D.

Proof Since A ≈ C, then there is a bijection f : A → C, and since B ≈ D, then there


is a bijection g : B → D. Then one can define a bijection,

f ∪ g : A ∪ B → C ∪ D,

defined by 
 f (x) if x ∈ A
f ∪ g (x) =
g(x) if x ∈ B,

for all x ∈ A ∪ B. Note that, by definition, the function,

f ∪ g,

is surjective; and by the disjoint conditions, it is injective, and hence, it is a bijection.


Therefore, A ∪ B ≈ C ∪ D.
Similarly, one can get the following result.

Theorem 5.1.9 Let A, B,C, and D be sets with A ≈ C and B ≈ D. Then A×B ≈ C ×D.

Proof One can define a bijection,

f × g : A × B → C × D,

by
f × g ((a, b)) = ( f (a), g(b)) ,
for all (a, b) ∈ A × B. We leave the detailed proof to the readers.
136 Concise Introduction to Logic and Set Theory

Definition 5.1.10 The number of elements of a set A is called the cardinality of A.


The cardinality of A is denoted by #(A).

Notion 5.1.11 The cardinal number of φ is 0, denoted by #(φ ) = 0.


The cardinality of {1} is 1, denoted by #({1}) = 1.
The cardinality of {1, 2} is 2, denoted by #({1, 2}) = 2.
..
.
The cardinality of {1, 2, 3, . . ., k} is k, denoted by

#({1, 2, 3, . . ., k}) = k.

From below, we use symbol Nk to write the set {1, 2, 3, . . . , k}.

Theorem 5.1.12 The fundamental property of the cardinalities is that:

A ≈ B ⇐⇒ #(A) = #(B).

Proof Indeed, if A ≈ B, then there exists a bijection f : A → B, which is both one-


to-one and onto. By the one-to-one-ness and the onto-ness of f ,

#(A) = #(B).

Conversely, if #(A) = #(B), then one can construct a bijection between A and B
because of the one-to-one-ness and the onto-ness of bijections, and hence, A ≈ B.
We will consider it more precisely below.
By this equivalence, one may/can understand the cardinality, say α , which is a
quantity, as a family of all sets having the same cardinalities α . For instance,

{a, b} , {1, 2} , {0, −2} , {x, y} ∈ 2, etc.,

by regarding 2 as a family of all sets having their cardinalities 2. That is, the quantity
2 represents the cardinalities of all sets having two elements.

Definition 5.1.13 A cardinal number α is the quantity, representing the cardinalities


of all equipotent sets having α -many elements.

Remark 5.1.14
1. The cardinal numbers induced by finite sets are nothing but the cardinalities of
the sets.
2. The set A is finite if there does not exist a proper subset B of A, such that B ≈ A.
So, the finite cardinal numbers are determined uniquely up to cardinalities.
3. The cardinal number α is a finite number if it is the cardinality of a finite
set. Otherwise it is called an infinite cardinal number. In such a sense, a finite
cardinal number is also called a natural number. An infinite cardinal number
is called a transfinite number.
Cardinality of Sets 137

4. A set S is finite, if and only if


#(S) 6= #(S) + 1,
so, if α = #(S) and S is a finite set, then
α 6= α + 1.

Theorem 5.1.15 Let A and B be finite sets. Then


#(A ∪ B) = #(A) + #(B) − # (A ∩ B) .
Meanwhile, the equality
#(A ∪ B) = #(A) + #(B)
holds true, if and only if A and B are disjoint in the sense that
A ∩ B = φ.
Proof Suppose two sets A and B are finite sets, and hence,
#(A), #(B) ∈ N.
We let
n = #(A), and k = #(B),
for n, k ∈ N. Then the union X = A ∪ B,
X = {x | x ∈ A, or x ∈ B} ,
and the intersection Y = A ∩ B,
Y = {y | y ∈ A, and y ∈ B} ,
are well-defined as new finite sets.
Observe that
#(X) ≤ n + k,
since the quantity n + k double-counts the cardinality #(Y). Therefore,
#(X) + #(Y ) = n + k,
if and only if
#(X) = n + k − #(Y).
Meanwhile, if the intersection Y is empty, that is, Y = φ , then the above general
formula satisfies that
#(X) = n + k − 0 = n + k,
since #(φ ) = 0. Conversely, if Y is not empty, that is, Y 6= φ , then
#(X) = n + k − #(Y) 6= n + k,
because #(Y ) 6= 0 = #(φ ).
138 Concise Introduction to Logic and Set Theory

Now, let’s consider the cases where cardinal numbers are not finite.

Definition 5.1.16 The cardinal number ℵ is defined to be the cardinality #(N) of N,


that is,
ℵ = #(N).
Sometimes, ℵ is called the countable infinity.

Definition 5.1.17 The cardinal number c is defined to be the cardinality #((0, 1)) of
the subset (0, 1), the open interval,

(0, 1) = {r ∈ R | 0 < r < 1} ,

of the set R of all real numbers. This cardinal number c is called the continuum (or,
the uncountable infinity).

Example 5.1.18 Let (a, b) be any open interval in R, and let

f : (0, 1) → (a, b)

be a function defined by f (x) = a + (b − a)x. Then this function f is a bijection.


Thus, (a, b) has cardinality c.

Example 5.1.19 The function f : (− π2 , π2 ) → R defined by

f (x) = tan x,

is a bijection. Hence the set R of real numbers has its cardinality, the continuum c,
that is,
# (R) = c.

So, without loss of generality, one can re-define the cardinal number c, the contin-
uum, by the cardinality of R.

Theorem 5.1.20 The transfinite number ℵ is strictly less than c. That is,

ℵ < c,

as cardinal numbers. And there are no cardinal numbers between ℵ and c.

Proof One can find a one-to-one function (or, an injection),

f : N → R,

by
f (n) = n in R, for all n ∈ N.
i.e., this embedding function f is clearly one-to-one. It means that the range of f is a
proper subset of R, and hence,

# (N) = ℵ ≤ c = # (R) .
Cardinality of Sets 139

Moreover, there are no one-to-one functions from R to N (See Section 5.1.2 further:
one can find a bijection from subset Q of all rational numbers to N). It shows that

c 6= ℵ.

Therefore,
ℵ < c,
as transfinite cardinal numbers.
Logically, there is no cardinal number between ℵ and c. Indeed, if there were a
cardinal number β such that
ℵ ≤ β < c,
then
β = ℵ + k, for some k ∈ {0} ∪ N ∪ {ℵ} ,
implying that
β = # (A) = # (N) = ℵ,
by the equipotent property of A and N:

A ≈ N ∪ Nk ≈ N.

Also, if there were a cardinal number γ satisfying

ℵ < γ ≤ c,

then
γ = c − k, for some l ∈ {0} ∪ N∪ {ℵ} ,
implying that
γ = #(B) = #(R) = c,
by the equipotent property of B and R:

B ≈ R − Nk ≈ R.

Therefore, there are no cardinal numbers between ℵ and c.


The above theorem shows that there are only two transfinite (or infinite) cardinal
numbers ℵ and c. By discussions, if we define set C of all cardinal numbers, then

C = {0} ∪ N ∪ {ℵ} ∪ {c} .

In particular, all finite cardinal numbers are from subset {0} ∪ N of C , and the trans-
finite cardinal numbers are {ℵ, c} in C .
140 Concise Introduction to Logic and Set Theory

5.1.2 COUNTABLE SETS


In the previous section, we consider the equipotent property on sets, and the cardi-
nality of sets, and show that two sets are equipotent, if and only if they have the same
cardinality. Based on the cardinalities of sets, we define and study cardinal numbers,
{0} ∪ N ∪ {ℵ} ∪ {c} .
In this section, we study a transfinite cardinal number, ℵ, more in detail. Recall that
ℵ = # (N) .
Definition 5.1.21 A set A is said to be countable (or, denumerable), if
#(A) ≤ ℵ.
In particular, if a set A is a finite set, then it is said to be finitely countable, meanwhile,
if it is equipotent to set N of natural numbers, then A is said to be infinitely countable.

By definition, the empty set φ whose cardinality is 0, and all nonempty finite sets
whose cardinalities are in N, and the sets equipotent to N whose cardinalities are ℵ
are countable.

Definition 5.1.22 A set is said to be uncountable (or, not denumerable), if it is not


countable.

By definition, every set equipotent to R, equivalently, whose cardinality is the con-


tinuum c, is uncountable.
Also, by the above definitions, one can realize that there are two kinds of infin-
ity, denoted usually by ∞; the countable infinity ℵ, and the uncountable infinity c,
satisfying
ℵ < c,
in terms of transfinite numbers.

Theorem 5.1.23 Set Z of all integers is countable.

Proof There exists a bijection f : N → Z defined by


(
x
2,
f (x) = 1−x
if x is even,
2 , if x is odd.

We leave the detailed proof to the readers.

Theorem 5.1.24 The Cartesian product N × N is countable.

Proof There is a bijection f : N × N → N by


f (m, n) = 2m−1 (2n − 1).
We leave the detailed proof to the readers.
Cardinality of Sets 141

Example 5.1.25 Any infinite sequence,

(a1 , a2 , a3 , . . . )

of mutually distinct elements is countable (as a set), since there is a bijection,

f (n) = an ,

whose domain is N. Note here that the mutual distinctness of entries is crucial.

Theorem 5.1.26 Set Q+ = {q ∈ Q | q > 0} of positive rational numbers is count-


able.

Proof Define a bijection f : Q+ → N × N by


p p
f ( ) = (p, q), for all ∈ Q+ ,
q q
where p and q are positive integers that are relatively prime in the sense that:
gcd(p, q) = 1, where gcd means the greatest common divisor. That is,

Q+ ≈ N × N.

We leave the detailed proof for the readers as an exercise.


Since N × N ≈ N by the very above theorem, we have

Q+ ≈ N × N ≈ N.

Therefore, Q+ is countable.

Theorem 5.1.27 If a set A is countable, then A ∪ {x} is countable, where x is an


arbitrary element.

Proof Suppose f : N → A is a bijection, making N and A are equipotent. If x ∈ A, then


A ∪ {x} = A, which is countable. If x 6∈ A, one can define a bijection g : N → A ∪ {x}
by (
x, if n = 1,
g(n) =
f (n − 1), if n 6= 1.
We leave the detailed proof for the readers. The existence of this bijection g guaran-
tees that
N ≈ A ∪ {x} ,
implying the countability of A ∪ {x}.
By above results, one obtains the following result.

Theorem 5.1.28 The set Q of all rational numbers is countable.


142 Concise Introduction to Logic and Set Theory

Proof It is shown that subset Q+ of Q is countable. Now, define a subset Q−1 of Q


by
Q− = {y ∈ Q | y < 0} .
Then there exists a bijection h : Q+ → Q− , defined by

h (x) = −x, for all x ∈ Q+ .

It shows that subset Q− is countable.


Also, by the very above theorem, a subset

Q+ +
0 = Q ∪ {0}

of Q is countable.
Note-and-recall that N ≈ E, where E is the proper subset of N consisting of all
even numbers, by the existence of a bijection ge : N → E defined by

ge (n) = 2n, for all n ∈ N.

And, similarly, one can check that N ≈ O, where O is the proper subset of N consist-
ing of all odd numbers, by the existence of a bijection go : N → O defined by

go (n) = 2n − 1, for all n ∈ N.

Thus, one can have the equipotent properties,

Q+ −
0 ≈ E ≈ N, and Q ≈ O ≈ N.

So, one obtains that

Q = Q+ −
0 ∪ Q ≈ E ∪ O = N.

Therefore, set Q is countable.


The above theorem shows that

# (Q) = ℵ.

Theorem 5.1.29 Every subset of a countable set is countable.

Proof Suppose a set A is countable. Assume first that A is finite. If A = φ , then it has
only one subset φ , itself, satisfying #(φ ) = 0. If A ≈ Nk , for some k ∈ N, then

# (B) ≤ k < ℵ,

for all subsets B of A. So, if A is finitely countable, then all subsets of A are (finitely)
countable.
Now, assume that A is infinitely countable, i.e., A ≈ N, equivalently, #(A) = ℵ.
Note that a subset X of N satisfies

X = φ,
Cardinality of Sets 143

or
X ≈ Nk , for some k ∈ N,
or
X = N,
implying that
# (X) ∈ {0} ∪ N ∪ {ℵ} .
Since A ≈ N, if B is an arbitrary subset of A, then
# (B) ∈ {0} ∪ N ∪ {ℵ} ,
too. Therefore, all subsets of a countable set A are countable.

Exercises
1. Prove that set Z of all integers is countable.
2. Let A and B be sets. Prove that if A is finite, then A ∩ B is finite.
3. Prove that Nk × Nr is finite, for k, r ∈ N.
4. Prove that if A is infinite, and A ⊆ B, then B is infinite.
5. Prove that if A and B are finite sets, then A × B is finite.
6. Show that if A ≈ φ , then A = φ .
n o
7. Show that a set S = 21k , k ∈ N is countable.

8. Prove that if A is countable, and B is finite, then set A ∪ B is countable.


9. Let A and B be countable sets. Prove that
A × B ≈ B × A.

10. Verify that


(a) (0, 1) ≈ [0, 1],
(b) (0, 1) ≈ (1, ∞),
(c) [0, 1] ≈ (0, 1),
(d) [0, 1] ≈ [0, 1).
11. Let A, B, and C be sets. Prove that
(A × B) × C ≈ A × (B × C).

12. Let A and B be countable sets, such that


#(B − C) = #(C − B).
Prove that #(B) = #(C).
13. Let A be countable infinite set, and B ⊆ A, such that (A − B) be finite.
Prove that #(A) = #(B).
144 Concise Introduction to Logic and Set Theory

5.1.3 CARDINAL ARITHMETIC


We have showed that if A and B are finite sets, then

# (A ∪ B) = #(A) + #(B) − # (A ∩ B),

in N ∪ {0}. In this section, we consider such arithmetical operations on the set

C = {0} ∪ N ∪ {ℵ} ∪ {c}

of all cardinal numbers.


First, the addition (+) on C is formally defined as follows.

Definition 5.1.30 Let α and β be cardinals numbers, and let A and B be disjoint sets
such that α = #(A), β = #(B). Then

α + β = #(A ∪ B).

Remark 5.1.31 The addition (+) on C is well-defined. Indeed, let A∗ ≈ A and B∗ ≈


B, such that
A ∩ B = φ and A∗ ∩ B∗ = φ .
Then A∗ ∪ B∗ ≈ A ∪ B. Hence

#(A∗ ∪ B∗ ) = #(A ∪ B).

Therefore, the sum α + β is well-defined, where α = #(A), β = #(B).

Example 5.1.32 Let A = {2, 4, 6}, B = {1, 3, 5, 7, 9}. Then

α = #(A) = 3, and β = #(B) = 5,


and hence,

3 + 5 = α + β = #{1, 2, 3, 4, 5, 6, 7, 9} = 8,
since A and B are disjoint.

Example 5.1.33 Let

A = {1, 3, 5, . . . },
B = {2, 4, 6, . . . }.

Note that #(A) = #(B) = ℵ and A ∩ B = φ . Then

ℵ + ℵ = #(A ∪ B)
= #(N)
= ℵ,

implying that
ℵ + ℵ = ℵ.
Cardinality of Sets 145

Example 5.1.34 Let


S = (0, 1) ⊂ R,
T = [1, 2) ⊂ R.
Note that #(S) = #(T ) = c and S ∩ T = φ . Then
c + c = #(S ∪ T )
= #((0, 2))
= c.
Therefore,
c + c = c.

Theorem 5.1.35 Let α , β , and γ be cardinal numbers. Then


1. (α + β ) + γ = α + (β + γ ),
2. α + β = β + α .

Proof
1. Let A, B, and C be mutually disjoint sets, such that
α = #(A), β = #(B) and γ = #(C),
Then
(α + β ) + γ = #(A ∪ B) + #(C)
= #((A ∪ B) ∪C)
= #((A ∪ (B ∪C))
= #(A) + #(B ∪C)
= α + (β + γ ).

2. If A and B are disjoint sets satisfying


α = #(A) and β = #(B),
then we have
α + β = #(A ∪ B)
= #(B ∪ A)
= β + α.

Remark 5.1.36 The cancellation law does not hold on C . For example
ℵ + ℵ = ℵ = 1 + ℵ,
but ℵ 6= 1 in C .
146 Concise Introduction to Logic and Set Theory

Now, let’s consider the multiplication (·) on C .

Definition 5.1.37 Let α and β be cardinal numbers, and let A and B be such that
α = #(A), and β = #(B). Then the product αβ of α and β is defined by

αβ = #(A × B).

Remark 5.1.38 The multiplication is well-defined. Indeed, suppose that A∗ ≈ A and


B∗ ≈ B. Then A∗ × B∗ ≈ A × B. So,

#(A∗ × B∗ ) = #(A × B).

This implies that αβ is well-defined.

Note that, different from the addition (+), the multiplication (·) does not need the
disjoint condition by the very definition of the Cartesian product.

Example 5.1.39 Let A = {2, 3, 4}, B = {q, p, r, s,t}. Then

α = #(A) = 3, β = #(B) = 5,

and
(3)(5) = αβ = #({2, 3, 4} × {q, p, r, s,t}) = 15.

Theorem 5.1.40 Let α , β , and γ be cardinal numbers. Then


1. α (β γ ) = (αβ )γ ,
2. αβ = β α ,
3. α (β + γ ) = αβ + αγ .

Proof Let A, B, and C be sets satisfying

α = #(A), β = #(B), and γ = #(C).

Then
α (β γ ) = # (A × (B × C))
= # (A × B × C)
= # ((A × B) × C) = (αβ ) γ .
Thus, the first formula holds.
Since
A × B ≈ B × A,
we have
# (A × B) = αβ = β α = # (B × A),
and hence, the second formula holds.
Cardinality of Sets 147

Let A, B, and C be sets, satisfying

α = #(A), β = #(B), and γ = #(C),

and assume further that the two sets B and C are disjoint. Then

α (β + γ ) = #(A) #(B ∪C)


= #(A × (B ∪C))
= #[(A × B) ∪ (A × C).

Since B ∩C = φ , we have

(A × B) ∩ (A × C) = φ .

Thus,

α (β + γ ) = #(A × B) + #(A × C)
= αβ + αγ ,

implying the third formula.


Recall that a set of all functions from set B to set A is denoted by AB .

Definition 5.1.41 Let α and β be cardinal numbers, and let A and B be sets satisfying
that α = #(A), and β = #(B). Then the power α β is defined by

α β = # AB .


Remark 5.1.42 The power is well-defined on C . Indeed, if A1 ≈ A2 and B1 ≈ B2 ,


then AB1 1 ≈ AB2 2 . Hence  
# AB1 1 = #(AB2 2 ),

implying that α β is well-defined in C .

Theorem 5.1.43 Let α , β , and γ be cardinal numbers of C . Then


1. α β α γ = α β +γ ,
2. (α β )γ = α β γ ,
3. α γ β γ = (αβ )γ .

Proof Let A, B, and C be sets, such that

B ∩C = φ ,

and
α = #(A), β = #(B), γ = #(C).
148 Concise Introduction to Logic and Set Theory

Note that
α β +γ = #(AB∪C ), α β α γ = #(AB × AC ),
and AB∪C consists of all the functions with domain B ∪C and codomain A. Also AB
and AC have the similar meaning. So, it suffices to show

AB∪C ≈ AB × AC .

Let f ∈ AB∪C corresponds to the ordered pair of functions,

( f |B , f |C ).

Note that ( f |B , f |C ) belongs to AB × AC . The function

F : AB∪C → AB × AC

defined by
F( f ) = ( f |B , f |C ),
is a bijection, because B ∩C = φ . Thus,

AB∪C ≈ AB × AC .

Therefore, the first formula holds.


We leave the proof of the second and third formulas as exercise for the readers.
Recall that if A is a set, the corresponding power set P(A) is defined to be the set
of all subsets of A.

Theorem 5.1.44 If α = #(A) ∈ C , then

#(P(A)) = 2α .

Proof We already proved that there exists a bijection between P(A) and 2A . That is,
P(A) ≈ 2A . Therefore,
#(P(A)) = #(2A ) = 2α .

Remark 5.1.45 1. The above theorem can be re-stated by that: # (P(A)) = 2#(A),
for all sets A.
2. Cantor’s theorem tell us that, for any cardinal number α ,

α < 2α .

3. ℵ < 2ℵ .
4. 2ℵ = c.
Cardinality of Sets 149

Theorem 5.1.46 On the set C of cardinal numbers, we have


1. ℵℵ = ℵ,
2. ℵc = c,
3. cc = c.

Proof
1. Since N × N is countable,
N × N ≈ N.
Therefore, ℵℵ = ℵ.
2. Let f : N × (0,1) → (0, ∞) be a function defined by

f (x, y) = x + y.

It is not difficult to show that f is a bijection. So,

N × (0, 1) ≈ (0, ∞).

Hence, #(N × (0, 1)) = #(0, ∞). Therefore, ℵc = c.


3. We have cc = #({(x, y) : x, y ∈ (0, 1)}) and x, y can be written in the digit form
of infinite decimals as follows:

x = 0.x1 x2 x3 . . . ,
y = 0.y1 y2 y3 . . . .

Note that z = 0.x1 y1 x2 y2 . . . is an element in (0, 1), too. So we have defined a


one-to-one function,
f : (0, 1) × (0, 1) → (0, 1).
Conversely, one can define a one-to-one function,

g : (0, 1) → (0, 1) × (0, 1).

So,
(0, 1) × (0, 1) ≈ (0, 1).
i.e., we have
#((0, 1) × (0, 1) = #(0, 1).
Therefore, cc = c.
150 Concise Introduction to Logic and Set Theory

5.1.4 ORDER TYPES


The set C of all cardinal numbers is ordered in the following manner.

Definition 5.1.47 Let α and β be cardinal numbers. We say that α ≤ β , (which is


read α is less than or equal to β ), if there exists a one-to-one function f : A → B,
where α = #(A) and β = #(B).

Example 5.1.48 Since N is a proper subset of R,

#(N) = ℵ ≤ c = #(R).

Furthermore, since N is countable, and R is uncountable,

ℵ < c.

Example 5.1.49 Let A, B, and C be sets, such that

α = #(A), β = #(B), γ = #(C).

If f : A → B is one-to-one, and g : B → C is one-to-one, then g ◦ f : A → C is one-to-


one. Therefore
if α ≤ β , and β ≤ γ , then α ≤ γ .

Example 5.1.50 For every cardinal number α ∈ C ,

α ≤ α,

since every set is a subset of itself.

In view of the preceding examples, the following theorem holds true.

Theorem 5.1.51 For cardinal numbers α , β , and γ , the following properties hold:
1. α ≤ α (Reflexiveness).
2. If α ≤ β and β ≤ α , then α = β (Anti-symmetry).
3. If α ≤ β and β ≤ γ , then α ≤ γ (Transitivity).

Proof By definition, for all α ∈ C ,

α ≤ α in C .

Suppose α , β ∈ C , and assume that

α ≤ β , and β ≤ α .

If α = #(A), and β = #(B), for sets A and B, then the above order relations (or,
inequalities) mean that
f (A) ⊆ B, and f −1 (B) ⊆ A,
Cardinality of Sets 151

where f : A → B is an one-to-one function, and

f −1 (B) = {a ∈ A | f (a) ∈ B}

is the pre image of f . By the one-to-one-ness of f and the second set inclusion, one
can realize that the pre image f −1 (B) is identified with the range of the inverse
f −1 : B → A, implying that this one-to-one function f is actually a bijection. In other
words,
A ≈ B, if and only if #(A) = #(B).
Therefore, two cardinal numbers α and β are identically same in C .
Now, assume that
α ≤ β and β ≤ γ ,
in C . If α = #(A), β = #(B), and γ = #(C) for sets A, B, and C, respectively, then
the above inequalities implies that

f (A) ⊆ B and g(B) ⊆ C,

for one-to-one functions f : A → B and g : B → C. So, there exists a one-to-one func-


tion,
g ◦ f : A → C,
implying that
g ◦ f (A) ⊆ C.
By the one-to-one-ness of g ◦ f , we have

#(A) ≤ #(C), if and only if α ≤ γ .

5.1.5 MORE ABOUT CARDINAL NUMBERS


In this section, we study more relations between cardinal numbers and cardinalities.

Theorem 5.1.52 (Cantor’s theorem) If A is a set, then

#(A) < #(P(A)).

Proof Let g : A → P(A) be a function defined by

g(a) = {a}.

It is clear that g is one-to-one. Hence

#(A) ≤ #(P(A)).

Thus, it is sufficient to show that #(A) 6= #(P(A)). Suppose #(A) = #(P(A)), that is,
A ≈ P(A). Then there exists a function g : A → P(A), which is a bijection. Let

B = {x ∈ A : x 6∈ g(x)}.
152 Concise Introduction to Logic and Set Theory

It is clear that B ⊆ A, B ∈ P(A). Since g is onto P(A), there exists a ∈ A such that
g(a) = B. So, if a ∈ B, then a 6∈ g(a) = B, meanwhile, if a 6∈ B, then a ∈ g(a), which
implies a ∈ B. Thus, we obtain contradictions in both possible cases.
It means that there does not exist a bijection between A and P(A), equivalently,
#(A) 6= #(P(A)). Therefore,
#(A) < #(P(A)).
It is not difficult to check that if a set A is finite, then

#(A) < 2#(A) = # (P(A)) .

Also, by the above theorem, one can have

#(N) = ℵ < c = #(R),

and hence,
# (P(N)) = c = # (R) ,
implying that the cardinalities of the power sets of infinitely countable sets are identi-
fied with continuum c, and they are understood to be the cardinalities of uncountable
sets. Equivalently, that
2ℵ = c,
in set C of all cardinal numbers.

Lemma 5.1.53 Let A be a subset of a set B, and let f : B → A be one-to-one function.


Then, for each X ⊆ (B − A), there exists a bijection,

f0 : B → A ∪ X.

Proof Let f1 : X → X be a function satisfying

f1 (X) = X,

and let f2 : X → A be a function satisfying

f2 (X) = f ( f1 (X)).

Define fi+1 : X → A by functions satisfying the recurrence relation,

fi+1 (X) = f ( fi (X)), i = 1, 2, . . . , n.

Let

[
C= fi (X).
i=1

It is clear that C = f (C) ∪ X. Now, define the function

f0 : B → A ∪ X by
Cardinality of Sets 153
(
b, if b ∈ C,
f0 (b) =
f (b), if b ∈ B − C.
The function f0 is onto, since

f0 (B) = f0 (C ∪ (B − C))
= f0 (C) ∪ f0 (B − C)
= C ∪ f (B − C)
= X ∪ F(C) ∪ f (B − C)
= X ∪ f (B)
= X ∪ A.

Also f0 is one-to-one, because f0 |C and f0 |B−C are one-to-one functions.


In addition,
f0 (C) ∩ f0 (B − C) = φ .
Therefore, the function f0 : B → A ∪ X is a bijection.

Theorem 5.1.54 (Schröder–Bernstein) Let A and B be sets. If A is equipotent to a


subset of B, and B is equipotent to a subset of A, then

A ≈ B.

Proof Let g : A → B1 be a bijection, where B1 ⊆ B, and h : B → A1 a bijection, where


A1 ⊆ A. Then the function

(g ◦ h) : B → (g ◦ h)(B)

is a bijection.
Let S = B1 − (g ◦ h)(B). Then, by the above lemma, there exists a bijection be-
tween B and B1 , where
B1 = (g ◦ h)(B) ∪ S.
Hence
B ≈ B1 ,
but B1 ≈ A. Consequently A ≈ B.

Corollary 5.1.55 If α , β ∈ C are cardinal numbers, then

if α ≤ β and β ≤ α , then α = β .

Proof The proof is done by the very above theorem.


154 Concise Introduction to Logic and Set Theory

5.2 AXIOM OF CHOICE


In 1954, Zermelo clarifies that there is an axiom that is used implicitly in mathemat-
ics. This axiom, called the axiom of choice, is not derived from any previous axioms
in mathematics. We here emphasize that there are “many” “equivalent” forms, or
statements, of the axiom of choice in various different mathematics fields. The read-
ers can find different expressions of this axiom in many different texts. All of those
equivalent forms of “the” axiom of choice say the same meaning:

we can choose certain elements in sets.

Here, we introduce the following form of the axiom of choice.


The Axiom of Choice. If {Ai }i∈I is a family of nonempty sets, then there exists a
function, [
f : I → Ai ,
i∈I

such that f (i) ∈ Ai , ∀ i ∈ I.


It is clear that, if the index set I≈ Nk is a finite set for some k ∈ N, then one can
choose a1 ∈ A1 , a2 ∈ A2 , . . . , ak ∈ Ak . While, if I is an infinite set, then the axiom
will be opaque.

Definition 5.2.1 Let A be a set and let

P′ (A) = P(A) − {φ }.

The function f : P′ (A) → A, given by

f (B) ∈ B, ∀ B ∈ P′ (A),

is called a choice function. Sometimes, we write fB instead of f (B).

Such a choice function f is well-defined by the axiom of choice. That is, one can
choose f (b) as an element of B, for b ∈ B, and for all B ∈ P (A).

Example 5.2.2 Let A = {a, b}. As an example of the choice function on A, we


present a function,
f : P′ (A) → A,
where

f ({a, b}) = a,
f ({a}) = a,
f ({b}) = b.
Cardinality of Sets 155

Exercises
1. Arrange the following cardinal numbers in order:

#({0, 1}), #([0, 1]), #({0}), #(P(R)), #(Q), #(φ )


#(P(P(Nk ))), #(R), #(R − Q).

2. Prove that if n ∈ N, then n < ℵ.


3. Let α , β , and γ be cardinal numbers. Prove that if α ≤ β , then

(a) α γ ≤ β γ ,
(b) γ α ≤ γ β ,
(c) α + γ ≤ β + γ .
(d) αγ ≤ β γ .

4. Let α , β , and γ be cardinal numbers. Prove that

(a) αβ = 0 ⇒ α = 0 ∨ β = 0,
(b) αβ = 1 ⇒ α = 1 ∧ β = 1.

5. Let α , β , and γ be cardinal numbers. Prove that

α ≤ β ⇔ ∃γ , such that β = α + γ .

6. Let α , β , γ , and δ be cardinal numbers, such that α ≤ γ , β ≤ δ .


Prove that

(a) α β ≤ γ δ ,
(b) αβ ≤ γδ .

7. Let α , β , and γ be cardinal numbers. Prove that

(a) αβ < αγ ⇒ β < γ ,


(b) α + β ≤ α + γ ⇒ β < γ .
Bibliography
1. Bittinger, M.L., Logic, Proof and Sets, Addison-Wesley, Boston, 1982.

2. Cohen, P.J., Set Theory and The Continuum Hypothesis, Dover Publications, Inc., New
York, 2008.

3. Dummit, D. S. and Foote, R. M., Abstract Algebra, 2nd Edition, Wiley India Pvt. Ltd.,
New Delhi, 2008.

4. Hall, M., The Theory of Groups, Dover Publications, Inc., New York, 2018.

5. Kamke, E., Theory of Sets, Dover Publications, Inc., New York, 2003.

6. Senthil Kumar, B. V. and Dutta, H., Discrete Mathematical Structures: A Succinct


Foundation, 1st Edition, CRC Press, Boca Raton, 2019.

7. Lipschutz, S., Theory and Problems of Set Theory and Related Topics, Schaum
Publishing Co., New York, 1964.

8. Malik, S.B., Basic Number Theory, Vikas Publishing House Pvt. Ltd., New Delhi,
1996.

9. Rosen, K., Discrete Mathematics and Its Applications with Combinatorics and Graph
Theory, 7th Edition, McGraw Hill Education, New York, 2017.

10. Smith, D., and Andre, R. St., A Transition to Advanced Mathematics, 5th Edition,
S.Chand (G/L) & Company Ltd, New Delhi, 2001.

11. Spence, L.E., and Eynden, C.V., Elementary Abstract Algebra, Harpercollins College
Div, New York,1993.

12. Suppes, P., Axiomatic Set Theory, Dover Publications, Inc., New York, 2012.

157
Index
A intersection of sets, 34–39
Absolute value function, 106, 107 union of sets, 32–34
Antisymmetric relation, 68 Equivalence classes, 70–76
Axiom of choice, 154–155 Equivalence relations, 70–76, 135
Euler, 97
B Even integers, 2
Bernoulli, J., 97
Bijection, 134, 135, 141, 152, 153 F
Functions, 97–131
C composite functions, 114–125
Canonical function, 107, 108 direct images and inverse images,
Cardinal arithmetic, 144–149 125–131
Cardinality, sets, 133–155 domain and range, 97–99
cardinal number, 133–153 graph of, 99–101
countable sets, 140–143 inverse functions, 114–125
equipotent sets, 133–139 onto functions, 101–110
order types, 150–151
Cartesian product, 51–55, 92, 109, G
140 Generalized distribution law,
Characteristic function, 105 47–48
Closed interval, 2
Complex numbers, 2 H
Composite proposition, 4 Half-open interval, 2
Composite relations, 114 Hasse diagram, 86
Composition, 115
Compound proposition, 10 I
Congruence, 76–79 Identity function, 104
Connectives, 3–7 Inclusion function, 105, 123
Constant function, 104 Indexed families, sets, 45–49
Contradiction, 10–12, 20–23 Indexing set, 45
Contrapositive proof, 18–20 Induction, 23–28
principle, 24–27
D Integers, 1
Direct images, 125–131 Intersection of sets, 34–39
Direct proof, 18–20 Inverse functions, 114–125,
Distance function, 108, 109 133
Inverse images, 125–131
E
Elementary properties, sets L
difference and symmetric Leibnitz, G.W., 97
difference, 42–45 Logical reasoning, 16–18

159
160 INDEX

M Reflexive relation, 66, 67, 75


Mathematical logic, 1–28 Relations, 51–96
logical reasoning, 16–18 cartesian product, 51–55
propositions and connectives, congruence, 76–79
3–9 equivalence classes, 70–76
quantifiers, 12–14 equivalence relations, 70–76
sets, 1–3 ordered pairs, 51–55
tautology and contradiction, partial and total ordered,
10–12 83–94
Mathematical proof on sets, 56–66
contradiction proof, 20–23 type of, 66–70
direct and contrapositive proof, Restriction, 105, 106
18–20
induction, 23–28 S
Set theory, 1–3, 29–49
N basic notions of, 29–32
Natural numbers, 1 cardinality of, 133–155
Negation, 5 difference and symmetric
Negative integers, 2 difference, 42–45
Numerical function, 106 elementary properties of,
32–45
O indexed families of, 45–49
Odd integers, 2 intersection of sets, 34–39
One-to-one functions, 101–110, relations on, 56–66
138, 149, 152, 153 union of sets, 32–34
Open interval, 2
Ordered pairs, 51–55
T
Tautology, 10–12
P
Total ordered relations, 83–94
Partial ordered relations, 83–94
Transfinite cardinal number,
Positive integers, 2
140
Projection functions, 109
Transitive relation, 68
Propositions, 3–9, 16, 17
Truth tables, 4, 7
Q
Quantifiers, 12–14
V
R Valid argument, 16
Rational numbers, 1
Real numbers, 2 Z
Zermelo, 154

You might also like