Sei sulla pagina 1di 69

# Assumptions

We know basic properties of operations on Q.
We know basic properties of absolute value.

Notation

I will often write an as referring to (an )n=m .

1 Real numbers
Definition 1. Sequence

Let m ∈ Z. A sequence (an )n=m is a function from {n ∈ Z | n ≥ m} to Q.
Definition 2. ε-close
Let n, m ∈ Q then
ε-close(n, m) := |n − m| < ε

## Definition 3. Cauchy sequence

We say that sequence (an )n=m is cauchy sequence.

## Exercise 1. Sequence an := 1/n (where n ∈ N+ ) is a Cauchy sequence

Proof. Let ε > 0.
Since j, k ≥ N then |1/j − 1/k| ≤ 1/N . We just need to choose N > 1/ε. This follows
from properties of Q, but we can also point it out explicitly: N = d1/ + 1e.
Definition 4. Bounded sequence

Suppose we have (an )n=m . Let M ∈ Q and M ≥ 0. We say an is bounded by M if

∀ i ≥ m : |ai | ≤ M

## Theorem 1. Finite sequences are bounded

Let (an ) = a1 . . . an be finite sequence. Then (an ) is bounded.

## Proof. I will use induction.

Base:
Sequence of one element is bounded by |a1 |
Step:
Let say we have sequence of length n + 1 then (an ) is bounded. Lets call its bound L.
Then bound for whole sequence is max(L, |an+1 |)

## Theorem 2. Every Cauchy sequence is bounded

Proof. Let (an ) be a Cauchy sequence.
We can choose such N that all |an>N | ≤ |aN | + 1.
Let L be some bound of an<N then L+|aN |+1 bounds the sequence (even max(L, |aN |+
1) does).
Definition 5. Equivalent Sequences
∞ ∞
Let (an )n=m and (bn )n=m be sequences. Then an and bn are equivalent if

## ∀ ε > 0 : ∃ N ≥ 0 : ∀ i > N : ε-close(ai , bi )

1
Theorem 3. Equivalent cauchy sequences
If an and bn are equivalent. Then an is Cauchy if and only if bn is Cauchy.
Proof. Assume an is Cauchy.
Let ε > 0. We need to show that ∃ N : ∀ i, j > N : | bi − bj | < ε.
We know:
ε
∃ N1 : ∀ i > N1 : | ai − bi | <
3
ε
∃ N2 : ∀ i, j > N2 : | ai − aj | <
3
Let N = max(N1 , N2 ) and suppose i, j > N
ε
| bi − ai | <
3
ε
| ai − aj | <
3
ε
| aj − bj | <
3
Then we have:

| bi − ai | + | ai − aj | + | aj − bj | < ε

| bi − bj | < ε

## This ends one side of a proof. The other implication is identical.

Theorem 4. Bounded equivalent sequences
If an and bn are equivalent. Then an is bounded if and only if bn is bounded.
Proof. Let assume an is bounded.
Choose N such that for all i > N

| ai − bi | < 1

Then sequence b<N is bounded by some L (because its finite). Also ai>N is bounded
by some M and then M + 1 is a bound of b≥N .
Finally max(M + 1, L) is a bound of bn .
The second implication is identical.
Definition 6. Real number, R

A real number is defined as equivalence class denoted LIM an , where (an )n=1 is a Cauchy
sequence. Two real numbers LIM an and LIM bn are equal if an and bn are equivalent
(in a sense defined earlier).

2
Theorem 5. Real numbers are well-defined
We need to prove that construction described above is equivalence relation.
Proof. There are three proposition:

1. Reflexive ∀ x ∈ R : x = x
This easily follows from definition of equivalence.

2. Symmetric ∀ x, y ∈ R : x = y =⇒ y = x
Let x = LIM an and y = LIM bn then we know:

ε > 0 : ∃ N ≥ 0 : ∀i ≥ N : | ai − bi | < ε

But then:
ε > 0 : ∃ N ≥ 0 : ∀i ≥ N : | bi − ai | < ε

3. Transitive: ∀ x, y, z ∈ R : x = y ∧ y = z =⇒ x = z
Let LIM an = LIM bn and LIM bn = LIM cn .
Suppose ε > 0. Then we now that there exists: N1 , N2 such that:
ε
∀ i > N1 : | ai − bi | <
2
ε
∀ j > N2 : | bj − cj | <
2
Now we can define N = max(N1 , N2 ) and re-write the equations above
ε
∀ k > N : | ak − bk | <
2
ε
∀ k > N : | bk − ck | <
2
Combining them and using triangle equality

∀ k > N : | ak − ck | < ε

## Definition 7. Addition of sequences

We define an + bn as index wise addition that is

(a + b)i := ai + bi

## LIM an + LIM bn := LIM an + bn

3
Theorem 6. R is closed under addition
Proof. Let LIM an and LIM bn be a real numbers.
Let ε > 0
We know that
ε
∃ N1 : ∀ i, j > N1 : | ai − aj | <
2
ε
∃ N2 : ∀ i, j > N2 : | bi − bj | <
2
Let N = max(N1 , N2 ) and i, j > N . We rewrite previous equations
ε
| ai − aj | <
2
ε
| bi − bj | <
2
Adding them and using properties of absolute value, we get
| (ai + bi ) − (bj + bj )| < ε

Remark 1. Previous theorem can be re-stated as: sum of two Cauchy sequences is a
Cauchy sequence
We will have similar case with multiplication.
Remark 2. Sums of equivalent Cauchy sequences are equivalent
One should verify that addition is well-define, but I think its fairly easy: skipped.
Definition 9. Multiplication of sequence
Similarly to addition. Suppose we have an bn then we define multiplication index wise
an bn := (ab)n
Theorem 7. R is closed under multiplication
Proof. Let LIM an and LIM bn be a real numbers.
Since both an and bn are Cauchy sequences, let Ma , Mb be their bounds.
Let ε > 0.
Our goal is to find N such that ∀ i, j ≥ N : |ai bi − aj bj | < 
∀ i, j : | ai bi − aj bj | = | ai bi − ai bj + ai bj − aj bj |
|ai bi − ai bj + ai bj − aj bj | ≤ | ai || bi − bj | − | bj ||ai − aj |
We know:
ε
∃ N1 : ∀ k, r ≥ N1 : | bk − br | <
2Mb
ε
∃ N2 : ∀ k, r ≥ N2 : | ak − ar | <
2Ma
Now we can define N = max( N1 , N2 ) and choose i, j > N . We have
ε
| bi − bj | <
2Mb
ε
| ai − aj | <
2Ma
| ai | < Ma
| bi | < Mb
Using inequality defined in first two equation we get desired result.

4
Definition 10. Negation
We define negation of r ∈ R:
−r := −1 × r
Definition 11. Subtraction
Let r, q ∈ R
r − q := r + (−q)
Definition 12. Embedding of rationals
We can embed rationals number by:
Suppose q ∈ Q then this number in R is represented as LIM λx.q
Remark 3. Some easy proofs I will use index notation. All follows from properties of
Q.

1. x + y = y + x
(x + y)i = (y + x)i

2. (x + y) + z = x + (y + z)

## ((x + y) + z)i = (x + (y + z))i

3. x + 0 = x
(x + 0)i = xi

4. xy = yx
(xy)i = (yx)i

5. 1x = x omitted
6. x(y + z) = xy + xz omitted
7. (x + z)y = xy + zy omitted

## Definition 13. Sequence bounded away from zero

We say that sequence (an )n=1 is bounded away from zero if there exists c ∈ Q+ . Such
that | ai | ≥ c for all i.
Theorem 8. If x ∈ R and x 6= 0, there exists sequence bounded away from zero
representing x
Proof. Let x = LIM an If x 6= 0 we know that

## So let c be equal to some epsilon that doesn’t have this property.

But then for this c:
c
∃ N ≥ 1 : ∀ i, j ≥ N : | ai − aj | <
2
There must be some k ≥ N such that:

| ak | ≥ c

## From first equation we know

c
| ak − aj | <
2

