# Reality is a countably infinite Sierpiński cube

I was thinking out loud on Twitter about what weird beliefs I hold, after realising (more or less as I was writing it) that my philosophical positions are practically banal (at least to anyone who has thought about these issues a bit, whether or not they agree with me).

I came up with a couple, but probably the most interesting (if very very niche) that I thought of is that one true and accurate mathematical model of reality is  time cube a closed, connected, subset of the countably infinite Sierpinski cube.

I consider this opinion to be not that weird and more importantly obviously correct, but I’m aware that this is a niche opinion, but hear me out.

Before we start, a quick note on the nature of reality. I am being deliberately imprecise about what I mean by “reality” here, and basically mean “any physical system”. This could be “life the universe and everything” and we are attempting to solve physics, or it could be some toy restricted physical system of interest and we are trying to nail down its behaviour. This post applies equally well to any physical system we want to be able to model.

Consider an experiment. Let’s pretend we can have deterministic experiments for convenience – you can easily work around the impossibility by making countably infinitely many copies of the experiment and considering each of them to be the answer you got the nth time you ran the experiment.

Also for simplicity we’ll assume that experiments can only have one of two outcomes (this is no loss of generality as long as experiments can only have finitely many outcomes – you just consider the finitely many experiments of the form “Was the outcome X?” – and if they have infinitely many outcomes you still need to ultimately make a finite classification of the result and so can consider the experiment composed with that classification).

There are three sensible possible outcomes you could have here:

• Yes
• No
• I don’t know, maybe?

Physical experiments are inherently imprecise – things go wrong in your experiment, in your setup, in just about every bloody thing, so set of experiments whose outcome will give you total certainty is implausible and we can ignore it.

Which leaves us with experiments where one of the answer is maybe. It doesn’t matter which answer the other one is (we can always just invert the question).

So we’ve run an experiment and got an answer. What does that tell us about the true state of reality?

Well whatever reality is we must have some notion of “an approximate region” – all of our observation of reality is imprecise, so there must be some notion of precision to make sense of that.

What does the result of a physical experiment tell us about the state of reality?

Well if the answer is “maybe” it doesn’t tell us anything. Literally any point in reality could be mapped to “maybe”.

But if the answer is yes then this should tell us only imprecisely where we are in reality. i.e. the set of points that map to yes must be an open set.

So an experiment is a function from reality to {yes, maybe}. The set of points mapping to yes must be an open set.

And what this means is that experiments are continuous functions to the set {yes, maybe} endowed with the Sierpiński topology. The set {yes} is open, and the whole set and the empty set are open, but nothing else is.

Now let’s postulate that if two states of reality give exactly the same answer on every single experiment, they’re the same state of reality. This is true in the same sense that existing is the thing that reality does – a difference that makes no difference might as well be treated as if it is no difference.

So what we have is the following:

1. Any state of reality is a point in the cube $$S^E$$ where $$E$$ is the set of available experiments and $$S = \{\mathrm{yes}, \mathrm{maybe}\}$$.
2. All of the coordinate functions are continuous functions when $$S$$ is endowed with the Sierpinski topology.

This is almost enough to show that reality can be modelled as a subset of the Sierpinski cube, not quite: There are many topologies compatible with this – reality could have the discrete topology.

But we are finite beings. And what that means is that any given point in time we can have observed the outcome of at most finitely many experiments.

Each of these experiments determine where we are only in the open set of some coordinate in our cube, thus the set that the experiments have determined us to be in is an intersection of finitely many open sets in the product topology on that cube, and thus is open in that topology.

Therefore the set of states of reality that we know we are in is always an open set in the product topology. So this is the “natural” topology on reality.

So reality is a subset of a Sierpiński cube. We now have to answer two questions to get the rest of the way:

• How many dimensions does the cube have?
• What sort of subset is it?

The first one is easy: The set of experiments we can perform is definitely infinite (we can repeat a single experiment arbitrarily many times). It’s also definitely countable, because any experiment we can perform is one we can describe (and two experiments are distinct only up to our ability to describe that distinction), and there are only countably many sentences.

So reality is a subset of the countably infinite dimensional Sierpiński cube.

What sort of subset?

Well that’s harder, and my arguments for it are less convincing.

It’s probably not usually the whole set. It’s unlikely that reality contains a state that is just constantly maybe.

It might as well be a closed set, because if it’s not we can’t tell – there is no physical experiment we can perform that will determine that a point in the closure of reality is not in reality, and it would be aesthetically and philosophically displeasing to have aphysical states of reality that are approximated arbitrarily well.

In most cases it’s usually going to be a connected set. Why? Well, because you’re “in” some state of reality, and you might as well restrict yourself to the path component of that state – if you can’t continuously deform from where you are to another state, that state probably isn’t interesting to you even if it in some sense exists.

Is it an uncountable subset of the Sierpinski cube? I don’t know, maybe. Depends on what you’re modelling.

Anyway, so there you have it. Reality is a closed, connected, subset of the countably infinite dimensional Sierpiński cube.

What are the philosophical implications?

Well, one obvious philosophical implication is that reality is compact, path connected, and second countable, but may not be Hausdorff.

(You should imagine a very very straight face as I delivered that line)

