Subject: how to load(sign-shift.lisp) in wxmaxima 0.8.0
From: Dieter Kaiser
Date: Mon, 12 Oct 2009 00:02:16 +0200
Am Sonntag, den 11.10.2009, 21:32 +0100 schrieb Leo Butler:
>
> On Sun, 11 Oct 2009, Dieter Kaiser wrote:
>
> < Am Sonntag, den 11.10.2009, 12:43 +0800 schrieb ? ??:
> < > how to load(sign-shift.lisp) in wxmaxima 0.8.0
> < >
> < > I read form Maxima Digest, Vol 39, Issue 33 and try to
> < > load(sign-shift.lisp)
> < > (%i4) load(sign-shift.lisp)
> < > Could not find `sign-shift.lisp' using paths in
> < > file_search_maxima,file_search_lisp.
> < > -- an error. To debug this try debugmode(true);
> <
> < Thank you very much for your interest.
> <
> < The code is under development. You cannot download it. You can try to
> < cut it out of the postings. But I think you might have some problems to
> < get it to work.
> <
> < First I have thought that I have found a simple way to improve the
> < functionality of assume in general. The code as it is, works with the
> < testsuite and the share_testsuite.
> <
> < But there is a big problem. The code improves cases like assume(a>1,b>1)
> < and gets the correct sign for sign(a+b-2). It works for much more
> < complicated expressions too, but not as general as I thought. We do not
> < have very general examples in the testsuite, because we do not assume
> < that this more general cases will work.
> <
>
> Dieter, I would like to have this functionality. At the moment, I am
> frustrated because with
>
> assume(n>0,i>0,j>0,n>=i,n>=j);
>
> maxima cannot determine that
>
> is(equal(n+i-j,0));
>
> is false. Is your code able to do this?
Hello Leo,
thank you very much for your example.
I do not see that (n+i-j) is equal to zero, but the expression should be
positive. The code of sign-shift as it is, does not get the correct
sign. It only is designed to work with numbers as a bound. But with a
little extra work I have got the following:
(%i1) load("sign-shift.lisp");
(%o1) "sign-shift.lisp"
(%i2) assume(n>0,i>0,j>0,n>i,n>j);
(%o2) [n > 0,i > 0,j > 0,n > i,n > j]
(%i3) sign(n+j-i);
(%o3) pos
(%i4) sign(n-i+j);
(%o4) pos
So I think your example is nice to see what we could achieve.
But my first and quick extension has some problems and will work not
generally. More work is needed to get this functionality more complete.
Dieter Kaiser