Proving compactness in $\mathsf{ZF}$ Consider a family $\{A_i\mid i\in I\}$ of disjoint sets. Let $X$ be the union of all $A_i$, and equip it with the smallest topology $\tau$ making the $A_i$ closed in $X$. How can one prove in $\mathsf{ZF}$ that $(X,\tau)$ is compact?
One may apply the Alexander subbase theorem when working in $\mathsf{ZFC}$, but the theorem's proof is based on some form of choice.

This is part of an exercise in "The Axiom of Choice" by T. Jech, where the goal is to prove that the Axiom of Choice follows from the following assertion: If $(X,\tau)$ is a compact space and $I$ is an arbitrary index set, then $\prod_{i\in I} X$ equipped with the product topology is also compact.
 A: We don't need to look at subbase, because we have a neat description of all open subsets. A subset $U\subseteq X$ is open if and only if $U=X$ or $U=\emptyset$ or $X\backslash U$ is a finite union of some $A_i$-s. You can verify that this is a topology and the smallest topology having $A_i$ as closed subsets. I don't think there's any choice involved here.
Assume a family $\mathcal{U}$ covers $X$. Take a single subset $U\in\mathcal{U}$. It follows that there are at most finitely many $A_1,\ldots, A_n$ not covered by $U$. But each $A_i$ is covered by some $U_i\in\mathcal{U}$. And so $\{U,U_1,\ldots,U_n\}$ is a finite subcovering of $\mathcal{U}$. Here we only utilize the finite choice, no additional axioms required.
A: The smallest topology that makes each $A_i$ closed is essentially the following: give $I$ the co-finite topology, then replace $i$ by $A_i$.
It is easy to see why the co-finite topology is compact, even in $\sf ZF$. Given any non-empty open set, then only finitely many points are missing from it, so any cover has a finite subcover: pick some non-empty open set in the cover, then finitely many more are all you need to cover the missing points.
The fact that we replace each $i$ with $A_i$ with completely irrelevant here, since the restriction of the topology to each $A_i$ is indiscrete.
