---
title: "General Topology"
book: "University Mathematics — Year 3"
subject: math
language: en
chapter: 6
exercises: 12
source: https://one-course.com/books/math/5/en/chapter/6-general-topology
---

# Chapter 6 — General Topology

The Year 2 volume did analysis in metric spaces: distances, balls, sequences. But the fundamental notions — [continuity](#def-b3-topology-continuity), compactness, [connectedness](#def-b3-topology-connected) — never mention the numerical value of a distance, only the family of *[open sets](#def-b3-topology-topology)* it generates. This chapter takes that family as the primitive object. The gain is not generality for its own sake: quotient constructions (the circle as $\R/\Z$, projective spaces), products, and the weak-type topologies of functional analysis simply are not metric-first objects. We rebuild [continuity](#def-b3-topology-continuity), then treat compactness by open covers (proving it equivalent to Year 2’s sequential definition in metric spaces), and [connectedness](#def-b3-topology-connected) — closing with the theorem that a [continuous](#def-b3-topology-continuity) bijection cannot identify $\R$ with $\R^2$: [topology](#def-b3-topology-topology) can distinguish dimensions.

## 6.1 Topologies, open sets, continuity

**Definition 6.1.**

A *topology* on a set $X$ is a family $\mathcal T$ of subsets of $X$ — called *open sets* — such that: $\varnothing, X \in
\mathcal T$; any union of open sets is open; any *finite* intersection of open sets is open. The pair $(X, \mathcal T)$ is a *topological space*. Complements of open sets are *closed*. A *neighborhood* of $x$ is a set containing an open set containing $x$.

**Example 6.2.**

(a) A metric space, with “open” as in Year 2 (unions of open balls): the *metric [topology](#def-b3-topology-topology)*; different metrics can give the same [topology](#def-b3-topology-topology) (equivalent metrics). A space whose [topology](#def-b3-topology-topology) arises from some metric is *metrizable*. (b) The *discrete* [topology](#def-b3-topology-topology) (all subsets) and the *indiscrete* [topology](#def-b3-topology-topology) $\{\varnothing, X\}$. (c) The *cofinite* [topology](#def-b3-topology-topology) on an infinite set: open $=$ empty or cofinite. Not metrizable, as we shall see ([Exercise 6.3](#exo-b3-topology-3)). (d) On $\R$, the usual [topology](#def-b3-topology-topology); on $\bar\R = \R \cup
\{\pm\infty\}$, the order [topology](#def-b3-topology-topology) generated by rays — making “$x_n \to +\infty$” an instance of plain convergence.

**Definition 6.3.**

For $A \subseteq X$: the *interior* $\mathring A$ is the largest [open set](#def-b3-topology-topology) inside $A$ (union of all of them); the *closure* $\bar A$ the smallest closed set containing $A$; the *boundary* $\partial A = \bar A
\setminus \mathring A$. $A$ is *dense* if $\bar A = X$. One has $x \in \bar A$ iff every [neighborhood](#def-b3-topology-topology) of $x$ meets $A$ (if some [neighborhood](#def-b3-topology-topology) misses $A$, its open core’s complement is a smaller closed set around $A$; conversely).

**Definition 6.4.**

A *basis* of $\mathcal T$ is a family $\mathcal B \subseteq \mathcal T$ such that every [open set](#def-b3-topology-topology) is a union of members of $\mathcal B$ (e.g. open balls in a metric space; open intervals in $\R$). A family $\mathcal B$ of subsets of $X$ is a basis of *some* [topology](#def-b3-topology-topology) iff it covers $X$ and, for $B_1, B_2 \in \mathcal B$ and $x \in B_1 \cap B_2$, some $B_3 \in \mathcal B$ has $x \in B_3 \subseteq B_1\cap B_2$ — then “unions of members” is a [topology](#def-b3-topology-topology), the [topology](#def-b3-topology-topology) *generated* by $\mathcal B$.

**Definition 6.5.**

$f \colon X \to Y$ is *continuous* if $f^{-1}(V)$ is open for every open $V \subseteq Y$ — equivalently, preimages of closed sets are closed; equivalently, for every $x$ and [neighborhood](#def-b3-topology-topology) $V$ of $f(x)$, $f^{-1}(V)$ is a [neighborhood](#def-b3-topology-topology) of $x$ (continuity *at* each $x$). It suffices to check on a [basis](#def-b3-topology-basis) of $Y$. Compositions of continuous maps are continuous. A *homeomorphism* is a continuous bijection with continuous inverse; [topology](#def-b3-topology-topology) studies the properties preserved by homeomorphisms.

**Proposition 6.6 (Continuity vs closure; gluing).**

(a) $f$ is [continuous](#def-b3-topology-continuity) iff $f(\bar A) \subseteq \overline{f(A)}$ for all $A \subseteq X$. (b) If $X = F_1 \cup F_2$ with $F_1, F_2$ closed and $f\colon X
\to Y$ restricts [continuously](#def-b3-topology-continuity) to each $F_i$, then $f$ is [continuous](#def-b3-topology-continuity).

**Proof.** (a) If $f$ [continuous](#def-b3-topology-continuity): $f^{-1}(\overline{f(A)})$ is closed and contains $A$, hence contains $\bar A$. Conversely apply the criterion to $A = f^{-1}(F)$, $F$ closed: $f(\bar A) \subseteq
\overline{f(f^{-1}(F))} \subseteq \bar F = F$, so $\bar A
\subseteq f^{-1}(F) = A$: preimages of closed sets are closed. (b) For $F \subseteq Y$ closed: $f^{-1}(F) =
(f\restriction_{F_1})^{-1}(F) \cup (f\restriction_{F_2})^{-1}
(F)$, a union of two sets closed in $F_1$, resp. $F_2$, hence closed in $X$ ($F_i$ closed: closed-in-closed is closed). ∎

**Definition 6.7.**

$X$ is *Hausdorff* (or *separated*) if any two distinct points have disjoint [neighborhoods](#def-b3-topology-topology). Metric spaces are Hausdorff (balls of radius $d(x,y)/2$). A sequence $(x_n)$ *converges* to $x$ if every [neighborhood](#def-b3-topology-topology) of $x$ contains all but finitely many $x_n$; in a Hausdorff space, limits are unique (two limits would have disjoint [neighborhoods](#def-b3-topology-topology) each containing a tail). In a Hausdorff space, points — hence finite sets — are closed.

**Remark 6.8.**

In metric spaces, sequences detect everything: $x \in \bar A$ iff some sequence of $A$ converges to $x$ (take $x_n \in A \cap
B(x, 1/n)$), and $f$ is [continuous](#def-b3-topology-continuity) iff it is sequentially [continuous](#def-b3-topology-continuity). In general spaces both equivalences fail; the correct sequence-substitutes (filters, nets) belong to a more advanced course. We will state sequence-based results in metric spaces and cover-based results in general — and prove them equivalent where they are.

## 6.2 Subspaces, products, quotients

**Definition 6.9.**

Three ways to make new spaces from old:

1. *Subspace* : on $A \subseteq X$ , the [open sets](#def-b3-topology-topology) are the $U \cap A$ , $U$ open in $X$ — the coarsest [topology](#def-b3-topology-topology) making the inclusion [continuous](#def-b3-topology-continuity) .
2. *Product* : on $X \times Y$ (and finite products), the [topology](#def-b3-topology-topology) with [basis](#def-b3-topology-basis) the *open boxes* $U \times  V$ ; on an infinite product $\prod_i X_i$ , the [basis](#def-b3-topology-basis) consists of boxes $\prod U_i$ with $U_i = X_i$ for *all but finitely many* $i$ — the coarsest [topology](#def-b3-topology-topology) making every projection [continuous](#def-b3-topology-continuity) .
3. *Quotient* : if $\sim$ is an equivalence on $X$ and $\pi\colon X \to X/{\sim}$ the projection, declare $V  \subseteq X/{\sim}$ open iff $\pi^{-1}(V)$ is open — the finest [topology](#def-b3-topology-topology) making $\pi$ [continuous](#def-b3-topology-continuity) .

**Proposition 6.10 (Universal properties).**

(a) $f \colon Z \to X \times Y$ is [continuous](#def-b3-topology-continuity) iff both components $\pi_X \circ f$, $\pi_Y \circ f$ are (same for arbitrary products). (b) $g \colon X/{\sim} \to Z$ is [continuous](#def-b3-topology-continuity) iff $g \circ \pi
\colon X \to Z$ is.

**Proof.** (a) Necessity: compositions. Sufficiency: it is enough to check preimages of [basis](#def-b3-topology-basis) boxes: $f^{-1}(U \times V) = (\pi_Xf)^{-1}(U)
\cap (\pi_Yf)^{-1}(V)$, open (finitely many factors $\neq X_i$ in the infinite case). (b) Necessity: composition. Sufficiency: for $W \subseteq Z$ open, $\pi^{-1}(g^{-1}(W)) = (g\pi)^{-1}(W)$ is open, which by definition of the [quotient topology](#def-b3-topology-constructions) means $g^{-1}(W)$ is open. ∎

**Example 6.11.**

The quotient $\R/\Z$ (identify $x$ and $x + n$) is [homeomorphic](#def-b3-topology-continuity) to the circle $S^1 = \{z \in \C : \abs z = 1\}$: the map $x
\mapsto \eu^{2\iu\pi x}$ passes to a [continuous](#def-b3-topology-continuity) bijection $\R/\Z \to S^1$ ([Proposition 6.10](#prop-b3-topology-universal)(b)); its inverse is [continuous](#def-b3-topology-continuity) by the compactness argument of [Corollary 6.14](#cor-b3-topology-compacthomeo) below ([Exercise 6.5](#exo-b3-topology-5) details everything, including why $\R/\Z$ is [Hausdorff](#def-b3-topology-hausdorff) and [compact](#def-b3-topology-compact)). Likewise $[0,1]$ with endpoints glued is $S^1$, the square with opposite sides glued is the torus, and gluing is finally a theorem, not a picture.

## 6.3 Compactness

**Definition 6.12.**

An *open cover* of $X$ is a family $(U_i)_{i\in I}$ of [open sets](#def-b3-topology-topology) with $\bigcup U_i = X$. $X$ is *compact* if it is [Hausdorff](#def-b3-topology-hausdorff) and every open cover admits a *finite subcover*. Equivalently (taking complements): every family of closed sets with the *finite intersection property* (all finite subfamilies have nonempty intersection) has nonempty total intersection.

**Theorem 6.13 (First properties).**

Let $X$ be [compact](#def-b3-topology-compact).

1. A closed subset of $X$ is [compact](#def-b3-topology-compact) ; a [compact](#def-b3-topology-compact) subset of a [Hausdorff space](#def-b3-topology-hausdorff) is closed.
2. A [continuous](#def-b3-topology-continuity) image of a [compact space](#def-b3-topology-compact) in a [Hausdorff space](#def-b3-topology-hausdorff) is [compact](#def-b3-topology-compact) . In particular a [continuous](#def-b3-topology-continuity) $f\colon X  \to \R$ is bounded and attains its bounds.
3. A decreasing sequence of nonempty closed subsets of $X$ has nonempty intersection.

**Proof.** (1) Let $F \subseteq X$ closed and $(U_i)$ an open cover of $F$ (by opens of $X$): adding $X \setminus F$ gives an open cover of $X$; a finite subcover, minus $X \setminus F$, covers $F$. Subspace [Hausdorff](#def-b3-topology-hausdorff) is clear. Conversely let $K \subseteq Y$ [compact](#def-b3-topology-compact), $Y$ [Hausdorff](#def-b3-topology-hausdorff), and $y \notin K$: for each $x \in K$ pick disjoint open $U_x \ni x$, $V_x \ni y$; finitely many $U_x$ cover $K$, and the intersection of the corresponding $V_x$ is a [neighborhood](#def-b3-topology-topology) of $y$ disjoint from $K$’s cover, hence from $K$: the complement of $K$ is open.

(2) If $(V_j)$ covers $f(X)$, then $(f^{-1}(V_j))$ covers $X$; a finite subcover downstairs comes from the finite subcover upstairs. The image is [Hausdorff](#def-b3-topology-hausdorff) as a subspace. For $f$ real: $f(X)$ is [compact](#def-b3-topology-compact) in $\R$, hence closed and bounded (cover by $(-n, n)$ for boundedness; closed by (1)), and a closed bounded set contains its supremum.

(3) If $\bigcap F_n = \varnothing$, the opens $X \setminus F_n$ cover $X$; finitely many suffice, so some $F_{n_0} =
\varnothing$ (the sequence decreases) — contradiction. ∎

**Corollary 6.14.**

A [continuous](#def-b3-topology-continuity) *bijection* from a [compact space](#def-b3-topology-compact) to a [Hausdorff space](#def-b3-topology-hausdorff) is a [homeomorphism](#def-b3-topology-continuity).

**Proof.** The inverse is [continuous](#def-b3-topology-continuity) iff direct images of closed sets are closed; a closed $F$ is [compact](#def-b3-topology-compact) ([Theorem 6.13](#thm-b3-topology-compactprops)(1)), its image is [compact](#def-b3-topology-compact) (2), hence closed (1) in the [Hausdorff](#def-b3-topology-hausdorff) target. ∎

**Theorem 6.15 (Finite products).**

A finite product of [compact spaces](#def-b3-topology-compact) is [compact](#def-b3-topology-compact).

**Proof.** It suffices to treat $X \times Y$. [Hausdorff](#def-b3-topology-hausdorff) is inherited (separate in one coordinate). Let $(W_i)$ be an open cover of $X
\times Y$; we may assume the $W_i$ are [basis](#def-b3-topology-basis) boxes $U_i \times
V_i$ (refine: each point sits in a box inside some $W_i$; a finite subcover of boxes yields one of $W_i$’s). Fix $x \in X$: the *slice* $\{x\}\times Y \cong Y$ is [compact](#def-b3-topology-compact), so finitely many boxes $U_1\times V_1, \dots, U_k\times V_k$ cover it, with $x \in U_j$ for all $j$; then $U^x = \bigcap_{j \leq k} U_j$ is an open [neighborhood](#def-b3-topology-topology) of $x$ with $U^x \times Y$ covered by finitely many boxes (the *tube lemma*: for $(x', y) \in U^x \times Y$, $y \in V_j$ for some $j$ since the boxes covered $\{x\}\times Y$ at level $y$, and $x' \in U^x \subseteq U_j$, so $(x', y) \in U_j
\times V_j$). Now finitely many $U^x$ cover the [compact](#def-b3-topology-compact) $X$; the corresponding finite collections of boxes cover $X \times Y$. ∎

**Theorem 6.16 (Compactness in metric spaces).**

For a metric space $(X, d)$, the following are equivalent:

1. $X$ is [compact](#def-b3-topology-compact) (Borel–Lebesgue);
2. every sequence in $X$ has a convergent subsequence ( [sequential compactness](#thm-b3-topology-metriccompact) — Year 2’s definition);
3. $X$ is complete and *totally bounded* : for every $\varepsilon > 0$ , finitely many balls of radius $\varepsilon$ cover $X$ .

**Proof.** (1)$\Rightarrow$(2): Let $(x_n)$ have no convergent subsequence. Then each $x \in X$ has an open ball $B_x$ containing $x_n$ for only finitely many $n$ (otherwise a subsequence converges to $x$: take radii $1/k$). Finitely many $B_x$ cover $X$, so only finitely many indices $n$ exist: absurd.

(2)$\Rightarrow$(3): Completeness: a Cauchy sequence with a convergent subsequence converges (Year 2). Total boundedness: if some $\varepsilon$ admits no finite cover, choose inductively $x_{n+1}$ outside $\bigcup_{k\leq n} B(x_k, \varepsilon)$: the sequence has $d(x_m, x_n) \geq \varepsilon$ for $m \neq n$, no Cauchy subsequence, no convergent one.

(3)$\Rightarrow$(1): First, (3) implies (2): given $(x_n)$, cover $X$ by finitely many balls of radius $1$: one, $B_1$, contains a subsequence; cover $X$ by balls of radius $1/2$: one contains a further subsequence; iterate and diagonalize: the diagonal subsequence is Cauchy (two terms beyond stage $k$ lie in a common ball of radius $2^{-k}$, up to the usual $2\cdot$), hence converges. Now let $(U_i)$ be an open cover and suppose no finite subcover. *Lebesgue number argument*: for each $n$, some ball $B(y_n, 2^{-n})$ is not covered by finitely many $U_i$ — indeed, cover $X$ by finitely many balls of radius $2^{-n}$; if each were finitely covered, so would $X$ be. By (2), a subsequence $y_{n_k} \to y$; pick $i$ with $y \in U_i$ and $r > 0$ with $B(y, r) \subseteq U_i$. For large $k$, $B(y_{n_k}, 2^{-n_k}) \subseteq B(y, r) \subseteq U_i$: covered by *one* $U_i$ — contradiction. ∎

**Corollary 6.17 (Heine–Borel; Heine).**

(a) A subset of $\R^n$ is [compact](#def-b3-topology-compact) iff it is closed and bounded. (b) A [continuous map](#def-b3-topology-continuity) from a [compact](#def-b3-topology-compact) metric space to a metric space is uniformly [continuous](#def-b3-topology-continuity).

**Proof.** (a) Closed and bounded $\Rightarrow$ contained in a cube $[-M,M]^n$, which is [compact](#def-b3-topology-compact): $[-M, M]$ is (sequentially, by Bolzano–Weierstrass — or directly by dichotomy for covers), and [Theorem 6.15](#thm-b3-topology-tychonoff) handles the product; then apply [Theorem 6.13](#thm-b3-topology-compactprops)(1). Conversely a [compact](#def-b3-topology-compact) subset is closed ([Theorem 6.13](#thm-b3-topology-compactprops)(1)) and bounded (cover by concentric balls).

(b) Let $f \colon X \to Y$, $\varepsilon > 0$. The balls $B\bigl(x, \delta_x\bigr)$ with $f\bigl(B(x,
2\delta_x)\bigr)\subseteq B\bigl(f(x), \varepsilon/2\bigr)$ cover $X$; extract a finite subcover $B(x_j, \delta_{x_j})$ and set $\delta = \min_j \delta_{x_j}$. If $d(x, x') < \delta$: $x
\in B(x_j, \delta_{x_j})$ for some $j$, and then both $x, x'
\in B(x_j, 2\delta_{x_j})$, so $d(f(x), f(x')) < \varepsilon$. ∎

**Definition 6.18.**

$X$ is *locally compact* if it is [Hausdorff](#def-b3-topology-hausdorff) and every point has a [compact](#def-b3-topology-compact) [neighborhood](#def-b3-topology-topology) ($\R^n$; open subsets of $\R^n$; discrete spaces — but not $\Q$, see [Exercise 6.9](#exo-b3-topology-9)). Every locally [compact space](#def-b3-topology-compact) embeds in a [compact](#def-b3-topology-compact) one: the *one-point compactification* $\hat X = X
\cup \{\infty\}$, whose opens are those of $X$ together with the complements (in $\hat X$) of [compact](#def-b3-topology-compact) subsets of $X$. One checks the axioms directly; $\hat X$ is [compact](#def-b3-topology-compact) (a cover has a member containing $\infty$, whose complement is [compact](#def-b3-topology-compact), covered by finitely many others) and [Hausdorff](#def-b3-topology-hausdorff) (separate $x$ from $\infty$ by a [compact](#def-b3-topology-compact) [neighborhood](#def-b3-topology-topology) of $x$ and its complement). Example: $\hat\R \cong S^1$, and $\widehat{\R^n} \cong S^n$ by stereographic projection ([Exercise 6.11](#exo-b3-topology-11)).

## 6.4 Connectedness

**Definition 6.19.**

$X$ is *connected* if it is not the union of two disjoint nonempty [open sets](#def-b3-topology-topology) — equivalently, its only subsets both open and closed are $\varnothing$ and $X$; equivalently, every [continuous map](#def-b3-topology-continuity) $X \to \{0, 1\}$ (discrete) is constant. A subset is connected if it is as a subspace.

**Theorem 6.20.**

1. The [connected](#def-b3-topology-connected) subsets of $\R$ are exactly the intervals.
2. [Continuous](#def-b3-topology-continuity) images of [connected](#def-b3-topology-connected) sets are [connected](#def-b3-topology-connected) (whence the intermediate value theorem: a [continuous](#def-b3-topology-continuity) real map on a [connected space](#def-b3-topology-connected) has an interval as image).
3. If $(A_i)$ are [connected](#def-b3-topology-connected) with a common point, $\bigcup  A_i$ is [connected](#def-b3-topology-connected) . If $A$ is [connected](#def-b3-topology-connected) and $A \subseteq  B \subseteq \bar A$ , then $B$ is [connected](#def-b3-topology-connected) .
4. Finite products of [connected spaces](#def-b3-topology-connected) are [connected](#def-b3-topology-connected) .

**Proof.** Throughout we use the $\{0,1\}$-criterion: $f \colon X \to
\{0,1\}$ [continuous](#def-b3-topology-continuity) must be constant.

(1) A non-interval $A$ misses some $c$ between $a, b \in A$: $A = (A \cap (-\infty, c)) \sqcup (A \cap (c, +\infty))$ disconnects. Conversely let $I$ be an interval and $f \colon I
\to \{0,1\}$ [continuous](#def-b3-topology-continuity) with $f(a) = 0$, $f(b) = 1$, $a < b$. Let $c = \sup\{x \in [a,b] : f(x) = 0\}$; [continuity](#def-b3-topology-continuity) at $c$ forces $f(c) = 0$ (limit of values $0$: every [neighborhood](#def-b3-topology-topology) of $c$ meets $\{f = 0\}$; $\{f=0\}$ is closed) and then $c < b$ with $f \equiv 1$ on $(c, b]$, so $f(c) = 1$ by the same [closure](#def-b3-topology-interior) argument on $\{f = 1\} \ni c$: contradiction.

(2) A [continuous](#def-b3-topology-continuity) $g \colon f(X) \to \{0,1\}$ yields $g \circ f$ constant, so $g$ is constant on the image.

(3) A [continuous](#def-b3-topology-continuity) $f\colon \bigcup A_i \to \{0,1\}$ is constant on each $A_i$, with the same value at the common point. For the [closure](#def-b3-topology-interior): $f \colon B \to \{0,1\}$ is constant $= c$ on $A$; any $x \in B \subseteq \bar A$ is in the [closure](#def-b3-topology-interior) of $A$, and $f^{-1}
(f(x))$ is a [neighborhood](#def-b3-topology-topology) of $x$ (preimage of open), which must meet $A$: $f(x) = c$.

(4) For $X \times Y$ and $f\colon X\times Y \to \{0,1\}$: any two points $(x,y), (x',y')$ are joined by the “elbow” $\{x\}\times Y \cup X \times \{y'\}$, a union of two [connected](#def-b3-topology-connected) sets ([homeomorphic](#def-b3-topology-continuity) to $Y$, $X$) meeting at $(x, y')$: by (3) and (2), $f$ agrees on the two points. ∎

**Definition 6.21.**

$X$ is *path-connected* if any two points are joined by a *path* ([continuous](#def-b3-topology-continuity) $\gamma
\colon [0,1] \to X$). [Path-connected](#def-b3-topology-connected) implies [connected](#def-b3-topology-connected): two values of a [continuous](#def-b3-topology-continuity) $f \colon X \to \{0,1\}$ at $x, y$ are values of the constant $f\circ\gamma$ ([Theorem 6.20](#thm-b3-topology-connectedbasics)(1)–(2)). Convex subsets of normed spaces are [path-connected](#def-b3-topology-connected) (segments); so are $\R^n
\setminus \{0\}$ for $n \geq 2$ (go around the origin), and $S^n$ for $n \geq 1$ (project paths from $\R^{n+1}\setminus
\{0\}$).

**Example 6.22 (The topologist’s sine curve).**

Let $\Gamma = \{(x, \sin\frac1x) : 0 < x \leq 1\}$ and $S =
\bar\Gamma = \Gamma \cup (\{0\}\times[-1,1])$ (every point $(0,
y)$, $\abs y \leq 1$, is a limit of points of $\Gamma$: solve $\sin\frac1x = y$ near $0$). Then $S$ is *[connected](#def-b3-topology-connected)* — [closure](#def-b3-topology-interior) of the [connected](#def-b3-topology-connected) $\Gamma$, a [continuous](#def-b3-topology-continuity) image of $(0, 1]$ ([Theorem 6.20](#thm-b3-topology-connectedbasics)(3)) — but *not [path-connected](#def-b3-topology-pathconnected)*: a [path](#def-b3-topology-pathconnected) from $(1, \sin 1)$ to $(0,0)$ would have to traverse abscissas $\to 0$ while the ordinate oscillates between $\pm1$; [Exercise 6.9](#exo-b3-topology-9) makes this rigorous. [Connectedness](#def-b3-topology-connected) and [path-connectedness](#def-b3-topology-connected) genuinely differ.

![The topologist’s sine curve: the graph of 1x (red) accumulates on the whole segment \0\×(-1,1) (blue). The union is connected but not path-connected: no continuous path can cross the infinitely many oscillations in finite parameter time.](https://one-course.com/images/onecourse/chapters/math-5/b3-topology/fig-f1cdfcf49061.svg)

*The [topologist’s sine curve](#ex-b3-topology-sinecurve): the graph of $\sin\frac1x$ (red) accumulates on the whole segment $\{0\}\times[-1,1]$ (blue). The union is [connected](#def-b3-topology-connected) but not [path-connected](#def-b3-topology-pathconnected): no [continuous](#def-b3-topology-continuity) [path](#def-b3-topology-pathconnected) can cross the infinitely many oscillations in finite parameter time.*

**Definition 6.23.**

The *connected component* of $x
\in X$ is the union of all [connected](#def-b3-topology-connected) subsets containing $x$ — the largest one ([Theorem 6.20](#thm-b3-topology-connectedbasics)(3)). Components partition $X$ and are closed ([closures](#def-b3-topology-interior) of [connected](#def-b3-topology-connected) sets are [connected](#def-b3-topology-connected)). $X$ is *totally disconnected* if all components are singletons ($\Q$; the Cantor set of the weekend problem).

**Theorem 6.24.**

$\R$ is [homeomorphic](#def-b3-topology-continuity) to no $\R^n$ with $n \geq 2$.

**Proof.** Suppose $h \colon \R \to \R^n$ is a [homeomorphism](#def-b3-topology-continuity). Removing a point: $\R \setminus \{0\}$ is [homeomorphic](#def-b3-topology-continuity) to $\R^n \setminus
\{h(0)\}$. But $\R\setminus\{0\}$ is disconnected, while $\R^n\setminus\{\text{point}\}$ is [path-connected](#def-b3-topology-pathconnected) for $n \geq
2$ ([Definition 6.21](#def-b3-topology-pathconnected); translate the point to $0$): [connectedness](#def-b3-topology-connected) is a [homeomorphism](#def-b3-topology-continuity) invariant ([Theorem 6.20](#thm-b3-topology-connectedbasics)(2)) — contradiction. (That $\R^2 \not\cong \R^3$ requires finer invariants — [algebraic](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#def-b3-galois-algebraic) [topology](#def-b3-topology-topology); the weekend problem shows the danger: *[continuous](#def-b3-topology-continuity) surjections* $\R \to \R^2$ do exist.) ∎

**Method 6.25.**

To prove a set is [connected](#def-b3-topology-connected): exhibit it as a [continuous](#def-b3-topology-continuity) image, a union of overlapping [connected](#def-b3-topology-connected) sets, a [closure](#def-b3-topology-interior), or a product ([Theorem 6.20](#thm-b3-topology-connectedbasics)); for subsets of normed spaces, prove [path-connectedness](#def-b3-topology-connected) with explicit [paths](#def-b3-topology-pathconnected) (segments, arcs, elbows). To prove two spaces are *not* [homeomorphic](#def-b3-topology-continuity): find a [topological](#def-b3-topology-topology) invariant that differs — compactness, [connectedness](#def-b3-topology-connected), number of components, or components after deleting a well-chosen finite set (the trick of [Theorem 6.24](#thm-b3-topology-rnotr2): it also proves $[0,1) \not\cong
(0,1)$ and $S^1 \not\cong [0,1]$).

## 6.5 Exercises

**Exercise 6.1 ★.**

(a) List all topologies on $\{a, b\}$, classify them up to [homeomorphism](#def-b3-topology-continuity), and determine which ones are [connected](#def-b3-topology-connected) and which are [Hausdorff](#def-b3-topology-hausdorff). (b) In $\R$ (usual [topology](#def-b3-topology-topology)), compute [interior](#def-b3-topology-interior), [closure](#def-b3-topology-interior) and boundary of $\Q$, of $[0,1) \cup \{2\}$, and of $\{1/n : n \geq
1\}$.

**Solution of Exercise 6.1.**

(a) Four topologies on $\{a,b\}$: indiscrete $\{\varnothing, X\}$; discrete; the two *Sierpiński* topologies $\{\varnothing, \{a\}, X\}$ and $\{\varnothing,
\{b\}, X\}$. The last two are [homeomorphic](#def-b3-topology-continuity) (swap $a, b$): three classes. [Connected](#def-b3-topology-connected): all except the discrete one (only the discrete [topology](#def-b3-topology-topology) contains a proper nonempty clopen set). [Hausdorff](#def-b3-topology-hausdorff): only the discrete one (in the others, $b$’s only [neighborhood](#def-b3-topology-topology) is $X$, or $a$’s).

(b) $\Q$: [interior](#def-b3-topology-interior) $\varnothing$ (every interval contains irrationals), [closure](#def-b3-topology-interior) $\R$ (density), boundary $\R$. $[0,1)
\cup \{2\}$: [interior](#def-b3-topology-interior) $(0,1)$, [closure](#def-b3-topology-interior) $[0,1]\cup\{2\}$, boundary $\{0, 1, 2\}$. $\{1/n\}$: [interior](#def-b3-topology-interior) $\varnothing$, [closure](#def-b3-topology-interior) $\{1/n\}\cup\{0\}$, boundary the [closure](#def-b3-topology-interior) itself.

**Exercise 6.2 ★.**

(a) Show that $f\colon X \to Y$ is [continuous](#def-b3-topology-continuity) iff $f^{-1}(B)$ is open for every $B$ in a fixed [basis](#def-b3-topology-basis) of $Y$. (b) Show that $f = \mathbf 1_{[0,\infty)} \colon \R \to \R$ is not [continuous](#def-b3-topology-continuity) but is *[right-continuous](#def-b3-topology-continuity)*. Verify that the half-open intervals $[a, b)$ form a [basis of a topology](#def-b3-topology-basis) on the source $\R$ (the *Sorgenfrey line*), that this [topology](#def-b3-topology-topology) is strictly finer than the usual one, and that a function $\R \to
\R$ (usual target) is [continuous](#def-b3-topology-continuity) from the Sorgenfrey line iff it is [right-continuous](#def-b3-topology-continuity) at every point.

**Solution of Exercise 6.2.**

(a) Every open $V \subseteq Y$ is a union $\bigcup B_j$ of [basis](#def-b3-topology-basis) sets, and $f^{-1}(V) = \bigcup f^{-1}(B_j)$: if the latter are open, so is the former; the converse is trivial.

(b) $f^{-1}\bigl(\intoo{\frac12}{\frac32}\bigr) = [0, \infty)$ is not open: $f$ is not [continuous](#def-b3-topology-continuity); [right-continuity](#def-b3-topology-continuity) at each point is clear ($f$ is locally constant on the right of every point). The sets $[a, b)$ satisfy the [basis](#def-b3-topology-basis) criterion ([Definition 6.4](#def-b3-topology-basis)): $[a,b)\cap[c,d) = [\max(a,c),
\min(b,d))$. The Sorgenfrey [topology](#def-b3-topology-topology) is finer than the usual one, since $(a, b) = \bigcup_{a < c < b}[c, b)$; strictly: $[0,1)$ is Sorgenfrey-open, not usual-open. [Continuity](#def-b3-topology-continuity) from the Sorgenfrey line at $x$: a Sorgenfrey [neighborhood](#def-b3-topology-topology) of $x$ contains a [basis](#def-b3-topology-basis) set $[a, b) \ni x$, hence contains $[x, b)$ — so the [continuity](#def-b3-topology-continuity) condition reads: for every $\varepsilon > 0$ there is $\delta > 0$ with $\abs{f(t) - f(x)} < \varepsilon$ whenever $x \leq t < x + \delta$. That is exactly [right-continuity](#def-b3-topology-continuity) at $x$.

**Exercise 6.3 ★.**

On an infinite set with the cofinite [topology](#def-b3-topology-topology), show: any two nonempty [open sets](#def-b3-topology-topology) meet (so the space is not [Hausdorff](#def-b3-topology-hausdorff), hence not metrizable); every injective sequence converges to *every* point. Where does the uniqueness-of-limits proof use [Hausdorff](#def-b3-topology-hausdorff)?

**Solution of Exercise 6.3.**

Two nonempty opens have finite complements, so their intersection has finite complement: nonempty (the set is infinite) — no two points have disjoint [neighborhoods](#def-b3-topology-topology): not [Hausdorff](#def-b3-topology-hausdorff), hence not metrizable ([Definition 6.7](#def-b3-topology-hausdorff)). Let $(x_n)$ be injective and $x$ arbitrary: a [neighborhood](#def-b3-topology-topology) of $x$ contains a cofinite open $U$; the finitely many points of $X\setminus U$ are hit by at most finitely many indices (injectivity), so a tail of the sequence lies in $U$: $x_n \to x$, for *every* $x$. The uniqueness proof needs two disjoint [neighborhoods](#def-b3-topology-topology) to separate two alleged limits — precisely what fails here.

**Exercise 6.4 ★★.**

(a) Show that the projections $\pi_X, \pi_Y$ of a product are [continuous](#def-b3-topology-continuity) and *open* (images of opens are open), but not closed in general ($\{xy = 1\}$ in $\R^2$). (b) Show that a sequence in a countable product $\prod_n X_n$ of metric spaces converges iff each coordinate converges, and that $d(x, y) = \sum_n 2^{-n}\min(1, d_n(x_n, y_n))$ metrizes the [product topology](#def-b3-topology-constructions). (c) On $\R^\N$, show that the “box [topology](#def-b3-topology-topology)” (all products of opens are open) is strictly finer: the sequence $x^{(k)} = (1/k, 1/k, \dots)$ converges to $0$ in the [product topology](#def-b3-topology-constructions) but not in the box [topology](#def-b3-topology-topology).

**Solution of Exercise 6.4.**

(a) [Continuity](#def-b3-topology-continuity) is by construction ([Definition 6.9](#def-b3-topology-constructions)). Openness: an open $W
\subseteq X \times Y$ is a union of boxes $U_i\times V_i$, and $\pi_X(W) = \bigcup U_i$ (nonempty boxes project onto their factors), open. Not closed: $H = \{(x,y) : xy = 1\}$ is closed in $\R^2$ (preimage of $\{1\}$ under the [continuous](#def-b3-topology-continuity) product), but $\pi_X(H) = \R\setminus\{0\}$ is not closed.

(b) ($\Rightarrow$) Projections are [continuous](#def-b3-topology-continuity). ($\Leftarrow$) Let $x^{(k)} \to x$ componentwise and $W = \prod U_n$ a [basis](#def-b3-topology-basis) [neighborhood](#def-b3-topology-topology) of $x$, with $U_n = X_n$ except for $n \in F$ finite. For each $n \in F$, $x_n^{(k)} \in U_n$ for $k \geq
K_n$; for $k \geq \max_F K_n$, $x^{(k)} \in W$. The formula $d$ defines a metric (each summand is one, up to the standard verification that $\min(1, d_n)$ is); its balls: $B_d(x,
2^{-N})$ contains the [basis](#def-b3-topology-basis) box $\{y : d_n(x_n,y_n) < 2^{-N},\
n \leq N'\}$ for suitable $N'$ (the tail $\sum_{n > N'} 2^{-n}$ is small), and conversely every [basis](#def-b3-topology-basis) box contains a $d$-ball: the two topologies have the same [neighborhoods](#def-b3-topology-topology) of each point.

(c) In the [product topology](#def-b3-topology-constructions), $x^{(k)} \to 0$ by (b). The box-open set $U = \prod_n \intoo{-\tfrac1n}{\tfrac1n}$ contains $0$, but $x^{(k)} \notin U$ for every $k$ (the $n$-th coordinate $1/k
\geq 1/n$ when $n \geq k$): no tail enters $U$. The box [topology](#def-b3-topology-topology) is strictly finer and not a product-type [topology](#def-b3-topology-topology) for convergence purposes.

**Exercise 6.5 ★★.**

The circle, three ways. Show that the following are pairwise [homeomorphic](#def-b3-topology-continuity), with explicit maps: (i) $S^1 \subseteq \R^2$; (ii) $\R/\Z$ ([quotient topology](#def-b3-topology-constructions)); (iii) $[0,1]/(0 \sim 1)$. *(For (ii): show $\R/\Z$ is [Hausdorff](#def-b3-topology-hausdorff) — lift two classes to representatives at distance $\leq \frac12$ — and that $\pi([0,1])$ is everything, so the quotient is [compact](#def-b3-topology-compact); then use [Corollary 6.14](#cor-b3-topology-compacthomeo).)*

**Solution of Exercise 6.5.**

$\varphi \colon \R \to S^1$, $x \mapsto \eu^{2\iu\pi x}$, is [continuous](#def-b3-topology-continuity), surjective, and constant on classes mod $\Z$: it induces a [continuous](#def-b3-topology-continuity) bijection $\bar\varphi \colon \R/\Z \to
S^1$ ([Proposition 6.10](#prop-b3-topology-universal)(b)). The projection $\pi$ is *open*: for $U \subseteq \R$ open, $\pi^{-1}(\pi(U)) = \bigcup_{n}(U + n)$ is open, so $\pi(U)$ is open. [Hausdorff](#def-b3-topology-hausdorff): let $\bar x \neq \bar y$; choose representatives with $\delta = \min_{n}\abs{x - y - n} > 0$; the images of the intervals of radius $\delta/3$ around $x$ and $y$ are open (openness of $\pi$), contain $\bar x, \bar y$, and are disjoint (two preimage points would be $< 2\delta/3$ apart mod $\Z$). [Compact](#def-b3-topology-compact): $\R/\Z = \pi([0,1])$, a [continuous](#def-b3-topology-continuity) image of a [compact space](#def-b3-topology-compact) ([Theorem 6.13](#thm-b3-topology-compactprops)(2)). Now $\bar\varphi$ is a [continuous](#def-b3-topology-continuity) bijection from a [compact space](#def-b3-topology-compact) to the [Hausdorff](#def-b3-topology-hausdorff) $S^1$: a [homeomorphism](#def-b3-topology-continuity) ([Corollary 6.14](#cor-b3-topology-compacthomeo)).

For (iii): the composite $[0,1] \hookrightarrow \R
\xrightarrow{\pi} \R/\Z$ is [continuous](#def-b3-topology-continuity), surjective, and identifies exactly $0 \sim 1$: it induces a [continuous](#def-b3-topology-continuity) bijection $[0,1]/(0\sim1) \to \R/\Z$ from a [compact space](#def-b3-topology-compact) ([continuous](#def-b3-topology-continuity) image of $[0,1]$ under the quotient projection) to a [Hausdorff](#def-b3-topology-hausdorff) one: a [homeomorphism](#def-b3-topology-continuity). Composing: all three spaces are [homeomorphic](#def-b3-topology-continuity).

**Exercise 6.6 ★★.**

Let $X$ be a metric space. (a) Show that a finite union of [compact](#def-b3-topology-compact) subsets is [compact](#def-b3-topology-compact), and that an arbitrary intersection is. (b) If $K$ is [compact](#def-b3-topology-compact), $F$ closed, $K \cap F = \varnothing$, show $d(K, F) = \inf\{d(x,y) : x \in K, y \in F\} > 0$; give a counterexample with two disjoint closed sets. (c) Show that $X$ is [compact](#def-b3-topology-compact) iff *every* [continuous](#def-b3-topology-continuity) $f
\colon X \to \R$ is bounded. *(If some sequence has no convergent subsequence, build an unbounded [continuous](#def-b3-topology-continuity) function supported near its terms; or use $x \mapsto
d(x, \cdot)$-type functions — one clean route: if $(x_n)$ has no cluster point, the set $\{x_n\}$ is closed and discrete, and $f(x_n) = n$ extends [continuously](#def-b3-topology-continuity) by Tietze-free means: $f(x) = \sum_n n\,\max\bigl(0, 1 - \frac{d(x, x_n)}{r_n}\bigr)$ for small enough $r_n$.)*

**Solution of Exercise 6.6.**

(a) A cover of $K_1 \cup \dots \cup K_m$ restricts to a cover of each $K_j$: finitely many opens per piece suffice. An intersection $\bigcap K_i$ is closed in the [compact](#def-b3-topology-compact) $K_{i_0}$ ([compacts](#def-b3-topology-compact) are closed in the ambient metric space), hence [compact](#def-b3-topology-compact).

(b) $x \mapsto d(x, F)$ is [continuous](#def-b3-topology-continuity) ($1$-Lipschitz) and strictly positive on $K$ ($d(x, F) = 0$ means $x \in \bar F =
F$); on the [compact](#def-b3-topology-compact) $K$ it attains a minimum $m > 0$: $d(K, F)
\geq m$. Counterexample without compactness: $F_1 = \{n : n \geq
2\}$ and $F_2 = \{n + \frac1n : n \geq 2\}$ are closed, disjoint, at distance $\inf_n \frac1n = 0$.

(c) If $X$ is [compact](#def-b3-topology-compact), every [continuous](#def-b3-topology-continuity) $f$ is bounded ([Theorem 6.13](#thm-b3-topology-compactprops)(2)). Conversely, if $X$ is not [compact](#def-b3-topology-compact), take $(x_n)$ with no convergent subsequence ([Theorem 6.16](#thm-b3-topology-metriccompact)); passing to a subsequence we may assume the $x_n$ pairwise distinct, and no point of $X$ is a cluster point of the sequence, so

$$
r_n = \min\Bigl(2^{-n},\ \tfrac13\,d\bigl(x_n, \{x_m : m \neq
n\}\bigr)\Bigr) > 0,
$$

and the balls $B(x_n, r_n)$ are pairwise disjoint (a common point of the $n$-th and $m$-th would give $d(x_n, x_m) < r_n +
r_m \leq \frac23 d(x_n, x_m)$). Define

$$
f(x) = \sum_{n} n\,\max\Bigl(0,\ 1 - \frac{d(x,
x_n)}{r_n}\Bigr):
$$

at each $x$ at most one summand is nonzero, and $f(x_n) = n$. [Continuity](#def-b3-topology-continuity) at $x$: let $y_k \to x$; each value $f(y_k)$ is either $0$ or a single bump value $\mathrm{bump}_{n_k}(y_k)$. If some index $n$ occurs infinitely often, along that subsequence $f(y_k) = \mathrm{bump}_n(y_k) \to
\mathrm{bump}_n(x)$, which equals $f(x)$ (if $x \in B(x_n,
r_n)$, the whole tail lies in this open ball and no other index occurs; if $x \notin B(x_n, r_n)$ then $\mathrm{bump}_n(x) = 0 = f(x)$, since $x$, adherent to the $n$-th ball, lies in no other open ball). If $n_k \to \infty$: $d(y_k, x_{n_k}) < r_{n_k} \leq 2^{-n_k} \to 0$, so $x_{n_k}
\to x$, making $x$ a cluster point of $(x_n)$ — excluded; so this case concerns finitely many $k$ only. In every case $f(y_k) \to f(x)$: $f$ is [continuous](#def-b3-topology-continuity), and unbounded.

**Exercise 6.7 ★★.**

(Lebesgue number) Let $(U_i)$ be an open cover of a [compact](#def-b3-topology-compact) metric space $X$. Show there is $\delta > 0$ such that every subset of diameter $< \delta$ lies in a single $U_i$. *(Otherwise pick $A_n$ of diameter $< 1/n$ in no $U_i$, and a cluster point of chosen $x_n \in A_n$.)* Deduce Heine’s theorem ([Corollary 6.17](#cor-b3-topology-heineborel)(b)) again.

**Solution of Exercise 6.7.**

Suppose no $\delta$ works: for each $n$ there is $A_n$ of diameter $< 1/n$ contained in no single $U_i$; pick $x_n \in
A_n$. By compactness ([Theorem 6.16](#thm-b3-topology-metriccompact)), a subsequence $x_{n_k} \to x$; pick $i$ and $r > 0$ with $B(x,
r) \subseteq U_i$. For large $k$: $d(x_{n_k}, x) < r/2$ and $1/n_k < r/2$, so $A_{n_k} \subseteq B(x_{n_k}, 1/n_k)
\subseteq B(x, r) \subseteq U_i$ — contradiction. Heine: given $\varepsilon$, cover $Y$ by balls $B(y, \varepsilon/2)$; the preimages form an open cover of $X$; let $\delta$ be a Lebesgue number: if $d(x, x') < \delta$, the pair $\{x, x'\}$ has diameter $< \delta$, lies in one preimage, and $d(f(x),
f(x')) < \varepsilon$.

**Exercise 6.8 ★★.**

(a) Show that $GL_n(\R)$ is an open, [dense](#def-b3-topology-interior) subset of $M_n(\R)$, and that it is disconnected: the sign of the determinant separates it into (at least) two pieces. Show on the other hand that $GL_n(\C)$ is [path-connected](#def-b3-topology-pathconnected). *(For $A, B \in GL_n(\C)$: $\lambda \mapsto \det\bigl((1 -
\lambda)A + \lambda B\bigr)$ is a polynomial, not identically zero, so it has finitely many roots in $\C$: pick a [path](#def-b3-topology-pathconnected) of $\lambda$’s in $\C$ from $0$ to $1$ avoiding them.)* (b) Prove density: $A + \varepsilon I$ is invertible for small $\varepsilon > 0$.

**Solution of Exercise 6.8.**

(a) $GL_n(\R) = \det^{-1}(\R\setminus\{0\})$ is open ($\det$ is polynomial, [continuous](#def-b3-topology-continuity)). Disconnected: $\det$ maps it onto $\R\setminus\{0\}$, and a [connected space](#def-b3-topology-connected) has [connected](#def-b3-topology-connected) [continuous](#def-b3-topology-continuity) images ([Theorem 6.20](#thm-b3-topology-connectedbasics)(2)); $\R\setminus\{0\}$ is not an interval. $GL_n(\C)$: for $A, B$ invertible, $p(\lambda) = \det\bigl((1-\lambda)A + \lambda
B\bigr)$ is a polynomial in $\lambda$ with $p(0), p(1) \neq 0$, hence not identically zero: it has finitely many roots in $\C$. The plane minus finitely many points is [path-connected](#def-b3-topology-pathconnected) (avoid the points by going around), so there is a [path](#def-b3-topology-pathconnected) $\lambda(t)$ from $0$ to $1$ with $p(\lambda(t)) \neq 0$: $t \mapsto
(1-\lambda(t))A + \lambda(t)B$ is a [path](#def-b3-topology-pathconnected) in $GL_n(\C)$.

(b) $\det(A + \varepsilon I) = \chi_A(-\varepsilon)\cdot(\pm1)$ vanishes for at most $n$ values of $\varepsilon$: invertible matrices $A + \varepsilon I \to A$ as $\varepsilon \to 0$: density.

**Exercise 6.9 ★★.**

(a) Show that the [connected components](#def-b3-topology-components) of $\Q$ are the singletons, and that $\Q$ is not [locally compact](#def-b3-topology-locallycompact) (a [compact](#def-b3-topology-compact) [neighborhood](#def-b3-topology-topology) of $0$ in $\Q$ would contain $[-r, r]\cap\Q$, whose [closure](#def-b3-topology-interior) in $\Q$ is not [compact](#def-b3-topology-compact): cut at an irrational). (b) Complete [Example 6.22](#ex-b3-topology-sinecurve): no [path](#def-b3-topology-pathconnected) joins $(0,0)$ to $\Gamma$. *(If $\gamma = (\gamma_1, \gamma_2)$ is such a [path](#def-b3-topology-pathconnected), let $t^* = \sup\{t : \gamma_1(t) = 0\}$; for $t
> t^*$ the point moves on the graph; choose $t_k \downarrow
t^*$ with $\gamma_1(t_k) \to 0$ hitting abscissas where $\sin$ is alternately $\pm1$ — the intermediate value theorem supplies them — contradicting [continuity](#def-b3-topology-continuity) of $\gamma_2$ at $t^*$.)*

**Solution of Exercise 6.9.**

(a) Let $A \subseteq \Q$ contain $p < q$ and pick an irrational $\alpha \in (p, q)$: $A = (A \cap (-\infty, \alpha)) \sqcup
(A\cap(\alpha, +\infty))$ splits $A$ into two nonempty relatively open pieces: $A$ is disconnected. Components are singletons. Local compactness fails: a [compact](#def-b3-topology-compact) [neighborhood](#def-b3-topology-topology) $V$ of $0$ in $\Q$ contains $[-r, r]\cap\Q$ for some $r > 0$, which is closed in $V$, hence [compact](#def-b3-topology-compact); but a sequence of rationals in $[-r,r]$ converging (in $\R$) to an irrational has no subsequence converging *in $\Q$*: contradiction with [Theorem 6.16](#thm-b3-topology-metriccompact).

(b) Let $\gamma = (\gamma_1, \gamma_2) \colon [0,1] \to S$ be a [path](#def-b3-topology-pathconnected) with $\gamma(0) = (0,0)$ and $\gamma(1) \in \Gamma$. The set $\{t : \gamma_1(t) = 0\}$ is closed and does not contain $1$; let $t^*$ be its supremum, so $\gamma_1(t^*) = 0$ and $\gamma_1 > 0$ on $(t^*, 1]$. By [continuity](#def-b3-topology-continuity) of $\gamma_2$ at $t^*$, choose $\delta$ with $\abs{\gamma_2(t) -
\gamma_2(t^*)} < \tfrac12$ for $t \in [t^*, t^* + \delta]$. Fix $t_0 = t^* + \delta$ (may assume $\leq 1$): $\gamma_1(t_0) > 0$, and $\gamma_1$ takes every value of $(0, \gamma_1(t_0)]$ on $[t^*, t_0]$ (intermediate value theorem, [Theorem 6.20](#thm-b3-topology-connectedbasics)). Choose $k$ large with $a_k = \frac1{\pi/2 + 2k\pi} < \gamma_1(t_0)$ and $b_k =
\frac1{3\pi/2 + 2k\pi} < \gamma_1(t_0)$: there are $s, s' \in
(t^*, t_0]$ with $\gamma_1(s) = a_k$, $\gamma_1(s') = b_k$; since the points lie on the graph, $\gamma_2(s) = \sin(1/a_k) =
1$ and $\gamma_2(s') = -1$. Both cannot be within $\frac12$ of $\gamma_2(t^*)$: contradiction. $S$ is [connected](#def-b3-topology-connected) but not [path-connected](#def-b3-topology-pathconnected).

**Exercise 6.10 ★★★.**

The middle-thirds Cantor set $C = \bigcap_n C_n$, where $C_0 =
[0,1]$ and $C_{n+1}$ removes the open middle third of each interval of $C_n$. (a) Show $C = \bigl\{\sum_{n\geq1} a_n3^{-n} : a_n \in
\{0,2\}\bigr\}$, and that $C$ is [compact](#def-b3-topology-compact), with empty [interior](#def-b3-topology-interior), and has no isolated point (*[perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect)*). (b) Show that $C$ is totally disconnected. (c) Show that $x \mapsto (a_n(x))_n$ is a [homeomorphism](#def-b3-topology-continuity) $C \to
\{0,2\}^\N$ ([product topology](#def-b3-topology-constructions) on the discrete two-point space); deduce that $C$ is uncountable, and that $C \times C
\cong C$.

**Solution of Exercise 6.10.**

(a) $C_n$ consists exactly of the $x$ admitting a ternary expansion with digits in $\{0, 2\}$ up to rank $n$ (induction: removing middle thirds removes first digit $1$, etc.; endpoints have two expansions, one avoiding $1$s), so $C = \bigcap C_n$ is the set of sums $\sum a_n3^{-n}$, $a_n \in \{0,2\}$. [Compact](#def-b3-topology-compact): each $C_n$ is a finite union of closed intervals; $C$ is closed in $[0,1]$. Empty [interior](#def-b3-topology-interior): $C \subseteq C_n$, a union of intervals of length $3^{-n}$; an [interior](#def-b3-topology-interior) interval of length $\ell > 0$ would fit in one of them for all $n$. [Perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect): given $x \in C$ and $m$, flip the digit $a_m$: the new point is in $C$, distinct, within $2\cdot3^{-m}$ of $x$.

(b) If $x \neq y \in C$, their expansions first differ at some rank $k$; between them lies a removed middle-third interval (the gap at rank $k$ separating digit $0$ from digit $2$), providing a point $c \notin C$, $x < c < y$ (say): $C =
(C \cap (-\infty, c)) \sqcup (C \cap (c, \infty))$ splits any subset containing both points. Components are singletons.

(c) The digit map $\beta\colon x \mapsto (a_n(x))$ is a bijection onto $\{0,2\}^\N$ (existence and uniqueness of $\{0,2\}$-expansions: distinct digit sequences give points at distance $\geq 3^{-k} > 0$ where they first differ, as in [Problem 6.1](#pb-b3-topology-1), question 1). It is [continuous](#def-b3-topology-continuity): $\abs{x - y} < 3^{-m}$ forces agreement of the first $m$ digits (same computation), so $\beta$ maps small balls into [basis](#def-b3-topology-basis) boxes. A [continuous](#def-b3-topology-continuity) bijection from the [compact](#def-b3-topology-compact) $C$ to the [Hausdorff](#def-b3-topology-hausdorff) product is a [homeomorphism](#def-b3-topology-continuity) ([Corollary 6.14](#cor-b3-topology-compacthomeo); the product is [Hausdorff](#def-b3-topology-hausdorff): separate at a differing coordinate). Uncountability: Cantor’s diagonal on $\{0,2\}^\N$. Finally $\{0,2\}^\N \times
\{0,2\}^\N \cong \{0,2\}^\N$ by interleaving digits (a [homeomorphism](#def-b3-topology-continuity): componentwise [continuity](#def-b3-topology-continuity) both ways), so $C
\times C \cong C$.

**Exercise 6.11 ★★★.**

Stereographic projection: from the north pole $N = (0, \dots,
0, 1)$ of $S^n \subseteq \R^{n+1}$, the map $\sigma(x) =
\frac{(x_1, \dots, x_n)}{1 - x_{n+1}}$ is a [homeomorphism](#def-b3-topology-continuity) $S^n
\setminus \{N\} \to \R^n$ (give the inverse explicitly). Deduce that $S^n$ is [homeomorphic](#def-b3-topology-continuity) to the [one-point compactification](#def-b3-topology-locallycompact) $\widehat{\R^n}$, and that removing *any* point of $S^n$ leaves a space [homeomorphic](#def-b3-topology-continuity) to $\R^n$.

**Solution of Exercise 6.11.**

For $y \in \R^n$, set

$$
\tau(y) = \Bigl(\frac{2y}{\norm y^2 + 1},\ \frac{\norm y^2 -
1}{\norm y^2 + 1}\Bigr) \in \R^n\times\R = \R^{n+1}.
$$

One checks $\norm{\tau(y)} = 1$, $\tau(y) \neq N$, and $\sigma(\tau(y)) = y$, $\tau(\sigma(x)) = x$: $\sigma$ and $\tau$ are mutually inverse, both [continuous](#def-b3-topology-continuity) (rational formulas with nonvanishing denominators): $S^n\setminus\{N\} \cong
\R^n$. Extend to $\hat\sigma \colon S^n \to \widehat{\R^n}$ by $N \mapsto \infty$: a bijection, [continuous](#def-b3-topology-continuity) at every point of $S^n\setminus\{N\}$, and at $N$: a [basis](#def-b3-topology-basis) [neighborhood](#def-b3-topology-topology) of $\infty$ is $\widehat{\R^n}\setminus K$, $K$ [compact](#def-b3-topology-compact), $K
\subseteq \bar B(0, R)$; since $\norm{\sigma(x)}^2 = \frac{1 +
x_{n+1}}{1 - x_{n+1}} \to \infty$ as $x_{n+1} \to 1$, the set $\{x \in S^n : x_{n+1} > 1 - \eta\}$ maps outside $\bar B(0,R)$ for small $\eta$: [continuity](#def-b3-topology-continuity). A [continuous](#def-b3-topology-continuity) bijection from the [compact](#def-b3-topology-compact) $S^n$ to the [Hausdorff](#def-b3-topology-hausdorff) $\widehat{\R^n}$ is a [homeomorphism](#def-b3-topology-continuity). Removing another point $p$: a rotation of $S^n$ maps $p$ to $N$ (rotations are [homeomorphisms](#def-b3-topology-continuity)), reducing to the computed case: $S^n \setminus \{p\} \cong \R^n$.

**Exercise 6.12 ★★★.**

(The [topologist’s sine curve](#ex-b3-topology-sinecurve)) Let

$$
T = \bigl\{(x, \sin\tfrac1x) : 0 < x \leq 1\bigr\}
\cup \bigl(\{0\}\times\intcc{-1}1\bigr) \subseteq \R^2 .
$$

(a) Show that $T$ is [compact](#def-b3-topology-compact), and that it is the [closure](#def-b3-topology-interior) of the graph part. (b) Show that $T$ is [connected](#def-b3-topology-connected) *(the graph is [connected](#def-b3-topology-connected) as a [continuous](#def-b3-topology-continuity) image; its [closure](#def-b3-topology-interior) remains [connected](#def-b3-topology-connected))*. (c) Show that $T$ is *not* [path-connected](#def-b3-topology-pathconnected): no [continuous](#def-b3-topology-continuity) [path](#def-b3-topology-pathconnected) joins $(0,0)$ to $(1, \sin1)$. *(If $\gamma =
(\gamma_1, \gamma_2)$ is such a [path](#def-b3-topology-pathconnected), let $t^* = \sup\{t :
\gamma_1(t) = 0\}$; just after $t^*$, $\gamma_1$ takes all small positive values (intermediate value theorem), so $\gamma_2$ oscillates between $\pm1$ on every interval $(t^*, t^* + \delta)$ — contradict [continuity](#def-b3-topology-continuity) at $t^*$.)* (d) Conclude that [path-connectedness](#def-b3-topology-connected) is strictly stronger than [connectedness](#def-b3-topology-connected), and show that no such example can be open in $\R^n$: an *open* [connected](#def-b3-topology-connected) subset of $\R^n$ is [path-connected](#def-b3-topology-pathconnected) *(the set of points joinable to a base point by a [path](#def-b3-topology-pathconnected) is open and closed in the domain)*.

**Solution of Exercise 6.12.**

(a) $T$ is bounded, and closed: a limit of points of $T$ with abscissas $\to x_0 > 0$ stays on the (locally closed) graph by [continuity](#def-b3-topology-continuity) of $\sin\frac1x$ on $\intoc01$; a limit with abscissas $\to 0$ has ordinate in $\intcc{-1}1$, hence lies in the segment. [Compact](#def-b3-topology-compact) by Heine–Borel ([Corollary 6.17](#cor-b3-topology-heineborel)). [Closure](#def-b3-topology-interior) of the graph $\Gamma$: every point $(0, y)$, $y \in \intcc{-1}1$, is a limit of graph points — solve $\sin\frac1x = y$ near $0$ (the function sweeps $\intcc{-1}1$ on each interval $[\frac1{(k+1)\pi}, \frac1{k\pi}]$): $\bar\Gamma = T$.

(b) $\Gamma$ is the [continuous](#def-b3-topology-continuity) image of the [connected](#def-b3-topology-connected) $\intoc01$ under $x \mapsto (x, \sin\frac1x)$: [connected](#def-b3-topology-connected); and the [closure](#def-b3-topology-interior) of a [connected](#def-b3-topology-connected) set is [connected](#def-b3-topology-connected) ([Theorem 6.20](#thm-b3-topology-connectedbasics)): $T = \bar\Gamma$ is [connected](#def-b3-topology-connected).

(c) Suppose $\gamma\colon\intcc01\to T$ is [continuous](#def-b3-topology-continuity) with $\gamma(0) = (0,0)$, $\gamma(1) = (1, \sin1)$, and let $t^*
= \sup\{t : \gamma_1(t) = 0\}$: by [continuity](#def-b3-topology-continuity) $\gamma_1(t^*)
= 0$ and $\gamma_1 > 0$ on $\intoc{t^*}1$. For every $\delta > 0$, the interval $\intoc{t^*}{t^*+\delta}$ has $\gamma_1$ taking all values in some $\intoc0\eta$ (intermediate value theorem, $\gamma_1(t^* + \delta) > 0$); in particular it contains abscissas of the form $\frac1{\pi/2 + 2k\pi}$ and $\frac1{-\pi/2 + 2k\pi}$ for arbitrarily large $k$, at which $\gamma_2 = \pm1$. So on every [right-neighborhood](#def-b3-topology-topology) of $t^*$, $\gamma_2$ takes both values $1$ and $-1$: $\gamma_2$ has no limit at $t^{*+}$, contradicting [continuity](#def-b3-topology-continuity). No [path](#def-b3-topology-pathconnected) exists.

(d) $T$ is [connected](#def-b3-topology-connected) but not [path-connected](#def-b3-topology-pathconnected): the two notions differ. For open $U \subseteq \R^n$ [connected](#def-b3-topology-connected) and $a \in U$, let $V$ be the set of points of $U$ joinable to $a$ by a [path](#def-b3-topology-pathconnected) in $U$. $V$ is open: around $x \in V$ a ball $B(x, r)
\subseteq U$ is starlike, and concatenating the [path](#def-b3-topology-pathconnected) to $x$ with a segment reaches every point of the ball. $V$ is closed in $U$: if $x \in U \setminus V$, the same ball argument shows $B(x, r) \cap V = \varnothing$ (a point of $V$ in the ball would join $a$ to $x$). Nonempty ($a \in
V$), open and closed in the [connected](#def-b3-topology-connected) $U$: $V = U$. The sine curve evades this by being closed with empty [interior](#def-b3-topology-interior): its “bad” point $(0,0)$ has no ball inside $T$ to bridge the oscillations.

## 6.6 Problem: the Cantor set and a space-filling curve

**Problem 6.1.**

Weekend problem — Peano curves exist, and why they are not homeomorphisms

In 1890 Peano stunned analysis with a *[continuous](#def-b3-topology-continuity) surjection* $[0,1] \to [0,1]^2$: a curve filling a square. We build one with bare hands from the Cantor set $C$ of [Exercise 6.10](#exo-b3-topology-10) (whose results may be used freely), and then prove that no such map can be injective: squares are not curves. Throughout, elements of $C$ are written $x =
\sum_{n \geq 1} \frac{2b_n(x)}{3^n}$ with digits $b_n(x) \in
\{0, 1\}$.

**Part I — Reading off digits [continuously](#def-b3-topology-continuity).**

1. Show that if $x, y \in C$ satisfy $\abs{x - y} <  3^{-m}$ , then $b_n(x) = b_n(y)$ for all $n \leq m$ . *(If the first differing digit is $b_k$, then $\abs{x - y} \geq \frac{2}{3^k} - \sum_{j>k}\frac2{3^j}  = \frac1{3^k}$.)*
2. Deduce that each digit function $b_n \colon C \to \{0,  1\}$ is [continuous](#def-b3-topology-continuity) , and re-derive the [homeomorphism](#def-b3-topology-continuity) $C  \cong \{0,1\}^\N$ of [Exercise 6.10](#exo-b3-topology-10) (c).

**Part II — A [continuous](#def-b3-topology-continuity) surjection $C \to
[0,1]^2$.**

3. Define $g \colon C \to [0,1]$ by $g(x) = \sum_{n\geq1}  b_n(x)\,2^{-n}$ (read the Cantor digits as binary). Show that $g$ is [continuous](#def-b3-topology-continuity) (use question 1) and surjective. Is it injective?
4. Define $\Phi \colon C \to [0,1]^2$ by $$\Phi(x) = \Bigl(\ \sum_{n\geq1} b_{2n-1}(x)\,2^{-n},\  \sum_{n\geq1} b_{2n}(x)\,2^{-n}\ \Bigr)$$ (odd digits give the abscissa, even digits the ordinate). Show that $\Phi$ is [continuous](#def-b3-topology-continuity) and surjective.

**Part III — Filling the gaps: the Peano curve.**

5. The complement $[0,1] \setminus C$ is a countable union of disjoint open intervals $(u, v)$ (the removed middle thirds) whose endpoints lie in $C$. Define $f \colon  [0,1] \to [0,1]^2$ by $f = \Phi$ on $C$, extended *affinely* on each gap: $$f(t) = \frac{v - t}{v - u}\,\Phi(u) +  \frac{t - u}{v - u}\,\Phi(v),  \qquad t \in (u, v).$$ Show that $f$ is well defined and surjective onto $[0,1]^2$.
6. Show that $f$ is [continuous](#def-b3-topology-continuity) at every point of $[0,1]  \setminus C$ (locally affine), and at every point of $C$ : given $\varepsilon$ , pick $m$ with $2^{-m} <  \varepsilon/2$ and use question 1 to control $\Phi$ on $C$ near $x$ , then check that the affine interpolation cannot escape: on a gap $(u,v) \subseteq  (x - 3^{-m}, x + 3^{-m})$ , the values $f(t)$ lie on the segment $[\Phi(u), \Phi(v)]$ , both ends close to $\Phi(x)$ . Conclude: $f$ is a *[continuous](#def-b3-topology-continuity) surjection* $[0,1] \to [0,1]^2$ .
7. Deduce [continuous](#def-b3-topology-continuity) surjections $[0,1] \to [0,1]^n$ for every $n \geq 2$ , and $\R \to \R^2$ .

**Part IV — But never injective.**

8. Show that a [continuous](#def-b3-topology-continuity) *injection* $f \colon [0,1]  \to [0,1]^2$ would be a [homeomorphism](#def-b3-topology-continuity) onto its image ( [Corollary 6.14](#cor-b3-topology-compacthomeo) ).
9. Show that $[0,1]$ and $[0,1]^2$ are not [homeomorphic](#def-b3-topology-continuity) : remove a well-chosen point and compare [connectedness](#def-b3-topology-connected) ( [Method 6.25](#met-b3-topology-connectargument) ).
10. Conclude: a [continuous](#def-b3-topology-continuity) surjection $[0,1] \to [0,1]^2$ can never be injective — an injective one would make $[0,1]^2 = f([0,1])$ [homeomorphic](#def-b3-topology-continuity) to $[0,1]$ by question 8, contradicting question 9. Where exactly did compactness of $[0,1]$ enter the argument?
11. (Culmination) Assemble the moral: there is a [continuous](#def-b3-topology-continuity) surjection but no [continuous](#def-b3-topology-continuity) bijection $[0,1] \to  [0,1]^2$ . What does this say about “dimension” as a [topological](#def-b3-topology-topology) notion? Formulate precisely one theorem proved in this problem and one plausible statement that remains beyond our tools (invariance of domain).

**Part V — The arithmetic of the Cantor set.**

12. Prove that $C + C = [0, 2]$ : given $t \in [0, 1]$ , write $t = \sum_n d_n3^{-n}$ with digits $d_n \in \{0,  1, 2\}$ and split each digit as $d_n = a_n + b_n$ with $a_n, b_n \in \{0, 1\}$ ; conclude that $\frac C2 +  \frac C2 = [0, 1]$ *(which subset of $[0,1]$ is $\frac C2$, in terms of ternary digits?)* , then rescale. No carries are ever needed — say why this is the crux.
13. Interpret geometrically: the “Cantor dust” $C \times  C \subseteq \R^2$ , of empty [interior](#def-b3-topology-interior) , casts a *full* shadow on the diagonal: the projection $(x,  y) \mapsto x + y$ maps it onto $[0, 2]$ . Also record the self-similarity $C = \frac C3 \cup \bigl(\frac C3 +  \frac23\bigr)$ , the equation behind every picture of $C$ .
14. Show that digit interleaving defines a [homeomorphism](#def-b3-topology-continuity) $C  \to C \times C$ , and deduce $C \cong C^n$ for every $n$ — the Cantor set is its own square, cube, … Which familiar spaces share this property?
15. Show that $\frac14 \in C$ *(compute its ternary expansion: $\frac14 = \sum_{k\geq1} 2\cdot3^{-2k}$)* although $\frac14$ is an endpoint of no removed interval; deduce — counting endpoints — that endpoints form a countable, proper subset of $C$ .
16. Show that the binary-reading map $g$ of question 3 is at most $2$ -to- $1$ , and describe exactly which points of $[0,1]$ have two preimages. ( $g$ collapses $C$ onto $[0,1]$ by gluing countably many pairs: the combinatorial shadow of the Cantor staircase met again in [Chapter 9](https://one-course.com/books/math/5/en/chapter/9-measure-theory#ch-b3-measure) .)

**Part VI — [Perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) sets: Cantor everywhere.** A nonempty [compact](#def-b3-topology-compact) metric space $P$ is *[perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect)* if it has no isolated point.

17. Let $P$ be [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) and let $x \in P$ , $r > 0$ . Show that the ball $B(x, r)$ contains two points $y_0  \neq y_1$ of $P$ , and hence two *disjoint* closed balls $\bar B(y_0, \rho)$ , $\bar B(y_1, \rho)$ inside $B(x, r)$ , centered at points of $P$ , of radius $\rho  \leq r/4$ as small as desired. Explain why perfection (no isolated points) is exactly what allows this splitting to be repeated inside *each* of the two new balls.
18. Iterate: build closed sets $F_w \neq \varnothing$ indexed by finite binary words $w$ , with $F_{w0},  F_{w1} \subseteq F_w$ disjoint and $\operatorname{diam}F_w \leq 2^{-\abs w}  \operatorname{diam}P$ . Show that for every infinite word $\varepsilon \in \{0,1\}^\N$ the intersection $\bigcap_mF_{\varepsilon_1\cdots\varepsilon_m}$ is a single point $h(\varepsilon)$ *(finite intersection property of the [compact](#def-b3-topology-compact) $P$)* .
19. Show that $h\colon\{0,1\}^\N \to P$ is injective and [continuous](#def-b3-topology-continuity) , and conclude: *every [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) metric space is uncountable* — in fact of cardinality at least that of $\{0,1\}^\N$ . Recover: $[0,1]$ and $C$ are uncountable.
20. Show that $h$ is a [homeomorphism](#def-b3-topology-continuity) onto its image *([continuous](#def-b3-topology-continuity) injection from a [compact](#def-b3-topology-compact), [Corollary 6.14](#cor-b3-topology-compacthomeo))* : every [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) metric space contains a [homeomorphic](#def-b3-topology-continuity) copy of the Cantor set. The Cantor set is not an oddity but the universal germ of [compact](#def-b3-topology-compact) perfection.
21. Deduce that every countable [compact](#def-b3-topology-compact) metric space has an isolated point, and exhibit one where the isolated points are [dense](#def-b3-topology-interior) but not everything: $K = \{0\} \cup  \{\frac1n : n \geq 1\}$ .
22. (Cantor–Bendixson for $\R$ ) Let $F \subseteq \R$ be closed. Call $x$ a *condensation point* of $F$ if every [neighborhood](#def-b3-topology-topology) of $x$ meets $F$ uncountably. Show that the condensation points of an uncountable closed $F$ form a nonempty [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) closed set $P$ , and $F  \setminus P$ is countable *(cover the non-condensation points by countably many rational intervals meeting $F$ countably)* . Conclude: every closed subset of $\R$ is countable or has the cardinality of the continuum — the continuum hypothesis holds for closed sets.

**Part VII — Codas: how regular, and how far from [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect).**

23. (Hölder regularity of the curve) Set $\alpha =  \frac{\ln 2}{2\ln 3} \approx 0.3155$, and note the identity $3^\alpha = \sqrt2$. Using question 1, show that $$\norm{\Phi(x) - \Phi(y)}_\infty \leq 2\,\abs{x -  y}^\alpha \qquad (x, y \in C),$$ then propagate the estimate through the affine gaps: show that the Peano curve $f$ of question 6 satisfies $\norm{f(t) - f(s)}_\infty \leq 6\abs{t - s}^\alpha$ on all of $[0,1]$ *(treat a pair in the same gap by interpolation, then a general pair by passing through the extreme points of $C \cap [t, s]$)*.
24. (The exponent $\frac12$ is a wall) Show that no surjection $F \colon [0,1] \to [0,1]^2$ can be $\alpha$ -Hölder with $\alpha > \frac12$ : cut $[0,1]$ into $N$ intervals, bound the diameters of their images, and count the points of the grid $\bigl(\frac iM, \frac jM\bigr)$ , $0 \leq i, j \leq M$ , that a set of diameter $< \frac1M$ can contain; choose $M$ of order $N^\alpha$ and let $N \to \infty$ . Locate our curve ( $\alpha \approx 0.3155$ ) relative to the wall, and record without proof that Hilbert’s curve achieves the critical exponent $\frac12$ .
25. (Derived sets: measuring imperfection) For $F$ closed in $\R$, let $F'$ be the set of limit points of $F$ (a closed subset), and iterate: $F^{(0)} = F$, $F^{(i+1)}  = (F^{(i)})'$. Verify that $$K = \{0\} \cup \Bigl\{\frac1m\Bigr\}_{m \geq 1} \cup  \Bigl\{\frac1m + \frac1n : m \geq 1,\ n > m^2\Bigr\}$$ is a countable [compact](#def-b3-topology-compact) set with $K' = \{0\} \cup  \{\frac1m\}$, $K'' = \{0\}$, $K''' = \varnothing$ *(check that the $m$-th cluster lives in the interval $(\frac1m, \frac1{m-1})$, so the clusters do not interleave)*, and that its isolated points are [dense](#def-b3-topology-interior) in $K$, as question 21 predicts. Describe the induction producing, for every $j$, a countable [compact](#def-b3-topology-compact) $K_j$ with $K_j^{(j)} = \{0\}$ and $K_j^{(j+1)} =  \varnothing$, and contrast with the [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) sets of question 22, for which the derivation never moves: finite rank is the exact opposite of perfection.

**Solution of Problem 6.1.**

**1.** Suppose the expansions of $x, y \in C$ first differ at rank $k \leq m$, say $b_k(x) = 1$, $b_k(y) = 0$. Then

$$
x - y \;\geq\; \frac{2}{3^k} - \sum_{j > k}\frac{2}{3^j}
= \frac{2}{3^k} - \frac{1}{3^k} = \frac1{3^k} \geq \frac1{3^m}:
$$

contrapositive: $\abs{x - y} < 3^{-m}$ forces agreement up to rank $m$.

**2.** By question 1, $b_n$ is constant on $C \cap (x -
3^{-n}, x + 3^{-n})$: locally constant, hence [continuous](#def-b3-topology-continuity). The map $x \mapsto (b_n(x))_n \in \{0,1\}^\N$ is [continuous](#def-b3-topology-continuity) (componentwise, [Proposition 6.10](#prop-b3-topology-universal)(a)) and bijective (unique $\{0,2\}$-digit expansions); from the [compact](#def-b3-topology-compact) $C$ to a [Hausdorff space](#def-b3-topology-hausdorff), it is a [homeomorphism](#def-b3-topology-continuity) ([Corollary 6.14](#cor-b3-topology-compacthomeo)).

**3.** [Continuity](#def-b3-topology-continuity): if $\abs{x - y} < 3^{-m}$, the first $m$ digits agree, so $\abs{g(x) - g(y)} \leq \sum_{n > m}2^{-n}
= 2^{-m}$. Surjectivity: every $t \in [0,1]$ has a binary expansion $t = \sum b_n2^{-n}$, and $t = g\bigl(\sum
2b_n3^{-n}\bigr)$. Not injective: $g$ identifies the two Cantor points with digits $(0,1,1,1,\dots)$ and $(1,0,0,\dots)$ — both map to $\frac12$ (the dyadic ambiguity $0.0111\ldots_2 =
0.1000\ldots_2$).

**4.** Each component of $\Phi$ is [continuous](#def-b3-topology-continuity) by the same estimate (its digits are a subsequence of the $b_n$). Surjectivity: given $(s, t) \in [0,1]^2$, choose binary digits $(c_n)$ of $s$ and $(d_n)$ of $t$, and interleave: the point $x
\in C$ with $b_{2n-1}(x) = c_n$, $b_{2n}(x) = d_n$ satisfies $\Phi(x) = (s,t)$.

**5.** The gaps are pairwise disjoint with endpoints in $C$, so the formula defines $f$ unambiguously on $[0,1]$; at the endpoints of a gap the affine formula returns $\Phi(u)$, $\Phi(v)$: consistent with $f = \Phi$ on $C$. Surjectivity: already $f(C) = \Phi(C) = [0,1]^2$.

**6.** At $t_0 \notin C$: $t_0$ lies in an open gap on which $f$ is affine: [continuous](#def-b3-topology-continuity). At $x \in C$: we first record two estimates.

*(i) On $C$*: if $\abs{y - x} \leq 3^{-M}$, $y \in C$, then the digits agree up to $M$, so each component of $\Phi(y)
- \Phi(x)$ is at most $\sum_{n > \lfloor M/2\rfloor} 2^{-n} =
2^{-\lfloor M/2\rfloor}$.

*(ii) Across a gap*: a gap $(u,v)$ removed at stage $k$ has length $3^{-k}$, and its endpoints have digits agreeing up to rank $k - 1$ (they differ from rank $k$ on), so $\norm{\Phi(v) - \Phi(u)}_\infty \leq
2^{-\lfloor (k-1)/2\rfloor}$.

Now let $\abs{t - x} < 3^{-M}$ with $t$ in a gap $(u, v)$ of stage $k$, and say $u$ is the endpoint on $x$’s side, so $\abs{u - x} < 3^{-M}$ and $0 < t - u < 3^{-M}$. Then

$$
\norm{f(t) - \Phi(x)}_\infty
\leq \norm{\Phi(u) - \Phi(x)}_\infty
+ \frac{t - u}{v - u}\,\norm{\Phi(v) - \Phi(u)}_\infty
\leq 2^{-\lfloor M/2\rfloor} + \min\bigl(1,\ 3^{k - M}\bigr)\,
2^{-\lfloor(k-1)/2\rfloor} .
$$

For $k \geq M$ the last term is $\leq 2^{-\lfloor(M-1)/2
\rfloor}$; for $k < M$, since $2^{-\lfloor(k-1)/2\rfloor} \leq
\sqrt2\,\cdot 2^{-k/2}$,

$$
3^{k-M}\,2^{-\lfloor(k-1)/2\rfloor}
\leq \sqrt2\,\Bigl(\frac{3}{\sqrt2}\Bigr)^{k} 3^{-M}
\leq \sqrt2\,\Bigl(\frac{3}{\sqrt2}\Bigr)^{M} 3^{-M}
= \sqrt2\; 2^{-M/2}
$$

(the middle quantity increases in $k$). In all cases $\norm{f(t) - \Phi(x)}_\infty \leq C\,2^{-M/2}$ with an absolute constant $C$: letting $M \to \infty$ proves [continuity](#def-b3-topology-continuity) at $x$ (points $t \in C$ are covered by (i)). Hence $f$ is a [continuous](#def-b3-topology-continuity) surjection $[0,1] \to [0,1]^2$ — indeed the estimates show it is Hölder of exponent $\log 2/(2\log
3)$-flavor, but [continuity](#def-b3-topology-continuity) is all we claimed.

**7.** For $[0,1]^n$: split the digits of $x \in C$ into $n$ interleaved subsequences and repeat questions 4–6 verbatim. For $\R \to \R^2$: let $h \colon [0,1] \to [-1,1]^2$ be a [continuous](#def-b3-topology-continuity) surjection (rescale $f$). Define $F$ on $[m, m
+ \frac12]$ ($m \in \Z$) as a copy of $h$ rescaled to fill $[-(m+1), m+1]^2$ for $m \geq 0$ (and symmetrically for $m <
0$), and on $[m + \frac12, m + 1]$ as the affine segment joining the endpoint values: $F$ is [continuous](#def-b3-topology-continuity) (gluing on closed pieces, [Proposition 6.6](#prop-b3-topology-gluing)(b)) and its image contains $\bigcup_m [-(m+1), m+1]^2 = \R^2$.

**8.** $[0,1]$ is [compact](#def-b3-topology-compact) and $[0,1]^2$ [Hausdorff](#def-b3-topology-hausdorff): a [continuous](#def-b3-topology-continuity) injection is a [homeomorphism](#def-b3-topology-continuity) onto its image ([Corollary 6.14](#cor-b3-topology-compacthomeo) applied to the corestriction).

**9.** Remove $\frac12$: $[0,1]\setminus\{\frac12\}$ is disconnected. If $h \colon [0,1] \to [0,1]^2$ were a [homeomorphism](#def-b3-topology-continuity), $[0,1]^2\setminus\{h(\frac12)\}$ would be disconnected too ([homeomorphic](#def-b3-topology-continuity) images of disconnected spaces are disconnected); but the square minus a point is [path-connected](#def-b3-topology-pathconnected): join two points by a two-segment [path](#def-b3-topology-pathconnected) avoiding the puncture. Contradiction: $[0,1] \not\cong [0,1]^2$.

**10.** By question 8, an injective [continuous](#def-b3-topology-continuity) surjection $[0,1] \to [0,1]^2$ would be a [homeomorphism](#def-b3-topology-continuity), contradicting question 9. Compactness entered exactly in [Corollary 6.14](#cor-b3-topology-compacthomeo): it is what makes the [continuous](#def-b3-topology-continuity) bijection’s inverse [continuous](#def-b3-topology-continuity) (images of closed sets are [compact](#def-b3-topology-compact), hence closed). Without compactness the conclusion genuinely fails: $[0, 2\pi) \to S^1$ is a [continuous](#def-b3-topology-continuity) bijection that is not a [homeomorphism](#def-b3-topology-continuity).

**11.** Proved here: *there is a [continuous](#def-b3-topology-continuity) surjection, but no [continuous](#def-b3-topology-continuity) bijection, from $[0,1]$ onto $[0,1]^2$; in particular $[0,1] \not\cong [0,1]^2$.* So “dimension” is not preserved by [continuous](#def-b3-topology-continuity) surjections — cardinality and even [continuity](#def-b3-topology-continuity) cannot see it — but it *is* a [topological](#def-b3-topology-topology) invariant at the level of [homeomorphisms](#def-b3-topology-continuity), at least for $1$ versus $2$ dimensions, where connectedness-after-deletion suffices. The general statement — *invariance of domain*: $\R^m \cong \R^n$ implies $m =
n$, and a [continuous](#def-b3-topology-continuity) injection $\R^n \to \R^n$ is open — is true but requires [algebraic](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#def-b3-galois-algebraic) [topology](#def-b3-topology-topology) (homology), beyond this course.

**12.** In ternary, $\frac C2 = \{\sum_na_n3^{-n} : a_n
\in \{0, 1\}\}$ (halving digits $\{0,2\}$ gives digits $\{0,1\}$). For $t \in [0,1]$, pick any ternary expansion $t =
\sum_nd_n3^{-n}$, $d_n \in \{0,1,2\}$, and split every digit as $d_n = a_n + b_n$ with $a_n, b_n \in \{0,1\}$ ($0 = 0{+}0$, $1 = 1{+}0$, $2 = 1{+}1$): then $t \in \frac C2 + \frac C2$. The crux is that each digit splits *within* $\{0,1\}$, so no carry ever propagates and the digits can be treated independently. The reverse inclusion is clear (digit sums stay $\leq 2$). Rescaling by $2$: $C + C = [0,2]$.

**13.** The map $(x, y) \mapsto x + y$ sends $C \times C$ onto $C + C = [0,2]$: the dust, which contains no square (empty [interior](#def-b3-topology-interior): [Exercise 6.10](#exo-b3-topology-10)), projects along the antidiagonal onto a full segment. Self-similarity: the first ternary digit of a Cantor point is $0$ or $2$, and stripping it gives $C = \frac C3 \cup \bigl(\frac C3 +
\frac23\bigr)$ — the fixed-point equation that generates every picture of $C$.

**14.** Through $C \cong \{0,1\}^\N$ (question 2), the interleaving $(\varepsilon, \varepsilon') \mapsto
(\varepsilon_1, \varepsilon_1', \varepsilon_2,
\varepsilon_2', \dots)$ is a bijection $\{0,1\}^\N\times\{0,1\}^\N \to \{0,1\}^\N$, [continuous](#def-b3-topology-continuity) both ways (each output coordinate depends on a single input coordinate; [product topology](#def-b3-topology-constructions)). Hence $C\times C \cong C$ and inductively $C^n \cong C$. Familiar spaces do not share this: $\R^2 \not\cong \R$ and $[0,1]^2 \not\cong [0,1]$ (question 11); infinite products do: $([0,1]^\N)^2 \cong
[0,1]^\N$ by the same interleaving.

**15.** $\sum_{k\geq1}2\cdot3^{-2k} = 2\cdot\frac{1/9}{1
- 1/9} = \frac14$: the ternary expansion of $\frac14$ is $0.\overline{02}$, with digits in $\{0,2\}$, so $\frac14 \in
C$; being neither a finite expansion nor an eventually-$2$ tail, it is an endpoint of no removed middle third. Endpoints form a countable set (two per removed interval, countably many intervals), while $C \cong \{0,1\}^\N$ is uncountable (diagonal argument, or question 19): almost every Cantor point is, like $\frac14$, invisible in the usual endpoint picture.

**16.** $g(x) = g(y)$ means that the binary sequences $(b_n(x))$, $(b_n(y))$ represent the same real. Distinct binary sequences representing the same number occur exactly in the dyadic ambiguity $0.w01^\infty = 0.w10^\infty$: at most two preimages, and exactly two precisely at the dyadic rationals of $(0,1)$. So $g$ collapses $C$ onto $[0,1]$ by gluing countably many pairs — the combinatorial skeleton of the Cantor staircase of [Chapter 9](https://one-course.com/books/math/5/en/chapter/9-measure-theory#ch-b3-measure).

**17.** $x$ is not isolated in $P$, so $B(x, r/2)$ contains some $y_0 \in P \setminus \{x\}$; $y_0$ is not isolated either, so $B(x, r/2)$ contains a second point $y_1
\in P$. Any $\rho \leq \min\bigl(\frac{d(y_0,y_1)}3,
\frac r4\bigr)$ makes $\bar B(y_0, \rho)$ and $\bar B(y_1,
\rho)$ disjoint and contained in $B(x, r)$. Both are centered at points of $P$, where the same two-point extraction can be repeated: perfection is the inexhaustible supply of nearby points that keeps the recursion alive forever.

**18.** Build $F_w$ by induction on the word length: $F_\varnothing = P$, and inside each ball $B(y_w, \rho_w)$ question 17 yields two disjoint closed balls of radius $\leq
\min(\rho_w/2,\ 2^{-\abs w-1}\operatorname{diam}P)$ centered at points of $P$; set $F_{wi} = \bar B(y_{wi}, \rho_{wi})
\cap P$: nonempty (its [center](https://one-course.com/books/math/5/en/chapter/1-group-theory#ex-b3-groups-actions)) and [compact](#def-b3-topology-compact). For infinite $\varepsilon$, the nested nonempty [compacts](#def-b3-topology-compact) $F_{\varepsilon_1\cdots\varepsilon_m}$ have nonempty intersection (finite intersection property in the [compact](#def-b3-topology-compact) $P$), of diameter $0$: a single point $h(\varepsilon)$.

**19.** Words differing first at rank $m$ send their images into the two *disjoint* sets $F_{w0}, F_{w1}$ (common prefix $w$): $h$ is injective. If two words agree to rank $m$, both images lie in a set of diameter $\leq
2^{-m}\operatorname{diam}P$: $h$ is [continuous](#def-b3-topology-continuity). So the uncountable $\{0,1\}^\N$ injects into $P$: every [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) metric space is uncountable — $[0,1]$ and $C$ among them.

**20.** $h$ is a [continuous](#def-b3-topology-continuity) injection from the [compact](#def-b3-topology-compact) $\{0,1\}^\N$ to the [Hausdorff](#def-b3-topology-hausdorff) (metric) $P$: [Corollary 6.14](#cor-b3-topology-compacthomeo) upgrades it to a [homeomorphism](#def-b3-topology-continuity) onto its image; and $\{0,1\}^\N \cong C$ (question 2). Every [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) [compact](#def-b3-topology-compact) metric space contains a copy of the Cantor set: perfection has a universal germ, and it is Cantor’s.

**21.** A countable [compact](#def-b3-topology-compact) metric space cannot be [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) (question 19), so it has an isolated point. In $K =
\{0\}\cup\{\frac1n : n \geq 1\}$ every point $\frac1n$ is isolated and $0$ is not: isolated points can even be [dense](#def-b3-topology-interior) without the space being discrete — compactness keeps their limit inside.

**22.** Let $P$ be the set of condensation points of $F$ and $\mathcal B$ the countable family of open intervals with rational endpoints. Every non-condensation point of $F$ lies in some $I \in \mathcal B$ with $I \cap F$ countable, so $F
\setminus P$ is contained in the union of these countably many countable traces: countable. Since $F$ is uncountable, $P \neq \varnothing$; $P$ is closed (if $x \notin P$, the witnessing interval $I$ contains no condensation point at all: $I \cap F$ countable) and $P \subseteq F$ ($F$ closed: a condensation point is in particular adherent). $P$ is [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect): were $I \cap P = \{x\}$ for some interval $I$, then $I \cap F \subseteq \{x\} \cup (F \setminus P)$ would be countable, contradicting $x \in P$. Now the tree construction of questions 17–19 runs verbatim inside $P$: the pieces $\bar B(y, \rho) \cap P$ are [compact](#def-b3-topology-compact) (closed bounded subsets of $\R$), every [center](https://one-course.com/books/math/5/en/chapter/1-group-theory#ex-b3-groups-actions) is non-isolated in $P$, and the argument never used more. Hence $\abs P \geq
\abs{\{0,1\}^\N} = \mathfrak c$, and $\abs F \leq \mathfrak
c$ trivially: an uncountable closed $F \subseteq \R$ has cardinality exactly $\mathfrak c$. Closed sets cannot witness a failure of the continuum hypothesis.

**23.** Let $x \neq y$ in $C$ and choose $m \geq 0$ with $3^{-(m+1)} \leq \abs{x - y} < 3^{-m}$. By question 1 the digits $b_n(x) = b_n(y)$ agree for $n \leq m$; the first coordinate of $\Phi$ uses $b_1, b_3, \dots$, the second $b_2,
b_4, \dots$, so in each coordinate the two points share at least $\lfloor m/2\rfloor$ leading binary digits:

$$
\norm{\Phi(x) - \Phi(y)}_\infty
\leq \sum_{k > \lfloor m/2\rfloor}2^{-k}
= 2^{-\lfloor m/2\rfloor} \leq \sqrt2\cdot2^{-m/2}
= \sqrt2\,\bigl(3^{-m}\bigr)^\alpha
\leq \sqrt2\,\bigl(3\abs{x-y}\bigr)^\alpha,
$$

using $2^{-m/2} = 3^{-m\alpha}$ (take logarithms); and $\sqrt2\cdot3^\alpha = \sqrt2\cdot\sqrt2 = 2$: the bound $2\abs{x-y}^\alpha$ on $C$. Same gap $(u, v)$: $f$ is affine there, so for $t, s \in [u, v]$,

$$
\norm{f(t) - f(s)} = \frac{\abs{t-s}}{v-u}\,
\norm{\Phi(v) - \Phi(u)}
\leq \frac{\abs{t-s}}{v-u}\,2(v-u)^\alpha
\leq 2\abs{t-s}^\alpha,
$$

since $\frac{\abs{t-s}}{v-u} \leq \bigl(\frac{\abs{t-s}}
{v-u}\bigr)^\alpha$ when $\abs{t-s} \leq v - u$. General $t <
s$: if $[t, s]$ meets $C$, let $u'$ and $v'$ be the smallest and largest points of the [compact](#def-b3-topology-compact) $C \cap [t, s]$; then $t$ lies in a gap (or at a point of $C$) whose right endpoint is $u'$, $s$ in one with left endpoint $v'$, and

$$
\norm{f(t) - f(s)} \leq 2\abs{t - u'}^\alpha
+ 2\abs{v' - u'}^\alpha + 2\abs{s - v'}^\alpha
\leq 6\abs{t - s}^\alpha ;
$$

if $[t, s]$ misses $C$, the same-gap case applies. So $f$ is $\alpha$-Hölder with $\alpha = \frac{\ln2}{2\ln3}$.

**24.** Suppose $\norm{F(t) - F(s)} \leq
C\abs{t-s}^\alpha$ with $F$ surjective and $\alpha >
\frac12$. Cut $[0,1]$ into $N$ intervals $I_1, \dots, I_N$ of length $\frac1N$: each image $F(I_j)$ has diameter $\leq
CN^{-\alpha}$. Two distinct points of the grid $G_M =
\bigl\{\bigl(\frac iM, \frac jM\bigr)\bigr\}_{0 \leq i, j
\leq M}$ are at distance $\geq \frac1M$, so a set of diameter $< \frac1M$ contains at most one of them. Choose $M =
\lfloor N^\alpha/(2C)\rfloor$ (with $N$ large): then $CN^{-\alpha} \leq \frac1{2M} < \frac1M$, and surjectivity puts every one of the $(M+1)^2$ grid points into some $F(I_j)$, whence

$$
\frac{N^{2\alpha}}{4C^2} \leq (M + 1)^2 \leq N,
$$

and $N^{2\alpha - 1} \leq 4C^2$ fails for large $N$ when $2\alpha > 1$: contradiction. Our curve, with $\alpha \approx
0.3155$, sits below the wall, as it must; Hilbert’s curve (admitted) is $\frac12$-Hölder, so the critical exponent $\frac12$ is attained — Hölder regularity, unlike injectivity, is a matter of degree, and $\frac12$ is exactly the frontier that dimension $2$ imposes on a map from dimension $1$.

**25.** The $m$-th cluster $\{\frac1m + \frac1n : n >
m^2\}$ lies in $\bigl(\frac1m, \frac1m + \frac1{m^2}\bigr]
\subseteq \bigl(\frac1m, \frac1{m-1}\bigr)$ for $m \geq 2$, because $\frac1{m-1} - \frac1m = \frac1{m(m-1)} >
\frac1{m^2}$ (and the first cluster lies in $(1, \frac32]$): the clusters occupy disjoint intervals. Limit points of $K$: inside the $m$-th interval, only $\frac1m$ (the cluster converges to it and is discrete in itself); globally, $0$ (every [neighborhood](#def-b3-topology-topology) of $0$ contains whole clusters). So $K'
= \{0\} \cup \{\frac1m\}$, then $K'' = \{0\}$ (each $\frac1m$ is isolated in $K'$), $K''' = \varnothing$; $K$ contains its limit points, hence is closed, bounded, countable, [compact](#def-b3-topology-compact), and its isolated points — the cluster points $\frac1m +
\frac1n$ — are [dense](#def-b3-topology-interior) in $K$: every element of $K'$ is their limit, as question 21’s mechanism predicts. Induction: $K_1 = \{0\}\cup\{\frac1n\}$ has $K_1^{(1)} = \{0\}$; given a countable [compact](#def-b3-topology-compact) $K_j \subseteq [0, 1]$ with $K_j^{(j)} =
\{0\}$ and $K_j^{(j+1)} = \varnothing$, set

$$
K_{j+1} = \{0\} \cup \bigcup_{m \geq 1}
\Bigl(\frac1m + \varepsilon_m K_j\Bigr),
$$

with $\varepsilon_m$ small enough that the $m$-th copy lies in $\bigl(\frac1m, \frac1{m-1}\bigr)$. Derivation acts copy by copy (the copies live in disjoint open intervals), so $K_{j+1}^{(i)} = \{0\} \cup \bigcup_m\bigl(\frac1m +
\varepsilon_mK_j^{(i)}\bigr)$ for $i \leq j$; at $i = j$ this reads $\{0\} \cup \{\frac1m\}$, then $K_{j+1}^{(j+1)} =
\{0\}$ and $K_{j+1}^{(j+2)} = \varnothing$. Every finite rank occurs. A [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) set is the other extreme: $P' = P$, the derivation never moves — and Cantor–Bendixson (question 22) says precisely that every closed set splits into a [perfect](https://one-course.com/books/math/5/en/chapter/4-field-extensions-and-galois-theory#prop-b3-galois-perfect) core, invisible to derivation, and a countable remainder that derivation eats away.
