+ All Categories
Home > Documents > Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf ·...

Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf ·...

Date post: 06-Sep-2018
Category:
Upload: vuthien
View: 243 times
Download: 3 times
Share this document with a friend
30
Chapter One Sets, Logic, Numbers, Relations, Orderings, Graphs, and Functions In this chapter we review basic terminology and results concerning sets, logic, numbers, rela- tions, orderings, graphs, and functions. This material is used throughout the book. 1.1 Sets A set { x, y,...} is a collection of elements. A set can include either a finite or infinite number of elements. The set X is finite if it has a finite number of elements; otherwise, X is infinite. The set X is countably infinite if X is infinite and its elements are in one-to-one correspondence with the positive integers. The set X is countable if it is either finite or countably infinite. Let X be a set. Then, x X (1.1.1) means that x is an element of X. If w is not an element of X, then we write w < X. (1.1.2) No set can be an element of itself. Therefore, there does not exist a set that includes every set. The set with no elements, denoted by , is the empty set. If X , , then X is nonempty. Let X and Y be sets. The intersection of X and Y is the set of common elements of X and Y, which is given by X Y = { x : x X and x Y} = { x X: x Y} = { x Y: x X} = Y X, (1.1.3) The union of X and Y is the set of elements in either X or Y, which is the set X Y = { x : x X or x Y} = Y X. (1.1.4) The complement of X relative to Y is Y\X = { x Y: x < X}. (1.1.5) If Y is specified, then the complement of X is X = Y\X. (1.1.6) The symmetric dierence of X and Y is the set of elements that are in either X or Y but not both, which is given by X Y = (X Y)\(X Y). (1.1.7) If x X implies that x Y, then X is a subset of Y (equivalently, Y contains X), which is written as X Y. (1.1.8) Equivalently, Y X. (1.1.9) © Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher. For general queries, contact [email protected]
Transcript
Page 1: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 1 — #47 ii

ii

ii

Chapter OneSets, Logic, Numbers, Relations, Orderings,Graphs, and Functions

In this chapter we review basic terminology and results concerning sets, logic, numbers, rela-tions, orderings, graphs, and functions. This material is used throughout the book.

1.1 SetsA set {x, y, . . .} is a collection of elements. A set can include either a finite or infinite number

of elements. The set X is finite if it has a finite number of elements; otherwise, X is infinite. Theset X is countably infinite if X is infinite and its elements are in one-to-one correspondence with thepositive integers. The set X is countable if it is either finite or countably infinite.

Let X be a set. Then,

x ∈ X (1.1.1)

means that x is an element of X. If w is not an element of X, then we write

w < X. (1.1.2)

No set can be an element of itself. Therefore, there does not exist a set that includes every set. Theset with no elements, denoted by ∅, is the empty set. If X , ∅, then X is nonempty.

Let X and Y be sets. The intersection of X and Y is the set of common elements of X and Y,which is given by

X ∩ Y△= {x: x ∈ X and x ∈ Y} = {x ∈ X: x ∈ Y} = {x ∈ Y: x ∈ X} = Y ∩ X, (1.1.3)

The union of X and Y is the set of elements in either X or Y, which is the set

X ∪ Y△= {x: x ∈ X or x ∈ Y} = Y ∪ X. (1.1.4)

The complement of X relative to Y is

Y\X △= {x ∈ Y: x < X}. (1.1.5)

If Y is specified, then the complement of X is

X∼△= Y\X. (1.1.6)

The symmetric difference of X and Y is the set of elements that are in either X or Y but not both,which is given by

X ⊖ Y △= (X ∪ Y)\(X ∩ Y). (1.1.7)

If x ∈ X implies that x ∈ Y, then X is a subset of Y (equivalently, Y contains X), which is written as

X ⊆ Y. (1.1.8)

Equivalently,Y ⊇ X. (1.1.9)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 2: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 2 — #48 ii

ii

ii

2 CHAPTER 1

Note that X ⊆ Y if and only if X\Y = ∅. Furthermore, X = Y if and only if X ⊆ Y and Y ⊆ X. IfX ⊆ Y and X , Y, then X is a proper subset of Y and we write X ⊂ Y. The sets X and Y are disjointif X ∩ Y = ∅. A partition of X is a set of pairwise-disjoint and nonempty subsets of X whose unionis equal to X.

The symbolsN, P, Z,Q, andR denote the sets of nonnegative integers, positive integers, integers,rational numbers, and real numbers, respectively.

A set cannot have repeated elements. Therefore, {x, x} = {x}. A multiset is a finite collection ofelements that allows for repetition. The multiset consisting of two copies of x is written as {x, x}ms.For example, the roots of the polynomial p(x) = (x − 1)2 are the elements of the multiset {1, 1}ms ,while the prime factors of 72 are the elements of the multiset {2, 2, 2, 3, 3}ms.

The operations “∩,” “∪,” “\,” “⊖,” and “×” and the relations “⊂” and “⊆” extend to multisets.For example,

{x, x}ms ∪ {x}ms = {x, x, x}ms. (1.1.10)

By ignoring repetitions, a multiset can be converted to a set, while a set can be viewed as a multisetwith distinct elements.

The Cartesian product X1× · · · ×Xn of sets X1, . . . ,Xn is the set consisting of tuples of the form(x1, . . . , xn), where, for all i ∈ {1, . . . , n}, xi ∈ Xi. A tuple with n components is an n-tuple. Thecomponents of a tuple are ordered but need not be distinct. Therefore, a tuple can be viewed as anordered multiset. We thus write

(x1, . . . , xn) ∈�ni=1Xi

△= X1× · · · × Xn. (1.1.11)

Xn denotes�n

i=1 X.

Definition 1.1.1. A sequence (xi)∞i=1 = (x1, x2, . . .) is a tuple with a countably infinite numberof components. Now, let i1 < i2 < · · · . Then, (xi j )

∞j=1 is a subsequence of (xi)∞i=1.

Let X be a set, and let X △= (xi)∞i=1 be a sequence whose components are elements of X; that is,

{x1, x2, . . .} ⊆ X. For convenience, we write either X ⊆ X or X ⊂ X, where X is viewed as a setand the multiplicity of the components of the sequence is ignored. For sequences X,Y ⊂ Fn, defineX + Y △

= (xi + yi)∞i=1 and X ⊙ Y △= (xi ⊙ yi)∞i=1, where “⊙” denotes component-wise multiplication. In

the case n = 1, we define XY △= (xiyi)∞i=1.

1.2 LogicEvery statement is either true or false, and no statement is both true and false. A proof is a

collection of statements that verify that a statement is true. A conjecture is a statement that isbelieved to be true but whose proof is not known.

Let A and B be statements. The not of A is the statement (not A), the and of A and B is thestatement (A and B), and the or of A and B is the statement (A or B). The statement (A or B) doesnot contradict the statement (A and B); hence, the word “or” is inclusive. The exclusive or of A and Bis the statement (A xor B), which is [(A and not B) or (B and not A)]. Equivalently, (A xor B) is thestatement [(A or B) and not(A and B)], that is, A or B, but not both. Note that (A and B) = (B and A),(A or B) = (B or A), and (A xor B) = (B xor A).

Let A, B, and C be statements. Then, the statements (A and B or C) and (A or B and C) areambiguous. For clarity, we thus write, for example, [A and (B or C)] and [A or (B and C)]. In words,we write “A and either B or C” and “A or both B and C,” respectively, where “either” and “both”signify parentheses. Furthermore,

(A and B) or C = (A and C) or (B and C), (1.2.1)(A or B) and C = (A or C) and (B or C). (1.2.2)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 3: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 3 — #49 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 3

Let A be a statement. To analyze statements involving logic operators, define truth(A) = 1 if Ais true, and truth(A) = 0 if A is false. Then,

truth(not A) = truth(A) + 1, (1.2.3)

where 0+ 0 = 0, 1+ 0 = 0+ 1 = 1, and 1+ 1 = 0. Therefore, A is true if and only if (not A) is false,while A is false if and only if (not A) is true. Note that

truth[not(not A)] = truth(not A) + 1= [truth(A) + 1] + 1= truth(A).

Furthermore, note that truth(A) + truth(A) = 0 and truth(A) truth(A) = truth(A).Let A and B be statements. Then,

truth(A and B) = truth(A) truth(B), (1.2.4)truth(A or B) = truth(A) truth(B) + truth(A) + truth(B), (1.2.5)

truth(A xor B) = truth(A) + truth(B). (1.2.6)

Hence,

truth(A and B) = min {truth(A), truth(B)}, (1.2.7)truth(A or B) = max {truth(A), truth(B)}. (1.2.8)

Consequently, truth(A and B) = truth(B and A), truth(A or B) = truth(B or A), and truth(A xor B) =truth(B xor A). Furthermore, truth(A and A) = truth(A or A) = truth(A), and truth(A xor A) = 0.

Let A and B be statements. The implication (A =⇒ B) is the statement [(not A) or B]. Therefore,

truth(A =⇒ B) = truth(A) truth(B) + truth(A) + 1. (1.2.9)

The implication (A =⇒ B) is read as either “if A, then B,” “if A holds, then B holds,” or “A impliesB.” The statement A is the hypothesis, while the statement B is the conclusion. If (A =⇒ B), thenA is a sufficient condition for B, and B is a necessary condition for A. It follows from (1.2.9) that,if A and B are true, then (A =⇒ B) is true; if A is true and B is false, then (A =⇒ B) is false;and, if A is false, then (A =⇒ B) is true whether or not B is true. For example, both implications[(2 + 2 = 5) =⇒ (3 + 3 = 6)] and [(2 + 2 = 5) =⇒ (3 + 3 = 8)] are true. Finally, note that[(A =⇒ B) and A] = A and B.

A predicate is a statement that depends on a variable. Let X be a set, let x ∈ X, and let A(x) be apredicate. There are two ways to use a predicate to create a statement. An existential statement hasthe form

there exists x ∈ X such that A(x) holds, (1.2.10)

whereas a universal statement has the form

for all x ∈ X, A(x) holds. (1.2.11)

Note that

truth[there exists x ∈ X such that A(x) holds] = maxx∈X

truth[A(x)], (1.2.12)

truth[for all x ∈ X, A(x) holds] = minx∈X

truth[A(x)]. (1.2.13)

An argument is an implication whose hypothesis and conclusion are predicates that depend onthe same variable. In particular, letting x denote a variable, and letting A(x) and B(x) be predicates,

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 4: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 4 — #50 ii

ii

ii

4 CHAPTER 1

the implication [A(x) =⇒ B(x)] is an argument. For example, for each real number x, the implication[(x = 1) =⇒ (x + 1 = 2)] is an argument. Note that the variable x links the hypothesis and theconclusion, thereby making this implication useful for the purpose of inference. In particular, for allreal numbers x, truth[(x = 1) =⇒ (x + 1 = 2)] = 1. The statements (for all x, [A(x) =⇒ B(x)] holds)and (there exists x such that [A(x) =⇒ B(x)] holds) are inferences.

Let A and B be statements. The bidirectional implication (A ⇐⇒ B) is the statement [(A =⇒B) and (A ⇐= B)], where (A ⇐= B) means (B =⇒ A). If (A ⇐⇒ B), then A and B are equivalent.Furthermore,

truth(A⇐⇒ B) = truth(A) + truth(B) + 1. (1.2.14)

Therefore, A and B are equivalent if and only if either both A and B are true or both A and B arefalse.

Let A and B be statements, and assume that (A ⇐⇒ B). Then, A holds if and only if B holds.The implication A =⇒ B (the “only if” part) is necessity, while B =⇒ A (the “if” part) is sufficiency.

Let A and B be statements. The converse of (A =⇒ B) is (B =⇒ A). Note that

(A =⇒ B)⇐⇒ [(not A) or B]⇐⇒ [(not A) or not(not B)]⇐⇒ [not(not B) or not A]⇐⇒ (not B =⇒ not A).

Therefore, the statement (A =⇒ B) is equivalent to its contrapositive [(not B) =⇒ (not A)].Let A, B, A′, and B′ be statements, and assume that (A′ =⇒ A =⇒ B =⇒ B′). Then, (A′ =⇒ B′)

is a corollary of (A =⇒ B).Let A, B, and A′ be statements, and assume that A =⇒ B. Then, (A =⇒ B) is a strengthening

of [(A and A′) =⇒ B]. If, in addition, (A =⇒ A′), then the statement [(A and A′) =⇒ B] has aredundant assumption.