More seriously, the big implication for me is on how we model physical systems. We don’t have to model physical systems as the Sierpiński cube. Indeed we usually won’t want to – it’s not very friendly to work with – but whatever model we choose for our physical systems should have a continuous function (or, really, a family of continuous functions to take into account the fact that we fudged the non-determinism of our experiments) from it to the relevant Sierpiński cube for the physical system under question.

Another thing worth noting is that the argument is more interesting than the conclusion, and in particular the specific embedding is more important that the embedding exists. In fact every second countable T0 topological space embeds in the Sierpinski cube, so the conclusion boils down to the fact that reality is a T0, second countable, compact, and connected (path connected really) topological space (which are more or less the assumptions we used!).

But I think the specific choice of embedding matters more than that, and the fact that we the coordinates correspond to natural experiments we can run.

And, importantly, any decision we make based on that model needs to factor through that function. Decisions are based on a finite set of experiments, and anything that requires us to be able to know our model to more precision than the topology of reality allows us to is aphysical, and should be avoided.

# Determinism is topologically impossible

I’ve been doing some work on topological models of decision making recently (I do weird things for fun) and a result popped out of it that I was very surprised by, despite it being essentially just a restatement of some elementary definitions in topology.

The result is this: Under many common models of reality, there are no non-trivial deterministic experiments we can perform even if the underlying reality is deterministic.

The conclusion follows from two very simple assumptions (either of which may be wrong but both of which are very physically plausible).

1. We are interested in some model of reality as a connected topological space $$X$$ (e.g. $$\mathbb{R}^n$$, some Hilbert space of operators, whatever).
2. No experimental outcome can give us infinite precision about that model. i.e. any experimental outcome only tells us where we are up to membership of some open subset of $$X$$.

Under this model, regardless of the underlying physical laws, any fully deterministic experiment tells us nothing about the underlying reality.

What does this mean?

Let $$X$$ be our model of reality and let $$\mathcal{O}$$ be some set of experimental outcomes. A deterministic experiment is some function $$f: X \to \mathcal{O}$$.

By our finite precision assumption each of the sets $$U_o = \{x \in X: f(x) = o\}$$ are open. But if $$f(x) = o$$ and $$o \neq o’$$ then $$f(x) \neq o’$$ so $$x \not\in U_{o’}$$. Therefore they’re disjoint.

But certainly $$x \in U_{f(x)}$$, so they also cover $$X$$.

But we assumed that $$X$$ is connected. So we can’t cover it by disjoint non-empty open sets. Therefore at most one of these sets is non-empty, and thus $$X = U_o$$ for some $$o$$. i.e. $$f$$ constantly takes the value $$o$$ and as a result tells us nothing about where we are in $$X$$.

Obviously this is a slightly toy model, and the conclusion is practically baked into the premise, so it might not map to reality that closely.

But how could it fail to do so?

One way it can’t fail to do so is that the underlying reality might “really” be disconnected. That doesn’t matter, because it’s not a result about the underlying reality, it’s a result about models of reality, and most of our models of reality are connected regardless of whether the underlying reality is. But certainly if our model is somehow disconnected (e.g. we live in some simulation by a cellular automaton) then this result doesn’t apply.

It could also fail because we have access to experiments that grant us infinite precision. That would be weird, and certainly doesn’t correspond to any sort of experiment I know about – mostly the thing we measure reality with is other reality, which tends to put a bound on how precise we can be.

It could also fail to be interesting in some cases. For example if our purpose is to measure a mathematical constant that we’re not sure how to calculate then we want the result of our experiment to be a constant function (but note that this is only for mathematical constants. Physical constants that vary depending on where in the space of our model we are don’t get this get out clause).

There are also classes of experiments that don’t fall into this construction: For example, it might be that $$O$$ itself has some topology on it, our experiments are actually continuous functions into O, and that we can’t actually observe which point we get in $$O$$, only its value up to some open set. Indeed, the experiments we’ve already considered are the special case where $$O$$ is discrete. The problem with this is that then $$f(X)$$ is a connected subset of $$O$$, so we’ve just recursed to the problem of determining where we are in $$O$$!

You can also have experiments that are deterministic whenever they work but tell you nothing when they fail. So for example you could have an experiment that returns $$1$$ or $$0$$, and whenever it returns $$1$$ you know you’re in some open set $$U$$, but when it returns $$0$$ you might or might not be in $$U$$, you have no idea. This corresponds to the above case of $$O$$ having a topology, where we let $$O$$ be the Sierpinski space. This works by giving up on the idea that $$0$$ and $$1$$ are “distinguishable” elements of the output space – under this topology, the set $$\{0\}$$ is not open, and so the set $$U_0$$ need not be, and the connectivity argument falls apart.

And finally, and most interestingly, our experiment might just not be defined everywhere.

Consider a two parameter model of reality. e.g. our parameters are the mass of a neutron and the mass of a proton (I know these vary because binding energy or something, but lets pretend they don’t for simplicity of example). So our model space is $$(0, \infty)^2$$ – a model which is certainly connected, and it’s extremely plausible that we cannot determine each value to more than finite precision. Call these parameters $$u$$ and $$v$$.

We want an experiment to determine whether protons are more massive than neutrons.