5
From triangle inequality
|ak − 0| ≤ | ak − aj | + |aj − 0|
c
≤ |aj |
2
Now we can construct new sequence cn with following equations.
(
ci = ai if i ≥ N
ci = c otherwise
c
Now ci is always grater the 2 > 0. Its easy to see that LIM cn = x which concludes a
proof.
Theorem 9. (a−1 n )
∞ ∞
Suppose (an )n=0 is Cauchy sequence bounded away from zero. Then (a−1
n )n=0 is also a
Cauchy sequence.
Proof. Let ε > 0
We know that sequence is bounded away from zero.
That implies that ∃ c ∈ Q+ : ∀ i : | ai | > c.
Let as begin by following observation:

−1 −1
aj − ai
∀ i, j : | ai − aj | =
aj ai

aj − ai | ai − aj |
aj ai ≤

c2
Now we can choose N such that for all i, j > N we have:
| ai − aj | < c2 ε
When we combine this equation we get desired result.
Definition 14. Reciprocals of real number
Let x 6= 0 be real and x = LIM a for some a bounded away from zero, then:
x−1 := LIM a−1
Remark 4. Reciprocal is well-defined
Again I will skip this proof.
Definition 15. Division on reals
If x, y ∈ R and y 6= 0 we have
x
:= xy −1
y
Definition 16. Positive, negative
We say that sequence an is positively separated from zero if ∃ c > 0 : ∀ i : ai ≥ c, we say
that sequence is bounded negatively from zero if ∃ c < 0 : ∀ i : ai ≤ c.
We say that number r ∈ R is positive if there exists an such that r = LIM an and an is
positively separated away from zero. We define negative in similar manner and zero iff
its equivalent to LIM 0
Sum omitted proofs
1. Every real number is either positive, negative or zero
2. r is negative if and only if −r is positive
3. If x, y are positive, so are x + y and xy

6
Definition 17. Order
We say
x>y
if y − x is negative number.

x ≥ y ⇐⇒ x > y ∨ x = y

Obviously we define

x<y as y>x
x≤y as y≥x

## Some more easy proofs

1. Order trichotomy

2. Order is anty-symmetric
3. Order is transitive

## 5. Positive multiplication preservers order

Definition 18. Absolute value
Let r ∈ R then (
r r≥0
|r| =
−r r<0

## Theorem 10. The non-negative reals are closed

Let an be Cauchy sequence of numbers in Q+ . Then LIM an is non-negative.
Assume LIM an is negative. Then by our definition its equivalent to some sequence that
is negatively bounded away from zero.
Its easy to see construction (lazy) showing that LIM an must contain negative numbers.
Theorem 11. ∀ i : ai ≥ bi =⇒ LIM an ≥ LIM bn
Let LIM an and LIM bn be real numbers such that for all i we have ai ≥ bi then LIM an ≥
LIM bn .
Proof. We can see that LIM an −bn is greater than zero (from previous theorem). Thesis
follows.
Theorem 12. Bounding of reals by rationals
Let r ∈ R+ . Then
∃ q ∈ Q, z ∈ Z : q ≤ x ∧ x ≤ z
Proof. Since r is positive. We know that r = LIM an were an is positively bounded
away from zero. That means ∃ c ∈ Q : ∀ i : c ≤ ai but then c ≤ r. We know that an is
bounded, so let M be some bound. Then by basic properties of Q (look assumptions)
we know that ∃z ∈ Z : M ≤ z and so r ≤ z

7
Theorem 13. Archimedean property
Let x, ε ∈ R+ Then there exists M ∈ Z+ such that M ε > x.
x
Proof. The number ε is positive which means
x
∃ N ∈ Z+ : ≤N
ε
Set M = N + 1.
Remark 5. Unique integer
For every real number r there exists unique integer z such that z ≤ r < z + 1. Proof
omitted.
Definition 19. Upper bound
Let E ⊂ R and r ∈ R. We say that r is an upper bound of E iff
x ∈ E =⇒ x ≤ r
Definition 20. Least upper bound
Let E ⊂ R and M be a set of upper bound of E then we define least upper bound r as
x ∈ E =⇒ r ≤ x
Theorem 14. Uniqueness of the least upper bound
Proof. Let E ⊂ R and r1 , r2 be least upper bounds,
then r1 ≤ r2 and r2 ≤ r1 which implies r1 = r2
Theorem 15. Existence of the upper bound
Let E ⊂ R. If E has an upper bound then it must have least upper bound.
Proof. Let M0 be an upper bound E. Since E has upper bound, there must exists
real number N0 such that N0 is not upper bound. We will define procedure. Let A =
Ni−1 +Mi−1
2 . If there exists upper bound smaller than A, then Mi = A and Ni = Ni−1
otherwise Mi = Mi−1 and Ni = A. We define new sequence an where ai = Mi and we
will show that r = LIM an is least upper bound of E.
We can see that if Mi 6= Ni then | Ai − Bi | > | Ai+1 − Bi+1 |
That implies LIM An − Bn = 0.
Assume there exists upper bound e < r. That would mean e < LIM Bn but all elements
of B are not upper bounds and Bn is growing. That implies e can’t be an upper bound.
Definition 21. Supremum
Let E ⊂ R. If E has upper bound then sup(E) is equal to it.
If E is empty sup(E) := −∞ otherwise sup(E) = ∞ (at present this are meaningless
symbols).
Definition 22. Infimum
Let E ⊂ R. If E has lower bound then inf(E) denotes it.
Theorem 16. − sup(E) = inf(−E)
Let −E = {−x : x ∈ E} then − sup(E) = inf(−E).
Proof. Let S denotes upper bounds.
∀ s ∈ S, e ∈ E : e ≤ sup(E) ≤ s
Which is equivalent
∀ s ∈ S, e ∈ E : − e ≥ − sup(E) ≥ −s.
But then: − sup(E) = inf(−E)

8
Definition 23. rn
Let r ∈ R and n ∈ N, z ∈ Z, ab ∈ Q then
By natural

r0 := 1
rn+1 := rn × r

By integer
1
r−|z| :=
rz
By rational
1
r b := sup({y ∈ R : y ≥ 0 ∧ y n ≤ r})
a 1 a
r b := (r b )

## Remark 6. Properties of exponents

I will skip proofs of basis properties of exponents.

2 Limits of sequences
Definition 24. Distance
Let x, y ∈ R then
d(x, y) := |x − y|
Definition 25. Cauchy sequence of reals
We define this sequences exactly the same as Cauchy sequence of rationals. Except ε is
real number in this definition and so are elements of sequence.
Theorem 17. Cauchy sequence of rationals are embedded in Cauchy sequences of reals
On sequences of rationals the definitions are equivalent.
Proof. Seems easy. Omitted.

## Definition 26. Convergence

Let an be a sequence of real numbers.
If there exists L ∈ R such that for ε > 0:

∃ N : ∀ i ≥ N : |ai − L| < ε

## Theorem 18. Uniqueness of limits

Let an be a real sequence. If an converges to L0 , L1 then L0 = L1 .
Proof. Let c := |L0 − L1 |.
Its easy to see (the construction is identical to the ones earlier in text) that:

∀ ε > 0: c < ε

## But then if c 6= 0 we will have contradiction, so L0 = L1 .

Definition 27. Limits of sequences
If sequence an converges to L we write:

L = lim an
n→∞

9
Theorem 19. Convergent sequences are Cauchy
Suppose
L = lim an
n→∞
then an is Cauchy sequence.
Proof. Let ε > 0. Let N be such number that for all i, j
ε
|ai − L| <
2
ε
|aj − L| <
2
By triangle inequality:
|ai − aj | < ε

## Theorem 20. Formal limits are genuine limits

Let an be Cauchy sequence of rational numbers then:
LIM an = lim an
n→∞

## Proof. It follows from Theorem 17.

Definition 28. Bounded sequence
We re-use the definition for rational sequences.
Remark 7. Comparison to previous definition
We can see that this definition are equivalent from this follow that every Cauchy (and
so: convergent) sequence is bounded.
Theorem 21. Limit laws
let an , bn be sequence of real numbers that converge to x, y, then:
1.
lim an + bn = lim an + lim bn
n→∞ n→∞ n→∞

2.
lim an bn = lim an × lim bn
n→∞ n→∞ n→∞

3. Let c ∈ R
lim c(an ) = c lim an
n→∞ n→∞

4.
lim an − bn = lim an − lim bn
n→∞ n→∞ n→∞

5. Suppose ∀ i : bi 6= 0 and y 6= 0
−1
lim b−1
n = ( lim bn )
n→∞ n→∞

6. Suppose ∀ i : bi 6= 0 and y 6= 0
an limn→∞ an
lim =
n→∞ bn limn→∞ bn
7.
lim max(an , bn ) = max( lim an , lim bn )
n→∞ n→∞ n→∞

8.
lim min(an , bn ) = min( lim an , lim bn )
n→∞ n→∞ n→∞

10
Proof. 1.
lim an + bn = lim an + lim bn
n→∞ n→∞ n→∞

## This is equivalent to:

lim an + bn = x + y
n→∞

Let ε > 0. We know there exists N0 , N1 such that for all i > N0 , j > N0
ε
|ai − x| <
2
ε
|bj − y| <
2
We can define N = max(N0 , N1 ) such that for all k > N
ε
|ak − x| <
2
ε
|bk − y| <
2
But then:

## |ak − x| + |bk − y| < ε

|ak + bk − x − y| < ε

2.
lim an bn = lim an × lim bn
n→∞ n→∞ n→∞

## This is equivalent to:

lim an bn = xy
n→∞

Let ε > 0. I will start by proving limn→∞ (an − x)(bn − y) = 0. Let N be such
that for all i

|ai − x| < ε

|bi − y| < ε

Then

## |(an − x)(bn − y) − 0| < ε

Now I will prove the main proposition (I will be using point 3 even though its
proof is next)

## lim an bn = lim (an − x)(bn − y) + yan + xbn − xy

n→∞ n→∞
= lim (an − x)(bn − y) + lim yan + lim xbn + lim −xy
n→∞ n→∞ n→∞ n→∞
= 0 + xy + yx − xy
= xy

3.
lim c(an ) = c lim an
n→∞ n→∞

## This can be restated as limn→∞ c(an ) = cx.

I will ignore trivial case c = 0.

11
Let ε > 0
Choose N such that for all i > N

ε
|ai − x| <
|c|
|c||ai − x| < ε
|cai − cx| < ε

## 4. This point is consequence of definition of subtraction and point 1.

5. This can be restated as:
lim b−1
n =x
−1
n→∞

Let ε > 0.
Suppose M is upper bound of elements in sequence. Let N be such that for all
i>N

|bi − x| < εM x

x − bi
Mx < ε

x − bi
bi x < ε

1
− 1 < ε

bi x
|b−1
i −x
−1
|<ε

7. Omitted
8. Omitted

## Definition 29. Increasing, decreasing sequences

Let an be a sequence. Then if

i > j =⇒ ai ≥ aj

We say the sequence is increasing. And we give similar definition for decreasing.

## Definition 30. Extended real numbers

We define
R∗ := R ∪ {+∞, −∞}
Definition 31. Negation of extended reals

−(+∞) := −∞
Definition 32. Ordering of extended reals
Order is preserved on subset isomorphic with reals.

∀ r ∈ R∗ : r ≤ +∞

12
Definition 33. Supremum of sets of extended reals
Let E ⊂ R∗
1. If E ⊂ R then we use old definition.

2. +∞ ∈ E =⇒ sup(E) = +∞
3. −∞ ∈ E =⇒ sup(E) = sup(E \ {−∞})
Definition 34. Supremum and infimum of sequence
Supremum of a sequence is equal to supremum of set containing elements of sequence.
Infimum is define in the same manner.
Definition 35. Monotone
The sequence is monotone if its either increasing or decreasing.
Theorem 22. Monotone bounded sequences converge
Let an be increasing sequence or real numbers which has some finite upper bound then:

lim an = sup(an )
n→∞

## Proof. Let ε > 0. We can choose N such that for all i

ai > sup(an ) − ε
ai − sup(an ) > −ε
sup(an ) − ai < ε

## Left side must be greater than zero

|sup(an ) − ai | < ε

## Remark 8. Decreasing monotone bounded sequence

The argument is similar.
Exercise 2. Let x ∈ R and 0 < x < 1 then limn→∞ xn = 0.

Proof. Its easy to see that this sequence is bounded and decreasing (and thus limit exists
in real numbers).

lim xn = x lim xn
n→∞ n→∞
(x − 1) × lim xn = 0
n→∞

lim xn = 0
n→∞

## Definition 36. Limit points

We say that x is a limit point of (an )n=m if

∀ ε > 0 : ∀ N ≥ m : ∃ i ≥ N : | ai − x| < ε

13
Theorem 23. Limits are limit points

Let (an )n=m be a sequence which converges to L ∈ R. Then L is a limit point of an .
And its the only limit point.
Proof. The fact that L is a limit point is following from a definition. Now I will show
that its unique.
Assume L0 is also a limit point. That means

## ∀ ε > 0 : ∀ N : ∃ i : |L0 − ai | < ε

Let e = |L − L0 |
And assume e > 0.
Then we have
e
∃ N : ∀ j : |L − aj | <
3
If for this N exists i such that
e
|L0 − ai | <
3
From triangle inequality we get
2e
e<
3
That gives as contradiction. So L = L0 .
Definition 37. Limit superior and limit inferior

Let (an )n=m be a sequence.

a+
N := sup (an≥N )N =m

then

lim sup an := inf (a+
N )N =m
n→∞

## Or (I prefer this notation)

lim sup an := inf (an≥N )N =m
n→∞

## Remark 9. Informally: limit superior and limit inferior

Each point of the sequence is exchanged for supremum of sequence from this point for-
ward.
Then at each point we take infimum from cut of this new sequence forward.

## Each point is exchange for infimum. Then we take supremums.

Remark 10. Equivalent definition
Let an be a sequence. I think this definition is a lot nicer:

n→∞ n→∞

## They are equivalent because this sequence is be decreasing.

Theorem 24. Properties of lim sup and lim inf

Len (an )n=m and L+ , L− be limit superior and limit inferior of this sequence.
1.
∀ x > L+ : ∃ N ≥ M : ∀ n ≥ N : an < x

14
2.
∀ x < L+ : ∃ N ≥ M : ∀ m ≥ N : an > x

3.
∞ ∞
inf (an )n=m ≤ L− ≤ L+ ≤ sup (an )n=m

L− ≤ c ≤ L+

## 5. If L+ , L− ∈ R then they are limit points

6. If an converges to c then
L+ = L− = c

Proof. 1. Proposition
∀ x > L+ : ∃ N ≥ M : ∀ n ≥ N : an < x
Let x ∈ R (if x ∈ R∗ then its obviously true).
By definition this means that x is upper bound for some sub-sequence an>N .
And thus its larger than all elements of an>N .
2. Proposition
∀ x < L+ : ∃ N ≥ M : ∀ m ≥ N : an > x
Similar idea to previous point.
3. Proposition
∞ ∞
inf (an )n=m ≤ L− ≤ L+ ≤ sup (an )n=m

## 4. Proposition: Let c be a limit point of an then

L− ≤ c ≤ L+
Its easy to see that for all N
inf aN ≤ aN ≤ sup aN
n>N n>N

## Notion of sub-sequence would be useful here . . .

5. Proposition: If L+ , L− ∈ R then they are limit points
They are both bounded (from some n) and one is increasing the other one decreas-
ing.
6. Proposition: If an converges to c then
L+ = L− = c
It follows theorem 23 and previous point.

## Remark 11. Without proof

Suppose an , bn are sequences of real numbers and ∀ i : ai ≤ bi
sup(an ) ≤ sup(bn )
inf(an ) ≤ inf(bn )
lim sup an ≤ lim sup bn
lim inf an ≤ lim inf bn

15
Theorem 25. Squeeze test
Let an , bn , cn be sequences. Let limn→∞ an = limn→∞ cn and be real number. Then

∀ i : ai ≤ bi ≤ ci

Proof.

## From previous theorems thesis follows.

Theorem 26. Zero test for sequences
Let an be a sequence. Then limit exists and limn→∞ an = 0 if and only if limn→∞ |an |
exists and is equal 0.
Proof.
∀ ε > 0 : ∃ N : ∀ i > N : |ai | < ε
From this and ||n|| = |n| thesis clearly follow.

## Theorem 27. Sequence is Cauchy if and only if it converges

Proof. If it converges (to L let say). For all ε > 0 there exists N such that for all
i, j > N
ε
|ai − L| <
2
ε
|aj − L| <
2
Triangle inequality and we are done.
Now assume an is Cauchy.
We need to prove that there exists L such that:

## ∀ ε > 0 : ∃ N : ∀ i > N : |ai − L| < ε

For each ε > 0 we can find N such that ai + ε is an upper bound and ai − ε is a lower
bound. That means sup(an>N ) < ai + ε and similarly infimum. That implies

L+ ∈ R
L− ∈ L

Also

ai − ε ≤ L− ≤ R ≤ ai + ε
0 ≤ L+ − L− ≤ 2ε

## Since we can make ε as small as we like L+ = L− which means an must converge.

Exercise 3. Let n 6= 0 and k ≥ 1
1
lim 1 =0
n→∞ nk

16
Proof. The sequence is decreasing and bounded by zero. So we have
1
L = lim n− k
n→∞
Lk = lim n−1
n→∞

That implies L = 0.

## Theorem 28. limn→∞ xn

Let x ∈ R then
1.
|x| < 1 =⇒ lim xn = 0
n→∞

2.
x = 1 =⇒ lim xn = 1
n→∞

3. Diverges otherwise
Proof. 1.
|x| < 1 =⇒ lim xn = 0
n→∞
n
We will focus on limn→∞ |x| Obviously its decreasing and bounded. Also we can
see that its equivalent to sequence from previous exercise (because x−1 > 1).
2.
x = 1 =⇒ lim xn = 1
n→∞

## Its equivalent to limn→∞ 1.

3. Diverges otherwise
In case of −1 its obvious. Otherwise we can easily show contradiction (for example
by showing its not Cauchy).

## Definition 38. Sub-sequence

Let f :: N → N such that f (n + 1) > f (n) for all n. Then

bn = af (n)

## for some sequence an is called its sub-sequence.

Theorem 29. Property of being sub-sequence is reflexive and transitive
Proof. Proof is easy.
Theorem 30. Sub-sequences related to limits
The sequence converges to L iff every sub-sequence converges to L.
Proof. The right implication is proof by contradiction. We get the left implication by
the fact that whole sequence is its own sub-sequence.
Theorem 31. Sub-sequences to limit points
L is a limit point iff there exists sub-sequence converging to L

17
Proof. If L is a limit point

## ∀ ε > 0 : ∀ N ∃ i > N : |L − ai | < ε

Then we can create sub-sequence be choosing this bi such that |bi − L| < 1i for each i.
Its clearly possible thanks to definition of limit point and since limn→∞ n1 converges to
zero we know that limn→∞ bn = L.
Now lets assume there exists sub-sequence bn that convergence to L. Then from the
definition of limit it follows that L is a limit point.
Theorem 32. Boltzano-Weierstrass
Let an be a bounded sequence. Then there exists at least one sub-sequence of an that
converges.
Proof. Let M be a bound of a sequence.
Let L = lim supn→∞ an . Since L ≤ |M | (for some bound M ), it follows that L ∈ R. But
then by previously proved proposition L is a limit point. Thus there exists sub-sequence
that limit is L.
Remark 12. I will skip proof of properties of exponentiation

3 Series
Remark 13. Skipped
I’m skipping definition for finite series because I’ve done it few times before.
Theorem 33. Basic properties
I’m skipping some of them because they are obvious. I will prove this two.

1. Let m, n ∈ Z : m ≤ n then
n
X n+k
X
ai = aj−k
i=m j=m+k

2. Triangle inequality
Xn X n
ai ≤ |ai |

i=m i=m

am = am+k−k

## Now inductive step.

n+1
X n+k+1
X
ai = aj−k
i=m j=m+k
n
X n+k
X
ai + an+1 = aj−k + an+k+1−k
i=m j=m+k

## By using induction base we get equality.

18
2. Second proof is similar in fashion.

|am | ≤ |am |
Now inductive step.
n+1 n+1
X X
ai ≤ |ai |

i=m i=m

Using base

Xn X n
ai + an+1 ≤ ai + |an+1 |

i=m i=m

## Definition 39. Summantions of finite sets

Let X be set with n ∈ N elements. Suppose f :: X → R. Now we select any bijection g
from {1..n} to X and define:
X n
X
f (x) := (f ◦ g)(i)
x∈X i=1

## Remark 14. Finite summation are well-defined + basic properties

Again, I will skip this proofs.
Theorem 34. Let X, Y be finite sets and f :: X × Y → R. Then
 
X X X
 f (x, y) = f (x, y)
x∈X y∈Y (y,x)∈X×Y

## Proof. Let n = card(X), m = card(Y ), nm = card(X × Y ) and g, h, z be some bijection

(matching previous definition).
 
X n Xm nm
X
 f (g(i), h(j)) = f (z(i))
i=1 j=1 k=1

Informal: our sum is over set of cardinally nm and both sites contain nm unique element,
therefore they must be equal.
Theorem 35. Fubini theorem for finite series
Let card(X) = n, card(Y ) = m where n, m ∈ N and f be know bijection. Then
  !
X X X X
 f (x, y) = f (x, y)
x∈X y∈Y y∈Y x∈X

Proof. We only need to define h :: X × Y → Y × X which is simply h((x, y)) := (y, x).
Combining it with previous theorem we get desired result.
Exercise 4. Binomial formula
Let n ∈ N
n
n
X n!
(x + y) = xi y n−i
i=0
i!(n − i)!

19
Proof. By induction on n. Base is easy. Step.
n+1
n
X (n + 1)!
(x + y)(x + y) = xk y n+1−k
k!(n − k + 1)!
k=0

TODO
Definition 40. Infinite series
A (formal) infinite series is expression of the form:

X
an
n=m

Definition
P∞ 41. Convergence of series
Let n=m an be a series. We define SN to be n-th partials sum of this series. Where
N ≥m
N
X
SN := an
n=m

X
an = L
n=m

## otherwise we say series diverges.

Exercise 5. Find L ∈ R such that

X
2−n = L
n=1

## Proof. Its easy to see (using induction) that:

N
X
SN = 2−n = 1 − 2−N
n=1

It follows that L = 1.

20
P∞
Theorem 36. Let n=m an be a series of real numbers.
Then this series convergence iff for every real number ε > 0, there exists N ≥ m such
that for all p, q ≥ N (I will rewrite it with quantifiers)
q
X
∀ ε > 0 : ∃ N ≥ m : ∀ p, q ≥ N : a ≤ε

n=p n

Proof. ←
Assume its not true. It means
q
X
∃ ε > 0 : ∀ N ≥ m : ∃ p, q ≥ N : an > ε

n=p

and series is still convergent (must be Cauchy!). Lets fix that epsilon.
p q

X X
∃ N ≥ M : ∀ p, q ≥ N : an − an < ε

n=m n=m

## From reverse triangle inequality.

p q
X X
∃ N ≥ M : ∀ p, q ≥ N : an − an < ε

n=m n=m

assume p ≤ q
q
X
an < ε

n=p

Second implication also follows from Cauchy.
Theorem
P∞ 37. Zero test
Let n=m an be a formal series. Then this series converges only if limn→∞ an = 0
Proof. If follows immediately from previous theorem.
Definition
P∞ 42. Absolute convergent
Let
P∞ n=m n be a series of real numbers. We say that it is absolutely convergent if
a
n=m |an | is convergent.

Theorem
P∞ 38. Absolute convergence test
Let n=m an be a series of real numbers. If its convergent it is also absolutely convergent
Proof. Let ε > 0 then there must exists such N ≥ M that for all p, q ≥ N we have
p q

X X
an − an < ε

n=m n=m

p q
X X
an − an < ε

n=m n=m

## Its Cauchy, so it must converge.

21
Theorem
P∞ 39. Triangle for infinite series
If | n=m an | converges, we have:
∞ ∞
X X
an ≤ |an |

n=m n=m

Proof. It follows from that fact that every element of first sequence of partial sums is
less or equal to element of second sequence.
Theorem 40. Leibniz Criterion: Alternating series test
Let an be a sequence of real numbers which are non-negative and decreasing

## ai > 0, ai > ai+1

P∞
Then series n=m −1n an is convergent iff an → 0.
Proof. The right implication follow immediately from zero test.
Left: suppose limn→∞ an = 0. Informally (for k even):

## an + (an+2 − an+1 ) + · · · + (an+k − an+k−1 ) ≤ an

(an − an+1 ) + · · · + (an+k−2 − an+k−1 ) + an+k ≥ 0.

0 < Sq < aq
|Sq | < aq

## Theorem 41. Series laws

Assume all introduced series are convergent:
1.

X ∞
X ∞
X
(an + bn ) = an + bn
n=m n=m n=m

2.

X ∞
X
can = c an
n=m n=m

3.

X m+k−1
X ∞
X
an = an + an
n=m n=m n=m+k

Proof. Skipped

22
Theorem 42. Telescoping series
Let an → 0. Then

X
an − an+1 = a0
n=0

Proof. Looking at partial some give hint what formula we should look for.

S1 = a0 − a1 + a1 − a2

We will prove
SN = a0 − aN +1
Using induction. Base follows immediately. Now step

SN +1 = SN + an+1 − an+2
= a0 − an+1 + an+1 − a(n+1)+1
= a0 − a(n+1)+1

Now limn→∞ Sn = a0 .

P∞
Theorem 43. Let n=m an be a formal series of non-negative real numbers.
This series converges iff
N
X
∃ M : ∀ N ≥ m: an ≤ M
n=m

Proof. It follows from the fact that monotone increasing sequence converges.
Theorem P44. Comparison test
∞ P∞
Suppose n=m an , n=m n are series and for all i : |ai | ≤ bi . Then first series abso-
b
lutely converges if second does.
P∞
Proof.
P∞ It follows immediately from the fact that n=m |an | is bounded by limit of
n=m b n and increasing.
Theorem 45. Geometric series
Let x ∈ R. If |x| < 1 then

X 1
xn =
n=0
1−x

Proof.
1 − xn 1
lim Sn = lim =
n→∞ n→∞ 1 − x 1−x

## Theorem 46. Cauchy criterion P∞

Let an be a decreasing sequence of non-negative real numbers. Then the series n=1 an
is convergent if and only if

X
2k a2k
k=0

is convergent.

23
Proof. The proof follows from

X ∞
X ∞
X
an ≤ 2k a2k ≤ 2an
n=1 k=0 n=1

Then

X 1
n q
n=0

## is convergent iff q > 1

Proof. Right implication follows immediately from earlier proof about harmonic series.
So let q > 1.
Obviously the sequence is non-negative and decreasing. Thus it converges only if

X 1
2k q
k=0
(2k )

does.
We can re-write it as

X
(21−q )k
k=0

2 < 2q

## Remark 15. Up, when it converges: it is Riemann function of q

Theorem
P∞ 48. Rearrangement of series
Let n=0 an be absolutely convergent series of real numbers, and f : N → N be a
bijection. Then
X∞ ∞
X
an = af (m)
n=0 m=0
P∞
Proof. We can prove it by showing that n=0 sup(an ) converges (it should work because
series is absolutely convergent). Then any other choice of function will follow from
comparing partial sums (comparison test).

## Remark 16. Re-arranging series that do not converge is risky

24
Theorem
P∞ 49. Root test p
Let n=m an be series of real numbers and p = lim supn→∞ n |an |.
1. If p < 1 series is absolutely convergent
2. If p > 1 series is divergent
3. p = 1 we can draw any conclusion.
p
Proof. If for every N there exists n ≥ N such that n |an | > 1 then an does not converge
to zero, so series must diverge.
Now I will focus on first proposition.
Let p
p := lim sup n |an | < 1
n→∞

p
n
|an | < 1

## Let c be a real number such that

p
n
|an | < c < 1
|an | < cn < 1

By comparison test

X ∞
X
ai ≤ ki
i=n i=n
P∞
We have geometric series that converges so n=m |an | also does.
Theorem 50. Let an be a sequence of positive numbers. Then
an+1 √ √ an+1
lim inf ≤ lim inf n an ≤ lim sup n an ≤ lim sup
n→∞ an n→∞ n→∞ n→∞ an
Proof. TODO
Theorem
P∞ 51. Ratio test
Let n=m an be a series of non-zero numbers. Then
|an+1 |
1. If lim supn→∞ |an | < 1 implies that series is absolutely convergent.
|an+1 |
2. If lim inf n→∞ |an | > 1 then series diverges.

Proof. Both cases follow from previous theorem and root test.
Exercise 6. What is √
n
lim n
n→∞

Proof. We have
n+1 √ n+1
lim inf ≤ lim n n ≤ lim sup
n→∞ n n→∞ n→∞ n
1 √ 1
lim inf 1 + ≤ lim n n ≤ lim sup 1 +
n→∞ n n→∞ n→∞ n

1 ≤ lim n n ≤ 1
n→∞

25
finally

n
lim n=1
n→∞

## Definition 43. Series on countable sets

TODO
Theorem 52. Fubuni’s theorem for infinite sums
We can switch order of infinite sums provided the entire sum is absolutely convergent.
Proof. Skipped.

4 Continuous functions on R
Definition 44. Intervals
We define and use intervals in a obvious way.

Let X ⊂ R, and x ∈ R. We say that x is adherent point of X if

∀ ε > 0 : ∃ y ∈ X : | x − y| < ε

## Definition 46. Closure

Let X ⊂ R. The closure of X, denoted X is defined to be a set of all adherent points of
X.
Theorem 53. Elementary properties of closure.
Let X, Y ∈ P (R).
Then

1.
X⊆X

2.
X ∪Y =X ∪Y

3.
X ∩Y ⊆X ∩Y

4.
X ⊆ Y =⇒ X ⊆ Y

## Proof. Propositions 1 and 2 follow from the definition immediately.

Proposition 3:X ∩ Y ⊆ X ∩ Y .
Let x ∈ X ∩ Y .
Let ε > 0. Then there exists such y ∈ X ∩ Y that |x − y| < ε. But this y must be in
X ∩ Y (from proposition one).
That implies x ∈ X ∩ Y , which ends the proof
Proposition 4 is equally simple.
Theorem 54. Closures of intervals
Let a < b ∈ R and I be equal to any of (a, b), (a, b], [a, b), [a, b] then the closure of I is
[a, b].

26
Proof. The facts that closure of all this intervals contain a, b follows quickly from defi-
nition of supremum and infimum.
Let x 6∈ [a, b]. Then x < a ∨ x > b. Assume the x < a (similar argument in other case).
Then if we set ε = |a − x| criterion for adherence fails.
Exercise 7.

N=N
Z=Z
Q=R
R=R
∅=∅

## Proof. I will only prove Q = R.

The Q ⊂ R is clear. So the only needed fact is

R⊆Q

Let x ∈ R.
Now we can choose a set
X = { q ∈ Q | q < x}
We can now choose ε > 0, and from previously proved theorem we know that there
exists c ∈ (x − ε, x) such that c ∈ Q.
But then c ∈ X and x ∈ X.
Since X ⊆ Q it quickly follows x ∈ Q. Which concludes a proof.
Exercise 8. Let X ⊆ R. Let x ∈ R then x ∈ X if and only if there exists sequence an
such that ∀ ai ∈ X and limn→∞ an = x
Proof. The ← is easy to prove.
Sketch of a right one:
If its infimum we take lim sup. Otherwise we choose a subset of B ⊆ X such that for all
e ∈ B : e < x. Then we take lim inf.
Definition 47. Closed set
Set X ⊆ R is closed if
X=X
Theorem 55. Closed set is closed under limit
If X ⊆ R. If X is closed and an is convergent sequence consisting of elements in X.
Then
lim an ∈ X
n→∞

## Proof. Follows from previous exercise.

Definition 48. Limit points
Let X ⊆ R. We say x ∈ X is a limit point iff

x ∈ X \ {x}

## We say that its isolated otherwise.

Theorem 56. Limit points on intervals
Let say we have interval on R then all x in that interval are its limit points.

27
Proof. Seems easy: skipped.
Definition 49. Bounded set
X ⊆ R is said to be bounded if X ⊆ [−M, M ] for some M ∈ R+

## Theorem 57. Heine-Borel theorem for the line

Let X ⊆ R.
Then X is closed and bounded iff
given any sequence an of elements in X there exists sub-sequence bn of the original
sequence which converges to some number L ∈ X.

Proof. The → implication follows from the fact that closed set is closed under limit
(Theorem 55) and after taking any sequence we can take lim supn→∞ an which is con-
vergent sub-sequence (because sequence is bounded): equivalently we can use Boltzano-
Weierstrass theorem.
The left implication can be shown as follows:
If X is not bounded we can take strictly increasing unbounded sequence, which gives
We can get infimum by taking sequence of all elements in X and making it strictly
decreasing. And then for each element we are able to create a sequence of elements that
are smaller then it that is strictly decreasing and bounded by it: so it must converge.
Definition 50. Arithmetic operations on functions

## (f + g)(x) := f (x) + g(x)

(f − g)(x) := f (x) − g(x)
max(f, g)(x) := max(f (x), g(x))
min(f, g)(x) := min(f (x), g(x))
(f g)(x) := f (x)g(x)
f f (x)
(x) :=
g g(x)
(cf )(x) := c × f (x)

## Remark 17. Basic properties (skipped proof)

(f + g) ◦ h = (f ◦ h) + (g ◦ h)
h ◦ (f + g) = (h ◦ f ) + (h ◦ g)
(f + g)h = f h + gh
h(f + g) = hf + hg

## Definition 51. Convergence of functions at a point

Let x ⊆ R and f : X → R.
Suppose E ⊆ X and x0 ∈ E and L ∈ R.
We say f converges to L at x0 iff

## ∀ ε > 0 : ∃ δ > 0 : ∀ x ∈ E : |x − x0 | < δ =⇒ |f (x) − L| < ε

and write
lim f (x) = L
x→x0

28
Theorem 58. Let X ⊆ R and f : X → R.
Let E ⊆ X, x0 ∈ E and L ∈ R. Then
limx→x0 f (x) = L iff for every sequence an which consists entirely of elements of E and
converges to x0 , the sequence f (a)n converge to L.
Proof. We will start with right implication. Assume limx→x0 f (x) = L. Let an be a
sequence with elements in E that converges to x0 .
Let ε > 0. Now we can find such delta that:

## By definition of converges we know that

∃ N : i ≥ N : |ai − x0 | < δ

## And thesis follow.

Second implication. Assume

## lim an = x0 =⇒ lim f (a)n = L

n→∞ n→∞

Let ε > 0. Then we can choose such N that for all sequences i > N implies

|f (ai ) − L| < ε

Let |aN − x0 | = δ. Now if we have |x − x0 | < δ there must exists sequence containing
that x and that implies |f (x) − L| < ε.
Theorem 59. One limit
Function can have at most one limit at each point.
Proof. Follows from previous proof.
Theorem 60. Limit laws
Assume all function in this statements operate are in RX for some X ⊆ R and all
converge to some real number. Then

1.
lim (f ± g)(x) = lim f (x) ± lim g(x)
x→x0 x→x0 x→x0

2.  
lim max(f, g)(x) = max lim f (x), lim g(x)
x→x0 x→x0 x→x0

3.
lim cf (x) = c lim f (x)
x→x0 x→x0

4.  
lim min(f, g)(x) = min lim f (x), lim g(x)
x→x0 x→x0 x→x0

5.
lim (f g)(x) = lim f (x) × lim g(x)
x→x0 x→x0 x→x0

## 6. Here g(x) and its limit must be non-zero.

f limx→x0 f (x)
lim (x) =
x→x0 g limx→x0 g(x)

29
Proof. Skipped. All points follows from previous statement about relation with se-
quences and laws of sequences.
Theorem 61. Limits are local
Let X ⊆ R, and E ⊆ X. Suppose x0 ∈ E and f : X → R, L ∈ R. Let δ > 0 Then

## lim f (x) = L ⇐⇒ lim f (x) = L

x→x0 : x∈E x→x0 : x∈E∩(x0 −δ,x0 +δ)

## Proof. Follows from the definition.

Remark 18. Squeeze test works the same for limits. Again, it follows from relation to
sequences.
Definition 52. Continuity
Let X ⊆ R and f : X → R. Let x0 ∈ X. We say that f is continuous at x0 iff

x→x0

## We say that f is continuous on X iff f is continuous at every x0 ∈ X. We say that f is

discontinuous if f is not continuous.
Theorem 62. Equivalent formulation of continuity
Let X ⊆ R, f ∈ RX and x0 ∈ X. Then following are equivalent
1. f is continuous at x0

## lim an = x0 =⇒ lim f (an ) = f (x0 )

n→∞ n→∞

3.
∀ ε > 0 : ∃ δ > 0 : ∀ x ∈ E : |x − x0 | < δ =⇒ |f (x) − f (x0 )| < ε

4.
∀ ε > 0 : ∃ δ > 0 : ∀ x ∈ E : |x − x0 | ≤ δ =⇒ |f (x) − f (x0 )| ≤ ε

## Proof. Equivalence of 1, 3, 4 follows immediately from the definition (and 4: properties

of real numbers). Equivalence of 1 and 2 is immediate consequence of Theorem 58.
Theorem 63. Arithmetic preservers continuity
All operations in specified in Theorem 60 apply to functions.
Proof. It follows from previous theorem.

Remark 19. This actually allows to assert continuity on a massive amount of function.
For example: we can see limx→x0 1 = 1 at any point and limx→x0 x = x0 . From this two
facts and a bit of linear algebra we can show that all polynomials are continuous!
Theorem 64. Exponentiation is continues I
Let a ∈ R+ then

f :R→R
f (x) := ax

is continuous.

30
Proof. We need to prove:
∀ x0 ∈ R : lim ax = ax0
x→x0
We can reformulate it:
lim cn = x0 =⇒ lim f (cn ) = ax
n→∞ n→∞

## for any sequence of real number cn . Recall definition of exponentiation on R e.g.

ax0 = lim acn
n→∞

Thesis follows.
Theorem 65. Exponentiation is continues II
Let p ∈ R then
f : (0, ∞) → R
f (x) := xp
is continuous.
Proof. Let limx→x0 x = x0 then from properties of limits we have
lim xp = xp0
x→x0

## Exercise 9. Absolute value is continues.

f (x) := |x|
where f : R → R
Proof. It follows from
|x| = max(x, −x)

## Theorem 66. Composition preserves continuity

Let X, Y ⊆ R and
f :X→Y
g:Y →R
be continuous functions. Then their composition is continuous.
Proof. We need to prove
lim (f ◦ g)(x) = (f ◦ g)(x0 )
x→x0

for all x0 ∈ X.
Let x0 ∈ X. Let ε > 0.
We know there exists δ 0 such that for all y satisfying
|y − y0 | < δ 0 =⇒ |g(y) − g(y0 )| < ε
Lets fix this delta. Then we can choose such δ that for all x satisfying:
|x − x0 | < δ =⇒ |f (x) − f (x0 )| < δ 0
But then
|x − x0 | < δ =⇒ |(f ◦ g)(x) − (f ◦ g)(x0 )| < ε

31
Definition 53. Left and right limit
Let X ⊆ R. And f : X → R, x0 ∈ R. If

x0 ∈ X ∩ (x0 , ∞)

We define

## f (x0 +) := lim f (x)

x→x0 ,x∈X∩(x0 ,∞)

if

x0 ∈ X ∩ (−∞, x0 )

Define

## f (x0 −) := lim f (x)

x→x0 ,x∈X∩(−∞,x0 )

## provided they exist.

Sometimes I will use shorter notation (when X is clear from context):

lim f (x)
n→x0 ±

## Theorem 67. Let X ⊆ R and x0 ∈ X ∩ (x0 , ∞) ∩ X ∩ (−∞, x0 ).

Let f ∈ RX .
If
lim f (x) = lim f (x) = f (x0 )
x→x0 + x→x0 −

then f is continuous at x0
Proof. Let ε > 0.
We can choose δ − > 0 such that for all x ∈ X ∩ (−∞, x0 )

## Definition 54. Bounded function

Let X ⊆ R and f ∈ RX . We say that f is bounded from above it ∃ M + ∈ R+ : ∀ x : f (x) ≤
M . We say the function is bounded from below if ∃ M − ∈ R+ : ∀ x : f (x) ≥ −M . We
say function is bounded if its bounded from below and above.
Theorem 68. Let a < b ∈ R and f : [a, b] → R.
If f is continuous it is bounded.
Proof. Proof by contradiction. Assume f is continuous on this interval and not bounded.
Then for all n ∈ N : ∃ x ∈ [a, b] : n < |f (x)|.
We can form a sequence of this numbers an . Since [a, b] is closed and bounded: there
must exists sub-sequence of an (Heine-Borel), lets call it cn such that limn→∞ cn = L ∈
[a, b]. But limn→∞ f (cn ) = ∞ = 6 f (L). Contradiction.

32
Definition 55. Maxima and minima
Let f ∈ RX and x0 ∈ X. We say that f attains maximum at x0 if we have ∀ x ∈
X : f (x0 ) ≥ f (x). We say that f attains minimum at x0 if ∀ x ∈ X : f (x0 ) ≤ f (x)
Theorem 69. Maximum (extremum) principle
Let a < b ∈ R and f : [a, b] → R be continuous. Then f attains its maximum at some
point xmax ∈ [a, b] and also attains its minimum at some point xmin ∈ [a, b].
Proof. We need to prove

## We will construct a sequence an by taking elements such that

 
1
ai = inf x ∈ [a, b] : f (x) > sup im(f ) −
i

All elements of ai are in [a, b], and since [a, b] is closed there exists sub-sequence of an
such that its limits is in [a, b]. But
1
lim sup im(f ) − = sup im(f )
n→∞ n
So this sub-sequence must converge to xmax .
Similar argument applies to minimum.
Theorem 70. Intermediate value theorem
Let a < b and f : [a, b] → R be a continuous function. Let y be a real number such that

## Then there exists x ∈ [a, b] such that f (x) = y

Proof. I will assume f (a) < y < f (b) (y = f (a) ∨ y = f (b) is easy).
Let
E = sup{x ∈ [a, b] : f (x) ≤ y}
And suppose c = sup(E). If f (c) > y then it can’t be sup(E) so f (c) ≤ y.
There must exists n such that c + n1 < b (it follows from the fact f (c) 6= f (b)). Clearly
f (c + n1 > y) for all n, but limn→∞ c + n1 = c. Therefore f (c) ≤ y ≤ f (c) which implies
f (c) = y.

## Theorem 71. Images of continuous functions

Let a < b and let f : [a, b] → R be continuous function. Let M be the maximum value
of f and let m be minimum. We have

im(f ) = [m, M ]

Proof. We already proved that maximum and minimum of continuous function from
closed subset of R ćontainsḿaximum and minimum. Therefore m, M ∈ im(f ).
If y ∈ [m, M ] then by intermediate value principle

∃ x ∈ [a, b] : f (x) = y

## Therefore y ∈ im(f ). Obviously if x 6∈ [m, M ] =⇒ x 6∈ im(f ) or x would be maxi-

mal/minimal value.

33
Definition 56. Monotonic functions
Let x ⊆ R and f : X → R. We say that f is monotone increasing iff

x ≤ y =⇒ f (x) ≤ f (y)

## We define monotone decreasing in analogous way.

Finally: we say the f is monotone if its monotone increasing or monotone decreasing. We
say f is strict monotone if its strict monotone increasing or strict monotone decreasing.
Theorem 72. Let a < b ∈ R and f : [a, b] → R be continuous and strictly monotone
increasing. Then f is bijection [a, b] 7→ [f (a), f (b)] and the inverse f −1 : [f (a), f (b)] →
[a, b] is also continuous and strictly monotone increasing.
Proof. From previously proved theorem we know that im(f ) = [f (a), f (b)]. I will show

f (c1 ) = f (c2 ) =⇒ c1 = c2

Assume not and c1 < c2 then its not strictly monotone. Contradiction. We established
that f is bijection.
Let f (x1 ) < f (x2 ) ∈ [f (a), f (b)]. Assume the implication is false.

(f −1 ◦ f )(x1 ) ≥ (f −1 ◦ f )(x2 )

## Contradiction. So it must be increasing. Now I will prove that its continuous.

We want to prove
lim f (an ) = f (x0 ) =⇒ lim an = x0
n→∞ n→∞

## So let limn→∞ f (an ) = f (x0 )

It follows that
lim inf f (an ) = f (x0 )
n→∞

After taking elements of that sequence and applying f −1 to them we get strictly in-
creasing sequence bounded by x0 therefore

lim inf an = x0
n→∞

n→∞ n→∞ n→∞

## Definition 57. Uniform continuity

Let X ⊆ R and f : X → R. We say that f is uniformly continuous if

## Definition 58. Equivalent sequences

We can generalize this concept beyond Cauchy sequences.
We say an , bn are equivalent if

## ∀ ε > 0 : ∃ N : ∀ i ≥ N : |ai − bi | < ε

34
Exercise 10. an , bn are equivalent iff

lim (an − bn ) = 0
n→∞

## Theorem 73. Let f : X → R.

Then f is uniformly continuous iff

## lim an − bn = 0 =⇒ lim f (an ) − f (bn ) = 0

n→∞ n→∞

where ai , bi ∈ X
Proof. Lets assume f is uniformly continuous.
Then we know:

## Assume an , bn are equivalent.

Therefore
∀ ε > 0 : ∃ N : ∀ i ≥ N : |ai − bi | < ε
And we need to show

## Let ε > 0. By our assumptions, there exists δ and N such that

∀ i ≥ N : |ai − bi | < δ
|x − x0 | < δ =⇒ |f (x) − f (x0 )| < ε

Because ai , bi ∈ X, we have

n→∞ n→∞

It means

## ∃ ε > 0 : ∀ δ∃ x0 , x1 : ¬(|x0 − x0 | < δ =⇒ |f (x0 ) − f (x1 )| < ε)

Which is equivalent to

## But then we have

1
∀ n∃ i : |ai − bi | < ∧ |f (ai ) − f (bi )| > ε
n
1
We can make n as small as we like, which gives as contradiction.

35
Theorem 74. Let f : X → R be uniformly continuous function.
Let xn be a Cauchy sequence with elements in X. Then f (xn ) is also Cauchy.
Proof. Let ε > 0.
Let xn be Cauchy sequence with element in X. We know that

## Because xi is Cauchy there must exists N such that

∀ i, j ≥ N : |xi − xj | < δ

## But that implies

∀ i, j ≥ N : |f (xi ) − f (xj )| < ε

lim f (x) ∈ R
x→x0

## Proof. Let xn be sequence of elements in x converging to x0 . Then because f (xn ) is

cauchy sequence it must converge to f (x0 ).
Theorem 76. Let f : X → R be a uniformly continuous function. Suppose E ⊆ X
and E is bounded. Then f [E] is also bounded.
Proof. Let xn be a cauchy sequence in f (x) that converges to sup(E). Then f (xn ) is
also cauchy so it must converge to sum number in R. Similar argument can be presented
for infimum.
Theorem 77. Let a < b ∈ R and let f : [a, b] → R be function continuous on [a, b].
Then f is uniformly continuous.
Proof. It follows from the fact that [a, b] is closed.
Theorem 78. Function composition preservers uniform continuity.
Proof. Let f, g be uniformly continues function.

## ∀ ε : ∃ δ 0 : |g(x) − g(x0 )| < δ 0 =⇒ |(f ◦ g)(x) − (f ◦ g)(x0 )| < ε

∀ ε : ∃ δ : ∀ x, x0 : |x − x0 | < δ =⇒ |g(x0 ) − g(x)| < δ 0
|x − x0 | < δ =⇒ |(f ◦ g)(x) − (f ◦ g)(x0 )| < ε

## Definition 59. Infinite adherent points

Let X ⊆ R. We say +∞ is adherent to X iff X has no upper bound. Similar definition
apply to −∞.
Definition 60. Limits at infinity
Let X ⊆ R where sup(X) = +∞ and f : X → R.
We say
lim f (x) = L
x→+∞

iff
∀ ε > 0 : ∃ M : x > M =⇒ |f (x) − L| < ε
We define it analogously for −∞.

36
5 Differentiation of functions
Definition 61. Differentiability at point
Let f : X → R and x0 ∈ X. If

f (x) − f (x0 )
lim
x→x0 : x∈X\{x0 } x − x0

f 0 (x0 ) := L

## If limit doesn’t exists we leave f 0 (x0 ) undefined.

Remark 20. Two functions
If we have two function f, g : X → R that are identical on some interval. Then they
have the same derivative on this interval (proof is easy).
Exercise 11. Try differentiate
|x|
on 0.
We have
absx − abs0
lim
x→0 : x∈R\{0} x−0
Now, we compute left and right limits.
−x
lim = −1
x→0 : x∈(−∞,0) x
x
lim =1
x→0 : x∈(0,+∞) x

They do not much, so the first limit at this point is undefined, therefore we can’t
differentiate this function on 0.
Theorem 79. Newton’s approximation
Let f : X → R, let x0 ∈ X and L ∈ R then

f 0 (x0 ) = L

if and only if

## Proof. Lets assume that f 0 (x0 ) exists.

f (x) − f (x0 )
lim =L
x→x0 x − x0
Therefore
f (x) − f (x0 )
∀ ε > 0 : ∃ δ : |x − x0 | < δ =⇒
− L < ε
x − x0
Then
|f (x) − f (x0 ) − L(x − x0 )|

|x − x0 |
Thesis follows. The other side is similar.

37
Theorem 80. Differentiability implies continuity
Let f : X → R. Let x0 ∈ X.
If f 0 (x0 ) exists, then f is continuous on x0 .
Proof. Let f 0 (x0 ) = c

f (x) − f (x0 )
lim |f (x) − f (x0 )| = lim |x − x0 |
x→x0 x→x0 x − x0
  
f (x) − f (x0 )
= lim |x − x0 | lim
x→x0 x→x0 x − x0
=0∗c
=0

## Since limx→x0 f (x) − f (x0 ) = 0 we have limx→x0 f (x) = f (x0 ).

Theorem 81. Differential calculus
Let X ⊆ R and f, g : X → R. Let x0 ∈ X. Then
(from point 3: assume f, g are differentiable on x0 )
1. If f = λx.c for some c ∈ R. Then

f 0 (x0 ) = 0

2. If f = λx.x Then
f 0 (x0 ) = 1

3. Sum rule
(f + g)0 (x0 ) = f 0 (x0 ) + g 0 (x0 )

4. product rule
(f g)0 (x0 ) = f 0 (x0 )g(x0 ) + f (x0 )g 0 (x0 )

5. let c ∈ R
(cf 0 )(x0 ) = cf 0 (x0 )

6. Difference rule
(f − g)0 (x0 ) = f 0 (x0 ) − g 0 (x0 )

7. If 0 6∈ im(g)
 0
1 g 0 (x0 )
(x0 ) = − 2
g g(x0 )

## 8. Quotient rule. Assume 0 6∈ im(g)

 0
f f 0 (x0 )g(x0 ) − f (x0 )g 0 (x0 )
(x0 ) = 2
g g(x0 )

## Proof. Fortunately some of the rules follow from others.

1. Let f = λx.c
f (x) − f (x0 ) c−c
lim = lim =0
x→x0 x − x0 x→x 0 x − x0

2. Let f = λx.x
x − x0
lim = lim 1 = 1
x→x0 x − x0 x→x0

38
3. We have
(f + g)(x) − (f + g)(x0 )
(f + g)0 (x0 ) = lim
x→x0 x − x0
f (x) − f (x0 ) + g(x) − g(x0 )
= lim
x→x0 x − x0
f (x) − f (x0 ) g(x) − g(x0 )
= lim + lim
x→x0 x − x0 x→x0 x − x0
0 0
= f (x0 ) + g (x0 )

4.
f (x)g(x) − f (x0 )g(x0 )
(f g)0 (x0 ) = lim
x→x0 x − x0
f (x)g(x) − f (x)g(x0 ) + f (x)g(x0 ) − f (x0 )g(x0 )
= lim
x→x0 x − x0
(g(x) − g(x0 ))f (x) + (f (x) − f (x0 ))g(x0 )
= lim
x→x0 x − x0
f (x) − f (x0 ) g(x) − g(x0 )
= lim g(x0 ) + f (x)
x→x0 x − x0 x − x0
f (x) − f (x0 ) g(x) − g(x0 )
= lim g(x0 ) + lim f (x)
x→x0 x − x0 x→x0 x − x0
= f 0 (x0 )g(x0 ) + f (x0 )g 0 (x0 )

5. Let c ∈ R
cf (x) − cf (x0 )
(cf )0 (x0 ) = lim
x→x0 x − x0
f (x) − f (x0 )
= c lim
x→x0 x − x0
0
= cf (x0 )

## 6. This is consequence of (−g)0 = −g 0 and sum rule.

7. Assume 0 6∈ im(g)
 0 1 1
1 g(x) − g(x0 )
(x0 ) = lim
g x→x0 x − x0
g(x0 )−g(x)
g(x)g(x0 )
= lim
x→x0 x − x0
g(x0 ) − g(x) 1
= lim ×
x→x0 x − x0 g(x)g(x0 )
g(x) − g(x0 ) 1
= lim −1 × ×
x→x0 x − x0 g(x)g(x0 )
1
= −1 × g 0 (x0 ) × 2
g(x0 )
g 0 (x0 )
=− 2
g(x0 )

39
8. This is a consequence of previous point and product rule
 0  0
f 1
(x0 ) = f × (x0 )
g g
1 f (x0 )g 0 (x0 )
= f 0 (x0 ) − 2
g(x0 ) g(x0 )
f 0 (x0 )g(x0 ) f (x0 )g 0 (x0 )
= 2 − 2
g(x0 ) g(x0 )
f (x0 )g(x0 ) − f (x0 )g 0 (x0 )
0
= 2
g(x0 )

## Theorem 82. Composition rule

Let X, Y ⊆ R.
Let f : X → Y and g : Y → R.
Let x0 ∈ X, y0 ∈ Y and f (x0 ) = y0 .
Suppose f, g are differentiable on x0 , y0 . Then

## (g ◦ f )0 (x0 ) = g 0 (y0 )f 0 (x0 )

Proof. Surprisingly smooth.

(g ◦ f )(x) − (g ◦ f )(x0 )
(g ◦ f )0 (x0 ) = lim
x→x0 x − x0
g(f (x)) − g(f (x0 ))
= lim
x→x0 x − x0
g(f (x)) − g(f (x0 )) f (x) − f (x0 )
= lim
x→x0 x − x0 f (x) − f (x0 )
g(f (x)) − g(f (x0 )) f (x) − f (x0 )
= lim
x→x0 f (x) − f (x0 ) x − x0
  
g(f (x)) − g(f (x0 )) f (x) − f (x0 )
= lim lim
x→x0 f (x) − f (x0 ) x→x0 x − x0
= g 0 (f (x0 ))f 0 (x0 )

## f (x) = xn =⇒ f 0 (x) = nxn−1

I proved this in the past (using binomial theorem and induction). So skipped (for now).
Definition 62. Local maxima and minima
Let f : X → R. And x0 ∈ X. We say that f attains a local maximum at x0 iff

## We define local minima analogously.

Theorem 83. Local extrema are stationary
Let a < b ∈ R and f : (a, b) → R. Let x0 ∈ (a, b) and f 0 (x0 ) = L ∈ R. If f 0 (x0 ) is local
extremum, we have L = 0.

40
Proof. TODO
Theorem 84. Rolle’s theorem
Let a < b ∈ R and g : [a, b] → R be a continuous function on which is differentiable on
(a, b) Suppose g(a) = g(b) then there exists x ∈ (a, b) such that g 0 (x) = 0

Proof. TODO
Theorem 85. Mean value theorem
Let f : [a, b] → R be continuous on [a, b] and differentiable on (a, b) then

f (b) − f (a)
∃ x ∈ (a, b) : f 0 (x) =
b−a
Proof. TODO
Definition 63. Lipschitz continuous
TODO
Theorem 86. Show that functions with bounded derivative are Lipshitz continuous.
Proof. TODO
Theorem 87. Show that every Lipshitz continuous function is uniformly continuous.

Proof. TODO
Theorem 88. Let X ⊆ R and x0 ∈ X be a limit point of X.
Let f : X → R. If f is monotone increasing and f is differentiable at x0 then f 0 (x0 ) ≥ 0.
If f is monotone decreasing and f is differentiable at x0 then f 0 (x0 ) ≤ 0

Proof. TODO
Theorem 89. Let f : [a, b] → R be differentiable.
If ∀ x ∈ [a, b] : f 0 (x) > 0 then f is strictly monotone increasing.
If ∀ x ∈ [a, b] : f 0 (x) < 0 then f is strictly monotone decreasing.
If ∀ x ∈ [a, b] : f 0 (x) = 0 then f is constant.

Proof. TODO
Theorem 90. Inverse derivative
Suppose f : X → Y is bijection. Suppose x0 ∈ X, y0 ∈ Y are such that

y0 = f (x0 )

1
(f −1 )0 (y0 ) =
f 0 (x0 )

## (f −1 ◦ f )0 (x0 ) = (f −1 )0 (y0 )f 0 (x0 )

But
(f −1 ◦ f )0 (x0 ) = (λx.x)0 (x0 ) = (λx.1)(x0 ) = 1
Proposition follows.

41
Theorem 91. Inverse function theorem
Let f : X → R be bijection. Suppose x0 ∈ X, y ∈ Y .
If f is differentiable at x0 f −1 is continuous at y0 and f 0 (x0 ) 6= 0. Then
1
f −1 (y0 ) =
f 0 (x 0)
−1
Proof. We only need to show that f is differentiable at y0 . TODO
Theorem 92. L’Hôpital’s rule I
Let f : X → R and g : X → R, let x0 be a limit point of X. Suppose f (x0 ) = g(x0 ) = 0
and f, g are differentiable on x0 and g 0 (x0 ) 6= 0 for all x ∈ (X ∩ (x0 − δ, x0 + δ)) \ {x0 }.
Then
f (x) f 0 (x0 )
lim = 0
x→x0 : x∈(X∩(x0 −δ,x0 +δ)\{x0 }) g(x) g (x0 )
Proof. TODO
Theorem 93. L’Hôpital’s rule II
Let f : [a, b] → R and g : [a, b] → R be differentiable.
Suppose f (a) = g(a) = 0, ∀ x : g 0 (x) 6= 0 and
f 0 (x)
lim =L∈R
x→a g 0 (x)

Then:
∀ x ∈ (a, b] : g(x) 6= 0 and
f (x)
lim =L
x→a : x∈(a,b] g(x)

Proof. TODO

## 6 The Riemann Integral

Definition 64. Connected set
We say X is connected iff
∀ x, y ∈ X : x < y =⇒ [x, y] ⊆ X
Theorem 94. Let X ⊆ R. Then X is bounded and connected iff X is a bounded
interval.
Proof. Assume X is bounded and connected.
Let a = inf(X), b = sup(X).
Clearly X = [a, b].
The other implication is even more obvious.
Theorem 95. If I, J are bounded intervals, then I ∩ J is also bounded interval.
Proof. It follows from previous theorem.
Definition 65. Length of interval
Let I be bounded interval. Then we define |I| as follows.
If a < b and I is equal to any open/closed intervals of a, b then
|I| := b − a
Otherwise (If we have a point or an empty set).
|I| := 0

42
Definition 66. Partition
Let I be a bounded interval. A partition of I is a finite set B of bounded interval
contained in I such that \
B=∅
Theorem 96. Length is finitely additive
Let I be a bounded interval, n natural number and B partition of I of cardinality n.
Then X
|I| = |J|
J∈B

## Proof. By induction on n. For cases n < 2 its trivial.

So, let card B = n + 1.
If |I| = 0 then proposition follows immediately.
Let assume interval is of a form [a, b], (a, b]. Then we know
b∈K
for some K ∈ B.
Also
|I| = |K| + |I − K|
By inductions base X
|I| = |K| + B
J∈B\{K}

## Similar argument can be made for [a, b).

Finally in a case (a, b), there must exists K = (c, b) for some c and we can repeat our
argument yet again.
Definition 67. Finer and coarser partitions
Let I be bounded interval. And B, B 0 its partitions. We say that B 0 is finer than B
(equivalently: B is coarser then B 0 ) if
∀ J ∈ B0 : ∃ K ∈ B : J ⊆ K
Definition 68. Common refinement
Let I be bounded interval. Let B, B 0 be two partitions. We define common refinement
B#B 0 as
B#B 0 := {K ∩ J : K ∈ B, J ∈ B 0 }
Theorem 97. Let I be bounded interval. Let B, B 0 be two partitions.
Then B#B 0 is also a partition and its finer then B, B 0 .
Proof. Lets start we a first claim. We already proved that intersection of bounded
intervals is a bounded interval, therefore B#B 0 consists of bounded intervals.
Let x ∈ I. Then there exists J0 ∈ B, J1 ∈ B 0 such that x is part of both
but then x ∈ J0 ∩ J1 which implies x ∈ B#B 0 .
See that J0 , J1 are the only intervals B, B 0 containing x, therefore
\
B#B 0 = ∅

## The only thing left is to show that B#B 0 is finer.

Let K ∈ B#B 0 . Then there exists J0 ∈ B, J1 ∈ B 0 such that
K = J0 ∩ J1
which implies
K ⊆ J0 ∧ K ⊆ J1
Thesis follows.

43
Definition 69. Function restriction
We will denote
f |E
the restriction of domain to set E
Definition 70. Piece-wise constant function I
Let I be bounded intervals, f : I → R and B partition of I.
We say that f is piece-wise constant with respect to B if for every J ∈ B f |J is constant.
Definition 71. Piece-wise constant function II
Let I be bounded intervals, f : I → R. If there exists partition of B such that f is
constant with respect to this partition we say f is piece-wise constant.

## Theorem 98. Let f : I → R be piece-wise constant with respect to some partition K

then if partition J is finer then K, then f with respect to J is also piece-wise constant.
Proof. Let M ∈ J. Then ∃ N ∈ K such that

M ⊆N

## therefore f |M = f |N for all x ∈ M . But this means f |M is constant.

Theorem 99. Let I be bounded interval.

f :I→R
g:I→R

## are piece-wise constant.

Then

f +g
f −g
fg
max(f, g)
f /g

are also piece-wise constant (note that for a last one we need 0 6∈ im(g))
Proof. Let B, B 0 be partitions of f, g such that f, g are piece-wise constant with respect
to them.
Let P = B#B 0 . Now both functions are piece-wise constant with respect to P (because
P is finer then both B, B 0 ).
Let J ∈ P . Assume f |J = λx.c0 , g|J = λx.c1 then

