\part{Fundamentals}




\chapter{Real numbers}


Mathematical analysis refers to the study of functions, particularly continuous, differentiable and integrable ones. We will start our journey through analyis by focusing on real functions; functions that map real numbers to real numbers. Readers are already be familiar with such functions, and they are the basic building blocks of more advanced functions (for instance, complex or vector function), so this is the ideal topic for the beginner of analysis.


Along the way we will make a rigorous construction of calculus, and learn how to use the results of calculus to prove deeper theorems.

Many ideas that will be discussed in this book can be generalized by studying topology, and indeed this book serves as a strong precursor to many ideas arising in topology.

Before even looking at functions, we will develop a deeper insight of the properties that characterize the real numbers. We are already familiar with how algebra and how ordering works on the real numbers, but we will also need to appeal to more properties that although kind of obvious, we may not be used to applying.










\section{Dedekind completeness of the real numbers}

This property distinguishes the reals from the rationals and integers, and is so powerful because it automatically implies that the real numbers are \emph{Dedekind complete}. To understand what this term means and defining the real numbers, we require some concepts from order theory.





Sets of real numbers may have upper bounds; a real number greater than any number in the set. They may possibly have lower bounds, defined similarly

\begin{definition}[Bounded set]
A set is bounded above if there is some vlaue larger than every element of the set. It is bounded below if there is some value smaller than every element of the set. A \emph{bounded set} is a set bounded above and below.
\[ M  \text{ is an upper bound of } U \iff \forall u\in U [M \geq u ] \]
\[ U \text{ is bounded above } \iff \exists M [  M \text{ is an upper bound of } U ]  \]

\[ M \text{ is a lower bound of } U \iff \forall u\in U [M \leq u ] \]
\[ U \text{ is bounded below } \iff \exists M [  M \text{ is a lower bound of } U ]  \]
\end{definition}

\begin{definition}[Supremum of real subset]
Let $U$ be a subset of \mathbb{R} bounded above. The \emph{supremum} of a set $U$ is the smallest upper bound of $U$.
	\[ \sup U = \min \{ M : M \text{ is a lower bound of } U \} \]
\end{definition}

\begin{definition}[Infimum of real subset]
Let $U$ be a subset of \mathbb{R} bounded below. The \emph{infimum} of a set $U$ is the largest lower bound of $U$.
	\[ \inf U = \max\{ M : M \text{ is an upper bound of } U \} \]
\end{definition}




The total order of real numbers also follows the least upper bound property, which states that every real subset that is bounded above has a \emph{supremum} and sets bounded below have an \emph{infimum}.

\begin{definition}[Least upper bound property for the standard total order of real numbers]
\[ U \text{ is bounded above } \implies  \exists k \in \mathbb{R} [ k = \sup U ] \]
\end{definition}





