From some my previous questions here and here and well-known rearrangement inequality. I pose an inequality as follows and I am looking for the proof or a reference.
Inequality: Let $y=f(x,y)$ is positive continuous function in interval $[a, b] \times [c, d]$. Such that: $f'_x(x,y)>0$ and $f'_y(x,y)>0$ in $[a, b] \times [c, d]$. If $a \le x_1 \le x_2 \le \cdots \le x_n \le b$ and $c \le y_1 \le y_2 \le \cdots \le y_n \le d$ then
$$n\sum_{i=1}^{n}f(x_i, y_i) \ge \sum_{i=1}^{n}\sum_{j=1}^{n}f(x_i, y_j)$$
if If $a \le x_1 \le x_2 \le \cdots \le x_n \le b$ and $d \ge y_1 \ge y_2 \ge \cdots \ge y_n \ge c$ then
$$n\sum_{i=1}^{n}f(x_i, y_i) \le \sum_{i=1}^{n}\sum_{j=1}^{n}f(x_i, y_j)$$
EDIT: Allow me adding condition $f''_{xy}>0$ $f''_{yx}>0$
Remarks: The result be can general to $n$ variant.