Opened 8 years ago

Last modified 6 years ago

#14229 needs_work enhancement

Remove vacuous solutions from solve — at Version 2

Reported by: ppurka Owned by: burcin
Priority: major Milestone: sage-6.4
Component: symbolics Keywords:
Cc: kcrisman, jondo Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by ppurka)

Sometimes solve and its variants tend to report vacuous solutions. A recent one from ask.sagemath is the following:

sage: x,y = var('x,y')
sage: solve([x^2*y^2 <= x^2*y, x^2*y^2 > x^2*y],[x,y])
[[x == 0, 1 < y, 0 != 0], [x == 0, y < 0, 0 != 0]]

Shouldn't we remove these meaningless solutions? The attached patch contains a potential solution. If it seems reasonable, then similar changes could be introduced in solve_ineq.

The output of the above command after this patch is as expected:

sage: x,y = var('x,y')
sage: solve([x^2*y^2 <= x^2*y, x^2*y^2 > x^2*y],[x,y])
[]

Change History (3)

Changed 8 years ago by ppurka

Apply to devel/sage

comment:1 Changed 8 years ago by ppurka

  • Description modified (diff)

comment:2 Changed 8 years ago by ppurka

  • Description modified (diff)
Note: See TracTickets for help on using tickets.