This question is inspired by a discussion in chat with wj32. We allow for equality in the definition of increasing and decreasing and call a function monotonic if it is increasing or decreasing. If $f:\mathbb R\to \mathbb R$ is not monotonic, are there three points $x<y<z$ such that $f(y)<f(x),f(z)$ or $f(y)>f(x),f(z)$? For convenience, call these the $\vee$ and $\wedge$ formations respectively.
2 Answers
If $f$ is not monotonic, it is not decreasing or increasing. Hence there are points $a<b$ with $f(a)<f(b)$ and points $c<d$ with $f(c)>f(d)$.
If $a=c$, use $adb$ to form $\vee$ or $abd$ to form $\wedge$.
If $a=d$, use $cdb$ to form $\vee$.
If $b=c$, use $abd$ to form $\wedge$.
If $b=d$, use $acd$ to form $\wedge$ or $cab$ to form $\vee$.
Now we are left with the case when $a,b,c,d$ are pairwise distinct.
If $a<b<c<d$, use $abd$ to form $\wedge$ or $acd$ to form $\wedge$.
If $a<c<b<d$, use $abd$ to from $\wedge$ or $acd$ to form $\wedge$.
If $a<c<d<b$, use $acd$ to form $\wedge$ or $cdb$ to form $\vee$.
If $c<a<d<b$, use $cdb$ to form $\vee$ or $cab$ to form $\vee$.
If $c<d<a<b$, use $cdb$ to form $\vee$ or $dab$ to form $\vee$.
It's a purely combinatorial matter. The main task is to reduce the number of cases to be considered as much as possible.
It suffices to consider a surjective function $f:\ \{1,2,3,4\}\to\{1',\ldots,n'\}$ with the property that there exists a pair $x<y$ with $f(x)<f(y)$ and a pair $u<v$ with $f(u)>f(v)$. Here $n\in\{2,3,4\}$.
I shall only deal with the case $n=4$.
If at least one of $2$ and $3$ is mapped onto $1'$ or $4'$ we are done.
If $f(2)=2$ and $f(3)=3$ then $f(1)=4'$, and we have a $\vee$ over $\{1,2,3\}$.
If $f(2)=3'$ and $f(3)=2'$ then $f(1)=1'$, and we have a $\wedge$ over $\{1,2,3\}$.
- 226,825