I want to define an Isomorphism $\phi:\left\langle [n]\times[m],\leq_{Lex}\right\rangle \rightarrow\left\langle [n\cdot m],\leq\right\rangle $
I understand how to write down this isomorphism by hand: lets say $n,m = 2$, then we define:
$(0,0) \rightarrow 0$
$(0,1) \rightarrow 1$
$(1,0) \rightarrow 2$
$(1,1) \rightarrow 3$
However, how could I generalize this idea for arbitrary $n,m$ with an explicit match rule?
It helps a lot if you think about what the lexicographic product means.
$A\times B$ is ordered by replacing each point in $A$ by a copy of $B$. So that means that $n\times m$ means taking $n$ points in a line, and replacing each by $m$ points.
In other words, we look at $n$ multiples of $m$. So a point is identified by identifying which copy, and then its placement within that copy. Or, simply put $$(i,j)\mapsto i\cdot m+j.$$