This is “easy”. We perform the following sequence of experiments: We measure each of $$u$$ and $$v$$ to within a value of $$\frac{1}{n}$$. If $$|u – v| > \frac{2}{n}$$ then we know their masses precisely enough to answer the question and can stop and return the answer. If not, we increase $$n$$ and try again.

Or, more abstractly, we know that the sets $$u > v$$ and $$v < u$$ are open subsets of our model, so we just return whichever one we’re in.

These work fine, except for the pesky case where $$u = v$$ – protons and neutrons are equally massive. In that case our first series of experiments never terminates and our second one has no answer to return.

So we have deterministic experiments (assuming we can actually deterministically measure things to that precision, which is probably false but I’m prepared to pretend we can for the sake of the example) that give us the answer we want, but it only works in a subset of our model: The quarter plane with the diagonal removed, which is no longer a connected set!

Fundamentally, this is a result about boundaries in our models of reality – any attempt to create a deterministic experiment will run into a set like the above plane: Suppose we had a deterministic experiment which was defined only on some subset of $$X$$. Then we could find some $$o$$ with $$U_o$$ a non-empty proper subset of $$X$$. Then the set $$\overline{U} \cap U^c$$ where the closure of $$U_o$$ meets its complement (which is non-empty because $$X$$ is connected) is a boundary like the diagonal above – on one side of it we know that $$f$$ returns $$o$$. On the other side we know that it doesn’t return $$o$$, but in the middle at the boundary it is impossible for us to tell.

What are the implications?

Well, practically, not much. Nobody believed that any of the experiments we’re currently performing are fully deterministic anyway.

But philosophically this is interesting to me for a couple of reasons:

1. I for one was very surprised that such a trivial topological result had such a non-trivial physical interpretation.
2. The idea that non-determinism was some intrinsic property of measurement and not a consequence of underlying physical non-determinism is not one that had ever previously occurred to me.
3. We need to be very careful about boundaries in our models of reality, because we often can’t really tell if we’re on them or not.
4. It may in fact be desirable to assume that all interesting quantities are never equal unless we have a deep theoretical reason to believe them to be equal, which largely lets us avoid this problem except when our theory is wrong.

(As per usual, if you like this sort of thing, vote with your wallet and support my writing on Patreon! I mean, you’ll get weird maths posts either way, but you’ll get more weird maths posts, and access to upcoming drafts, if you do).

# Convergence of alternating sums

$$\pi = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} – \frac{1}{5} + \frac{1}{6} + \ldots$$

With the exact formula being:

After the first two terms, the signs are determined as follows: If the denominator is a prime of the form 4m – 1, the sign is positive; if the denominator is a prime of the form 4m + 1, the sign is negative; for composite numbers, the sign is equal the product of the signs of its factors.

This is due to Euler.

(If you just want to see a proof of this, skip to near the end of this post)

I opined that it wasn’t that surprising, because for any real number $$x$$ you can get a sequence of alternating signs for this sum which converge to it as follows:

Inductively define $$\epsilon_n$$ as follows: $$\epsilon_{n+1}$$ is $$1$$ if $$\sum\limits_{i \leq n} \frac{\epsilon_i}{n} < x$$, else $$\epsilon_{n+1} = -1$$.

After the first time the partial sums $$s_n = \sum\limits_{i \leq n} \frac{\epsilon_i}{n}$$ cross $$x$$, you must have $$|s_n – x| \leq \frac{1}{n}$$, so the sum converges to $$x$$.

There are many inequivalent sums that lead to $$x$$ too. e.g. You can make the convergence arbitrarily slow if you like: If you have some sequence of non-negative numbers $$b_n \to 0$$ then you can construct a sequence $$\epsilon_n$$ as above where instead of changing the sign every time you cross $$x$$, you change the sign to negative when you cross $$x + b_n$$, then back to positive when you cross $$x – b_{n+1}$$, etc.

There’s nothing special about $$\frac{1}{n}$$ here either – all that matters is that it’s a non-negative sequence tending to zero whose sum does not converge.

But there is something special about $$\frac{1}{n}$$ here that means we can probably expect a particularly rich set of “natural” examples from it due to a slightly stronger condition it satisfies: It’s in $$l^2$$. That is, $$\sum\frac{1}{n^2}$$ converges (specifically to $$\frac{\pi^2}{6}$$, but that doesn’t matter for now).

Why does this matter?

Well it turns out to be interesting for the following reason: If $$a_n$$ is a sequence in $$l^2$$, and $$B_1, \ldots B_n, \ldots$$ are independent Bernoulli random variables, then $$\sum (-1)^{B_n} a_n$$ converges to a finite value with probability 1. That is, if we just randomly pick each sign then then result will converge to something.

This follows from the following stronger theorem: Let $$A_i$$ be a sequence of independent random variables with $$E(A_i) = 0$$ and $$\sum E(A_i)^2 < \infty$$. Then $$\sum A_i$$ converges to a finite value with probability one.

First a thing to note: Because of Kolmogorov’s zero-one law, such a sequence will converge with probability $$0$$ or $$1$$ – no in between values are possible. I think this makes the result significantly less surprising (though we won’t actually use this fact in the proof).

