Operation over which Every Commutative Associative Operation is Distributive is either Left or Right Operation/Lemma

Theorem
Let $S$ be a set.

Let $A \subsetneqq S$ be a proper subset of $S$.

Let $a \in A$ and $b \in \relcomp S A$.

Let $\odot$ be the operation on $S$ defined as:


 * $\forall x, y \in S: x \odot y = \begin {cases} a & : \set {x, y} \subseteq A \\ b & : \set {x, y} \not \subseteq A \end {cases}$

Then $\odot$ is commutative and associative.

Commutativity
Trivially:

Associativity
There are $2$ cases to attend to:


 * Case $1$: $\set {x, y, z} \subseteq A$

That is:
 * $x \odot \paren {y \odot z} = \paren {x \odot y} \odot z = a$


 * Case $2$: $\set {x, y, z} \not \subseteq A$

Then at least one of $\set {x, y, z}$ is in $\relcomp S A$.

, suppose $x \in \relcomp S A$.

Then:
 * $\forall y \in S: \set {x, y} \not \subseteq A$

and so:
 * $\forall y \in S: x \odot y = b$

Then we note that similarly:
 * $\forall y \in S: \set {b, y} \not \subseteq A$

and so:
 * $\forall y \in S: y \odot b = b$

Hence:
 * $x \odot \paren {y \odot z} = \paren {x \odot y} \odot z = b$

Both cases have been examined, and we see that:


 * $\forall x, y, z \in S: x \odot \paren {y \odot z} = \paren {x \odot y} \odot z$