Remove the redundant equations from a list of equations

I have a list of polynomial equations that represent constraints on a system, but they are not independent and are therefore some are redundant.

my real list is very long. A simple example would be

eqns = {x^2+y^2 == 1, -x^2-y^2 == -1}


I'm not trying to (nor could I) solve the system of equations. I'd just like to have a list that contains only independent constraints. Is there a way to achieve this?

• You can Simplify all the equations and then use DeleteDuplicates like this: Simplify /@ {x^2 + y^2 == 1, -x^2 - y^2 == -1} // DeleteDuplicates Commented May 18, 2017 at 3:32
• Simplify is leaving the equations in a non-identical format (eg out by an overall minus sign) so DeleteDuplicates does not recognise them as being duplicates Commented May 18, 2017 at 3:40
• Did the above code work for those equations? Commented May 18, 2017 at 3:51
• it does seem to work when I incorporate my eqtns in code you specify but not when I simplify them independently then perform DeleteDuplicates after. Does your simplify code somehow enforce a more uniform result from Simplify? Commented May 18, 2017 at 3:55
• It seems that Eliminate[eqns, {}] would do the trick? Could you give more examples or explain more about the real equations? Commented May 18, 2017 at 10:11

I think this question deserves a formal answer.

Let;s work a slightly more complicated example.

eqns = {x^2 + y^2 == 1, -x^2 - y^2 + 1 == 0, 5 x - 1 == y, y == 5 x - 1};
eqns // Simplify // DeleteDuplicates


{x^2 + y^2 == 1, 5 x == 1 + y}

The idea is to regularize the equations and delete the duplicates.