Equivalence Relation is Congruence iff Compatible with Operation/Proof 1

Necessary Condition
Let $\RR$ be a congruence relation for $\circ$.

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

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

That is:
 * $\forall z \in S: z \mathrel \RR z$

Make the substitutions:

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

Similarly, make the substitutions:

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

Sufficient Condition
Now let $\RR$ have the nature that:

Then we have:

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

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

The result follows.