f |J + g|J = λx. c0 + c1
f |J − g|J = λx. c0 − c1
f |J × g|J = λx. c0 c1
max(f |J , g|J ) = λx. max(c0 , c1 )
f |J c0
= λx.
g|J c1

44
Definition 72. Piece-wise constant integral I
Let I be a bounded interval and P be a partition of I. Let f : I → R be piece-wise
constant with respect to P . Then we define piece-wise constant integral of f with respect
to P as Z X
p.c. f := cJ |J|
[P ] J∈P

## where cJ is constant value of f on J.

Theorem 100. Piece-wise constant integral is independent of partition
Let f : I → R be piece-wise constant with respect to P, P 0 then
Z Z
p.c. f = p.c. f
[P ] [P 0 ]

## Proof. I will proved it by showing that they are both equal to P #P 0 .

I will show Z Z
p.c. f = p.c. f
[P ] [P #P 0 ]

We need to show: X X
cJ |J| = cK |K|
J∈P K∈P #P 0

X
|J| = |K|
K∈P #P 0 : K⊆J

and X
|J|cJ = |K|cJ
K∈P #P 0 : K⊆J

## Therefore (also: we can replace |K|cJ = |K|cK )

X X X
cJ |J| = cK |K|
J∈P J∈P K∈P #P 0 : K⊆J

But since every element of K is subset of exactly one element of P we can write
X X
cJ |J| = cK |K|
J∈P K∈P #P 0

## Definition 73. Piece-wise constant integral II

In the light of previous theorem, we can write
Z Z
p.c. f := p.c. f
I [P ]

## where f : I → R is piece-wise constant with respect to P .

Theorem 101. Laws of integration for piece-wise functions
Let f, g : I → R be piece-wise constant functions. Then
1. Z Z Z
p.c. f + g = p.c. f + p.c. g
I I I

45
2. Z  Z 
p.c. cf = c p.c. f
I I

3. Z Z Z
p.c. f − g = p.c. f − p.c. g
I I I

p.c. f >0
I

p.c. f > p.c. g
I I

Z
p.c. f = c|I|
I

## 7. Suppose {J, K} is a partition of I then

Z Z Z
p.c. f = p.c. f |J + p.c. f |K
I J K

Proof. All of them follow from properties of sum and piece-wise constant functions, as
well as definition of p.c. integral.
Definition 74. Majorization of functions
Let f, g : I → R. We say that g majorizes f if

∀ x ∈ I : f (x) ≤ g(x)

and minorizes if
∀ x ∈ I : f (x) ≥ g(x)

## Definition 75. Upper and lower Riemann integrals

Let f : I → R be a bounded function on bounded interval I. We define upper Riemann
integral by Z Z
f := inf{p.c. g : g is p.c. and majorizes f }
I I
and lower Riemann integral by
Z Z
f := inf{p.c. g : g is p.c. and minorizes f }
I I

46
Theorem 102. Let f : I → R be a function on a bounded interval that is bounded
by some M . Then Z Z
−M |I| ≤ f ≤ f ≤ M |I|
I I

Proof. Lets start from the right side. Let P be partitions under which f is piece-wise
constant.
And K ∈ J such that f |K (x) = max(f |k (x) : k ∈ J | x ∈ k)
Let f |K (x) = c. Clearly f (x) ≤ c for all x ∈ I. Therefore
Z Z
f ≤ λx.c
I I

Z Z
λx.c ≤ λx.M
I I

## Which can be shown by taking the most trivial partition of I namely I.

The middle inequality follows immediately from the definition.
Last one can be prove using analogous construction.
(After reading Tao proof: it can be done simpler by considering λx.M right away).
Definition 76. Riemann integral
Let f : I → R be bounded function on a bounded interval. If
Z Z
f= f
I I

Z Z Z
f := f = f
I I I

## Theorem 103. Riemann integral supersedes p.c. integral

Let f : I → R be a piece-wise constant function on a bounded interval I. Then
Z Z
f = p.c. f
I I

f= f = p.c. f
I I I

therefore Z Z
f = p.c. f
I I

## Definition 77. Riemann sums

Let f : I → R be a bounded function on a bounded interval. Let P be partition of I.
Then we define the upper Riemann sum RU (f, P ) and the lower Riemann sum RL (f, P )
by
X
RU (f, P ) := sup(f (x))|J|
x∈J
J∈P \∅
X
RL (f, P ) := inf (f (x))|J|
x∈J
J∈P \∅

47
Theorem 104. Let f : I → R be bounded function on a bounded interval. Let f
be a function which majorizes f and which is piece-wise constant with respect to some
partition P . Then Z
p.c. g ≥ RU (f, P )
I
Similarly let h minorize f on some interval P then
Z
p.c. h ≤ RL (f, P )
I

Proof. We need to show (assume ∅ 6∈ J, since it has length zero it won’t influence sum).
X X
cj |J| ≥ sup(f (x))|J|
x∈J
J∈P J∈P

Which is equivalent to X
(cj − sup(f (x)))|J| ≥ 0
x∈J
J∈P

But from definition of g, we have g(x) ≥ f (x) (also note, because we operate on closed
set, supremum will be achieved in image).
Therefore cj −supx∈J (f (x)) ≥ 0. Sum of non-negative terms is of course is non-negative.
The second part can be proved in similar fashion.
Theorem 105. Upper, lower integrals as sums
Let f : I → R be a bounded function on a bounded interval. Then
Z
f = inf{RU (f, P ) : P is partition of I}
ZI
f = sup{RL (f, P ) : P is partition of I}
I

## Proof. After de-sugaring, our proposition can be presented as:

Z
inf{p.c. g : g is p.c. and majorizes f } = inf{RU (f, P ) : P is partition of I}.
I

From previous proposition we already now that left side is greater or equal.
Now assume then its greater it means that there exists partition P (throw away ∅) of f
such that
X Z
sup(f (x))|J| < inf{p.c. g : g is p.c. and majorizes f }
x∈J I
J∈P

But we can take g such that g|J (x) = supx∈J (f (x)) for each J ∈ P . Contradiction.
They must be equal.
The second part is once again analogous.
Theorem 106. Laws of Riemann integration
Let f, g : I → R be Riemann integralble function on I. Then
1. Z Z Z
f +g = f+ g
I I I

2. let c ∈ R Z Z
cf = c f
I I

48
3. Z Z Z
f −g = f− g
I I I

4. If ∀ x : f (x) ≥ 0 Z
f ≥0
I

5. If ∀ x : f (x) ≥ g(x) Z Z
f≥ g
I I

6. If ∀ x : f (x) = c ∈ R then Z
f = c|I|
I

(
f (x) x∈I
H(x) :=
0 x 6∈ I
then Z Z
F = f
J I

## 8. Let {J, K} be partition of I into two intervals. Then

Z Z Z
f= f |J + f |K
I J K

Proof. All of this properties should follow easily form both definitions.
1.
Z Z Z Z
f+ g = inf{p.c. h : where h, q majorize f, g} + inf{p.c. q : where h, q majorize f, g}
I I I I

## We have inf of real numbers therefore

Z Z
= inf{p.c. h + p.c. q : where h, q majorize f, g}
ZI I

I
Z
= f +g
I

## Similar argument gives as lower integral of sum. And since

Z Z
f= f
I I
Z Z
g= g
I I

we have
Z Z Z Z
f+ g= f+ g
I I I I
Z Z
f +g = f +g
I I

49
2. It quickly follows from definitions that:
Z Z
cf = c f
ZI ZI
cf = c f
I I

therefore
Z Z
cf = c f
I I

## 4. ∀ x : f (x) ≥ 0. It follows immediately from the definition of a Riemann sum

5. Its easy to show using previous points (especially last one) that
Z
f −g ≥0
I

Proposition follows.

6. If ∀ x : f (x) = c ∈ R then Z
f = c|I|
I
The definition using piece-wise constant functions comes very handy here. Its
trivial to show that Clearly f majorizes and minimazes f , therefore
Z Z X
f = p.c. f = cj |J|
I I J∈P

But we can choose any P so we take most trivial one P = {I} and have
Z
f = c|I|
I

## 7. Skipped (easy, but seems tedious).

8. Proposition Z Z Z
f= f |J + f |K
I J K
it follows from definition of integral using piece-wise constant function and last
point of Theorem 101.

## Remark 22. I will often write Z Z

f := f |J
J J
even if f is defined on larger domain.
Theorem 107. Max-min preservers integrability
If f, g : I → R then so are max(f, g) and min(f, g).

50
Proof. I will prove that max(f, g) is integrable.
Let ε > 0.
Let f , f , g, g be p.c. functions such that
Z Z
f ≥ f −ε
ZI ZI
g ≥ g−ε
ZI ZI
f ≤ f +ε
I
Z ZI
g ≤ g+ε
I I

## Now lets define extra function

h := f − f + g − g
Z
h ≤ 4ε
I

We know: Z Z Z Z
max(f , g) ≤ max(f, g) ≤ max(f, g) ≤ max(f , g)
I I I I

We have
Z Z Z Z
0≤ max(f, g) − max(f, g) ≤ max(f , g) − max(f , g)
I I I I

## But we also know

max(f , g) ≤ max(f , g) + h
Finally Z Z Z
0≤ max(f, g) − max(f, g) ≤ h ≤ 4ε
I I I

## |x| = max(x, −x)

Theorem
R 109.
R Product preservers Riemann integrability
If I f and I g exists then intI f g also exists.
Proof. We can write
f g = f + g+ + f + g− + f − g+ + f − g−
where

f = f+ + f−
g = g+ + g−

51
is a split of this functions into positive and negative parts.
It is sufficient to show that individual parts are Riemann integrable. We will show it for
f + g + . Since they are bounded and positive, let Mf , Mg ∈ R such that

0 ≤ f + ≤ Mf
0 ≤ g + ≤ Mg

## Let ε > 0 and

Z Z
f+ ≤ f+ + ε
I I
Z Z
+
f ≥ f+ − ε
I I
Z Z
g+ ≤ g+ + ε
I I
Z Z
g+ ≥ g+ − ε
I I

We have
Z Z Z
0≤ f + g+ − f + g+ ≤ f + g+ − f + g+
I I I

but

f + g + − f + g + = f + (g + − g + ) + g + (f + − f + )
≤ Mf (g + − g + ) + Mg (f + − f + )

Thus
Z Z Z Z
+ + + + +
0≤ f g − f g ≤ Mf (g + − g ) + Mg (f + − f + ) ≤ Mf 2ε + Mg 2ε
I I I I

## And we can make ε as small as we like.

Theorem 110. Uniformly continuous functions are Riemann integrable
Let I be bounded interval and f : I → R then if f is uniformly continues it is Riemann
integrable.

Proof. Let ε > 0. By uniform continuity there exists delta such that ∀ x, y|x − y| <
δ =⇒ |f (x) − f (y)| < ε Let J be partition such that each of intervals has length
b−a
N < δ (different cases for different intervals).
We see
Z N
X
f≤ sup (f (x))|Jk |
I x∈Jk
k=1
Z N
X
f≥ inf (f (x))|Jk |
I x∈Jk
k=1
Z Z N
X N
X
f− f≤ sup (f (x))|Jk | − inf (f (x))|Jk |
I I x∈Jk x∈Jk
k=1 k=1

52
Because |f (x) − f (y)| < ε we have
Z Z N
X
f− f≤ ε|Jk |
I I k=1
Z Z
f− f ≤ ε(b − a)
I I

## By Archimedean principle: thesis follows.

Theorem 111. Continuous functions on closed interval are Riemann integrable
Proof. It follows from the previous theorem and fact that continuous function on closed
interval are uniformly continues.

## Definition 78. Piece-wise continuous

TODO
Theorem 112. Bounded piece-wise continuous function are Riemann integrable
TODO
Proof. TODO

## Theorem 113. Monotone functions are Riemann integrable

TODO
Proof. TODO
Theorem 114. Integral test
Let f : [0, ∞) → R be a monotone decreasing function which is non-negative. Then

X
f (n)
n=0

is convergent iff Z
sup f
N [0,N ]

is finite
Proof. We can choose partition where each interval has length 1. It quickly follows
(because f is monotone decreasing) that:

X Z ∞ ∞
X
f (i) ≤ f≤ f (i)
i=1 0 i=0

## Remark 23. Consequence of integral test

It follows that

X 1
n=m
np
converges iff p > 1.
Exercise 12. Show that Dirichlet function is not Riemann integrable.

53
Proof. We consider interval I = [0, 1].
Z
f =1
I
Z
f =0
I
Z Z
f 6= f
I I

## Definition 79. α-length

Let I be a bounded interval and α : X → R where I ⊆ X then we define α-length as
follows:
If I is a point or an empty set α(I) := 0. If I is interval of any form define with lower
bound a and upper b:
α(a, b) := α(b) − α(a)
Theorem 115. Let I be bounded interval and let α : X → R be function defined on
some domain I ⊆ X and P be a partition of I then
X
α|I| = α|J|
J∈P

Proof. Intuitively we can see that every partition will cancel each other except ends.
Formally, proof by induction on the size of partition. If partition length is less then 3 it
follows immediately. Step:
Let c be such number that there is partition c < b
X
α|I| = α|J|
J∈P
X
α|[a, c]| + α|[c, b]| = α|J| + α|[c, b]|
J∈P 6=[c,b]

## Definition 80. p.c. Riemann-Stieltjes integral

Let I be bounded interval and P partition of I. Let α : X → R where I ⊆ X and
f : I → R be a piece-wise constant with respect to P . Then
Z X
p.c. f dαL = cj α|J|
[P ] J∈P

## where cj is a constant value of f on J

Remark 24. We define upper and lower integrals analogously Also almost every laws
of Riemann integral still holds. I won’t derive them again.

54
Theorem 116. First fundamental theorem of calculus
Let f : [a, b] → R be Riemann integrable. Let F : [a, b] → R be the function
Z
F (x) := f
[a,x]

## Then F is continuous. Furthermore, if x0 ∈ [a, b] and f is continuous at x0 , then

F 0 (x0 ) = f (x0 ).
Proof. Since f is Riemann integrable: its bounded. Let M = sup(im(f )). Let x < y ∈
[a, b] Z Z Z
F (y) − F (x) = f− f= f
[a,y] [a,x] [x,y]

Also Z Z
f≤ M = M (y − x)
[x,y] x,y

and Z Z
f≥ −M = −M (y − x)
[x,y] [x,y]

Thus
|F (y) − F (x)| ≤ M |y − x|
Let xn be sequence in [a, b] converging to x then

## |F (xn ) − F (x)| ≤ M |xn − x|

By squeeze test
lim F (xn ) = F (x)
xn →x

## We see that F is continuous. Suppose x0 ∈ [a, b].

Let ε > 0 then there exists delta such that

## Let y > x0 (if y = x0 it follows immediately and if y < x0 proof is similar).

We have Z y
F (y) − F (x0 ) = f
x0

## for all x ∈ [x0 , y]. Thus

Z y
(f (x0 ) − ε)(y − x0 ) ≤ f ≤ (f (x0 ) + ε)(y − x0 )
x0

And so
|F (y) − F (x0 ) − f (x0 )(y − x0 )| ≤ ε|y − x0 |
This Newton’s approximation. Proposition follows.
Definition 81. Anti-derivatives
We say that F is antiderivative of f if

F 0 (x) = f (x)

55
Theorem 117. Second fundamental theorem of Calculus
Let F be antiderivative of f then
Z
f = F (b) − F (a)
[a,b]

## Proof. We will show

RL (f, P ) ≤ F (b) − F (a) ≤ RU (f, P )
for all P . We will show the right inequality. Let P be a partition of [a, b]. Then
X
F (b) − F (a) = F |J|
J∈P

## From the definition X

RU (f, P ) = sup f (x)|J|
x∈J
J∈P

## We only need to show

∀ J ∈ P : F |J| ≤ sup f (x)|J|
x∈J

## F (d) − F (c) = (d − c)F 0 (e) = |J|f (e) =

We have
f (e)|J| < sup f (x)|J|
x∈J

Theorem 118. +C
Let F, G be antiderivative of f then there exists C such that F + C = G
Proof. Let H = F − G. From mean value theorem

H(b) − H(a)
∃ x ∈ (a, b) : H 0 (x) =
b−a
We have
F (b) − G(b) − F (a) + G(a) = H 0 (x)(b − a)
But then
F (b) − F (a) = G(b) − G(a) + H 0 (x)(b − a)
TODO

## Theorem 119. Integration by parts

Z b Z b
0
f (x)g(x) = f (x)g(x)|ab − f (x)g 0 (x)
a a

## Proof. Follows immediately from the product rule.

56
Remark 25. I skip theorem saying
Z Z
f dα = f α0
[a,b] [a,b]

From it follows that we can reduce Riemann-Stieltjes integral to Riemann integral given
good α (when its differentiable).
Theorem 120. Change of variables formula
Let φ : [a, b] → [φ(a), φ(b)] be a differentiable monotone increasing function such that
φ0 is Riemann integrable. Let f : [φ(a), φ(b)] → R be Riemann integrable. Then
Z Z
(f ◦ φ)φ0 = f
[a,b] [φ(a),φ(b)]

## Proof. First assertion is that f ◦ φ is piece-wise constant if φ is piece-wise constant (I

will skip it). Let ε > 0. We have
Z Z Z Z
f −ε≤ f≤ f≤ f +ε
[φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)]

