Ask Your Question

a problem with variables in real domains

asked 2017-06-02 12:12:44 -0500

daniele gravatar image

updated 2017-09-06 09:02:09 -0500

tmonteil gravatar image


I have a problem with setting the domains of definition of variables.

For example, typing

var("y") ; assume(y, "real")
conjugate(y + I)

I get the result y + I. The same with var("y", domain="real").

Where I'm wrong?


edit retag flag offensive close merge delete


I am afraid you are not wrong. If we set z = y + I then conjugate(z.subs(y=5)) gives the result -I + 5 in contradiction to conjugate(z).subs(y=5) which results to I + 5

ndomes gravatar imagendomes ( 2017-06-02 17:55:52 -0500 )edit

reported on trac #23135

mforets gravatar imagemforets ( 2017-06-03 15:40:26 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-06 06:50:54 -0500

mforets gravatar image

FYI: this has been fixed in the development branch (to appear in the next v8.1),

$ ./sage
sage: version()
'SageMath version 8.1.beta4, Release Date: 2017-09-05'
sage: x.is_real()
sage: conjugate(x+45*I)
conjugate(x) - 45*I
sage: assume(x, 'real')
sage: assumptions()
[x is real]
sage: conjugate(x+45*I)
x - 45*I
edit flag offensive delete link more


Great, fixed_bug tag added.

tmonteil gravatar imagetmonteil ( 2017-09-06 09:02:30 -0500 )edit

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: 2017-06-02 12:12:44 -0500

Seen: 122 times

Last updated: Sep 06