Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be convex, and let $A \subseteq \mathbb{R}$ be a Lebesgue-measurable set such that $\lambda(\mathbb{R}\setminus A)=0$, and such that for every $x \in A$, $f$ is differentiable at $x$ and $f'(x)$ is finite.
Suppose there is a partition of $\mathbb{R}$ into three non-empty intervals, $\mathbb{R} = I\uplus J\uplus K$, such that for every $(x,y,z) \in I\times J\times K$, $x<y<z$, and such that
for every $x \in I\cap A$, $f'(x) < 0$,
for every $y \in J\cap A$, $f'(y) = 0$,
for every $z \in K\cap A$, $f'(z) > 0$.
a. Can it be inferred that, for every triple $(x,y,z)\in I\times J\times K$, $f(x) \geq f(y) \leq f(z)$?
b. Can it be inferred that, for every triple $(x,y,z)\in I\times J\times K$, $f(x) > f(y) < f(z)$?