Ask Your Question

solve equation with two variables over RR

asked 2019-06-14 16:48:56 +0200

Pierre Macherl gravatar image

updated 2019-06-16 11:16:49 +0200

rburing gravatar image


I have a problem with the following code (minimal example) in SageMath 8.7 notebook:

x, y = var('x,y', domain=RR)
solve(x == 0, x, y)

when executed, I get the following error:

    /opt/sagemath-8.7/local/lib/python2.7/site-packages/sage/symbolic/relation.pyc in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1357     if to_check:
   1358         for ix, soln in reversed(list(enumerate(X))):
-> 1359             if soln.lhs().is_symbol():
   1360                 if any(a.contradicts(soln) for a in to_check):
   1361                     del X[ix]

AttributeError: 'list' object has no attribute 'lhs'


x, y = var('x,y')
solve(x == 0, x, y)


x, y = var('x,y', domain=RR)
solve(x == 0, x)

work as expected.

I am sorry if that question a already been posted, I don't know which keyword to use.

edit retag flag offensive close merge delete


A bug, IMHO...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-06-16 09:45:04 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-16 11:16:32 +0200

rburing gravatar image

This is a bug; I reported it as trac ticket #27998.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-06-14 16:48:56 +0200

Seen: 220 times

Last updated: Jun 16 '19