An interpretation is a feasible assignment of true or false to all statements that comprise astatement. For example, there are four interpretations of the statement (A and B), depending onwhether A is assigned to be true or false and B is assigned to be true or false. Likewise, [(x =1) and (x = 2)] has three interpretations, which depend on the value of x.

Let A1, A2, . . . be statements, and let B be a statement that depends on A1, A2, . . . Then, B is atautology if B is true whether or not A1, A2, . . . are true. For example, let B denote the statement(A or not A). Then,

truth(A or not A) = 1, (1.2.15)

and thus the statement (A or not A) is true whether or not A is true. Hence, (A or not A) is a tautol-ogy. Likewise, (A =⇒ A) is a tautology. Furthermore, since

truth[(A and B) =⇒ A] = truth(A)2 truth(B) + truth(A) truth(B) + 1 = 1, (1.2.16)

it follows that [(A and B) =⇒ A] is a tautology. Likewise, truth([A and not A] =⇒ B) = 1, and thus([A and not A] =⇒ B) is a tautology.

Let A1, A2, . . . be statements, and let B be a statement that depends on A1, A2, . . . Then, B is acontradiction if B is false whether or not A1, A2, . . . are true. For example, let B denote the statement(A and not A). Then,

truth(A and not A) = 0, (1.2.17)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 5: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 5 — #51 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 5

and thus the statement (A and not A) is false whether or not A is true. Hence, (A and not A) is acontradiction.

Let A and B be statements. If the implication (A =⇒ B) is neither a tautology nor a contradiction,then truth(A =⇒ B) depends on the truth of the statements that comprise A and B. For example,truth(A =⇒ not A) = truth(A) + 1, and thus the statement (A =⇒ not A) is true if and only ifA is false, and false if and only if A is true. Hence, (A =⇒ not A) is neither a tautology nor acontradiction. A statement that is neither a tautology nor a contradiction is a contingency. Forexample, the implication [A =⇒ (A and B)] is a contingency. Likewise, for each real number x,truth[(x = 1) =⇒ (x = 2)] = truth(x , 1), and thus the statement [(x = 1) =⇒ (x = 2)] is acontingency.

An argument that is a contingency is a theorem, proposition, corollary, or lemma. A theorem isa significant result; a proposition is a theorem of less significance. The primary role of a lemma isto support the proof of a theorem or a proposition. A corollary is a consequence of a theorem or aproposition. A fact is either a theorem, proposition, lemma, or corollary.

In order to visualize logic operations on predicates, it is helpful to replace statements with setsand logic operations by set operations; the truth of a statement can then be visualized in terms ofVenn diagrams. To do this, let X be a set, for all x ∈ X, let A(x) and B(x) be predicates, and defineA

△= {x ∈ X : truth[A(x)] = 1} and B

△= {x ∈ X : truth[B(x)] = 1}. Then, the logic operations

“and,” “or,” “xor,” and “not” are equivalent to “∩,” “∪,” “⊖,” and “∼,” respectively. For example,{x ∈ X : truth[(not A(x)) and B(x)] = 1} = A∼ ∩B. Furthermore, since [A(x) =⇒ B(x)] is equivalentto [(not A(x)) or B(x)], it follows that {x ∈ X : truth[A(x) =⇒ B(x)] = 1} = A∼ ∪ B. Similarly,since [A(x) ⇐⇒ B(x)] is equivalent to [(A(x) or not B(x)) and ([not A(x)] or B(x))], it follows that{x ∈ X : A(x)⇐⇒ B(x)} = (A ∪B∼) ∩ (A∼ ∪B) = (A ∩B) ∪ (A ∪B)∼.

Now, define X, A(x), B(x), A, and B as in the previous paragraph, and assume that, for all x ∈ X,A(x) =⇒ B(x). Therefore, A∼ ∪ B = {x ∈ X : truth[(not A(x)) or B(x)] = 1} = X, and thus A\B =(A∼ ∪B)∼ = {x ∈ X : truth[(not A(x)) or B(x)] = 0} = ∅. Consequently, A ⊆ B. This means that thelogic operator “=⇒” is represented by “⊆.” For example, for all x ∈ X, let C(x) be a predicate, anddefine C

△= {x ∈ X : truth[C(x)] = 1}. Then, for all x ∈ X, truth[(A(x) and B(x)) =⇒ C(x)] = 1 if and

only if A ∩B ⊆ C. Likewise, for all x ∈ X,

truth([A(x) and (B(x) or C(x))]⇐⇒ [(A(x) and B(x)) or (A(x) and C(x))]) = 1 (1.2.18)

if and only if

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

Note that (1.2.19) represents a tautology.

1.3 Relations and OrderingsLet X, X1, and X2 be sets. A relation R on (X1,X2) is a subset of X1× X2. A relation R on X

is a subset of X × X. Likewise, a multirelation R on (X1,X2) is a multisubset of X1 × X2, while amultirelation R on X is a multisubset of X × X.

Let X be a set, and let R1 and R2 be relations on X. Then, the sets R1∩R2, R1\R2, and R1∪R2are relations on X. Furthermore, if R is a relation on X and X0 ⊆ X, then we define the restrictedrelation R|X0

△= R ∩ (X0 × X0), which is a relation on X0.

Definition 1.3.1. Let R be a relation on the set X. Then, the following terminology is defined:i) R is reflexive if, for all x ∈ X, it follows that (x, x) ∈ R.

ii) R is symmetric if, for all (x1, x2) ∈ R, it follows that (x2, x1) ∈ R.iii) R is transitive if, for all (x1, x2) ∈ R and (x2, x3) ∈ R, it follows that (x1, x3) ∈ R.iv) R is an equivalence relation if R is reflexive, symmetric, and transitive.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 6: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 6 — #52 ii

ii

ii

6 CHAPTER 1

Proposition 1.3.2. Let R1 and R2 be relations on the set X. If R1 and R2 are (reflexive,symmetric) relations, then so are R1 ∩ R2 and R1 ∪ R2. If R1 and R2 are (transitive, equivalence)relations, then so is R1∩ R2.

Definition 1.3.3. Let R be a relation on the set X. Then, the following terminology is defined:i) The complement R∼ of R is the relation R∼

△= (X × X)\R.

ii) The support supp(R) of R is the smallest subset X0 of X such that R is a relation on X0.

iii) The reversal rev(R) of R is the relation rev(R) △= {(y, x) : (x, y) ∈ R}.iv) The shortcut shortcut(R) of R is the relation shortcut(R) △

= {(x, y) ∈ X × X: x and y aredistinct and there exist k ≥ 1 and x1, . . . , xk ∈ X such that (x, x1), (x1, x2), . . . , (xk, y) ∈ R}.

v) The reflexive hull ref(R) of R is the smallest reflexive relation on X that contains R.vi) The symmetric hull sym(R) of R is the smallest symmetric relation on X that contains R.

vii) The transitive hull trans(R) of R is the smallest transitive relation on X that contains R.viii) The equivalence hull equiv(R) of R is the smallest equivalence relation on X that contains

R.

Proposition 1.3.4. Let R be a relation on the set X. Then, the following statements hold:i) ref(R) = R ∪ {(x, x) : x ∈ X}.

ii) sym(R) = R ∪ rev(R).iii) trans(R) = R ∪ shortcut(R).iv) If R is symmetric, then trans(R) = sym(trans(R)).v) equiv(R) = trans(sym(ref(R))).

Furthermore, the following statements hold:vi) R is reflexive if and only if R = ref(R).

vii) The following statements are equivalent:a) R is symmetric.b) R = sym(R).c) R = rev(R).

viii) R is transitive if and only if R = trans(R).ix) R is an equivalence relation if and only if R = equiv(R).

For an equivalence relation R on the set X, (x1, x2) ∈ R is denoted by x1 ≡ x2. If R is anequivalence relation and x ∈ X, then the subset Ex

△= {y ∈ X: y ≡ x} of X is the equivalence class of

x induced by R.Theorem 1.3.5. Let R be an equivalence relation on a set X. Then, the set {Ex : x ∈ X} of

equivalence classes induced by R is a partition of X.Proof. Since X =

∪x∈XEx, it suffices to show that, if x, y ∈ X, then either Ex = Ey or Ex∩Ey = ∅.

Hence, let x, y ∈ X, and suppose that Ex and Ey are not disjoint so that there exists z ∈ Ex ∩ Ey.Thus, (x, z) ∈ R and (z, y) ∈ R. Now, let w ∈ Ex. Then, (w, x) ∈ R, (x, z) ∈ R, and (z, y) ∈ R

imply that (w, y) ∈ R. Hence, w ∈ Ey, which implies that Ex ⊆ Ey. By a similar argument, Ey ⊆ Ex.Consequently, Ex = Ey. �

The following result, which is the converse of Theorem 1.3.5, shows that a partition of a set Xdefines an equivalence relation on X.

Theorem 1.3.6. Let X be a set, let P be a partition of X, and define the relation R on X by(x, y) ∈ R if and only if x and y belong to the same element of P. Then, R is an equivalence relationon X.

Theorem 1.3.5 shows that every equivalence relation induces a partition, while Theorem 1.3.6

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 7: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 7 — #53 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 7

shows that every partition induces an equivalence relation.Definition 1.3.7. Let X be a set, let P be a partition of X, and let X0 ⊆ X. Then, X0 is a

representative subset of X relative to P if, for all X∈P, exactly one element of X0 is an element of X.Definition 1.3.8. Let R be a relation on the set X. Then, the following terminology is defined:i) R is antisymmetric if (x1, x2) ∈ R and (x2, x1) ∈ R imply that x1 = x2.

ii) R is a partial ordering if R is reflexive, antisymmetric, and transitive.iii) (X,R) is a partially ordered set if R is a partial ordering.

Let (X,R) be a partially ordered set. Then, (x1, x2) ∈ R is denoted by x1 ≼ x2. If x1 ≼ x2 andx2 ≼ x1, then, since R is antisymmetric, it follows that x1 = x2. Furthermore, if x1 ≼ x2 and x2 ≼ x3,then, since R is transitive, it follows that x1 ≼ x3.

Definition 1.3.9. Let (X,R) be a partially ordered set. Then, the following terminology isdefined:

i) Let S ⊆ X. Then, y ∈ X is a lower bound for S if, for all x ∈ S, it follows that y ≼ x.ii) Let S ⊆ X. Then, y ∈ X is an upper bound for S if, for all x ∈ S, it follows that x ≼ y.The following result shows that every partially ordered set has at most one lower bound that is

“greatest” and at most one upper bound that is “least.”Lemma 1.3.10. Let (X,R) be a partially ordered set, and let S ⊆ X. Then, there exists at most

one lower bound y ∈ X for S such that every lower bound x ∈ X for S satisfies x ≼ y. Furthermore,there exists at most one upper bound y ∈ X for S such that every upper bound x ∈ X for S satisfiesy ≼ x.

Proof. For i = 1, 2, let yi ∈ X be such that yi is a lower bound for S and, for all x ∈ X, x ≼ yi.Therefore, y1 ≤ y2 and y2 ≤ y1. Since “≼” is antisymmetric, it follows that y1 = y2. �

Definition 1.3.11. Let (X,R) be a partially ordered set. Then, the following terminology isdefined:

i) Let S ⊆ X. Then, y ∈ X is the greatest lower bound for S if y is a lower bound for S andevery lower bound x ∈ X for S satisfies x ≼ y. In this case, we write y = glb(S).

ii) Let S ⊆ X. Then, y ∈ X is the least upper bound for S if y is an upper bound for S and everyupper bound x ∈ X for S satisfies y ≼ x. In this case, we write y = lub(S).

iii) (X,≼) is a lattice if, for all distinct x, y ∈ X, the set {x, y} has a least upper bound and agreatest lower bound.

iv) (X,≼) is a complete lattice on X if every subset S of X has a least upper bound and agreatest lower bound.

Example 1.3.12. Consider the partially ordered set (P,≼), where m ≼ n indicates that n is aninteger multiple of m. For example, 3 ≼ 21, but it is not true that 2 ≼ 3. Next, note that the greatestlower bound of a subset S of P is the greatest common divisor of the elements of S. For example,glb {9, 21} = 3. Likewise, the least upper bound of a subset S of P is the least common multiple ofthe elements of S. For example, lub {2, 3, 4} = 12. Therefore, (P,≼) is a lattice. Next, note that 1is a lower bound for every subset of P. Since every subset of P has a smallest element in the usualordering, it follows that every subset of P has a greatest lower bound. In particular, glb(P) = 1.However, no subset of P that has an infinite number of elements has an upper bound. Therefore,(P,≼) is not a complete lattice. Now, consider (N,≼). Note that 1 is a lower bound for every subsetof N. Since every subset of N has a smallest element in the usual ordering, it follows that everysubset of N has a greatest lower bound. In particular, glb(N) = 1. Furthermore, for all m ∈ N,0 = 0 · m, and thus 0 is an upper bound for every subset of N. In particular, since 0 is the uniqueupper bound of N, it follows that 0 is the least upper bound of N. Hence, (N,≼) is a complete lattice.^

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 8: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 8 — #54 ii

