Solution (source code)

= Solution

Assume $X$ is <Hausdorff>. For any $(x_1,x_2)$ outside the diagonal, the points differ, so choose disjoint open neighborhoods $U_1,U_2$. Their rectangle contains $(x_1,x_2)$ and misses the diagonal. Thus the complement of the diagonal is open in the <product topology>, proving \b[(i) implies (ii)]. This is one direction of the <closed diagonal theorem>.