# assume() seems not to work for a specific case...

Hi, experts

I tried the following commands:

var('a, b, c')
assume(a>0, b>0, c>0)
solve([a*(b+c)==0, b*(c-a)==0, c*(a+b)==0], a,b,c)


expecting sage to return only (a,b,c) = (k, -k, k).

However, sage returned
(a,b,c) = (k, 0, 0), (0, k, 0), (0, 0, k), (k, -k, k).
though I typed 'assume(a>0, b>0, c>0)'.

Is there any way to invalidate the first 3 answers ?

edit retag close merge delete

Sort by » oldest newest most voted

Not really. The assumption and solve frameworks are both just using Maxima, and Maxima is pretty clear (though hard to find) about the fact that they do not use assumptions in their solving.

I think the idea is that Maxima's solve considers all variables as dummy variables (the same thing happens with their integration, I think), in which case it doesn't matter if they happen to have the same name as the assumed variables. This is a design decision, but one we don't have control over.

We did implement a basic version of this, but as it says in the documentation, "There is still room for improvement." Multivariate examples like yours are one example of this. If you have some specific ideas for improving that code, let us know and we can open a ticket for it.

more