pw.mac



(%i1) simp_given(signum(a),a>0,a<0);
(out1)                                                1
(%i2) facts();
(out2)  [kind(sinh, one_to_one), kind(log, one_to_one), kind(tanh, 
one_to_one), kind(log, increasing)]

Yes, if the assumptions are inconsistent who knows what you?re going to get 
and Maxima has a weak assume system anyway.  If the assumptions are 
redundant then I don?t know if it breaks the code.  Can you give an example. 
Seems okay to me.

Rich

From: Stavros Macrakis
Sent: Friday, June 01, 2012 7:04 PM
To: Richard Hennessy ; Barton Willis
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] pw.mac

Richard,


I don't know about other issues, but your simp_given won't work right if 
some of the assumptions are redundant.  You should use the context 
mechanism, as Barton now is (see mail below).


I've also encouraged him to rewrite his simp_assuming and with_assumptions 
functions using contexts.


              -s


---------- Forwarded message ----------
From: Barton Willis <willisb at unk.edu>
Date: Wed, May 16, 2012 at 1:57 PM
Subject: context based version of abs_integrate--no more 
simp_assuming
To: "maxima at math.utexas.edu" <maxima at math.utexas.edu>


I committed a new version of abs_integrate that uses contexts instead of the 
buggy simp_assuming macro.  The new code doesn't have a general purpose
with_assumptions function (or macro) replacement for simp_assuming.

The new version also fixes some other bugs (rtest_abs_integrate bugs 148 and 
149).

--bw

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima


On Fri, Jun 1, 2012 at 6:13 PM, Richard Hennessy <rich.hennessy at verizon.net> 
wrote:

"I don't know what your simp_given function looks like, but

(%i27) ctsp(expr,x,c) := limit(expr, x, c, plus) - limit(expr, x, c, minus);
(%o27) ctsp(expr, x, c) := limit(expr, x, c, plus) - limit(expr, x, c, 
minus)
(%i28) ctsp(x^2*signum(x-4), x, c);
                     2                          2
(%o28)        limit   x  signum(x - 4) - limit   x  signum(x - 4)
            x -> c+                    x -> c-

However, of course:

(%i29) ctsp(u^2*signum(u-4), x, c);
(%o29)                                 0

Could you have a problem with what the dummy variable is or something?"

I forgot to say kill(all).  pw.mac was loaded, it changes the answer for 
some reason.  If I start with kill(all) then I get what you get. I don't 
know why, maybe because of diff and integrate being modified by pw.mac or 
abs_integrate.mac.  Does limit ever call integrate or diff?  Either way this 
method does not work.

Rich

PS
simp_given(e, [fcts]) ::=  buildq([e,fcts], block([_ans], 
unwind_protect((_ans:apply(assume, fcts), expand(e,0,0)), 
apply(forget,_ans))));



_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima