sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.34k stars 453 forks source link

solve does not obey assumptions for inequalities #25972

Open 1ce53b31-a754-4a66-9026-59ecdd1d3aa5 opened 6 years ago

1ce53b31-a754-4a66-9026-59ecdd1d3aa5 commented 6 years ago

Currently, assumptions are not always taken into account by solve.

sage: assume(x > 0)

# incorrectly gives [x < -1]
sage: solve(x^2 > 1, x)
[[x < -1], [x > 1]]

# correctly restricts
sage: solve(x^2 == 1, x)
[x == 1]

CC: @rwst @slel

Component: algebra

Keywords: inequality, solve

Issue created by migration from https://trac.sagemath.org/ticket/25972

slel commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,4 @@
+Currently, assumptions are not always taken into account by `solve`.

sage: assume(x > 0)

d79a388d-9c26-416c-9e1d-9c03aa89d189 commented 4 years ago
comment:2

This seems to be a issue, because the aformentioned example is trivial but for more complicated examples, it leads to a serious deviation in results. My best guess is solve doesn't coherently involve the condition before it, solve simply proceeds as per as the equation given

mkoeppe commented 3 years ago
comment:6

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.