If $|x_1-t|+|x_2-t|+\cdots+|x_n-t| = |y_1-t|+|y_2-t|+\cdots+|y_n-t|$ for all $t$ then $\{x_1,\ldots,x_n\} = \{y_1,\ldots,y_n\} $ 
Prove that if $|x_1-t|+|x_2-t|+\cdots+|x_n-t| = |y_1-t|+|y_2-t|+\cdots+|y_n-t|$ for all values of $t$ then $\{x_1,\ldots,x_n\} = \{y_1,\ldots,y_n\} $
(All the variables are real numbers).

I tried to prove that minimums are equal then continue by induction, but I couldn't progress much in that line.
 A: It is easy to see that $(*)$ the local minima of the function $f\colon t \mapsto |x_1-t|+|x_2-t|+\cdots+|x_n-t|$ are exactly the $x_i$. This answers your question.
To check $(*)$, noting $u_1<u_2<\cdots <u_s$ the distinct values among the $x_i$, we see that $f(t)=\displaystyle\sum_{k=1}^{s} n_k |x-u_k|$ where the $n_k$ are positive integers. 
The function $f$ is piecewise affine: for $x$ between $u_j$ and $u_{j+1}$ we have 
$$
f(x)=\sum_{k\leq j} n_k(x-u_k)+\sum_{k > j} n_k(u_k-x)
$$
from which $(*)$ can be easily deduced.
A: Note: this answer is only valid for real values. However, the same idea can be used for complex values (assuming that $t \in \mathbb{C}$ as well), by taking $t$ to lie on a line parallel to the real axis through each $x_k$.
Suppose $x \in \mathbb{R}^n$ and $x_1 \le \cdots \le x_n$. Let $\phi_x(t) = \sum_k |x_k-t|$. We note that $\phi_x$ is differentiable on $D=\mathbb{R} \setminus \{x_1,\ldots,x_n\}$, and $\phi_x'(t) = | \{i: x_i < t\}| - | \{i: x_i > t\}| $ for $t \in D$ (here I am using $|\cdot|$ for the cardinality). Note that 
$\phi_x'(t) \in \{-n,\ldots,n\}$ and at the points of discontinuity, $\phi_x'$ changes by 2.
Then $\phi_x$ completely specifies $x$. To see this, first note that $\lim_{t \to \infty} \phi_x'(t) = n$, hence we know the number of points $n$.
We note that  $\phi_x'$ is non-decreasing. Let $A = \{ \tau : \lim_{t \uparrow \tau} \phi_x'(t) < \lim_{t \downarrow \tau} \phi_x'(t) \}$, and note that $A$ is finite. For $a \in A$, let $n(a) = \frac{1}{2}(\lim_{t \downarrow a} \phi_x'(t) - \lim_{t \uparrow a} \phi_x'(t))$. Then if we let $A = \{ a_1,\ldots,a_k\}$ where $a_i < a_{i+1}$, and define the matrix $P:\mathbb{R}^k \to \mathbb{R}^n$ by $$[P]_{ij} = \begin{cases} 1, & 1 \le i \le n(a_1) \\
1, & 1<j, \ n(a_1)+\cdots +n(a_{j-1})< i \le n(a_1)+\cdots +n(a_{j}) \\ 0, & \text{otherwise,}\end{cases}$$ then $x=Pa$.
It follows from this that if $\phi_x = \phi_y$, where the $x,y$ are “ordered” then $x=y$.
Addendum: The complex case is similar, except that (taking $\phi_x$ as a map $\mathbb{R}^2 \to \mathbb{R}$) $\phi_x'(t) = \sum_k \frac{t-x_k}{|t-x_k|}$,
for $ t \notin D = \mathbb{R}^2 \setminus \{x_1,\ldots,x_n\}$. Then $\phi_x'$ is continuous for $x \notin D$. Furthermore, if we let $n(a) = \frac{1}{2}(\lim_{\delta \downarrow 0} \phi_x'(a+\delta) - \lim_{\delta \downarrow 0} \phi_x'(a-\delta))$ (note that $\delta$ only takes real values), then $n(a)=0$ for $a\in D$, and if $ a \in \{x_1,\ldots,x_n\}$, then $n(a) = | \{ x_i | x_i = a \} | $.
In this case, $\phi_x$ determines the $x_i$ and their multiplicities, but not the order. However, this is sufficient to show that if $\phi_x = \phi_y$, then 
$\{x_1,\ldots,x_n\} = \{y_1,\ldots,y_n\}$ (and multiplicities as well, although this was not part of the question).
Note: It would have been simpler to show that $n(a) = \frac{1}{2}(\lim_{\delta \downarrow 0} \phi_x'(a+\delta) - \lim_{\delta \downarrow 0} \phi_x'(a-\delta))$ is defined everywhere and $n(a) = | \{ x_i | x_i = a \} | $.
Then if $\phi_x=\phi_y$, the corresponding '$n$s' must be equal, and the result follows immediately from the fact that $n(a) = | \{ x_i | x_i = a \} | $.
A: The idea of this answer is based on copper.hat's Idea.
Suppose $x_1\leq x_2...\leq x_n$ and $y_1\leq y_2...\leq y_n$ and $\phi_x(t) = \sum_k |x_k-t|$ and $\phi_y(t) = \sum_k |y_k-t|$.
The least $t$ that $\phi_x(t)$ is not differentiable at is $x_1$ and the least $t$ that $\phi_y(t)$ is not differentiable at is $y_1$. But $\phi_x(t)=\phi_y(t)$ so $x_1=y_1$.     
Now we can use induction.
