Equivalence Relation is Congruence iff Compatible with Operation/Proof 1

Necessary Condition
Let $\mathcal R$ ibe a congruence relation for $\circ$.

That is:
 * $\forall x_1, x_2, y_1, y_2 \in S: x_1 \mathrel {\mathcal R} x_2 \land y_1 \mathrel {\mathcal R} y_2 \implies \paren {x_1 \circ y_1} \mathrel {\mathcal R} \paren {x_2 \circ y_2}$

As $\mathcal R$ is an equivalence relation it is by definition reflexive.

That is:
 * $\forall z \in S: z \mathop {\mathcal R} z$

Make the substitutions:

It follows that:
 * $\forall x, y, z \in S: x \mathrel {\mathcal R} y \implies \paren {x \circ z} \mathrel {\mathcal R} \paren {y \circ z}$

Similarly, make the substitutions:

It follows that:
 * $\forall x, y, z \in S: x \mathrel {\mathcal R} y \implies \paren {z \circ x} \mathrel {\mathcal R} \paren {z \circ y}$

Sufficient Condition
Now let $\mathcal R$ have the nature that:

Then we have:

As $\mathcal R$ is an equivalence relation it is by definition transitive.

Thus it follows that:
 * $\paren {x_1 \circ x_2} \mathrel {\mathcal R} \paren {y_1 \circ y_2}$

The result follows.