\documentclass[../main_text.tex]{subfiles}
\begin{document}

\section{Assignment 2}

\exercise*[1.1.1]
\begin{tcolorbox}
    Let $F$ be an ordered field and $x,y,z \in F$. If $x < 0$ and $y < z$, then $xy > xz$.
\end{tcolorbox}

So let's assume the premise. $F$ is an ordered field and $x,y,z \in F$,
and we choose $x,y$ and $z$ such that $x < 0$ and $y < z$.

From $x < 0$ it follows that $(-x) > 0$. From $y < z$ it follows that $0 < z - y$.
From both of these, we can conclude that $0 < (-x)(z-y)$.
Working out the right side with the distributive law, gives $0 < (-x*z)-(-x*y)$.
Using $-1*-1 = 1$, gives $0 < (-xz)-(-xy)$, thus $0 < xy - xz$. The right part can be split again: $xz < xy$.
Then, the < can be flipped, which gives $xy > xz$. \qed

\exercise[1.1.2]
\begin{tcolorbox}
    Let $S$ be an ordered set. Let $A \subset S$ be a non-empty finite subset. Then A is bounded. Furthermore,
    $\text{inf} A$ exists and in in $A$ and $\sup A$ exists and is in $A$.
\end{tcolorbox}

In order to prove that $A$ is bounded, we have to prove that it has an upper and a lower bound. Let us prove
that $A$ is bounded above first. 

In particular, we have to prove that $\exists a \in A$ such that $x \leq b$ for all $x \in E$.
Since $A$ is non-empty and finite, we can use induction on the cardinality of $A$, since that will always
be some natural number $n$. So, we have to prove two cases: the base case, where $|A|=1$, and the inductive step,
where we will assume that when $A$ has an upper bound when it has cardinality $m$,
then it also has an upper bound when its cardinality is equal to $m+1$.

The base case is quite simple; if $A = \{x\}$, then $x$ is the greatest element and $A$ has an upper bound.
Now for the inductive step. We assume that for some set $B \subset S$ with cardinality $m$,
$B$ is bounded above. Thus, there is some $b \in B$ such that $b$ is greater than all other
elements in $B$. Now, let's add a new element $h \in S$ to $B$, such that $h$ is distinct from all elements already in
$B$ and the cardinality of $B$ is now $m+1$. Then, since $S$ is well ordered, we can compare $h$ also to $b$.
Either $h$ is greater than this $b$, in which case $h$ is the new greatest element, or it is less than $b$, in which
case $b$ stays the greatest element of $B$. In both cases however, $B$ remains bounded above. \qed

A similar argument can be made to prove the existence of the lower bound, the supremum of $A$ in $A$ and the infimum
of $A$ in $A$ \footnote{It might even be that I have already proven that $A$ has a supremum present in $A$.
Then that's also good enough to show that $A$ is bounded, since in order for $A$ to have a supremum,
it must also be bounded.}. This will be left to the reader.

\exercise[1.1.5]
\begin{tcolorbox}
    Let $S$ be an ordered set. Let $A \subset S$ and suppose $b$ is an upper bound for $A$. Suppose $b \in A$.
    Show that $b = \sup A$.
\end{tcolorbox}

So, let $S$ be an ordered set, with $A \subset S$ and $b \in A$ being an upper bound for $A$. Since $b$ is an upper
bound, $a \leq b$ for all $a \in A$. Since $b \in A$ as well, we know that there is some element in $A$ which is
the greatest element of them all, and all other elements are smaller. 

Now let's assume that $b \neq \sup A$. Then either some other element of $A$ is the supremum,
which would imply that $b$ is not larger than this element, which is a contradiction.
The other possibility is that there is an element $c \in S\backslash A$ that is the
supremum. Because $S$ is ordered, $c$ must either be greater than, smaller than or equal to $b$. If $c < b$, c is 
not an upper bound of $A$ and thus also not its supremum. If $c > b$, then $b$ is an upper bound that is smaller than
$c$ and therefore $c$ cannot be the supremum. The only option left is that $c=b$, and therefore $b = \sup A$.
\qed

