Well-ordering principle and an infinite chessboard 
Imagine an infinite chessboard that contains a positive integer in each square. If the value in each square is equal to the average of its four neighbors to the north, south, west, and east, prove the values in all the squares are equal.

I found this on AoPS in which they gave a proof

Consider the square containing the minimal value. Then its four neighbors must all have this minimal value. Similarly, their neighbors must also have this minimal value, and so on ad infinitum. Thus, every square in the chessboard has the same value.

but I don't understand how the first sentences implies that “Thus, every square in the chessboard has the same value.”
If $m$ is the minimal value and has neighbors $a,b,c,d$, then $$m=\dfrac{a+b+c+d}{4}$$
and so pick one of the neighbors say $a$, then $a$ has neighbors $m,e,f,g$ and so $$a = \dfrac{m+e+f+g}{4}$$ but I don't understand how this would imply that $a=m$ also. How do they draw this conclusion?
 A: If $m$ is the minimal value, then $a,b,c,d \geq m$. Thus
$$m = \frac{a+b+c+d}{4} = \frac{a}{4} + \frac{b}{4} + \frac{c}{4} + \frac{d}{4} \geq \frac{a}{4} + \frac{m}{4} + \frac{m}{4} + \frac{m}{4} = \frac{a}{4} + 3\frac{m}{4}$$
By subtracting off $3\frac{m}{4}$ from the two sides of the above inequality, we deduce that $\frac{m}{4} \geq \frac{a}{4}$, so $m \geq a$. Since by hypothesis $m \leq a$, we conclude that $m=a$. By the same logic, $b,c,d=m$. Repeat this argument for all the neighbors of $a,b,c,d$, and so on (this can be made formal).
This is a discrete version of a Maximum principle, as show up in complex analysis and PDEs. Intuitively, you have a function on the chessboard with the property that the value at a square is equal to the average of its neighbors. If the function is not constant in the neighborhood of a particular square, then some neighboring values must be larger and some smaller, in order for the averaging to work out. However, if the value at a given square is a minimum, we are forced to conclude that the neighbors share the same value, so that the function is constant.
