This Message Is From an External SenderThis message came from outside your organization.On 2026-02-23 16:43:58, 'Trevor Karn' via sage-devel wrote: > Hi all, > > I attempted to solve a system of equations today. I am wondering if > this is a bug. When I run the following code from SageCell I get > complex solutions despite explicitly assuming x,y,k are real and > specifying the domain to be 'real': Sadly, "assumptions don't work" is a long-standing meta bug. The assume() function makes assumptions primarily through maxima, but not even maxima uses them consistently. Sympy has its own assumptions, but sage's assume() does not use them. The solve() function is not doing anything special to handle them... if algorithm == 'sympy': from sympy import solve as ssolve sympy_f = [s._sympy_() for s in f] sympy_vars = tuple([v._sympy_() for v in x]) ret = ssolve(sympy_f, sympy_vars, dict=True) so they are not taken into consideration. The "domain" parameter to solve is also ignored because you have more than one equation. (That much is vaguely documented, but sucks as a UI.) -- 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://urldefense.com/v3/__https://groups.google.com/d/topic/sage-devel/AeQ3qE75QaY/unsubscribe__;!!KwNVnqRv!GyP6gME9swpw3AXr-yaHS5333Ff5gO-nd3BRv-zINKTbwcgm-nl784EjmclQw-2_FrbgLhueUM6HlRhJdg$. To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com. To view this discussion visit https://urldefense.com/v3/__https://groups.google.com/d/msgid/sage-devel/aZ0ChPN55KfceMC_*40mertle__;JQ!!KwNVnqRv!GyP6gME9swpw3AXr-yaHS5333Ff5gO-nd3BRv-zINKTbwcgm-nl784EjmclQw-2_FrbgLhueUM5bZ0aQIg$.
This Message Is From an External SenderThis message came from outside your organization.
--
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/AeQ3qE75QaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/F9ABC7B0-8A45-4816-8230-C80622F80ECA%40gmail.com.
This Message Is From an External SenderThis message came from outside your organization.
On 2026-02-24 06:44:07, 'Trevor Karn' via sage-devel wrote: > I agree in principle, but this is an example I am trying to use for my > multi variable calculus class and I was trying to avoid using Groebner > bases. If it's just for an example, you can do it in sympy directly: >>> from sympy import Symbol, solve >>> x = Symbol('x', real=True) >>> y = Symbol('y', real=True) >>> k = Symbol('k', real=True) >>> eqns = [4*x - k*4*x**3, ... 12*y - k*12*y**3, ... x**4 + 3*y**4 - 1] >>> solve(eqns, (x,y,k)) [(-1, 0, 1), (1, 0, 1), (-sqrt(2)/2, -sqrt(2)/2, 2), (-sqrt(2)/2, sqrt(2)/2, 2), (sqrt(2)/2, -sqrt(2)/2, 2), (sqrt(2)/2, sqrt(2)/2, 2), (0, -3**(3/4)/3, sqrt(3)), (0, 3**(3/4)/3, sqrt(3))] A faithful mapping between the various assumption frameworks is a huge task, but it might be comparatively easy to fix this in sage for a few easy assumptions like "integer" and "real". Calling x.assume() for example could check for a sympy of the same name and then replace it with a new one having real=True or integer=True. -- 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://urldefense.com/v3/__https://groups.google.com/d/topic/sage-devel/AeQ3qE75QaY/unsubscribe__;!!KwNVnqRv!EWjDGKhEuAni1zZKTZ2TuJeoPVcrTBQBxDQvV4dmqMsbT0W6b9gIOsshGgYcpduyyNGQUSyQhLiypRxWBg$. To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com. To view this discussion visit https://urldefense.com/v3/__https://groups.google.com/d/msgid/sage-devel/aZ2nPDDUaoCrNsDX*40mertle__;JQ!!KwNVnqRv!EWjDGKhEuAni1zZKTZ2TuJeoPVcrTBQBxDQvV4dmqMsbT0W6b9gIOsshGgYcpduyyNGQUSyQhLiusBykiA$.