taylor / simpsum bug



I started to track down the taylor / simpsum bug I found recently

http://sourceforge.net/tracker/index.php?func=detail&aid=649428&group_id=4933&a$

But unfortunately I'm stuck at the moment. This is what I did:

trace(taylor,?taylor\*,?taylor1,?taylor2,?taylor3,?taylor_simplify_recurse,?cdi$
trace_options(?simpsum,lisp_print);
trace_options(?taylor\*,lisp_print);
trace_options(?taylor1,lisp_print);
trace_options(?taylor2,lisp_print);
trace_options(?taylor3,lisp_print);
trace_options(?newsym,lisp_print);
trace_options(?taylor_simplify_recurse,lisp_print);
trace_options(?cdisrep,lisp_print);
trace_options(?pdisrep,lisp_print);
trace_options(?pdisrep2,lisp_print);

taylor(sum(M^K*sum(L^K,L,1,D),K,1,INF),M,0,2),simpsum;

1. Could somebody try it with the unpatched rc3
  ( I patched sum in combin.lisp to avoid another simpsum bug )

2. Could somebody (Stavros?) consider the following partial trace
(although it's awkward, I decided to send it)

   (1 ENTER TAYLOR_SIMPLIFY_RECURSE
     ((PS (#:M21794 . 2) ((2 . 1)) ((1 . 1) (#:D21795 2 1 1 1) . 2)
          ((2 . 1) (#:D21795 3 2 2 3 1 1) . 6)))) 
     (2 ENTER TAYLOR_SIMPLIFY_RECURSE (((#:D21795 2 1 1 1) . 2))) 
      (1 ENTER CDISREP (((#:D21795 2 1 1 1) . 2))) 
       (1 ENTER PDISREP ((#:D21795 2 1 1 1))) 
        (1 ENTER PDISREP2 ((2 1 1 1) $L)) 
         (2 ENTER PDISREP (1)) 
         (2 EXIT PDISREP 1) 
         (2 ENTER PDISREP (1)) 
         (2 EXIT PDISREP 1) 
        (1 EXIT PDISREP2 (((MEXPT RATSIMP) $L 2) $L)) 
       (1 EXIT PDISREP ((MPLUS RATSIMP) ((MEXPT RATSIMP) $L 2) $L)) 
       (1 ENTER PDISREP (2)) 
       (1 EXIT PDISREP 2) 
      (1 EXIT CDISREP
       ((MTIMES RATSIMP) ((RAT) 1 2)
        ((MPLUS RATSIMP) ((MEXPT RATSIMP) $L 2) $L))) 
      (1 ENTER TAYLOR2
       (((MTIMES SIMP) ((RAT SIMP) 1 2)
         ((MPLUS SIMP) $L ((MEXPT SIMP RATSIMP) $L 2))))) 
       (1 ENTER NEWSYM ($L)) 
       (1 EXIT NEWSYM ((#:L21797 1 1) . 1)) 
      (1 EXIT TAYLOR2 ((#:L21797 2 1 1 1) . 2)) 
     (2 EXIT TAYLOR_SIMPLIFY_RECURSE ((#:L21797 2 1 1 1) . 2)) 

It seems that when TAYLOR_SIMPLIFY_RECURSE calls (rcdisrep ps)
the meaning of #:D21795 is somehow changed, it should be $D but it is 
$L...

Interestingly, some hundred lines before, after the invokation of taylor
itself

      (1 ENTER CDISREP (((#:D21795 1 1 0 -1) . 1))) 
       (1 ENTER PDISREP ((#:D21795 1 1 0 -1))) 
        (1 ENTER PDISREP2 ((1 1 0 -1) $D)) 
         (2 ENTER PDISREP (1)) 
         (2 EXIT PDISREP 1) 
         (2 ENTER PDISREP (-1)) 
         (2 EXIT PDISREP -1) 
        (1 EXIT PDISREP2 ($D -1)) 
       (1 EXIT PDISREP ((MPLUS RATSIMP) $D -1)) 
      (1 EXIT CDISREP ((MPLUS RATSIMP) $D -1)) 

but inbetween 

      (1 ENTER CDISREP (((#:D21795 2 1) . 1))) 
       (1 ENTER PDISREP ((#:D21795 2 1))) 
        (1 ENTER PDISREP2 ((2 1) $L)) 
         (2 ENTER PDISREP (1)) 
         (2 EXIT PDISREP 1) 
        (1 EXIT PDISREP2 (((MEXPT RATSIMP) $L 2)))

well, I think one has to look at the complete trace...

Martin