## Using the first assertion

Z Z Z Z
f −ε≤ f ◦ φ dφ ≤ f ◦ φ dφ ≤ f +ε
[φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)]

It follows:
Z Z Z Z
f −ε≤ f ◦ φ dφ ≤ ◦ φ dφ ≤ f +ε
[φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)] [φ(a),φ(b)]

## Since ε is arbitrary, we are done. If φ is monotone increasing our Riemann-Stieltjes

become Riemann.

7 Metric spaces
Definition 82. Metric space
A metric space (X, d) is a space X of objects (called points), together with a distance
function d : X 2 → [0, ∞), which associates to each pair x, y ∈ X a non-negative real
number. It must satisfy:
1. Positivity
∀ x, y ∈ X : d(x, y) = 0 ⇐⇒ x = y

## 2. (Symmetry) For all x, y ∈ X

d(x, y) = d(y, x)

## Definition 83. Induced metric space

Let (X, d) be a metric space. Let Y ⊆ X and d : X 2 → [0, ∞) then we can restrict the
metric function to d|Y ×Y Y 2 → [0, ∞). We call it: metric Y induced by the metric d on
X.

57
Theorem 121. Induced metric spaces are metric spaces Using symbols from previous
definition:
(Y, d|Y ×Y )
is a metric space.
Proof. All the properties follow immediately.

