bool gives another unexpected result

i like this post (click again to cancel)
1
i dont like this post (click again to cancel)

Here is the output

sage: var('c,u,v',domain=RR);assume(v>0,u>0,c>u,c>v);
(c, u, v)
sage: assumptions()
[v > 0, u > 0, c > u, c > v]
sage: bool(c^2 - u*v >= 0)
False
sage: bool(c^2 - u^2 >= 0)
True
sage: bool(c^2 - v^2 >= 0)
True

I don't see how c^2 - v*u can not be larger than or equal to zero. Why does this happen? Is there a workaround?

asked Jun 20 '11

omoplata gravatar image omoplata
143 2 4 9

updated Jun 03 '13

tmonteil gravatar image tmonteil
4158 5 41 93
http://wiki.sagemath.org/...
i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel) omoplata has selected this answer as correct
sage: bool(c^2 - u*v >= 0)
False

"False" here means "not known to be true" -- it seems that bool just can't make the following observation:

c^2 > c*v > u*v

Although if you test each inequality separately, it will recognize them as True. More powerful symbolic manipulation is available through Maxima; see for example the parts of the reference manual having to do with Symbolic Calculus.

Unfortunately you might have to work harder for this -- I tried test_relation_maxima and got the same unsatisfactory results as with bool. You could try looking through the Maxima reference manual to see if there is something more useful there. You can use Maxima directly through Sage with maxima_console():

sage: maxima_console()
;;; Loading #P"/Applications/sage/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/Applications/sage/local/lib/ecl/sockets.fas"
;;; Loading #P"/Applications/sage/local/lib/ecl/defsystem.fas"
;;; Loading #P"/Applications/sage/local/lib/ecl/cmp.fas"
Maxima 5.23.2 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) factor(10!);
                                   8  4  2
(%o1)                             2  3  5  7
(%i2)
link

posted Jun 21 '11

niles gravatar image niles
3725 7 45 104
http://nilesjohnson.net/
The symbolic ring will automatically fall back to maxima if pynac alone can't figure out if a relation is true. Volker Braun (Jun 21 '11)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
Login/Signup to Post

Question tools

Tags:

Stats:

Asked: Jun 20 '11

Seen: 57 times

Last updated: Jun 21 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.