TITLE: Can a total rational metric space be complete?
QUESTION [13 upvotes]: Let's call a metric space $(M,d)$ a total rational metric space if:

For every $x,y\in M$, $d(x,y)\in\mathbb{Q}$.
For every $x\in M$ and every rational $q\geq0$ there exists a $y\in M$ such that $d(x,y)=q$.

Can a total rational metric space be complete?

REPLY [4 votes]: Here is an example.  Let $M$ be the set all well-ordered subsets of $\mathbb{Q}_+$ (the positive rationals).  Put a metric on $M$ as follows: given distinct $X,Y\in M$, let $q$ be the least element of the symmetric difference $X\mathbin{\triangle} Y$.  Define $d(X,Y)=1/q$.
It is easy to verify that this is a metric (in fact, it is an ultrametric), and it obviously satisfies (1).  It satisfies (2) since for any $X\in M$ and any $q\in\mathbb{Q}_+$, the set $Y=X\mathbin{\triangle}\{1/q\}$ is an element of $M$ and satisfies $d(X,Y)=q$.
Finally, I claim $M$ is complete.  Indeed, if $(X_n)$ is a Cauchy sequence in $M$, that means that for each $q\in\mathbb{Q}_+$, the sets $X_n\cap(0,q]$ eventually stabilize.  Let $$X=\{q\in\mathbb{Q}_+:q\in X_n\text{ for all sufficiently large }n\}.$$  I claim that $X\in M$ and $(X_n)$ converges to $X$.
First, to prove $X$ is well-ordered and hence in $M$, let $A\subseteq X$ be any nonempty subset; say $q\in A$.  Choose $N$ such that $X_n\cap(0,q]$ is constant for $n\geq N$.  We then have that $X\cap (0,q]$ is equal to that constant value of $X_n\cap(0,q]$.  In particular, $X\cap(0,q]$ is well-ordered since each $X_n$ is.  Thus $A\cap(0,q]$ has a least element, which is then also the least element of $A$.
To prove $(X_n)$ converges to $X$, just note that if $X_n\cap(0,q]$ is constant for $n\geq N$, then $d(X_n,X)<1/q$ for all $n\geq N$.
More generally, this construction works with $\mathbb{Q}_+$ replaced by any subset $Q\subseteq\mathbb{R}_+$, and gives a complete metric space whose metric takes values in the set $\{0\}\cup\{1/q:q\in Q\}$ and satisfies the analogue of your condition (2).
(This example is closely related to Hahn series.  Indeed, my $M$ is really just the Hahn series field $\mathbb{F}_2[[\mathbb{Q}_+]]$ with a slightly nonstandard version of the metric induced by the valuation.)