When does a space admit a "multiplication-defining" metric? Define a Thales space to be a topological space $\mathcal{X}=(X,\tau)$ such that there is some $d:X^2\rightarrow\mathbb{R}$ such that the following hold:

*

*The map $d$ is a metric and the topology it induces is $\tau$.


*The map $\mathbb{R}^2\rightarrow\mathbb{R}: (x,y)\mapsto xy$ is (first-order, with parameters) definable in the two-sorted structure $$(X\sqcup \mathbb{R}; +,<,d).$$
For example, the usual metric witnesses that $\mathbb{R}^n$ is a Thales space for each $n>1$ as a consequence of Thales' intercept theorem (hence the name). [Stupid claims removed.]
Ultimately I'd love an exact characterization of Thales spaces, but I think that's rather ambitious. An easier question would be something along the lines of, "Is there a non-pathological Thales space which doesn't lean on the intersection theorem?" I'll make that precise in the following way:

Is there a Thales space which is separable and into which $\mathbb{R}^2$ does not continuously embed?

(As Eric Wofsey's answer demonstrate separability doesn't actually rule out pathological examples, but it's what I asked.)
I'd love to add "connected" but that might make the question too hard.
 A: Thales spaces have a very simple characterization: they are exactly the noncompact metrizable spaces.
First, using continuity of multiplication, to define multiplication, it suffices to be able to define multiplication on a dense subset of $\mathbb{R}$.  That is, suppose there is a formula $P(x,y,z)$ such that $P(x,y,z)$ implies $xy=z$ and for all $x$ and $y$ in some dense subset of $\mathbb{R}$, there exists a $z$ such that $P(x,y,z)$.  Then we can take a formula $Q(x,y,z)$ that says for all $\epsilon>0$, there exist $x',y'$, and $z'$ within $\epsilon$ of $x,y,$ and $z$ such that $P(x',y',z')$, and this will define multiplication.
Note moreover that for each $x,y\in\mathbb{R}^2$, there is a finite set $F_{x,y}$ of points in $\mathbb{R}^2$ which is enough to "witness" the value of the product $xy$: you just need the finitely many points involved in the geometric construction of the product, plus a few more finitely many points to witness that the two parallel lines really are parallel (for instance, the vertices of a rhombus with sides on the parallel lines).  Thus if $H$ is any inner product space and $X$ is any subspace of $H$ that contains a subset isometric to $F_{x,y}$ for each $x,y\in\mathbb{Q}$, then $X$ can define multiplication on $\mathbb{Q}$ and thus is a Thales space by the previous paragraph.
Now suppose $X$ is a noncompact metrizable space.  Then $X$ embeds in a Banach space, and every Banach space is homeomorphic to a Hilbert space, so we may assume $X$ is a subspace of a Hilbert space $H$ of dimension at least $2$. Take a sequence $(x_n)$ of distinct points in $X$ with no accumulation point.  Then there is a continuous function $f:X\to\mathbb{R}$ such that $f(x_n)\to\infty$.  Replacing $H$ with $H\times\mathbb{R}$ and using $f$ on the second coordinate, we may assume that $\|x_n\|\to\infty$ in $H$.  Choosing $f$ to grow fast enough on $(x_n)$, we may moreover assume that the norms $\|x_n\|$ are nonzero and strictly increasing with $n$.
Now take a sequence of isometric copies of $F_{x,y}$ in $H$ for each $x,y\in\mathbb{Q}$ which are eventually outside of any given ball.  We may moreover arrange that all the points in these copies have distinct norms.  Thus, we can get a sequence $(y_n)$ in $H$ with the norms $\|y_n\|$ nonzero and strictly increasing to $\infty$ such that any subspace of $H$ which contains every $y_n$ is a Thales space.
Finally, I claim there is a homeomorphism $H\to H$ that maps $x_n$ to $y_n$ for each $n$, so that $X$ is homeomorphic to a subspace of $H$ that contains each $y_n$ and thus is a Thales space.  You can construct such a homeomorphism, for instance, using polar coordinates.  On the radial coordinate, take a homeomorphism $[0,\infty)\to [0,\infty)$ which maps $\|x_n\|$ to $\|y_n\|$.  On the sphere of radius $\|x_n\|$, use a rotation of the unit sphere in $H$ that maps $x_n/\|x_n\|$ to $y_n/\|y_n\|$, and interpolate between these rotations on the other spheres.
Thus, every noncompact metrizable space is a Thales space.  Conversely, I claim multiplication can never be definable from a bounded metric, and so a compact space is never a Thales space.  Indeed, suppose $d$ is a metric on $X$ and $N$ is an integer such that $d(x,y)<N$ for all $x,y\in X$.  Note that by splitting each real number as the sum of an element of $N\mathbb{Z}$ and and element of $[0,N)$, the structure $(X\sqcup \mathbb{R}; +,<,d)$ is interpretable in the three-sorted structure $$(X\sqcup [0,N)\sqcup N\mathbb{Z};+_{[0,N)},<_{[0,N)},+_{N\mathbb{Z}},<_{N\mathbb{Z}},d_{[0,N)})$$ where $+_{[0,N)}$ is addition mod $N$ on $[0,N)$, $<_{[0,N)},+_{N\mathbb{Z}},$ and $<_{N\mathbb{Z}}$ are the obvious restrictions, and $d_{[0,N)}$ is the metric considered as a map $X^2\to [0,N)$.  But in this structure, the sort $N\mathbb{Z}$ does not interact at all with the other two sorts.  As a result, if multiplication were definable in $(X\sqcup \mathbb{R}; +,<,d)$, then multiplication would be definable in $(N\mathbb{Z};+,<)$.  But multiplication is not definable in $(N\mathbb{Z};+,<)$ (for instance, if it were, it would follow easily that multiplication is definable in $(\mathbb{N},+)$).