ii

ii

8 CHAPTER 1

Proposition 1.3.13. Let (X,≼) be a lattice, and let S1, S2 ⊆ X. Then,

glb(S1∪ S2) = glb[S1∪ {glb(S2)}], lub(S1∪ S2) = lub[S1∪ {lub(S2)}]. (1.3.1)

Definition 1.3.14. Let (X,R) be a partially ordered set. Then, R is a total ordering on X if, forall x, y ∈ X, either (x, y) ∈ R or (y, x) ∈ R.

Let S ⊆ R. Then, it is traditional to write inf S and sup S for glb(S) and lub(S), respectively,where “inf” and “sup” denote infimum and supremum, respectively. If S = ∅, then we defineinf ∅ △

= ∞ and sup∅ △= −∞. Finally, if S has no lower bound, then we write inf S = −∞, whereas, if

S has no upper bound, then we write sup S = ∞.The following result uses the fact that “⊆” is a partial ordering on every collection of sets.Proposition 1.3.15. Let S be a collection of sets. Then,

glb(S) =∩S∈S

S , lub(S) =∪S∈S

S . (1.3.2)

Hence, for all S ∈ S,glb(S) ⊆ S ⊆ lub(S). (1.3.3)

Let S △= (S i)∞i=1 be a sequence of sets. Then, by viewing S as the collection of sets {S1, S 2, . . .}, it

follows that

glb(S) =∞∩

i=1

Si, lub(S) =∞∪

i=1

Si. (1.3.4)

Hence, for all i ≥ 1,

glb(S) ⊆ Si ⊆ lub(S). (1.3.5)

Note that glb(S) and lub(S) are independent of the ordering of the sequence S.

Proposition 1.3.16. Let S be a collection of sets, let A be a set, let S0△= {S ∈ S : A ⊆ S }, and

assume that S0 , ∅. Then, A ⊆ glb(S0). If, in addition, glb(S0) ∈ S0, then glb(S0) is the smallestelement of S that contains A in the sense that, if S ∈ S and A ⊆ S , then glb(S0) ⊆ S .

Proposition 1.3.17. Let S be a collection of sets, let A be a set, and let S0△= {S ∈ S : S ⊆ A}.

Then, lub(S0) ⊆ A. If, in addition, lub(S0) ∈ S0, then lub(S0) is the largest element of S that iscontained in A in the sense that, if S ∈ S and S ⊆ A, then S ⊆ lub(S0).

Definition 1.3.18. Let S △= (S i)∞i=1 be a sequence of sets. Then, the essential greatest lower

bound of S is defined by

essglb(S) △=∞∪j=1

∞∩i= j

Si, (1.3.6)

and the essential least upper bound of S is defined by

esslub(S) △=∞∩j=1

∞∪i= j

Si. (1.3.7)

Let S △= (Si)∞i=1 be a sequence of sets. Then, the set essglb(S) consists of all elements of ∪∞i=1Si

that belong to all but finitely many of the sets in S. Furthermore, the set esslub(S) consists of allelements of ∪∞i=1Si that belong to infinitely many of the sets in S. Therefore, essglb(S) and esslub(S)are independent of the ordering of the sequence S, and

glb(S) ⊆ essglb(S) ⊆ esslub(S) ⊆ lub(S). (1.3.8)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 9: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 9 — #55 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 9

Note that lub(S)\esslub(S) is the set of elements of ∪∞i=1Si that belong to at most finitely many ofthe sets in S.

Example 1.3.19. Consider the sequence of sets given by

({1, 4}, {1, 2}, {1, 2, 3}, {1, 2}, {1, 2, 3}, {1, 2}, {1, 2, 3}, . . .).Then, (1.3.8) becomes {1} ⊆ {1, 2} ⊆ {1, 2, 3} ⊆ {1, 2, 3, 4}. ^

Definition 1.3.20. Let S △= (Si)∞i=1 be a sequence of sets, and assume that essglb(S) = esslub(S).

Then, the essential limit of S is defined by

esslim(S) △= essglb(S) = esslub(S). (1.3.9)

Let S △= (Si)∞i=1 be a sequence of sets. Then, S is nonincreasing if, for all i ∈ P, Si+1 ⊆ Si.

Furthermore, S is nondecreasing if, for all i ∈ P, Si ⊆ Si+1.

Proposition 1.3.21. Let S △= (Si)∞i=1 be a sequence of sets. If S is nonincreasing, then

esslim(S) = glb(S) = essglb(S) = esslub(S). (1.3.10)

Furthermore, if S is nondecreasing, then

esslim(S) = essglb(S) = esslub(S) = lub(S). (1.3.11)

Example 1.3.22. Consider the nonincreasing sequence of sets

(N,N\{1},N\{1, 2},N\{1, 2, 3}, . . .).Then, (1.3.8) becomes {0} = {0} = {0} ⊆ N. Now, consider the nondecreasing sequence of subsetsof R given by

({1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}, . . .).Then, (1.3.8) becomes {1} ⊆ P = P = P, where P is the set of positive integers. ^

Let S △= (Si)∞i=1 be a sequence of sets. Then, the sequence S

△= (∩k

j=1[∪∞i= jSi])∞k=1 = (∪∞i=kSi)∞k=1 =

(Sk)∞i=1 is nonincreasing. Hence,

esslub(S) = esslim(S) = glb(S) = essglb(S) = esslub(S). (1.3.12)

Furthermore, the sequence S△= (∪k

j=1[∩∞i= jSi])∞k=1 = (∩∞i=kSi)∞k=1 = (Sk)∞i=1 is nondecreasing. Hence,

essglb(S) = esslim(S) = essglb(S) = esslub(S) = lub(S). (1.3.13)

1.4 Directed and Symmetric GraphsLet X be a finite, nonempty set, and let R be a multirelation on X. Then, the pair G = (X,R) is a

directed multigraph. The elements of X are the nodes of G, while the elements of R are the directededges of G. If R is a relation on X, then G = (X,R) is a directed graph. We focus on directed graphs,which have distinct (that is, nonrepeated) directed edges.

The directed graph G = (X,R) can be visualized as a set of points in the plane representing thenodes in X connected by the directed edges in R. Specifically, the directed edge (x, y) ∈ R from x toy can be visualized as a directed line segment or curve connecting node x to node y. The direction ofa directed edge can be denoted by an arrowhead. A directed edge of the form (x, x) is a self-directededge.

If the relation R is symmetric, then G is a symmetric graph. In this case, it is convenient torepresent the pair of directed edges (x, y) and (y, x) in R by a single edge {x, y}, which is a subset ofX. For the self-directed edge (x, x), the corresponding edge is the single-element self-edge {x}. Toillustrate these notions, consider a directed graph that represents a city with streets (directed edges)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 10: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 10 — #56 ii

ii

ii

10 CHAPTER 1

connecting intersections (nodes). Each directed edge represents a one-way street, while the presenceof the one-way street (x, y) and its reverse (y, x) represents a two-way street. A symmetric relationis a street plan consisting entirely of two-way streets (that is, edges) and thus no one-way streets(directed edges), whereas an antisymmetric relation is a street plan consisting entirely of one-waystreets (directed edges) and thus no two-way streets (edges).

Definition 1.4.1. Let G = (X,R) be a directed graph. Then, the following terminology isdefined:

i) If x, y ∈ X are distinct and (x, y) ∈ R, then y is the head of (x, y) and x is the tail of (x, y).ii) If x, y ∈ X are distinct and (x, y) ∈ R, then x is a parent of y, and y is a child of x.

iii) If x, y ∈ X are distinct and either (x, y) ∈ R or (y, x) ∈ R, then x and y are adjacent.iv) If x ∈ X has no parent, then x is a root.v) If x ∈ X has no child, then x is a leaf.Definition 1.4.2. Let G = (X,R) be a directed graph. Then, the following terminology is

defined:i) The reversal of G is the graph rev(G) △= (X, rev(R)).

ii) The complement of G is the graph G∼△= (X,R∼).

iii) The reflexive hull of G is the graph ref(G) △= (X, ref(R)).iv) The symmetric hull of G is the graph sym(G) △= (X, sym(R)).v) The transitive hull of G is the graph trans(G) △= (X, trans(R)).

vi) The equivalence hull of G is the graph equiv(G) △= (X, equiv(R)).vii) G is reflexive if R is reflexive.

viii) G is transitive if R is transitive.ix) G is an equivalence graph if R is an equivalence relation.x) G is antisymmetric if R is antisymmetric.

xi) G is partially ordered if R is a partial ordering on X.

xii) G is totally ordered if R is a total ordering on X.

xiii) G is a tournament if G is antisymmetric and sym(R) = X × X\{(x, x) : x ∈ X}.Definition 1.4.3. Let G = (X,R) be a directed graph. Then, the following terminology is

defined:i) The directed graph G′ = (X′,R′) is a directed subgraph of G if X′ ⊆ X and R′ ⊆ R.

ii) The directed subgraph G′ = (X′,R′) of G is a spanning directed subgraph of G if supp(R) =supp(R′).

iii) If X0 ⊆ X, then G|X0

△= (X0, R|X0

).

iv) If G′ = (X′,R′) is a directed graph, then G ∪ G′△= (X ∪ X′,R ∪ R′) and G ∩ G′

△= (X ∩

X′,R ∩ R′).v) For x, y ∈ X, a directed walk in G from x to y is an n-tuple of directed edges of G of the form

((x, y)) ∈ R for n = 1 and ((x, x1), (x1, x2), . . . , (xn−1, y)) ∈ Rn for all n ≥ 2. The length ofthe directed walk is n. The nodes x, x1, . . . , xn−1, y are the nodes of the walk. Furthermore,if n ≥ 2, then the nodes x1, . . . , xn−1 are the intermediate nodes of the walk.

vi) For x, y ∈ X, a directed trail in G from x to y is a directed walk in G from x to y whosedirected edges are distinct.

vii) For x, y ∈ X, a directed path in G from x to y is a directed trail in G from x to y whoseintermediate nodes are distinct and do not include x and y.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 11: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 11 — #57 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 11

viii) For x ∈ X, a directed cycle in G at x is a directed path in G from x to x whose length is atleast 2.

ix) G is directionally acyclic if G has no directed cycles.x) If G has at least one directed cycle, then the directed period of G is the greatest common

divisor of the lengths of the directed cycles of G.xi) G is directionally aperiodic if it has at least one directed cycle and the greatest common

divisor of the lengths of the directed cycles in G is 1.xii) A directed Hamiltonian path is a directed path whose nodes include all of the nodes of X.

xiii) A directed Hamiltonian cycle is a directed cycle whose nodes include every node in X.

xiv) G is a directed tree if G has exactly one root x and, for all y ∈ X such that y , x, y hasexactly one parent.

xv) G is a directed forest if G is a union of disjoint directed trees.xvi) G is a directed chain if G is a tree and has exactly one leaf.

xvii) G is directionally connected if, for all distinct x, y ∈ X, there exist directed walks in G fromx to y and from y to x.

xviii) G is bipartite if there exist nonempty, disjoint sets X1 and X2 such that X = X1∪ X2 andR ∩ (X1 × X1) = R ∩ (X2 × X2) = ∅.

xix) The indegree of x ∈ X is indeg(x) △= card {y ∈ X: y is a parent of x}.xx) The outdegree of x ∈ X is outdeg(x) △= card {y ∈ X: y is a child of x}.

xxi) Let X = X1∪X2,where X1 and X2 are nonempty and disjoint, and assume that X = supp(G).Then, (X1,X2) is a directed cut of G if, for all x1 ∈ X1 and x2 ∈ X2, there does not exist adirected walk from x1 to x2.

A self-directed edge is a directed path; however, a self-directed edge is not a directed cycle.A directed Hamiltonian cycle is both a directed Hamiltonian path and a directed cycle, both of

which are directed paths.Definition 1.4.4. Let G = (X,R) be a symmetric graph. Then, the following terminology is

