## Order-Embedding to Rationals

For a paper I'm writing: Does anyone know of an explicit order-embedding (i.e. an order-preserving function) from $\mathbb Z^\infty$, the direct sum of infinitely many copies of the integers ordered lexicographically, to $\mathbb Q$, the rationals? It need not be a surjective embedding, but that would be a plus (obviously the two sets are order isomorphic).
 Mentor What about this? First, define a function $f: \mathbb Z \to (0,1) \cap \mathbb Q$, something like 0 -> 1/2 n -> 1 - 1/(2n) for i>0 n -> -1/(2n) for i<0 This allows to order individual "letters" (I like the analogy, I will keep it). Use this function to evaluate the position of all 1-letter-words. In addition, the space to the next word can be used for all words beginning with this letter, in a similar way (0,1) was used for 1-letter-words. Let d(n)=f(n+1)-f(n) be this space. Now, let $g: \mathbb Z^\infty \to \mathbb Q$ with $$g(a_0,a_1,...) = \sum_i \left(f(a_i) \prod_{n=0}^{i-1} d(a_n)\right)$$ I hope this works... As the sum adds up a finite number of non-zero values, the result is rational.
 This is a great idea, exactly what I wanted. Thank you!!