## Definition 84. Euclidean spaces

Let n ∈ N+ . We call (Rn , dl2 ) an euclidean space iff
v
u n
uX 2
d(xn , yn ) = t (xi − yi )
i=1

## We refer to such euclidean space as: euclidean space of n-th dimension.

Theorem 122. Cauchy-Schwartz inequality
Let an , bn be finite sequences of real numbers. Then:
n n
! 21 n
! 21
X X X
ai bi ≤ a2i b2i

i=0 i=0 i=0

## Proof. First I will show

n
!2 n n n
! n
!
X 1 XX 2
X X
ai bi + (ai bj − aj bi ) = a2i b2i
i=0
2 i=0 j=0 i=0 i=0

Induction on n. Base:
1 2
a20 b20 + (a0 b0 − a0 b0 ) = a20 b20
2
Step:
n+1
!2 n+1 n+1 n+1
! n+1
!
X 1 XX 2
X X
ai bi + (ai bj − aj bi ) = a2i b2i
i=0
2 i=0 j=0 i=0 i=0

## I will start be re-writing second term on the left side:

 
n+1 n+1 n+1 n n+1
1 X X 2 1 X 2
X X 2
(ai bj − aj bi ) =  (an+1 bj − aj bn+1 ) + (ai bj − aj bi ) 
2 i=0 j=0 2 j=0 i=0 j=0
 
