Multivariate monotonic function
$f$ need not be Borel measurable: Let $f(x,y)=0$ on $x+y<1$ and $f=1$ on $x+y>1$, and on the diagonal $x+y=1$, set $f=1/2$ for $x\in E$ and $f=0$ otherwise, where $E\subset [0,1]$ is not Borel. Then $f^{-1}(\{ 1/2 \})$ is not a Borel set in the square.