Ask Your Question
1

solve equation with two variables over RR

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

Pierre Macherl gravatar image

updated 2023-01-09 23:59:51 +0100

tmonteil gravatar image

Hi,

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'

both

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

and

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

Comments

A bug, IMHO...

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

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Stats

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

Seen: 706 times

Last updated: Jun 16 '19