The key idea of the proof is this: We’ll use the bound on the tail behaviour that convergence gives us to look at the $$\lim\inf$$ and the $$\lim\sup$$ (the limit inferior and limit superior) of the sums of the random variables and show that these are equal almost surely. This implies that the limit exists and is equal to their common value (which might be infinite).

And the way we’ll do that is we’ll consider the possibility that they are well separated: Let $$D_{a, b} = \{ \lim\inf S_n < a < b < \lim\sup S_n\}$$, where $$S_n = \sum\limits_{i \leq n} A_i$$. Then $$\{\lim\inf S_n < \lim\sup S_n\} = \bigcup\limits_{a, b \in \mathbb{Q}} D_{a, b}$$, which is a countable union, so if each $$D_{a, b}$$ has probability zero then so does the whole set, and the limit exists.

So let’s now establish an upper bound on the probability of lying in $$D_{a, b}$$. Pick any $$N$$. If $$D_{a, b}$$ occurs then the sums lie below $$a$$ and above $$b$$ (not at the same time) infinitely often after $$N$$ because of the definitions of limit inferior and superior. So we can find some $$N < m < n$$ with $$S_m < a$$ and $$S_n > b$$.

But then $$\sum\limits_{i=m}^n A_i > b – a$$, and hence $$\sum\limits_{i=m}^n |A_i| > b – a$$.

By the Cauchy-Schwartz inequality, for any $$t_1, \ldots t_n \geq 0$$ we have $$n \sum t_i = (1, \ldots, 1) \cdot (t_1, \ldots, t_n) \leq ||(1, \ldots, 1)|| ||(t_1, \ldots, t_n)|| = \sqrt{n} (\sum t_i^2)^{\frac{1}{2}}$$, so $$\sum t_i^2 \geq n (\sum t_i)^2$$. Edit: This step is wrong. The result is still true because of deeper theory than I go into here (it comes from Martingale theory) and this step may be recoverable. I’ll try to fix it later. Thanks to @sl2c for pointing this out.

In particular applied to the above this means that  $$\sum\limits_{i=m}^n |A_i|^2 \geq (n – m) (\sum |A_i|)^2 \geq (n – m)(b – a)^2 \geq (b – a)^2$$.

But $$\sum\limits_{i=m}^n |A_i|^2 \leq \sum\limits_{i=N}^\infty |A_i|^2$$. So we must have $$\sum\limits_{i=N}^\infty |A_i|^2 \geq (b – a)^2$$.

But for any non-negative random variable, $$P(X \geq x) \leq \frac{E(X)}{x}$$. This means we must have $$P(D_{a, b}) \leq P\left(\sum\limits_{i=N}^\infty |A_i|^2 \geq (b – a)^2\right) \leq \frac{E(\sum\limits_{i=N}^\infty |A_i|^2)}{(b – a)^2} = \frac{\sum\limits_{i=N}^\infty E(|A_i|^2))}{(b – a)^2}$$.

But $$N$$ was arbitrary, and we know $$\sum\limits_{i=N}^\infty E(|A_i|^2) < \infty$$, so as $$N \to 0$$ the right hand side tends to zero. Therefore $$P(D_{a, b}) = 0$$ as desired and the result is almost proved.

Note that we’ve not used the independence of the $$A_i$$ so far! It’s only necessary to prove that the sums converge to a finite value. To see that we need some sort of condition for that, consider the following: Let $$X$$ be a random variable that takes the values $$1, -1$$ with equal probability. Let $$A_i = \frac{X}{n}$$. Then $$E(A_i) =$$ and $$\sum E(A_i^2) < \infty$$, but $$\sum A_i$$ takes the values $$\infty, -\infty$$ with equal probability (and no other values).

But with independence this can’t happen for the following reason: For any random variable we have $$E(X) \leq E(X^2)^{\frac{1}{2}}$$ (because $$0 \leq \mathrm{Var}(X) = E(X^2) – E(X)^2$$, though it also follows from other less elementary results). So we have $$E(|S_n|) \leq E(S_n^2)^{\frac{1}{2}}$$. But $$E(S_n)^2 = \sum\limits_{i, j \leq n} A_i A_j = \sum\limits_{i \leq n} A_n^2$$, because $$A_i, A_j$$ are independent for $$i \neq j$$  so $$E(A_i A_j) = E(A_i) E(A_j) = 0$$.

This means that $$E(|\sum A_i|) = \lim E(|S_n|) \leq \sqrt{\sum E(A_i)^2} < \infty$$. Thus, necessarily, $$P(|\sum A_i| = \infty) = 0$$.

And now the result is proved.

The proper setting for the above result is really the theory of Martingales, and the proof I gave above is mostly a modified proof of Doob’s Second Martingale convergence theorem, where I’ve used a stronger hypothesis to bound the difference in the inferior and the superior limits.

In fact, for the special case of our coin tossing a stronger statement is true: Suppose $$a_n$$ is a sequence of positive numbers such that $$\sum a_n = \infty$$ and $$\sum a_n^2 < \infty$$. Let $$A_n$$ be a sequence of independent random variables with $$A_n = \pm a_n$$, taking each value with equal probability. Then for any interval $$a < b$$, $$P(a < \sum A_n < b) > 0$$.

To see this, write $$(a, b) = (x – \epsilon, x + \epsilon)$$ by letting $$x = \frac{a + b}{2}$$ and $$\epsilon = \frac{b – a}{2}$$.

