# How is the cofinite topology a topology if $X$ is not finite or doesn't contain the empty set?

I've just started an introductory topology course, and I've come across the cofinite topology

$$\tau = \{\emptyset\} \cup \{U\subseteq X: X \setminus U \text{ is finite}\}$$

All the definitions I've found online say that this is for any non-empty set $X$, but I don't understand how this is a topology if $X$ is not finite, or if $X$ does not contain the empty set?

My current thinking is, say we have $X$ not finite, containing the empty set. If we have $U=\emptyset$, then $X\setminus U=X$, which is not finite and so is not in the topology?

Also, if $X$ does not contain the empty set, then how does one construct a $U$ such that $X\setminus U=X$, which would need to be the case for $\tau$ to be a topology?

I know I've got something twisted around in my head, I just can't figure out what!

Every set contains the empty set. And by that I mean that the empty set is a subset of every set, and not to be confused with the statement $\varnothing\in X$.

Since the empty set is a subset of every set, and a topology on $X$ is a collection of subsets of $X$, there is no problem with the fact that $\tau$ is non-empty to begin with.

If $X$ is any non-empty set, then we can fix some element $x\in X$ and then $U=X\setminus\{x\}$ will satisfy that $X\setminus U=\{x\}$ which is certainly a finite set. Also $X=U$ will satisfy that $X\setminus U$ is finite, because that would be the empty set itself, which is finite.

So certainly $\varnothing,X\in\tau$ and if $x\in X$, then $X\setminus\{x\}\in\tau$ as well. So again, certainly this topology is not empty.

If $X$ is infinite, then indeed $\varnothing$ is not a cofinite set. Which is exactly the reason we add it explicitly to the topology. Consequently, the cofinite topology is the topology where every non-empty open set is cofinite.

The open sets in the cofinite topology are, by definition, those for which the complement is finite plus the empty set.

As you noticed, if $X$ is infinite then the empty set would not be an open set in the sense of having a finite complement, which would imply that $\tau$ is not a topology, as a topology needs the empty set. Therefore one has to add it (so to say arbitrarily) to make $\tau$ a topology, as done in the process $$\color{red}{\{\emptyset \}\cup}\dots$$