order topology and continuous functions 
Let $X = [0,1], Y = X\times X$.
$X$ with the standard topology of $\mathbb{R}$ and $Y$ with the order toplogy,
  where $(x,y) < (a,b)$ if $x < a$ or $x = a$ and $y < b$.
Let $f:X\rightarrow Y$ be a function such that $f(X) = Y$.
Prove that $f$ isn't continuous.

So I know the definition of continuous function (the inverse image of open sets are open), but I simply don't know how to work with it.
 A: Your $Y$ space is not separable because for fixed $y\in[0,1]$ the vertical line $[0,1]\times\{y\}$ is discrete and uncountable. Indeed, that's because for any $x\in[0,1]$ the set $\{x\}\times[0,1]$ is open by the definition (and covers only one point of the form $(x, y)$).
Now $f$ cannot be continous because continous image of a separable space is separable.
A: Define for any $x \in [0,1]$: $U_x = ((x,0),(x,1))$ (the open interval between $(x,0)$ and $(x,1)$, also equal to $\{x\} \times (0,1)$). These are by definition open in $Y$ (as intervals) and $U_x \cap U_y = \emptyset$ for $x \neq y$. If $f$ were continuous and onto $Y$ then all sets $f^{-1}[U_x]$, $x \in [0,1]$ would be open (by continuity), disjoint and non-empty. This cannot be because all $f^{-1}[U_x]$ contain a rational number (and different ones for different $x$ by disjointness), as the rationals are dense. But there are countably many rationals, so only countably many $f^{-1}[U_x]$ can be none-empty.
This proves the stronger fact that if $X$ is ccc and $f: X \to Y$ is continuous, $\pi_1[f[Y]]$ is at most countable, where $\pi_1$ is the projection from $Y$ onto the first coordinate.
A: I suppose there are many ways to prove it.
Lemma: Let $X$ be a $T_1$ space and let $f:X\to Y$ be a continuous surjection. Let $D$ be a closed discrete subspace of $Y.$ Then $X$ has a closed discrete subspace $C$ with $|C|=|D|.$
Proof of Lemma: For $d\in D$ choose $g(d)\in f^{-1}\{d\}$ and let $C=\{g(d):d\in D\}.$ Since $f$ is continuous and $D=Cl_Y(D)$ we have $Cl_X(C)\subset Cl_X(f^{-1}D)=f^{-1}D.$ 
So for $c\in Cl_X(C)$ we have $f(c)\in D$. Now $(Y$ \ $D)\cup \{f(c)\}$ is open in $Y ,$ so, by continuity of  $f$ the set  $$U_c=f^{-1}((Y \setminus D)\cup \{f(c)\})$$ is a nbhd, in $X,$ of $c$. And $U_c\cap C=\{g(f(c))\}.$ 
So any $c\in Cl_X(C)$ has a nbhd $U_c$, in $X,$ that contains just $1$ member of $C.$ Since $X$ is a $T_1$ space, therefore $c\in C.$ 
So $C=Cl_X(C).$ 
Also  $ U_c\cap C$ is open in the sub-space $C$, and $c\in U_c\cap Cl_X(C)=U_c\cap C =\{g(f(c)\}$ so $\{c\}=\{g(f(c))\}$ is open in the sub-space $C$. QED.
Application of the Lemma: $\{1/2\}\times [0,1]$ is an uncountable closed discrete sub-space of the lexicographic square $I^2.$ If $f :I\to I^2$ were a continuous surjection then $I$ would have an uncountable closed discrete sub-space. But it doesn't.