Run the process above for constructing a sequence converging to $$x$$ until we have $$N$$ such that our choices so far have lead us to $$|\sum_{i \leq N} A_i – x| < \frac{\epsilon}{2}$$ and $$\sum_{i > N} a_i^2 < \frac{\epsilon^2}{8}$$. The initial sequence of choices that lead us here happens with probability $$2^{-N}$$, and the condition on the sum of the tail guarantees via Chebyshev’s inequality that $$P(|\sum_{i \geq N} A_i| \leq \frac{\epsilon}{2}) \geq \frac{1}{2}$$ so  we have

$$P(|\sum A_i – x| < \epsilon) \geq P(\sum\limits_{i=0}^N A_i – x < \frac{\epsilon}{2}) P(\sum\limits_{i > N} A_i) < \frac{\epsilon}{2}) \geq 2^{-N-1} > 0$$.

So any value is not only possible but at least somewhat probable.

But this is a true continuous distribution, in the sense that $$P(\sum A_i = u) = 0$$ for any value $$u$$. To see this, consider the values taken only on a sum of indices. Let $$A(T) = \sum\limits_{i \in T} A_i$$. Then $$A(T)$$ and $$A(\mathbb{N} \setminus T)$$ are independent, so if $$A$$ has atoms then both of $$A(T)$$ and  $$A(\mathbb{N} \setminus T)$$ must also. But if we pick $$T$$ to be some subsequence $$t_n$$ where $$a_{t_n} < 2^{-n}$$ then all assignments of signs produce a unique result, so the probability of achieving any given value is zero. (Thanks to Robert Israel for this proof).

But still, $$\pi$$ is a bit of an outlier: The variance of this distribution is of course $$\sum \frac{1}{n^2} = \frac{\pi^2}{6}$$, so $$\pi$$ is $$\sqrt{6} \approx 2.45$$ standard deviations out. I don’t have an exact estimate of how probable that is for this distribution, but again by Chebyshev’s inequality we know that we can’t get a result at least this extreme more than a sixth of the time.

So why do we get this particular value here?

Well it turns out to be an unsurprising result for another reason, which is that it comes from a general technique for producing interesting infinite sums by starting from interesting products.

Suppose we have $$\sum f(n) \frac{1}{n}$$ where $$f(n)$$ is some multiplicative function. i.e. $$f(mn) = f(m) f(p)$$. Then we can write this as $$\prod (1 – f(p_i) \frac{1}{p_i})^{-1}$$, with $$p_i$$ being the i’th prime. There are issues of convergence we should worry about here, but in the finest Eulerian style we won’t. Both sides converging is probably a sufficient condition. A lot of this can probably be fixed by introducing a $$t$$ parameter, assuming $$|t| < 1$$ and taking the limit $$t \to 1$$ of $$\sum t^n f(n) \frac{1}{n}$$ and  $$\\prod (1 – t f(p_i) p_i)^{-1}$$, then because mumble mumble analytic continuation the two limits are equal. I haven’t checked the details, so I won’t do this here and will just follow Euler’s convention of assuming infinity isn’t a problem.

To prove this, we’ll consider the following sequence of infinite sums, $$P_0 = \sum\limits_{n \in R_n} f(n) \frac{1}{n}$$, where $$R_n$$ is the set of numbers not divisible by any of the first $$n$$ primes (so $$R_0 = \mathbb{N}$$).

If we split $$R_n$$ up into the set of numbers which are a multiple of $$p_{n+1}$$ and those that are not, we get the recurrence relationship that $$P_n = \frac{f(p_{n+1})}{p_{n+1}} P_n + P_{n+1}$$, by just taking out a single factor of $$\frac{f(p_{n+1})}{p_{n+1}}$$ from the components of the sum over the values that are divisible by $$p_{n+1}$$. So $$(1 – \frac{f(p_{n+1})}{p_{n+1}} ) P_n = P_{n+1}$$

