Let $(X, d)$ be a metric space. I define a set $\mathcal{U} \subseteq X$ to be convex if for all $x,z \in \mathcal{U}$ and $y \in X$ we have
$$d(x,y) + d(y,z) = d(x,z) \implies y \in \mathcal{U}$$
An open ball in $(X, d)$ may not be convex and an example of this is a ball in $S^1$ (equipped with the "shortest arc length" metric) with a radius greater than $\frac{\pi}{2}$. Nevertheless, the convex open balls in $S^1$ are a base for the topology induced by the metric.
Are the convex open balls in $(X,d)$ always a base for the topology induced by $d$?
These questions/answers may be relevant:
- Examples for geodesic balls which are not convex
- Are small $\varepsilon$-balls convex in geodesic metric spaces
But I am not sure whether the notion of convexity in use is equivalent.
Best Answer
Here is a counterexample: no non-empty open set in this metric space is convex in your sense.
Let $D=\{0,1\}$ with the discrete topology, and let $X=D^{\Bbb N}$, the Cartesian product of countably infinitely many copies of $D$, so that the elements of $X$ are the sequences $x=\langle x_n:n\in\Bbb N\rangle$ such that each $x_n$ is either $0$ or $1$. (This space is homeomorphic to the well-known middle-thirds Cantor set.)
For distinct $x,y\in X$ let $\delta(x,y)=\min\{n\in\Bbb N:x_n\ne y_n\}$, the first index at which $x$ and $y$ disagree; then
$$d(x,y)=\begin{cases} 0,&\text{if }x=y\\ 2^{-\delta(x,y)},&\text{otherwise} \end{cases}$$
is a metric on $X$. Suppose that $x,y$, and $z$ are distinct points of $X$ and that $d(x,y)+d(y,z)=d(x,z)$; then
$$2^{-\delta(x,y)}+2^{-\delta(y,z)}=2^{-\delta(x,z)}\,.\tag{1}$$
Let $n=\max\{\delta(x,y),\delta(y,z),\delta(x,z)\}$; clearly $\delta(x,y),\delta(y,z)>\delta(x,z)$, so we may assume that $n=\delta(x,y)$. Let $k=\delta(y,z)\le n$ and $\ell=\delta(x,z)<k$. Then we can rewrite $(1)$ as $2^{-n}+2^{-k}=2^{-\ell}$, and after dividing through by $2^{-n}$ we have
$$1+2^{n-k}=2^{n-\ell}\,.$$
Clearly this is possible if and only if $2^{n-k}=1$ and $2^{n-\ell}=2$, i.e., iff $k=n$ and $\ell=n-1$. Since $k=n$, we know that $x_i=y_i=z_i$ for $i<n$ and $x_n\ne y_n\ne z_n$. But then $x_n=z_n$, so $x_i=z_i$ for $i\le n$, and $n-1=\ell=\delta(x,z)\ge n+1$, which is absurd.
Thus, for $x,y,z\in X$ the relation $d(x,y)+d(y,z)=d(x,z)$ holds iff $y\in\{x,z\}$, so the only convex sets in $X$ are the singletons and doubletons. Every non-empty open set in $X$ is infinite (and in fact has cardinality $2^\omega=\mathfrak{c}$), so $\langle X,d\rangle$ does not have a base of convex sets.