Showing posts with label topology. Show all posts
Showing posts with label topology. Show all posts

Probabilistic convergence

The law of large numbers is something that we know, that in our heads is almost the definition of probability (it's not): "as sampling increases, the average of a variable approaches its expected value". I.e. for $X_i$ IID:

$$\lim_{n\to\infty}\frac1n \sum{X_i}=\mu$$
Let's think about what this statement really says: when you take more and more readings of $X$, the average will go closer and closer to $\mu$. But the values of these readings are inherently probabilistic: this is not an actual sequence of real numbers you can take the limit of. Rather, you are talking saying that of all the possible realizations (which are real number sequences), almost all of them (probabilistically) converge to the thing. I.e.

$$\mathrm{Pr}\left[\lim_{n\to\infty}X_n=X\right]=1$$
This is known as almost sure convergence.

In general, the thing on the right could've been a random variable, rather than a real number. And here's where some probability theory (read the article) comes in, because the random variables $X_n$ and $X$ need to be defined on the same sample space for this to make sense (i.e. it's not just about the distribution).

But with this, the definition as above still works: as an example, consider the sample space $[0,1]$ and consider a sequence of random variables $X_n$ that is respectively 1 on some corresponding sequence of sub-intervals approaching $[0,1/2]$. Then this approaches the random variable that is 1 on $[0,1/2]$ almost surely.

And yes, this is entirely due to the correlations between these things.

In any case, almost sure convergence isn't really the best way to express random variables converging to each other, as you can see. E.g. the central limit theorem -- like $\frac{1}{\sqrt{n}}\sum\frac{X_n-\mu}{\sigma}\sim N(0,1)$, cannot be phrased in terms of almost sure convergence, because $N(0,1)$ is a distribution, not a random variable.

Indeed, you may have figured that the problem of a random sequence converging to a random variable is somewhat similar to the notion of "functions converging to a function" -- indeed, one may think of the distributions of the random variables in the sequence and discuss their convergence. I.e.

$$F_n(x)\to F(x)$$
This is called convergence in distribution.

While convergence in distribution does not imply almost sure convergence in general as we've seen, we would expect that it does imply it in the case where the limiting random variable is constant (because then issue of correlations disappears).

But you may realize that this is not really so: a sequence may look increasingly like something without actually limiting to it. For example, think about a sequence like 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1... with an infinite number of 1s, but decreasing in frequency. This doesn't limit to zero. If this were a deterministic sequence, this would never be expected to limit to 0 as the positions of the 1s would be hardcoded into the generation of the sequence. However, the sequence can also be realized as a realization of a sequence of random variables $X_n$ that have probability $1/n$ of being 1. Then the $X_n$ converge in distribution to 0, but their realizations almost never (thus in particular don't almost surely) converge to 0.

So it seems that asking for realizations to almost surely converge to the right thing is a bit too strong for a lot of purposes. A weaker notion of convergence than almost sure convergence can be constructed by considering probabilities of each $X_n$ separately rather than as a sequence: $X_n$ converges to $X$ if each $X_n$ is in the limit almost surely arbitrarily close to $X$. Or more precisely:

$$\lim_{n\to\infty}\mathrm{Pr}\left(\left|X_n-X\right|<\varepsilon\right)=1$$
This is known as convergence in probability. Indeed:
  1. Almost sure convergence implies convergence in probability (obviously).
  2. Convergence in probability implies convergence in distribution (because they are both topological notions of convergence and the map from a random variable to its distribution is continuous).
  3. When the limit random variable is constant, convergence in distribution implies convergence in probability.
In fact, the law of large numbers that we stated above (in terms of almost-sure convergence) is the strong law of large numbers, while the weak law of large numbers only states convergence in probability.



Exercise:

Prove Slutsky's lemma: given $X_n, Y_n$ converge to $X,y$ in probability and $y$ is a constant random variable:

  1. $X_n+Y_n$ converges to $X+y$ in probability.
  2. $X_nY_n$ converges to $Xy$ in probability.
  3. $X_n/Y_n$ converges to $X/y$ in probability.
Why is it necessary that $y$ be a constant?

Lie group topology

I'll assume you have a basic understanding of general topology -- if not, consult the topology articles here. Most of the abstract stuff and "weird" cases are not really important, because it is easy to see that Lie groups are manifolds.

We need to be careful while studying the topology of Lie groups, because we already have an intuitive picture of a Lie group, and we need to be careful to prove all the things we just "believe" to be true.

The main point of the topology of a Lie group is that the group elements define the "flows" on the manifold. What this means is that left-multiplication is a homeomorphism, and it's not absurd to say that inversion is a homeomorphism, because it represents a "reflection" of the manifold. That these conditions make sense is confirmed by looking at the proofs of the following "obvious" facts.

(1) In a connected group, a neighbourhood of the identity generates the entire group, i.e. $H\le G\land H\in N(1)\implies H=G$ for connected $G$.

Let's think about why this is true. Why does $H$ need to be a neighbourhood -- why must it contain an open set containing the identity? Suppose instead we just knew it contained a set $Q$ that looked like this:


Well, $H$ still contains the orange point, but we cannot say it contains the purple point, because it's perfectly happy not containing it -- it's not like we have some vertical element in the Lie group that if you multiplied to some point in $Q$, you'd get the purple point. But instead if $Q$ was an open neighbourhood of the identity:

Then the purple point has to be in $H$, because $Q$ contains flows in "all directions" on the group. To actually prove that every point will be contained in $H$ -- well, we know that the point is (will eventually be) that $H$ is the connected component of $G$ (and since $G$ is connected, $H=G$) -- let's just show that $H$ is both open and closed, i.e. nothing in $H$ touches its exterior, and nothing in its exterior touches $H$. Here's the proof:
  • Nothing in $H$ touches anything -- Suppose $\exists x\in H, x\in\mathrm{cl}(H')$. Then $xQ$ contains a point in $H'$.
  • Nothing outside $H$ touches it -- Suppose $\exists x\in H', x\in\mathrm{cl}(H)$. Then $xQ$ contains a point in $H$, so $x$ must be in $H$.
We're really just formalising the notion of "translating $Q$ to its edges to extend $H$ further and further". The key fact we've used here is, of course, that left-multiplication is a homeomorphism, so $xQ$ is still an open set.

(2) The connected component of the identity is a subgroup.

The idea is that taking two elements $g,h$ of the connected component, their product should remain in the connected component. Once again, this follows from the continuity of left-multiplication -- considering the action of left-multiplication by $g$ on the connected component, its continuity implies that the image must remain connected.

(3) If a subgroup contains a neighbourhood of the identity, it contains the connected component of the identity.

Corollary to (1) and (2).

(4) The connected component of the identity is a normal subgroup.

Conjugation is a continuous map.

(5) Open subgroups are closed.

Corollary to (3). Alternate proof: the complement is the union of some cosets, which are open sets too. A weaker theorem can be made of closed sets -- closed subgroups with finite index are open.

What this means: any open subgroup is a union of connected components.

(6) Intuition for compact subgroups

How can a Lie group possibly "close in on itself"? Surely we keep "extending" an open neighbourhood $W$ of the identity by observing that $xW$ must be in the subgroup? The idea is that these translations of $W$ form an open cover of the group, if it has a finite subcover, then it makes sense for the group to close in on itself. By playing around with different open neighbourhoods $W$ and taking some suitable unions, one can see that this is equivalent to the condition that every open cover has a finite subcover, i.e. the group is compact.


(7) A compact, connected Abelian Lie group is a torus.

This is a generalisation of "a finite Abelian group is the direct product of cyclic groups".

The idea behind the proof is that in the Abelian case, the exponential map is a homomorphism from the Lie algebra to the Lie group, but the Lie algebra cannot detect compactness in the Lie group -- the kernel of the exponential map can. We know from our study of the exponential map that it has a discrete kernel, and in the Abelian case is surjective -- thus the Lie group is homeomorphic to $\mathbb{R}^n/\mathbb{Z}^n$, which is an $n$-torus.

(8) A connected Abelian Lie group is a cylinder (direct product of a torus and an affine space)

Analogous to above, except $\mathbb{R}^m/\mathbb{Z}^n$ where $m\ge n$.

Supplementary definitions: levels of abstraction

Although we have been able to generalise a lot of our theorems about the topological properties of metric spaces to topological spaces, several others remain out of our reach, and we need to find the right level of abstraction that makes them true -- and we can usually do this by trying to prove the theorem and seeing what it "needs", then if this theorem actually characterises the space, proving the need is equivalent to the theorem.

Separation axioms

We've seen the first one. TFAE:
  • $X$ is a T0/Kolmogorov/distinguishable space.
  • All points in $X$ are distinguishable.
  • For any pair of points, there exists an open set containing exactly one of them.
Now, in metric spaces, statements like "there is a point of a set (or sequence) $S$ in every open neighbourhood of $x$" are equivalent to "there are an infinite number of points of $S$ in every open neighbourhood of $x$", i.e. every open neighbourhood of a limit point of $S$ has infinite points in $S$. The key here is that at any step in the process, an open neighbourhood of $x$ can be constructed that does not contain any of the previous points in the sequence, i.e. there exists an open neighbourhood of $x$ not containing some finite number of points.

This is possible, e.g. if we decide that finite sets are closed (or equivalently singletons are closed). This is an iff -- if a finite set $S$ isn't closed, there are points in $\mathrm{cl}(S)$ that aren't in $S$, but it's impossible for there to be an infinite number of points in $S$ in a neighbourhood of such a point, as $S$ is finite.

Wait, what about for points in $S$ itself -- aren't these all also limit points of $S$? We sneakily changed the definition of limit points from $x\in\mathrm{cl}(S)$ to $x\in\mathrm{cl}(S-\{x\})$, i.e. to exclude sequences that include the point itself. So since excluding a set from a finite set keeps it finite, it is still closed, and thus $x$ is not re-included when you close it (so it is not a limit point at all).

Wait, what about the discrete topology on a finite set? All finite sets are closed, but how could we have an infinite number of anything? The key is that there are no "limit points" of any set. So the only T1 finite spaces are the discrete ones.

Note how this implies a stronger form of T0 -- T0 said that for every pair of points, at least one of them has an open neighbourhood excluding the other. Well, in a T1 space, we can always just remove any finite number of points from an open neighbourhood and it will remain an open neighbourhood -- so in particular, this means that for every pair of points, each has an open neighbourhood excluding the other, or any two points are separated. In fact, this is clearly an iff (take some finite intersections).

The closedness of finite sets has plenty of other implications that match our intuition. You will see some in the list of exercises.

So for now, TFAE:
  • $X$ is a T1/Frechet space.
  • All points in $X$ are separated.
  • For any pair of points, each has an open neighbourhood excluding the other.
  • Each open neighbourhood of a limit point of $S\subseteq X$ contains an infinite number of members of $S$.
  • Finite sets are closed/singletons are closed.
We've seen spaces in which limits are not unique. You might think that topological distinguishability should suffice to have unique limits -- is this right?

Let's go through the proof of the uniqueness of limits on metric spaces. Suppose $f$ has two limits $L_1$ and $L_2$ at $c$. Now does it really suffice that there is a neighbourhood of $L_1$ not containing $L_2$? Not necessarily -- it may be the case that this neighbourhood of $L_1$ intersects every neighbourhood of $L_2$ because there's just that amount of indiscretion around $L_2$. What's important is that there exist disjoint neighbourhoods of $L_1$ and $L_2$.

So the uniqueness of limits is equivalent to the existence of disjoint neighbourhoods for distinct points. This is variously called a Hausdorff space or a T2 space. So TFAE:
  • $X$ is a T2/Hausdorff space.
  • All points in $X$ are separated by neighbourhoods.
  • Any pair of points has a pair of respective neighbourhoods disjoint from each other.
  • Limits of nets/filters are unique.
Here's another obvious fact about the topology of metric spaces: any continuous function $f:S\to\mathbb{R}$ on a closed (not just compact) set $S$ may be extended to a continuous function $F:X\to\mathbb{R}$. The proof of this relies on the ability to "connect" points between the pieces of $S$:


You might think that this just means "having a continuous function between two points", but this is only because of the choice of a one-dimensional space -- in general, the "boundary" of each connected component is not just a finite number of points. What does suffice is that for disjoint closed sets $S$ and $T$ there exists a continuous function $h:X\to\mathbb{R}$ "separating" them, i.e. such that $h(S)=\{0\}$, $h(T)=\{1\}$. Then a bunch of such functions can just be added to $f$ to obtain $F$. This is trivally an iff.

One may try further to "prove" the existence of such a continuous function $h$. Well, on $\mathbb{R}$, we have a notion of a "midpoint" between the endpoints of the closed sets -- we could have the value of $h$ at this point be $1/2$, and then continue the construction for all "Dyadic rational"-points.



In general, we don't really need the notion of a midpoint, but we do need some point with "space around it", i.e. open neighbourhoods of each closed set that don't contain the point. We only need the case where $S$ and $T$ are in a connected component, so this is equivalent to the existence of open neighbourhoods of disjoint closed sets. This is also clearly an iff, as one may consider preimages of open sets in $[0,1]$. Thus TFAE:
  • $X$ is a T4/normal space.
  • Every pair of disjoint closed sets has respective disjoint open neighbourhoods. 
  • Every pair of disjoint closed sets can be separated by a continuous function (Urysohn's lemma).
  • Every continuous map on a closed subset can be extended to a continuous map on $X$ (Tietze's extension theorem).

Countability

We've already seen the first one. TFAE:
  • $X$ is a first-countable space.
  • Every point in $X$ has a countable neighbourhood basis.
  • $\lim_{x\to a}f(x)=L\iff\forall (x_{n\in\mathbb{N}})\to a, f(x_n)\to f(a)$. 
  • Every filter has a corresponding sequence.
Several other cardinality functions can be defined and other axioms of countability can be introduced, e.g. sequantial spaces, separable spaces and second-countable spaces, but we cannot really motivate them at this point. (Second-countability in particular important when dealing with metrisability, integration and related issues, as it gives rise to the notion of "paracompactness".)

For the following statements, find the "least restrictive" level of abstraction necessary, and decide if the property characterises the level (i.e. is it an iff?):
  1. Every subset $S$ is the union of all the closed sets contained in $S$.
  2. Every subset $S$ is the intersection of all the open sets containing $S$.
  3. Every nonempty open set contains a nonempty closed set.
  4. Every point $x$ admits a nested neighbourhood basis, i.e. a neighbourhood basis totally ordered by $\subseteq$.
  5. Closed subset $T$ of a compact space $S$ is compact.
  6. Compact space is closed.
  7. There is no smallest neighbourhood of any point (i.e. $\forall x\in X,\forall N\in N(x), \exists M\in N(x), N\not\subseteq M$).
Solutions:
  1. T1. This is equivalent to asking that every point in $S$ is contained in a closed subset of $S$, which is possible if the singleton is closed. For equivalence, consider a singleton $S$.
  2. T1. Dual to Exercise 1.
  3. T1 suffices, but is not equivalent (e.g. the indiscrete topology or any other topology full of clopen sets). Maybe if you change to proper containment.
  4. First-countability. (both sides of equivalence are clear -- think directed set, etc.)
  5. Any topological space suffices. We need to be careful with the proof here because the notions of closedness and compactness are intuitively very similar. Here it is: any net on $T$ is a net on $S$ and thus has a convergent subnet with limit is in $S$ -- but its limit must also be in $T$ because $T$ is closed.
  6. Hausdorff suffices (probably not equivalent, but who cares). The thing is that in general, even on a compact space, although a convergent sequence may have a convergent subsequence in $S$, it may have other limits outside $S$. But in a Hausdorff space, limits are unique.
  7. "Not Alexandrov". Let's characterise the topologies that do have smallest neighbourhoods -- these are necessarily the ones for which arbitrary intersections of open sets are open, and are called finitely-generated topologies or Alexandrov topologies. 

Supplementary definitions: compactness, compactification, hemicompactness

Let's think about the Bolzano-Weierstrass theorem in real analysis (every sequence in a compact set has a convergent subsequence). What would it take to generalise this theorem to a topological space $X$?

First, let's write down the statement: we know that sequences aren't very fundamental to arbitrary topological spaces, so the statement we're looking for would be something like: every net in a compact set has a convergent subnet. The question is what the definition of "compact" is a general topological space generalising the "closed and bounded" definition for metric spaces (and how to prove the generalised statement from this definition).

Let's try to formulate some equivalent ways of stating that. It is trivial to see that the filter associated with a subnet is a filter refinement -- so we can state it as: every filter in a compact set has a convergent refinement. This also implies that every ultrafilter is convergent (as an ultrafilter has no proper refinement), and by the ultrafilter lemma, the implication is an iff. Of course equivalently, every ultranet is convergent (where an ultranet is obviously a net that for all $S$ is either eventually in $S$ or in $S'$).

You might think of ultranets (nets corresponding to ultrafilters) as all sorts of stuff, like "all convergent nets are ultra", or as generalisations of monotonic sequences -- all these are wrong, and it's a useful exercise to write down counter-examples to this on the real line (hint for the monotonic sequences thing: take the union of a bunch of sets such that a tail set of your sequence is in neither this union nor its complement). You might also think that the "ultrafilter" formulation of the statement is related to the "halving intervals" proof of the Bolzano-Weierstrass theorem, but the filter base generated by this mechanism does not generate an ultrafilter (construct a set that isn't in the filter and its complement isn't either).

It should be clear that if we only wanted sequences having convergent subsequences, requiring the convergent refinement for every filter is only necessary needed if every filter has a corresponding sequence, and having a convergent refinement only suffices if every filter has a corresponding sequence -- recall that this occurs precisely in a first-countable space. The statement here is that in and only in (inn?) a first-countable space, compactness implies sequential compactness.

OK -- we still haven't discovered what this generalised "compactness" is. What is the hypothesis of the generalised Bolzano-Weierstrass theorem?

Let's consider two example spaces where the Bolzano-Weierstrass theorem doesn't apply:

These two are "basically the same" kind of set -- a set with some limit points removed. Except in the second case, we can actually say "it's a set with some limit points removed", because these limit points exist in the space the set is in, while in the first case, the limit points have been removed from the containing space itself. You know, let's actually just talk in terms of the subspace topology on the set from now on to avoid having to make a distinction between the two "cases".

Well, can we recover some notion of the limit point after it's been removed? A trick you may be familiar with to find limits is to take intersections -- we could just say that if this is true for all proper filters $\phi$, we have a compact set:

$$\bigcap_{N\in\phi}N\ne\varnothing $$
Right?

Not right. This intersection will actually every often be empty -- it only measures if the net has a constant subnet (check that this is true). What we need to do is to consider the closures of each set in the filter, so that the limit points, if any, are actually included -- and since the closures are members of the filter too (being supersets), we can just consider the intersection of all closed members of the filter.

Note how we cannot just say something about the closure differing from the sequence -- do you see why?

So we can write e.g.

$$\forall \phi\ne \pi(S), \bigcap_{\mathrm{closed}\ N\in\phi}N\ne\varnothing $$
Now while this is a perfectly good condition on its own, we see that it contains some redundant sets -- we're taking an intersection, so this kind of naturally "subsumes" the filter's defining properties of closure under finite intersections and supersets. We can just get rid of these sets and consider a bunch of sets that generate the filter -- this is called a filter sub-basis. Any set of sets generates a filter, but we specifically want to generate a proper filter -- this requires that every finite intersection of sets in the filter sub-basis is non-empty -- this is called the finite intersection property (FIP).

So we have our definition of a compact set: any family of closed sets satisfying the finite intersection property has a nonempty intersection.

Or we could state in terms of the contrapositive: any family of closed sets with empty intersection has a finite subfamily with empty intersection.

And then we could take the open-closed dual of the statement: any open cover of $S$ has a finite subcover.

The last one is the most common formulation of compactness.
    What the Bolzano-Weierstrass theorem really gives us is an interpretation of compact sets as "kinda" like finite sets -- not in terms of the number of points, but in terms of the amount of "space". You have only a finite amount of "space" to move around in, you can't just escape to infinity, where infinity is a point not in the set. The Bolzano-Weirstrass theorem is really a "generalisation of the infinite pigenhole principle" (which is precisely the statement of having "limited space"), and in fact yields the latter for the discrete topology where the only convergent sequences are the constant ones.

    So in contexts where we want to "generalise" facts about finite sets, like in Lie theory, it's natural that compact sets are of importance. To really drive the point home, consider the following reformulation of the open cover definition:

    For a family of sets, a compact union of some of these sets has any property that every finite union of them does.

    Or further, defining an extensive property as a property of open sets such that $P(S)\land P(T)\implies P(S\cup T)$, a locally true property as a property satisfied by some neighbourhood of every point in a space and a globally true property as a property satisfied by the universal set:

    Every locally true extensive property is globally true iff the space is compact.

    This formulation of the compactness leads to several well-known results about compact sets, including: A continuous real-valued function on a compact set is bounded.

    More on the local/global correspondence at Terry Tao, "Compactness and Compactification".

    So here's a list of things we've seen are equivalent to compactness:
    • $S$ is a compact set.
    • Every locally true extensive property on $S$ is globally true.
    • If $S$ is a union of sets, it has any property that all finite unions of them have.
    • All open covers of $S$ have a finite subcover.
    • All families of closed sets with the FIP in $S$ have a nonempty intersection.
    • All ultrafilters on $S$ converge.
    • All filters on $S$ have a convergent refinement.
    • All convergent nets in $S$ have a convergent subnet.



    Compactification

    The obvious question is how we can make a space compact by adding in some points, like we can in the "subset without its entire boundary" example (just take the closure). In this sense, compactification is a "generalisation" of closure, where instead of just adding points that already exist in the space, we add completely new points: points we call infinity. Making the correspondence precise, we are asking for an embedding of the space such that the closure of the embedded set is the "compactification" (the minimum such embedding is the compactification).

    Obviously, we have some freedom as to how to make this compactification -- as to how we can "glue the loose ends" of the space. For example, we could assign a single point $\infty$ to both sequences increasing without bound and those decreasing without bound (compactifying $\mathbb{R}$ into a circle), or we could define $+\infty$ and $-\infty$ differently, compactifying it into a interval. 

    There are still questions on how we ensure, in general, that e.g. $(n)$ and $(n^2)$ both "converge" to the same point.

    Are they necessarily the same point?

    Suppose we add a point, call it $\infty$ to represent the limit of the sequence $(n)$. What does it mean to say that $(n)$ converges to $\infty$? It means that $(n)$ is eventually in every neighbourhood of $\infty$ -- every net corresponds to a filter, and in this case we have the neighbourhood filter of $\infty$ -- the set of all sets containing a cofinite number of positive integers. Similarly, $(n^2)$ generates the filter of all sets containing a cofinite number of squares.

    These are different points. Could we make them the same point? For this, we'd need both $(a_n)$ and $(b_n)$ to be eventually in every neighbourhood of $\infty$ -- this corresponds to the filter of sets containing all but a finite number of points in each sequence. So if we wanted two infinities, $+\infty$ and $-\infty$, the neighbourhoods of $+\infty$ would be the filter of sets containing all but a finite number of points of any sequence diverging to $+\infty$ -- equivalently:

    $$\begin{array}{l}N( + \infty ) = \{ S\mid \exists r,\forall x > r,x \in S\} \\N( - \infty ) = \{ S\mid \exists r,\forall x < r,x \in S\} \end{array}$$
    But if we just wanted a single point at infinity,

    $$N(\infty)=\{S\mid\exists r,\forall |x|>r, x\in S\}$$
    How would this one-point compactification work in general? We'd like to assign $\infty$ as the limit in $X\cup\{\infty\}$ of every net that does not have a limit point in $X$ (this will automatically also create a limit point at $\infty$ for nets that diverge but also have a limit point in $X$, like $n\sin(n)$) -- i.e. we want a filter that every divergent net is eventually in. Well, the point of the Bolzano-Weierstrass theorem is that a divergent net eventually escapes every compact set, i.e. it is eventually in every cocompact set. So in general, we have a neighbourhood basis for the point at infinity:

    $$B(\infty)=\{S\cup\{\infty\}\mid S\subseteq\Phi_X\land \mathrm{compact}\ S'\}$$
    Or in terms of open sets,

    $$\Phi_{X\cup\{\infty\}}=\Phi_X\cup\{S\cup\{\infty\}\mid\mathrm{compact}\ S'\}$$
    This is called the one-point compactification or the Alexandroff compactification of $X$.

    But the one with two infinities was cool too. The idea was that the two infinities at the far ends of $\mathbb{R}$ are somehow "disconnected" -- this is in contrast to e.g. $\mathbb{R}^{n>1}$, where the "limits" of any divergent sequence must be connected by a giant loop at infinity. If we want each infinity to be a connected component of its own, what we need is a filter base of connected sets converging to a point at infinity.

    What do I mean? In general, all compactifications are obtained by considering some partitions by non-compact sets of co-compact sets -- in the case of the one-point compactification, these subsets are the trivial ones. In the case of the "plus infinity, minus infinity" compactification, the partition is the set of connected components.

    Illustration of why we need a partition of the co-compact sets -- the above is not a partition, and there are sequences escaping every one of the four filters drawn. This is actually an illustration of why the end-compactification of the plane has only one infinity.
    OK, so how do we actually make this construction? The thing is that we have co-compact sets like $(-\infty,-2)\cup(-1,1)\cup(1,\infty)$ -- but $(-1, 1)$ is not really a connected component we care about. We care about the connected components of a co-compact set that are a part of a chain that every co-compact set has connected components in. One way to do this is as follows:
    1. Construct an infinite nested basis $U_1\supseteq U_2\supseteq \dots$ of co-compact sets -- i.e. so that every co-compact set contains one of these sets.
    2. Each chain $N_1\supseteq N_2\supseteq\dots$ of connected components is a neighbourhood basis for a point at infinity, called an end.
    This is the end compactification.

    There are just three questions:
    1. Is this independent of the co-compact set basis we use?
    2. Does such a basis always exist?
    3. Is the result always compact (this includes questions you may have about the existence of connected component chains, etc.)?
    To prove the first, it suffices to show that for any two co-compact bases $U$ and $V$, if a set contains some $N_i$, a set in some connected component chain of $U$, it contains an $M_j$, a set in some connected component chain of $U$ (this creates a natural bijection between the ends arising from $U$ and those from $V$). Because connected components are a partition, it suffices to show that for any two co-compact bases $U$ and $V$, if a set contains some $U_i$, it must contain a $V_j$ -- which is clearly true. So: TRUE.

    For the second -- this is equivalent to asking the dual question: is there a chain of compact sets such that every compact set is contained in a set in the chain? A simpler, equivalent way to phrase the question is: is there a chain of compact sets whose interiors cover $X$? This is called exhaustion by compact sets, or hemicompactness -- and as you may have guessed, not all spaces have it. So: FALSE.

    TBC: why 3 is false, general version, Gromov boundary, Stone-Cech, why Hausdorff compactifications are preferred, add labels

    A stupid joke -- the seven Cs: closed, compact, connected, convergent, continuous, covers, co-. Covers and closed are actually repeated though aren't they?

    Supplementary definitions: connectedness, clopen sets

    What does it mean for a space to have $n$ "separate" parts?

    Well, let's start from the basics -- how do we count the $n$ parts? We label them $1,...n$, i.e. we have a surjection $\ell:X\to [n]$. Now, for any point in $X$ mapping to some $k\le n$, we should be able to jiggle it around a bit so that it still maps to $k$, otherwise the other "part" mapping to something else will be connected to this one. In other words, $\forall k, \ell^{-1}(\{k\})\in\Phi_X$.

    Thus, we say that $X$ has $n$ separate components if there exists a continuous surjective labeling function $\ell:X\to [n]$, where $[n]$ is equipped with the discrete topology -- equivalently, we say that $X$ is the union of $n$ nonempty disjoint open sets (the "nonempty" part comes from the "surjective" part) (we'll call this an open partition). We can then define a connected space as one that cannot be written as an open partition.

    What about a set being connected? If we similarly define maps from the set to a labeling topology, we can see that what we're looking for here is precisely the notion of a subspace topology -- a set is a connected set if taken as a subspace, it is a connected space. This is clearly equivalent to saying that the set cannot be covered by two non-empty disjoint open sets, i.e. does not have a open disjoint cover.

    Let's define three parallel concepts to define the notion of a connected component:
    • A maximal component partition (i) of a space $X$ is an open partition of $X$ with the largest possible value of $n$ -- a maximal component (i) is a set in this partition. 
    • A open connected partition (ii) of a space $X$ is an open partition of $X$ such that each component is connected -- a open connected component (ii) is a set in the partition.
    • A connected component (iii) of a space $X$ is a connected subset $S$ all of whose proper supersets are disconnected. A connected component list (iii) is the list of all such distinct subsets.
    (You can tell (i) is going to be ugly -- maximums and all don't play well with infinite cardinalities)

    So many questions.
    1. Does a maximal component partition (i) always exist? If $n$ must be an integer, then FALSE (e.g. $\mathbb{Q}$); If $n$ is any cardinal number, then TRUE (as the cardinality of the space is an upper bound). Note that with cardinal numbers, just because there is a maximum $n$ doesn't mean there is a maximal such partition, i.e. one that cannot be partitioned any further. That would be a open connected partition (ii).
    2. Does an open connected partition (ii) always exist? FALSE. E.g. $\mathbb{Q}$ with the standard topology -- any open set contains an infinite number of rational numbers, which is clearly disconnected.
    3. Is a connected component list (iii) a partition of $X$? TRUE.
      1. (Disjoint) The union of two distinct connected components is disconnected by assumption, so can be written as an open partition, which create an open disjoint cover of each connected component -- this can only be true of an open set if the sets in the cover are precisely the connected components -- since they are disjoint, the conclusion follows. 
      2. (Union) There is a unique connected component around each point, and it is the union of all connected sets containing the point (Proof: suffices to show this union is connected. An open disjoint cover of the union would be an open disjoint cover of each of these sets, and since none of these sets are disjoint, this would imply some of them are disconnected, contradiction.), and is clearly nonempty. The union of the connected components around each point contains each point.
    4. Sameness between partitions (notation: is (i) implies is (ii))
      1. (i) imp (ii)? FALSE in general, e.g. $\mathbb{Q}$.
      2. (i) imp (iii)? FALSE in general, e.g. $\mathbb{Q}$. 
      3. (ii) imp (iii)? TRUE.
      4. (ii) imp (i)? TRUE. Suffices to show every open partition has at most as many sets as an open connected partition (ii). From 9, there exists a (ii) with at least as many sets than the given partition. From 6, this (ii) is unique.
      5. (iii) imp (i)? FALSE in general, e.g. $\mathbb{Q}$.
      6. (iii) imp (ii)? FALSE in general, as above, e.g. $\mathbb{Q}$. But if (ii) exists, then TRUE, by 4c and 7.
    5. Is a maximal component partition (i) unique up to permutation? FALSE, as we saw with $\mathbb{Q}$.
    6. Is an open connected partition (ii) unique up to permutation? TRUE, by 4c and 7.
    7. Is a connected component list (iii) unique up to permutation? TRUE, from the "uniqueness" lemma in 3b.
    8. Is every set $S$ in an open partition a union of maximal components (i)? Ambiguous since the maximal components are not unique. If we want this to be true for any maximal component partition, this clearly FALSE, e.g. $\mathbb{Q}$. If we're saying there exists a maximal component partition such that this is true, then TRUE -- just consider the maximal component partitions of each such set and note that together they form a maximal component partition of the space.
    9. Is every set $S$ in an open partition a union of open connected components (ii)? TRUE by 4c and 10.
    10. Is every set $S$ in an open partition a union of connected components (iii)? By 3, it suffices to show that every connected component is either disjoint from $S$ or contained in it. This is true as otherwise their union would be a connected superset of the connected component.
    So here's our conclusion from all this: (iii) should be our definition of a connected component -- a connected subset whose supersets are all disconnected, or by construction, the union of all connected sets containing a given point. When these components are open, they are the same as in (ii) (which is the only time (ii) exists) -- they are open sets that partition your space. And when the number of connected components is finite, they are the same as (i).

    The reason we initially thought the definitions would all be equivalent is that we were only visualising cases with a finite number of connected components. In this case, it's easy to see that the connected components are open -- just keep partitioning with open sets until you have as many as the number of connected components. If you can partition any further, you have a open disjoint cover of a connected component, which is a contradiction. This construction cannot be reproduced with $\mathbb{Q}$.

    By the way, we've used (and proven) the following obvious fact throughout the above series of exercises: the union of two non-disjoint connected sets is connected.

    Here are some more facts:
    1. Closure of a connected set is connected. (i.e. something touching a connected set is "connected to it") Suppose not. Then the disjoint open cover of $\mathrm{cl}(S)$ is a disjoint open cover of $S$ unless $\mathrm{cl}(S)-S$ is open, which it isn't (as every open set containing a member of $\mathrm{cl}(S)$ intersects $S$).
      1. (Corollary) A connected component is a closed set.
      2. (Corollary) The union of two touching connected sets is connected.
    2. The topology on $X$ is the disjoint union topology of those of the disjoint open sets partitioning it. (exercise left to the reader)
      1. (Corollary) If a space $X$ can be partitioned into $n$ disjoint open sets each homeomorphic to $A$, its topology is the product topology $A\times [n]$ where $[n]$ has the discrete topology.
    We also have the following interpretation of connected components: they are the equivalence classes of the relation "there exists a connected set containing both points".

    Make sure you understand why the following are true, and why the "finite" qualifiers are needed where we've used it.
    • A connected component, and thus a finite union of connected components, is always closed.
    • If there are only a finite number of connected components, a connected component, and thus a (finite) union of connected components is always open.
    Also: continuous functions preserve connectedness (consider the preimage of a connected component). This is a generalisation of the intermediate value theorem (do you see why?).


    Clopen sets

    You may have noticed that when we have a finite number of connected components, each component is both closed and open. Closed as always, because nothing touches a connected component. Open, because the complement is a finite union of closed sets and thus closed. When we have infinite components, sometimes some infinite unions act this way. Sets that are both open and closed are called clopen.

    In fact, every clopen set $S$ is necessarily a union of (possibly infinite) connected components. This is an instructive proof to work through -- the proof you'd see is: suppose for contradiction that $\exists x\in X$ touching both $S$ and $S'$. Then $x\in S$ implies $S'$ not closed and $x\in S'$ implies $S$ not closed, contradiction.

    The intuition behind the proof is this: we can understand a closed set as a set where all convergent nets lying inside converge inside, and an open set as a set where all nets converging inside lie inside. So if we stuck a set "touching" $S$ (i.e. with some point touching them both), then for any point on their border, we could construct sequences on both sides converging to it. Then both $x\in S$ and $x\in S'$ lead to contradictions.

    The open set/closed set formalism is a way to simplify this whole reasoning without having to worry about nets and their limits.

    Topology III: example topologies, inherited topologies, distinguishability

    Let's think of some example topologies one may introduce on a set -- this is easiest in the open set formalism. Prove the statements we make.
    • The discrete topology, where $\Phi=\wp(X)$, which are also the closed sets. The neighbourhoods are simply the principal filters, i.e. $N(x)=\{S\subseteq X\mid x\in S\}$. The closure operator is just the identity and $\sim$ is just $\in$. The limit of a function is simply its value at the point. All functions from a discrete space are continuous everywhere. This basically adds no structure at all to a set, as each point is essentially "separated" from each other point. Clearly, any bijection between sets acts as a homeomorphism between the corresponding discrete spaces.
    • The indiscrete topology, where $\Phi=\{\varnothing, X\}$, which are also the closed sets. The neighbourhoods are $N(a)=\{X\}$. Every point touches every non-empty set, and the closure of a non-empty set is just $X$. Every point is the limit of every function. All functions to an indiscrete space are continuous. In other words, every point is "basically the same", cannot be distinguished.
    • The kinda-sorta topology, where $\Phi=\wp(S)\cup \{X\}$ for some $S\subset X$. You should be able to see by now that this topology has a bunch of discrete points and a bunch of indsistinguishable points. A neighbourhood of a point in $S$ touches only the sets containing it, but a neighbourhood of a point outside $S$ touches every non-empty set -- so the closure of a set is just the set united with $S'$. Not very interesting, so I'll stop.
    • The cofinite topology on an infinite set, where $\Phi = \{S\mid \mathrm{finite}\ S'\}\cup\{\varnothing\}$ -- the closed sets are the finite sets and $X$ -- a neighbourhood of a point is a cofinite set containing that point. A point touches a set if that set is infinite or contains that point -- so the closure of a finite set is the identity and the closure of an infinite set is $X$. For a function $f:X\to Y$ where $X$ is cofinite, its limit at $a$ is a point such that for each of its neighbourhoods, almost all values of $x$, including $a$, map into it. The function is continuous at $a$ if for each neighbourhood of $f(a)$, almost all $f(x)$ are in it -- it is continuous everywhere if every open set in $Y$ contains almost all $f(x)$. In particular, if $Y$ is also cofinite, the limit can only be equal to $f(a)$, which it is iff the function is finite-to-one at every point besides $a$ -- and a function that is continuous everywhere is a finite-to-one function.
    • The cocountable topology on the real numbers is basically the same as above except with "countable" replacing finite everywhere.
    • The cobounded topology on a metric space -- again kinda the same idea.
    • The co(finite volume) topology on a measurable space -- same idea, I guess? Check and find out.
    • The first-n topology on the naturals where a set is open if it is of the form $\{x< n\}$ for some (natural or infinite) $n$. The neighbourhoods of a point $x$ are all the sets containing $\{1,2\dots x\}$, a point touches a set if the set contains a point less than or equal to it, the closure is $\mathrm{cl}(S)=\{x\ge\min S\}$. The limit of a function $f:X\to Y$ ($X$ equipped with the first-n topology) at a point $a$ is $L$ if $f(x)$ is topologically indistinguishable from $L$ for all $x\le a$. If $Y$ is also first-n, then the function's limit is any upper bound on its value for $x\le a$ -- the function is continuous at $a$ if its value at $a$ is higher than that at any lower value, and is continuous everywhere if it is (not strictly) increasing.
    You should get some kind of feel for open sets now -- if you can find an open set containing one point but not another, they can be distinguished in some sense. This is the definition of topological distinguishability.

    One may then define a partial order on the topologies on a set based on fineness and coarseness (this is called the comparison of topologies), where $\Phi_1\le\Phi_2\iff \Phi_1\subseteq\Phi_2$. The discrete topology is the finest topology and the indiscrete/trivial topology is the coarsest topology. A continuous function $f:X\to Y$ remains continuous if $X$ becomes finer or $Y$ becomes coarser, but a homeomorphism does not remain continuous in either situation (but can if they both change in a specific way)

    For fun, let's try to visualise the cofinite topology (keep the set $\mathbb{N}$ in mind) -- the only sets with any sort of interiors are the cofinite sets. A finite set is closed, has no interior (it's its own boundary, i.e. it's a bunch of discrete points) and doesn't touch anything outside (because it's closed). An infinite set touches every single point, making them all part of their boundary -- it is closed at the points it contains and open at the points it doesn't contain. This explains the nature of the open and closed sets to us: if a point is contained in a finite set, it is located on its boundary. No matter how large you make the set, as long as it is not cofinite, it cannot contain the point on its interior, as its complement is infinite and thus touches the point.

    You can see that the description above -- while basically a very intuitive explanation of how the topological features of the space interact -- is basically equivalent to rigorous topological arguments. So our axioms of topology really do describe spaces with some very similar properties to ones we're used to dealing with.

    More examples: inherited topologies

    We've already seen one kind of inherited topology: that inherited from a metric space -- where the open sets are just sets with some "wiggle-room" for each element.

    Here are some obvious "inherited topologies" -- topologies determined by some other structure:
    • Subspace topology -- The open sets define a generalised "wiggle room" in a set $X$ -- for a function to be continuous, it must be similar to its value for some "wiggle room" in its domain. In a subspace (subset) $S$ of that space, we don't really know or care how a function on $S$ behaves outside $S$ -- for it to be continuous in $S$ at a point, the only wiggle room we care about are is wiggle room inside $S$ (e.g. the Heavside step function is continuous on the nonnegative reals) -- and since the open sets on $X$ define what wiggle room is in this topological space, $\Phi_{S}=\{O\cap S: O\in\Phi_X\}$. Check that the axioms apply.
    • Disjoint union topology -- You can't really invert the subspace topologies on a partition to necessarily recover the original topology -- you necessarily lose information about how the subspaces stick to each other when you cut it up. But you can still just "stitch together" some topological spaces, i.e. take a disjoint union of some sets -- it's important that you don't cut anything while doing so, so the "stitching" (i.e. the canonical injections) need to be continuous. There are multiple ways to define such a stitching, but the canonical disjoint union topology is the finest among them -- we let all sets $U$ whose pre-images $p_i^{-1}(U)$ in each $X_i$ are open be open. I.e. $\Phi_{\sum X_i}=\{O\mid \forall i, O\cap X_i\in\Phi_{X_i}\}$.
    • Product topology -- Continuity on $X\times Y$ means being able to wiggle a little bit in any direction on $X\times Y$ and keep the function's value similar. The only way to generally define this notion of a general wiggle space is as an arbitrary union of little "squares" (called open cylinders), like in calculus, i.e. with some abuse of notation: $\Phi_{\prod X_i}=\{\bigcup \prod O_i : O_i \in \Phi_{X_i}\}$.
    • Quotient topology -- Quite often, we want to "collapse" a topology tying together some nearby or otherwise related points. Such a relation is an equivalence relation $\sim$, and what we need is a topology on the equivalence classes. The idea behind the topology is that the equivalence classes of nearby points are still nearby, i.e. so that the function $q(x)=[x]$ is continuous while not becoming too indiscrete: i.e. $\Phi_{X/\sim}=\{S\subseteq X/\sim\mid q^{-1}(S)\in\Phi_X\}$.
    • Initial topology -- The subspace topology can be understood as asking that the embedding of the subspace into the parent space is continuous, while not adding too many open sets. This notion can be generalised -- we can ask for the coarsest topology on a set $X$ that makes a family of functions from $X$ continuous. This is a generalisation of the subspace and product topologies
    • Final topology -- Dually, we may ask for the finest topology on a set $X$ that makes a family of functions to $X$ continuous. This is a generalisation of the disjoint union and quotient topologies.
    Elementary theorems (exercises)
    1. Figure out if these statements are True/False:
      1. A set is closed iff it is closed under limits of nets.
      2. The closure of a set equals the intersection of all closed sets containing the set.
      3. The interior of a set equals the union of all open sets contained in the set.
      4. A set equals the union of all closed sets contained in the set.
      5. A set equals the intersection of all open sets containing the set.
      6. Having an empty interior implies being closed.
      7. Having an empty interior is equivalent to being a subset of its boundary.
      8. $\forall N\in N(x), y\in N(x)\implies x=y$. 
      9. Limits are unique.
      10. If $S$ and $T$ are disjoint from each other's closures, their closures are disjoint.
      11. The product topology is the initial topology with respect to the projection maps.
      12. $\sum_I X$ with the disjoint union topology is homeomorphic to $X\times I$ (with $I$ endowed with a discrete topology) with the product topology.
    2. Explain (not prove!) why the interval $[0,1)$ is not homeomorphic to $S^1$.
    3. Consider two disjoint closed disks. What is the boundary of one of the disks? What about the boundary of the largest open disk contained in said disk?
    Answers
    1. True/False:
      1. TRUE. (forward) Suppose a net in $S$ converges to a point $a$ in $S'$. Since $S'$ is open, there is an open set around $a$ contained in $S'$, and this open set must have points of $a$. (backward) Suppose $S$ is not closed, so there is a point in $S'$ whose neighbourhoods all intersect $S$. We can use these neighbourhoods to construct a net converging to it.
      2. TRUE. Suffices to show that the closure of $S$ is closed, and is contained in every closed set containing $S$. (1) The set of all points around which there exists an open set not intersecting $S$ is open is an open set, as it is the union of all these "existing" open sets. (2) Take a point $p$ outside a closed set $C\supseteq S$. Then $C'$ is an open set containing $p$ that does not intersect $S$, thus $p$ does not touch $S$. So every point that does touch $S$ is in $C$.
      3. TRUE. Dual to the above.
      4. FALSE. See e.g. the trivial topology. True for a metric space, though.
      5. FALSE. Dual to the above.
      6. FALSE. Remember the infinite non-cofinite sets in the cofinite topology? This isn't even true on a metric space (poke a hole in a curve).
      7. TRUE. Obviously.
      8. FALSE. If you look through the proof for metric spaces, you'll see that it relies on the ability to create an open set that separates the two non-equal points. This is topological distinguishability -- the kind of space for which this statement is true is a T1 space; if we had the symmetric condition, it would be true in a T0 space.
      9. FALSE. Remember the first-n topology? The proof requires having disjoint neighbourhoods of distinct points -- this requires being a T2 space, also known as a "Hausdorff space".
      10. FALSE. Consider $\mathbb{R}^-$ and $\mathbb{R}^+$.
      11. TRUE. Requiring the projection maps to be continuous just means that each $p_i^{-1}(U)$ is open. The topology generated by these is the topology described -- so what is it? Intersecting these sets across $i$ as $\bigcap_i p_i^{-1}(U)$ leads to the open cylinders, which generate the product topology.
      12. TRUE. $p_i^{-1}(U)\cap X_i = U$.
    2. Because the preimage of the open set $[0,1/2)$ is not open in the circle. This goes back to the fact that because we're cutting the circle, the neighbourhood of 0 becomes "easier". Again, this is not a proof, just a proof that cutting doesn't work.
    3. (a) Empty (b) The actual circumference. As a follow-up exercise, show that a set is clopen iff it has an empty boundary. 

    Topology II: Kuratowski closure topology, nets, neighbourhood basis

    So far, we've described two axiomatisations of toplogy: in terms of neighbourhoods and in terms of open sets. While the neighbourhoods definition was a natural extension of our understanding of topological structure being in terms of limits, the open sets definition is kind of hard to wrap your head around, as far as I can see. A continuous function doesn't even preserve open sets (the definition of a continuous function isn't "preserves neighbourhoods" in the neighbourhood formulation either, but at least we know where it comes from). It's not openness in particular that's important, we could formalise topology in terms of their complements the closed sets, too.

    In the following set of exercises, we will build an alternative axiomatisation of topology based on the notion of touching, which will perhaps give us some explanation of why the notion of openness and closedness are important to topology.
    1. Consider the relation of "touching" between a point and a set (it can't be between a point and a point, but it can be with a set -- kind of for the same reason that a sequence tends to a point but there is no point in the sequence that equals that point). How would you write this in terms of the open set topology? (Ans: every open set containing $x$ intersects $S$)
    2. Now formulate an open set in terms of touching. (Hint: formulate a closed set first, the open set is its complement) (Ans: no point in $S$ touches $S'$)
    3. Great. Find out what axioms we need on the touching operation $\sim$ to prove the three axioms of open sets.
      1. $X$ is open requires -- (Ans: $\not\exists x \sim \varnothing$)
      2. $O_1\cap O_2\in\Phi$ requires -- (Ans: $x\sim S\cup T\Rightarrow x\sim S \lor x\sim T$)
      3. $\bigcup_\lambda O_\lambda \in\Phi$ requires -- (Ans: $x\sim S\subseteq T \Rightarrow x\sim T$)
    4. Given a touching relation $\sim$, we can produce the set of open sets $\{S\mid \forall x\in S, x\not\sim S'\}$. From this, we can produce the relation $\bar\sim$, given by: $\forall T\, \mathrm{st.} (x\in T \land \forall y\in T, y\not\sim T'), S\cap T\ne\varnothing$. Try proving this is equivalent to $x\sim S$, and see what axioms you need.
      1. $\Leftarrow$ requires -- (Ans: None. Suppose $S\cap T$ were empty. Then $S\subseteq T'$, so by 3c-ans, $x\sim T'$, contradiction.)
      2. $\Rightarrow$ requires -- (Hint: >given such a $T$, construct a smaller $T$ whose intersection with $S$ is empty if $x\not\sim S$) (Ans: $S\subseteq\mathrm{cl}(S)$ and $\mathrm{cl}(\mathrm{cl}(S))\subseteq\mathrm{cl}(S)$. Suppose $x\not\sim S$. Then for any $T$ satisfying the LHS (e.g. the universe by 3a-ans), consider $T\cap\mathrm{cl}(S)'$ where $\mathrm{cl}(S)$ is the set of all points touching $S$ -- $x\in T\cap \mathrm{cl}(S)'$ by assumption; now given $y\in T\cap \mathrm{cl}(S)'$ we want to show $y\not\sim T'\cup \mathrm{cl}(S)$ (for this to contradict the claim that $S\cap(T\cap\mathrm{cl}(S)')\ne\varnothing$, we need that $S\subseteq\mathrm{cl}(S)$ -- this is new!). Suppose that $y\sim T'\cup\mathrm{cl}(S)$ and apply 3b-ans: $y\sim T'$ contradicts $y\in T$ as $T$ is open; now we just want $y\sim\mathrm{cl}(S)$ to imply $y\in\mathrm{cl}(S)$ -- this is new!)
    5. So rewrite our axioms in terms of the closure operator $\mathrm{cl}$ as follows -- and this is completely equivalent to our earlier "touching" description of the closure operator as $x\sim S\iff x\in\mathrm{cl}(S)$:
      1. $\mathrm{cl}(\varnothing)=\varnothing$
      2. $\mathrm{cl}(S\cup T)\subseteq\mathrm{cl}(S)\cup\mathrm{cl}(T)$
      3. $S\subseteq T\Rightarrow \mathrm{cl}(S)\subseteq\mathrm{cl}(T)$
      4. $S\subseteq\mathrm{cl}(S)$
      5. $\mathrm{cl}(\mathrm{cl}(S))\subseteq\mathrm{cl}(S)$
    6. To get yourself comfortable with this closure operator, check if the following statements are true or false:
      1. $\mathrm{cl}(S)\cap\mathrm{cl}(T)\subseteq\mathrm{cl}(S\cap T)$ (Ans: False -- consider two disjoint sets sharing a boundary)
      2. $\mathrm{cl}(S\cup T)=\mathrm{cl}(S)\cup\mathrm{cl}(T)$ (Ans: True -- in fact can replace 5b and 5c)
      3. $\mathrm{cl}(\mathrm{cl}(S))=\mathrm{cl}(S)$ (Ans: True -- it's also equivalent to the statement that $\mathrm{cl}(S)$ is closed, i.e. that no point in $\mathrm{cl}(S)'$ touches $\mathrm{cl}(S)$ -- can you see why?)
      4. $S\subseteq\mathrm{cl}(T)\Rightarrow \mathrm{cl}(S)\subseteq\mathrm{cl}(T)$ (Ans: True -- in fact can replace 5c and 5e)
      5. $\mathrm{cl}(S\cap T)\subseteq\mathrm{cl}(S)\cap\mathrm{cl}(T)$ (Ans: True -- in fact the arbitrary-intersection version of this is the reason we have the equivalent 5c, from 3c-ans, and can replace it)
    7. From 5c and the answer to 6a, you might see an analogy with limits of sequences -- indeed, a "set" is kind of a sequence, and its closure is to add the limit points of the sequence to the set. Indeed, the definition of a continuous function, as we will see, is $f(\mathrm{cl}(S))\subseteq\mathrm{cl}(f(S))$, i.e. all limit points remain limit points (and for a homeomorphism, the reverse inclusion is also true). This definition should be fairly obvious as it just says "if $x$ touches $S$, $f(x)$ touches $f(S)$", i.e. nothing gets ripped apart in the process. So $\mathrm{cl}$ is a generalisation of a limit to any subset of $X$.
    8. Well, actually, this is not clearly a stronger condition than "convergent sequence limits are preserved" -- that actually requires that convergent sequences remain convergent, that you don't just add a new limit point like you can for non-convergent sequences.
    But this does get us thinking -- we saw above that "preserves the limit points of every set" fully describes a continuous function. But does "preserves the limits of convergent sequences" -- which we used to motivate the idea of topology in the first place -- still characterise a continuous function? Is $x_n\to a\Rightarrow f(x_n)\to f(a)$ (for all sequences $(x_n)$) equivalent to $x\to a \Rightarrow f(x)\to f(a)$ like it does for standard metric spaces? Certainly the backward implication is correct.

    Let's go through the proof of the forward implication on metric spaces.

    Suppose $f$ is not continuous at $a$. So $\exists\varepsilon>0$ such that $\forall\delta>0,\exists x\,\mathrm{st.} |x-a|<\delta, |f(x)-f(a)|\ge\varepsilon$. We want to construct a sequence $(x_n)$ converging to $a$ so that $\forall N, \exists k \ge N, |f(x_k)-f(a)|\ge\varepsilon$. We construct the $n$th element of the sequence from the choice function for $\delta = 1/n$, which is an $x$ within $1/n$ of $a$ such that $|f(x)-f(a)|\ge\varepsilon$. 

    OK -- how can we generalise this to an arbitrary topological space? 

    Suppose $f$ is not continuous at $a$. So $\exists N\in N(f(a))$ such that $f^{-1}(N)\notin N(a)$, i.e. $\forall M\in N(a), \exists x\in M, f(x)\notin N$ (make sure you can tell that these are indeed equivalent). We want to construct a sequence $(x_n)$ converging to $a$ so that $\forall K, \exists k\ge K, f(x_k)\notin N$. Now here's the deal: if we can construct a sequence of $M$s in $N(a)$ that ultimately converge to the point $a$, like we could in the metric case, we are done.

    What does it mean to "ultimately converge to the point $a$"? We need that the choices are eventually contained in every neighbourhood of $a$ -- or to write it down concisely: we want a sequence of sets $M_i\in N(a)$ such that $\forall N\in N(a), \exists i, M_i\subseteq N$. This is called a neighbourhood basis -- and particularly since the domain of $i$ is the natural numbers, a countable neighbourhood basis.

    Well, so does every topology admit a countable neighbourhood basis to every point? As it turns out, there are counter-examples.

    So we've generalised a bit beyond the notion of preserving limits of sequences, and this is OK -- the natural numbers aren't that fundamental, are they? I would say that preserving the limit points of sets as in pt. 7 is a more fundamental notion than preserving the limits of convergent sequences. In any case, different terms exist for different levels of specialisation, such as:
    • Pre-topological space (where you can have "multiple layers of boundaries" -- this is what happens if you leave out idempotence of closure, the arbitrary union axiom of open sets, or the wiggle-room axiom of neighbourhoods)
    • Topological space
    • T0-space (distinguishability)
    • T1-space
    • T2-space or Hausdorff space (uniqueness of limits of nets)
    • Alexandrov topology (with arbitrary intersection and union)
    • First-countable space (for which the "limits of sequences" thing suffices)
    • Second-countable space
    • Separable space
    • Uniform space
    • Metrisable space
    In any case -- although we do not always have a countable neighbourhood basis, we do always have a neighbourhood basis for a point -- the entire neighbourhood filter itself. And while the neighbourhood filter isn't a countable set, it is a directed set (a poset where every two elements have a shared superior). The generalisation of a sequence to a directed domain is called a net. 

    We can define the limit of a net from a directed set $D$ in the same way as usual with filters: $\forall N\in N(a), f^{-1}(N)\in N(+\infty)$, or $\forall N\in N(a), \exists K\in D, \forall k \ge K, x_k\in N$. Then our generalisation of the "limits of a sequence" motivation for topology is:

    A map is continuous if it preserves the limits of all convergent nets.

    Of course, the convergence of nets is equivalent to the convergence of filters.



    Dense sets

    Let's discuss a quick application of closure -- recall how $\mathbb{Q}$ is dense in $\mathbb{R}$. This can be formulated in numerous ways, but the simplest way is probably "every open set in $\mathbb{R}$ intersects $\mathbb{Q}$. Does this remind us of something? Yes, of course -- it's the definition of closure in terms of open sets, i.e. $\mathrm{cl}(\mathbb{Q})=\mathbb{R}$.

    And this is obviously true -- it's the definition of $\mathbb{R}$, isn't it? So there's a very natural explanation for the rationals being dense in the reals.

    Topology I: limits, continuity and homeomorphism, the neighbourhood filter, open sets

    The idea of a topology, although often linked to geometry* in some classifications, is perhaps better understood as something that has fundamentally more to do with groups, vector spaces and such. You know, when talking about groups, what we really care about is the structure -- we don't really care if we're dealing with $U(1)$ or $SO(2)$ or $\mathbb{Z}/2\pi\mathbb{Z}$ -- if two groups are isomorphic, they have the same "structure" and it's this structure we care about. We're interested in the properties of the group that are invariant under isomorphism -- these are the "group theoretic" properties.

    Anyway -- a group homomorphism $f:G\to H$ is a function that preserves the group structure, or alternatively commutes with multiplication, i.e. $f(x\cdot y) = f(x)\cdot f(y)$ (you might see the "commuting" analogy better if you write $x\cdot y$ as $\mathrm{mult}(x,y)$. Similarly, a vector space homomorphism or "linear transformation" $f:V\to W$ is a function that preserves the linear structure or alternatively commutes with linear combination/commutes with addition and scalar multiplication, i.e. $f(ax+y)=af(x)+f(y)$.

    Here's another example: the homomorphisms of order theory are increasing functions. Do you see why?

    *: It's not completely unrelated to geometry, though, which as we discussed here is the theory of the invariants of a manifold under some symmetries. Well, symmetries are analogous to isomorphisms, but different -- symmetries form a group, in that the transformation from one state of the manifold to another can be judged to be the "same transformation" as that between two other states, i.e. $gx=y$ and $gx'=y'$. But there is no natural way to "parameterise" group isomorphisms so that you can compose them -- is this what one calls a "groupoid"? I don't know.

    In general, commuting means some sort of preservation or non-interference policy. Here's another example: a continuous function $f:X\to Y$ is a function that commutes with the limit, i.e.

    $$f\left(\lim_{x\to a}x\right)=\lim_{x\to a}f(x)$$
    The properties of a space that are invariant under continuous functions are precisely what encompass the theory of topology -- so a topological homomorphism is a "continuous function", and a topological isomorphism is a continuous function with a continuous inverse or a "homeomorphism". The structure of a topological space is precisely the limit operation. It's not a binary operation like group multiplication $(\cdot):G^2\to G$ or vector addition $(+):V^2\to V$ or a unary function family like scalar multiplication $(\cdot):K\times V\to V$, but an operator family $(\lim):(\mathcal{I}\to X) \to (\mathcal{I}\to X)$ where $\mathcal{I}$ is fixed to be the domain set.

    We could also phrase this in an equivalent more natural manner -- a continuous function is one that preserves convergent sequences and their limits ("Cauchy" is incorrect on incomplete spaces, e.g. $1/x$ is continuous on $\mathbb{R}^+$ but maps the Cauchy sequence $(1/n)$ to $(n)$).

    Well, our equation above doesn't even make sense for incomplete spaces like $\mathbb{R}^+$ or $\mathbb{Q}$ ($\lim_{x\to a}f(x)$ is not necessarily defined), but we still want to talk about the "topology" of such spaces. In any case, we've talked about spaces without even describing what the objects of the space are, or how the "space" arises from the set (endowing with a metric is too much information that isn't invariant under continuous functions).


    How would we generalise the notion of a limit to an arbitrary space? The key is something called a "filter" specifically a "neighbourhood filter". Filters are interesting mathematical objects with wide mathematical applications, but in this context, the idea behind a neighbourhood filter is that we want a sort of "convergence" of a poset of sets to a point. You would recall from basic real analysis that expression $\min(\delta_1,\delta_2)$ and $\max(N_1,N_2)$ are of importance to many theorems -- this is taking the intersection of two neighbourhoods and forming a new one. This leads to the following axioms:

    Axioms for the neighbourhood topology
    1. $\forall N\in N(x), x\in N$ (to relate the neighbourhoods to the points themselves)
    2. $\forall N\in N(x), \exists M\in N(x), M\subseteq N\land \forall y\in M, N\in N(y)$ (to ensure the sets are only neighbourhoods to points on their "interior")
    3. $\forall N\in N(x), \forall N' \supseteq N, N' \in N(x)$ (to express the notion of convergence -- we really want a "smallest neighbourhood", but since there is no such thing, we want a sequence of neighbourhoods that get arbitrarily small)
    4. $\forall N_1, N_2\in N(x), N_1\cap N_2\in N(x)$ (the intersection thing)
    5. $\forall x\in X, N(x)\ne\varnothing$ (this is not strictly neceessary, but there is a point without neighbourhoods, you could just remove it from the set and not lose anything topological -- do you see why? -- as it is not topologically related to any other point -- do you see why? -- think about what continuous functions do with them)
    The last three are the axioms of a filter, and the first two specify the neighbourhood filter in particular. Then the definition of a limit is:

    $$\lim_{x\to a}f(x)=L\iff \forall U\in N(L),f^{-1}(U)\in N(a)$$
    And the definition of continuity is:

    $$\forall U\in N(f(a)),f^{-1}(U)\in N(a)$$
    It's a useful exercise to confirm that with the standard neighbourhoods on $\mathbb{R}$, this reduces to the standard definition of the limit. It's also useful to generalise the standard properties of the limit with this definition -- start with the uniqueness of the limit. You'll see that this axiomatisation really does capture the basic "idea" of the limit.

    (If the second axiom is a bit unclear, the point is that the set $[0,1)$ is not the neighbourhood of the point 0 even though it contains it -- a neighbourhood must contain an epsilon-ball around the point. Convince yourself that this is necessary by constructing a situation where $f^{-1}(U)$ is $[0,1)$ but $f$ is discontinuous.)

    These axioms are the axioms for a topology defined in terms of neighbourhoods, or a neighbourhood topology -- any choice of neighbourhoods satisfying these axioms define a topology on the underlying set.

    The second axiom is appalling with its number of quantifiers, but it gives some solid idea of what a neighbourhood really is -- one can show it's equivalent to $\forall x\in\mathrm{Int}A, \mathrm{Int} A\in N(x)$ (where $\mathrm{Int}A$ is the interior of $A$, the set of points of which $A$ is a neighbourhood), i.e. that $\mathrm{Int}A$ is an open set and thus equivalent to $\forall N\in N(x), \mathrm{Int} N\in N(x)$. It is then easy to see that this implies the notion in our head that "a neighbourhood of a point is a set that contains an open set containing that point".

    OK, so we have these (circular!) definitions of neighbourhoods and open sets in terms of each other:

    Relationship between neighbourhood topology and "associated" open set topology
    1. An open set is a set that is the neighbourhood of each of its points: $O\in\Phi\iff \forall x \in O, O\in N(x)$
    2. A neighbourhood of a point is a set containing an open set containing the point: $N\in N(x)\iff \exists O\in\Phi, x\in O\subseteq N$
    Now, so far we've been starting with neighbourhoods and defining open sets from them with (1) -- and our discussion above shows that this respects (2), but instead, we could start with a definition of topology in terms of open sets and define neighbourhoods from them with (2), then check that it respects (1). So we need to find out what axioms an open set topology must satisfy such that the associated neighbourhoods satisfy the axioms for a neighbourhood topology, and that respects (1) (i.e. such that the open sets arising from these neighbourhoods are the same as the original open sets).

    To find these axioms, we'll simply try and "prove" each of the neighbourhood topology axioms and see what axioms we could use on the open sets to do so.

    Figuring out the right open set axioms: Part I
    1. We want $x\in N(x)$. But this follows from the definition of the neighbourhood in (2), so no axioms on the open sets are imposed here.
    2. Same as above -- you can trivially confirm that the open set contained in the neighbourhood is the $M$ we want. That these two axioms follow from the definition was the point of the definition (2).
    3. Same as above.
    4. What's the open set around $x$ contained by $N_1\cap N_2$? The simplest answer is $O_1\cap O_2$. So this produces an axiom: open sets are closed under finite intersection. 
    5. Every point having a neighbourhood is equivalent to every point being contained in an open set. 
    Now to ensure the $\text{open sets}\to \text{neighbourhoods} \to \text{open sets}$ chain ends up where it started -- what this is basically doing is ensuring the converse $\text{neighbourhood topology}\Rightarrow\text{open set topology}$, because we will be able to show that these "open set axioms" will be true for the  the open sets arising from a neighbourhood topology, and the point is to find out what axioms are needed to ensure these are the same as the original open set topology and thus the axioms apply to the original open set topology. Do you see why this is kind of a tricky game? Let's hope it works.

    Figuring out the right open set axioms: Part II

    The neighbourhoods arising from the open set topology $\Phi$ are $N(x)=\{S\subseteq X\mid\exists O\in\Phi,x\in O\subseteq S\}$. The open sets arising from these are $\Phi' = \{S\subseteq X\mid \forall x\in S, S\in N(x)\}$. Or:

    $$\Phi'=\{S\subseteq X\mid \forall x\in S, \exists O\in\Phi, x\in O\subseteq S\}$$
    It is clear that $\Phi\subseteq\Phi'$. We want to show the converse, that $\Phi'\subseteq\Phi$, i.e.

    $$\forall x\in S, \exists O\in\Phi, x\in O\subseteq S\Rightarrow S\in \Phi$$
    Or in English: "if every point in $S$ has an open set around it contained in $S$, then $S$ is an open set". Recognising that $S$ is the union of all the $O$'s, it is easy to show that this is equivalent to: if $O_\lambda$ is an arbitrary family of sets in $\Phi$, then $\bigcup_\lambda O_\lambda \in \Phi$, i.e. open sets are closed under arbitrary union.

    The union of every such blue circle you can create is equal to $S$.
    So we now have an axiomatisation of topology in terms of open sets, the open sets topology: we have a topology on a set $X$ given by a set of its subsets $\Phi$ satisfying:

    Axioms for the open set topology: 1st ed.
    1. Every point is contained in an open set: $\forall x\in X, \exists O\in\Phi, x\in O$.
    2. Closure under finite intersection: $\forall O_1, O_2\in \Phi, O_1\cap O_2\in\Phi$.
    3. Closure under arbitrary union: $\forall (O_\lambda)\in\Phi^\mathcal{I}, \bigcup_\lambda O_\lambda\in\Phi$. 
    (Exercise: show that these axioms are implied on the open sets by the neighbourhood topology axioms. This is important, because at least with the finite intersection axiom, we just chose the "simplest axiom" available to us, which was stronger than the actual axiom we required, which was $\forall x\in X, \forall (O_1, O_2 \in \Phi)\ni x, \exists O\in\Phi, x\in O\subseteq O_1\cap O_2$. Well, along with the arbitrary union axiom this implies finite intersection, anyway.)

    There's actually a further re-formulation one can make: every point is in an open set is, due to the arbitrary union axiom, equivalent to the universe is an open set. So our final formulation of topology is:

    Axioms for the open set topology: 2nd ed.
    1. $X\in\Phi$.
    2. Closure under finite intersection: $\forall O_1, O_2\in \Phi, O_1\cap O_2\in\Phi$.
    3. Closure under arbitrary union: $\forall (O_{\lambda\in\mathcal{I}})\in\Phi^\mathcal{I}, \bigcup_\lambda O_\lambda\in\Phi$. 
    Recall that as the fifth axiom of the neighbourhood topology was optional -- $X\in\Phi$ is similarly optional -- without it, the topology would basically just be a topology over the union of all open sets. But you'd then have a topology with "invisible points" (or "topologically invisible points"), which is kinda stupid.

    Sometimes, $\varnothing\in\Phi$ is also added as an axiom, but this can be proven from the arbitrary union axiom, as the empty set is simply the empty union. You can see why this must be true, as indeed each point of the empty set vacuously has it as a neighbourhood.

    We were able to show that a topology can be determined completely by its open sets -- but the sense in which the open sets form the structure of the topological space is quite different from seeing the limit operator as the structure of the topological space. I wonder if some nice analogy to groups or linear spaces exists. Can a group be determined by its subgroups? Open sets are basically sub-(topological spaces) -- aren't they? All limits within an open subspace are the same as in the original (you can see this rigorously when we define subspace topologies). See my math stackexchange question.

    If you want to really appreciate the motivation for the axioms of a neighbourhood, you need to understand a neighbourhood as a notion of "wiggling", e.g. when we say "for all neighbourhoods", we mean "for even the slightest wiggle", and the reason this translates this way is that supersets are part of the filter.