Strange results from assume (maybe a bug?) ad asksign



Is there somebody who tried this? Nobody has problems with assume and 
fractions of %pi or %e :-(?


Stefano Ferri ha scritto:
> Sorry, in my previous email I was wrong about something, please do not
> consider "asksign" from now, the problem is "assume" . Anyway I'm
> confused... but I think I found a bug. Let's try this:
>
> 1- with numerical values:
>
> (%i1) assume(a>1,a<2);
> (%o1)                           [a > 1, a < 2]
> (%i2) is(a<0);
> (%o2)                                false
> (%i3) is(a>2);
> (%o3)                                false
> (%i4) is(a>1);
> (%o4)                                true
>
> that's ok. In my previous email I thinked %o4 should result in an
> "unknown" but I was wrong.
> But let's see what happens with special numerical values like %pi:
>
> (%i1) assume(b>0,b<%pi);
> (%o1)                          [b > 0, b < %pi]
> (%i2) is(b<0);
> (%o2)                                false
> (%i3) is(b<%pi);
> (%o3)                                true
> (%i4) is(b>%pi);
> (%o4)                                false
> (%i5) is(b>2*%pi);
> (%o5)                                false
>
> That's ok. But attention to the last output, with is(b>2*%pi). Now
> comes the problem!!
> Try this:
>
> (%i6) assume(c>0,c<%pi/2);
>                                            %pi
> (%o6)                          [c > 0, --- > c]
>                                               2
> (%i7) is(c>0);
> (%o7)                                true
> (%i8) is(c<%pi/2);
> (%o8)                                true
> (%i9) is(c>%pi);
> (%o9)                               unknown
> (%i10) is(c>2*%pi);
> (%o10)                              unknown
>
> I think that defining a bounded variable with numbers is ok, also with
> %pi, but not with fractions of %pi, nor with fractions of %e !!! It
> seems that Maxima, when in the assume condition there is a fraction of
> a special constant, redefines that constant in function of the
> variable that I try to bound with assume. It is evident also by the
> output:
>
> (%i1) assume(b>0,b<%pi);
> (%o1)                          [b > 0, b < %pi]
>
> (%i6) assume(c>0,c<%pi/2);
>                                            %pi
> (%o6)                          [c > 0, --- > c]
>                                               2
> In %o6 is %pi/2 that was redefined to be > c, in %1 is b that is
> function of %pi. It seems like the roles was turned upside-down...
>
> Is this a bug?
> Or there is a way, like an option variable, to avoid this? Or what is
> the correct way to bound a variable within two limits? I need this...
> Thanks, Stefano
>