Edit: Several questions of this type have been asked here before but not on the same domain $\Bbb{R}^2.$ Please, how do I deal with a function of this type or could anyone show me a reference or a similar question with the same domain?
Let $f\colon\Bbb{R}^2\to \Bbb{R}$ such that $|f(x)-f(y)|\leq \Vert x-y\Vert^2.$ Prove that $f$ is a constant.
What if we assume that $f$ is differentiable. Is there another way of showing that $f$ is a constant?
Here is a couple of definitions of differentiability for functions in $\mathbb{R}^2$ which can easily be extended into $\mathbb{R}^n$.
Definition 1: Function $f:\mathbb{R}^2\rightarrow\mathbb{R}$ is differentiable at point $x$ if there are two constants $c_1$ and $c_2$ such that $$\lim_{h\to0}\frac{f(x+h)-f(x)-c_1h_1-c_2h_2}{|h|}=0$$
Definition 2: Function $f:\mathbb{R}^2\rightarrow\mathbb{R}$ is differentiable at point $x$ if there are two constants $c_1$ and $c_2$ and function $\phi:\mathbb{R}^2\rightarrow\mathbb{R}$ such that $$f(x+h)-f(x)=c_1h_1+c_2h_2+\phi(h)$$ and $$\lim_{h\to0}\frac{\phi(h)}{|h|}=0$$
For both of these definitions $c_1$ and $c_2$ are constants with respect to $h$. i.e. if change $x$ constants and $\phi$ are allowed to change.
So in order to establish differentiability we need to present or show existence of $c_1$, $c_2$, and functions $\phi$ that would satisfy required properties.
If we choose definition 1. We claim that $c_1=c_2=0$ will satisfy the conditions: $$\left|\lim_{h\to0}\frac{f(x+h)-f(x)-c_1h_1-c_2h_2}{|h|}\right|=\left|\lim_{h\to0}\frac{f(x+h)-f(x)}{|h|}\right|=$$ $$=\lim_{h\to0}\frac{|f(x+h)-f(x)|}{|h|}\leq\lim_{h\to0}\frac{|h|^2}{|h|}=0$$
Here we must mention that absolute value is a continuous function so if $\lim|F|$ exists so must $|\lim F|$ and they must be the same.
In order to verify definition 2 we must present both constants $c_1$ and $c_2$ and functions $\phi$ that satisfy the necessary condition. We claim that the constants can be chosen as $c_1=c_2=0$ and $$\phi(h)=f(x+h)-f(x).$$ The first identiy is trivial since $\phi$ was chosen this way. The limit identity follows from the condition provided by the theorem: $|f(y-x)|\leq|y-x|^2$, set $y=x+h$:
$$\left|\lim_{h\to0}\frac{\phi(h)}{|h|}\right|=\lim_{h\to0}\frac{|\phi(h)|}{|h|}=\lim_{h\to0}\frac{|f(x+h)-f(x)|}{|h|}\leq\lim_{h\to0}\frac{|(x+h)-x)|}{|h|}\leq\lim_{h\to0}\frac{|h|^2}{|h|}=0$$
Here we must perform the standard calculus dance with existing limits: since the last limit in the chain exists and equals $0$ and all qualities are non-negative, the first limit in the chain within the absolute value exists as well and it is $0$ ("Two policemen" or "Sandwich" theorem)
As a conclusion, to establish something in math, we must present certain objects, or prove their existence by other means. In this case, we presented $c_1$, $c_2$, and $\phi$ and verified that these objects satisfy all required conditions. Hence the functions is differentiable and $c_1=c_2=0$ are partial derivatives existing at any point $x$ and they are $0$: $$f'(x)=[0,0]\Longrightarrow\frac{\partial f(x,y)}{\partial x}=\frac{\partial f(x,y)}{\partial y}=0\Longrightarrow f(x,y)=\text{const}(x)=\text{const}(y)=\text{const}$$ Q.E.D.