\exercise[1.1.6]
\begin{tcolorbox}
    Let $S$ be an ordered set. Let $A \subset S$ be nonempty and bounded above. Suppose $\sup A$ exists
    and $\sup A \notin A$. Show that $A$ contains a countably infinite subset.
\end{tcolorbox}

Let $S$ be an ordered set, with $A \subset S$ nonempty and bounded above. We assume that $b = \sup A$ exists and
$b \notin A$ $(\implies b \in S\backslash A)$. We are asked to show this then implies that $\exists X \subset A$
such that $|X| \geq |\N|$. We will prove this with a proof by contradiction.

We assume that no such set $X$ exists, i.e. $|X| < |\N|$. So, $A$ also doesn't have to countably infinite anymore.
Since $b \notin A$ and $A$ is ordered, finite and nonempty, there is a greatest element $a \in A$ such that
$a < b$ and $x < a $ $\forall x \in A$. So $b$ is in fact not the least upper bound of $A$,
which is in contradiction with our assumption earlier. Ergo, $|X| \geq |\N|$. Since $X$ then is at least of the same
cardinality as $\N$, it must also contain a countably infinite subset. \qed

\exercise[1.2.7]
\begin{tcolorbox}
    Prove the arithmetic-geometric mean inequality. That is, for two positive real numbers $x, y$, we have
    \begin{equation*}
        \sqrt{xy} \leq \frac{x + y}{2}.
    \end{equation*}
    Furthermore, equality occurs if and only if $x = y$.
\end{tcolorbox}

Let us prove the first statement first. So we let $x,y \in \R$ such that $x,y > 0$. Then we will prove the statement
by contradiction. Hence, we assume that
\begin{equation*}
    \sqrt{xy} > \frac{x + y}{2}.
\end{equation*}

We can multiply both sides with 2. This results in $2\sqrt{xy} > x + y$. We can pull the left part into the right,
so we get $0 > x - 2\sqrt{xy} + y$. We can restructure the right side to $0 > (\sqrt{x} - \sqrt{y})^2$.
We know that $0 \leq z^2$, $\forall z \in \R$, so this is a contradiction. \qed

Now to prove the second statement. We assume $x = y$ is a positive real number. Then,
\begin{equation*}
    \sqrt{xy}=\sqrt{x^2}=x=\frac{2x}{2}=\frac{x + y}{2}. \qed
\end{equation*}

\exercise[1.2.9]
\begin{tcolorbox}
    Let $A$ and $B$ be two nonempty bounded sets of real numbers. Define the set $C := \{a + b : a \in A,
    b \in B\}$. Show that $C$ is a bounded set and that
    \begin{align*}
        \sup C &= \sup A+\sup B \; \text{and}\\
        \inf C &= \inf A+\inf B.
    \end{align*}
\end{tcolorbox}

First, let us show that $C$ is a bounded set. Since $A$ and $B$ are both subsets of $\R$, which is an ordered field, 
all elements of $C$ must also be real numbers. Let $a$ be an upper bound for $A$ and $b$ be an upper bound for $B$.
So $x \leq a \; \forall x \in A$ and $y \leq b \; \forall y \in B$. Since $C$ is defined as the sum of any element in
$A$ with any element in $B$, an upper bound of $C$, $c$, can be found as $c \leq a + b$. A similar argument can be
made for the lower bound of $C$, which makes $C$ bounded. \qed

To prove that $\sup C = \sup A + \sup B$, we will show that $\sup C \geq \sup A + \sup B$ and
$\sup C \leq \sup A + \sup B$. 

Let $a = \sup A$ and $b = \sup B$. So $x \leq a$ for all $x \in A$ and $y \leq b$ for all $y \in B$. Then,
$x + y \leq a + b$. Since $z \leq x + y$ for all $z \in C$ because of the definition of $C$,
$z \leq a + b$. In other words, $\sup C \leq \sup A + \sup B$.

