Ask Your Question

a problem with variables in real domains

asked 2017-06-02 19:12:44 +0100

daniele gravatar image

updated 2023-01-10 00:01:11 +0100

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-03 00:55:52 +0100 )edit

reported on trac #23135

mforets gravatar imagemforets ( 2017-06-03 22:40:26 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-06 13:50:54 +0100

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 16:02:30 +0100 )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 19:12:44 +0100

Seen: 509 times

Last updated: Sep 06 '17