solve() yields an expression rather than an equation/inequality

104 views
Skip to first unread message

Evan O'Dorney

unread,
Mar 24, 2020, 10:56:11 AM3/24/20
to sage-devel
Solving the following simple system of linear inequalities:

var('x y')
solve
([x > 0, x <= 2*y, x <= 2 - 2*y],x)

I get an output where one of the entries of the list is not an equation or inequality, as it should be:

[[0 < x, x < min(2*y, -2*y + 2), 2*y > 0, -2*y + 2 > 0], [x == -2*y + 2, -2*y + 2 > 0, 4*y - 2 > 0], [x == 2*y, 2*y > 0, 2*y - 1], [x == 2*y, -4*y + 2 > 0, 2*y > 0]]

Running Sage 8.8 on 64-bit Linux Mint.

Markus Wageringel

unread,
Mar 29, 2020, 5:36:04 PM3/29/20
to sage-devel
Thank you for the report. This seems to be a problem in Maxima itself:

sage -maxima
(%i1) load(to_poly_solve)$
(%i2) to_poly_solve([x > 0, x <= 2*y, x <= 2 - 2*y], x);
(%o2) %union([0 < x, x < min(2 y, 2 - 2 y), 2 y > 0, - 2 (y - 1) > 0],
[x = 2 - 2 y, - 2 (y - 1) > 0, 2 (2 y - 1) > 0], [x = 2 y, 2 y > 0, 2 y - 1],
[x = 2 y, - 2 (2 y - 1) > 0, 2 y > 0])

Evan O'Dorney

unread,
Mar 31, 2020, 9:13:20 AM3/31/20
to sage-devel
Thank you, Markus. So shall I submit it as a bug on https://sourceforge.net/p/maxima/bugs/? I searched for it, and it appears to be new.

Thanks,
Evan


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/uSKLDDC77ZM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e7f6205b-8ff8-4536-a756-1e62f71f3b25%40googlegroups.com.

Markus Wageringel

unread,
Mar 31, 2020, 2:04:05 PM3/31/20
to sage-...@googlegroups.com
Yes, if you could do that, that would be nice. Thank you. I am not really familiar with Maxima myself.


Evan O'Dorney

unread,
Apr 7, 2020, 3:02:14 PM4/7/20
to sage-devel
Done! Thanks for your help!

Evan

Samuel Lelievre

unread,
Apr 8, 2020, 1:21:39 PM4/8/20
to sage-devel
For reference, the ticket on the Maxima side is at:

Reply all
Reply to author
Forward
0 new messages