[proofplan]
We prove compactness directly from the open-cover definition. Let $\mathcal{U}\subset\tau$ be an [open cover](/page/Open%20Cover) of $X$. If $X$ is empty, the empty subfamily already covers $X$; if $X$ is nonempty, one member of the cover must contain a point of $X$, hence is a nonempty [open set](/page/Open%20Set) in the [indiscrete topology](/page/Indiscrete%20Topology), and therefore equals $X$. In the nonempty case this single open set is a [finite subcover](/page/Finite%20Subcover).
[/proofplan]
[step:Handle the empty underlying set by the empty subcover]
Assume first that $X=\varnothing$. Let $\mathcal{U}\subset\tau$ be an open cover of $X$. The empty subfamily $\varnothing\subset\mathcal{U}$ is finite, and its union is $\varnothing=X$. Hence $\mathcal{U}$ has a finite subcover.
[guided]
Assume first that $X=\varnothing$. To prove compactness using the open-cover definition, we must show that every open cover of $X$ has a finite subcover. Let $\mathcal{U}\subset\tau$ be an open cover of $X$.
The empty subfamily $\varnothing\subset\mathcal{U}$ is finite. Its union is the empty set, because there are no sets in the family to contribute any elements. Since $X=\varnothing$, this gives a cover of $X$ by a finite subfamily:
\begin{align*}
\bigcup_{U\in\varnothing} U = \varnothing = X.
\end{align*}
Thus every open cover of the empty space has a finite subcover.
[/guided]
[/step]
[step:Extract one set from a cover of a nonempty indiscrete space]
Assume now that $X\neq\varnothing$. Let $\mathcal{U}\subset\tau$ be an open cover of $X$. Choose a point $x\in X$. Since $\mathcal{U}$ covers $X$, there exists $U_0\in\mathcal{U}$ such that $x\in U_0$. Because $U_0\in\tau=\{\varnothing,X\}$ and $U_0\neq\varnothing$, we must have $U_0=X$.
[/step]
[step:Conclude that every open cover has a finite subcover]
In the nonempty case, the one-element subfamily $\{U_0\}\subset\mathcal{U}$ is finite and satisfies
\begin{align*}
\bigcup_{U\in\{U_0\}} U = U_0 = X.
\end{align*}
Thus every open cover of $X$ has a finite subcover. Combining this with the empty-space case, $(X,\tau)$ is compact.
[/step]