Proving the associativity of a monoid with $a \circ b = a+b-ab$ For university, it was my excercise to proof the associativity of the monoid $$H=(\mathbb{Q},\circ)\text{ with } a \circ b := a+b-ab\quad(a,b \in \mathbb{Q})$$
The excercise instructor gave us the following solution:
$$ a \circ(b \circ c) = (a \circ b) \circ c $$
Hence
$$ (a+b-ab) \circ c = a+c-ac \quad+\quad b+c-bc \quad +\quad-ab-c+abc$$
He also did it for $a\circ(b+c-bc)$ and pointed out that both equations have the same summands. That was the proof for the assoiciativity and I do understand this so far.
What I do not understand is how he determined the third part with $ -ab-c+abc$.
If I rewrite the operation to $\alpha \circ \beta = \alpha + \beta - \alpha\beta$ for not mixing up the variables later, I get:
$\alpha = -ab \\
\beta = c$
And hence in my mind it is not $-ab-c+abc$ but $-ab+c +abc$. But when I keep on calculating with $+c$ instead of $-c$, my proof fails. So why has it to be $-c$?
 A: For every $a,b,c\in \mathbb{Q}$ we have
\begin{eqnarray}
a\circ(b\circ c)&=&a\circ\underbrace{(b+c-bc)}_{d}=a+d-ad=a+(b+c-bc)-a(b+c-bc)\\
&=&a+b+c-bc-ab-ac+abc=a+b-ab+c-ac-bc+abc\\
&=&\underbrace{(a+b-ab)}_{e}+c-\underbrace{(a+b-ab)}_{e}c=e+c-ec=e\circ c\\
&=&(a\circ b)\circ c.
\end{eqnarray}
A: It may be easier if you look at the bijective map
$$
f\colon \mathbb{Q}\to \mathbb{Q},\quad f(a)=1-a.
$$
You can notice that
$$f(a\circ b)=1-a\circ b=1-a-b+ab=(1-a)(1-b)=f(a)\cdot f(b).$$
Let's call “property H” the equality
$$
f(a\circ b)=f(a)\cdot f(b)
$$
that holds for all $a,b\in \mathbb{Q}$.
Thus $f$ is an isomorphism between $(\mathbb{Q},\circ)$ and $(\mathbb{Q},\cdot)$. Since one operation is associative, also the other one is.
To see why, consider
\begin{align}
f((a\circ b)\circ c)&=f(a\circ b))\cdot f(c) &&\text{by property H} \\[2ex]
&=(f(a)\cdot f(b))\cdot f(c) &&\text{by property H} \\[2ex]
&=f(a)\cdot (f(b)\cdot f(c)) &&\text{associativity of multiplication} \\[2ex]
&=f(a)\cdot f(b\circ c) &&\text{by property H} \\[2ex]
&=f(a\circ(b\circ c)) &&\text{by property H}
\end{align}
Since $f$ is injective, we conclude that $(a\circ b)\circ c=a\circ(b\circ c)$.
This is a general fact; if $X$ and $Y$ are endowed with two operations, say $(X,\circ)$ and $(Y,*)$ and $f\colon X\to Y$ is a bijective map with the property that
$$
f(a\circ b)=f(a)*f(b)
$$
for all $a,b\in X$, then one operation is associative if and only if the other one is and the proof is just the same as before. We are basically transferring one operation to the other set, so any “algebraic property” holding for one operation holds true also for the other one. This is what's called an isomorphism between algebraic structures.
