I'm practicing for my topology exam, for this I want to show that the one point compactification is in fact a topology. The definition I am working with:
Let $X$ be a topological space. The $\textit{one point compactification}$ of $X$ is the topological space $\hat{X} = X \sqcup \{*\}$, where a subset $U$ is open if either $U$ is an open subset of $X$ or $* \in U$ and $X\setminus U$ is compact and closed.
I have a solution, which seems long and untidy, so I'm looking for advice how to streamline the argument. Also, if you find any mistakes, let me know.
$\textit{Proof}$
Denote the topology of $\hat{X}$ by $\mathcal{T}$. We check the axioms:
$\emptyset \subseteq X$, $\emptyset$ open in $X$ $\Rightarrow \emptyset \in \mathcal{T}$. Further, $X \setminus \hat{X} = \emptyset$, which is closed and compact, therefore $\hat{X} \in \mathcal{T}$.
Let $A_i \in \mathcal{T}$ for $i \in I$. If $A_i \subseteq X$ for all $i$, then $\bigcup_{i}A_i \subseteq X$ is open as a union of open sets, and so $\bigcup_{i}A_i \in \mathcal{T}$. If $* \in \bigcup_{i}A_i$, we need to show that $\left(\bigcup_{i}A_i\right)^c = \bigcap_{i}A_i^c$ is closed and compact in $X$. It is closed in $X$ as an (arbitrary) intersection of sets that are closed in $X$. If $* \notin A_j$, then $A_j$ is open in X, so $A_j^c$ is closed. If $* \in A_j$, then $A_j^c$ is closed in $X$ by the definition of $\mathcal{T}$. To see that $\bigcap_{i}A_i^c$ is compact, let $k$ be such that $* \in A_k$, so $A_k^c$ is closed and compact. Now $\bigcap_{i}A_i^c \subseteq A_k$, i.e. a closed subset of a compact set, therefore also compact.
Let $A_1, A_2 \in \mathcal{T}$. If $* \notin A_1$ and $* \notin A_2$, then $* \notin A_1 \cap A_2$ and $A_1 \cap A_2$ is open in $X$ as a finite intersection of open sets. If $* \in A_1$ and $* \in A_2$, then $* \in A_1 \cap A_2$ so we need to check that $\left(A_1 \cap A_2\right)^c = A_1^c \cup A_2^c$ is closed and compact in $X$. It is closed as the finite union of closed sets. For compactness, let $U_i, i \in I$ be an open cover of $A_1^c \cup A_2^c$. It's also an open cover of $A_1^c$ and $A_2^c$. Since both sets are compact, they admit finite subcovers, say $A_1^c \subseteq \bigcup_{j = 1}^{n}U_j =: O_1$ and $A_2^c \subseteq \bigcup_{k = 1}^{m}U_k =: O_2$. Then $O_1 \cup O_2$ is a finite subcover of $A_1^c \cup A_2^c$ which is therefore compact. For the case where $*$ is in only one of the sets, w.l.o.g. $* \in A_1$. Then, $* \notin A_1\cap A_2$, so we need to show that $A_1 \cap A_2$ is open in X. Let $\tilde{A_1}:= A_1 \setminus \{*\} = A_1 \cap X$, then $A_1 \cap A_2 = \tilde{A_1} \cap A_2$. Further, $A_2$ is open by definition and $\tilde{A_1}$ is open in X since $\tilde{A_1}^c = \left(A_1 \cap X \right)^c = A_1^c \cup \emptyset = A_1^c$, which is closed. So $A_1 \cap A_2$ is open as a finite intersection of open sets.
Thanks a lot for checking!