Under what conditions $\|x-y\|=n\iff\|f(x)-f(y)\|=n.$ for $n\in\mathbf{N}$ implies isometry? Let $X, Y$ be normed space and $f:X\to Y$ be a mapping. Assume that for all $n\in\mathbf{N}$, $$\|x-y\|=n\iff\|f(x)-f(y)\|=n.$$
Under what conditions this map will be an isometry?
Thanks
 A: Terry Tao's argument generalizes to show that $f$ must be an isometry whenever $X$ has dimension greater than 1 and $Y$ is strictly convex.  We start by proving a series of lemmas:
Lemma 1: Let $x,y\in X$, and let $a,b\geq0$ be such that $a+b\geq\|x-y\|$ and $|a-b|\leq\|x-y\|$.  Then there exists $z\in X$ such that $\|x-z\|=a$ and $\|y-z\|=b$.
Proof: Let $S=\{z:\|x-z\|=a\}$; this is connected since $\dim X>1$.  Note that $S$ intersects the line between $x$ and $y$ twice; our hypotheses on $a$ and $b$ imply that at one of these points $\|y-z\|\leq b$ and at the other $\|y-z\|\geq b$.  Since $z\mapsto \|y-z\|$ is continuous on $S$, there must be some $z\in S$ such that $\|y-z\|=b$.
Lemma 2: Suppose $f(0)=0$ and $x\in X$ is such that $\|x\|\in\mathbb{N}$.  Then for all $n\in\mathbb{Z}$, $f(nx)=nf(x)$.
Proof: By strict convexity, any triangle in $Y$ for which the triangle inequality is an equality must lie on a line.  Applying this to the triangle formed by $0$, $f(x)$, and $f(nx)$ yields the desired result.
Lemma 3: Suppose $\|x-z\|$ and $\|y-z\|$ are both integers and $\|x-y\|$ is rational.  Then $\|f(x)-f(y)\|=\|x-y\|$.
Proof: By translating, we may assume $z=0$ and $f(z)=0$.  By Lemma 2, for all $n\in\mathbb{Z}$, $f(nx)=nf(x)$ and $f(ny)=nf(y)$. Letting $n$ be the denominator of $\|x-y\|$, we have $\|f(nx)-f(ny)\|=\|nx-ny\|$ since this is an integer, and the result follows by dividing by $n$.
Lemma 4: Suppose $\|x-y\|$ is rational.  Then $\|f(x)-f(y)\|=\|x-y\|$.
Proof: Use Lemma 1 to find $z$ such that $\|x-z\|=\|y-z\|$ is some large integer and apply Lemma 3.
We now prove that $f$ is an isometry.  Fix $x,y\in X$.  Use Lemma 1 to find $z$ such that $\|x-z\|$ is small and rational and $\|y-z\|$ is rational and close to $\|x-y\|$.  By Lemma 4 and the triangle inequality it follows that $\|f(x)-f(y)\|$ must be (arbitrarily) close to $\|x-y\|$.
A: So it turns out my earlier intuition was incorrect, and one can leverage the order properties of ${\bf R}$ to show:

Theorem.  Let $X, Y$ be real Hilbert spaces, with the dimension of $X$ at least two, and let $f: X \to Y$ be a function such that $\|f(x)-f(y)\|=\|x-y\|$ whenever $\|x-y\|$ is a natural number.  (We do not assume $f$ to be continuous.) Then $f$ is an isometry.

