Given a metric space $(X,d)$ and a subset $M\subseteq X$, the [metric projection][1] associated with $M$ is a function that maps each element $x\in X$ to the set of nearest elements in $M$, that is $p_M(x) := \arg \min_{y\in M} d(x,y)$.

I am interested in functions $f$ that take two arguments $x_1,x_2\in X$ and return a point in the *intersection* of their metric projection. Formally, a function $f$ is *good* if it is possible to associate, with each $x\in X$, a subset $M(x)\subset X$, such that

$$
f(x_1,x_2) \in \arg \min_{y\in M(x_1)} d(y, x_2)
$$
$$
f(x_1,x_2) \in \arg \min_{y\in M(x_2)} d(y, x_1)
$$

So $f(x_1,x_2)$ is both a point nearest to $x_1$ in $M(x_2)$, and a point nearest to $x_2$ in $M(x_1)$.

What is a characterization of good functions?

I am mainly interested in the case when $X = \mathbb{R}^n$ and $d$ is some $\ell_p$ metric.


  [1]: https://en.wikipedia.org/wiki/Metric_projection