Solution (source code)

= Solution

A <topology> on $X$ contains $\varnothing,X$, is closed under arbitrary unions and under finite intersections. The cofinite family has these properties: a nonempty union contains one cofinite member and therefore has finite complement; the complement of a finite intersection is a finite union of finite sets. The empty union and the sets $X,\varnothing$ are included explicitly.

Any two nonempty <open sets> intersect, because their intersection has finite complement in the infinite set $X$. Thus no two disjoint nonempty <open sets> can separate $X$, proving \b[<connectedness>]. For <compactness>, take any <open cover> and choose a nonempty member $U$. Only finitely many points lie outside $U$. Choose one covering member for each of those points. Together with $U$ these give a <finite subcover>. Thus \b[$X$ is compact].