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?

  • 2
    $\begingroup$ You can Simplify all the equations and then use DeleteDuplicates like this: Simplify /@ {x^2 + y^2 == 1, -x^2 - y^2 == -1} // DeleteDuplicates $\endgroup$ Commented May 18, 2017 at 3:32
  • $\begingroup$ 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 $\endgroup$ Commented May 18, 2017 at 3:40
  • $\begingroup$ Did the above code work for those equations? $\endgroup$ Commented May 18, 2017 at 3:51
  • $\begingroup$ 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? $\endgroup$ Commented May 18, 2017 at 3:55
  • 2
    $\begingroup$ It seems that Eliminate[eqns, {}] would do the trick? Could you give more examples or explain more about the real equations? $\endgroup$
    – rhermans
    Commented May 18, 2017 at 10:11

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.