
(/VERSIONCHECK 2) 

(DEFUN |DFINTTLS;variation| (|p| |a| $)
  (|DFINTTLS;var|
   (SPADCALL |p|
             (SPADCALL (SPADCALL (|spadConstant| $ 9) 1 (QREFELT $ 12))
                       (SPADCALL |a| (QREFELT $ 13)) (QREFELT $ 14))
             (QREFELT $ 15))
   $)) 

(DEFUN |DFINTTLS;keeprec?| (|a| |rec| $)
  (COND ((SPADCALL (QCDR |rec|) |a| (QREFELT $ 18)) 'T)
        ('T (SPADCALL |a| (QCAR |rec|) (QREFELT $ 18))))) 

(DEFUN |DFINTTLS;checkHalfAx| (|p| |a| |d| |incl?| $)
  (|DFINTTLS;posRoot|
   (SPADCALL |p|
             (SPADCALL |d|
                       (SPADCALL
                        (SPADCALL (|spadConstant| $ 9) 1 (QREFELT $ 12))
                        (SPADCALL |a| (QREFELT $ 13)) (QREFELT $ 14))
                       (QREFELT $ 20))
             (QREFELT $ 15))
   |incl?| $)) 

(DEFUN |DFINTTLS;ignore?;SB;4| (|str| $)
  (COND ((EQUAL |str| "noPole") 'T)
        ('T (|error| "integrate: last argument must be 'noPole'")))) 

(DEFUN |DFINTTLS;computeInt;KF2OcBU;5| (|k| |f| |a| |b| |eval?| $)
  (PROG (#1=#:G694 |ia| |ib|)
    (RETURN
     (SEQ
      (COND ((SPADCALL |f| '|integral| (QREFELT $ 24)) (CONS 1 "failed"))
            (#2='T
             (SEQ
              (EXIT
               (SEQ
                (COND
                 ((NULL |eval?|)
                  (LETT |f| (|DFINTTLS;mkLogPos| |f| $)
                        . #3=(|DFINTTLS;computeInt;KF2OcBU;5|))))
                (SEQ
                 (LETT |ib| (|DFINTTLS;findLimit| |f| |k| |b| "left" |eval?| $)
                       . #3#)
                 (EXIT
                  (COND
                   ((QEQCAR |ib| 1)
                    (PROGN (LETT #1# (CONS 1 #4="failed") . #3#) (GO #1#)))
                   (#2#
                    (SEQ
                     (LETT |ia|
                           (|DFINTTLS;findLimit| |f| |k| |a| "right" |eval?| $)
                           . #3#)
                     (EXIT
                      (COND
                       ((QEQCAR |ia| 1)
                        (PROGN (LETT #1# (CONS 1 #4#) . #3#) (GO #1#))))))))))
                (COND
                 ((SPADCALL (QCDR |ia|) (QREFELT $ 26))
                  (COND
                   ((SPADCALL (QCDR |ia|) (QCDR |ib|) (QREFELT $ 27))
                    (EXIT (CONS 1 "failed"))))))
                (EXIT
                 (CONS 0 (SPADCALL (QCDR |ib|) (QCDR |ia|) (QREFELT $ 28))))))
              #1# (EXIT #1#)))))))) 

(DEFUN |DFINTTLS;findLimit| (|f| |k| |a| |dir| |eval?| $)
  (PROG (|u| |r|)
    (RETURN
     (SEQ (LETT |r| (SPADCALL |a| (QREFELT $ 33)) . #1=(|DFINTTLS;findLimit|))
          (EXIT
           (COND
            ((QEQCAR |r| 0)
             (COND
              (|eval?|
               (CONS 0
                     (SPADCALL
                      (|DFINTTLS;mkLogPos|
                       (SPADCALL |f| |k| (QCDR |r|) (QREFELT $ 35)) $)
                      (QREFELT $ 36))))
              (#2='T
               (SEQ
                (LETT |u|
                      (SPADCALL |f|
                                (SPADCALL (SPADCALL |k| (QREFELT $ 37))
                                          (QCDR |r|) (QREFELT $ 39))
                                |dir| (QREFELT $ 41))
                      . #1#)
                (EXIT
                 (COND ((QEQCAR |u| 0) (CONS 0 (QCDR |u|)))
                       (#2# (CONS 1 "failed"))))))))
            (#2#
             (SEQ
              (LETT |u|
                    (SPADCALL |f|
                              (SPADCALL
                               (SPADCALL (SPADCALL |k| (QREFELT $ 37))
                                         (QREFELT $ 36))
                               |a| (QREFELT $ 43))
                              (QREFELT $ 46))
                    . #1#)
              (EXIT
               (COND ((QEQCAR |u| 0) (CONS 0 (QCDR |u|)))
                     (#2# (CONS 1 "failed")))))))))))) 

(DEFUN |DFINTTLS;mkLogPos| (|f| $)
  (PROG (|lv| |lk| |v| #1=#:G731 |k|)
    (RETURN
     (SEQ (LETT |lk| NIL . #2=(|DFINTTLS;mkLogPos|)) (LETT |lv| NIL . #2#)
          (SEQ (LETT |k| NIL . #2#)
               (LETT #1# (SPADCALL |f| (QREFELT $ 48)) . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |k| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (COND
                  ((SPADCALL |k| '|log| (QREFELT $ 49))
                   (SEQ (LETT |v| (|DFINTTLS;mkKerPos| |k| $) . #2#)
                        (EXIT
                         (COND
                          ((QEQCAR |v| 0)
                           (SEQ (LETT |lk| (CONS |k| |lk|) . #2#)
                                (EXIT
                                 (LETT |lv| (CONS (QCDR |v|) |lv|)
                                       . #2#)))))))))))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (SPADCALL |f| |lk| |lv| (QREFELT $ 51))))))) 

(DEFUN |DFINTTLS;mkKerPos| (|k| $)
  (PROG (|u| |f|)
    (RETURN
     (SEQ
      (LETT |u|
            (|DFINTTLS;negative|
             (LETT |f| (|SPADfirst| (SPADCALL |k| (QREFELT $ 53)))
                   . #1=(|DFINTTLS;mkKerPos|))
             $)
            . #1#)
      (EXIT
       (COND
        ((QEQCAR |u| 1)
         (CONS 0
               (SPADCALL
                (SPADCALL (SPADCALL |f| 2 (QREFELT $ 55)) (QREFELT $ 56))
                (SPADCALL 2 (QREFELT $ 57)) (QREFELT $ 58))))
        ((QCDR |u|)
         (CONS 0 (SPADCALL (SPADCALL |f| (QREFELT $ 59)) (QREFELT $ 56))))
        ('T (CONS 1 "positive")))))))) 

(DEFUN |DFINTTLS;negative| (|f| $)
  (PROG (|u|)
    (RETURN
     (SEQ (LETT |u| (SPADCALL |f| (QREFELT $ 62)) |DFINTTLS;negative|)
          (EXIT
           (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
                 ('T (CONS 0 (< (QCDR |u|) 0))))))))) 

(DEFUN |DFINTTLS;checkForZero;PS2OcBU;10| (|p| |x| |a| |b| |incl?| $)
  (SPADCALL
   (SPADCALL (ELT $ 64) (SPADCALL |p| |x| (QREFELT $ 66)) (QREFELT $ 70)) |a|
   |b| |incl?| (QREFELT $ 72))) 

(DEFUN |DFINTTLS;checkForZero;Sup2OcBU;11| (|q| |a| |b| |incl?| $)
  (PROG (|u| #1=#:G774 |i| |d|)
    (RETURN
     (SEQ
      (COND ((SPADCALL |q| (QREFELT $ 74)) (CONS 0 'NIL))
            (#2='T
             (SEQ
              (EXIT
               (SEQ
                (SEQ
                 (LETT |d| (|DFINTTLS;maprat| |q| $)
                       . #3=(|DFINTTLS;checkForZero;Sup2OcBU;11|))
                 (EXIT
                  (COND
                   ((QEQCAR |d| 0)
                    (SEQ (LETT |i| (|DFINTTLS;intrat| |a| |b| $) . #3#)
                         (EXIT
                          (COND
                           ((NULL (QEQCAR |i| 3))
                            (PROGN
                             (LETT #1#
                                   (COND
                                    ((NULL
                                      (|DFINTTLS;findRealZero| (QCDR |d|) |i|
                                       |incl?| $))
                                     (CONS 0 'NIL))
                                    (#2# (CONS 0 'T)))
                                   . #3#)
                             (GO #1#))))))))))
                (LETT |u| (|DFINTTLS;checkBudan| |q| |a| |b| |incl?| $) . #3#)
                (EXIT
                 (COND
                  ((QEQCAR |u| 1)
                   (COND (|incl?| (|DFINTTLS;checkDeriv| |q| |a| |b| $))
                         (#2# (CONS 1 "failed"))))
                  (#2# (CONS 0 (QCDR |u|)))))))
              #1# (EXIT #1#)))))))) 

(DEFUN |DFINTTLS;maprat| (|p| $)
  (PROG (|ans| #1=#:G793 |r| |c|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |ans| (|spadConstant| $ 76) . #2=(|DFINTTLS;maprat|))
            (SEQ G190
                 (COND
                  ((NULL
                    (COND
                     ((SPADCALL |p| (|spadConstant| $ 79) (QREFELT $ 80)) 'NIL)
                     ('T 'T)))
                   (GO G191)))
                 (SEQ
                  (LETT |r|
                        (SPADCALL
                         (LETT |c| (SPADCALL |p| (QREFELT $ 81)) . #2#)
                         (QREFELT $ 83))
                        . #2#)
                  (EXIT
                   (COND
                    ((QEQCAR |r| 1)
                     (PROGN (LETT #1# (CONS 1 "failed") . #2#) (GO #1#)))
                    ('T
                     (SEQ
                      (LETT |ans|
                            (SPADCALL |ans|
                                      (SPADCALL (QCDR |r|)
                                                (SPADCALL |p| (QREFELT $ 84))
                                                (QREFELT $ 85))
                                      (QREFELT $ 86))
                            . #2#)
                      (EXIT
                       (LETT |p| (SPADCALL |p| (QREFELT $ 87)) . #2#)))))))
                 NIL (GO G190) G191 (EXIT NIL))
            (EXIT
             (CONS 0
                   (SPADCALL (ELT $ 88) (QCAR (SPADCALL |ans| (QREFELT $ 91)))
                             (QREFELT $ 95))))))
      #1# (EXIT #1#))))) 

(DEFUN |DFINTTLS;intrat| (|a| |b| $)
  (PROG (|t| #1=#:G810 |n| |q| #2=#:G811 |r|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ (LETT |n| (SPADCALL |a| (QREFELT $ 97)) . #3=(|DFINTTLS;intrat|))
             (EXIT
              (COND
               ((NULL (EQL |n| 0))
                (PROGN
                 (LETT #2#
                       (SEQ (LETT |r| (SPADCALL |b| (QREFELT $ 33)) . #3#)
                            (EXIT
                             (COND ((QEQCAR |r| 1) (CONS 2 "all"))
                                   (#4='T
                                    (SEQ
                                     (LETT |q|
                                           (SPADCALL (QCDR |r|) (QREFELT $ 83))
                                           . #3#)
                                     (EXIT
                                      (COND
                                       ((QEQCAR |q| 1) (CONS 3 #5="failed"))
                                       (#4#
                                        (CONS 1 (CONS (QCDR |q|) |n|))))))))))
                       . #3#)
                 (GO #2#))))))
        (LETT |q| (SPADCALL (SPADCALL |a| (QREFELT $ 98)) (QREFELT $ 83))
              . #3#)
        (EXIT
         (COND ((QEQCAR |q| 1) (CONS 3 #5#))
               (#4#
                (SEQ
                 (EXIT
                  (SEQ
                   (SEQ (LETT |n| (SPADCALL |b| (QREFELT $ 97)) . #3#)
                        (EXIT
                         (COND
                          ((NULL (EQL |n| 0))
                           (PROGN
                            (LETT #1# (CONS 1 (CONS (QCDR |q|) |n|)) . #3#)
                            (GO #1#))))))
                   (LETT |t|
                         (SPADCALL (SPADCALL |b| (QREFELT $ 98))
                                   (QREFELT $ 83))
                         . #3#)
                   (EXIT
                    (COND ((QEQCAR |t| 1) (CONS 3 #5#))
                          (#4# (CONS 0 (CONS (QCDR |q|) (QCDR |t|))))))))
                 #1# (EXIT #1#)))))))
      #2# (EXIT #2#))))) 

(DEFUN |DFINTTLS;findRealZero| (|p| |i| |incl?| $)
  (PROG (|ep| #1=#:G816 |l| #2=#:G835 |u| #3=#:G846 |t| #4=#:G845 |bounds|
         #5=#:G828 #6=#:G827 #7=#:G829 #8=#:G844 #9=#:G825 #10=#:G824
         #11=#:G826 #12=#:G843 |r|)
    (RETURN
     (SEQ
      (LETT |p| (SPADCALL |p| (QREFELT $ 99)) . #13=(|DFINTTLS;findRealZero|))
      (EXIT
       (COND
        ((QEQCAR |i| 0)
         (SEQ
          (LETT |l| (SPADCALL |p| (LETT |r| (CDR |i|) . #13#) (QREFELT $ 103))
                . #13#)
          (EXIT
           (COND (|incl?| |l|)
                 (#14='T
                  (SPADCALL (CONS #'|DFINTTLS;findRealZero!0| (VECTOR $ |r|))
                            |l| (QREFELT $ 106)))))))
        ((QEQCAR |i| 2) (SPADCALL |p| (QREFELT $ 107)))
        ((QEQCAR |i| 1)
         (COND ((NULL (LETT |l| (SPADCALL |p| (QREFELT $ 107)) . #13#)) NIL)
               (#14#
                (SEQ
                 (LETT |bounds|
                       (COND
                        ((< 0
                            (QCDR
                             (PROG2
                                 (LETT #1# |i| . #13#)
                                 (QCDR #1#)
                               (|check-union| (QEQCAR #1# 1)
                                              (|Record|
                                               (|:| |endpoint|
                                                    (|Fraction| (|Integer|)))
                                               (|:| |dir| (|Integer|)))
                                              #1#))))
                         (CONS
                          (QCAR
                           (PROG2
                               (LETT #1# |i| . #13#)
                               (QCDR #1#)
                             (|check-union| (QEQCAR #1# 1)
                                            (|Record|
                                             (|:| |endpoint|
                                                  (|Fraction| (|Integer|)))
                                             (|:| |dir| (|Integer|)))
                                            #1#)))
                          (PROGN
                           (LETT #9# NIL . #13#)
                           (SEQ (LETT |t| NIL . #13#) (LETT #12# |l| . #13#)
                                G190
                                (COND
                                 ((OR (ATOM #12#)
                                      (PROGN (LETT |t| (CAR #12#) . #13#) NIL))
                                  #15=(GO G191)))
                                (SEQ
                                 (EXIT
                                  (PROGN
                                   (LETT #11# (QCDR |t|) . #13#)
                                   (COND
                                    (#9#
                                     (LETT #10#
                                           (SPADCALL #10# #11# (QREFELT $ 110))
                                           . #13#))
                                    ('T
                                     (PROGN
                                      (LETT #10# #11# . #13#)
                                      (LETT #9# 'T . #13#)))))))
                                (LETT #12# (CDR #12#) . #13#) #16=(GO G190)
                                G191 (EXIT NIL))
                           (COND (#9# #10#) (#14# (|IdentityError| '|max|))))))
                        (#14#
                         (CONS
                          (PROGN
                           (LETT #5# NIL . #13#)
                           (SEQ (LETT |t| NIL . #13#) (LETT #8# |l| . #13#)
                                G190
                                (COND
                                 ((OR (ATOM #8#)
                                      (PROGN (LETT |t| (CAR #8#) . #13#) NIL))
                                  #15#))
                                (SEQ
                                 (EXIT
                                  (PROGN
                                   (LETT #7# (QCAR |t|) . #13#)
                                   (COND
                                    (#5#
                                     (LETT #6#
                                           (SPADCALL #6# #7# (QREFELT $ 111))
                                           . #13#))
                                    ('T
                                     (PROGN
                                      (LETT #6# #7# . #13#)
                                      (LETT #5# 'T . #13#)))))))
                                (LETT #8# (CDR #8#) . #13#) #16# G191
                                (EXIT NIL))
                           (COND (#5# #6#) (#14# (|IdentityError| '|min|))))
                          (QCAR
                           (PROG2
                               (LETT #1# |i| . #13#)
                               (QCDR #1#)
                             (|check-union| (QEQCAR #1# 1)
                                            (|Record|
                                             (|:| |endpoint|
                                                  (|Fraction| (|Integer|)))
                                             (|:| |dir| (|Integer|)))
                                            #1#))))))
                       . #13#)
                 (LETT |l|
                       (PROGN
                        (LETT #4# NIL . #13#)
                        (SEQ (LETT |t| NIL . #13#) (LETT #3# |l| . #13#) G190
                             (COND
                              ((OR (ATOM #3#)
                                   (PROGN (LETT |t| (CAR #3#) . #13#) NIL))
                               #15#))
                             (SEQ
                              (EXIT
                               (COND
                                ((QEQCAR
                                  (LETT |u|
                                        (SPADCALL |p| |t| |bounds|
                                                  (QREFELT $ 113))
                                        . #13#)
                                  0)
                                 (LETT #4#
                                       (CONS
                                        (PROG2
                                            (LETT #2# |u| . #13#)
                                            (QCDR #2#)
                                          (|check-union| (QEQCAR #2# 0)
                                                         (|Record|
                                                          (|:| |left|
                                                               (|Fraction|
                                                                (|Integer|)))
                                                          (|:| |right|
                                                               (|Fraction|
                                                                (|Integer|))))
                                                         #2#))
                                        #4#)
                                       . #13#)))))
                             (LETT #3# (CDR #3#) . #13#) #16# G191
                             (EXIT (NREVERSE0 #4#))))
                       . #13#)
                 (EXIT
                  (COND (|incl?| |l|)
                        (#14#
                         (SEQ
                          (LETT |ep|
                                (QCAR
                                 (PROG2
                                     (LETT #1# |i| . #13#)
                                     (QCDR #1#)
                                   (|check-union| (QEQCAR #1# 1)
                                                  (|Record|
                                                   (|:| |endpoint|
                                                        (|Fraction|
                                                         (|Integer|)))
                                                   (|:| |dir| (|Integer|)))
                                                  #1#)))
                                . #13#)
                          (EXIT
                           (SPADCALL
                            (CONS #'|DFINTTLS;findRealZero!1| (VECTOR $ |ep|))
                            |l| (QREFELT $ 106)))))))))))
        (#14# (|error| "findRealZero: should not happpen")))))))) 

(DEFUN |DFINTTLS;findRealZero!1| (|s| $$)
  (PROG (|ep| $)
    (LETT |ep| (QREFELT $$ 1) . #1=(|DFINTTLS;findRealZero|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|DFINTTLS;keeprec?| |ep| |s| $))))) 

(DEFUN |DFINTTLS;findRealZero!0| (|s| $$)
  (PROG (|r| $)
    (LETT |r| (QREFELT $$ 1) . #1=(|DFINTTLS;findRealZero|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND
       ((|DFINTTLS;keeprec?| (QCAR |r|) |s| $)
        (|DFINTTLS;keeprec?| (QCDR |r|) |s| $))
       ('T (|spadConstant| $ 104))))))) 

(DEFUN |DFINTTLS;checkBudan| (|p| |a| |b| |incl?| $)
  (PROG (|v| |m| #1=#:G865 |vb| |va| |zb?| |bb| #2=#:G851 |n| |za?| |aa| |r|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |r| (SPADCALL |b| (QREFELT $ 33)) . #3=(|DFINTTLS;checkBudan|))
        (SEQ (LETT |n| (SPADCALL |a| (QREFELT $ 97)) . #3#)
             (EXIT
              (COND
               ((NULL (EQL |n| 0))
                (PROGN
                 (LETT #1#
                       (COND ((QEQCAR |r| 1) (|DFINTTLS;realRoot| |p| $))
                             (#4='T
                              (|DFINTTLS;checkHalfAx| |p| (QCDR |r|) |n|
                               |incl?| $)))
                       . #3#)
                 (GO #1#))))))
        (SEQ
         (LETT |za?|
               (SPADCALL
                (SPADCALL |p| (LETT |aa| (SPADCALL |a| (QREFELT $ 98)) . #3#)
                          (QREFELT $ 114))
                (QREFELT $ 115))
               . #3#)
         (EXIT
          (COND
           (|za?|
            (COND (|incl?| (PROGN (LETT #1# (CONS 0 'T) . #3#) (GO #1#))))))))
        (SEQ (LETT |n| (SPADCALL |b| (QREFELT $ 97)) . #3#)
             (EXIT
              (COND
               ((NULL (EQL |n| 0))
                (PROGN
                 (LETT #1# (|DFINTTLS;checkHalfAx| |p| |aa| |n| |incl?| $)
                       . #3#)
                 (GO #1#))))))
        (SEQ
         (LETT |zb?|
               (SPADCALL
                (SPADCALL |p|
                          (LETT |bb|
                                (PROG2
                                    (LETT #2# |r| . #3#)
                                    (QCDR #2#)
                                  (|check-union| (QEQCAR #2# 0) (QREFELT $ 7)
                                                 #2#))
                                . #3#)
                          (QREFELT $ 114))
                (QREFELT $ 115))
               . #3#)
         (EXIT
          (COND
           (|zb?|
            (COND (|incl?| (PROGN (LETT #1# (CONS 0 'T) . #3#) (GO #1#))))))))
        (SEQ (LETT |va| (|DFINTTLS;variation| |p| |aa| $) . #3#)
             (EXIT
              (COND
               ((QEQCAR |va| 1)
                (PROGN (LETT #1# (CONS 1 #5="failed") . #3#) (GO #1#)))
               (#4#
                (SEQ (LETT |vb| (|DFINTTLS;variation| |p| |bb| $) . #3#)
                     (EXIT
                      (COND
                       ((QEQCAR |vb| 1)
                        (PROGN (LETT #1# (CONS 1 #5#) . #3#) (GO #1#))))))))))
        (LETT |m| 0 . #3#) (COND (|za?| (LETT |m| (+ |m| 1) . #3#)))
        (COND (|zb?| (LETT |m| (+ |m| 1) . #3#)))
        (EXIT
         (COND
          ((ODDP (LETT |v| (- (QCDR |va|) (QCDR |vb|)) . #3#))
           (COND ((OR |incl?| (SPADCALL |m| (QREFELT $ 116))) (CONS 0 'T))
                 ((EQL |v| 1) (CONS 0 'NIL)) (#4# (CONS 1 "failed"))))
          ((ZEROP |v|) (CONS 0 'NIL)) ((EQL |m| 1) (CONS 0 'T))
          (#4# (CONS 1 "failed"))))))
      #1# (EXIT #1#))))) 

(DEFUN |DFINTTLS;checkDeriv| (|p| |a| |b| $)
  (PROG (|u| |s| |r|)
    (RETURN
     (SEQ
      (LETT |r| (SPADCALL |p| (QREFELT $ 117)) . #1=(|DFINTTLS;checkDeriv|))
      (EXIT
       (COND ((QEQCAR |r| 0) (CONS 0 (SPADCALL (QCDR |r|) (QREFELT $ 115))))
             (#2='T
              (SEQ (LETT |s| (|DFINTTLS;sameSign| |p| |a| |b| $) . #1#)
                   (EXIT
                    (COND ((QEQCAR |s| 1) (CONS 1 "failed"))
                          ((QCDR |s|)
                           (SEQ
                            (LETT |u|
                                  (|DFINTTLS;checkDeriv|
                                   (SPADCALL |p| (QREFELT $ 118)) |a| |b| $)
                                  . #1#)
                            (EXIT
                             (COND
                              ((OR (QEQCAR |u| 1) (QCDR |u|))
                               (CONS 1 "failed"))
                              ('T (CONS 0 'NIL))))))
                          (#2# (CONS 0 'T)))))))))))) 

(DEFUN |DFINTTLS;realRoot| (|p| $)
  (PROG (|b|)
    (RETURN
     (SEQ (LETT |b| (|DFINTTLS;posRoot| |p| 'T $) |DFINTTLS;realRoot|)
          (EXIT
           (COND ((QEQCAR |b| 1) (CONS 1 "failed")) ((QCDR |b|) (CONS 0 'T))
                 ('T
                  (|DFINTTLS;posRoot|
                   (SPADCALL |p|
                             (SPADCALL |p|
                                       (SPADCALL (|spadConstant| $ 9) 1
                                                 (QREFELT $ 12))
                                       (QREFELT $ 14))
                             (QREFELT $ 15))
                   'T $)))))))) 

(DEFUN |DFINTTLS;sameSign| (|p| |a| |b| $)
  (PROG (|s| |eb| |ea|)
    (RETURN
     (SEQ (LETT |ea| (|DFINTTLS;infeval| |p| |a| $) . #1=(|DFINTTLS;sameSign|))
          (EXIT
           (COND ((QEQCAR |ea| 1) (CONS 1 "failed"))
                 (#2='T
                  (SEQ (LETT |eb| (|DFINTTLS;infeval| |p| |b| $) . #1#)
                       (EXIT
                        (COND ((QEQCAR |eb| 1) (CONS 1 "failed"))
                              (#2#
                               (SEQ
                                (LETT |s|
                                      (SPADCALL
                                       (SPADCALL (QCDR |ea|) (QCDR |eb|)
                                                 (QREFELT $ 119))
                                       (QREFELT $ 62))
                                      . #1#)
                                (EXIT
                                 (COND ((QEQCAR |s| 1) (CONS 1 "failed"))
                                       (#2#
                                        (CONS 0 (< 0 (QCDR |s|)))))))))))))))))) 

(DEFUN |DFINTTLS;posRoot| (|p| |incl0?| $)
  (PROG (|v| #1=#:G905 |z0?|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ
         (LETT |z0?|
               (SPADCALL (SPADCALL |p| 0 (QREFELT $ 121)) (QREFELT $ 115))
               . #2=(|DFINTTLS;posRoot|))
         (EXIT
          (COND
           (|z0?|
            (COND (|incl0?| (PROGN (LETT #1# (CONS 0 'T) . #2#) (GO #1#))))))))
        (LETT |v| (|DFINTTLS;var| |p| $) . #2#)
        (EXIT
         (COND ((QEQCAR |v| 1) (CONS 1 "failed"))
               ((ODDP (QCDR |v|))
                (COND ((OR |incl0?| (NULL |z0?|)) (CONS 0 'T))
                      ((EQL (QCDR |v|) 1) (CONS 0 'NIL))
                      (#3='T (CONS 1 "failed"))))
               ((ZEROP (QCDR |v|)) (CONS 0 'NIL)) (|z0?| (CONS 0 'T))
               (#3# (CONS 1 "failed"))))))
      #1# (EXIT #1#))))) 

(DEFUN |DFINTTLS;infeval| (|p| |a| $)
  (PROG (|u| |n|)
    (RETURN
     (SEQ
      (COND
       ((QSZEROP
         (LETT |n| (SPADCALL |a| (QREFELT $ 97)) . #1=(|DFINTTLS;infeval|)))
        (CONS 0 (SPADCALL |p| (SPADCALL |a| (QREFELT $ 98)) (QREFELT $ 114))))
       (#2='T
        (SEQ (LETT |u| (SPADCALL |p| |n| (ELT $ 62) (QREFELT $ 124)) . #1#)
             (EXIT
              (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
                    (#2# (CONS 0 (SPADCALL (QCDR |u|) (QREFELT $ 57))))))))))))) 

(DEFUN |DFINTTLS;var| (|q| $)
  (PROG (|lastCoef| |i| #1=#:G929 |next|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |i| 0 . #2=(|DFINTTLS;var|))
            (LETT |lastCoef|
                  (|DFINTTLS;negative| (SPADCALL |q| (QREFELT $ 81)) $) . #2#)
            (EXIT
             (COND ((QEQCAR |lastCoef| 1) (CONS 1 "failed"))
                   ('T
                    (SEQ
                     (SEQ G190
                          (COND
                           ((NULL
                             (SEQ
                              (LETT |q| (SPADCALL |q| (QREFELT $ 87)) . #2#)
                              (EXIT
                               (COND
                                ((SPADCALL |q| (|spadConstant| $ 79)
                                           (QREFELT $ 80))
                                 'NIL)
                                ('T 'T)))))
                            (GO G191)))
                          (SEQ
                           (LETT |next|
                                 (|DFINTTLS;negative|
                                  (SPADCALL |q| (QREFELT $ 81)) $)
                                 . #2#)
                           (EXIT
                            (COND
                             ((QEQCAR |next| 1)
                              (PROGN
                               (LETT #1# (CONS 1 "failed") . #2#)
                               (GO #1#)))
                             ('T
                              (SEQ
                               (COND
                                ((QCDR |lastCoef|)
                                 (COND
                                  ((NULL (QCDR |next|))
                                   (COND
                                    ((QCDR |lastCoef|)
                                     (LETT |i| (+ |i| 1) . #2#))))))
                                ((OR (QCDR |next|) (QCDR |lastCoef|))
                                 (LETT |i| (+ |i| 1) . #2#)))
                               (EXIT (LETT |lastCoef| |next| . #2#)))))))
                          NIL (GO G190) G191 (EXIT NIL))
                     (EXIT (CONS 0 |i|))))))))
      #1# (EXIT #1#))))) 

(DEFUN |DefiniteIntegrationTools| (&REST #1=#:G930)
  (PROG ()
    (RETURN
     (PROG (#2=#:G931)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (|devaluateList| #1#)
                                           (HGET |$ConstructorCache|
                                                 '|DefiniteIntegrationTools|)
                                           '|domainEqualList|)
                . #3=(|DefiniteIntegrationTools|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT
              (PROG1 (APPLY (|function| |DefiniteIntegrationTools;|) #1#)
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache| '|DefiniteIntegrationTools|))))))))))) 

(DEFUN |DefiniteIntegrationTools;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|DefiniteIntegrationTools|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|DefiniteIntegrationTools| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 125) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|DefiniteIntegrationTools|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      $)))) 

(MAKEPROP '|DefiniteIntegrationTools| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . |One|)
              (4 . |One|) (|NonNegativeInteger|)
              (|SparseUnivariatePolynomial| 7) (8 . |monomial|) (14 . |coerce|)
              (19 . -) (25 . |elt|) (|Boolean|) (|Fraction| 19) (31 . <)
              (|Integer|) (37 . *) (|String|) |DFINTTLS;ignore?;SB;4|
              (|Symbol|) (43 . |is?|) (|OrderedCompletion| 7)
              (49 . |infinite?|) (54 . =) (60 . -) (|Union| 25 '"failed")
              (|Kernel| 7) |DFINTTLS;computeInt;KF2OcBU;5|
              (|Union| 7 '#1="failed") (66 . |retractIfCan|) (|Kernel| $)
              (71 . |eval|) (78 . |coerce|) (83 . |coerce|) (|Equation| 7)
              (88 . |equation|) (|PowerSeriesLimitPackage| 6 7) (94 . |limit|)
              (|Equation| 25) (101 . |equation|)
              (|Record| (|:| |leftHandLimit| 29) (|:| |rightHandLimit| 29))
              (|Union| 25 44 '"failed") (107 . |limit|) (|List| 34)
              (113 . |kernels|) (118 . |is?|) (|List| $) (124 . |eval|)
              (|List| 7) (131 . |argument|) (|PositiveInteger|) (136 . ^)
              (142 . |log|) (147 . |coerce|) (152 . /) (158 . -)
              (|Union| 19 '"failed") (|ElementaryFunctionSign| 6 7)
              (163 . |sign|) (|Polynomial| 6) (168 . |coerce|)
              (|SparseUnivariatePolynomial| $) (173 . |univariate|)
              (|Mapping| 7 63) (|SparseUnivariatePolynomial| 63)
              (|SparseUnivariatePolynomialFunctions2| 63 7) (179 . |map|)
              (|Union| 16 '"failed") |DFINTTLS;checkForZero;Sup2OcBU;11|
              |DFINTTLS;checkForZero;PS2OcBU;10| (185 . |ground?|)
              (|SparseUnivariatePolynomial| 17) (190 . |Zero|) (194 . |Zero|)
              (198 . |Zero|) (202 . |Zero|) (206 . =)
              (212 . |leadingCoefficient|) (|Union| 17 '#1#)
              (217 . |retractIfCan|) (222 . |degree|) (227 . |monomial|)
              (233 . +) (239 . |reductum|) (244 . |numer|)
              (|Record| (|:| |num| 75) (|:| |den| 19))
              (|UnivariatePolynomialCommonDenominator| 19 17 75)
              (249 . |splitDenominator|) (|SparseUnivariatePolynomial| 19)
              (|Mapping| 19 17) (|SparseUnivariatePolynomialFunctions2| 17 19)
              (254 . |map|) (|SingleInteger|) (260 . |whatInfinity|)
              (265 . |retract|) (270 . |squareFreePart|)
              (|Record| (|:| |left| 17) (|:| |right| 17)) (|List| 100)
              (|RealZeroPackage| 92) (275 . |realZeros|) (281 . |false|)
              (|Mapping| 16 100) (285 . |select!|) (291 . |realZeros|)
              (296 . |Zero|) (300 . |Zero|) (304 . |max|) (310 . |min|)
              (|Union| 100 '"failed") (316 . |refine|) (323 . |elt|)
              (329 . |zero?|) (334 . |even?|) (339 . |retractIfCan|)
              (344 . |differentiate|) (349 . *) (355 . |Zero|)
              (359 . |coefficient|) (|Mapping| 60 7) (|InnerPolySign| 7 11)
              (365 . |signAround|))
           '#(|ignore?| 372 |computeInt| 377 |checkForZero| 386) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 124
                                                 '(0 6 0 8 0 7 0 9 2 11 0 7 10
                                                   12 1 11 0 7 13 2 11 0 0 0 14
                                                   2 11 0 0 0 15 2 17 16 0 0 18
                                                   2 11 0 19 0 20 2 7 16 0 23
                                                   24 1 25 16 0 26 2 25 16 0 0
                                                   27 2 25 0 0 0 28 1 25 32 0
                                                   33 3 7 0 0 34 0 35 1 25 0 7
                                                   36 1 7 0 34 37 2 38 0 7 7 39
                                                   3 40 29 7 38 21 41 2 42 0 25
                                                   25 43 2 40 45 7 42 46 1 7 47
                                                   0 48 2 30 16 0 23 49 3 7 0 0
                                                   47 50 51 1 30 52 0 53 2 7 0
                                                   0 54 55 1 7 0 0 56 1 7 0 19
                                                   57 2 7 0 0 0 58 1 7 0 0 59 1
                                                   61 60 7 62 1 7 0 63 64 2 63
                                                   65 0 23 66 2 69 11 67 68 70
                                                   1 11 16 0 74 0 75 0 76 0 6 0
                                                   77 0 7 0 78 0 11 0 79 2 11
                                                   16 0 0 80 1 11 7 0 81 1 7 82
                                                   0 83 1 11 10 0 84 2 75 0 17
                                                   10 85 2 75 0 0 0 86 1 11 0 0
                                                   87 1 17 19 0 88 1 90 89 75
                                                   91 2 94 92 93 75 95 1 25 96
                                                   0 97 1 25 7 0 98 1 92 0 0 99
                                                   2 102 101 92 100 103 0 16 0
                                                   104 2 101 0 105 0 106 1 102
                                                   101 92 107 0 92 0 108 0 17 0
                                                   109 2 17 0 0 0 110 2 17 0 0
                                                   0 111 3 102 112 92 100 100
                                                   113 2 11 7 0 7 114 1 7 16 0
                                                   115 1 19 16 0 116 1 11 32 0
                                                   117 1 11 0 0 118 2 7 0 0 0
                                                   119 0 25 0 120 2 11 7 0 10
                                                   121 3 123 60 11 19 122 124 1
                                                   0 16 21 22 5 0 29 30 7 25 25
                                                   16 31 4 0 71 11 25 25 16 72
                                                   5 0 71 63 23 25 25 16
                                                   73)))))
           '|lookupComplete|)) 
