Compare commits

...

31 Commits

Author SHA1 Message Date
0366eb95af Week 4 exercise 2 done by referring to earlier exercises 2025-07-28 15:01:56 +02:00
1eea13699f Merge branch 'master' into assignment4 2024-05-05 00:20:20 +02:00
6fbf6273ea pdf build files are now obsolete because of my ci cd pipeline :)
All checks were successful
gitea/real_analysis/pipeline/head This commit looks good
2024-05-05 00:16:52 +02:00
deaaaa276b Unnecessary sudo
All checks were successful
gitea/real_analysis/pipeline/head This commit looks good
2024-05-05 00:12:09 +02:00
549af36a07 Added deploy and updated the readme accordingly
Some checks failed
gitea/real_analysis/pipeline/head There was a failure building this commit
2024-05-05 00:01:08 +02:00
ce4daadd49 Made latex build quietly
All checks were successful
gitea/real_analysis/pipeline/head This commit looks good
2024-05-04 11:42:00 +02:00
8d19df9d53 Finally fixed pdf build script? 2024-05-04 01:48:58 +02:00
a28e184552 dpkg was not installed, flips table 2024-04-30 15:00:01 +02:00
9c83a5bb32 Just the ampersand, without the redirection? 2024-04-30 14:58:10 +02:00
2eda317dd7 Ampersand as last parameter might fix the redirect? 2024-04-30 14:55:43 +02:00
f7000b4b84 Another double quote on variable name 2024-04-30 14:53:13 +02:00
be946462f5 Variables in quotes 2024-04-30 14:51:07 +02:00
b089017f69 Forwarding error to std output in bash script now 2024-04-30 14:48:01 +02:00
9cc3641238 Made build script executable 2024-04-23 11:47:27 +02:00
f31117d87e Merge branch 'master' into assignment4 2024-04-23 11:42:53 +02:00
ffca46746b Need more steps in a stage than none 2024-04-22 17:06:12 +02:00
b043b7df22 Oh wat heb ik een hekel aan jenkinsfiles nu al 2024-04-22 17:04:04 +02:00
d1f3983799 Agent is a directive, doesn't have curly braces... 2024-04-22 17:02:08 +02:00
929978fa87 Update Jenkinsfile 2024-04-22 14:58:34 +00:00
27517d7419 First try with Jenkinsfile, hope for the best 2024-04-22 16:57:11 +02:00
a439b45d2c First try with Jenkinsfile, hope for the best 2024-04-22 16:53:16 +02:00
6e76c14c70 Progress on assignment 4, first ones were amalgamations of earlier exercises 2023-06-15 17:03:22 +02:00
78acee31ef Started on assignment 4 2023-06-09 16:50:40 +02:00
Philippe Zwietering
bda0c77b5e Merge pull request 'Finished assignment 3' (#14) from assignment3 into master
Reviewed-on: #14
2023-06-09 10:57:59 +02:00
8d53e6e409 Finished assignment 3, pretty pleased with the results actually, didn't think I would make it this far 2023-06-09 10:48:40 +02:00
db44eae2be Finished exercise 6 from week 3, just a few to go 2023-06-06 20:49:45 +02:00
5930d51114 Finished part of exercise 5, getting more comfortable with these kinds of proofs now 2023-06-02 17:00:19 +02:00
1639753ec0 Finished exercise 4 of week 3 and quite satisfied with it 2023-06-01 23:51:07 +02:00
d708244e55 WIP on exercise 4, very close 2023-05-30 17:05:42 +02:00
6fcd7eca69 Finished first exercise of assignment 3 and did some refactoring on numbering etc 2023-05-26 16:54:00 +02:00
8c0d80b19e Empty start on assignment 3 2023-05-25 17:12:02 +02:00
12 changed files with 380 additions and 11 deletions

20
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,20 @@
pipeline {
agent {label 'linux'}
stages {
stage('Build') {
steps {
echo 'Starting build step...'
sh './scripts/build.sh'
}
}
// Testing latex isn't really a thing, but we could do basic sanity checks in the future?
stage('Deploy') {
steps{
echo 'Starting deploy step...'
sh 'cp assignments/main_text.pdf /var/www/zwietering.eu/pdfs/real_analysis.pdf'
}
}
}
}

View File

@@ -4,4 +4,6 @@ Exercises and maybe (just maybe, like, very probably not) lecture notes on the R
[Course link](https://ocw.mit.edu/courses/18-100a-real-analysis-fall-2020/)
The text book is included in the directory root. The `.tex` files can be compiled individually in the corresponding subdirectories or collectively from the assignments directory. I use `pdflatex` with texlive on Arch (through WSL2, [check this guide](https://gist.github.com/ld100/3376435a4bb62ca0906b0cff9de4f94b) on how to do this (why use Ubuntu if you're only going to use the CLI right?)).
The text book is included in the directory root. The `.tex` files can be compiled individually in the corresponding subdirectories or collectively from the assignments directory. I use `pdflatex` with texlive on Arch (through WSL2, [check this guide](https://gist.github.com/ld100/3376435a4bb62ca0906b0cff9de4f94b) on how to do this (why use Ubuntu if you're only going to use the CLI right?)).
The complete generated PDF file can be downloaded from [this address](https://zwietering.eu/pdfs/real_analysis.pdf).

Binary file not shown.

View File

@@ -1,6 +1,5 @@
\documentclass{template/homework}
\setcounter{secnumdepth}{0} % Makes sections unnumbered
\usepackage{enumitem} % Gives access to better enumeration items
\usepackage{tcolorbox} % Gives boxes
\usepackage{subfiles} % Makes subfiles easier (and you want those)
@@ -16,4 +15,8 @@
\subfile{week1/main.tex}
\clearpage
\subfile{week2/main.tex}
\clearpage
\subfile{week3/main.tex}
\clearpage
\subfile{week4/main.tex}
\end{document}

Binary file not shown.

View File

@@ -1,7 +1,8 @@
\documentclass[../main_text.tex]{subfiles}
\begin{document}
\setcounter{exercise}{0}
\section{Week 1}
\part{Assignment 1}
\exercise*[0.3.6]
% For some reason I can't put a fitted tcbox here and I really don't like it
@@ -132,7 +133,7 @@ So each set $A_i := \{i\} \forall i \in \N$. Since $\N$ is countably infinite,
Each set is definitely finite, because they all contain just one element.
Finally, the union of the collection of sets is equal to $\N$, which is not a finite set.
\exercise*[6]
\exercise*
\begin{tcolorbox}
\begin{enumerate}[label=\emph{\alph*)}, wide]
\item Compute $f(4/15)$. Find $q$ such that $f(q) = 108$.

Binary file not shown.

View File

@@ -1,7 +1,8 @@
\documentclass[../main_text.tex]{subfiles}
\begin{document}
\setcounter{exercise}{0}
\section{Week 2}
\part{Assignment 2}
\exercise*[1.1.1]
\begin{tcolorbox}
@@ -17,7 +18,7 @@ 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]
\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$.
@@ -45,7 +46,7 @@ of $A$ in $A$ \footnote{It might even be that I have already proven that $A$ has
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]
\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$.
@@ -63,7 +64,7 @@ not an upper bound of $A$ and thus also not its supremum. If $c > b$, then $b$ i
$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]
\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.
@@ -79,7 +80,7 @@ $a < b$ and $x < a $ $\forall x \in A$. So $b$ is in fact not the least upper bo
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]
\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*}
@@ -103,7 +104,7 @@ Now to prove the second statement. We assume $x = y$ is a positive real number.
\sqrt{xy}=\sqrt{x^2}=x=\frac{2x}{2}=\frac{x + y}{2}. \qed
\end{equation*}
\exercise[1.2.9]
\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
@@ -133,7 +134,7 @@ $y$ can be given by the supremum; $x \leq \sup A$ and $y \leq \sup B$. So, $\sup
A similar argument can be given for the infimum, which is left to the reader.
\exercise*[7]
\exercise*
\begin{tcolorbox}
Let
\begin{equation*}

234
assignments/week3/main.tex Normal file
View File

@@ -0,0 +1,234 @@
\documentclass[../main_text.tex]{subfiles}
\begin{document}
\setcounter{exercise}{0}
\part{Assignment 3}
\exercise*
\begin{tcolorbox}
Suppose $x,y \in \R$ and $x < y$. Prove that there exists $i \in \R\backslash\Q$ such that $x < i < y$.
\end{tcolorbox}
If either $x$ or $y$ (or both) are not rational numbers, we can simply take the average like so: $\frac{x+y}{2}$,
in a similar way we did for the rationals. Since $x$ or $y$ isn't rational, the resulting fraction will also not be
a rational and this proves the statement.
Now if $x,y \in \Q$, we cannot use this average trick, because the resulting fraction will be a rational itself and
so it doesn't satisfy the restriction that it must be in $\R\backslash\Q$. So we have to take a different approach.
Let $x,y \in \Q$ with $x < y$ and $m := \frac{x+y}{2}$, so $x < m < y$. Then, let $X = \{a \in \R : x < a < m\}$ and
let $Y = \{b \in \R : m < b < y\}$. Since $x < m$ and $m < y$, these are nonempty and they are bounded, because
of the restrictions $x < a < m$ and $m < b < y$. So, there exists $k \in X$, that is not rational such that
$x < k < m$ and there exists $h \in Y$ that is not rational such that $m < h < y$. Pick either $k$ or $h$ as $i$,
since $x < k < m < h < y$. \qed
\exercise*
\begin{tcolorbox}
Let $E \subset (0,1)$ be the set of all real numbers with decimal representation using only the digits 1 and 2:
\begin{equation*}
E := \{x \in (0,1) : \forall j \in \N, \exists d_j \in \{1,2\} \text{ such that } x = 0.d_1d_2...\}
\end{equation*}
Prove that $|E| = |\mathcal{P}(\N)|$.
\end{tcolorbox}
As a hint to this exercise: \textit{Consider the function $f : E \rightarrow \mathcal{P}(\N)$ such that if $x \in E,
x = 0.d_1d_2...$,
\begin{equation*}
f(x) = \{j \in \N : d_j = 2\}.
\end{equation*}}
In order to prove that 2 sets are of equal cardinality, we need to prove that there is a bijective function between
the 2 sets. In this case, the aforementioned hint function does the trick. Non-formally speaking, it is exactly what
we are looking for: it is a (weird) representation of the power set of natural numbers, in that for every decimal,
represented by a natural number, it is decided if that decimal is a 2 or a 1. This is similar to the actual power set
of the natural numbers, in which for every natural number it is decided whether the number is in a subset or not.
Now for a formal proof. To show that $f$ is bijective, we need to show that it is surjective and injective.
\begin{description}
\item[Injectivity of $f$] In order to show that $f$ is injective, we have to show that for every $x \in E$, there
is a unique $y \in \mathcal{P}(\N)$ for the function, by showing that $f(a) = f(b) \implies a = b$.
So, let's assume that for some $a,b \in E$, $f(a) = f(b)$. So, there two sets of natural numbers
$\{a_1,a_2,...,a_n\} = \{b_1,b_2,...,b_m\}$. Equality in sets means that every element that is present in the
one set, is present in the other, and vice versa. No element that is present in either set, is missing in the
other. So, in this case, both sets will represent the same sequence of digits that are 2. Because the only
other option for digits is 1, that means the complete digital representation of $a$ and $b$ are known,
unique and the same. This concludes the proof for injectivity.
\item[Surjectivity of $f$] To prove surjectivity, we need to prove that for any arbitrary $y \in \mathcal{P}(\N)$,
there exists a corresponding $x \in E$ such that $f(x) = y$.
So, take an arbitrary $y = \{y_1, y_2, ... , y_n\}$, where each $y_i \in \N$ and thus $y \in \mathcal{P}(\N)$.
Then, corresponding $x \in E$ can be constructed easily as follows. Take a decimal number $0.d_1d_2...$ and
turn every decimal $d_i$ for which $i \in y$ into a 2, and every other decimal into a 1. Since every decimal
can only be a 1 or 2, this handles every decimal correctly. Also, $f(x)$ will be in $\mathcal{P}(\N)$.
\end{description}
Since, $f$ is 1-to-1 and onto, $f$ is bijective. Then, because there exists a bijective function from
$E$ to $\mathcal{P}(\N)$, $|E| = |\mathcal{P}(\N)|$. \qed
\exercise*
\begin{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item Let $A$ and $B$ be two disjoint, countably infinite sets. Prove that $A \cup B$ is countably infinite.
\item Prove that the set of irrational numbers, $\R\backslash\Q$, is uncountable. You may use the facts
discussed in the lectures that $\R\backslash\Q$ is infinite and $\R$ is uncountable without proof.
\end{enumerate}
\end{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item So let $A$ and $B$ be two disjoint, countably infinite sets. Since these sets are countably infinite,
a bijective function to $\N$ exists for both functions separately. It is then straightforward to map both these
function together to $\Z$ instead, in the following way. Let $f$ be the bijective function such that
$f : A \rightarrow \N$ and let $g$ be the bijective function such that $g : B \rightarrow \N$. Then, we can
define a new function $h : A \cup B \rightarrow \Z$ as
\begin{align*}
h(x) &= f(x) \text{ if } x \in A \\
&= -g(x) \text{ if } x\in B.
\end{align*}
Since $A \cap B = \emptyset$, this function is unambiguously defined. Since $\Z$ is countably infinite,
$A \cup B$ is countably infinite as well. \qed
\item Because of part (a), we know that if we have two disjoint, countably infinite sets and join them, the result
is still countably infinite. The opposite must then also be true: if we have a countably infinite set and
we divide it into two disjoint subsets, both of which are infinite, then they still must be countable.
So then, for $\R\backslash\Q$, we know that $\R$ is uncountably infinite. So when we split it into rational
and irrational subsets, from which we know that $\Q$ is countably infinite, $\R\backslash\Q$ must be at least
and at most uncountably infinite. \qed
\end{enumerate}
\exercise*
\begin{tcolorbox}
Let $A$ be a subset of $\R$ which is bounded above, and let $a_0$ be an upper bound for $A$. Prove that $a_0 =
\sup A$ if and only if for every $\epsilon > 0$, there exists $a \in A$ such that $a_0 - \epsilon < a$.
\end{tcolorbox}
Let $A \subset \R$, with $A$ bounded above by $a_0$.
So, we have to prove the implication both ways. First, let's prove that the implication to the right $(\rightarrow)$.
Assume that $a_0 = \sup A$, so for all $a \in A$, $a \leq a_0$. Also, let $\epsilon > 0$. If $a_0 \in A$,
then we pick $a_0$ as $a$ and get $a_0 - \epsilon < a_0$, which holds $\forall \epsilon > 0$. If $a_0 \notin A$,
then we choose $a$ as the average of $a_0$ and $a_0 - \epsilon$, which is definitely smaller than $a_0$. We are
allowed to pick this as $a$, because we assume without loss of generality that $a \geq \inf A$. Then we get
\begin{align*}
a_0 - \epsilon &< \frac{a_0 + a_0 - \epsilon}{2} \\
&< a_0 - \frac{\epsilon}{2} \implies \\
-\epsilon &< -\frac{\epsilon}{2}.
\end{align*}
Since $\epsilon > 0$, this always holds.
Now for the implication to the left $(\leftarrow)$.
Assume now that the right side is true, i.e. let's assume that $\forall \epsilon > 0$, there exists $a \in A$ such that
$a_0 - \epsilon < a$. Again, let us first investigate the case where $a_0 \in A$. Well certainly still, if $a_0$ is
an upper bound for $A$ and it is also part of the set itself, it must be the supremum\footnote{Proven in
earlier exercise.}.
Then, let's assume that $a_0 \notin A$. Now, for all positive $\epsilon$, we know there exists an $a \in A$
such that $a \neq a_0$ and $a_0 - \epsilon < a$. Let us assume then that this implies that $a_0 \neq \sup A$ and
try to come to a contradiction. So, then there must be some $b = \sup A$, which has as consequence that
$a < b < a_0$, since $b$ is still an uppoer bound of $A$ (and $a_0 \notin A$). Then, since $b > a$, we can pick
$a = b - \epsilon < b$. So, from our initial assumption we get $b - \epsilon < a_0 - \epsilon < b - \epsilon \implies
b < a_0 < b$, which is a false statement. So, $a_0 = \sup A$.
Since the implication holds both ways, the equivalence is proven. \qed
\exercise*
\begin{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item Let $a,b \in \R$ with $a < b$. Prove that the sets $(-\infty, a), (a,b)$ and $(b, \infty)$ are open.
\item Let $\Lambda$ be a set (not necessarily a subset of $\R$), and for each $\lambda \in \Lambda$,
let $U_\lambda \subset \R$. Prove that if $U_\lambda$ is open for all $\lambda \in \Lambda$ then the set
\begin{equation*}
\bigcup_{\lambda \in \Lambda} U_\lambda =
\{x \in \R : \exists \lambda \in \Lambda \text{ such that } x \in U_\lambda\}
\end{equation*}
is open.
\item Let $n \in \N$, and let $U_1,...,U_n \subset \R$. Prove that if $U_1,...,U_n$ are open then the set
\begin{equation*}
\bigcap_{m=1}^n U_m = \{x \in \R : x \in U_m \text{ for all } m = 1,...,n\}
\end{equation*}
is open.
\item Is the set of rationals $\Q \subset \R$ open? Provide a proof to substantiate your claim.
\end{enumerate}
\end{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item Since $\R$ is open, it is clear that $(-\infty, a)$ and $(b, \infty)$ are open to the left and right
respectively as well. Also, their respective right and left side are present in $(a,b)$ as well, so we will
only prove it for this case. The other cases follow logically.
Let $a,b \in \R$ such that $a < b$. We want to show that for all $x \in (a,b)$ there exists $\epsilon > 0$
such that $(x - \epsilon, x + \epsilon) \subset (a,b)$. Since for all $y \in (a,b)$ such that
$x - \epsilon < y < x + \epsilon$ this statement will recursively hold, we only need to prove that there
exists $\epsilon > 0$ such that $a < x - \epsilon$ and $x + \epsilon < b$. Then we can pick a fitting
$\epsilon$ in the following way, depending if $x$ is closer to $a$ or to $b$, formalized as follows.
If $x - a = b - x \implies 2x = b + a \implies x = \frac{b+a}{2}$, then $x$ is precisely between $a$ and $b$
and we can pick $\epsilon$ to be $\frac{b - a}{4}$. Then $x + \epsilon < b$ and $x - \epsilon > a$.
When $x - a < b - x$, then $x$ will be closer to $a$ then to be and $\epsilon$ is bounded more by $x$'s
proximity to $a$ than to $b$, i.e. $\epsilon < x - a$. So we can pick $\epsilon = \frac{x-a}{2} < x - a$.
Then $x - \epsilon = x - \frac{x - a}{2} = \frac{x + a}{2}$. Since $x > a$, $\frac{x + a}{2} > a$. For the
other side, $x + \epsilon = x + \frac{x - a}{2} < x + \frac{b - x}{2} = \frac{x + b}{2} < b$ since $x < b$.
So for both sides, we have shown that there exists an $\epsilon$ such that both
$x - \epsilon, x + \epsilon \in (a,b)$. All elements inbetween $x - \epsilon$ and $x + \epsilon$ will also
definitely be in $(a,b)$.
The argument when $b - x < x - a$ is very similar and will be left to the reader. Then, for all $x \in (a,b)$,
the statement is proven. \qed
\item Non-formally speaking, in this exercise we want to prove that any union of open sets in $\R$ is open itself.
In order to make this formal, we will assume that $U_\lambda$ is open for all $\lambda \in \Lambda$ and
follow the definition as presented.
So, let us assume that $U_\lambda$ is open for all $\lambda \in \Lambda$. This means that for every $x_\lambda
\in U_\lambda$, there exists an $\epsilon > 0$ such that $(x_\lambda - \epsilon, x_\lambda + \epsilon) \subset
U_\lambda$. To prove that $\bigcup_{\lambda \in \Lambda} U_\lambda$ is open, we need to show that the same
property holds for all $y$ in this set. But since the union between some sets is defined as the set that holds
all the elements that any of these sets hold, this is trivial: for any $y \in \bigcup_{\lambda \in \Lambda}$
for which we want to know what $\epsilon$ we need to show that the union is open around that $y$, we just pick
the corresponding $\epsilon$ for the subset $U_\lambda$ which was open. Since all elements in that $U_\lambda$
are also in the union, this must certainly be the case. \qed
\item Similarly to the previous exercise, non-formally speaking we want to prove that any intersection of open sets
in $\R$ is open itself. This is not as trivial as in the previeous exercise however: since every set that is
added as an intersection poses another restriction, we don't have the immediate guarantee that every $\epsilon$
from the subsets will also be a well-defined element for the intersection set.
Now formally. Let $n \in \N$ and let $U_1,...,U_n \subset \R$. We assume that all $U_1,...,U_n$ are open.
Then we will prove that $\bigcap_{m = 1}^n U_m$ is open by induction over $n$.
For the base case, let $n = 1$. Then the intersection set is equivalent to $U_1$. Since $U_1$ is open, then
so is the intersection set.
For the inductive step, we assume that the intersection set is open for a certain $n = h$, i.e. there exists
an $\epsilon > 0$ such that $(x - \epsilon, x + \epsilon)$ is open for every $x \in \bigcap_{m = 1}^h U_m$.
Now, we will add one additional open set to this intersection, $U_{h+1}$, such that $n$ become $h+1$. Note
that $h + 1 \in \N$. Let the new intersection set be denoted as $\bigcap'$, and the old one as $\bigcap$.
Then in order to find an $\epsilon > 0$ for every $x \in \bigcap'$ such that $(x - \epsilon, x + \epsilon)$,
we take the smallest of $\epsilon$'s for that $x$ compared between $\bigcap$ and $U_{h+1}$. Since
$x \in \bigcap'$, we know that $x \in \bigcap$ and $x \in U_{h+1}$. Then the smallest accomponying $\epsilon$
always gives a well-defined open set inside of $\bigcap'$ because $|(x + \epsilon_1) - (x - \epsilon_1)| <
|(x + \epsilon_2) - (x - \epsilon_2)|$ if $\epsilon_1 < \epsilon_2$, and thus $\bigcap'$ is open itself. \qed
\item No, $\Q$ is not open in $\R$. This is because we can't find an $\epsilon > 0$ such that for every $q \in \Q$,
$(q - \epsilon, q + \epsilon) \subset \Q$. We know that $\Q$ is dense in $\R$, but as we have proven in
exercise 1, the converse is also true. For every real numbers, we can find a real number inbetween that is not
a rational number. So, we cannot pick an $\epsilon > 0$ such that there is an interval around $x$ that itself
is completely contained in $\Q$. For every $\epsilon$ we pick, we can always find a real number $r$ such that
$x < r < x + \epsilon$ and $x - \epsilon < r < x$. So, $\Q$ is not open. \qed
\end{enumerate}
\exercise*
\begin{tcolorbox}
Prove that
\begin{equation*}
\lim_{n \rightarrow \infty} \frac{1}{20n^2 + 20n + 2020} = 0.
\end{equation*}
\end{tcolorbox}
In order to prove that this limit holds, we need to show that a function $\{x_n\}$ converges to $x$,
i.e. if for all $\epsilon > 0$, $\exists M \in \N$ such that $\forall n \geq M$ the following inequality holds:
$|x_n = x| < \epsilon$.
Let $\epsilon > 0$. We choose $M \in \N$ such that $\frac{1}{M} < \epsilon$ (Archimedean Property). Then for all
$n \geq M$, $|\frac{1}{20n^2+20n+2020} - 0| = \frac{1}{20n^2 + 20n + 2020} \leq \frac{1}{n^2 + n} \leq
\frac{1}{n} \leq \frac{1}{M} < \epsilon$. \qed
\end{document}

BIN
assignments/week4/main.pdf Normal file

Binary file not shown.

View File

@@ -0,0 +1,75 @@
\documentclass[../main_text.tex]{subfiles}
\begin{document}
\setcounter{exercise}{0}
\part{Assignment 4}
\exercise*
\begin{tcolorbox}
We say a set $F \subset \R$ is \textit{closed} if its complement $F^c := \R \backslash F$ is open. Since
$\emptyset$ and $\R$ are open, it follows that $\emptyset$ and $\R$ are closed as well.
\begin{enumerate}[label=\emph{(\alph*)}]
\item Let $a,b \in \R$ with $a < b$. Prove that $[a,b]$ is closed.
\item Is the set $\Z \subset \R$ closed? Provide a proof to substantiate your claim.
\item Is the set of rationals $\Q \subset \R$ closed? Provide a proof to substantiate your claim.
\end{enumerate}
\end{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item The complement of $[a,b]$ is equal to the union of $(-\infty, a)$ and $(b, \infty)$. So, we have to prove
that both these sets are open. But we have already done so in the assignment of the previous week, so I'll just
leave it at that.
\item To prove that $\Z \subset \R$ is closed, we have to prove that the complement is open. Since the complement
consists of the union of a countably infinite number of open intervals $(a, b)$ such that $a < b$, we know
from a combination of earlier exercises that this is the case. This is because any interval $(a, b)$ is open
if $a,b \in \R$ such that $a < b$ and for any two open interval $A$ and $B$ that are open, then $A \cup B$
is open as well.
\item I claim that the set of rationals isn't closed in $\R$. This is because there doesn't exist any interval
$(a,b)$ where $a,b \in \Q$ such that $a < b$, since for any $a$ and $b$ you can always find a $c$ such that
$a < c < b$. This makes it impossible to find an $\epsilon > 0$ such that for any $x \in (a,b)$,
$(x - \epsilon, x + \epsilon)$ is also in $(a,b)$ but in such a way that it only contains irrational numbers.
This argument makes use of the fact that $\Q$ is dense in $\R$.
\end{enumerate}
\exercise*
\begin{tcolorbox}
\begin{enumerate}[label=\emph{(\alph*)}]
\item Let $\Lambda$ be a set (not necessarily a subset of $\R$), and for each $\lambda \in \Lambda$, let
$F_\lambda \in \R$. Prove that if $F_\lambda$ is closed for all $\lambda \in \Lambda$ then the set
\begin{equation*}
\bigcap_{\lambda \in \Lambda} F_\lambda = \{x \in \R : x \in F_\lambda \text{ for all }
\lambda \in \Lambda\}
\end{equation*}
is closed.
\item Let $n \in \N$, and let $F_1,...,F_n \subset \R$. Prove that if $F_1,...,F_n$ are closed then the set
$\bigcup_{m=1}^n F_m$ is closed.
\end{enumerate}
\end{tcolorbox}
This exercise is very similar to an exercise of the previous assignment, in which we looked at unions and intersections
of \textit{open} intervals, whereas in this exercise, it's all about closed intervals. As the definition of closed
intervals is intricately linked to the definition of open intervals, the following arguments will look very similar and
shouldn't be surprising.
\begin{enumerate}[label=\emph{(\alph*)}]
\item Non-formally speaking, in this exercise we want to prove that any intersection of closed sets in $\R$, is
closed itself. In order to make this formal, we will assume that $F_\lambda$ is closed for all $\lambda \in
\Lambda$ and follow the definition as presented.
So, let us assume that $F_\lambda$ is closed for all $\lambda \in \Lambda$. Following the definition of closed
sets, this means that the complement of $F_\lambda$ is open. Let's call the complement $\R \backslash F_\lambda =
U_\lambda$. Similarly, proving $\bigcap_{\lambda \in \Lambda} F_\lambda$ is closed, means we need to prove its
complement is open. From De Morgan's laws, it follows that $\R \backslash \bigcap_{\lambda \in \Lambda}
F_\lambda = \bigcup_{\lambda \in \Lambda} U_\lambda$.
We already proved this statement in exercise 5.b of week 3.
\item Similarly to the previous exercise, non-formally speaking we want to prove that any union of closed sets in
$\R$ is closed itself. Again, we will assign the complement of $(F_n)^c = U_n$, since we can't directly prove
a set is closed; we can only use the definition of closedness by proving something on open sets.
In the same vein, in order to prove that $\bigcup_{m=1}^n F_m$ is closed, we can only try and prove that its
complement is open. Using De Morgan's laws, $(\bigcup_{m=1}^n F_m)^c = \bigcap_{m=1}^n U_m$. This is the same
exercise as exercise 5.c from week 3, which also already proves the theorem.
\end{enumerate}
\end{document}

33
scripts/build.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Build all directories
subdirectory_file_name=main
cd assignments
for D in *; do
if [ "${D}" != "template" ] && [ -d "${D}" ]; then
echo "Building ${D}..."
cd "${D}"
pdflatex -interaction=batchmode -halt-on-error "${subdirectory_file_name}.tex"
pdflatex -interaction=batchmode -halt-on-error "${subdirectory_file_name}.tex"
cd ..
fi
done
# Build main PDF
main_file_name=main_text
echo "Building main PDF..."
pdflatex -interaction=batchmode -halt-on-error "${main_file_name}.tex"
pdflatex -interaction=batchmode -halt-on-error "${main_file_name}.tex"
# Clean up
rm -rf *.aux *.log *.out *.toc
for D in *; do
if [ "${D}" != "template" ] && [ -d "${D}" ]; then
cd "${D}"
rm -rf *.aux *.log *.out *.toc
cd ..
fi
done