Showing posts with label filters. Show all posts
Showing posts with label filters. Show all posts

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?

    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.