There are $2$ parts to the question:
Let $f:\mathbb{R} ^{2}\rightarrow \mathbb{R}$ be differentiable in $\mathbb{R} ^{2}$ such that $\nabla f\equiv 0$ for every point $\left( x,y\right) \in \mathbb{R} ^{2}$. proof that f is constant.
Let $f:\mathbb{R} ^{2}\rightarrow \mathbb{R}$ be a function that satisfies $\left| f\left( x_{1},y_{1}\right) -f\left( x_{2},y_{2}\right) \right| \leq \left( x_{1}-x_{2}\right) ^{2}+\left( y_{1}-y_{2}\right) ^{2}$ for every $\left( x_{1},y_{1}\right) ,\left( x_{1},y_{1}\right) \in \mathbb{R} ^{2}$. proof that $f$ is constant
Before I go on with the proofs, I would even argue that in the first question, the word "differentiable" is superfluous because if we are given that $\nabla f\equiv 0$, then it's clear that $f$ is differentiable because the partial derivatives are continuous (because they are $0$ everywhere, and what more continuous than the constant function $0$?), is this correct?
I came up with the following proofs:
Given $\nabla f\equiv 0$ this means that $f_{x}\equiv f_{y}\equiv 0$ , if we "freeze" $y$ to be $y_{0}$ and let $x$ vary then $f(x,y_{0})$ is constant as a result of lagrange's theorem because $f_{x}\equiv 0$, if we did something similar on $x$ we get that $f(x_{0},y)$ is constant for every $y$. thus for every $\left( x,y\right) \in \mathbb{R} ^{2}$ we get that $f\left( x,y\right) =f\left( 0,y\right) =f\left( 0,0\right) $ (since it is constant if we move parallel to the axis) meaning $f$ is constant.
We first prove this for the 1-dimensional case: meaning if f satisfies $\left| f\left( x\right) -f\left( y\right) \right| \leq \left| x-y\right| ^{2}$ for every $x$ and $y$ then (if $x \neq y$) $$\left| \dfrac{f\left( x\right) -f\left( y\right) }{x-y}\right| \leq \left| x-y\right| $$ Therefore $$\left| f^{'}\left( x\right) \right| = \lim _{y\rightarrow x}\left| \dfrac{f\left( x\right) -f\left( y\right) }{x-y}\right| \leq \lim _{y\rightarrow x}\left| x-y\right| = 0$$ meaning $f$ is differentiable and constant. back to the $2$ dimensional case: if we "freeze" $x_{1}$ to be $x_{2}$ to be $x_{0}$ then we get that $$\left| f\left( x_{0},y_{1}\right) -f\left( x_{0},y_{2}\right) \right| \leq \left( y_{1}-y_{2}\right) ^{2}$$ and from the lemma at the begging we proved we conclude that $f_{y}\equiv 0$ the same argument goes for $x$, and we get that $f_{x}\equiv f_{y}\equiv 0$; this means that (because the partial derivatives are continuous because they're $0$) $f$ is differentiable in $2$ variables and this coupled with the conclusion from $1$ (the first question) we get that $f$ is constant.
These are the proofs I had in mind, but I don't see what's wrong with them.
Can someone provide me with insight?