Introductory Real Analysis
Set Theory
Sets and Functions
To show $A=B$, show $A\subseteq B$ and $B\subseteq A$. Suppose $x\in B$, then we know by definition that $x\in (A\cup B)$ if $x\in B$ or $x\in A$. Which then implies that $x\in A$ from rule 1. Thus $B\subseteq A$.
Now suppose $x\in A$ which implies $x\in (A\cap B)$ (rule 2). The definition of this means that $x\in A$ and $x\in B$. $\therefore x\in A \implies x\in B$, i.e. $A\subseteq B$, so $A=B$.
This only holds for $B\subseteq A$. We proceed by counterexample.
Let $A={1,2}, B={3,4}$. Then $(A-B) = {1,2}$ and $(A-B)\cup B = {1,2,3,4} \neq {1,2}$.
Let $x\in (A-B)\cap C$. Then:
- $x\in A - B \implies x \in A $ and $x\not \in B$
- $x\in C$
So:
- $x \in A \cap C$
- Since $x\in C$ and $x\not\in B$, it follows that $x\not\in B \cap C$
Therefore $x\in (A\cap C)- (B\cap C)$
Let $x\in A \Delta B$. Then:
- $x\in A-B \implies x\in A$ and $x\not\in B$
OR:
- $x\in B-A \implies x\in B$ and $x\not\in A$
So
- $x\in A$ or $x \in B \implies x\in (A\cup B)$
- $x \not \in (A\cap B) \implies x\in (A\cap B)^c$
Therefore \[x\in(A\cup B) \cap (A\cap B)^c =(A\cup B)- (A\cap B)\]
Let $x\in \cup_\alpha A_\alpha - \cup_\alpha B_\alpha$. Then:
- $x\in \cup_\alpha A_\alpha \implies \exists \alpha{}_0: x \in A_\alpha{}_0$
- $x\not\in \cup_\alpha B_\alpha \implies \forall \alpha : x \not\in B_\alpha$
So
- $x\not\in B_\alpha{}_0$
Hence \[x\in A_\alpha{}_0 - B_\alpha{}_0 \subset \bigcup_\alpha\; (A_\alpha - B_\alpha)\]
Start with $I=\set{a,a+1}$, i.e. an arbitrary set of length 1. Then notice that you can subtract $a$ wlog 𐃏 , and now we are tasked to find $\set{\langle x \rangle : x\in [0,1]}$. Furthermore, we know that $\langle x \rangle = x - \lfloor x \rfloor $ with $\langle 0 \rangle = 0 = \langle 1 \rangle$, whereby the image of the the closed interval only sweeps the half-open interval $[0,1)$.
$f$ cannot be one-to-one because of the periodicity; many real numbers have the same fractional parts.
The pre-image of $\frac{1}{4} \leq y \leq \frac{3}{4}$ is the interval $$ \bigcup_{n\in\mathbb{Z}} \left [\frac{1}{4} + n, \frac{3}{4} + n \right ]$$ because $x\in \mathbb{R} $.
Finally, we can express \[\mathbb{R} = \bigsqcup_{r\in [0,1)} \set{x\in \mathbb{R} : \langle x \rangle = r } \]
as the disjoint union of all the numbers which have the same fractional parts; i.e. the same images.
Equivalence of Sets. The Power of a Set
Let $F = \mathbb{R}^M$ be the set of all functions $M\to\mathbb{R}$. There is an injection $M\hookrightarrow F$ via $m\mapsto f_m$ where $f_m(x)=1$ if $x=m$ and $0$ otherwise. So $|M|\le|F|$.
To show $|F|>|M|$, assume for contradiction that $\phi:M\to F$ is a surjection. Consider the indicator functions: define $g:M\to\{0,1\}\subset\mathbb{R}$ by $g(m)=1-\chi_m(m)$ where $\chi_m = \phi(m)$ is the characteristic function. Then $g\neq \phi(m)$ for any $m$ (they differ at $m$), contradicting surjectivity. Hence $|F|>|M|$.
WLOG take $[0,1]$. All four intervals have the power of the continuum since:
- Each contains a copy of $(0,1)$, which bijects with $\mathbb{R}$ via $x\mapsto\tan(\pi(x-\tfrac12))$
- Each injects into $[0,1]$
By Cantor–Bernstein, all four have the same cardinality $\mathfrak{c}$.
Let $R = \{X : X\notin X\}$ (Russell's paradox). Ask: is $R\in R$?
- If $R\in R$, then by definition $R\notin R$—contradiction.
- If $R\notin R$, then by definition $R\in R$—contradiction.
Hence no such set can exist in consistent set theory. This is resolved by axiomatization (ZFC), which restricts comprehension to avoid self-referential constructions.
Ordered Sets and Ordinal Numbers
Partial ordering: Define $z_1 \preceq z_2$ iff $\operatorname{Re}(z_1)\le\operatorname{Re}(z_2)$ and $\operatorname{Im}(z_1)\le\operatorname{Im}(z_2)$. This is reflexive, antisymmetric, transitive, but not total (e.g., $1$ and $i$ are incomparable).
Linear ordering: Use lexicographic order: $z_1 < z_2$ iff $\operatorname{Re}(z_1)<\operatorname{Re}(z_2)$, or $\operatorname{Re}(z_1)=\operatorname{Re}(z_2)$ and $\operatorname{Im}(z_1)<\operatorname{Im}(z_2)$. This is a total order on $\mathbb{C}$.
The standard examples are:
- All subsets of $X$ ordered by inclusion: directed (take $c=a\cup b$).
- $\mathbb{N}$ with divisibility: directed (take $c=\operatorname{lcm}(a,b)$).
- $\mathbb{Z}$ with usual order: directed ($c=\max(a,b)+1$).
- Finite subsets of an infinite set: directed (take $c=a\cup b$).
For $A,B\in\mathcal{P}(X)$:
- $\inf(A,B) = A\cap B$ (the largest set contained in both)
- $\sup(A,B) = A\cup B$ (the smallest set containing both)
These exist for every pair, so $(\mathcal{P}(X),\subseteq)$ is a lattice.
Ordered sum: $(M_1+M_2)+M_3$ places $M_1$ before $M_2$, then that before $M_3$. Same for $M_1+(M_2+M_3)$. The identity map preserves order.
Ordered product: $(M_1\cdot M_2)\cdot M_3$ is lexicographically ordered pairs $((m_1,m_2),m_3)$. The bijection $((m_1,m_2),m_3)\mapsto(m_1,(m_2,m_3))$ preserves lexicographic order, giving an isomorphism with $M_1\cdot(M_2\cdot M_3)$.
- $\omega+n$: $\mathbb{N}$ followed by $\{a_1,\ldots,a_n\}$. Order: naturals first, then $a_1<\cdots<a_n$.
- $\omega+\omega = \omega\cdot 2$: two copies of $\mathbb{N}$, say $\{0,1,2,\ldots\}\cup\{0',1',2',\ldots\}$ with all unprimed $<$ all primed.
- $(\omega+\omega)+n$: append $n$ elements after the second copy.
- $\omega\cdot 3 = \omega+\omega+\omega$: three copies of $\mathbb{N}$.
All are countable as finite or countable unions of countable sets.
- $\omega\cdot n$: $n$ copies of $\mathbb{N}$ placed consecutively.
- $\omega^2 = \omega\cdot\omega$: $\mathbb{N}\times\mathbb{N}$ with reverse-lexicographic order (second coordinate primary). Equivalently: $\{(i,j):j\in\mathbb{N},i\le j\}$ ordered by $j$ then $i$.
- $\omega^2\cdot\omega^3 = \omega^5$: $\mathbb{N}^5$ with lexicographic order.
Each is a countable product/union, hence countable.
By definition, $\omega\cdot n$ is $n$ copies of $\omega$ in sequence: $\omega\cdot n = \omega + \omega + \cdots + \omega$ ($n$ times). This can be verified by induction:
- $\omega\cdot 1 = \omega$
- $\omega\cdot(n+1) = \omega\cdot n + \omega$
Hence $\omega\cdot 2 = \omega + \omega$, $\omega\cdot 3 = \omega+\omega+\omega$, etc.
Systems of Sets
We verify the ring axioms. For $A,B\in f^{-1}(\mathcal{P})$, write $A=f^{-1}(P)$, $B=f^{-1}(Q)$ with $P,Q\in\mathcal{P}$. Then:
- $A\cup B = f^{-1}(P)\cup f^{-1}(Q) = f^{-1}(P\cup Q) \in f^{-1}(\mathcal{P})$ since $P\cup Q\in\mathcal{P}$
- $A\setminus B = f^{-1}(P)\setminus f^{-1}(Q) = f^{-1}(P\setminus Q) \in f^{-1}(\mathcal{P})$
Hence $f^{-1}(\mathcal{P})$ is a ring.
None in general. The forward image does not preserve set operations cleanly:
- $f(A\cup B) = f(A)\cup f(B)$ ✓
- $f(A\cap B) \subseteq f(A)\cap f(B)$ (equality fails if $f$ not injective)
- $f(A\setminus B) \not\subseteq f(A)\setminus f(B)$ in general
- $f(M^c) \neq f(M)^c$ in general
If $f$ is a bijection, all assertions transfer. Otherwise, none of (a)–(c) need hold.
Metric Spaces
Basic Concepts
Let $(X,p)$ be a metric space. Prove that
- $\lvert p(x,z)-p(y,u)\rvert\le p(x,y)+p(z,u)$ for all $x,y,z,u\in X$;
- $\lvert p(x,z)-p(y,z)\rvert\le p(x,y)$ for all $x,y,z\in X$.
- By triangle inequality: $p(x,z)\le p(x,y)+p(y,z)\le p(x,y)+p(y,u)+p(u,z)$. Hence $p(x,z)-p(y,u)\le p(x,y)+p(z,u)$. By symmetry (swap $(x,z)\leftrightarrow(y,u)$), we get $p(y,u)-p(x,z)\le p(x,y)+p(z,u)$. Together: $|p(x,z)-p(y,u)|\le p(x,y)+p(z,u)$.
- Set $u=z$ in (1): $|p(x,z)-p(y,z)|\le p(x,y)+p(z,z)=p(x,y)$.
Expanding the RHS: $a_k^2 b_j^2+a_j^2 b_k^2-(a_k b_j-a_j b_k)^2 = a_k^2 b_j^2+a_j^2 b_k^2-a_k^2b_j^2+2a_ka_jb_kb_j-a_j^2b_k^2 = 2a_ka_jb_kb_j$.
So $\frac12\sum_{k,j}2a_ka_jb_kb_j = \sum_{k,j}a_ka_jb_kb_j = (\sum_k a_kb_k)^2$. ✓
For C–S: since $(a_kb_j-a_jb_k)^2\ge 0$, we have $$(\sum a_kb_k)^2 \le \frac12\sum_{k,j}(a_k^2b_j^2+a_j^2b_k^2) = \sum_k a_k^2\sum_j b_j^2$$ Taking square roots gives the Cauchy–Schwarz inequality.
Take $p=\frac12$, $x=(1,0)$, $y=(0,1)$ in $\mathbb{R}^2$. Then:
- $\|x\|_{1/2} = (1^{1/2}+0)^2 = 1$
- $\|y\|_{1/2} = 1$
- $\|x+y\|_{1/2} = (1^{1/2}+1^{1/2})^2 = 4$
Minkowski would require $\|x+y\|\le\|x\|+\|y\|=2$, but $4>2$. Hence it fails for $p<1$.
Define $\Phi:C[0,1]\to C[1,2]$ by $(\Phi f)(t) = f(t-1)$ for $t\in[1,2]$.
- $\Phi$ is bijective with inverse $(\Phi^{-1}g)(s)=g(s+1)$.
- $\|\Phi f - \Phi g\|_\infty = \sup_{t\in[1,2]}|f(t-1)-g(t-1)| = \sup_{s\in[0,1]}|f(s)-g(s)| = \|f-g\|_\infty$.
Hence $\Phi$ is an isometry.
Convergence. Open and Closed Sets
Take the discrete metric on $\{a,b,c\}$: $p(x,y)=1$ for $x\neq y$. Then $S(a,2)=\{a,b,c\}$ (all points within distance $<2$) and $S(a,1)=\{a\}$. We have $S(a,1)\subset S(a,2)$, but also $S(b,\tfrac12)=\{b\}\subset S(a,2)$ with $\tfrac12<2$.
Alternatively: in any ultrametric space, containing spheres can have larger radii than contained ones.
Let $x$ be a contact point of $M$. Then every neighborhood of $x$ intersects $M$.
- If $x\in M$ and some neighborhood contains no other points of $M$, then $x$ is an isolated point.
- Otherwise, every neighborhood of $x$ contains a point of $M$ distinct from $x$, so $x$ is a limit point.
These are mutually exclusive and exhaustive for contact points.
($\Rightarrow$) Let $f$ be continuous at $x_0$ and $x_n\to x_0$. Given $\varepsilon>0$, $\exists\delta>0$: $p_X(x,x_0)<\delta\implies p_Y(f(x),f(x_0))<\varepsilon$. Since $x_n\to x_0$, $\exists N$: $n>N\implies p_X(x_n,x_0)<\delta$. Thus $p_Y(f(x_n),f(x_0))<\varepsilon$.
($\Leftarrow$) Contrapositive: if $f$ not continuous at $x_0$, $\exists\varepsilon>0$ and $x_n$ with $p(x_n,x_0)<1/n$ but $p(f(x_n),f(x_0))\ge\varepsilon$. Then $x_n\to x_0$ but $f(x_n)\not\to f(x_0)$.
- Let $x\notin[M]$. Then $x$ is not a contact point, so $\exists\varepsilon>0$: $B(x,\varepsilon)\cap M=\varnothing$. This ball also misses $[M]$ (any $y\in B(x,\varepsilon)\cap[M]$ would have a sequence in $M$ converging to it, eventually entering $B(x,\varepsilon)$). So $[M]^c$ is open, hence $[M]$ is closed.
- Clearly $M\subseteq[M]$. If $F$ is closed with $M\subseteq F$, then every limit point of $M$ is in $F$. So $[M]\subseteq F$.
No to both.
- Infinite union of closed: $\bigcup_{n=1}^\infty[\frac1n,1-\frac1n]=(0,1)$, which is open, not closed.
- Infinite intersection of open: $\bigcap_{n=1}^\infty(-\frac1n,\frac1n)=\{0\}$, which is closed, not open.
- By definition, $F$ consists exactly of points with ternary expansions using only 0 and 2. So every point of $F$ has such an expansion, and they are trivially dense in $F$ (in fact, they are $F$).
- Given $s\in[0,2]$, write $s=\sum_{n=1}^\infty \frac{s_n}{3^n}$ where $s_n\in\{0,1,2\}$. Define $a_n,b_n\in\{0,2\}$ with $a_n+b_n=2s_n$ (take $a_n=b_n=s_n$ if $s_n\in\{0,2\}$; take $a_n=0,b_n=2$ if $s_n=1$). Then $t_1=\sum\frac{a_n}{3^n}\in F$, $t_2=\sum\frac{b_n}{3^n}\in F$, and $t_1+t_2=s$.
- If $x\in A$, then $p(x,x)=0\in\{p(a,x):a\in A\}$, so $\inf=0$. Converse fails: $A=(0,1)$, $x=0$: $p(A,0)=0$ but $0\notin A$.
- $|p(A,x)-p(A,y)|\le p(x,y)$: for any $a\in A$, $p(a,x)\le p(a,y)+p(x,y)$, so $p(A,x)\le p(A,y)+p(x,y)$. By symmetry, $|p(A,x)-p(A,y)|\le p(x,y)$.
- $p(A,x)=0$ iff $\forall\varepsilon>0,\exists a\in A: p(a,x)<\varepsilon$ iff every ball around $x$ meets $A$ iff $x\in[A]$.
- By (c), $\{x:p(A,x)=0\}=[A]$. Since $A\subseteq[A]$, we have $[A]=A\cup\{x:p(A,x)=0\}$.
- $M_K$ is closed: if $f_n\to f$ uniformly with $f_n\in M_K$, then for any $t_1,t_2$: $|f(t_1)-f(t_2)|=\lim|f_n(t_1)-f_n(t_2)|\le K|t_1-t_2|$. So $f\in M_K$. The smooth functions with $|f'|\le K$ are $K$-Lipschitz and can approximate any $K$-Lipschitz function uniformly.
- $M=\bigcup M_K$ is not closed: take $f_n(t)=\sqrt{t^2+1/n}$ on $[-1,1]$. Each $f_n$ is Lipschitz, but the limit $|t|$ has unbounded derivative, hence is not in $M_K$ for any fixed $K$. Yet $|t|\in M_1$, so this example fails—better: $f_n=n\sin(t/n)\to t$, but the example needs refinement.
- $[M]=C[a,b]$ by Weierstrass: every continuous function is uniformly approximated by polynomials, which are Lipschitz.
Complete Metric Spaces
($\Rightarrow$) Let $Y\subseteq X$ be complete and $\{y_n\}\subset Y$ with $y_n\to x\in X$. Then $\{y_n\}$ is Cauchy in $Y$, so converges to some $y\in Y$. By uniqueness, $x=y\in Y$. So $Y$ closed.
($\Leftarrow$) Let $Y$ closed and $\{y_n\}$ Cauchy in $Y$. Then $\{y_n\}$ Cauchy in $X$, converges to $x\in X$. Since $Y$ closed, $x\in Y$. So $Y$ complete.
Contraction Mappings
Topological Spaces
Basic Concepts
($\Rightarrow$) If $G$ open, then $G$ is a neighborhood of each of its points.
($\Leftarrow$) Suppose every $x\in G$ has a neighborhood $U_x\subseteq G$. Then $G=\bigcup_{x\in G}U_x$—a union of open sets—hence open.
For any $M\subseteq T$ show that
- $[M]=M$ iff $M$ is closed;
- $[M]$ is the smallest closed set containing $M$;
- the closure operator satisfies Kuratowski’s axioms.
- ($\Rightarrow$) If $M$ closed, $M^c$ open, so $[M]=M$. ($\Leftarrow$) If $[M]=M$, all limit points in $M$, so $M^c$ open.
- If $F\supseteq M$ closed, then $F$ contains all limit points of $M$, so $[M]\subseteq F$.
- Kuratowski axioms: (i) $[\varnothing]=\varnothing$, (ii) $M\subseteq[M]$, (iii) $[[M]]=[M]$, (iv) $[M\cup N]=[M]\cup[N]$.
Let $\tau$ be the system consisting of $\varnothing$ and every subset of $X=[0,1]$ obtained by deleting a finite or countable set of points. Show that $(X,\tau)$ is
- not first‑countable,
- not second‑countable,
- a $T_1$ space but not Hausdorff.
Not first-countable: If $\{U_n\}$ were a countable neighborhood base at $x$, then $\bigcap U_n$ is co-countable, but this intersection doesn't determine $x$ uniquely.
Not second-countable: Any base element is co-countable; a countable collection can't separate all pairs.
$T_1$ not Hausdorff: Singletons are closed (co-countable complements). But any two non-empty open sets meet (both co-countable in uncountable $[0,1]$).
Let $(X, \mathcal T)$ be a topological space.
($\Rightarrow$) Assume $X$ is a $T_1$ space. We want to show that every finite subset of $X$ is closed. It suffices to show that every singleton set $\{x\}$ is closed, because a finite union of closed sets is closed. Let $x \in X$. We want to show that $X \setminus \{x\}$ is open. Let $y \in X \setminus \{x\}$, so $y \neq x$. Since $X$ is $T_1$, for any distinct points $y, x$, there exists an open set $U_y$ such that $y \in U_y$ and $x \notin U_y$. This means $U_y \subseteq X \setminus \{x\}$. We can write $X \setminus \{x\} = \bigcup_{y \in X \setminus \{x\}} U_y$. Since $X \setminus \{x\}$ is a union of open sets, it is open. Therefore, $\{x\}$ is closed. Since every singleton is closed, any finite set $\{x_1, \ldots, x_n\} = \{x_1\} \cup \ldots \cup \{x_n\}$ is a finite union of closed sets, and thus is closed.
($\Leftarrow$) Assume every finite subset of $X$ is closed. We want to show that $X$ is a $T_1$ space. Let $x, y \in X$ be two distinct points. Since every finite subset is closed, the singleton set $\{y\}$ is closed. Consider the set $U = X \setminus \{y\}$. Since $\{y\}$ is closed, $U$ is open. Clearly, $x \in U$ (because $x \neq y$) and $y \notin U$. Similarly, $X \setminus \{x\}$ is an open set containing $y$ but not $x$. Thus, for any two distinct points, we can find an open set containing one but not the other. Therefore, $X$ is a $T_1$ space.
Compactness
($\Rightarrow$) If $C_{XY}$ compact, it's totally bounded. Given $\varepsilon>0$, cover by finitely many $\varepsilon$-balls. The finite centers are equicontinuous; all nearby functions inherit this modulus.
($\Leftarrow$) If equicontinuous and pointwise bounded (automatic: $Y$ compact), then every sequence has uniformly convergent subsequence (Arzelà-Ascoli). The limit is continuous ($X,Y$ compact), so lies in $C_{XY}$. Hence compact.
Real Functions on Metric and Topological Spaces