Iterating this, we get $$P_0 \prod\limits_1^\infty (1 – (\frac{a_{p_{n+1}}}{p_{n+1}} ) = \lim\limits_{n \to \infty} P_n = 1$$.

i.e. $$\sum f(n) \frac{1}{n} = P_0 = \prod\limits_1^\infty (1 – \frac{f(p_{n+1)}}{p_{n+1}})^{-1}$$ as desired.

We can also go from products to sums: If we have $$\prod (1 – b_i )^{-1}$$ then we can write it as $$\sum S_n$$, where $$S_n$$ is the sum of all products of sequences of $$n$$ of the $$b_i$$ (allowing repetitions).

If we then have $$b_i = f(p) \frac{1}{p_i}$$, this becomes $$\prod (1 – f(p_i) \frac{1}{p_i})^{-1}$$, the products all become unique, and we have $$\sum \frac{a_n}{n}$$ again, where we extend $$f$$ to all numbers by multiplying its values on their prime factors.

Using these tools, proving the sequence result for $$\pi$$ becomes a matter of (somewhat tedious) computation.

We start with $$\frac{\pi}{4} = \arctan(1) = 1 – \frac{1}{3} + \frac{1}{5} – \ldots$$ using the standard power series for arctan. This can be written in the above form with $$f(n) = 0$$ if $$n$$ is even, $$f(n) = -1$$ if $$n \mod 4 = 3$$ and $$f(n) = 1$$ if $$n = 1 \mod 4$$. So we have:

$$\frac{\pi}{4} = \prod (1 – f(p_i) \frac{1}{p_i})^{-1}$$.

We can do the same with the standard sum $$\frac{\pi^2}{6} = \sum \frac{1}{n^2} = \prod (1 – \frac{1}{p_i^2})^{-1}$$ (because $$n \to \frac{1}{n}$$ is certainly multiplicative).

Now, divide the second product by the first and we get:

$$\frac{2}{3} \pi = \frac{1}{1 – \frac{1}{2^2}} \prod\limits_{p_i > 2} \left( \frac{1 – \frac{1}{p_i^2}}{1 – f(p_i) \frac{1}{p_i}} \right)^{-1}$$

The term outside the product comes from the fact that there’s no $$2$$ term in our product for $$\frac{\pi}{4}$$ and is equal to $$\frac{4}{3}$$, so rearranging we get $$\frac{\pi}{2} = \prod\limits_{p_i > 2} \ldots$$.

The term inside the product actually splits up fairly nicely: Because we can factor $$1 – \frac{1}{p_i^2} = (1 – \frac{1}{p_i})(1 + \frac{1}{p_i})$$. The bottom is now one of these two terms, so this factors into whichever of the two the bottom is not. i.e. as $$1 + f(p_i)$$.

So from this we conclude that

$$\frac{\pi}{2} = \prod_{p_i > 2} (1 + f(p_i))^-1$$, or $$\pi = \frac{1}{1 – \frac{1}{2}} \prod_{p_i > 2} (1 + f(p_i))^-1$$.

If we define $$g$$ as $$g(2) = 1$$, $$g(p) = -f(p)$$ for $$p$$ an odd prime, and extend to composite numbers multiplicatively, this then becomes  $$\pi = \prod (1 – g(p_i))^{-1}) = \sum g(n) \frac{1}{n}$$, which was our desired sum.

This proof more or less follows Euler’s, via the translation by Springer (which I borrowed off a friend and would honestly recommend you do the same rather than paying more than £100 for). The details are a bit different mostly because it was the only way I could follow them – in particular he tends to eschew the detailed algebra and just manipulate examples – and unlike him I feel guilty about the lack of precise analysis of convergence, but it’s certainly derived from his.

The product representation also allows us to strengthen our original result: Not only can any number be the limit of the sum by choosing primes appropriately, we can insist that the signs are multiplicative in the sense that the sign assigned to $$mn$$ is the product of the signs assigned to $$m$$ and $$n$$.

The reason for this is that $$\sum \frac{1}{p_i}$$ diverges. As a result, $$\prod\limits_{p_i > n} (1 + \frac{1}{p_i}) = \infty$$ and $$\prod\limits_{p_i > n} (1 – \frac{1}{p_i}) = 0$$. This means we can just repeat our original construction with the product instead of the sum: Assign positive signs as long as the partial product is less than the desired result, assign negative ones as long as it’s greater. The result is a product converging to the desired value, which we can then turn into a sum converging to the desired value with multiplicative signs.

So that more or less completes the journey down this particular rabbit hole: You can get any number by manipulating the signs, you should expect most choices of numbers to be at least reasonably plausible, and we have some useful machinery for picking good choices of signs for leading to specific numbers.

Whether or not it’s still surprising is up to you.

(This post turned out to be a ridiculous amount of work to write. If you want more like it, or just want to say thanks, I do have a Patreon for this blog. Any donations you want to send my way would be warmly appreciated)

This entry was posted in Numbers are hard on by .

# The littlest infinity

Note: This is mostly all stuff you’d probably learn in your first six months of a maths degree, I just like occasionally chewing on the fundamentals and seeing how they fit together. There’s nothing very deep here, but it might be pedagogically interesting.

You’re probably familiar with the natural numbers: They’re a set $$\mathbb{N}$$ with a distinguished element $$0 \in \mathbb{N}$$ and a successor function $$S: \mathbb{N} \to \mathbb{N}$$ which is injective, has $$0 \ne S(n)$$ for all $$n \in \mathbb{N}$$ and has the property that if $$A \subseteq N$$ with $$0 \in A$$ and $$S(A) \subseteq A$$ then $$A = \mathbb{N}$$ (“the induction principle”).

The natural numbers are the most basic example of an infinite set, and are usually postulated to exist as an axiom of set theory. We then construct all other infinite sets starting from $$\mathbb{N}$$ using e.g. power set operations.

But what is an infinite set?

There turn out to be more or less three ways of defining this, all of which are equivalent (under certain assumptions).

One way of defining it is any set which is not a finite set, but that reduces to the question “What is a finite set?”. To which the answer is any set which is in bijection (one to one correspondence) with one of the sets $$\{i \in \mathbb{N} : i < n\}$$ for some $$n \in \mathbb{N}$$ (you need to define the relation $$<$$ on $$\mathbb{N}$$ for this, but lets assume we’ve done that in some standard way e.g. by induction).

