Solution (source code)

= Solution

The <product topology> on the <Cartesian product> $X\times Y$ has a <basis of a topology> consisting of all rectangles $U\times V$, where $U$ is <open> in $X$ and $V$ is <open> in $Y$. Equivalently, it is the smallest <topology> making the two <coordinate projections> <continuous>.

Take distinct points $(x_1,y_1)$ and $(x_2,y_2)$. If $x_1\ne x_2$, use the <Hausdorff condition> in $X$ to find <disjoint> <open neighbourhoods> $U_1,U_2$. Then $U_1\times Y$ and $U_2\times Y$ are <disjoint> <open neighbourhoods> of the two points. If $x_1=x_2$, then $y_1\ne y_2$; <disjoint> <open neighbourhoods> $V_1,V_2$ in $Y$ give $X\times V_1$ and $X\times V_2$. Thus \b[$X\times Y$ is <Hausdorff>], as established by the forward implication of the <Hausdorff property of a nonempty product>. An empty <Cartesian product> is automatically <Hausdorff>.