defined:i) For x, y ∈ X, a walk in G connecting x and y is an n-tuple of edges of G of the form

({x, y}) ∈ E for n = 1 and ( {x, x1}, {x1, x2}, . . . , {xn−1, y}) ∈ En for n ≥ 2. The length of thewalk is n. The nodes x, x1, . . . , xn−1, y are the nodes of the walk. Furthermore, if n ≥ 2, thenthe nodes x1, . . . , xn−1 are the intermediate nodes of the walk.

ii) For x, y ∈ X, a trail in G connecting x and y is a walk in G connecting x to y whose edgesare distinct.

iii) For x, y ∈ X, a path in G connecting x and y is a trail in G connecting x and y whoseintermediate nodes are distinct and do not include x and y.

iv) For x ∈ X, a cycle in G at x is a path in G connecting x and x whose length is at least 3.v) G is acyclic if G has no cycles.

vi) If G has at least one cycle, then the period of G is the greatest common divisor of the lengthsof the cycles of G.

vii) G is aperiodic if the period of G is 1.viii) A Hamiltonian path is a path whose nodes include every node in X.

ix) G is Hamiltonian if G has a Hamiltonian cycle P, which is a cycle such that every node inX is a node of P.

x) G is a tree if there exists a directed tree G′ = (X,R′) such that G = sym(G′).

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 12: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 12 — #58 ii

ii

ii

12 CHAPTER 1

xi) G is a forest if G is a union of disjoint trees.xii) G is a chain if there exists a directed chain G′ = (X,R′) such that G = sym(G′).

xiii) G is connected if, for all distinct x, y ∈ X, there exists a walk in G connecting x and y.xiv) G is bipartite if there exist nonempty, disjoint sets X1 and X2 such that X = X1∪ X2 and{{x, y} ∈ R : x ∈ X1 and y ∈ X2} = ∅.

xv) The degree of x ∈ X is deg(x) △= indeg(x) = outdeg(x).A self-edge is a path; however, a self-edge is not a cycle.A Hamiltonian cycle is both a Hamiltonian path and a cycle, both of which are paths.Let G = (X,R) be a directed graph, and let w : X × X 7→ [0,∞), where w(x, y) > 0 if (x, y) ∈ R

and w(x, y) = 0 if (x, y) < R. For each directed edge (x, y) ∈ R, w(x, y) is the weight associatedwith the directed edge (x, y), and the triple G = (X,R,w) is a weighted directed graph. The graphG′ = (X′,R′,w′) is a weighted directed subgraph of G if X′ ⊆ X, R′ is a relation on X′, R′ ⊆ R, andw′ is the restriction of w to R′. Finally, if G is symmetric, then w is symmetric if, for all (x, y) ∈ R,w(x, y) = w(y, x). In this case, w is defined on each edge {x, y} of G.

1.5 NumbersLet x and y be real numbers. Then, x divides y if there exists an integer n such that y = nx, In

this case, we write x|y. For example, 6|12, 3| − 9, π| − 2π, 3|0, and 0|0. The notation x - y means thatx does not divide y.

Let n1, . . . , nk be integers, not all of which are zero. Then, the greatest common divisor of theset {n1, . . . , nk} is the positive integer defined by

gcd {n1, . . . , nk} △= max{i ∈ P : i divides n1, . . . , nk}.For example, gcd {5, 10} = 5, and gcd {0, 2} = 2. The set {n1, . . . , nk} is coprime if gcd {n1, . . . , nk} =1. For example, gcd {−3,−7} = 1, and thus {−3,−7} is coprime.

Let n1, . . . , nk be nonzero integers. Then, the least common multiple of the set {n1, . . . , nk} is thepositive integer defined by

lcm {n1, . . . , nk} △= min{i ∈ P : n1, . . . , nk divide i}.For example, lcm {−3,−7} = 21, and lcm {−2, 3} = 6.

Let m be a nonzero integer, and let n be an integer. Then, m|n if and only if gcd {m, n} = |m|.Let n be an integer, and let k be a positive integer. Furthermore, let l be an integer, and let

r ∈ [0, k − 1] be an integer satisfying n = kl + r. Then, we write

r = remk(n). (1.5.1)

where r is the remainder after dividing n by k. For example, rem3(−11) = 1 and rem3(11) = 2.Furthermore, k|n if and only if remk(n) = 0.

Proposition 1.5.1. Let m and n be integers, and let k be a positive integer. Then,

remk(n − m) = remk[remk(n) − remk(m)]. (1.5.2)

Furthermore, k|n − m if and only if remk(n) = remk(m).Definition 1.5.2. Let n and m be integers, and let k be a positive integer. Then, n and m are

congruent modulo k if k divides n − m. In this case, we write

nk≡ m. (1.5.3)

Proposition 1.5.1 implies that nk≡ m if and only if the remainders of n and m after dividing by k

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 13: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 13 — #59 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 13

differ by a multiple of k. For example, −13≡ 2

3≡ 83≡ 26

3≡ 29.Let n be an integer. Then, n is even if 2 divides n, whereas n is odd if 2 does not divide n. Now,

assume that n ≥ 2. Then, n is prime if, for all integers m such that 2 ≤ m < n, m does not divide n.Note that 2 is prime, but 1 is not prime. Letting pn denote the nth prime, it follows that

(pi)25i=1 = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97).

The nth harmonic number is denoted by

Hn△=

n∑i=1

1i. (1.5.4)

Then,

(Hi)12i=0 =

(0, 1,

32,

116,

2512,

13760

,4920,

363140

,761280

,71292520

,73812520

,8371127720

,8602127720

).

For all α ∈ R, the nth generalized harmonic number of order α is denoted by

Hn,α△=

n∑i=1

1iα. (1.5.5)

Define H0△= H0,α

△= 0. Then,

(Hi,2)10i=0 =

(0, 1,

54,

4936,

205144

,52693600

,53693600

,266681176400

,1077749705600

,97781416350400

,19683291270080

).

The symbol C denotes the set of complex numbers. The elements of R and C are scalars. Define

ȷ△=√−1. (1.5.6)

Let z ∈ C. Then, z = x + y ȷ, where x, y ∈ R. Define the complex conjugate z of z by

z △= x − y ȷ (1.5.7)

and the real part Re z of z and the imaginary part Im z of z by

Re z △= 1

2 (z + z) = x, Im z △= 1

2 ȷ (z − z) = 12 (z − z) ȷ = y. (1.5.8)

Furthermore, the absolute value |z| of z is defined by

|z| △=√

x2 + y2. (1.5.9)

Finally, the argument arg z ∈ (−π, π] of z is defined by

arg z △=

0, y = x = 0,atan y

x , x > 0,− π2 , y < 0, x = 0,π2 , y > 0, x = 0,−π + atan y

x , y < 0, x < 0,π + atan y

x , y ≥ 0, x < 0,

(1.5.10)

where atan: R 7→ (− π2 ,π2 ).

Let z be a complex number. Then,

z = |z|e(arg z) ȷ. (1.5.11)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 14: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 14 — #60 ii

ii

ii

14 CHAPTER 1

z is a nonnegative number if and only if arg z = 0, and z is a negative number if and only if arg z = −π.If z is not a nonnegative number, then arg z ∈ (−π, 0) ∪ (0, π] is the angle from the positive real axisto the line segment connecting z to the origin in the complex plane, where clockwise angles arenegative and confined to the set (−π, 0), and counterclockwise angles are positive and confined tothe set (0, π]. Furthermore, if z is nonzero, then

arg1z=

− arg z, arg z ∈ (−π, π),π, arg z = π.

(1.5.12)

Let z1 and z2 be nonzero complex numbers. Then, there exists k ∈ {−1, 0, 1} such that

arg z1z2 = arg z1 + arg z2 + 2kπ. (1.5.13)

Hence, 2π| arg z1z2 − arg z1 − arg z2. For example,

arg (−1)(−1) = arg 1 = 0 = π + π − 2π = arg−1 + arg−1 − 2π,

arg (1)(−1) = arg−1 = π = 0 + π = arg 1 + arg−1,

arg (− ȷ)(− ȷ) = arg−1 = π = −π/2 − π/2 + 2π = arg− ȷ + arg− ȷ + 2π.

The closed left half plane (CLHP), open left half plane (OLHP), closed right half plane (CRHP),and open right half plane (ORHP) are the subsets of C defined by

OLHP △= {x ∈ C: Re x < 0}, ORHP △

= {x ∈ C: Re x > 0}, (1.5.14)

CLHP △= {x ∈ C: Re x ≤ 0}, CRHP △

= {x ∈ C: Re x ≥ 0}. (1.5.15)

The imaginary numbers are represented by IA . Note that 0 is a real number, an imaginary number,and a complex number.

Next, we define the open inside unit disk (OIUD) and the closed inside unit disk (CIUD) by

OIUD △= {x ∈ C: |x| < 1}, CIUD △

= {x ∈ C: |x| ≤ 1}. (1.5.16)

The complements of the open inside unit disk and the closed inside unit disk are given, respectively,by the closed outside unit disk (COUD) and the open outside unit disk, which are defined by

COUD △= {x ∈ C: |x| ≥ 1}, OOUD △

= {x ∈ C: |x| > 1}. (1.5.17)

The unit circle in C is denoted by UC .Since R is a proper subset of C, we state many results for C. In other cases, we treat R and C

separately. To do this efficiently, we use the symbol F to consistently denote either R or C.Let n ∈ N. Then,

n! △=

n(n − 1) · · · (2)(1), n ≥ 1,1, n = 0.

(1.5.18)

Then,

(i!)12i=0 = (1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600).

Let z ∈ C and k ∈ Z. Then,

(zk

)△=

z(z − 1) · · · (z − k + 1)

k!, k > 0,

1, k = 0,0, k < 0.

(1.5.19)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 15: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 15 — #61 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 15

In particular, if n, k ∈ N, then (nk

)=

n!

(n − k)!k!, n ≥ k ≥ 0,

0, k > n ≥ 0.(1.5.20)

Hence, (nn

)=

1, n ≥ 0,0, n < 0.

(1.5.21)

For example, (−1−1

)= 0,

(−11

)= −1,

(1−1

)= 0,

(−10

)= 1,

(00

)= 1,(

−13

)= −1,

(− 12

3

)=−516,

(03

)= 0,

( 12

3

)=

116,

(13

)= 0.

Note that, for all n ≥ k ≥ 1,(

nk

)is the number of k-element subsets of {1, . . . , n}.

Let z,w ∈ C, and assume that z < −P, w < −P, and z − w < −P. Then,(zw

)△=

Γ(z + 1)Γ(w + 1)Γ(z − w + 1)

. (1.5.22)

For k1, . . . , kl ∈ N, where∑l

i=1 ki = n, we define the multinomial coefficient(n

k1, . . . , kl

)△=

n!k1! · · · kl!

. (1.5.23)

Note that, if 1 ≤ m ≤ n, then (nm

)=

(n

m, n − m

).

For z ∈ C and k ∈ N, we define the falling factorial

zk △=

z(z − 1) · · · (z − k + 1), k ≥ 0,1, k = 0.

(1.5.24)

In particular, if n ∈ N, then nn = n!. Hence, if z ∈ C and k ∈ Z, then(zk

)△=

zk

k!, k ≥ 0,

0, k < 0.(1.5.25)

Furthermore, for all z ∈ C and k ∈ N, we define the rising factorial

zk △=

z(z + 1) · · · (z + k − 1), k ≥ 1,1, k = 0.

(1.5.26)

In particular, if n ∈ N, then 1n = n!. Finally, if z ∈ C and k ∈ N, then

zk = (z − k + 1)k, zk = (z + k − 1)k, zk = (−1)k(−z)k. (1.5.27)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 16: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 16 — #62 ii

ii

ii

16 CHAPTER 1

The double factorial is defined by

n!! △=

n(n − 2)(n − 4) · · · (2) = 2n/2(n/2)!, n even,

n(n − 2)(n − 4) · · · (3)(1) =(n + 1)!

2(n+1)/2[ 12 (n + 1)]!

, n odd.(1.5.28)

By convention, (−1)!! = 0!! = 1. Finally, if n ≥ 1, then (2n)!!(2n−1)!! = (2n)! and (2n+1)!!(2n)!! =(2n + 1)!.

1.6 Functions and Their InversesLet X and Y be nonempty sets. Then, a function f that maps X into Y is a rule f : X 7→ Y that

