Let $(M,d)$ be a complete, separable, compact metric space. Assume $M$ is geodesic, that is for any $x,y \in M$ there exists a distance realizing geodesic between $x$ and $y$ (not necessarily unique). A set $U \subseteq M$ is convex if for any $x,y \in U$ there exists a geodesic between $x$ and $y$ that lies entirely in $U$.
Question: Is it true that for any $x \in M$ there exists an $\varepsilon' >0$ such that all $\varepsilon$-balls around $x$ for $\varepsilon < \varepsilon'$ are convex?


Two examples to illustrate the question:


Let $M= \{(x\_1,x\_2) \in \mathbb{R}^2 | x\_2 \ge 0, x\_1^2+x\_2^2 \le 1 \} / \sim$ where $\sim$ is the equivalence relation $(x,0) \sim (-x,0)$, that is $M$ is a flat cone with the standard metric induced from $\mathbb{R}^2$. Then for any $\varepsilon >0$, the $\varepsilon$-ball around the point $(0,\varepsilon/2)$ is not convex. In particular, arbitrarily small non-convex balls exists. However, for every point sufficiently small balls around it are convex.


Let $M= \{(x\_1,x\_2) \in \mathbb{R}^2 | x\_1^2+x\_2^2 \le 1 \}$ be the unit disk with the Manhattan metric $d((x\_1,x\_2),(y\_1,y\_2)):=|x\_1-y\_1|+|x\_2-y\_2|$. Then the $\varepsilon$-balls are diamond shaped and are convex. However, distance realizing geodesics are not unique, in general there exist uncountably many and not all of them lie inside the $\varepsilon$-balls. Consider the radius $1/2$ ball around $(0,0)$ and the points $(2/5,0)$ and $(0,2/5)$. Then the geodesic through the point $(0,0)$ lie inside the ball but the geodesic through $(2/5,2/5)$ does not. Hence the formulation 'there exists a geodesic inside the ball' is crucial, the same statement with 'all geodesics lie inside the ball' is false. 


A theorem that shows this under some additional assumptions on the metric space would also be interesting.



Are small $\varepsilon$-balls convex in geodesic metric spaces?
**Negative part**


The answer is no without further assumptions, here is a counterexample (a bit nasty, it is not locally simply connected) :


* In the plane consider first the two positive semi axis. ($\mathbb{R}\_+\times\{0\}$ and $\{0\}\times\mathbb{R}\_+$).
* for each $n$ add the segment from $(0,2^{-n})$ to $(2^{-n},0)$.
* put on it the length metric induced by the usual metric on $\mathbb{R}^2$.


Then every ball centered at the origin of radius $1.01\times 2^{-n}$ is not convex : the points $(0,2^{-n})$ to $(2^{-n},0)$ are inside while the geodesic between these points is the segment between theme, which leaves the ball. (The $1.01$ is there to handle closed and open balls at the same time.)


**Positive part**


As you are probably aware, the answer is yes on a smooth riemannian manifold. I suspect the same thing is true on a smooth Finsler manifold. A $CAT(k)$ metric space would have this property since the distance to a point is then convex (on balls of radius $\tfrac{\pi}{2\sqrt{k}}$ if $k>0$).



> 
> This leaves a lot of room for improvement, for instance : 
> 
> 
> * Can we build simply connected examples ? (I would think yes)
> * Can we build example with curvature bounded from below in the sense of Alexandrov ? (I would say no but I'm not sure why)
> 
> 
> 


