Sets and Funcctions, Cardinality

Embed Size (px)

Citation preview

  • 8/19/2019 Sets and Funcctions, Cardinality

    1/22

    M.Sc. program in mathematics

    INTRODUCTORY SET THEORYKatalin K´ arolyi

    Department of Applied Analysis, E¨ otv¨ os Lor´ and University

    H-1088 Budapest, M´ uzeum krt. 6-8.

    CONTENTS

    1. SETS

    Set, equal sets, subset, the empty set, power set of a set;union, intersection, difference of sets; de Morgan’s laws;ordered pairs, Cartesian product of sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    2. LOGIC

    Proposition, logical values; negation, conjunction, disjunction,implication, equivalence, truth tables; universal and existential quantiers;negation of propositions; direct and indirect methods of proofs . . . . . . . . . . . . . . . 5EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    3. RELATIONS

    Relation, domain and range of relations; reexive, irreexive, symmetric,

    antisymmetric, transitive relations; equivalence relation, order relation;inverse relation; classications of sets, equivalence classes,classications corresponding to equivalence relations . . . . . . . . . . . . . . . . . . . . . . . . . . 9EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    4. FUNCTIONS

    Function, domain, range, target of functions; restrictions of functions;injective, surjective, bijective functions; equality of functions;inverse function, composition of functions; image of sets under a function,inverse image of sets under a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    5. CARDINALITY OF SETS

    Cardinality of sets, equivalent sets, Bernstein’s theorem;nite and innite sets, countably innite sets, countable and uncountable sets;continuum cardinality, Cantor’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17EXERCISES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

  • 8/19/2019 Sets and Funcctions, Cardinality

    2/22

    M.Sc. program in mathematics Department of Applied Analysis,E¨ otv¨ os Lor´ and University, Budapest

    INTRODUCTORY SET THEORY

    1. SETS

    Undened terms: set and to be an element of a set

    We do not dene neither the set nor the element of a set, their meanings can beunderstood intuitively (not needing denition).However, we say that a set is any collection of denite, distinguishable objects , andwe call these objects the elements of the set .

    Notations.(1) Sets are usually denoted by capital letters ( A,B,C,... ) .

    The elements of the set are usually denoted by small letters ( a,b,c,... ) .

    (2) If X is a set and x is an element of X , we write x ∈ X .(We also say that x belongs to X .)If X is a set and y is not an element of X , we write y /∈ X .(We also say that y does not belong to X .)

    (3) When we give a set, we generally use braces, e.g.:(i) S := {a ,b ,c , . . .} where the elements are listed between braces,three dots imply that the law of formation of other elements is known,(ii) S := {x ∈ X : p(x) is true } where “x” stands for a generic elementof the set S and p is a property dened on the set X .

    Remark.If we want to emphasize that the elements of the set are also sets, we denote the setby script capital letter, such as:

    (i) A := {A,B,C, . . . } where A,B,C, . . . are sets,(ii) A := {Aα : α ∈ Γ} where Γ is the so called indexing set and Aα ’s are sets.Examples.

    1. N := {0, 1, 2, 3, . . .} the set of all natural numbers,N+ := {n ∈N : n > 0},2. Z := {0, −1, +1 , −2, +2 , . . .} the set of all integers,3. Q := { p/q : p ∈Z , q ∈N+ } the set of all rational numbers,Q + := {r ∈Q : r > 0},4. R := the set of all real numbers,

    R + := {x ∈R : x > 0},5. C := the set of all complex numbers.

    1

  • 8/19/2019 Sets and Funcctions, Cardinality

    3/22

    Denitions.

    (1) Equal sets:We dene A = B if A and B have the same elements.

    (2) Subset:We say that A is a subset of B and we write A ⊂ B or B ⊃ Aif every element of A is also an element of B.(We also say that A is included in B or B includes A or B is a superset of A. )

    (3) Proper subset:We say that A is a proper subset of B and we write A ⊂ B strictly if A ⊂ B and A = B.(There exists at least one element b ∈ B such that b /∈ A. )

    (4) The empty set:The set which has no element is called the empty set and is denoted by ∅.(That is ∅ = {x ∈ A : x /∈ A}, where A is any set. )(5) Power set of a set:Let X be any set. The set of all subsets of X is called the power set of X and is denoted by P (X ).(That is we dene P (X ) := {A : A ⊂ X } )

    Remarks.

    Let A and B be any sets. Then the following propositions can be proved easily:

    (1) A = B if and only if A ⊂ B and B ⊂ A,(2) A ⊂ A and ∅ ⊂ A,(3) A ∈ P (A) and ∅ ∈ P (A),(4) P (∅) = { ∅ }. ( P (∅) is not empty, it has exactly one element, the ∅ . )

    OPERATIONS BETWEEN SETS

    Let H be a set including all sets A,B,C, . . . which occur in the following.Let us call H the basic set .

    Union of sets: (denoted by

    ∪, called ”union” or ”cup”)

    (1) The union of sets A and B is dened by A∪B := {x ∈ H : x ∈ A or x ∈ B}.(2) The union of a set A of sets is dened by A := {x ∈ H : ∃A ∈ A x ∈ A}.(x belongs to at least one element of A )Intersection of sets: (denoted by ∩, called ”intersection” or ”cap”)(1) The intersection of sets A and B is dened by A∩B := {x ∈ H : x ∈ A and x ∈ B}.(2) The intersection of a set A = ∅ is dened by A := {x ∈ H : ∀A ∈ A x ∈ A}.(x belongs to all elements of A )

    2

  • 8/19/2019 Sets and Funcctions, Cardinality

    4/22

  • 8/19/2019 Sets and Funcctions, Cardinality

    5/22

    M.Sc. program in mathematics Department of Applied Analysis,E ötv ös Lor ánd U niversity, Budapest

    EXERCISES 1.

    1. Prove that A∪B = B if and only if A ⊂ B .2. Prove that A ∩B = B if and only if B ⊂ A.3. Prove that A∪(A ∩B ) = A and A ∩(A∪B ) = A.4. Prove that A\B = A ∩B c .5. Let A := {Aα : α ∈ Γ}. Prove that for all α ∈ Γ A ⊂ Aα ⊂ A,that is for all α ∈ Γ {Aβ : β ∈ Γ} ⊂ Aα ⊂ {Aβ : β ∈ Γ}.6. Let H be the basic set (which includes all the sets A,B,C, . . . that we consider).

    A∪A = ? A∪H = ? A∪∅ = ?A ∩A = ? A ∩H = ? A ∩∅ = ?A \ A = ? A \ H = ? A \ ∅ = ? ( Ac )c = ? ∅c = ? H c = ?7. Prove the following statements:

    (i)

    A \ C =

    {A

    \ C : A

    ∈ A},

    (ii) A \ C = {A \ C : A ∈ A}.8. Prove the following statements:

    (i) P (A ∩B ) = P (A) ∩ P (B ),(ii) P (A∪B ) ⊃ P (A)∪P (B ) (strictly, if A ⊂ B or B ⊂ A ),(iii) P (A \ B) \ { ∅ } ⊂ P (A) \ P (B ) (strictly, if A ⊂ B ).9. Let H := {1, 2, 3, 4, 5}, A := {1, 2}, B := {1, 3, 5}.

    A∪B = ? A ∩B = ? A \ B = ? B \ A = ? Ac = ? Bc = ?A×

    B = ? B

    ×A = ?

    P (A) = ?

    P (B ) = ?

    10. Let A1 , A2 be any sets. Find disjoint sets B1 , B 2 such that A1 ∪A2 = B1 ∪B2 .11. Prove that A ×(B ∩C ) = ( A ×B ) ∩(A ×C ) for any sets A,B,C .12. Determine which of the following sets are empty:

    A1 := {n ∈Z : n2 = 2},A2 := {x ∈R : x3 −2x2 + x −2 = 0},A3 := {(x, y ) ∈R 2 : x2 + xy + y2 < 0}.

    4

  • 8/19/2019 Sets and Funcctions, Cardinality

    6/22

    2. LOGIC

    Basic ideas of logic: proposition and logical values

    Proposition:

    We dene a proposition to be a statement which is either true or false .When we deal with propositions in logic we consider sentences without being interestedin their meanings, only examining them as true or false statements.In the following, propositions will be denoted by small letters ( p, q, r, . . . ).

    Logical values:There are two logical values: true and false ,

    denoted by T and F , respectively.

    Examples.

    1. p := for each real number x, x2 +1 is positive .The logical value of the proposition p is true .

    2. q := if x =2 then x2 −1=0.The logical value of the proposition q is false .

    OPERATIONS BETWEEN PROPOSITIONS

    Negation: (denoted by ¬, called ”not” )The negation of a proposition p is dened by

    ¬ p := true if p is false false if p is true .

    Conjunction: (denoted by ∧, called ”and” )The conjunction of propositions p and q is dened by

    p∧q := true if p and q are both true false if at least one of p and q is false .

    Disjunction: (denoted by ∨, called ”or” )The disjunction of propositions p and q is dened by

    p∨q := true if at least one of p and q is true false if p and q are both false .

    Implication: (denoted by ⇒, read ”implies” )The implication between propositions p and q is dened by

    p ⇒ q := true if p and q are both true , or p is false false if p is true and q is false .

    5

  • 8/19/2019 Sets and Funcctions, Cardinality

    7/22

    Equivalence: (denoted by ⇔, read ”is equivalent to” )The equivalence between propositions p and q is dened by

    p ⇔ q := true if p and q have the same logical value false if p and q have different logical values .

    Remarks.

    (1) For p ⇒ q we can also say thatif p then q , p only if q , p is a sufficient condition for q ,q is a necessary condition for p.

    (2) For p

    ⇔ q we can also say that

    p if and only if q , ( p iff q ), p is a necessary and sufficient condition for q .

    (3) The following truth tables can be useful to resume the denitions of the logical operations:

    p ¬ pT F

    F T

    p q p∧q p∨q p ⇒ q p ⇔ q T T T T T T

    T F F T F F

    F T F T T F

    F F F F T T

    (4) The following propositions can be proved easily:

    (i) p ⇔ q is equivalent to ( p ⇒ q )∧(q ⇒ p),that is, for all values of p and q p ⇔ q = ( p ⇒ q )∧(q ⇒ p),(ii) p ⇒ q = (¬ p)∨q for all values of p and q .

    (5) A proposition which is always true is called tautology , anda proposition which is always false is called contradiction .

    According to (4) we have(i) p ⇔ q ⇔ ( p ⇒ q )∧(q ⇒ p) ≡ T , (ii) ( p ⇒ q ) ⇔ (¬ p)∨q ≡ T ,i.e., p ⇔ q ⇔ ( p ⇒ q )∧(q ⇒ p) and ( p ⇒ q ) ⇔ (¬ p)∨q are tautologies; p∨(¬ p) is also a tautology , while p∧(¬ p) is a contradiction .

    6

  • 8/19/2019 Sets and Funcctions, Cardinality

    8/22

    Universal and existential quantiers:

    Let S be a set and for all elements s of S let p(s) be a proposition.We dene the propositions ∀s ∈ S p(s) and ∃s ∈ S p(s) such as(i) ∀s ∈ S p(s) := true if p(s) is true for all s ∈ S false if there exists at least one s ∈ S such that p(s) is false ,(ii) ∃s ∈ S p(s) :=

    true if there exists at least one s ∈ S such that p(s) is true false if p(s) is false for all s ∈ S .The symbol ∀ is read “for all” and is called the universal quantier ,the symbol ∃ is read “there exists” and is called the existential quantier .

    Negation of propositions.

    It is of crucial importance that we can negate propositions correctly. In the followingwe show how to negate propositions in accordance with the denitions of the logicaloperations and the universal and existential quantiers.

    (1) When the quantiers do not occur in the proposition, we have(i) ¬( p∧q ) ≡ (¬ p)∨(¬q ) ,

    (ii) ¬( p∨q ) ≡ (¬ p)∧(¬q ) ,(iii) ¬( p ⇒ q ) ≡ ¬(¬ p)∨q ≡ ¬(¬ p) ∧(¬q ) ≡ p∧(¬q ) ,(iv) ¬( p ⇔ q ) ≡ ¬( p ⇒ q )∧(q ⇒ p) ≡ ¬( p ⇒ q ) ∨¬(q ⇒ p) ≡

    ≡ p

    (

    ¬q )

    q

    (

    ¬ p)

    ≡ p

    q

    (

    ¬ p)

    (

    ¬q ) .

    (2) When quantiers occur in the proposition, we have(i) ¬∀s ∈ S p(s) ≡ ∃s ∈ S ¬ p(s) ,

    (ii) ¬∃s ∈ S p(s) ≡ ∀s ∈ S ¬ p(s) .As a general rule, we have to change ∀ into ∃ and change ∃ into ∀ ,and nally negate the proposition which follows the quantier.

    Methods of proofs.There are two main methods to prove theorems:

    (1) direct methods: Since ( p ⇒ r )∧(r ⇒ q ) ⇒ p ⇒ q ≡ T ,we can prove p ⇒ q by proving p ⇒ r and r ⇒ q , where r is any other proposition.(2) indirect methods:

    (i) Since ( p ⇒ q ) ≡ (¬ p)∨q ≡ (¬q ) ⇒ (¬ p) , we can prove p ⇒ q by provingits contrapositive , (¬q ) ⇒ (¬ p) (contrapositive proof ).(ii) If r is any false proposition, then p∧(¬q ) ⇒ r ≡ p ⇒ q, thus we can prove

    p ⇒ q by proving p∧(¬q ) ⇒ r (proof by contradiction ).

    7

  • 8/19/2019 Sets and Funcctions, Cardinality

    9/22

    M.Sc. program in mathematics Department of Applied Analysis,E ötv ös Lor ánd U niversity, Budapest

    EXERCISES 2.

    1. Prove that for all values of p, q, r the following statements are true. p∧q = q ∧ p ( p∧q )∧r = p∧(q ∧r ) p∨q = q ∨ p ( p∨q )∨r = p∨(q ∨r )

    p∧(q ∨r ) = ( p∧q )∨( p∧r ) p∨(q ∧r ) = ( p∨q )∧( p∨r )

    2. Answer the questions for any values of p. p

    p = ? p

    T = ? p

    F = ?

    p∨ p = ? p∨T = ? p∨

    F = ? p ⇒ p = ? p ⇒ T = ? p ⇒ F = ? p ⇔ p = ? p ⇔ T = ? p ⇔ F = ?

    3. Determine which of the following propositions are true:(a) n ∈Z ⇒ n2 > 1(b) ∃x ∈R x3 −2x2 + x−2 = 0(c) ∀(x, y ) ∈R 2 x2 + xy + y2 < 0

    4. Negate the following propositions, then determine which of them are true.

    (a) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) x2 − px + 1 > 0(b) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) x ·sin

    px

    > 0

    (c) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) cos px

    > 0

    (d) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) p < log2 x(e) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) x

    − p < 10− 6

    (f) ∀ p ∈R + ∃K ∈R + ∀x ∈ (K, + ∞) ( p+1)− x < 10− 6

    (g) ∀ε ∈R + ∃x ∈ (0, π/ 4] sinx = 1

    ε + 1 /ε(h) ∃δ ∈R + ∀x ∈ (0, δ ] ∃ε ∈R + sin x = 1 ε + 1 /ε5. Prove that ( p ⇒ r )∧(r ⇒ q ) ⇒ p ⇒ q ≡ T .6. Prove that ∀k ∈N+ ∀n ∈N+

    n√ k is an integer or an irrational number.7. Prove that (n ∈N+ )∧(n2 is odd) ⇒ (n is odd).

    8

  • 8/19/2019 Sets and Funcctions, Cardinality

    10/22

    3. RELATIONS

    Denition. (Relations.)Any subset of a Cartesian product of sets is called a relation .

    ( I.e., a relation is a set of ordered pairs. )

    If X and Y are sets and ρ ⊂ X ×Y , we say that ρ is a relation from X to Y .(We can also say that ρ is a relation between the elements of X and Y .)If ρ ⊂ X ×X , we say that ρ is a relation in X .If (x, y ) ∈ ρ , we often write x ρ y .

    Examples.

    1. The relation of equality in a nonempty set X .ρ1 := { (x, x ) : x ∈ X },thus ( x, y ) ∈ ρ1 ⊂ X ×X iff x = y.

    2. The relation of divisibility in N+ .ρ2 := { (m, n ) ∈N+ ×N+ : ∃k ∈N+ n = k ·m },thus ( m, n ) ∈ ρ2 ⊂N+ ×N+ iff m | n ,that is n can be divided by m without remainder ( n is divisible by m).

    3. The relation of congruence modulo m in Z.ρ3 := { (a, b) ∈Z ×Z : ∃k ∈Z a−b = k ·m }, (m ∈N+ ),thus ( a, b) ∈ ρ3 ⊂Z ×Z iff m | a−b,that is ( a−b) can be divided by m without remainder;(a−b) is divisible by m; dividing a and b by m we get the same remainder.

    4. The relation of “less” in R.ρ4 := { (x, y ) ∈R ×R : x < y },thus ( x, y ) ∈ ρ4 ⊂R ×R iff y−x is a positive number.

    5. The relation of “greater or equal” in R.ρ5 := { (x, y ) ∈R ×R : x ≥ y },thus ( x, y ) ∈ ρ5 ⊂R ×R iff x−y is a nonnegative number.

    6. Relation between the elements of the set T of all triangles of the plane and

    the elements of the set R+0 of all nonnegative numbers,ρ6 := { (t, a ) ∈ T ×R +0 : the area of the triangle t is a }.

    7. Relation between the elements of the set R+0 of all nonnegative numbers andthe elements of the set T of all triangles of the plane,ρ7 := { (a, t ) ∈R +0 ×T : the area of the triangle t is a }.

    8. Relation between the elements of the set C of all circles of the plane andthe elements of the set L of all lines of the plane,ρ8 := { (c, l) ∈ C ×L : l is a tangent of c }.

    9

  • 8/19/2019 Sets and Funcctions, Cardinality

    11/22

    Denitions. (Domain and range of relations.)Let X and Y be sets and ρ be a relation from X to Y (ρ ⊂ X ×Y ).(1) Domain of the relation ρ:

    The domain of ρ is dened by D(ρ) := {x ∈ X : ∃y ∈ Y (x, y ) ∈ ρ}.(2) Range of the relation ρ:

    The range of ρ is dened by R(ρ) := {y ∈ Y : ∃x ∈ X (x, y ) ∈ ρ}.Denitions. (Properties of relations.)Let X be a set and ρ be a relation in X (ρ ⊂ X 2 ).(1) Reexivity:

    ρ is called reexive if ∀x ∈ X (x, x ) ∈ ρ.(2) Irreexivity:

    ρ is called irreexive if

    ∀x

    ∈ X (x, x ) /

    ρ.

    (3) Symmetry:ρ is called symmetric if ∀(x, y ) ∈ ρ (y, x ) ∈ ρ,that is ( x, y ) ∈ ρ implies (y, x ) ∈ ρ.

    (4) Antisymmetry:ρ is called antisymmetric if (x, y ) ∈ ρ and (y, x ) ∈ ρ implies x = y.

    (5) Transitivity:ρ is called transitive if (x, y ) ∈ ρ and (y, z ) ∈ ρ implies (x, z ) ∈ ρ.

    Examples. (see page 9 )1. Equality is a reexive, symmetric, antisymmetric and transitive relation.2. Divisibility is a reexive, antisymmetric and transitive relation.3. Congruence modulo m is a reexive, symmetric and transitive relation.4. The relation “less” is irreexive, antisymmetric and transitive.5. The relation “greater or equal” is reexive, antisymmetric and transitive.

    Denitions. (Special relations.)Let X be a nonempty set and ρ be a relation in X (ρ ⊂ X 2 ).(1) Equivalence relation:

    We say that ρ is an equivalence relation if it is(a) reexive , (b) symmetric , (c) transitive .

    (2) Order relation:We say that ρ is an order relation if it is(a) reexive , (b) antisymmetric , (c) transitive .

    We say that the order relation ρ is a total (linear) order relation if for each (x, y) ∈ X 2 (x, y ) ∈ ρ or (y, x ) ∈ ρ is satised;otherwise ρ is said to be a partial order relation .

    10

  • 8/19/2019 Sets and Funcctions, Cardinality

    12/22

    Examples. (see page 9 )1. Equality (both equivalence and order relation) is a partial order relation .2. Divisibility is a partial order relation .5. The relation “greater or equal” is a total order relation .

    Denition. (Inverse relation.)Let X and Y be sets and ρ be a relation from X to Y .The inverse of ρ (denoted by ρ− 1 ) is dened by ρ− 1 := {(y, x ) ∈ Y ×X : (x, y ) ∈ ρ}.Denition. (Classications of sets.)Let X be a nonempty set. A set A (of subsets of X ) is called a classication of X if the following properties are satised:

    (i) ∀A ∈ A A is a nonempty subset of X ,(ii) A, B ∈ A and A = B implies A ∩B = ∅,(iii) A

    = X .The elements of A are called the classes of the classication .Denition. (Equivalence classes.)Let X be a nonempty set and ρ be an equivalence relation in X .For each x ∈ X we dene Ax := {y ∈ X : (x, y ) ∈ ρ} ∈ P (X ) .Ax is called the (equivalence) class of x .Theorem (3.1).Let X be a nonempty set and ρ be an equivalence relation in X . Then

    (i) ∀x ∈ X Ax is a nonempty subset of X ,(ii) x, y ∈ X and x = y implies Ax ∩Ay = ∅ or Ax = Ay ,(iii) { Ax : x ∈ X } = X ,that is {Ax : x ∈ X } is a classication of X .Proof.

    (i) Since ρ is reexive we have x ∈ Ax for all x ∈ X , hence we have (i).(ii) We prove (ii) by contradiction .

    Let us suppose that ∃x, y ∈ X, x = y, such that Ax ∩Ay = ∅ and Ax = Ay .We prove that Ax = Ay , which is a contradiction .Let z be an element of Ax ∩Ay . Then ( x, z ) ∈ ρ and ( y, z ) ∈ ρ ,thus ( x, y ) ∈ ρ and (y, x ) ∈ ρ (by the symmetry and transitivity of ρ).(a) Ax ⊂ Ay since p ∈ Ax ⇒ (x, p) ∈ ρ ⇒ ( p, x) ∈ ρ (and ( x, y ) ∈ ρ) ⇒ ( p, y) ∈ ρ ⇒ (y, p) ∈ ρ⇒ p ∈ Ay ,

    (b) Ay ⊂ Ax can be proved similarly to (a).(iii) If z ∈ X then z ∈ Az , thus z ∈ {Ax : x ∈ X } ⊂ X , hence we have (iii). ♠

    11

  • 8/19/2019 Sets and Funcctions, Cardinality

    13/22

    Denition. (Classications corresponding to equivalence relations.)Let X be a nonempty set and ρ be an equivalence relation in X .The set of all equivalence classes corresponding to ρ (which is a classication of X according to the theorem (3.1) ) is called the classication of X corresponding to the relation ρ, and is denoted by X/ρ , i.e. X/ρ :=

    {Ax : x

    ∈ X

    }.

    (We also say that X/ρ is the classication of X dened by ρ.)

    Examples. (see page 9 )

    1. The classication of X corresponding to the relation of equality is the setX/ρ 1 = { {x} ∈ P (X ) : x ∈ X }.

    3. The classication of Z corresponding to the relation of congruence modulo m is the set of all remainder classes modulo m (m ∈N+ ), that isZ /ρ 3 = { {r + k ·m : k ∈Z} ∈ P (Z ) : r ∈ {0, 1, . . . , m −1} }.

    Remark.Theorem (3.1) shows that each equivalence relation determines a classication of the set .The following theorem shows the opposite direction, that is each classication of a set determines an equivalence relation in the set.

    Theorem (3.2).

    Let X be a nonempty set and A be a classication of X . Then(i) the relation dened by ρ := { (x, y ) ∈ X ×X : ∃A ∈ A x, y ∈ A }is an equivalence relation in X ,

    (ii) the classication of X corresponding to ρ is equal to A, that is X/ρ = A.Proof.

    (i) x ∈ X ⇒ (∃A ∈ A x ∈ A) ⇒ (x, x ) ∈ ρ ⇒ ρ is reexive ,(x, y ) ∈ ρ ⇒ (∃A ∈ A x, y ∈ A) ⇒ y, x ∈ A ⇒ (y, x ) ∈ ρ ⇒ ρ is symmetric ,(x, y ) ∈ ρ and (y, z ) ∈ ρ ⇒ (∃A1 ∈ A x, y ∈ A1 ) and (∃A2 ∈ A y, z ∈ A2 )

    ⇒ y ∈ A1 ∩A2 ⇒ A1 = A2 ⇒ x, z ∈ A1 ⇒ (x, z ) ∈ ρ ⇒ ρ is transitive ,thus ρ is an equivalence relation .

    (ii) We prove that X/ρ ⊂ A and A ⊂ X/ρ .(a) Let B ∈ X/ρ ⇒ ∃b ∈ B and B = {x ∈ X : (b, x) ∈ ρ},b

    ∈ X

    ⇒ ∃A

    ∈ A b

    ∈ A,

    x ∈ B ⇒ (b, x) ∈ ρ (and b ∈ A) ⇒ x ∈ A, ⇒ B ⊂ A,x ∈ A (and b ∈ A) ⇒ (b, x) ∈ ρ ⇒ x ∈ B , ⇒ A ⊂ B ,⇒ B = A ⇒ B ∈ A,

    (b) Let A ∈ A ⇒ ∃a ∈ A,let B := {x ∈ X : (a, x ) ∈ ρ} ∈ X/ρ ,x ∈ A (and a ∈ A) ⇒ (a, x ) ∈ ρ ⇒ x ∈ B , ⇒ A ⊂ B ,x ∈ B ⇒ (a, x ) ∈ ρ (and a ∈ A) ⇒ x ∈ A, ⇒ B ⊂ A,⇒ A= B ⇒ A ∈ X/ρ . ♠

    12

  • 8/19/2019 Sets and Funcctions, Cardinality

    14/22

    M.Sc. program in mathematics Department of Applied Analysis,E ötv ös Lor ánd U niversity, Budapest

    EXERCISES 3.

    1. Let X be a nonempty set and ρ be a relation in X .Prove the following propositions:

    (a) if ρ is reexive, then D(ρ) = R(ρ) = X and ρ− 1 is also reexive,(b) if ρ is irreexive, then ρ− 1 is also irreexive,(c) if ρ is symmetric, then D(ρ) = R(ρ) and ρ− 1 is also symmetric,(d) if ρ is antisymmetric, then ρ− 1 is also antisymmetric,(e) if ρ is transitive, then ρ− 1 is also transitive.

    2. Which properties have the following relations?

    (a) ρ := { (x, y ) ∈Q ×Q : x > y },(b) ρ := { (x, y ) ∈R ×R : x ≤ y },(c) ρ := { (A, B ) ∈ P (X ) × P (X ) : A ⊂ B }, (X = ∅),(d) ρ := { ((m1 , m 2 ), (n 1 , n 2 )) ∈ (N+ )2 ×(N+ )2 : m1 | n1 and m2 | n2 }.

    3. Prove that the following relations are equivalence relations anddetermine the corresponding classications.

    (a) ρ := { ( p, q ) ∈N ×N : m | q − p }, (m ∈N+ ),(b) ρ := { ((m1 , m 2 ), (n 1 , n 2 )) ∈ (N+ )2 ×(N+ )2 : m1 + n2 = m2 + n1 },(c) ρ := { ((m 1 , m 2 ), (n1 , n 2 )) ∈ (Z ×Z\{0})×(Z ×Z\{0}) : m1 ·n 2 = m2 ·n 1 },(d) ρ := { (x, y ) ∈R ×R : y −x ∈Q },(e) ρ := { ( p, q ) ∈Q ×Q : ∃n ∈Z n ≤ p < n +1 and n ≤ q < n +1 }.(f) ρ := { (x, y ) ∈ (R\{0})2 : x · |y| = y · |x| },

    4. Determine the equivalence classes Aα determined by the followingequivalence relations:

    (a) ρ := { ( p, q ) ∈N ×N : m | q − p }, (m ∈N+ ),α = 3,(d) ρ := { (x, y ) ∈R ×R : y −x ∈Q },α = π,(e) ρ := { ( p, q ) ∈Q ×Q : ∃n ∈Z n ≤ p < n +1 and n ≤ q < n +1 },α = 3 , 14.

    5. Determine the inverse relations of the relations given in “Examples” on page 9.

    13

  • 8/19/2019 Sets and Funcctions, Cardinality

    15/22

    4. FUNCTIONS

    Denition. (Functions.)

    Let X and Y be sets.

    A relation f ⊂ X ×Y is called a function from X to Y if (i) D(f ) = X ,(ii) ∀x ∈ X the set {y ∈ Y : (x, y ) ∈ f } has exactly one element.(I.e. ∀x ∈ X there exists exactly one element y ∈ Y such that ( x, y ) ∈ f . )We also say that f is a map, mapping or transformation from X to Y .

    If f is a function from X to Y , we write f : X → Y .The notations y = f (x) (traditionally said “ y is a function of x”) andx → y mean that ( x, y ) ∈ f .We call f (x) the element associated with x .We also say that f (x) is the image of x under f or the value of f at x.

    Remarks. (Domain, range and target of functions.)

    Let X , Y be sets and f : X → Y be a function.According to the denitions for relations, D(f ) is the domain of the function f and R(f ) = {f (x) : x ∈ D(f ) } is the range of the function f .If X ⊂ Z , we can also write f : Z ⊃→ Y , which means that D(f ) ⊂ Z .Y is called the target of the function f .

    Denition. (Restrictions of functions.)

    Let X , Y , A be sets, A ⊂ X , and f : X → Y be a function.The function g : A → Y , g(x) := f (x) is called the restriction of f to A,and we use the notation f |A := g .

    Denitions. (Injective, surjective, bijective functions.)Let X , Y be sets and f : X → Y be a function.(1) Injective function:

    We say that f is injective if for all x, z ∈ X f (x)= f (z) implies x= z,that is x = z implies f (x) = f (z).(We also say that f is an injection , or a one–to–one correspondence .)(2) Surjective function:

    We say that f is surjective if ∀y ∈ Y there exists x ∈ X such that f (x)= y,that is R(f ) = Y .(We also say that f is a surjection , or f is a map onto Y .)

    14

  • 8/19/2019 Sets and Funcctions, Cardinality

    16/22

    (3) Bijective function:We say that f is bijective if it is both injective and surjective .(We also say that f is a bijection .)

    Remark. (Equality of functions.)Let f and g be functions. f and g are equal functions (f = g ), iff (i) D(f ) = D(g) =: X and (ii) ∀x ∈ X f (x)= g(x).Denition. (Inverse function.)

    If f : X → Y is injective , then f̃ : X → R(f ), f̃ (x) := f (x) is bijective , thusthe relation f̃ − 1⊂ R(f ) ×X is a function that we call the inverse function of f .I.e., the inverse function of f is dened by f − 1 : R(f ) → X , f

    − 1 (y) := x ,where x is the unique element of X such that f (x)= y .

    Denition. (Composition of functions.)Let g : X → Y 1 and f : Y 2 → Z be functions.We dene the composition of f and g, denoted by f ◦g , such as(f ◦g) : X ⊃→ Z , D(f ◦g) := { x ∈ X : g(x) ∈ Y 2 }, (f ◦g)(x) := f (g(x)).

    Denition. (Image and inverse image of sets under functions.)Let f : X

    → Y be a function and A, B be any sets.

    (1) Image of A under f :We dene the set f (A) := { f (x) : x ∈ A }and call f (A) the image of A under the function f .(Note that f (A)= f (A ∩X ) ⊂ f (X ) = R(f ) ⊂ Y .)

    (2) Inverse image of B under f :We dene the set f − 1 (B ) := { x ∈ X : f (x) ∈ B }and call f − 1 (B ) the inverse image of B under the function f .(Note that f − 1 (B )= f − 1 (B ∩Y ) ⊂ f

    − 1 (Y ) = f − 1 (R(f )) = X .)

    Remarks.It is important to see that the set f − 1 (B ) can be dened for any set B, even if f is notinjective (thus, the inverse function of f does not exist). The notation f − 1 in “f − 1 (B )”does not mean the inverse function of f . However, we can easily prove that if f isinjective , then for any set B f − 1 (B ) is the image of B under the inverse function of f .

    We can also prove that the function f is injective if and only if for each y ∈ R(f )the set f − 1 ({y}) has exactly one element .

    15

  • 8/19/2019 Sets and Funcctions, Cardinality

    17/22

    M.Sc. program in mathematics Department of Applied Analysis,E ötv ös Lor ánd U niversity, Budapest

    EXERCISES 4.

    1. Determine the domain and the range of the following functions f : R⊃→Rand examine which of them are injective or surjective :(a) f (x) := | x |, (b) f (x) := | x |,(c) f (x) := [x], (d) f (x) := x −[x],(e) f (x) := ln x, (f) f (x) := ln | x |,(g) f (x) := | ln x |, (h) f (x) := | ln | x | |,(i) f (x) := lg √ x, (j) f (x) := √ lg x,(k) f (x) := lg x2 , (l) f (x) := 2 lg x,(m) f (x) := ( √ x −3)2 , (n) f (x) :=

    (x −3)2 .

    2. Let f be any injective function. Prove the following propositions:(a) D(f ◦f

    − 1 ) = R(f ), (f ◦f − 1 )(y) = y for all y ∈ R(f ),that is f ◦f

    − 1 is the identity function on R(f ).(b) D(f − 1 ◦f ) = D(f ), (f

    − 1 ◦f )(x) = x for all x ∈ D(f ),that is f − 1 ◦f is the identity function on D(f ).3. Determine the following functions:

    (a) ln ◦exp, (b) exp ◦ln,(c) sin◦

    arcsin, (d) arcsin

    ◦sin,

    (e) cos ◦arccos, (f) arccos ◦cos.4. Let f : X → Y, A, B ⊂ X and C, D ⊂ Y . Prove the following propositions:

    (a) A ⊂ B implies f (A) ⊂ f (B ),(b) ( f is injective and f (A) ⊂ f (B )) implies A ⊂ B ,(c) A ⊂ f

    − 1 (f (A)), (d) f (f − 1 (C )) ⊂ C ,(e) f (A∪B ) = f (A)∪f (B ), (f) f (A ∩B ) ⊂ f (A) ∩f (B ),(g) f − 1 (C ∪D) = f − 1 (C )∪f

    − 1 (D ), (h) f − 1 (C ∩D ) = f − 1 (C ) ∩f

    − 1 (D ).

    5. Let h : X

    → Y 1 , g : Y 2

    → Z 1 , f : Z 2

    → W functions.

    Prove the following propositions:(a) f ◦(g ◦h) = ( f ◦g) ◦h,(b) If g and h are both injective ,

    then g ◦h is also injective and (g ◦h)− 1 = h− 1 ◦g

    − 1 ,(c) If g and h are both surjective and Y 1 = Y 2 ,

    then g ◦h : X → Z 1 is also surjective .6. Let f : R⊃→R , f (x) := ln 3 (1+ √ x). Determine the inverse of f .

    16

  • 8/19/2019 Sets and Funcctions, Cardinality

    18/22

    5. CARDINALITY OF SETS

    We do not dene the cardinality (cardinal number) of a set in general, but we compare setsconsidering the “number” of their elements by putting them in one–to–one correspondance.

    Denitions.Let X and Y be any sets.

    (i) We say that X and Y have the same cardinality and write | X |= | Y |or say that X and Y are equivalent sets and write X ∼ Y if there exists a bijective function f : X → Y .

    (ii) We say that the cardinality of X is not greater than the cardinality of Y (or the cardinality of Y is not less than the cardinality of X )and write | X |≤| Y | if there exists an injective function f : X → Y .

    (iii) We say that the cardinality of X is less than the cardinality of Y

    (or the cardinality of Y is greater than the cardinality of X )and write | X |< | Y | if | X |≤| Y | and | X |= | Y |.Theorem (5.1).Let X , Y and Z be sets. Then(i) X ∼X , (ii) X ∼Y ⇒ Y ∼X , (iii) (X ∼Y and Y ∼Z ) ⇒ X ∼Z .

    Proof.(i) idX : X → X, x → x is bijective ,(ii) If f : X → Y is bijective , then f

    − 1 : Y → X is also bijective ,(iii) If g : X → Y and f : Y → Z are bijective ,then ( f ◦g) : X → Z is also bijective .

    ♠Theorem (5.2).Let X and Y be sets. Then the following statements are equivalent:(i) There exists an injective function f : X → Y .(ii) There exists a surjective function g : Y → X .

    Proof.If X = ∅ or Y = ∅, then (i) and (ii) are obviously equivalent.If X = ∅ and Y = ∅, then(1) if f : X → Y is injective , then, choosing any x0 ∈ X ,the function g : Y → X dened by

    g(y) := f − 1 (y) if y ∈ R(f )x0 if y ∈ Y \ R(f )

    is a surjection .

    (2) if g : Y → X is surjective , then, choosing any yx ∈ g− 1 ({x}) for each x ∈ X ,the function f : X → Y , f (x) := yx is an injection .

    ♠17

  • 8/19/2019 Sets and Funcctions, Cardinality

    19/22

    Remarks.(i) According to the previous theorem we can say that | X |≤| Y |if and only if there exists a surjective function f : Y → X .

    (ii) The following theorem (whose proof is omitted) shows that

    | X

    |=

    | Y

    | if and only if (

    | X

    |≤| Y

    | and

    | Y

    |≤| X

    |).

    Theorem (5.3). (Bernstein’s theorem.)Let X and Y be sets. Then the following statements are equivalent:(i) There exists a bijective function f : X → Y .(ii) There exist injective functions g1 : X → Y and g2 : Y → X .(iii) There exist surjective functions h1 : Y → X and h2 : X → Y .

    Denition. (Finite and innite sets.)(i) A set X is called nite if either X =∅ or ∃m ∈N+ such that X ∼ {1, 2, . . . , m }.

    We call m (that is uniquely determined) the cardinality (cardinal number) of X and write | X |:= m.The cardinality (cardinal number) of the empty set is dened by | ∅ |:= 0.(ii) A set X is called innite if it is not nite .

    Theorem (5.4).A set X is nite if and only if | X |< | N+ |.Proof.(1) If X = ∅, then we evidently have | X |< | N+ | .

    If

    | X

    |= m

    ∈N+ , then

    ∃ a bijection f̃ : X

    → {1, 2, . . . , m

    },

    thus f : X →N+ , f (x) := f̃ (x) is an injection , so we have | X |≤|N+ |.If we suppose that ∃ a bijection g: X →N+ , then ( g ◦ f̃ − 1 ) : {1, 2, . . . , m } →N+is a bijection , which is obviously impossible . Thus, we have | X |< | N+ |.

    (2) If | X |< | N+ |, then either X = ∅ (thus X is nite ) or∃ an injection f : X →N+ and there is no bijection from X to N+ .If we suppose that X is innite , then evidently R(f ) is also innite , which impliesthat g : R(f ) →N+ , g(n) := | {x ∈ R(f ) : x ≤ n} | is a bijective function.Thus, ( g ◦f ) is a bijection from X to N+ , which is a contradiction .Hence, we obtain X to be a nite set.

    ♠Theorem (5.5).If X is an innite set , then | X |≥|N+ | and ∃ Y ⊂ X such that | Y |= | N+ |.Proof.

    Let x0 ∈ X and dene f : N+ → X recursively: f (1) := x0 , andfor each n ∈N+ choosing any xn ∈ X \{x0 , . . . , x n − 1} let f (n +1) := xn .Since f is injective, it follows that |N+ |≤| X | and N+∼ R(f ) =: Y .♠

    18

  • 8/19/2019 Sets and Funcctions, Cardinality

    20/22

    Denition. (Countably innite sets.)A set X is called countably innite if | X |= | N+ |.According to (5.5) countably innite sets have the least innite cardinality.

    Denition. (Countable and uncountable sets.)(i) A set X is called countable if | X |≤|N+ |.

    According to the theorem (5.2) X is countable if and only if

    ∃f : X →N+ injection or ∃g : N+ → X surjection .According to the theorems (5.4) and (5.5) X is countable if and only if it is nite or countably innite .

    (ii) A set X is called uncountable if it is not countable.According to the theorem (5.5) X is uncountable if and only if | X |> | N+ |.

    Examples.1. N+ is countably innite, since idN

    +

    : N+ →N+ is a bijection .2. N is countably innite, since f : N →N+ , f (n) := n +1 is a bijection .3. Z is countably innite, since f : N+ →Z ,f (1) := 0, f (2n) := n, f (2n +1) := −n (n ∈N+ ) is a bijection .4. Q+ is countably innite, since it is innite and countable

    ( f : Q + →N+ , f ( p/q ) := 2 p ·3q p, q ∈N+ , ( p, q ) =1 is an injection ).5. N+ ×N+ is countably innite, since it is innite and countable( f : N+ ×N+ →N+ , f (m, n ) := 2 m ·3n is an injection ).

    Theorem (5.6).If A is a countable set and for all A ∈ A A is countable ,then A is also countable .Proof.(1) If A = ∅ or A = { ∅ } then A is the empty set which is countable .(2) If A = ∅ then we dene an injection from A to N+ as follows:

    There exists an injection f : A →N+ andfor all A ∈ A

    there exists an injection gA : A

    →N+ .

    For each x ∈ A there exists at least one set A ∈ A such that x ∈ A.Now we dene F : A → N+ ×N+ , F (x) := ( f (A), gA (x)) ∈N+ ×N+ .F is injective , since if F (x)= F (y) =: ( m, n ) then x, y ∈ f

    − 1 (m) =: A,thus n = gA (x) = gA (y), which implies that x = y.

    Let G : N+ ×N+ →N+ be an injection (e.g. (m, n ) → 2m ·3n ).Since (G ◦F ) : A →N+ is injective , it follows that A is countable .♠

    19

  • 8/19/2019 Sets and Funcctions, Cardinality

    21/22

    Theorem (5.7).The set R of all real numbers is uncountable.Proof.

    (1) First we prove (by contradiction) that (0 , 1) ⊂R is uncountable .If we suppose that (0 , 1) is countable , then ∃ a surjection f :

    N+

    → (0, 1) .Let x ∈(0, 1) be dened such that ∀n ∈N+ , the n–th digit in the decimalrepresentation of x is different from the n–th digit in the decimal representationof f (n) and from 0 and 9. It is evident that x /∈ R(f ), which is a contradiction ,since R(f ) = (0 , 1). Thus, (0 , 1) is uncountable .

    (2) It is easy to see that (0 , 1) ⊂R implies that R is also uncountable .♠

    Denition. (Continuum cardinality.)We say that a set X has continuum cardinality if | X |= | R |.We also say that X is a continuum set.Examples.

    1. Intervals ( a, b), [a, b), (a, b], [a, b] are continuum sets. ( a, b ∈R , a < b)2. The power set P (N+ ) is a continuum set.3. The set R \ Q of all irrational numbers is a continuum set.Theorem (5.8). (Cantor’s theorem.)The power set of any set X has greater cardinality than the set X .( | P (X ) | > | X | . )Proof.(1) If X =

    ∅ then

    P (X ) =

    {∅}, thus

    | X

    |= 0 < 1 =

    | P (X )

    |.

    (2) If X = ∅ then| X |≤| P (X ) |, since f : X → P (X ), f (x) := {x } is an injection .If we suppose that | X |= | P (X ) |, then ∃ a bijection f : X → P (X ) .Let A ∈ P (X ) be dened by A := {x ∈ X : x /∈ f (x) }.Then ∃y ∈ X such that f (y) = A.If y ∈ A then by the denition of A y /∈ f (y)= A, whileif y /∈ A = f (y) then by the denition of A y ∈ A.Since it is a contradiction , | X |= | P (X ) | must hold.

    ♠Remark. (5.9).If X is an innite set , then there exists Z ⊂ X strictly such that | Z |= | X |.Proof.

    Let Y ⊂ X such that | Y |= | N+ |. Then ∃ a bijection f : N+ → Y ,thus g : N+ → Y , g(n) := f (2n) is injective and R(g) ⊂ Y strictly.Hence, the function h : X → X dened byh(x) := (g ◦f

    − 1 )(x) if x ∈ Y x if x ∈ X \Y is injective and Z := R(h) = R(g)∪(X \Y ) ⊂ X strictly. ♠

    20

  • 8/19/2019 Sets and Funcctions, Cardinality

    22/22

    M.Sc. program in mathematics Department of Applied Analysis,E ötv ös Lor ánd U niversity, Budapest

    EXERCISES 5.

    1. Let X, Y and Z be sets. Prove the following propositions:(a) If | X |≤| Y | and | Y |≤| Z |, then | X |≤| Z |.(b) If X ⊂ Y then | X |≤| Y |.

    2. Let X be any innite set and C be a countable set . Prove the propositions:(a) | X ∪C |= | X |.(b) If X \C is innite, then | X \C |= | X |.(c) If C is nite, then

    | X

    \C

    |=

    | X

    |.

    3. Prove that the examples on page 20 are continuum sets .

    4. Let A be a nite set.(a) Prove that if B ⊂ A strictly , then | B |< | A |.(b) Determine the cardinal number of P (A). (| P (A) |= ?)

    5. Let X 1 , X 2 , . . . , X n (n ∈N+ , n > 1) be countable sets.Prove that X 1 ×X 2 ×. . . ×X n is also countable .

    6. Prove that Qn

    is countably innite for all n ∈N+

    .

    7. Prove that Rn is a continuum set for all n ∈N+ ,using (without proof) that R2 is a continuum set .8. Let X and Y be sets such that | Y |> 1.Prove that | Y X |> | X |, where Y X is the set of all functions from X to Y .9. Let X be a set. Prove that P (X ) ∼ {0, 1}X .

    10. Determine the cardinality of the set X , if (a) X := {(a, b) ⊂R : a, b ∈Z , a < b}.(b) X := {(a, b) ⊂R : a, b ∈Q , a < b}.(c) X := {(a, b) ⊂R : a, b ∈R , a < b}.

    11. Determine the cardinality of the set X , if (a) X := {x ∈R : ax2 + bx+ c = 0 , a, b, c ∈Z , a =0 }.(b) X := {x ∈R : ax2 + bx+ c = 0 , a, b, c ∈Q , a =0 }.(c) X := {x ∈R : ax2 + bx+ c = 0 , a, b, c ∈R , a =0 }.

    21