assigns a unique element f (x) (the image of x) of Y to each element x of X. Equivalently, a functionf : X 7→ Y can be viewed as a subset F of X × Y such that, for each x ∈ X, there exists a uniquey ∈ Y such that (x, y) ∈ F. In this case,

F = Graph( f ) △= {(x, f (x)): x ∈ X}. (1.6.1)

The set X is the domain of f, while the set Y is the codomain of f. For X1 ⊆ X, it is convenient todefine

f (X1) △= { f (x): x ∈ X1}. (1.6.2)

The range of f is the set R( f ) △= f (X). The function f is one-to-one if, for all x1, x2 ∈ X such thatf (x1) = f (x2), it follows that x1 = x2. The function f is onto if R( f ) = Y. The function IX: X 7→ X

defined by IX(x) △= x for all x ∈ X is the identity mapping on X. Finally, if S ⊆ X, fS: S 7→ Y, and,for all x ∈ X, fS(x) = f (x), then fS is the restriction of f to S.

Note that the subset F of X × Y can be viewed as a relation on (X,Y). Consequently, a functioncan be viewed as a special case of a relation.

Let X be a set, and let X be a partition of X. Furthermore, let f : X 7→ X, where, for all S ∈ X,it follows that f (S) ∈ S. Then, f is a canonical mapping, and f (S) is a canonical form. That is, foreach element S ⊆ X in the partition X of X, the function f assigns an element of S to the set S. Forexample, let S △

= {1, 2, 3, 4}, X △= {{1, 3}, {2, 4}}, f ({1, 3}) = 1, and f ({2, 4}) = 2.

Let X and Y be sets. If f : X 7→ Y is one-to-one and onto, then X and Y have the same cardinality,which is written as card(X) = card(Y). Consequently, if X is finite, then card(X) is the number ofelements of X. If f : X 7→ Y is one-to-one, then card(X) ≤ card(Y). If every function f : X 7→ Y thatis one-to-one is not onto, then card(X) < card(Y). If card(X) = card(P), then X is countable. Notethat card(N) = card(P) = card(Z) = card(Q) < card([0, 1]) = card(R) = card(R2).

Let X be a finite multiset. Then, card(X) is the number of elements in X. Cardinality is notdefined for infinite multisets.

Let X be a set, and let f : X 7→ X. Then, f is a function on X. The element x ∈ X is a fixed pointof f if f (x) = x.

Let X, Y, and Z be sets, let f : X 7→ Y, and let g: f (X) 7→ Z. Then, the composition of g andf is the function g ◦ f : X 7→ Z defined by (g ◦ f )(x) △

= g[ f (x)]. The following result shows thatfunction composition is associative.

Proposition 1.6.1. Let X, Y, Z, and W be sets, and let f : X 7→ Y, g : Y 7→ Z, h : Z 7→ W.Then,

h ◦ (g ◦ f ) = (h ◦ g) ◦ f . (1.6.3)

Hence, we write h ◦ g ◦ f for h ◦ (g ◦ f ) and (h ◦ g) ◦ f .Proposition 1.6.2. Let X, Y, and Z be sets, and let f : X 7→ Y and g : Y 7→ Z. Then, the

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 17: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 17 — #63 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 17

following statements hold:i) If g ◦ f is onto, then g is onto.

ii) If g ◦ f is one-to-one, then f is one-to-one.Proof. To prove i), note that Z = g( f (X)) ⊆ g(Y) ⊆ Z. Hence, g(Y) = Z. To prove ii), suppose

that f is not one-to-one. Then, there exist distinct x1, x2 ∈ X such that f (x1) = f (x2). Therefore,g( f (x1)) = g( f (x2)), and thus g ◦ f is not one-to-one. �

Let f : X 7→ Y. Then, f is left invertible if there exists a function f L : Y 7→ X (a left inverse off ) such that f L ◦ f = IX, whereas f is right invertible if there exists a function f R: Y 7→ X (a rightinverse of f ) such that f ◦ f R = IY. In addition, the function f : X 7→ Y is invertible if there existsa function f Inv: Y 7→ X (the inverse of f ) such that f Inv ◦ f = IX and f ◦ f Inv = IY; that is, f Inv isboth a left inverse of f and a right inverse of f .

Let f : X 7→ Y, and let X denote the set of subsets of X. Then, for all y ∈ Y, the set-valued inversef inv : Y 7→ X is defined by f inv(y) △= {x ∈ X : f (x) = y}. If f is one-to-one, then, for all y ∈ R( f ), theset f inv(y) has a single element, and thus f inv : R( f ) 7→ X is a function. If f is invertible, then, forall y ∈ Y, f inv(y) = { f Inv(y)}. The inverse image f inv(S) of S ⊆ Y is the set

f inv(S) △=∪y∈S

f inv(y) = {x ∈ X: f (x) ∈ S}. (1.6.4)

Note that f inv(S) is defined whether or not f is invertible. In fact, f inv(Y) = f inv[ f (X)] = X andf [ f inv(Y)] = f (X).

Proposition 1.6.3. Let X and Y be sets, let f : X 7→ Y, and let g: Y 7→ X. Then, the followingstatements are equivalent:

i) f is a left inverse of g.ii) g is a right inverse of f .Proposition 1.6.4. Let X and Y be sets, let f : X 7→ Y, and assume that f is invertible. Then,

f has a unique inverse. Now, let g: Y 7→ X. Then, the following statements are equivalent:i) g is the inverse of f .

ii) f is the inverse of g.Theorem 1.6.5. Let X and Y be sets, and let f : X 7→ Y. Then, the following statements hold:i) f is left invertible if and only if f is one-to-one.

ii) f is right invertible if and only if f is onto.Furthermore, the following statements are equivalent:

iii) f is invertible.iv) f has a unique inverse.v) f is one-to-one and onto.

vi) f is left invertible and right invertible.vii) f has a unique right inverse.

viii) f has a one-to-one left inverse.ix) f has an onto right inverse.

If, in addition, card(X) ≥ 2, then the following statement is equivalent to iii)–ix):x) f has a unique left inverse.Proof. To prove i), suppose that f is left invertible with left inverse g: Y 7→ X. Furthermore,

suppose that x1, x2 ∈ X satisfy f (x1) = f (x2). Then, x1 = g[ f (x1)] = g[ f (x2)] = x2, which showsthat f is one-to-one. Conversely, suppose that f is one-to-one so that, for all y ∈ R( f ), there existsa unique x ∈ X such that f (x) = y. Hence, define the function g: Y 7→ X by g(y) △

= x for all

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 18: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 18 — #64 ii

ii

ii

18 CHAPTER 1

y = f (x) ∈ R( f ) and by g(y) arbitrary for all y ∈ Y\R( f ). Consequently, g[ f (x)] = x for all x ∈ X,which shows that g is a left inverse of f.

To prove ii), suppose that f is right invertible with right inverse g: Y 7→ X. Then, for all y ∈ Y,it follows that f [g(y)] = y, which shows that f is onto. Conversely, suppose that f is onto so that,for all y ∈ Y, there exists at least one x ∈ X such that f (x) = y. Selecting one such x arbitrarily,define g: Y 7→ X by g(y) △= x. Consequently, f [g(y)] = y for all y ∈ Y, which shows that g is a rightinverse of f. �

Let f : X 7→ Y, and assume that f is one-to-one. Then, the function f : X 7→ R( f ) defined byf (x) △= f (x) is one-to-one and onto and thus invertible. For convenience, we write f Inv : R( f ) 7→ X.

The sine and cosine functions sin : R 7→ [−1, 1] and cos : R 7→ [−1, 1] can be defined in anelementary way in terms of ratios of sides of triangles. The additional trigonometric functionstan : R\π( 1

2 + Z) 7→ R, csc : R\πZ 7→ R, sec : R\π( 12 + Z) 7→ R, and cot : R\πZ 7→ R are defined by

tan x △=

sin xcos x

, csc x △=

1sin x

, sec x △=

1cos x

, cot x △=

cos xsin x

. (1.6.5)

The exponential function exp: R 7→ (0,∞) is defined by

exp(x) △= ex, (1.6.6)

where e △= limx→∞(1 + 1/x)x ≈ 2.71828 . . .. The exponential function can be extended to complex

arguments as follows. For all x ∈ R, the power series for “exp” is given by

exp(x) =∞∑

i=0

xi

i!. (1.6.7)

Hence, for all y ∈ R, we define

exp(y ȷ) = ey ȷ △=

∞∑i=0

(y ȷ)i

i!=

∞∑i=0

(−1)i y2i

(2i)!+

∞∑i=0

(−1)2i+1 y2i+1

(2i + 1)!ȷ = cos y + (sin y) ȷ. (1.6.8)

Thus, for all y ∈ R,

sin y =12 ȷ

(ey ȷ − e−y ȷ), cos y = 12 (ey ȷ + e−y ȷ). (1.6.9)

Now, let z = x + y ȷ, where x, y ∈ R. Then, exp: C 7→ C\{0} is defined by

exp(z) = exp(x + y ȷ) △= ex+y ȷ = exey ȷ = ex[cos x + (sin x) ȷ]. (1.6.10)

In particular, eπ ȷ = −1.The six trigonometric functions can now be extended to complex arguments. In particular, by

replacing y ∈ R in (1.6.9) by z ∈ C, we define sin : C 7→ C and cos : C 7→ C by

sin z △=

12 ȷ

(ez ȷ − e−z ȷ), cos z △= 1

2 (ez ȷ + e−z ȷ). (1.6.11)

Hence,

ez ȷ = cos z + (sin z) ȷ, e−z ȷ = cos z − (sin z) ȷ. (1.6.12)

Likewise, tan : C\π( 12 + Z) 7→ R, csc : C\πZ 7→ R, sec : C\π( 1

2 + Z) 7→ R, and cot : C\πZ 7→ R aredefined by

tan z △=

sin zcos z

, csc z △=

1sin z

, sec z △=

1cos z

, cot z △=

cos zsin z

. (1.6.13)

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 19: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 19 — #65 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 19

Let f : X 7→ Y. If f is not one-to-one, then f is not invertible. This is the case, for example, for aperiodic function such as sin : R 7→ [−1, 1], respectively. In particular, sininv(1) = {(4k + 1)π/2: k ∈Z}. However, it is convenient to define a principal inverse asin of sin by choosing an element of theset sininv(y) for each y ∈ [−1, 1]. Although this choice can be made arbitrarily, it is traditional todefine

asin: [−1, 1] 7→ [− π2 ,π2 ]. (1.6.14)

Similarly,

acos: [−1, 1] 7→ [0, π], atan: R 7→ (− π2 ,π2 ), (1.6.15)

acsc: (−∞,−1] ∪ [1,∞) 7→ [− π2 , 0) ∪ (0, π2 ], (1.6.16)asec: (−∞,−1] ∪ [1,∞) 7→ [0, π2 ) ∪ ( π2 , π], (1.6.17)

acot: R 7→ (− π2 , 0) ∪ (0, π2 ]. (1.6.18)

An analogous situation arises for the exponential function f (z) = ez, which is not one-to-oneand thus requires a principal inverse in the form of a logarithm defined on C\{0}. Let w be a nonzerocomplex number, and, for all i ∈ Z, define

zi△= log |w| + (arg w + 2iπ) ȷ. (1.6.19)

Then, for all i ∈ Z,ezi = |w|e(arg w) ȷe2iπȷ = |w|e(arg w) ȷ = w. (1.6.20)

Consequently, f inv(w) = {zi : i ∈ Z}. For example, f inv(1) = {2iπȷ : i ∈ Z}, and f inv(−1) = {(2i +1)πȷ : i ∈ Z}. The principal logarithm log w of w is defined by choosing z0, which yields

log w △= z0 = log |w| + (arg w) ȷ. (1.6.21)

Therefore,

log: C\{0} 7→ {z : Re z , 0 and − π < Im z ≤ π}. (1.6.22)

Hence,

Re log w = log |w|, Im log w = arg w. (1.6.23)

Let w1 and w2 be nonzero complex numbers. Then, with f : C 7→ C\{0} given by (1.6.10),

f inv(w1w2) = f inv(w1) + f inv(w2). (1.6.24)

However,

log w1w2 = log w1 + log w2 (1.6.25)

if and only if

arg w1w2 = arg w1 + arg w2. (1.6.26)

For example,

arg( √

22 +

√2

2 ȷ)2= arg ȷ =

π

2=π

4+π

4= arg

( √2

2 +√

22 ȷ

)+ arg

( √2

2 +√

22 ȷ

),

and thuslog

( √2

2 +√

22 ȷ

)2= log

