On Sun, 23 Sep 2007 20:18:06 -0500
Barton Willis <willisb at unk.edu> wrote:
> The function polyp might be all that you need (but I haven't looked
> at the source)
>
> (%i10) ?polyp(rat(q,x));
> (%o10) false
>
> (%i11) ?polyp(x);
> (%o11) true
>
> Convert CRE to general form before applying ?polyp
>
> (%i12) ?polyp(?ratdisrep(rat(q,x)));
> (%o12) true
>
> BW
>
>
I think it is all that I need. This change makes polyp do the ratdisrep
if needed:
(defun polyp (a)
(cond ((atom a) t)
((member (caar a) '(mplus mtimes) :test #'eq)
(every #'polyp (cdr a)))
((eq (caar a) 'mexpt)
(cond ((free (cadr a) var)
(free (caddr a) var))
(t (and (integerp (caddr a))
(> (caddr a) 0)
(polyp (cadr a))))))
(t (andmapcar
#'(lambda (subexp) (free subexp var))
(cdr (if (eq (caar a) 'mrat) ($ratdisrep a) a))))))
(The only change is in the last line)
I'm sorry that I've been flailing around so publicly :P If it's getting
annoying please email me and tell me to shut up! :)
I agree with the general (?) sentiment that limit needs an overhaul
rather than patching up and I've been working through Gruntz's thesis,
which RJF recommended. I'm appreciating the algebra courses I took last
year - the equivalence classes get steadily more mind-boggling as you
get further in!
Unless it's already been done, I'd be really interested in trying to
work on an implementation of the routines in the paper - it's high time
Maxima had it :P So what I thought was:
1) I could try and write it bit by bit starting with finding MRVs for
the expressions and then working on the next problem.
2) I should aim for the code to be in working shape to sit in contrib
somewhere for a while.
3) But should try to copy the API of limit.lisp exactly so that
eventually this might become a replacement.
Are there other papers which extend/refine/optimize this method?
Clearly limit.lisp can do more than just explog functions, which is all
the thesis appears to address (but I'm only ~75 pages in, so might not
have found stuff yet!)
Any other comments?
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20070925/27845087/attachment.pgp