Operation $\circ$ in set $S$ satisfies the conditions:
(1) $\forall x \in S \hspace{0.5cm} x \circ x = x$,
(2) $\forall x,y,z \in S \hspace{0.5cm} (x \circ y) \circ z = (y \circ z) \circ x$
You need to prove that:
$y \circ (x \circ y) = (y \circ x) \circ y$
My friend showed me such proof, but I'm not sure if it's right. (even if it's right, I don't understand why)
$(y \circ y) \circ (x \circ y) = [(x \circ y) \circ y] \circ y = [(y \circ y) \circ x] \circ y = (y \circ x) \circ y$
Can you please explain me, why this "works"? Especially, I want to know, where from come out this part: $(y \circ y) \circ (x \circ y) = [(x \circ y) \circ y] \circ y$
It looks like 2 nd condition of given operation, but I'm not sure.
Also, I'm trying to prove associative property, but I completely have no idea where to start. Can you guve me a hint (I don't want straight answer)?
In general - can you give me some links and/or list books/articles which can be helpful and interesting about operations theory? I would be glad if I can use some kind of problem set with a few solved examples.
Thanks for help
PS: I hope you can understand me.