( √2

2 +√

22 ȷ

)+ log

( √2

2 +√

22 ȷ

).

However,arg (−1)2 = arg 1 = 0 , 2π = π + π = arg(−1) + arg(−1),

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 20: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 20 — #66 ii

ii

ii

20 CHAPTER 1

and thuslog (−1)2 = log 1 = 0 , 2πȷ = πȷ + πȷ = log(−1) + log(−1).

Therefore, there exist nonzero complex numbers w1 and w2 such that the principal logarithm doesnot satisfy (1.6.25).

Let w be a nonzero complex number. Then,

w = elog w. (1.6.27)

Now, let z be a complex number. Then,

log ez = z −(round

Im z2π

)2πȷ, (1.6.28)

where, for all x ∈ R, round(x) denotes the closest integer to x except in the case where 2x is aninteger, in which case round(x) = ⌊x⌋. Therefore, log ez = z if and only if Im z ∈ (−π, π].

An analogous situation arises for nth roots. Consider f : R 7→ [0,∞) defined by f (x) = x2.Then, for all y ∈ [0,∞), it follows that f inv(y) = {−√y,

√y}, where

√y represents the nonnegative

square root of y ≥ 0. For complex-valued extensions, let n ≥ 1, and define f : C 7→ C by f (z) = zn.Let w be a nonzero complex number. If z satisfies zn = w, then log zn = log w = log |w| + (arg w) ȷ,where “log” is the principal log. Furthermore, z satisfies zn = w if and only if there exists an integeri such that n log z = log |w| + (arg w + 2iπ) ȷ. Therefore, for all i ∈ Z, define

zi△= e

1n [log |w|+(arg w+2iπ) ȷ], (1.6.29)

which satisfies

zni = w. (1.6.30)

Note that, for all i ∈ Z, zn+i = zi. Therefore, for all i ∈ {0, . . . , n − 1}, define the n distinct numbers

zi△=

n√|w|e

arg wn ȷe

2iπn ȷ, (1.6.31)

where n√|w| is the nonnegative nth root of |w|. Consequently, f inv(w) = {z0, . . . , zn−1}. The principalnth root w1/n of w is defined by choosing z0, which yields

w1/n △= z0 =

n√|w|e

arg wn ȷ. (1.6.32)

In particular, if w is a positive number, then w1/n = n√

w,which is the positive nth root of w.However,for an odd integer n and a negative number a, a notational conflict arises between the principal nthroot of a and the negative nth root of a. For example, (−1)1/3 = e(π/3) ȷ, whereas, for all odd integersn, it is traditional to interpret n√−1 as −1. In other words, for all a < 0 and odd n ≥ 1, n

√a △= − n√|a|,

and thus

a1/n =n√|a|e(π/n) ȷ =

n√ae[(1/n−1)π] ȷ. (1.6.33)

Let z and α be complex numbers, and assume that z is not zero. As an extension of the functionsf (z) = zn and f (z) = z1/n, define

zα △= eα log z, (1.6.34)

where log z is the principal logarithm of z. For example,

1ȷ2 ȷ= e−2 ȷ log ȷ = e−2 ȷ(π/2) ȷ = eπ.

Next, let z1 and z2 be complex numbers, and let α be a real number. Then, (z1z2)α = zα1 zα2 . Now,let α be a complex number. Then, αz1αz2 = αz1+z2 . However, (z1z2)α and zα1 zα2 are not necessarily

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 21: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 21 — #67 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 21

equal. For example, (−1) ȷ(−1) ȷ = e−πe−π = e−2π , 1 = 1 ȷ = [(−1)(−1)] ȷ. However,

(z1z2)α = zα1 zα2 e2nπα ȷ, (1.6.35)

where

n =

1, −2π < arg z1 + arg z2 ≤ −π,0, −π < arg z1 + arg z2 ≤ π,−1, π < arg z1 + arg z2 ≤ 2π.

(1.6.36)

Finally,

(αz1 )z2 = αz1z2 e2nπz2 ȷ, (1.6.37)

where

n =⌊12− (Im z1) log |α| + (Re z1) argα

⌋. (1.6.38)

For example, setting α = −1, z1 = −1, and z2 =12 yields n = 1, and thus ȷ = (−1)1/2 = [(−1)−1]1/2 =

(−1)−1/2enπ ȷ = (1/ ȷ)(−1) = ȷ. Furthermore,

(ez1 )z2 = ez1z2 e2nπz2 ȷ, (1.6.39)

where n =⌊

12 −

Im z12π

⌋. See [2216, pp. 108–114] and [2249, pp. 91, 114–119].

Finally, let z, α, and β be complex numbers. Then, (zα)β, (zβ)α, and zαβ may be different ascan be seen from the example z = 1

2 ȷ, α = 2 − ȷ, and β = −3 − ȷ, where (zα)β ≈ 0.03 + 0.04 ȷ,(zβ)α ≈ 9104 + 10961 ȷ, and zαβ ≈ 17 + 20 ȷ. A similar situation can occur in the case where z, α,and β are real. For example, if z = −1, α = 1/2, and β = 2, then (zα)β = zαβ = −1 , 1 = (zβ)α. Asa final example, let z = e, α = 2πi ȷ, where i ≥ 1, and β = π. Then, (zβ)α = (eπ)2πi ȷ = e2πi ȷ log eπ =

e2π2i ȷ = zαβ = cos 2π2i + ȷ sin 2π2i and (zα)β = (e2πi ȷ)π = 1π = eπ log 1 = eπ0 = 1. Since, for all i ≥ 1,cos 2π2i + ȷ sin 2π2i , 1, it follows that (zβ)α = zαβ , (zα)β. See [2107, pp. 166, 167].

Definition 1.6.6. Let I ⊂ R be a finite or infinite interval, and let f : I 7→ R. Then, f is convexif, for all α ∈ [0, 1] and x, y ∈ I,

f [αx + (1 − α)y] ≤ α f (x) + (1 − α) f (y). (1.6.40)

Furthermore, f is strictly convex if, for all α ∈ (0, 1) and distinct x, y ∈ I,f [αx + (1 − α)y] < α f (x) + (1 − α) f (y). (1.6.41)

Finally, f is (concave, strictly convex) if − f is (convex, strictly convex).A more general definition of a convex function is given by Definition 10.6.14.Let X be a set, and let σ : X × · · · × X 7→ X × · · · × X, where each Cartesian product has

n factors. Then, σ is a permutation if, for all (x1, . . . , xn) ∈ X × · · · × X, the tuples (x1, . . . , xn)and σ[(x1, . . . , xn)] have the same components with the same multiplicity but possibly in a differ-ent order. For convenience, we write (σ(x1), . . . , σ(xn)) for σ[(x1, . . . , xn)]. In particular, we write(σ(1), . . . , σ(n)) for σ[(1, . . . , n)]. The permutation σ is a transposition if (σ(x1), . . . , σ(xn)) and(x1, . . . , xn) differ by exactly two distinct interchanged components. Finally, let sign(σ) denote −1raised to the smallest number of transpositions needed to transform (σ(1), . . . , σ(n)) to (1, . . . , n).Note that, if σ1 and σ2 are permutations of (1, . . . , n), then sign(σ1 ◦ σ2) = sign(σ1) sign(σ2).

1.7 Facts on LogicFact 1.7.1. Let A and B be statements. Then, the following statements hold:i) [A and (A =⇒ B)] =⇒ B.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 22: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 22 — #68 ii

ii

ii

22 CHAPTER 1

ii) not(A and B)⇐⇒ [(not A) or not B].iii) not(A or B)⇐⇒ [(not A) and not B].iv) (A or B)⇐⇒ [(not A) =⇒ B]⇐⇒ [(A and B) xor (A xor B)].v) (A =⇒ B)⇐⇒ [(not A) or B]⇐⇒ not(A and not B)]⇐⇒ [(A and B) xor not A].

vi) not(A and B)⇐⇒ (A =⇒ not B)⇐⇒ (B =⇒ not A).vii) [A and not B]⇐⇒ [not(A =⇒ B)].

Remark: Each statement is a tautology. Remark: ii) and iii) are De Morgan’s laws. See [493, p.24]. See Fact 1.8.1.

Fact 1.7.2. Let A and B be statements. Then, the following statements are equivalent:i) A⇐⇒ B.

ii) (A or not B) and not(A and not B).iii) (A or not B) and [(not A) or B].iv) (A and B) or [(not A) and not B].v) not(A xor B).

Remark: The equivalence of each pair of statements is a tautology.Fact 1.7.3. Let A, B, and C be statements. Then,

[(A =⇒ B) and (B =⇒ C)] =⇒ (A =⇒ C).

Fact 1.7.4. Let A, B, and C be statements. Then, the following statements are equivalent:i) A =⇒ (B or C).

ii) [A and (not B)] =⇒ C.Remark: The statement that i) and ii) are equivalent is a tautology.

Fact 1.7.5. Let A, B, and C be statements. Then, the following statements are equivalent:i) (A and B) =⇒ C.

ii) [B and (not C)] =⇒ (not A).iii) [A and (not C)] =⇒ (not B).

Source: To prove i) =⇒ ii), note that [(A and B) or (not B)] =⇒ [C or (not B)], that is,[A or (not B)] =⇒ [C or (not B)], and thus A =⇒ [C or (not B)]. Hence, [B and (not C)] =⇒(not A). Conversely, to prove ii) =⇒ i), note that [(B and (not C)) or (not B)] =⇒ [(not A) or(not B)], that is, [(not C) or (not B)] =⇒ [(not A) or (not B)], and thus (not C) =⇒ [(not A) or(not B)]. Hence, (A and B) =⇒ C.

Fact 1.7.6. Let X and Y be sets, and let Z be a statement that depends on elements of X and Y.Then, the following statements are equivalent:

i) Not[for all x ∈ X, Z holds].ii) There exists x ∈ X such that Z does not hold.

Furthermore, the following statements are equivalent:iii) Not[there exists y ∈ Y such that Z holds].iv) For all y ∈ Y, Z does not hold.

Finally, the following statements are equivalent:v) Not[for all x ∈ X, there exists y ∈ Y such that Z holds].

vi) There exists x ∈ X such that, for all y ∈ Y, Z does not hold.

1.8 Facts on SetsFact 1.8.1. Let A and B be subsets of a set X. Then, the following statements hold:

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 23: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 23 — #69 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 23

i) A ∩A = A ∪A = A.

ii) A\B = A ∩B∼.

iii) (A ∪B)∼ = A∼ ∩B∼.

iv) (A ∩B)∼ = A∼ ∪B∼.

v) (A\B) ∪ (A ∩B) = A.

vi) A\(A ∩B) = A ∩B∼.

vii) A ∩ (A∼ ∪B) = A ∩B.

viii) (A ∪B) ∩ (A ∪B∼) = A.

ix) [A\(A ∩B)] ∪B = A ∪B.

x) (A ∪B) ∩ (A∼ ∪B) ∩ (A ∪B∼) = A ∩B.

xi) (A∼∪B)∩(A∪B∼) = (A∩B)∪(A∼∩B∼) = [(A∪B)\(A∩B)]∼ = [(A∩B∼)∪(A∼∩B)]∼.Remark: iii) and iv) are De Morgan’s laws. See Fact 1.7.1.

Fact 1.8.2. Let A, B, and C be subsets of a set X. Then, the following statements hold:i) A ∩ (B ∪ C) = (A ∩B) ∪ (A ∩ C).

ii) A ∪ (B ∩ C) = (A ∪B) ∩ (A ∪ C).iii) (A\B)\C = A\(B ∪ C).iv) (A ∩B)\C = (A\C) ∩ (B\C).v) (A ∩B)\(C ∩B) = (A\C) ∩B.

vi) (A ∪B)\C = (A\C) ∪ (B\C) = [A\(B ∪ C)] ∪ (B\C).vii) (A ∪B)\(C ∩B) = (A\B) ∪ (B\C).

viii) A\(B ∪ C) = (A\B) ∩A\B).ix) A\(B ∩ C) = (A\B) ∪A\B).Fact 1.8.3. Let A, B, and C be subsets of a set X. Then, the following statements hold:i) A ⊖ ∅ = ∅ ⊖A = A, A ⊖A = ∅.

ii) A ⊖B = B ⊖A.iii) A ⊖B = (A ∩B∼) ∪ (B ∩A∼) = (A\B) ∪ (B\A) = (A ∪B)\(A ∩B).iv) A ⊖B = {x ∈ X : (x ∈ A) xor (x ∈ B)}.v) A ⊖B = ∅ if and only if A = B.

