Let $n\in\Bbb N$. Prove that for every function $ f: J_n \to \Bbb R $, there exists a bijective function $ g: J_n \to J_n $ such that $$(f\circ g)(1)\leq (f\circ g)(2)\leq \cdots\leq (f\circ g)(n).$$
Note: $J_n=\{1,2,3,\ldots,n\}.$
I try to prove that by induction.
For $n=1$, there's nothing to do.
For $n=2$, We have to show that for every function $ f: J_2 \to \Bbb R $, there exists a function $ g: J_2 \to J_2 $ such that $$ (f \circ g) (1) \leq (f \circ g) ( 2). $$ Let's fix the function $ f: J_2 \to \Bbb R $ given by $ f (1) = r_1 $ and $ f (2) = r_2 $, where $ r_1, r_2 \in \Bbb R $. Without loss of generality, let's take $ r_2 \leq r_1 $, then we can define the function $ g: J_2 \to J_2 $ as $ g (1) = 2 $ and $ g (2) = 1 $. And we would have that $ f (g (1)) = f (2) = r_2 $ and $ f (g (2)) = f (1) = r_1 $ and clearly what we want is fulfilled.
Some help for the inductive step would be appreciated, I really don't know how to do that part.
Not sure that induction is required here. Denote $f_i = f(i)$ and order the $\{f_i\}$:
$$f_{i_1} \le f_{i_2} \le \dots \le f_{i_n}.$$
Let $g \in \mathfrak S_n$ be the permutation defined by $g(j) = i_j$ for $j \in J_n$.
You're done as $(f \circ g)(j) = f(g(j)) = f(i_j) =f_{i_j}$.