Suppose $$(a_1,\dots,a_n)$$ is a sequence of real numbers such that $$a_1\leq a_2\leq \dots \leq a_n.$$

If $$(b_1,\dots b_n)$$ is a rearrangement of the sequence $$(a_1,\dots,a_n)$$ such that $$b_1\leq b_2\leq \dots \leq b_n,$$ then does it follow $$a_1=b_1,\dots,a_n=b_n$$?

I know that if the sequences were strictly monotonic, then the conclusion would have been obvious. How do I prove the question here, though... please help me with a proof maybe. Thank you in advance.

• Try with induction: Let X be the multiset of all numbers. $a_1$ and $b_1$ must both be the smallest element in X. Note that, in your case, $x\leq y$ and $y\leq x$ imply $x=y$. Thus, $a_1=b_1$. Now, remove one occurrence of $a_1=b_1$ from X, and continue by induction. – NeitherNor Jul 6 at 19:19

Apart from the claim being obvious, Suppose $$b_n\ne a_n$$. If $$b_n, then $$a_n=b_i$$ for some $$i, but then $$a_n=b_i\le \ldots \le b_n, contradiction. Similarly, $$b_n>a_n$$ leads to a contradiction. Hence $$a_n=b_n$$. Now use induction on $$n$$.