Can one move one point in a given finite metric space to obtain a metric space with rational distances? my question is the following: 
I assume a finite metric space $A:=\{a_0,..,a_n\}$ with distances in the reals.
Assume an arbitrary $\epsilon>0$. Is it possible to find some 1-point metric extension of $A$, say $B:=A\cup\{b_0\}$ such that the following holds:
$d(b_0,a_0)<\epsilon$ and $d(b_0,a_i)\in\mathbb{Q}$ for all $i=1,..,n$?
We are not working within some big given metric space, so any abstract metric space $B$ with the described properties will work for me. I lost track between all the triangle inequalities...
Thanks a lot in advance for considering the question. 
 A: Yes, you can do this. Let $m=\min_{i\ge 1} (a_i,a_0)$ and $M=\max_{i\ge 1} (a_i,a_0)$. Choose $d(b_0,a_0)<\min(\epsilon,m)$. You'll need a function $f:[m,M]\to [0,d(b_0,a_0)]$ such that:


*

*$f$ is decreasing 

*$x\mapsto x+f(x)$ is increasing

*$x+f(x)\in \mathbb Q$ when $x=d(a_i,a_0)$ for some $i=1,\dots,n$. 


To construct such a function, begin with $x\mapsto d(b_0,a_0)-c(x-m)$ where $c>0$ is small, and slightly perturb it at the points $x=d(a_i,a_0)$, keeping it piecewise linear in between.
For $i\ge 1$, define
$$d(b_0,a_i) = d(a_0,a_i)+f(d(a_0,a_i)) $$
The rationality is built in (property 3). Let's check the triangle inequalities involving $b_0$. Everywhere below $i,j\ge 1$.


*

*$d(b_0,a_0)\le d(b_0,a_i)+d(a_0,a_i)$ holds because $d(b_0,a_0)<m\le d(a_0,a_i)$.

*$d(a_0,a_i)\le d(a_0,b_0)+d(a_i,b_0)$ holds because $f\ge 0$

*$d(b_0,a_i)\le d(b_0,a_0)+d(a_i,a_0)$ holds because $f\le d(b_0,a_0)$.

*$d(b_0,a_i)\le d(b_0,a_j)+d(a_i,a_j)$ is separated into two cases: 


*

*when $d(a_0,a_i)\le d(a_0,a_j)$, this holds by 2, even in the stronger form $d(b_0,a_i)\le d(b_0,a_j)$

*when $d(a_0,a_i)\ge d(a_0,a_j)$, this holds by 1:  add the inequalities $d(a_0,a_i)\le d(a_0,a_j)+d(a_i,a_j)$ and $f(d(a_0,a_i))\le f(d(a_0,a_j))$.


A: By rescaling if necessary, make all non-zero distances in $A$ greater than $100$, and make absolute values of differences of distinct distances greater than $100$. This is not particularly important, but helps in the visualization. 
Choose a positive integer $M$ such that $\frac{1}{M}\lt \epsilon$, and declare the distance of $b_0$ from $a_0$ to be $\frac{1}{M}$.
Line up $a_1,a_2, \dots$ in non-increasing order of their distances from $a_0$. Note that there may be ties.
Consider first simultaneously all the $a_i$ which are at maximum distance from $a_0$. If $a_i$ is such a point, declare the distance of $b_0$ from $a_i$ to be some rational number $r$ in the interval $d(a_0,a_i)+\frac{1}{(n+1)M}\lt r\lt d(a_0,a_i)+\frac{1}{nM}$.
Continue in this way, the next time using the adjustment $\frac{1}{nM}$ to $\frac{1}{(n-1)M}$, and so on.  
The triangle inequality: There are three types of triangle that have $b_0$ as a vertex. The triangle could have (i) vertices $b_0,a_0,a_i$ or (ii) vertices $b_0,a_i,a_j$ where $d(a_0,a_i)=d(a_0,a_j)$ or (iii) vertices $(b_0, a_i,a_j)$ where $d(a_0,a_i)\ne d(a_0,a_j)$.
Type (i): By the choice of distances, $b_0a_i$ is the long side, and $d(b_0,a_i)\lt d(a_0,b_0)+d(a_0,a_i)$.
Type (ii): Long side $a_ia_j$ is no problem, since this side has length $\le d(a_0,a_i)+d(a_0,a_j)$, and we have $d(b_0,a_j)\gt d(a_0,a_j)$.
And long side $b_0a_i$ is definitely not a problem, since $d(b_0,a_j)=d(b_0,a_i)$.
Type (iii): Again, long side equal to $a_ia_j$ is not a problem, from the triangle inequality in $A$. 
Suppose the long side is $b_0a_i$. By our initial scaling, this long side is much longer than $b_0a_j$.  By the extension of distance to $b_0$, we have $d(b_0,a_i)-d(a_0,a_i)\lt d(b_0,a_j)-d(a_0,a_j)$. It follows that
$$d(b_0,a_i)\lt d(b_0,a_j)+d(a_0,a_i)-d(a_0,a_j)\le d(b_0,a_j)+d(a_i,a_j).$$ 