n n n X n
1 X 2
X 2
X 2
= (ai bn+1 − an+1 bi ) + (an+1 bj − aj bn+1 ) + (ai bj − aj bi ) 
2 j=0 i=0 i=0 j=0
n n n
1 X 2 2
 1 XX
2
= (ai bn+1 − an+1 bi ) + (an+1 bi − ai bn+1 ) + (ai bj − aj bi )
2 i=0 2 i=0 j=0
n n n
1X 2 2  1 XX 2
= 2ai bn+1 − 4ai bi an+1 bn+1 + 2a2n+1 b2i + (ai bj − aj bi )
2 i=0 2 i=0 j=0
n n n
X 1 XX 2
= (ai bn+1 − an+1 bi )2 + (ai bj − aj bi )
i=0
2 i=0 j=0

58
After expanding first term left side looks like this:
n
!2 n
! n n n
X X X 1 XX 2
ai bi +2 an+1 bn+1 ai bi +(an+1 bn+1 )2 + (ai bn+1 −an+1 bi )2 + (ai bj − aj bi )
i=0 i=0 i=0
2 i=0 j=0

## We can re-write right side as:

n
! n ! n
! n
!
X X X X
a2i b2i + a2n+1 b2i + b2n+1 a2i + a2n+1 b2n+1
i=0 i=0 i=0 i=0

