Complement of Relation Compatible with Group is Compatible

Theorem
Let $\left({S,\circ}\right)$ be a group.

Let $\mathcal R$ be a relation on $S$.

Suppose that $\mathcal R$ is compatible with $\circ$.

Let $\mathcal Q = \complement_{S \times S} \mathcal R$, so that
 * $\forall a,b\in S: a \mathop{\mathcal Q} b \iff \neg \left({a \mathop{\mathcal R} b}\right)$.

Then $\mathcal Q$ is a relation compatible with $\circ$.

Proof
Let $x,y,z \in S$.

Suppose that $\left({x \circ z}\right) \not\mathop {\mathcal Q} \left({y \circ z}\right)$.

Then by the definition of $\mathcal Q$,


 * $\left({x \circ z}\right) \mathop {\mathcal R} \left({y \circ z}\right)$.

Since $\mathcal R$ is compatible with $\circ$,


 * $\left({x \circ z}\right) \circ z^{-1} \mathop{\mathcal R} \left({y \circ z}\right) \circ z^{-1}$.

By the associative law and the definition of group inverse,


 * $x \mathop {\mathcal R} y$,

so by the definition of $\mathcal Q$,

$x \not\mathop {\mathcal Q} y$.

By contraposition,

We have shown that
 * $\forall x,y,z \in S: x \mathop {\mathcal Q} y \implies \left({x \circ z}\right) \mathop {\mathcal Q} \left({y \circ z}\right)$.

A precisely similar argument shows that
 * $\forall x, y, z \in S: x \mathop {\mathcal Q} y \implies \left({z \circ x}\right) \mathop {\mathcal Q} \left({z \circ y}\right)$,

so $Q$ is a relation compatible with $\circ$.