Let be a continuous function. It suffices to show that is constant.
Now if we fix then we get a function defined by . Since is connected, it follows that is continuous. So is constant, and hence is continuous on all sets of the form .
Similarly we can show that is constant on all sets of the form .
Next, fix . Also, let . Then from the results above, we have
Hence is connected.
Now suppose is a countable collection of connected sets for . We show that the countable Cartesian product is also connected
Clearly, is connected.
Suppose is connected for some .
Let . Then is connected since the Cartesian product of 2 connected spaces is also connected.
So is connected. Hence our assertion holds by induction.
Comments