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