sympy/sympy — pull request #1401 by jrioux (2012-07-03 08:17:28+00:00)
Title: And(), Or(), etc. should be hash independent.

Don't use a set() for LatticeOp()'s args as the order comes
out hash dependent. Instead, use a tuple, don't sort the args,
but still remove duplicates.

We need to override __eq__ so that And(x, y) == And(y, x)
remains satisfied.