Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

What does assume(x, "real")?

asked 10 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 10 years ago

Thorsten gravatar image

updated 10 years ago

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.

Preview: (hide)
link

Comments

Of course, sorry for the noise! Thanks!

B r u n o gravatar imageB r u n o ( 10 years ago )

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 ( 10 years ago )

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: 10 years ago

Seen: 1,723 times

Last updated: Feb 22 '15