The swamp of topology has monsters lurking inside.

## Non-differentiable functions

To begin with, let us recall some monsters from analysis. Consider Dirichlet’s function

$\delta(x) = \begin{cases} 1, & x \in \mathbb{Q},\\ 0, & x \notin \mathbb{Q}.\end{cases}$

This function is not continuous at any point! So functions may be very discontinuous, depending on how you want to define them.

But continuous functions should at least have tangent lines, right? Except for absolute-value-type functions, and roots, I guess. But in general, a continuous function is mostly differentiable, right?

Actually, there are continuous functions that have no tangent lines. Weierstrass was the first to point out the importance of such a function as a counterexample to naive intuition about functions. Perhaps the simplest example of such a function is the Takagi-Landsberg blancmange. The basic idea of the blancmange is as follows. Let $$t$$ be your favorite continuous function with, say, period 1, and with a corner (a point of nondifferentiability) at $$1/2$$. For instance, you could let $$t$$ be the triangle wave function given by $$t(x) = 1 - |2(x - \lfloor x \rfloor) - 1|.$$ Then the new function $$t_1(x) = t(2x)/2$$ is continuous, and has a corner at $$1/4$$ and $$3/4$$. Likewise $$t_2(x) = t(4x)/4$$ has corners at $$1/8$$, $$3/8$$, $$5/8$$, and $$7/8$$. In general, the function $$t_n(x) = t(2^n x)/2^n$$ has a corner at $$k/2^{n+1}$$ for all odd $$k$$ less than $$2^{n+1}$$.

The blancmange function then is the sum of all of these:

$B(x) = \sum_{n=0}^\infty t_n(x).$

Each partial sum up to $$t_N$$ has at least as many corners as $$t_N$$, since the previous functions are differentiable at these numbers. In fact, the blancmange is continuous, but differentiable nowhere.

## The Cantor set

No mention of monsters is complete without the Cantor set. It is the progenitor of so many monsters, even if it is not monstrous itself. Very simply, the Cantor set $$K$$ is the subset of $$[0,1]$$ whose expansion in ternary notation has no digit 1, but only digits 0 and 2.

Clearly we have a map $$s: K \to [0,1]$$ given by dividing digits by two then regarding them in binary. This is obviously a surjection. Strangely it is also a continuous map.

## Space-filling curves

With that analytic warmup, let us introduce some of the classic monsters of topology.

We will start in dimension one. In 1890 Giuseppe Peano constructed a continuous function $$f: [0,1] \to [0,1]^2$$ that is surjective, i.e. that hits every point of the square. This is a “curve” in the sense that it is a continuous function, or map, from the interval into some other geometric object, in this case the unit square. Hilbert a year later gave another example, with pictures suggesting how the function operated.

Computationally, the simplest example is probably the Z-order curve, defined as follows.1 First, let’s spell out the map $$Z_K: K \to [0,1]$$ alluded to above. If $$x \in K$$, write $$x = 0.a_0 a_1 a_2 a_3 \ldots.$$ Since $$x \in K,$$ all the digits $$a_i$$ are either 0 or 2. Define $$Z_K(x) = (0.b_0 b_2 \ldots, 0.b_1 b_3 \ldots),$$ where $$b_i = a_i/2,$$ but interpreted in binary.

For example, $$182/729 = 0.\underline{0}\overline{2}\underline{2}\overline{0}\underline{0}\overline{2}_3$$ (i.e. in ternary), so $$Z_K(182/729) = (0.\underline{0}\,\underline{1}\,\underline{0}_2, 0.\overline{1}\,\overline{0}\,\overline{1}_2)$$ in binary, i.e. $$(1/4, 5/8).$$

To get our curve $$Z: [0,1] \to [0,1]^2,$$ just interpolate $$Z_K$$ linearly between the values at the nearest elements of $$K.$$

For example, $$191/729 = 0.022102_3$$ is the midpoint between $$0.022002_3$$ and $$200/729 = 0.022202_3.$$ So $$Z(0.022102_3)$$ is the midpoint of the line segment between $$Z_K(0.022002_3) = (0.010_2, 0.101_2)$$ and $$Z_K(0.022202_3) = (0.010_2, 0.111_2).$$ That is, $$Z(191/729) = (0.010_2, 0.11_2) = (1/4, 3/4).$$

Actual pictures of square-filling curves are rather unilluminating, as Thurston lamented in his famous Bulletin article, pp. 372–3. What you want instead are images of “nearby” curves that don’t quite fill it up. This gives a more instructive picture. For instance, say we truncated $$K$$ to the numbers $$K_n \subset K$$ with at most $$2n$$ ternary digits. We could still just as well define $$Z_{K_n}$$ and $$Z_n$$. Here is a picture of the curve $$Z_7$$ so defined.

## The topologists’ sine curve

A favorite counterexample is the following subset of the plane:

$C = (\{0\}\times [0,1]) \cup \{ (x,y)\ |\ y = \sin(2\pi/x), 0 < x < 1\}$

The graph of the right-hand disjunct looks like this:

You can see this becomes a mess as it approaches the left-hand disjunct. $$C$$ is connected in the usual topological sense. However, it is not path-connected. There is no curve that starts at a point on $$\{0\} \times [0,1]$$ and ends on any point in the right-hand part, all the time staying in $$C$$. So connected sets, even connected sets in the plane, can be path-disconnected.

## The horned sphere

The Schoenflies theorem strengthens the Jordan curve theorem, stating

Theorem (Schoenflies)

A simple closed curve in the plane separates the plane into a disc and a punctured disc.

The same is not true for embedded spheres in space. The usual example is Alexander’s horned sphere. This comes from a recursive construction on a cylinder. Consider the subset depicted below of a cylinder.

It consists of two components that, geometrically, wrap around one another. Each component $$K$$ has two marked discs on it. There is also an associated cylinder $$C_K$$ between the discs (which I have not drawn in the figure). We have constructed this so that $$C_K$$ is not only disjoint from the other component but also disjoint from its cylinder. Thus we may attach these cylinders, and form two new scaled models of this construction in each of these cylinders. This begets four new constructions, then eight, and so on. Attaching the discs of the original cylinder to a ball yields a ball whose boundary is Alexander’s horned sphere. This sphere does bound a ball on one side, but it does not bound a punctured ball on the other side.

The list of monsters goes on and on, and up, and down. There are earwig-monsters like the Sierpiński space, crawling under your feet ready to bite. There are unnatural creatures of ordinary size like exotic spheres that subvert your expectations. There are titans like the long line that can stomp any nice conjectures you might want to prove. The proliferation of counterexamples in topology can make it seem like there is little hope of proving much at all.

Nevertheless, even in the swamp of topology, foundations have been laid that allow one to build structures either to keep the beasts and humidity at bay, or outright capture the beasts and put them on display. I’ll detail some such foundations next time to conclude this little introduction.

## Footnotes

1. This example is apparently due originally to Lebesgue, though it is often called a Morton curve in the context of computing science. I like this example because I remember working through Exercise 7.14 from baby Rudin as a freshman. Rudin actually attributes this example to Schoenberg. But if you follow the reference, Schoenberg makes the appropriate attribution to Lebesgue.