vi) A ⊖ (B ⊖ C) = (A ⊖B) ⊖ C.vii) (A ⊖B) ⊖ (B ⊖ C) = A ⊖ C.

viii) A ∩ (B ⊖ C) = (A ∩B) ⊖ (A ∩ C).If, in addition, A and B are finite, then

card(A ⊖B) = card(A) + card(B) − 2 card(A ∩B).

Fact 1.8.4. Let A, B, and C be finite sets. Then,

card(A ×B) = card(A) card(B),

card(A ∪B) = card(A) + card(B) − card(A ∩B),

card(A ∪B ∪ C) = card(A) + card(B) + card(C) − card(A ∩B) − card(A ∩ C) − card(B ∩ C)+ card(A ∩B ∩ C).

Remark: The second and third equalities are versions of the inclusion-exclusion principle. See[411, p. 82], [1372, p. 67], and [2520, pp. 64–67]. Remark: The inclusion-exclusion principle

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 24: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 24 — #70 ii

ii

ii

24 CHAPTER 1

holds for multisets A and B with “A ∪ B” defined as the smallest multiset that contains both A

and B. For example, card({1, 1, 2, 2}) = card({1, 1, 2} ∪ {1, 2, 2}) = card({1, 1, 2}) + card({1, 2, 2}) −card({1, 2}); that is, 4 = 3 + 3 − 2. See [2879].

Fact 1.8.5. Define A△= {x1, . . . , x1, . . . , xn, . . . , xn}ms, where, for all i ∈ {1, . . . , n}, ki is the

number of repetitions of xi. Then, the number of multisubsets of A is∏n

i=1(ki + 1). Source: [2460].Fact 1.8.6. Let A,B ⊆ R. Then, the following statements hold:i) sup(−A) = − inf A.

ii) inf(−A) = − sup A.iii) sup(A +B) = supA + supB.iv) sup(A −B) = supA − inf B.v) inf(A +B) = inf A + inf B.

vi) inf(A −B) = inf A − supB.vii) sup(A ∪B) = max {supA, supB}.

viii) inf(A ∪B) = min {inf A, inf B}.ix) If 0 < A, then

sup{

1x

: x ∈ A}= max

{1

inf[A ∩ (−∞, 0)],

1inf[A ∩ (0,∞)]

}.

x) sup {xy : x ∈ A, y ∈ B} = max {(inf A) inf B, (inf A) supB, (supA) inf B, (supA) supB}.Source: [1566, p. 3].

Fact 1.8.7. Let S1, . . . , Sm be finite sets, and let n △=

∑mi=1 card(Si). Then,⌈ n

m

⌉≤ max

i∈{1,...,m}card(Si).

In particular, if m < n, then there exists i ∈ {1, . . . ,m} such that card(Si) ≥ 2. Remark: This is thepigeonhole principle.

Fact 1.8.8. Let S1, . . . , Sm be sets, assume that, for all i ∈ {1, . . . ,m}, card(Si) = n, and assumethat, for all distinct i, j ∈ {1, . . . ,m}, card(Si ∩ S j) ≤ k. Then,

n2mn + (m − 1)k

≤ card(∪m

i=1Si

).

Source: [1561, p. 23].Fact 1.8.9. Let X be a set, let n △

= card(X), let S1, . . . , Sm ⊆ X, and assume that, for all distincti, j ∈ {1, . . . ,m}, Si\S j and S j\Si are nonempty. Then, m ≤

(n⌊n/2⌋

). Source: [1992, p. 57]. Remark:

This is a Sperner lemma.Fact 1.8.10. Let X be a set, let n △

= card(X), let S1, . . . , Sm ⊆ X, let k ≤ n/2, assume that, forall i ∈ {1, . . . ,m}, card(Si) = k, and, for all distinct i, j ∈ {1, . . . ,m}, Si ∩ S j is nonempty. Then,m ≤

(n−1k−1

). Source: [1992, p. 57]. Remark: This is the Erdos-Ko-Rado theorem.

Fact 1.8.11. Let X be a set, let n △= card(X), let S1, . . . , Sm ⊆ X, assume that, for all i ∈

{1, . . . ,m}, card(Si) is odd, and, for all distinct i, j ∈ {1, . . . ,m}, card(Si ∩ S j) is even. Then, m ≤ n.Source: [1992, p. 57]. Remark: This is the oddtown theorem.

Fact 1.8.12. Let X be a set, let n △= card(X), let S1, . . . , Sm ⊆ X, let p ≥ 2 be prime, and assume

that, for all i ∈ {1, . . . ,m}, card(Si) = 2p−1, and, for all distinct i, j ∈ {1, . . . ,m}, card(Si∩S j) , p−1.Then, m ≤ ∑p−1

i=1

(ni

). Source: [1992, p. 58]. Remark: Excluding intersections of cardinality p − 1

restricts the number of possible subsets of X.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 25: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 25 — #71 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 25

Fact 1.8.13. Let X be a set, let S1, . . . , Sm,T1, . . . ,Tm ⊆ X, let k ≥ 1 and l ≥ 1, and assume that,for all i ∈ {1, . . . ,m}, card(Si) = k, card(Ti) = l, and Si ∩ Ti = ∅, and, for all i, j ∈ {1, . . . ,m} suchthat i < j, Si ∩ T j , ∅. Then, m ≤

(k+l

l

). Source: [1992, pp. 171–173].

Fact 1.8.14. Let S be a set, and let S denote the set of all subsets of S . Then, “⊂” and “⊆” aretransitive relations on S, and “⊆” is a partial ordering on S.

Fact 1.8.15. Define the relation R on R × R by

R△= {((x1, y1), (x2, y2)) ∈ (R × R) × (R × R) : x1 ≤ x2 and y1 ≤ y2}.

Then, R is a partial ordering.Fact 1.8.16. Define the relation L on R × R by

L△= {((x1, y1), (x2, y2)) ∈ (R × R) × (R × R) : x1 ≤ x2 and, if x1 = x2, then y1 ≤ y2}.

Then, L is a total ordering on R × R.Remark: Denoting this total ordering by “≼,” note that (1, 4) ≼ (2, 3) and (1, 4) ≼ (1, 5). Remark:This ordering is the lexicographic ordering or dictionary ordering, where “book” ≼ “box”. Notethat the ordering of words in a dictionary is reflexive, antisymmetric, and transitive, and that everypair of words can be ordered. Related: Fact 3.11.23.

Fact 1.8.17. Let n≥1 and x1, . . . , xn2+1∈R. Then, at least one of the following statements holds:i) There exist 1 ≤ i1 ≤ · · · ≤ in+1 ≤ n2 + 1 such that xi1 ≤ · · · ≤ xin+1 .

ii) There exist 1 ≤ i1 ≤ · · · ≤ in+1 ≤ n2 + 1 such that xi1 ≥ · · · ≥ xin+1 .

Source: [2294, p. 53] and [2526]. Remark: This is the Erdos-Szekeres theorem.

1.9 Facts on GraphsFact 1.9.1. Let G = (X,R) be a directed graph. Then, the following statements hold:i) R is the graph of a function on X if and only if every node in X has exactly one child.

Furthermore, the following statements are equivalent:ii) R is the graph of a one-to-one function on X.

iii) R is the graph of an onto function on X.

iv) R is the graph of a one-to-one and onto function on X.

v) Every node in X has exactly one child and not more than one parent.vi) Every node in X has exactly one child and at least one parent.

vii) Every node in X has exactly one child and exactly one parent.Related: Fact 1.10.1.

Fact 1.9.2. Let G = (X,R) be a directed graph, and assume that R is the graph of a functionf : X 7→ X. Then, either f is the identity function or G has a directed cycle.

Fact 1.9.3. Let G = (X,R) be a directed graph, and assume that G has a directed Hamiltoniancycle. Then, G has no roots and no leaves.

Fact 1.9.4. Let G = (X,R) be a directed graph. Then, G has either a root or a directed cycle.Fact 1.9.5. Let G = (X,R) be a directed graph. If G is a directed tree, then it is not transitive.Fact 1.9.6. Let G = (X,R) be a directed graph, and assume that G is directionally acyclic.

Furthermore, for all x, y ∈ X, let “x ≼ y” denote the existence of directional path from x to y. Then,“≼” is a partial ordering on X. Remark: This result provides the foundation for the Hasse diagram,which illustrates the structure of a partially ordered set. See [2405, 2734].

Fact 1.9.7. Let G = (X,R) be a directed graph. If G is a directed forest, then G is directionallyacyclic.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 26: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 26 — #72 ii

ii

ii

26 CHAPTER 1

Fact 1.9.8. Let G = (X,R) be a symmetric graph, and let n = card(X). Then, the followingstatements are equivalent:

i) G is a forest.ii) G is acyclic.

iii) No pair of nodes in X is connected by more than one path.Furthermore, the following statements are equivalent:

iv) G is a tree.v) G is a connected forest.

vi) G is connected and has no cycles.vii) G is connected and has n − 1 edges.

viii) G has no cycles and has n − 1 edges.ix) Every pair of nodes in X is connected by exactly one path.Fact 1.9.9. Let G = (X,R) be a tournament. Then, G has a directed Hamiltonian path. If, in

addition, G is directionally connected, then G has a directed Hamiltonian cycle. Remark: The sec-ond statement is Camion’s theorem. See [276, p. 16]. Remark: The directed edges in a tournamentdistinguish winners and losers in a contest where every player (that is, node) encounters every otherplayer exactly once.

Fact 1.9.10. Let G = (X,R) be a symmetric graph without self-edges, where X ⊂ R2, assumethat v △

= card(X) ≥ 3, assume that G is connected, and assume that the edges in R can be representedby line segments that lie in the same plane and that pairwise either are disjoint or intersect at a node.Furthermore, let e denote the number of edges of G, and let f denote the number of disjoint regionsin R2 whose boundaries are the edges of G. Then,

f + v − e = 2,32

f ≤ e ≤ 3v − 6, f ≤ 2v − 4.

If, in addition, G has no triangles, then e ≤ 2v − 4. Source: [754, pp. 162–166] and [2735, pp.97–116]. Remark: The equality gives the Euler characteristic for a planar graph. A related resultfor the surfaces of a convex polyhedron is given by Fact 5.4.8. See [2307].

1.10 Facts on FunctionsFact 1.10.1. Let X and Y be finite sets, and let f : X 7→ Y. Then, the following statements hold:i) If card(X) < card(Y), then f is not onto.

ii) If card(Y) < card(X), then f is not one-to-one.iii) If f is one-to-one and onto, then card(X) = card(Y).

Now, assume that card(X) = card(Y). Then, the following statements are equivalent:iv) f is one-to-one.v) f is onto.

vi) card[ f (X)] = card(X).Related: Fact 1.9.1.

Fact 1.10.2. Let f : X 7→ Y be invertible. Then, f Inv is invertible, and ( f Inv)Inv = f.Fact 1.10.3. Let f : X 7→ Y. Then, for all A, B ⊆ X, the following statements hold:i) A ⊆ f inv[ f (A)] ⊆ X.

ii) f inv[ f (X)] = X = f inv(Y).iii) If A ⊆ B, then f (A) ⊆ f (B).iv) f (A ∩ B) ⊆ f (A) ∩ f (B).

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 27: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 27 — #73 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 27

v) f (A ∪ B) = f (A) ∪ f (B).vi) f (A)\ f (B) ⊆ f (A\B).

Furthermore, the following statements are equivalent:vii) f is one-to-one.

viii) For all A ⊆ X, f inv[ f (A)] = A.ix) For all A, B ⊆ X, f (A ∩ B) = f (A) ∩ f (B).x) For all disjoint A, B ⊆ X, f (A) and f (B) are disjoint.

xi) For all A, B ⊆ X, f (A)\ f (B) = f (A\B).Source: [154, pp. 44, 45] and [643, p. 64]. Remark: To show that equality does not necessarilyhold in iv), let f (x) = x2, A = [−2, 1], and B = [−1, 2]. Then, f (A∩B) = [0, 1] ⊂ [0, 4] = f (A)∩ f (B).Related: Fact 3.12.7.

Fact 1.10.4. Let f : X 7→ Y. Then, for all A, B ⊆ Y, the following statements hold:i) f [ f inv(A)] = A ∩ f (X) ⊆ A.