Proof  By passing to an affine subplane of $X$, we may assume without loss of generality that $X$ is two-dimensional, so we will write $X = {\bf R}^2$.
If $e$ is a unit vector in $X$, $x$ is an element of $X$ and $n,m$ are natural numbers then $f(x), f(x+ne), f(x+(n+m)e)$ form a degenerate triangle with side lengths $n,m,n+m$, which implies that $f(x+ne) = f(x) + nu$ and $f(x+(n+m)e) = f(x) + (n+m) u$ for some unit vector $u$.  In particular, $f$ maps any isometric copy of ${\bf Z}$ to another isometric copy of ${\bf Z}$.
Next, if $e, f$ are orthogonal unit vectors in $X$, then $f(x), f(x+3e), f(x+4f)$ form a triangle with side lengths $3,4,5$ and in particular $f(x+3e)-f(x)$ is orthogonal to $f(x+4f)-f(x)$.  From this and the previous claim we see that $f$ maps any isometric copy of ${\bf Z}^2$ to another isometric copy of ${\bf Z}^2$.
By the preceding discussion we have 
$$f(x,y)-f(0,0) =x (f(1,0)-f(0,0)) + y (f(0,1)-f(0,0)) \qquad (1)$$
whenever $x,y$ are integers, but also $f(n e)-f(0,0) = n (f(e)-f(0,0))$ for any unit vector $n$.  In particular, for any Pythagorean triple $a^2+b^2=c^2$, we have (1) when $(x,y)$ is an integer multiple of $(\frac{a}{c},\frac{b}{c})$; conjugating by translation we then see that (1) also holds when $(x,y)$ is an integer multiple of $(\frac{a}{c},\frac{b}{c})$ plus an element of ${\bf Z}^2$.  Iterating this we see that (1) holds whenever $(x,y)$ is an integer linear combination of Pythagorean fractions $(\frac{a}{c}, \frac{b}{c})$.  In particular, (1) holds on a dense subset $D$ of ${\bf R}^2$.
This is already enough to get isometry in the continuous case.  Now we remove the continuity hypothesis.  Observe that if $\|x-y\| \leq 2$, then $x$ can be reached from $y$ by a pair of moves of unit length, and hence by the triangle inequality $\|f(x)-f(y) \| \leq 2$.  
Now let us normalise $f,X,Y$ so that ${\bf R}^2 \subset Y$, $f(0,0)= (0,0)$, $f(1,0)=(1,0)$, and $f(0,1)=(0,1)$.  Then by (1) we see that $f$ is the identity on $D$.  For any $p \in {\bf R}^2$ and $\varepsilon>0$, we can find elements $q, r$ of $D$ within $\varepsilon$ of $p + (2,0)$ and $p-(2,0)$ that lie within $2$ of $p$, and thus by the preceding we see that $f(p)$ lies within $2+\varepsilon$ of $p+(2,0)$ and $p-(2,0)$.  Sending $\varepsilon$ to zero we see that $f(p)=p$, and the claim follows.
A: Here is one possible condition:
If $f(x)$ is continuous and fulfills 
$||f(kx)-f(ky)|| = k||f(x)-f(y)||$, for every $k \in N$. This works because :
1) the equivalence you wrote above will be true not only for $n\in N$ but also for every positive rational number $n$ (easy to check)
2) it will be in fact true for all positive real number $n$ : recall that the norm is continuous and take the limit of a sequence $(x_m,y_m)$ such that $x_m\to x$, $y_m\to y$, $||x_m-y_m||\in \mathbb Q$, and $||x_m-y_m||\to ||x-y||$ (such a sequence exists because the subspace spanned by $x,y$ is isometric to $\mathbb R^2$, endowed with the transported norm, equivalent to any other norm in $\mathbb R^2$).
You can even restrict this condition to hold only whenever $||kx - ky||$ is a natural number, and not for all $x,y$. 
To sum up, $f$ is an isometry if and only if $f$ is continuous, $||x-y|| = n$ implies $||f(x)-f(y)||=n$ for all $n\in N$ and $||f(kx)-f(ky)|| = k ||f(x)-f(y)||$ holds for all $k\in N$. 
Notice also that if your relation holds for every rational number $n$ and $f$ is continuous, then $f$ is an isometry by continuity.
A: Partial answer, in the case where the norm space = $R$.
Let us define condition $\cal C$ by  $||x-y||= n$ ⇔ $||f(x)-f(y)|| = n$.
Assume that the normed space is $R$, so that the norm is of the form $\lambda|*|$ with $\lambda > 0$.
w.l.g, I assume that the norm is the usual absolute value.
Let $h(t)$ be a continuous bijection $[0,1]\to [0,1]$, such that $h(0)=0$, $h(1)=1$ and $0\leq h(t)<1$. Then the function defined by $f(k+t) = k + h(t)$ ($0\leq t<1$) is continuous and satisfies condition $\cal C$. This shows that there can be no proper condition such that, added to condition $\cal C$, leads to an isometry. In other words, in the case where the normed space is $R$ every such condition will be equivalent to "$f$ is an isometry", independently of condition $\cal C$.
If you take $h$ to be diffentiable in $[0,1]$, with right differential at 0 equal to its left differential at 1, then the same could be said with the additional assumption "$f$ differentiable". 
Notice also that it can be shown that every continuous function that satisfy $\cal C$ must be of the form above, or of the form $f(k+t)=-(k + h(t))$.
For general normed space, I suggest to work first the case of a two-dimensional normed space, with the euclidean norm. If it can be shown that a continuous $f$ that satisfies condition $\cal C$ must be an isometry, it will be probably easy to show the same in general normed space. 
A: I think it's worth mentioning the well-known fact that, in a finite-dimensional euclidean space (of dimension larger than 2), just preserving one distance (say, $\|f(x)-f(y\|=1$ as soon as $\|x-y\|=1$) is sufficient for $f \colon X \to X$ to be an isometry. 
A: Maybe It is time to sum up the work that has been down up to now :
Let $X$ and $Y$ be normed spaces, and $f$ a function $X\to Y$.
Denote by $\cal C$ the condition "$||x-y|| = n\in \mathbb N \Rightarrow ||f(x)-f(y)|| = n$". 
1) If $\dim(X)=1$, no proper condition can be added to $\cal C$, and even to the stronger condition set by the asker, that would imply that $f$ be an isometry (MikeTex) ;
2) If $\dim(X) > 1$, then $f$ is an isometry if and only if $f$ is continuous and fulfills the condition "$||f(kx)-f(ky)|| = k||f(x)-f(y)||$ for every $x,y$, and every $k\in \mathbb N$" (MikeTex) ;
3) If $X$ and $Y$ are Hilbert space and $\dim(X)>1$, then condition $\cal C$ implies that $f$ is an isometry (Terry Tao) ; 
4) More generally, if $\dim(X)>1$ and $Y$ is strictly convex, then condition $\cal C$ implies that $f$ is an isometry (Eric Wofsey).   
It is interresting that the additional condition $||f(x)-f(y)|| = n \Rightarrow ||x-y|| = n$ present in the question of the asker has not been used in the argument of Eric Wofsey (hence is unnecessary, if used, in the argument of Terry Tao). The question is now : can this additional condition be used in order to weaken the assumptions of Eric and Terry.  