\begin{definition}[Real number]
A \emph{real number} is a number that can be represented as the supremum of some bounded set of rational numbers $S \subset \mathbb{Q}$. The set of real numbers is denoted as $\mathbb{R}$.
\[x \in \mathbb{R} \iff \exists S \subset \mathbb{Q} \exists x=\mathrm{sup}(S)\]
\[ \mathbb{R} = \{ \sup(S) : S \subset \mathbb{Q} \]
%Formally, it is the completion of $\mathbb{Q}$; a real number is a number such that there exists a rational sequence converging to it.
Real numbers can formally be represented as the equivalence class of all rational bounded sets that have the same supremum.
\end{definition}




We are informally familiar with real numbers as the rational and 'irrational' numbers; How does this definition of a real number include all the irrational numbers? Consider the following bounded set, with the pattern continuing in the obvious way.
\[S = \{3,3.1,3.14,3.141,\cdot \}\]

We have $\mathrm{sup}(S)=\pi$. Consider another example.
\[T = \{x \in \mathbb{Q} : x^2 \leq 2\}\]

We have $\mathrm{sup}(T)=\sqrt{2}$. Indeed, by picking the right rational set we can realize any real number as a supremum!

Once we have considered all supremums of each bounded rational set, we end up with the rational and irrational numbers; now the supremum of any real set will be some number in $\mathbb{R}$. This property is known as \emph{dedekind completeness} or \emph{the least upper bound property}; the algebraic laws of real numbers, ordering laws of real numbers, and dedekind completness of real numbers is enough to completely define real numbers.



Although there are other equivalent ways one can define the real numbers, they require the notion of convergent sequences, which we haven't covered yet. The idea of a supremum is much simpler to introduce and build only on our understanding of ordering of the real numbers, hence why Dedekind completeness is a neat way to define real numbers swiftly.


- Axiomatically assuming Dedekind completeness
- Axiomatically assuming the Bolzano-Weierstrass theorem 
- Axiomatically assuming the Intermediate value theorem 
- Axiomatically assuming Cauchy completeness and Archimedian property


All these approaches, save the first, require some notion of convergence.


%$(\mathbb{R},+,\cdot,\leq)$ is a totally ordered, Dedekind complete field.
%$(\mathbb{R},| \cdot |)$ is a complete metric space.




%- Preservation of order under addition
%- Preservation of order under multiplication
%- Order is complete (Least upper bound property)




\section{Archimedean property of the real numbers}



The Dedekind completeness of the real numbers is powerful indeed, and it will be a vital tool when studying convergent real sequences and limits of real functions. Before we study such concepts, we can realize more ordering properties of the reals.

%Using the Dedekind completeness of the real numbers, we can prove the archimedian property of the real numbers!


\begin{proposition}[The Archimedian property for of real numbers]
\[ \forall \varepsilon \in \mathbb{R} [ \varepsilon >0 \implies \exists n \in \mathbb{N} ( \frac{1}{n} < \varepsilon ) ]\]
\end{proposition}



This essentially means that there are no 'infinitesimals' in the real numbers, or equivalently (by considering $n > \frac{1}{\varepsilon}$), there are no infinite values. The Archimedean property is obeyed by the rational numbers as well.








\section{Standard metric on the real numbers}

We have some intuitive sense of how 'far apart' numbers are; 5 and 9 have a distance of 4, -11 and 2 have a distance of 13 etc. The function $d(x,y)=|x-y|$ is the natural way to handle intuitions.

The real function $d(x,y)=|x-y|$ will frequently appear in our study of real analysis. On may see that this essentially gives a way of saying how far apart 2 real numbers are; this is an example of a \emph{metric}. In topology, a metric is a function $d : X^2 \to [0,\infty)$ that obeys the following.

\[d(x,y)=0 \iff x=y\]
\[d(x,y)=d(y,x)\]
\[d(x,z) \leq d(x,y)+d(y,z)\]

We use algebra on the real numbers to show that $|x-y|$ is indeed a metric. One of the 






\subsection{Triangle inequality}

The Euclidean topology can be equipped with the \emph{Euclidean metric} $(\mathbb{R},d)$, where we use the function $d$ to define the distance between any pair of real numbers. The Euclidean metric on $\mathbb{R}$ defines distance as $d(x.y)=|x-y|$; the result of this function gives a number that states how 'far away' two real numbers are.

As with all distance functions, our distance function satisfies the \emph{triangle inequality}.
\begin{proposition}[The triangle inequality for the Euclidean metric of one dimension]
\[\forall x, y \in \mathbb{R} [ |x+y| \leq |x|+|y| ]   \]
\end{proposition}

This property is the reason why real analysis is possible in the first place. It seems like a simple statement, but we will depend on this fact relentlessly.


\subsection{Open intervals}

A 'topological space' deals all about what sets we call 'open'. In the case of this book, we deal with \emph{Euclidean topology} (\mathbb{R},\mathcal{T}); the open sets of $\mathbb{R}$ are the open intervals, and unions of open intervals (even infinite unions of open intervals). The reason for this definition requires a bit more understanding of general topology, but for now, it's intuitive enough that we can accept it. 

Neighborhoods of $p$ are open sets containing $p$; this idea will return to us along our journey. When restricted to our Euclidean topology on $\mathbb{R}$, we can think of neighborhoods of $p$ as open sets which include at least one open interval containing $p$. The term 'neighborhood' can be thought of here as elements that are 'neighbors' of $p$ since they 'live' in the same open set; they're 'close' in the sense that they're next door neighbors in this open set.

More noteworthy for our purposes however, this topological space is metrizable (i.e we can define what 'distance' means) in the following way.





\begin{definition}[Open interval]
\[B(p,r) = (p-r,p+r)\]
\end{definition}

