Non-monotonic functions on ordered sets I'm trying to prove that if $~~(A,<_A)~~$ and $~~(B,<_B)~~$ are linearly ordered sets and $~~f: A \rightarrow B~~$ is non-monotonic function than there exist points $~~a,b,c\in A~~$ such that $~~ a <_A b <_A c~~$ and ($f(b)<_B\min\{f(a),f(c)\}~~$ or $~~\max\{f(a),f(c)\}<_Bf(b)$)
But unfortunately nothing better than brute-force enumeration of possibilities comes to my mind. So i'll be grateful for any tips or solutions for this question. Thanks in advance.

We can try by contradicition.
The negation of the statement to be proved is :

for all points $a,b,c \in A \quad [ \lnot (a < b < c) \lor \lnot (f(b) < \min \{ f(a),f(c) \} \lor    \max \{ f(a),f(c) \} < f(b)) ]$

which is :

for all points $a,b,c \in A \quad [ (a < b < c) \rightarrow (f(b) \ge \min \{ f(a),f(c) \} \land \max \{ f(a),f(c) \} \ge f(b)) ]$

which is :

for all points $a,b,c \in A \quad [ (a < b < c) \rightarrow (\min \{ f(a),f(c) \} \le f(b) \le \max \{ f(a),f(c) \} ) ]$

and this - it seems to me - contradicts non-monotonicity of $f$.
