A parallelogram identity forces constancy on a finite group
Let $A$ be a finite abelian group and let $M,m:A\to\mathbb R$. Suppose that for every $P\in A$ and every $Q\ne0$, $$M(P+Q)+M(P-Q)-2M(P)=2m(Q).$$ Then $m(Q)=0$ for every $Q\ne0$, and $M(P)=M(0)$ for every $P\in A$.