## Using inductive hypothesis we get

n
! n n
! n
!
X X X X
2 an+1 bn+1 ai bi + (ai bn+1 − an+1 bi )2 = a2n+1 b2i + b2n+1 a2i
i=0 i=0 i=0 i=0
n
! n n
X X X
2 an+1 bn+1 ai bi + (ai bn+1 − an+1 bi )2 = a2n+1 b2i + b2n+1 a2i
i=0 i=0 i=0
n
X n
X
(ai bn+1 − an+1 bi )2 = a2n+1 b2i − 2ai bi an+1 bn+1 + b2n+1 a2i
i=0 i=0
n
X n
X
2
(ai bn+1 − an+1 bi ) = (ai bn+1 − an+1 bi )2
i=0 i=0

n
!2 n
! n
!
X X X
ai bi ≤ a2i b2i
i=0 i=0 i=0

n

n
! 21 n
! 21
X X X
ai bi ≤ a2i b2i

i=0 i=0 i=0

## Theorem 123. Triangle inequality

Let an bn be finite sequences of real numbers. Then

n
! 21 n
! 12 n
! 21
X X X
(ai + bi )2 ≤ a2i + b2i
i=0 i=0 i=0

## Proof. Equivalent claim is:

n n n n
! 21 n
! 21
X X X X X
(ai + bi )2 ≤ a2i + b2i + 2 a2i b2i
i=0 i=0 i=0 i=0 i=0
n n
! 21 n
! 12
X X X
ai bi ≤ a2i b2i
i=0 i=0 i=0

59
And from Cauchy-Schwartz we get

n

n

n
! 21 n
! 21
X X X X
ai bi ≤ ai bi ≤ a2i b2i

i=0 i=0 i=0 i=0

## Theorem 124. Euclidean space is metric space

I will use symbols from previous definition
Proof. First two properties are obvious. Triangle inequality:
v v v
u n u n u n
uX 2
u X 2
uX 2
t (xi − zi ) ≤ t (xi − yi ) + t (yi − zi )
i=1 i=1 i=1

## Let an = xn − yn , bn = yn − zn then we can re-write previous claim as:

v v v
u n u n u n
uX 2
u X uX
t (ai + bi ) ≤ t a2i + t b2i
i=1 i=1 i=1

## Definition 85. Taxi-cab/Manhattan metric

We have (Rn , d) were
n
X
d(xn , yn ) = |xi − yi |
i=1

## Theorem 125. Taxi-cab/Manhattan metric

Its a metric space.

Proof. Easy.
Definition 86. Sup norm metric
Let Rn , dl∞ be order pair. Where

## Theorem 126. Sub norm metric

Rn with sub norm metric is a metric space.
Proof. The first two properties are obvious. Triangle inequality:

## sup{|xi − zi | : 1 ≤ i ≤ n} ≤ sup{|xi − yi | : 1 ≤ i ≤ n} + sup{|yi − zi | : 1 ≤ i ≤ n}

Let xn , yn , zn ∈ Rn . Let i = arg max{|xi −zi | : 1 ≤ i ≤ n}. Then from triangle inequality
follows |xi − yi | + |yi − zi | ≥ |xi − zi |, but

sup{|xi − zi | : 1 ≤ i ≤ n} = |xi − zi |
≤ |xi − yi | + |yi − zi |
≤ sup{|xi − yi | : 1 ≤ i ≤ n} + sup{|yi − zi | : 1 ≤ i ≤ n}

60
Definition 87. Discrete metric
Let X, ddisc be a metric space, where
(
1 if x = y
ddisc (x, y) =
0 otherwise

## Its obviously a metric space (follows from properties of equality).

Notation 1. Superscript
From now I will sometimes use
x(i) := xi
superscript to denote element of sequence (usually in case of nested sequences).
Definition 88. Convergence of sequences in metric spaces

Let (X, d) be a metric space and (x(n) )m be a sequence with elements in X. Then we
say that sequence converges to x iff

∀ ε > 0 : ∃ N : ∀ n ≥ N : d(x(n) , x) ≤ ε

We can write
lim d(x(n) , x) = 0
n→∞

## Theorem 127. Equivalence of l1 , l2 , l∞

Let Rn be a Euclidean space, and let x(k) be a sequence of points. Following statements
are equivalent
1. x(k) converges with respect to dl1

## 2. x(k) converges with respect to dl2

3. x(k) converges with respect to dl∞
(k)
4. xj converges to yj for each j ∈ {1 . . . n}
Proof. First lets look at what it means in each of this metric to converge. Taxi:
n
(k)
X
lim dl1 (x(k) , x) = lim |xi − yi | = 0
k→∞ k→∞
i=1

Euclidean: v
u n
uX (k) 2
lim dl2 (x(k) , x) = lim t (xi − yi ) = 0
k→∞ k→∞
i=1

Sub norm:
n
(k)
X
(k)
lim d l∞ (x , x) = lim sup{|xi − yi | : i ∈ {1 . . . n}} = 0
k→∞ k→∞
i=1

If we assume the last point, its immediately obvious that points 1, 2, 3 are true. I will
prove the implications 1 =⇒ 4, 2 =⇒ 4, 3 =⇒ 4 by contradiction. Lets assume that

61
∃ m ∈ {1 . . . n} : x(m) that diverges and 1, 2, 3 are true. Then we can re-write the limits
above as (because we assume they exists and square root is continues):
n n
(k) (k)
X X
lim |xi − yi | = lim |xi − yi | = 0
k→∞ k→∞
i=1 i=1
v v
u n u n
uX (k) 2 uX (k) 2
lim t (xi − yi ) = t lim (xi − yi )
k→∞ k→∞
i=1 i=1
n n
(k) (k)
X X
lim sup{|xi − yi | : i ∈ {1 . . . n}} = lim sup{|xi − yi | : i ∈ {1 . . . n}}
k→∞ k→∞
i=1 i=1

But now we can re-write them (using only first as an example as)

lim |x(k)
m − ym | + C
k→∞

(k)
for some C ∈ R. But that would imply xm converges. Contradiction.
Theorem 128. Convergence in discrete metric
Let (X, ddisc ) be a metric space. Then x(n) converges to y iff

∃ M : ∀ i ≥ M : xi = y

## ∀ ε > 0 : ∃ N : ∀ n ≥ N : ddisc (x(n) , y) ≤ ε

Proof by contradiction is really easy. Assume that condition above is not true. Let ε = 21 .
Then we can choose such i ≥ N that d(x(i) , y) = 1 which gives contradiction.
Theorem 129. Uniqueness of limits
Let (X, d) be a metric space. Suppose x(n) is a sequence in X and there exists y, y 0 such
that x(n) converges to both. Then y = y 0 .
Proof. Should be easy.

n→∞ n→∞

## lim d(x (n)

, y) + d(x(n) , y 0 ) = 0
n→∞

## From triangle inequality

d(y, y 0 ) = 0

Which implies y = y 0 .
Theorem 130. Let (X, d) be a metric space.
Suppose that x(n) , y (n) are convergent sequences with elements in X then:

n→∞ n→∞ n→∞

n→∞ n→∞

## lim d(x(n) , y (n) ) ≤ lim d(y (n) , y) + d(x, y) + d(x(n) , x)

n→∞ n→∞

62
From squeeze theorem we get:

n→∞

## Definition 89. Balls

Let (X, d) be a metric space. Let x0 ∈ X and r > 0. We define ball B(X,d) (x0 , r) in X,
centered at x0 with radius r in the metric d to be a set:

## Remark 26. Balls behave funny in discrete metric :)

Definition 90. Interior, exterior, boundary
Let (X, d) be a metric space. Let E ⊆ X and x0 ∈ X. We say that x0 is interior point
of E if
∃ r > 0 : B(x0 , r) ⊆ E
We say that x0 is an exterior point of E if

∃ r > 0 : B(x0 , r) ∩ E = ∅

## We call x0 boundary point of E iff its not interior or exterior point of E.