Now to prove the other direction. Let $c = \sup C$. So $z \leq c$ for all $c \in C$. Since all elements in $C$ are
the sum of an element $x \in A$ and $y \in B$, $x + y \leq c$ for all $x,y$. The least upper bound for these $x$ and
$y$ can be given by the supremum; $x \leq \sup A$ and $y \leq \sup B$. So, $\sup A + \sup B \leq c \implies
\sup A + \sup B \leq \sup C$, completing the equality. \qed

A similar argument can be given for the infimum, which is left to the reader.

\exercise[7]
\begin{tcolorbox}
    Let
    \begin{equation*}
        E = \{ x \in \R : x > 0 \; \text{and} \; x^3 < 2\}.
    \end{equation*}

    \begin{enumerate}[label=\emph{\alph*)}]
        \item Prove that $E$ is bounded above.
        \item Let $r = \sup E$ (which exists by part a)). Prove that $r > 0$ and $r^3=2$.

            \textit{Hint:} Adapt the proof used in Example 1.2.3.
    \end{enumerate}
\end{tcolorbox}

So, let $E$ and $r$ be defined as in the exercise statement. Then:
\begin{enumerate}[label=\emph{\alph*)}]
    \item $x \leq 2$ is an upper bound for $E$, as $2 * 2 * 2 = 8$. So, $E$ is bounded above.
    \item As $1 \in E$, $r \geq 1 > 0$, so the first part of the statement holds. In order to show that $r^3=2$,
        we want to show that $r^3 \leq 2$ and $r^3 \geq 2$ hold.

        First, let's show that $r^3 \geq 2$. We will take a similar approach as in Example 1.2.3 from the textbook.
        So, take a positive number $s$ such that $s^3 < 2$. We wish to find an $h > 0$ such that $(s + h)^3 < 2$.
        As $2 - s^3 > 0$, we have $\frac{2 - s^3}{3s^2 + 3s + 1} > 0$. Choose an $h \in \R$ such that $0 < h <
        \frac{2 - s^3}{3s^2+3s+1}$. Furthermore, assume $h < 1$. Estimate,
        
        \begin{align*}
            (s+h)^3 - s^3 &= h(3s^2 + 3sh + h^2) \\
                          &< h(3s^2 + 3s + 1) \quad &\text{(since } h < 1) \\
                          &< 2 - s^3 \quad &\text{(since } h < \frac{2 - s^3}{3s^2 + 3s + 1}).
        \end{align*}

        Therefore, $(s+h)^3 < 2$. Hence $s + h \in E$, but as $h > 0$, we have $s + h > s$. So $s < r = \sup E$.
        As $s$ was an arbitrary positive number such that $s^3 < 2$, it follows that $r^3 \geq 2$.

        Now take an arbitrary positive number $s$ such that $s^3 > 2$. We wish to find an $h > 0$ such that 
        $(s-h)^3 > 2$ and $s - h$ is still positive. As $s^3 - 2 > 0$, we have that $\frac{s^3 - 2}{3s^2+1} > 0$.
        Let $h := \frac{s^3-2}{3s^2+1}$, and check that $s - h = s - \frac{s^3-2}{3s^2+1} = 
        \frac{2s^3+s+2}{3s^2+1} > 0$. Assume that $h < 1$. Estimate,

        \begin{align*}
            s^3 - (s-h)^3 &= h(3s^2 - 3sh + h^2) \\
                          &< h(3s^2+h^2) \quad &\text{(since } s>0 \; \text{ and } h > 0) \\
                          &< h(3s^2+1) \quad &\text{(since } h < 1) \\
                          &= s^3 - 2 &\text{(because of the definition of } h).
        \end{align*}

        By subtracting $s^3$ from both sides and multiplying by -1, we find $(s-h)^3>2$. Therefore, $s-h \notin E$.
        Moreover, if $x \geq s-h$, then $x^3 \geq (s-h)^3 > 2$ (as $x > 0$ and $s-h > 0$) and so $x \notin E$. Thus,
        $s - h$ is an upper bound for $E$. However, $s-h < s$, or in other words, $s > r = \sup E$. 
        Hence, $r^3 \leq 2$.

        Together, $r^3 \geq 2$ and $r^3 \leq 2$ imply $r^3 = 3$. \qed
\end{enumerate}
\end{document}