You can show inductively then that $$\mathbb{N}$$ has no injection into a finite subset of itself (and thus is infinite) as follows: It’s certainly not in bijection with the empty set, which is $$\{i: i < 0\}$$. Suppose you had $$f: \mathbb{N} \to \{i \in \mathbb{N} : i < n + 1\}$$ a bijection. By composing it with a swap if necessary, you can assume that $$f(0) = n$$. But then $$f \cdot S$$ is a bijection with $$\{i \in \mathbb{N} : i < n \}$$, which contradicts our induction hypothesis.

Another definition of a set being infinite is that it contains a bijective copy of $$\mathbb{N}$$ (i.e. there is an injection from $$\mathbb{N}$$ into it).

If there is such an injection then the set is certainly infinite in the sense of not being finite, as otherwise we’d be able to compose the injection from $$\mathbb{N}$$ into it with its bijection to a finite set, which contradicts what we showed above about $$\mathbb{N}$$ being infinite.

To show the opposite direction we need the axiom of choice (we actually only need a weak form of it, but we’ll ignore that detail): For any set $$X$$ there is a choice function $$c : \mathcal{P}(X) \setminus \{\emptyset\} \to X$$ with $$c(A) \in A$$.

If $$X$$ is infinite in the sense of not being finite, we can then construct a function $$f: \mathbb{N} \to X$$ as follows:

• $$f(0) = c(X)$$
• $$f(S(n)) = c(X \setminus \{f(0), \ldots f(n)\})$$

This is well defined because the set we’re passing to $$c$$ must be non-empty, or we’d have constructed a bijection with $$\{0, \ldots n\} = \{i : i < n + 1\}$$.

This definition of infinity justifies the fundamental role of the natural numbers (and the title) to some degree: They’re literally the smallest infinite set, because a copy of them is contained in every other infinite set.

But finally, there is a third definition of infinity which has no reference to the natural numbers at all: $$X$$ is infinite if there is some injective function $$f: X \to X$$ whose range is a proper subset of $$X$$. i.e. $$f$$ is injective but not surjective. You can justify this by analogy with the natural numbers as our basic example of an infinite set: $$S$$ is such a function, because it is injective but does not map anything to $$0$$. You can also show inductively that all of the sets $$\{i: i < n\}$$ do not have this property (more or less by the same argument we used to show that there was no injection from $$\mathbb{N}$$ into them).

Lets see that this is equivalent to the previous definition.

First, suppose we’ve got some injection $$h: \mathbb{N} \to X$$. We can construct such an $$f$$ as follows:

• if $$x \neq h(n)$$ for any $$n$$, then $$f(x) = x$$
• Let $$f(h(n)) = h(S(n))$$

i.e. we define our function to be the successor function on our copy of $$\mathbb{N}$$ and the identity elsewhere.

This is still injective, because it’s injective on each member  of the partition into $$h(\mathbb{N})$$ and $$X \setminus h(\mathbb{N})$$, and it doesn’t map either part into the other. It is however not surjective, because it maps no values to $$h(0)$$.

So a set which contains a copy of $$\mathbb{N}$$ must necessarily be infinite in this sense.

Now, suppose we have such an $$f$$. We can use this to construct an injection from $$\mathbb{N}$$ into $$X$$ as follows:

• Pick $$h(0)$$ as an arbitrary element of $$X \setminus f(X)$$
• Let $$h(S(n)) = f(h(n))$$

We can prove this is injective by inductively showing that $$h(n) \not\in \{h(m): m < n\}$$

Proof: Trivially true for $$0$$ because that’s the empty set. For $$S(n)$$, note that again $$h(S(n)) \ne 0$$ because by choice of $$h(0)$$ we must have $$f(x) \ne h(0)$$ for any $$x$$.

Supposing $$h(S(n)) = h(m)$$ for some $$0 < m \leq n$$, we must have $$f(h(n)) = h(m)$$. But we can write $$m = S(k)$$ for some $$k$$ because $$m \neq 0$$, so we have $$f(h(n)) = f(h(k))$$. $$f$$ is an injection, so $$h(n) = h(k)$$. By our inductive hypothesis, $$h$$ is an injection on $$\{1, \ldots, n\}$$, so we must have $$n = k$$. Therefore $$h$$ is an injection as desired.

So we have three notions of infinity, all equivalent (up to the axiom of choice). Why do we care?

Well, one interesting thing about the last definition is that it’s a notion of infinity that has nothing to do with the natural numbers. This has the nice benefit that we can run it backwards: If we have a set that is infinite in that sense, then we can construct the natural numbers out of it. This is a pretty strong justification of the natural numbers as our fundamental notion of an infinite set.

To see how to do this, suppose we’ve got a set $$X$$ and an injective function $$S : X \to X$$ which is not surjective.

Pick some distinguished element $$0 \in X \setminus S(X)$$.

Now consider the family $$\mathcal{F}$$ of sets $$U \subseteq X$$ with the properties that $$0 \in U$$ and $$S(U) \subseteq U$$. This family is nonempty because trivially $$X \in \mathcal{F}$$.

Now, define $$N = \bigcap \mathcal{F}$$.

We must have $$N \in \mathcal{F}$$, because $$0 \in N$$ and if $$U \in \mathcal{F}$$ then $$S(N) \subseteq S(U) \subseteq U$$, so taking intersections over all $$U \in \mathcal{F}$$ we have $$S(N) \subseteq \bigcap \mathcal{F} = N$$.

