### 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.