ii) f [ f inv(Y)] = f (X).iii) If A ⊆ B, then f inv(A) ⊆ f inv(B).iv) f inv(A ∩ B) = f inv(A) ∩ f inv(B).v) f inv(A ∪ B) = f inv(A) ∪ f inv(B).

vi) f inv(A)\ f inv(B) = f inv(A\B).In addition, the following statements are equivalent:

vii) f is onto.viii) For all A ⊆ Y, f [ f inv(A)] = A.

Source: [154, pp. 44, 45] and [643, p. 64]. Related: Fact 3.12.8.Fact 1.10.5. Let f : X 7→ Y. Then, the following statements hold:i) If f is invertible, then, for all y ∈ Y, f inv(y) = { f Inv(y)}.

ii) Assume that f is left invertible, and define f : X 7→ R( f ), where, for all x ∈ X, f (x) △= f (x).Then, f is invertible, and, for all y ∈ R( f ), f inv(y) = { f Inv(y)}.

iii) If f is left invertible and f L is a left inverse of f , then, for all y ∈ R( f ), f inv(y) = { f L(y)}.iv) If f is right invertible and f R is a right inverse of f , then, for all y ∈ Y, f R(y) ∈ f inv(y).

Related: Fact 3.18.8.Fact 1.10.6. Let g: X 7→ Y and f : Y 7→ Z. Then, the following statements hold:i) If A ⊆ Z, then ( f ◦ g)inv(A) = ginv[ f inv(A)].

ii) f ◦ g is one-to-one if and only if g is one-to-one and the restriction f : g(X) 7→ Z of f isone-to-one. If these conditions hold and gL and f L are left inverses of g and f , respectively,then gL ◦ f L is a left inverse of f ◦ g.

iii) f ◦ g is onto if and only if the restriction f : g(X) 7→ Z of f is onto. Let g : X 7→ g(X),where, for all x ∈ X, g(x) = g(x). If these conditions hold and gR and f R are right inversesof g and f , respectively, then gR ◦ f R is a right inverse of f ◦ g.

iv) f ◦ g is invertible if and only if g is one-to-one and the restriction f : g(X) 7→ Z of f is one-to-one and onto. If these conditions hold, gL is a left inverse of g, and f Inv is the inverse off , then ( f ◦ g)Inv = gL ◦ f Inv.

Remark: A matrix version of this result is given by Fact 3.18.9 and Fact 3.18.10.Fact 1.10.7. Let f : X 7→ Y, let g: Y 7→ X, and assume that f and g are one-to-one. Then,

there exists h: X 7→ Y such that h is one-to-one and onto. Source: [968, pp. 311, 312] and [2092,

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 28: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 28 — #74 ii

ii

ii

28 CHAPTER 1

pp. 16, 17]. Remark: This is the Schroeder-Bernstein theorem.Fact 1.10.8. Let X and Y be sets, let f : X 7→ Y, and, for i ∈ {1, 2}, let gi : R( f ) 7→ Fn and

αi ∈ F. Then, (α1g1 + α2g2) ◦ f = α1(g1 ◦ f ) + α2(g2 ◦ f ). Remark: The composition operatorC(g, f ) △= g ◦ f is linear in its first argument.

1.11 Facts on IntegersFact 1.11.1. Let n,m ≥ 0 and k, l ≥ 2. Then,

∏ki=1(n + i) , ml. Source: [997]. Remark: A

product of consecutive integers cannot be a power of an integer.Fact 1.11.2. Let n be an integer. Then, n(n + 1)(n + 2)(n + 3) + 1 = (n2 + 3n + 1)2. Hence,

n(n + 1)(n + 2)(n + 3) + 1 is a square. Example: 5(6)(7)(8) + 1 = 412. Related: Fact 2.1.2.Fact 1.11.3. Let x be a real number, and assume that x + 1

2 is not an integer. Then, the integerclosest to x is ⌊x + 1

2 ⌋.Fact 1.11.4. Let w, x, y, and z be real numbers, and let n and m be integers. Then, the following

statements hold:i) If w|x and y|z, then wy|xz.

ii) If x|y and x|z, then x2|yz.iii) If x|y, then x|ny.iv) If x|y and y|z, then x|z.v) If x|y and x|z, then x|my + nz.Fact 1.11.5. Let n and m be integers, at least one of which is nonzero. Then, the following

statements hold:i) Assume that m is positive. Then, there exist unique integers q and r ∈ [0,m − 1] such that

n = qm + r. In particular, q = ⌊n/m⌋ and r = remm(n) = n − qm = n −m⌊n/m⌋ ∈ [0,m − 1].ii) If m is positive, then ⌈n/m⌉ = ⌊(n + m − 1)/m⌋.

iii) If n|m, then gcd {n,m} = |n|.iv) If k is prime and k|mn, then either k|m or k|n.v) gcd {n/ gcd {n,m},m/ gcd {n,m}} = 1.

vi) If both n and m are prime and m , n, then n and m are coprime.vii) If n > 0 and m > 0, then 1 ≤ gcd {n,m} ≤ min {n,m, |n − m|}.

viii) (lcm {n,m}) gcd {n,m} = |nm|.ix) n and m are coprime if and only if lcm {n,m} = |nm|.x) There exist integers k, l such that gcd {n,m} = kn + lm.

Now, assume that n and m are coprime, and let k be an integer. Then, the following statements hold:xi) gcd {n − m, n + m, nm} = 1.

xii) gcd {nk − mk, nk + mk} ≤ 2.xiii) gcd {(n − m)k, (n + m)k} ≤ 2k.

xiv) gcd {n2 − nm + m2, n + m} ≤ 3.xv) gcd {nk,m} = gcd {k,m}.

Finally, let n1, . . . , nk and m1, . . . ,ml be integers. Then, the following statement holds:xvi) gcd {n1m1, n1m2, . . . , nkml} = (gcd {n1, . . . , nk}) gcd {m1, . . . ,ml}.

Source: [2380, p. 12]. x)–xiv) are given in [1757, pp. 86, 89, 105]; xv) is given in [1241, p. 123].Example: gcd {221, 754} = 13 = −17(221) + 5(754). See [1757, pp. 86, 87]. Remark: The firstset in xvi) contains kl products. Remark: x) is the GCD identity. See [79, p. 17].

Fact 1.11.6. Let l,m, n ≥ 1. Then, the following statements hold:

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 29: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 29 — #75 ii

ii

ii

SETS, LOGIC, NUMBERS, RELATIONS, ORDERINGS, GRAPHS, AND FUNCTIONS 29

i) gcd {l,m, n} = gcd {gcd {l,m}, gcd {m, n}, gcd {n, l}}.ii) lmn = (gcd {lm,mn, nl}) lcm {l,m, n}.

iii) gcd {l, lcm {m, n}} = lcm {gcd {l,m}, gcd {l, n}}.iv) lcm {l, gcd {m, n}} = gcd {lcm {l,m}, lcm {l, n}}.v) gcd {lcm {l,m}, lcm {m, n}, lcm {n, l}} = lcm {gcd {l,m}, gcd {m, n}, gcd {n, l}}.

vi) lmn gcd {l,m, n} = (lcm {l,m, n})(gcd {l,m})(gcd {m, n}) gcd {n, l}.vii) gcd {l,m} = gcd {l + m, lcm {l,m}}.

viii)(gcd {l,m, n})2

gcd {l,m} gcd {m, n} gcd {n, l} =(lcm {l,m, n})2

lcm {l,m} lcm {m, n} lcm {n, l} .

Source: [1757, p. 105]. i) is given in [289, pp. 25, 144]; viii) is given in [1158, p. 310].Fact 1.11.7. Let n ≥ 1. Then, gcd {n2 + 1, (n + 1)2 + 1} ∈ {1, 5}. Furthermore, gcd {n2 + 1, (n +

1)2 + 1} = 5 if and only if n5≡ 2. Source: [289, pp. 31, 165].

Fact 1.11.8. Let k1, . . . , kn be positive integers, and assume that k1 < · · · < kn. Then,n−1∑i=1

1lcm {ki, ki+1}

≤ 1 − 12n−1 .

Source: [2380, p. 12].Fact 1.11.9. Let m and n be integers. Then, the following statements are equivalent:i) Either both m and n are even or both m and n are odd.

ii) n2≡ m.

Furthermore, the following statements are equivalent:iii) m|n.iv) n

|m|≡ 0.

v) n|m|≡ m.

Fact 1.11.10. Let k ≥ 1, and let m, n, p, q be integers. Then, the following statements hold:

i) If n = m, then nk≡ m.

ii) nk≡ n.

Furthermore, the following statements are equivalent:iii) k|(n − m).

iv) nk≡ m.

v) mk≡ n.

vi) −nk≡ −m.

vii) n − mk≡ 0.

Furthermore, the following statement holds:

viii) If nk≡ m and m

k≡ p, then nk≡ p.

Next, if pk≡ q and n

k≡ m, then the following statements hold:

ix) n + pk≡ m + q.

x) n − pk≡ m − q.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]

Page 30: Chapter One Sets, Logic, Numbers, Relations, …assets.press.princeton.edu/chapters/s11172.pdf · sets, logic, numbers, relations, orderings, graphs, and functions 3 Let A be a statement.

ii

“BernsteinMM” — 2017/11/7 — 18:53 — page 30 — #76 ii

ii

ii

30 CHAPTER 1

xi) npk≡ mq.

Finally, the following statements hold:

xii) If nk≡ m, and p is a positive integer, then pn

k≡ pm.

xiii) If nk≡ m, and p is a positive integer, then np k≡ mp.

xiv) If pnk≡ pm, then n

k/ gcd {k,p}≡ m.

xv) If pnk≡ pm and gcd {k, p} = 1, then n

k≡ m.xvi) k!|∏k−1

i=0 (n + i). For example, 11(12)(13) = 6(286) and (22)(23) · · · (28) = 5040(1184040).

xvii) If nk≡ n0 and m

k≡ m0, then nmk≡ remk(n0m0).

Source: xiv) is given in [2763, pp. 30, 31]. Remark: “k≡” is an equivalence relation on Z, which

partitions Z into residue classes.Fact 1.11.11. Let n ≥ 1, and let m be the sum of the decimal digits of n. Then, the following

statements hold:i) 3|n if and only if 3|m.

ii) n9≡ m.

Source: [2763, pp. 31, 32].Fact 1.11.12. Let n be a positive integer. Then, the following statements hold:

i) n2 3≡ 0 if and only if n3≡ 0.

ii) n2 3≡ 1 if and only if either n3≡ 1 or n

3≡ 2.

Source: [2114]. Example: 33≡ 6

3≡ 93≡ 12

3≡ 153≡ 0, 9

3≡ 363≡ 81

3≡ 1443≡ 225

3≡ 0,

13≡ 4

3≡ 73≡ 10

3≡ 133≡ 1, 2

3≡ 53≡ 8

3≡ 113≡ 14

3≡ 2, and 13≡ 4

3≡ 163≡ 25

3≡ 493≡ 64

3≡ 1003≡

1213≡ 169

3≡ 1963≡ 1.

Fact 1.11.13. Let k, l,m, n ≥ 1. Then, the following statements hold:i) If m ≤ n is prime, then m does not divide n!+1.Hence, there exists a prime k ∈ [n+1, n!+1]

such that k|n! + 1.ii) None of the integers n! + 2, n! + 3, . . . , n! + n are prime.

iii) Assume that n ≥ 2 is not prime, and let k be the smallest prime such that k|n. Then, k ≤√

n.If, in addition, 3

√n < k, then n/k is prime.

iv) If n is prime, then (2n−1 − 1)/n is an integer.

v) If n ≥ 3 is odd, then n2 8≡ 1.

vi) If n is prime and n ≥ 5, then either n6≡ 1 or n

6≡ 5.

vii) If n8≡ 7, then n is not the sum of three squares of integers.

viii) If n9≡ 4, then n is not the sum of three cubes of integers.

ix) The last digit of n2 is neither 2, 3, 7, nor 8.x) Neither 3 nor 5 divides (n + 1)3 − n3.

xi) If n ≥ 2, then n4 + 4n is not prime.xii) 3|n(n2 − 3n + 8), 6|n3 + 5n, 8|(n − 1)(n3 − 5n2 + 18n − 8).

xiii) 9|4n + 15n − 1, 30|n5 − n, 120|n5 − 5n3 + 4n.xiv) 121 does not divide n2 + 3n + 5.

© Copyright, Princeton University Press. No part of this book may be distributed, posted, or reproduced in any form by digital or mechanical means without prior written permission of the publisher.

For general queries, contact [email protected]


Recommended