Moreover, if $$A \subseteq N$$ with $$0 \in A$$ and $$S(A) \subseteq A$$, then $$A \in \mathcal{F}$$, and thus $$N \subseteq A$$, and so $$N = A$$.

But these are precisely the requirements for $$N$$ to be a model of the natural numbers, $$\mathbb{N}$$! We have a distinguished element $$0$$, an injective function $$S$$ that doesn’t map anything to $$0$$, and it satisfies the induction principle. And, importantly, we got here without assuming that anything that looked like the natural numbers existed: All we required was the apparently weaker claim about some form of infinite set existing.

So pretty much wherever you start in defining infinite sets, you’re going to end up with the natural numbers at some point.

In the absence of at least some weak form of the axiom of choice these equivalences break down a bit, but they’re still compelling enough and strong enough that they fairly firmly place the natural numbers as the foundational object of infinite set theory.

This entry was posted in Numbers are hard on by .

# Metric space completeness is a restricted form of topological compactness

This is one of those facts that is obvious once you’ve seen it but I sometimes forget isn’t well known.

Topological compactness admits the following slightly less common but directly equivalent definition:

A family of sets has the finite intersection property if every intersection of a finite subfamily of it has non-empty intersection. A topological space is said to be compact if every family of closed sets with the finite intersection property has non-empty intersection.

(The reason this is directly equivalent is that a family of closed sets with empty intersection is precisely the set of complements of some open cover)

Starting from this definition, we can get an alternative definition for what it means for a metric space to be complete that makes the relationship between completeness and compactness much more obvious:

A metric spaces is complete if and only if for every family of closed sets with the finite intersection property that contains sets of arbitrarily small diameter has non-empty intersection.

i.e. metric completeness is “compactness for arbitrarily small sets”.

Let’s show that this is equivalent to the normal Cauchy sequence definition.

First, assume a metric space has this property, let’s show it’s complete in the Cauchy sequence sense.

So, let $$x_n$$ be a cauchy sequence. Now, define $$F_n = \overline{\{x_m: m \geq n\}}$$.

The family $$\{F_n\}$$ is nested and non-empty, so certainly has the finite intersection property. Its elements are closed by construction.

To see that it contains sets of arbitrarily small diameter, we just need to show that the tail sets $$\{x_m: m \geq n\}$$ can have arbitrarily small diameter, as the diameter of the closure of a set is the same as the diameter of the set. But $$x_n$$ is a cauchy sequence, so for $$\epsilon > 0$$ we can find $$N$$ such that for $$m, n \geq N$$, $$d(x_n, x_m) < \epsilon$$. Necessarily then the tail set $$\{x_m: m \geq N\}$$ has diameter $$\leq \epsilon$$.

Now suppose $$x \in \bigcap F_n$$. Then $$x_n \to x$$, as if we pick $$N$$ such that $$diam(F_N) < \frac{1}{2}\epsilon$$, then because $$x$$ is a limit point we can find $$x_m$$ with $$m \geq n$$ and $$d(x_m, x) < \frac{1}{2}\epsilon$$, so necessarily for all $$n \geq N$$, $$d(x_n, n) \leq d(x_m, x_n) + d(x_m, x) < \epsilon$$, and the sequence converges to $$x$$ as desired.

The other direction now. Suppose we have a Cauchy sequence complete metric space and a family of closed sets with the finite intersection property and arbitrarily small diameter sets.

Let $$E_n$$ be a sequence of sets in that family with $$diam(E_n) \to 0$$.

Pick $$x_n \in \bigcap\limits_{m \leq n} E_n$$ (we can do this because of the finite intersection property). Then $$x_n$$ is a Cauchy sequence: Pick $$N$$ such that $$diam(E_N) < \epsilon$$, then for $$m, n \geq N$$, $$x_m, x_n \in E_N$$, so necessarily $$d(x_m, x_n) \leq diam(E_N) < \epsilon$$.

Because it’s a Cauchy sequence, it converges, say to $$x$$. Because the $$E_n$$ are closed, $$x$$ is necessarily a member of $$\bigcap E_n$$.

Suppose now that $$F$$ is some other member of our family. We can repeat the above construction replacing $$E_n$$ with $$E_n \cap F$$, and get an element $$y$$ with $$y \in F \cap \bigcap E_n$$. But $$x, y \in E_n$$, so $$d(x, y) \leq diam(E_n) \to 0$$. So $$d(x, y) = 0$$ and thus $$x = y$$. Hence $$x$$ must be in the intersection of the whole family.

QED

Why does this characterisation matter?

Well, clearly it doesn’t matter that much. The vast majority of people who do analysis have probably never encountered it and their lives are not substantially worse off for that lack.

There are basically two major reasons I like this fact:

1. I think it makes the relationship between compactness and completeness much clearer.
2. What Zorn’s lemma does for transfinite induction it does for sequences in analysis – it essentially lets you factor out a repetitive mechanical part of the proof and just reuse it without having to repeat the machinery over and over again. I’m slightly allergic to sequences, so this tends to play well with how I like to do analysis.
This entry was posted in Numbers are hard on by .