Ask Your Question
1

What does assume(x, "real")?

asked 2015-02-22 04:39:36 -0500

B r u n o gravatar image

I do not understand what permits the construction assume(x, "real"). For instance,

sage: assume(x, "real")
sage: bool(x*x>0)
False

I would expect the answer to be True.

Note that Maxima always answers True for the same inequality:

sage: forget()
sage: bool(maxima(x*x>0))
True

I am not sure this is a better behaviour though.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-22 05:16:01 -0500

Thorsten gravatar image

updated 2015-02-22 05:17:51 -0500

It is a good thing, that bool(x^2>0) evaluates to false. Just plug in the real value 0.

However in version 6.4 of sage

 sage:  assume(x,'real')
 sage:  bool(x*x>=0)

evaluates to true.

edit flag offensive delete link more

Comments

Of course, sorry for the noise! Thanks!

B r u n o gravatar imageB r u n o ( 2015-02-22 05:48:19 -0500 )edit

Just another comment: Actually, not assuming x to be "real" yields the same result, so we have the following:

sage: e = x*x >= 0
sage: bool(e)
True
sage: bool(e.subs(x=I))
False

Are there default assumptions for inequalities?

B r u n o gravatar imageB r u n o ( 2015-02-23 02:29:25 -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

Stats

Asked: 2015-02-22 04:39:36 -0500

Seen: 177 times

Last updated: Feb 22 '15