Hacker News new | ask | show | jobs
by hsfzxjy 345 days ago
To derive "The XOR trick" I think both *associativity* and communitativity are needed.

That is, one should also prove a ^ (b ^ c) = (a ^ b) ^ c. Instinctive, but non-trivial.

1 comments

Yeah that's what I was thinking, you need both
yep, you need both; and in fact the definition includes both: https://en.wikipedia.org/wiki/Abelian_group