Remark 27. Its not possible for a point to be both interior and exterior. Since if its
interior that implies x0 ∈ E and exterior implies x0 6∈ E.
Definition 91. Closure
Let (X, d) be a metric space. Let E ⊆ X and x0 ∈ X. We say that x0 is adherent point
of E if
∀ r > 0 : B(x0 , r) ∩ E 6= ∅
The set of all adherent points is called closure of E and denoted E.
Remark 28. We can write
[
E := {x0 : B(x0 , r) ∩ E 6= ∅}
x0 ∈E, r>0

Theorem 131. Let (X, d) be a metric space, let E ⊆ X and x0 ∈ X then following are
equivalent
1. x0 ∈ E
2. x0 is either boundary or interior point of E.
3. There exists a sequence xn in E which converges to x0 with respect to metric d.
Proof. 1 =⇒ 2
Let x0 ∈ E. Assume x0 is exterior. Then ∃ r > 0 : B(x0 , r) ∩ E = ∅, which negates
2 =⇒ 1
Assume x0 is interior or boundary. Then be definition ¬∃ r > 0 : B(x0 , r) ∩ E = ∅, but
this is equivalent to ∀ r > 0 : B(x0 , r) ∩ E 6= ∅, therefore its adherent.
3 =⇒ 1
Let xn be a sequence in E such that limn→∞ d(xn , x0 ) = 0. Assume that x0 6∈ E then

∃ r > 0 : B(x0 , r) ∩ E = ∅

63
Lets fix this r. Them

## But if we take ε = r we get a contradiction.

1 =⇒ 3
Let x0 ∈ E. Then
∀ r > 0 : B(x0 , r) ∩ E 6= ∅

Let (xn )1 be sequence such that

1
xi ∈ B(x0 , )
i
1
Let ε > 0. Clearly there exists N less then ε, therefore

1
∀ i ≥ N : d(xi , x0 ) ≤ <ε
N

I will user

∂E
ext(E)
int(E)

## To denote boundary, exterior and interior points of a set.

Theorem 132. Let (X, d) be a metric space and E ⊆ X then

E = int(E) ∪ ∂E = X \ ext(E)

## Proof. This is immediate consequence of the previous theorem.

Definition 92. Open set, closed set
Let (X, d) be a metric space and E ⊆ X. We say that E is closed if

∂E ⊆ E

## We say its open if

∂E ∩ E = ∅
otherwise: its neither open nor closed.
Remark 29. Equivalent definition would be (for a closed set)

E=E

## for the open:

E \ ∂E = E
Remark 30. Set can be open and closed. Which is fun.
(we just need ∂E = ∅)
Theorem 133. Basic properties of open and closed sets
Let (X, d) be a metric space. Let E ⊆ X

64
1. E is open iff E = int(E).
2. E is closed iff E = E
3. ∀ x0 ∈ X and r > 0 the ball B(x0 , r) is an open set. The set {x ∈ X : d(x, x0 ≤ r)}
is closed (sometimes called closed ball).
4. Any singleton {x0 } is closed.
5. E is open iff X \ E is closed.
T
6. If E1 . . . En are finite collections of openS sets then 1≤i≤n Ei is also open. If
F1 . . . Fn is collection of closed sets then 1≤i≤n Fi is also closed.
S
7. if (E)α is any T collection of open/closed sets than: if its open α Eα is also open,
if its closed α Eα is also closed
8. int(E) is a largest open set contained in E. The E is a smallest closed set containing
E.

Proof. I want consider the cases of empty sets because those are trivial.

## 1. E is open iff E = int(E).

Assume E = int(E). Clearly ∂E ∩ E = ∅.
Assume E is open. Then ∂E ∩ E = ∅. Which means we have no boundary points
inside. Of course ext(E) ∩ E = ∅ but then thesis follows.
2. E is closed iff E = E
I already put that statement in remark above. It follows from the previously
3. ∀ x0 ∈ X and r > 0 the ball B(x0 , r) is an open set. The set {x ∈ X : d(x, x0 ) ≤ r}
is closed (sometimes called closed ball).
Let x ∈ B(x0 , r). Then we can choose such r0 = r − d(x0 , x).
Clearly B(x, r0 ) ⊆ B(x0 , r). Therefore x ∈ int(B(x0 , r)).
Suppose x ∈ ∂{x ∈ X : d(x, x0 ) ≤ r}. If d(x, x0 ) > r it is easy to show x is exterior
by setting r0 < d(x, x0 ) − r and seeing that B(x, r0 ) has empty intersection with
our set. Therefore d(x, x0 ) ≤ r but then x is part of our starting set, therefore
∂{x ∈ X : d(x, x0 ) ≤ r} ⊆ {x ∈ X : d(x, x0 ) ≤ r}. Closed!

## 4. Any singleton {x0 } is closed.

All sequence xn in {x0 } converge to x0 . Therefore {x0 } = {x0 }.
5. E is open iff X \ E is closed.
Assume E is not open and X \ E is closed. Then ∃ y : y ∈ ∂E ∩ E (if E = ∅ the
case is trivial). But then y ∈ X ∧ y ∈ X \ E ∧ y ∈ E which means y ∈ E ∧ y 6∈ E.
Assume X \E is not closed and E is open. Then ∃ x ∈ X : x ∈ ∂X \E ∧ x 6∈ X \E.
But then x ∈ E, its easy to show that x ∈ ∂E (otherwise x 6∈ ∂X \ E), but then
E 6= int(E) which implies that E isn’t open. Contradiction.
T
6. If E1 . . . En are finite collections of openS sets then 1≤i≤n Ei is also open. If
F1 . . . Fn is collection of closed sets then 1≤i≤n Fi is also closed.
Let E0 , E1 be open sets. Let x ∈ E0 ∩ E1 . Then there exists r0 , r1 such that
B(x, r0 ) ⊆ E0 and B(x, r1 ) ⊆ E1 . Clearly B(x, min(r0 , r1 )) ⊆ E0 ∩ E1 , therefore
x ∈ int(E0 ∩ E1 ). Using induction it quickly follows for any n.
Suppose F0 , F1 are closed. Let f ∈ ∂F0 ∪ F1 . If f would be interior in any of the

65
two sets then it would be interior in union, if it was exterior to both it would be
exterior to union: similar trick as proof above. Therefore f ∈ ∂F0 ∨ f ∈ ∂F1 . But
then f ∈ F0 ∨ f ∈ F1 and also in union. Induction generalizes this easily.
S
7. if M = (E)α is any T collection of open/closed sets than: if its open α Eα is also
open, if its closed α Eα is also closed. S
Let M consists of open sets. Suppose x0 ∈ α Eα then there exists some ESsuch
that x0 ∈ E. But then ∃ r > 0 : B(x S 0 , r) ⊆ E.
S It follows S that B(x0 , r) ⊆ M .
But then x0 ∈ int(M ). Therefore M = int( M ). Then M is open.
Suppose M consists
S of closed sets. Let SH = {XT\ E : E ∈ M }. Since H consists
of open sets H is also open. But X \ H = M . And from point 5 it follows
that this family of sets is closed.
8. int(E) is a largest open set contained in E. The E is a smallest closed set containing
E.
Let M ⊆ E be an open set. Let x ∈ M . Since M is open M ∩ ∂E = ∅ (otherwise
∂M 6= ∅). But then M ⊆ int(E).
Suppose E ⊆ S and S is closed. Let x0 ∈ E. Then there exists, a sequence xn
in E such that limn→∞ d(x0 , xn ) = 0. But the same sequence exists in S, which
means x0 ∈ S. Therefore E ⊆ S.

## Remark 31. Closure of a ball

Closure of a ball is not necessarily closed ball. Sad!
Definition 93. Relative topology
Let (X, d) be a metric space, let Y ⊆ X and E ⊆ Y . We say that E is relatively open
with respect to Y if it is open in a metric space (Y, d|Y ×Y ). Similarly we say E is
relatively closed in analogous situation.
Theorem 134. Let (X, d) be a metric space, let Y ⊆ X and E ⊆ Y .
1. E is relatively open with respect to Y iff E = V ∩ Y for some V ⊆ X which is
open.

## 2. E is relatively closed with respect to Y iff E = K ∩ Y for some set K ⊆ X which

is closed.
Proof. Suppose E is relatively open (→). Let
[
V = {B(x, r) : x ∈ E, r > 0, B(x, r) ⊆ E}

Clearly V is open (union of open sets is open, ball is open: look previous theorems).
Now we need to show E = V ∩ Y .
Clearly E ⊆ V ∩ Y .
Suppose x ∈ V ∩ Y . This means ∃ x0 ∈ E, r > 0 : x ∈ B(x0 , r).
But B(x0 , r) ⊆ E. Therefore x0 ∈ E.
Suppose E = V ∩ Y where V is open (←). Let x ∈ E. This means x ∈ V . Therefore
there exists BX,d (x, r) ⊆ V . But then BY,d|y×y (x, r) ⊆ E which means x ∈ int(E).
Therefore E = int(E): E is open in (Y, d).

## Suppose E is relatively closed in Y (→). Let

[
V = {x : ∃ xn : lim xn ∈ E ∧ ∃ i : xi = x}
n→∞

66
in other words: V is set containing elements of every converging sequence in E. V must
be closed because every adherent point is contained in V . Now lets show E = V ∩ Y .
Let x ∈ E since E is closed in Y there must exists sequence xn ∈ E such that
limn→∞ xn = x. But then x ∈ V . Suppose x ∈ V ∩ Y . Since x ∈ V there must
exists sequence of elements in E such that X is a part of it. Therefore x ∈ E.
Suppose E = Y ∩ V where V is closed (←).
First we will show ∂E ⊆ ∂V . Suppose x ∈ ∂E. This means
∀ r : B(x, r) ∩ E 6= ∅ ∧ ∃ x0 ∈ B(x, r) : x0 6∈ E
We have
x0 ∈ Y ∧ x0 6∈ E =⇒ x0 6∈ V
E ⊆ V =⇒ B(x, r) ∩ V 6= ∅
Therefore x ∈ ∂V . But ∂V ∩ Y = ∂E, which means ∂E ⊆ E. E is closed.
Definition 94. Sub-sequence
Let f : N → Z be function such that f (i) ≥ i. Then
 ∞
x(f (n))
n=m

is a sub-sequence of xn .
Theorem 135. Convergence of sequence implies convergent of all sub-sequences
Suppose xn converges to some x0 . Then all sub-sequences of xn also do.
Proof. Let yn be sub-sequence of xn .
Let ε > 0.
We know that
∃ N : ∀ i > N : d(xi , x0 ) < ε
But f (i) ≥ i therefore taking N gives as
∀ i > N : d(xf (i) = yi , x0 ) ≤ d(xi , x0 ) < ε

## Definition 95. Limit points

Suppose xn is a sequence in some metric space (X, d). Let L ∈ X. We say that L is a
limit point of xn if
∀ ε > 0 : ∀ N ≥ m : ∃ i ≥ N : d(xi , L) < ε
Theorem 136. Suppose xn is a sequence in (X, d) and L ∈ X. Then L is a limit point
of xn iff there exists sub-sequence convergent to L.
Proof. Suppose there exists such sub-sequence ←.
Let ε > 0, and N ≥ m. We know:
∀ ε > 0 : ∃ N geqm : ∀ i > N : d(xf (i) , L) < ε
Therefore ∃ i > N : d(xf (i) , L) < ε.
Suppose L is a limit point. We can construct a sub-sequence by taking elements such
that
1
d(yi , L) <
i
Clearly limn→∞ d(yn , L) = 0.
We can always choose yi because its guaranteed that we can find j ≥ N : d(xj , L) < 1i .

67
Definition 96. Cauchy sequence
Let (X, d) be a metric space and xn be a sequence in X. Then xn is cauchy iff

∀ ε : ∃ N : ∀ i, j ≥ N : d(xi , xj ) < ε

Remark 32. Its quite funny: cauchy sequences don’t necessary converge √ in metric
spaces. Suppose we have a sequence of rationals than converge to 2. Clearly this
sequence exists and if we take (Q, dl2 ) as our metric space this sequence can’t converge.
Theorem 137. Suppose (X, d) is a metric space and xn is a Cauchy sequence in X. If
there exists convergent sub-sequence of xn then xn must converge as well.
Proof. Let yn be sub-sequence convergent to x0 .
Let ε > 0.
ε
∃ N0 : ∀ i ≥ N0 : d(x(f (i)) , x0 ) <
2
ε
∃ N1 : ∀ i ≥ N1 : d(x(f (i)) , xi ) <
2
Let N := max(N0 , N1 ), then for every i ≥ N we have

d(xi , x0 ) < ε

## Definition 97. Complete metric space

We call metric space complete if every Cauchy sequence in that metric space converges.
Theorem 138. Convergent sequence are Cauchy
Let (X, d) be metric space. Suppose xn is a sequence in X and limn→∞ d(xn , x0 ) = 0
for some x0 ∈ X. Then xn is Cauchy.
Proof. Let ε > 0. We can choose N such that for all i, j > N
ε
d(xi , x0 ) <
2
ε
d(xj , x0 ) <
2
Triangle inequality

d(xi , xj ) < ε

## It follows that every convergent sequence in metric space is Cauchy.

Theorem 139. Let (X, d) be a metric space and let Y ⊆ X. Then (Y, d) is complete
iff Y is closed.
Proof. Suppose (Y, d) is complete and Y is not closed. It would mean that there exists
sequence xn in Y such that limn→∞ xn ∈ Y ∧ limn→∞ xn 6∈ Y . But then xn both
converges in Y and diverges Y (look previous theorem). Contradiction.
Suppose Y is closed. Let xn be Cauchy sequence. Suppose it diverges. Then

## ∀ x ∈ Y : ∃ ε > 0 : ∀ N : ∃ i : d(xi , x) > ε

This means
∀ x ∈ Y : ∃ x0 : x0 ∈ B(xi , d(xi , x)) ∧ x0 6∈ Y
But then xi ∈ ∂Y ∧ xi 6∈ Y which implies Y is not closed. Contradiction.

68
Theorem 140. Extending metric space to complete metric space
Given xn we introduce formal limit LIM xn . We say that two limits are equal:

n→∞

## Showing that this definition is sound is easy.

Let X be a space of all formal limits of Cauchy sequences in X with the above
equality. Suppose we have (X, dX ) where

n→∞

## I skip showing that this function is well-defined. We have:

1. Metric space above is complete.
2. We identify x with the corresponding formal limit LIM x. This means (X, d) is a
subspace of (X, d|X ). Show d(x, y) = dX (xn , yn )

## 3. Show that closure of X in X is X

4. Show that formal limit agrees with the actual limit. That is

lim xn = LIM xn
n→∞

## Proof. Rather informal treatment.

1. It follows from point 3.

## 2. limn→∞ d|X (xn , yn ) = d(limn→∞ xn , limn→∞ yn ) = d(x, y)

3. Every convergent limit is Cauchy therefore all adherent points of X must be in X.
4. Suppose limn→∞ xn = x0 . It quickly follows: LIM x0 = LIM xn .

## Definition 98. Compactness

A metric space (X, d) is said to be compact if every sequence in it has at least one
convergent sub-sequence. A subset Y is set to be compact if Y, d|Y ×Y is compact.

69