Proof of first-order condition for differentiable quasiconvex functions Question
It is stated in Boyd & Vandenberghe's "Convex Optimization" that if $f:\mathbb{R}^n \to \mathbb{R}$ is differentiable, then $f$ is quasiconvex if and only if $\forall x,\,y \in \operatorname{dom}(f)$,
$$f(y) \le f(x) \implies \nabla f(x)^T(y-x) \le 0.$$
The "only if" part is not hard to prove, but I have a little problem making the proof of the "if" part clean and rigorous.  I'll share my current attempt below, and will appreciate a better proof, or suggestions to improve it.  
Current attempt
I use the fact that $\forall x,\,y \in \operatorname{dom}(f), \forall \theta \in [0,\,1]$,
$$f\text{ is quasiconvex } \iff f(x+\theta (y-x)) \le \max\{f(x), f(y)\}$$
and prove by contradiction as follows:
Suppose there exists $\theta\in (0,\,1)$ and $x,\,y \in \operatorname{dom}(f)$ such that $f(z) > \max\{f(x),\,f(y)\}$, where $z \triangleq x + \theta(y - x)$ and $x \ne y$. Without loss of generality, assume $f(y) \le f(x)$.
Hence, we have $f(z) > f(x)\ge f(y)$.
But this implies that $\nabla f(z)^T(x - z) \le 0$ and $\nabla f(z)^T(y-z)\le 0$, due to the sufficient condition above. Since $x-z=\theta(x-y)$ and $y-z=(1-\theta)(y-x)$, this in turn implies that $\nabla f(z)^T(x-y) = 0,$ i.e. the directional derivative is zero.  But this is true for any $z=x+\theta(y-x)$ where $\theta\in(0,1)$, so it's impossible for $f(z)$ to descend to $f(x)$, as $\theta$ tends to $0$, and we have a desired contradiction.
 A: Arranging the ideas of proof.
Let $x,y \in \mathbf{dom}f$. Without loss of generality, assume that $f(y) \leq f(x)$. Let $Z$ be a set defined as,
$$Z = \{z|f(z) > f(x), z = x+\theta(y-x), \theta \in (0,1)\}$$
Note that each element of $Z$ (if any) belong to $\mathbf{dom}f$.
Suppose $Z$ is nonempty. Let $z = \inf\limits_{\theta} Z$. By the definition of $z$, we must have $\nabla f(z)^T(x-y) < 0$ i.e. $f$ must strictly descend in the direction $(x-y)$.
Since $f(z) > f(x) \geq f(y)$, we have $\nabla f(z)^T(x-z) \leq 0$ and $\nabla f(z)^T (y-z) \leq 0$. Using the fact that $x-z=\theta(x-y)$ and $y-z=(1-\theta)(y-x)$ we get $\nabla f(z)^T (x-y) = 0$, a contradiction. Therefore, no such $z$ exists and $Z$ is empty.
A: You have the right idea, but your exposition is off. You have already set $\theta$, so you can't claim this is true for all $\theta$. I would make the following amendments:
But this is true for any $z=x+θ(y−x)$ where $θ \in (0,1)$ and $f(z) > f(x)$, so it's impossible for f(z) to descend to f(x). More precisely, let
$Z = \{ z | f(z) > f(x) \text{ and $z=x+θ(y−x)$ for some $\theta$} \}$.
Pick $z^* = \min Z$. Then since $z^* > x$ and $f(z^*) > f(x)$, there must exist $z' \in (x, z^*)$ such that $ f(z^*)>f(z') > f(x)$. But then $z' < z^*$ and $z \in Z$, contradicting that $z^*$ was the minimum element of $Z$.
