Ask Your Question
1

Assumptions

asked 2012-11-14 11:59:18 +0100

petres gravatar image

updated 2014-03-30 16:12:07 +0100

tmonteil gravatar image
var("a b")
assume(b > 0, b < 1, a > 0, a < 1)
bool(a*b < 1)

returns false, why?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-11-14 12:48:03 +0100

kcrisman gravatar image

In Maxima (which handles our assumptions):

(%i1) assume(b>0);
(%o1)                               [b > 0]
(%i2) assume(b<1);
(%o2)                               [b < 1]
(%i3) assume(a>0);
(%o3)                               [a > 0]
(%i4) assume(a<1);
(%o4)                               [a < 1]
(%i5) is (a*b > 0);
(%o5)                                true
(%i6) is (a*b < 1);
(%o6)                               unknown

And Sage returns false for booleans if it doesn't know for sure that it's true.

I'm not sure whether they would consider this a bug; their assumptions framework is self-described as "weak", though of course it's better than having no assumptions at all!

edit flag offensive delete link more

Comments

bool(a*a < 1) works, its kind of strange.

petres gravatar imagepetres ( 2012-11-14 20:28:29 +0100 )edit

I got same when preparing materials for highschool students. Shouldn't bool in such case return a warning in addition to False? Current way of assuming False for Unknown makes things that are unknown impossible to distinguish from things that are truly false (and this can instead lead to confusion for younger users)

giniu gravatar imageginiu ( 2012-11-23 02:12:18 +0100 )edit

@giniu: This is true, but then we would need to be adding this warning for `bool` nearly all the time. There isn't any perfect pedagogical solution to this kind of issue, unfortunately.

kcrisman gravatar imagekcrisman ( 2012-11-23 10:43:28 +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

Stats

Asked: 2012-11-14 11:59:18 +0100

Seen: 388 times

Last updated: Nov 14 '12