
(/VERSIONCHECK 2) 

(DEFUN |SHP;subresultantSequenceBegin| (|p1| |p2| $)
  (PROG (|d1| |d2| #0=#:G1830 |n| |Pr| #1=#:G1832 |in1| |in2| |i|
              |LSubr| #2=#:G1836 |c1| |Lc1| #3=#:G1839 |Lc2|)
    (RETURN
      (SEQ (LETT |d1| (SPADCALL |p1| (QREFELT $ 10))
                 . #4=(|SHP;subresultantSequenceBegin|))
           (LETT |d2| (SPADCALL |p2| (QREFELT $ 10)) . #4#)
           (LETT |n|
                 (PROG1 (LETT #0# (- |d1| 1) . #4#)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#)) . #4#)
           (EXIT (COND
                   ((EQL |d2| |n|)
                    (SEQ (LETT |Pr|
                               (SPADCALL |p1| |p2| (QREFELT $ 13)) . #4#)
                         (EXIT (APPEND (LIST |p1| |p2|) (LIST |Pr|)))))
                   ((EQL |d2|
                         (PROG1 (LETT #1# (- |n| 1) . #4#)
                           (|check-subtype| (>= #1# 0)
                               '(|NonNegativeInteger|) #1#)))
                    (SEQ (LETT |Lc1|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL |p1| (QREFELT $ 14))
                                    (SPADCALL |p2| (QREFELT $ 14))
                                    (QREFELT $ 15))
                                   |p2| (QREFELT $ 16)) . #4#)
                         (LETT |Lc2|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL |p1| (QREFELT $ 14))
                                    (SPADCALL |p1| |p2| (QREFELT $ 13))
                                    (QREFELT $ 16))
                                   (QREFELT $ 17)) . #4#)
                         (EXIT (APPEND (LIST |p1| |p2|)
                                       (LIST |Lc1| |Lc2|)))))
                   ('T
                    (SEQ (LETT |LSubr| (LIST |p1| |p2|) . #4#)
                         (LETT |in1| (+ |d2| 1) . #4#)
                         (LETT |in2| (- |n| 1) . #4#)
                         (SEQ (LETT |i| |in1| . #4#) G190
                              (COND ((> |i| |in2|) (GO G191)))
                              (SEQ (EXIT
                                    (LETT |LSubr|
                                     (APPEND |LSubr|
                                      (LIST (|spadConstant| $ 18))) . #4#)))
                              (LETT |i| (+ |i| 1) . #4#) (GO G190) G191
                              (EXIT NIL))
                         (LETT |c1|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL |p1| (QREFELT $ 14))
                                    (SPADCALL |p2| (QREFELT $ 14))
                                    (QREFELT $ 15))
                                   (PROG1 (LETT #2# (- |n| |d2|) . #4#)
                                     (|check-subtype| (>= #2# 0)
                                      '(|NonNegativeInteger|) #2#))
                                   (QREFELT $ 19)) . #4#)
                         (LETT |Lc1|
                               (SPADCALL
                                   (SPADCALL |c1| 0 (QREFELT $ 21))
                                   |p2| (QREFELT $ 22)) . #4#)
                         (LETT |Lc2|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL |p1| (QREFELT $ 14))
                                     (QREFELT $ 23))
                                    (PROG1
                                     (LETT #3# (- |n| |d2|) . #4#)
                                      (|check-subtype| (>= #3# 0)
                                       '(|NonNegativeInteger|) #3#))
                                    (QREFELT $ 19))
                                   (SPADCALL |p1| |p2| (QREFELT $ 13))
                                   (QREFELT $ 16)) . #4#)
                         (EXIT (APPEND |LSubr| (LIST |Lc1| |Lc2|))))))))))) 

(DEFUN |SHP;subresultantSequenceNext| (|LcsI| $)
  (PROG (|p2| |p1| |d1| |d2| #0=#:G1844 |in1| |c1| #1=#:G1892
              #2=#:G1894 |pr1| #3=#:G1899 #4=#:G1849 |pr2| |k|
              #5=#:G1904 |LSub|)
    (RETURN
      (SEQ (LETT |p2| (SPADCALL |LcsI| (QREFELT $ 25))
                 . #6=(|SHP;subresultantSequenceNext|))
           (LETT |p1| (|SPADfirst| (CDR (REVERSE |LcsI|))) . #6#)
           (LETT |d1| (SPADCALL |p1| (QREFELT $ 10)) . #6#)
           (LETT |d2| (SPADCALL |p2| (QREFELT $ 10)) . #6#)
           (LETT |in1|
                 (PROG1 (LETT #0# (- |d1| 1) . #6#)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#)) . #6#)
           (EXIT (COND
                   ((EQL |d2| |in1|)
                    (SEQ (LETT |pr1|
                               (PROG2 (LETT #4#
                                       (SPADCALL
                                        (SPADCALL |p1| |p2|
                                         (QREFELT $ 13))
                                        (SPADCALL
                                         (SPADCALL |p1| (QREFELT $ 14))
                                         2 (QREFELT $ 27))
                                        (QREFELT $ 29)) . #6#)
                                      (QCDR #4#)
                                 (|check-union| (QEQCAR #4# 0)
                                     (|UnivariatePolynomial|
                                      (QREFELT $ 7) (QREFELT $ 6))
                                     #4#)) . #6#)
                         (EXIT (APPEND |LcsI| (LIST |pr1|)))))
                   ((< |d2| |in1|)
                    (SEQ (LETT |c1|
                               (SPADCALL |p1| (QREFELT $ 14)) . #6#)
                         (LETT |pr1|
                               (PROG2 (LETT #4#
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL
                                          (SPADCALL |p2|
                                           (QREFELT $ 14))
                                          (PROG1
                                           (LETT #1#
                                            (- |in1| |d2|) . #6#)
                                            (|check-subtype| (>= #1# 0)
                                             '(|NonNegativeInteger|)
                                             #1#))
                                          (QREFELT $ 19))
                                         |p2| (QREFELT $ 16))
                                        (SPADCALL |c1|
                                         (PROG1
                                          (LETT #2#
                                           (- |in1| |d2|) . #6#)
                                           (|check-subtype| (>= #2# 0)
                                            '(|NonNegativeInteger|)
                                            #2#))
                                         (QREFELT $ 19))
                                        (QREFELT $ 29)) . #6#)
                                      (QCDR #4#)
                                 (|check-union| (QEQCAR #4# 0)
                                     (|UnivariatePolynomial|
                                      (QREFELT $ 7) (QREFELT $ 6))
                                     #4#)) . #6#)
                         (LETT |pr2|
                               (PROG2 (LETT #4#
                                       (SPADCALL
                                        (SPADCALL |p1| |p2|
                                         (QREFELT $ 13))
                                        (SPADCALL
                                         (SPADCALL |c1| (QREFELT $ 23))
                                         (PROG1
                                          (LETT #3#
                                           (+ (- |in1| |d2|) 2) . #6#)
                                           (|check-subtype| (>= #3# 0)
                                            '(|NonNegativeInteger|)
                                            #3#))
                                         (QREFELT $ 19))
                                        (QREFELT $ 29)) . #6#)
                                      (QCDR #4#)
                                 (|check-union| (QEQCAR #4# 0)
                                     (|UnivariatePolynomial|
                                      (QREFELT $ 7) (QREFELT $ 6))
                                     #4#)) . #6#)
                         (LETT |LSub| (LIST |pr1| |pr2|) . #6#)
                         (SEQ (LETT |k| (+ |d2| 1) . #6#)
                              (LETT #5# (- |in1| 1) . #6#) G190
                              (COND ((> |k| #5#) (GO G191)))
                              (SEQ (EXIT
                                    (LETT |LSub|
                                     (APPEND
                                      (LIST (|spadConstant| $ 18))
                                      |LSub|) . #6#)))
                              (LETT |k| (+ |k| 1) . #6#) (GO G190) G191
                              (EXIT NIL))
                         (EXIT (APPEND |LcsI| |LSub|)))))))))) 

(DEFUN |SHP;subresultantSequenceInner| (|p1| |p2| $)
  (PROG (|indf| |j| #0=#:G1912 |Lin|)
    (RETURN
      (SEQ (LETT |Lin| (|SHP;subresultantSequenceBegin| |p1| |p2| $)
                 . #1=(|SHP;subresultantSequenceInner|))
           (LETT |indf|
                 (COND
                   ((SPADCALL (SPADCALL |Lin| '|last| (QREFELT $ 31))
                        (|spadConstant| $ 18) (QREFELT $ 33))
                    0)
                   ('T
                    (SPADCALL (SPADCALL |Lin| '|last| (QREFELT $ 31))
                        (QREFELT $ 10)))) . #1#)
           (SEQ G190
                (COND
                  ((NULL (COND ((EQL |indf| 0) 'NIL) ('T 'T)))
                   #2=(GO G191)))
                (SEQ (LETT |Lin|
                           (|SHP;subresultantSequenceNext| |Lin| $) . #1#)
                     (EXIT (LETT |indf|
                                 (COND
                                   ((SPADCALL
                                     (SPADCALL |Lin| '|last|
                                      (QREFELT $ 31))
                                     (|spadConstant| $ 18)
                                     (QREFELT $ 33))
                                    0)
                                   ('T
                                    (SPADCALL
                                     (SPADCALL |Lin| '|last|
                                      (QREFELT $ 31))
                                     (QREFELT $ 10)))) . #1#)))
                NIL #3=(GO G190) G191 (EXIT NIL))
           (SEQ (LETT |j| (LENGTH |Lin|) . #1#)
                (LETT #0# (SPADCALL |p1| (QREFELT $ 10)) . #1#) G190
                (COND ((> |j| #0#) #2#))
                (SEQ (EXIT (LETT |Lin|
                                 (APPEND |Lin|
                                         (LIST (|spadConstant| $ 18))) . #1#)))
                (LETT |j| (+ |j| 1) . #1#) #3# G191 (EXIT NIL))
           (EXIT |Lin|))))) 

(DEFUN |SHP;subresultantSequence;2UpL;4| (|p1| |p2| $)
  (PROG (|p| |q| |List1| |c1| |j| #0=#:G1925 |Pr0| #1=#:G1917
             #2=#:G1919 |Pr1| |List2|)
    (RETURN
      (SEQ (LETT |p| (SPADCALL |p1| (QREFELT $ 10))
                 . #3=(|SHP;subresultantSequence;2UpL;4|))
           (LETT |q| (SPADCALL |p2| (QREFELT $ 10)) . #3#)
           (LETT |List1|
                 (|SHP;subresultantSequenceInner| |p1| |p2| $) . #3#)
           (LETT |List2| (LIST |p1| |p2|) . #3#)
           (LETT |c1| (SPADCALL |p1| (QREFELT $ 14)) . #3#)
           (SEQ (LETT |j| 3 . #3#) (LETT #0# (LENGTH |List1|) . #3#)
                G190 (COND ((> |j| #0#) (GO G191)))
                (SEQ (LETT |Pr0|
                           (SPADCALL |List1| |j| (QREFELT $ 35)) . #3#)
                     (LETT |Pr1|
                           (PROG2 (LETT #2#
                                        (SPADCALL |Pr0|
                                         (SPADCALL |c1|
                                          (PROG1
                                           (LETT #1#
                                            (- (- |p| |q|) 1) . #3#)
                                            (|check-subtype| (>= #1# 0)
                                             '(|NonNegativeInteger|)
                                             #1#))
                                          (QREFELT $ 19))
                                         (QREFELT $ 29)) . #3#)
                                  (QCDR #2#)
                             (|check-union| (QEQCAR #2# 0)
                                 (|UnivariatePolynomial| (QREFELT $ 7)
                                     (QREFELT $ 6))
                                 #2#)) . #3#)
                     (EXIT (LETT |List2|
                                 (APPEND |List2| (LIST |Pr1|)) . #3#)))
                (LETT |j| (+ |j| 1) . #3#) (GO G190) G191 (EXIT NIL))
           (EXIT |List2|))))) 

(DEFUN |SHP;delta| (|int1| $)
  (PROG (#0=#:G1927)
    (RETURN
      (SPADCALL (SPADCALL (|spadConstant| $ 11) (QREFELT $ 23))
          (PROG2 (LETT #0#
                       (SPADCALL (* |int1| (+ |int1| 1)) 2
                           (QREFELT $ 37))
                       |SHP;delta|)
                 (QCDR #0#)
            (|check-union| (QEQCAR #0# 0) (|NonNegativeInteger|) #0#))
          (QREFELT $ 19))))) 

(DEFUN |SHP;polsth1| (|p1| |p| |p2| |q| |c1| $)
  (PROG (|sc1| |Pr1| #0=#:G1931 |Pr2| |c2| |r| #1=#:G1944 |Pr3|
               #2=#:G1956 |Pr4| #3=#:G2044 #4=#:G2046 |Pr5| #5=#:G2064
               |Listf| |List1| |j| #6=#:G2065 #7=#:G2058 #8=#:G2059
               |Pr6| |List2|)
    (RETURN
      (SEQ (LETT |sc1|
                 (SPADCALL (SPADCALL |c1| (QREFELT $ 38))
                     (QREFELT $ 39))
                 . #9=(|SHP;polsth1|))
           (LETT |Pr1|
                 (SPADCALL
                     (SPADCALL (SPADCALL |p1| (QREFELT $ 40)) |p2|
                         (QREFELT $ 22))
                     |p1| (QREFELT $ 13)) . #9#)
           (LETT |Pr2|
                 (PROG2 (LETT #0#
                              (SPADCALL |Pr1|
                                  (SPADCALL |c1| |q| (QREFELT $ 19))
                                  (QREFELT $ 29)) . #9#)
                        (QCDR #0#)
                   (|check-union| (QEQCAR #0# 0)
                       (|UnivariatePolynomial| (QREFELT $ 7)
                           (QREFELT $ 6))
                       #0#)) . #9#)
           (LETT |c2| (SPADCALL |Pr2| (QREFELT $ 14)) . #9#)
           (LETT |r| (SPADCALL |Pr2| (QREFELT $ 10)) . #9#)
           (LETT |Pr3|
                 (SPADCALL
                     (SPADCALL
                         (SPADCALL |sc1|
                             (PROG1 (LETT #1# (- (- |p| |r|) 1) . #9#)
                               (|check-subtype| (>= #1# 0)
                                   '(|NonNegativeInteger|) #1#))
                             (QREFELT $ 19))
                         0 (QREFELT $ 21))
                     |p1| (QREFELT $ 22)) . #9#)
           (LETT |Pr4|
                 (SPADCALL
                     (SPADCALL
                         (SPADCALL |sc1|
                             (PROG1 (LETT #2# (- (- |p| |r|) 1) . #9#)
                               (|check-subtype| (>= #2# 0)
                                   '(|NonNegativeInteger|) #2#))
                             (QREFELT $ 19))
                         0 (QREFELT $ 21))
                     |Pr2| (QREFELT $ 22)) . #9#)
           (LETT |Listf| (LIST |Pr3| |Pr4|) . #9#)
           (COND
             ((< |r| (- |p| 1))
              (SEQ (LETT |Pr5|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL
                                     (|SHP;delta|
                                      (PROG1
                                       (LETT #3#
                                        (- (- |p| |r|) 1) . #9#)
                                        (|check-subtype| (>= #3# 0)
                                         '(|NonNegativeInteger|) #3#))
                                      $)
                                     (SPADCALL |c2|
                                      (PROG1
                                       (LETT #4#
                                        (- (- |p| |r|) 1) . #9#)
                                        (|check-subtype| (>= #4# 0)
                                         '(|NonNegativeInteger|) #4#))
                                      (QREFELT $ 19))
                                     (QREFELT $ 15))
                                 0 (QREFELT $ 21))
                             |Pr2| (QREFELT $ 22)) . #9#)
                   (SEQ (LETT |j| (+ |r| 1) . #9#)
                        (LETT #5# (- |p| 2) . #9#) G190
                        (COND ((> |j| #5#) #10=(GO G191)))
                        (SEQ (EXIT (LETT |Listf|
                                    (APPEND |Listf|
                                     (LIST (|spadConstant| $ 18))) . #9#)))
                        (LETT |j| (+ |j| 1) . #9#) #11=(GO G190) G191
                        (EXIT NIL))
                   (EXIT (LETT |Listf|
                               (APPEND |Listf| (LIST |Pr5|)) . #9#)))))
           (COND
             ((SPADCALL |Pr1| (|spadConstant| $ 18) (QREFELT $ 33))
              (LETT |List1| |Listf| . #9#))
             ('T
              (LETT |List1| (SPADCALL |p1| |Pr2| (QREFELT $ 36)) . #9#)))
           (LETT |List2| NIL . #9#)
           (SEQ (LETT |j| 0 . #9#) (LETT #6# (- |r| 1) . #9#) G190
                (COND ((QSGREATERP |j| #6#) #10#))
                (SEQ (LETT |Pr6|
                           (SPADCALL
                               (SPADCALL
                                   (|SHP;delta|
                                    (PROG1
                                     (LETT #7# (- (- |p| |j|) 1) . #9#)
                                      (|check-subtype| (>= #7# 0)
                                       '(|NonNegativeInteger|) #7#))
                                    $)
                                   0 (QREFELT $ 21))
                               (SPADCALL |List1|
                                   (PROG1
                                    (LETT #8# (+ (- |p| |j|) 1) . #9#)
                                     (|check-subtype| (>= #8# 0)
                                      '(|NonNegativeInteger|) #8#))
                                   (QREFELT $ 35))
                               (QREFELT $ 22)) . #9#)
                     (EXIT (LETT |List2|
                                 (APPEND (LIST |Pr6|) |List2|) . #9#)))
                (LETT |j| (QSADD1 |j|) . #9#) #11# G191 (EXIT NIL))
           (EXIT (APPEND |Listf| |List2|)))))) 

(DEFUN |SHP;polsth2| (|p1| |p| |p2| |q| |c1| $)
  (PROG (|sc1| |Pr1| |Pr2| |Pr3| |Listf| |List1| |j| #0=#:G2083
               #1=#:G2074 #2=#:G2075 |Pr4| #3=#:G2077 |Pr5| |List2|)
    (RETURN
      (SEQ (LETT |sc1|
                 (SPADCALL (SPADCALL |c1| (QREFELT $ 38))
                     (QREFELT $ 39))
                 . #4=(|SHP;polsth2|))
           (LETT |Pr1|
                 (SPADCALL (SPADCALL |sc1| 0 (QREFELT $ 21)) |p1|
                     (QREFELT $ 22)) . #4#)
           (LETT |Pr2|
                 (SPADCALL (SPADCALL |p1| (QREFELT $ 40)) |p2|
                     (QREFELT $ 22)) . #4#)
           (LETT |Pr3|
                 (SPADCALL (SPADCALL |sc1| 0 (QREFELT $ 21)) |Pr2|
                     (QREFELT $ 22)) . #4#)
           (LETT |Listf| (LIST |Pr1| |Pr3|) . #4#)
           (LETT |List1| (SPADCALL |p1| |Pr2| (QREFELT $ 36)) . #4#)
           (LETT |List2| NIL . #4#)
           (SEQ (LETT |j| 0 . #4#) (LETT #0# (- |p| 2) . #4#) G190
                (COND ((QSGREATERP |j| #0#) (GO G191)))
                (SEQ (LETT |Pr4|
                           (SPADCALL (SPADCALL
                                      (|SHP;delta|
                                       (PROG1
                                        (LETT #1#
                                         (- (- |p| |j|) 1) . #4#)
                                         (|check-subtype| (>= #1# 0)
                                          '(|NonNegativeInteger|) #1#))
                                       $)
                                      0 (QREFELT $ 21))
                                     (SPADCALL |List1|
                                      (PROG1
                                       (LETT #2#
                                        (+ (- |p| |j|) 1) . #4#)
                                        (|check-subtype| (>= #2# 0)
                                         '(|NonNegativeInteger|) #2#))
                                      (QREFELT $ 35))
                                     (QREFELT $ 22)) . #4#)
                     (LETT |Pr5|
                           (PROG2 (LETT #3#
                                        (SPADCALL |Pr4| |c1|
                                         (QREFELT $ 29)) . #4#)
                                  (QCDR #3#)
                             (|check-union| (QEQCAR #3# 0)
                                 (|UnivariatePolynomial| (QREFELT $ 7)
                                     (QREFELT $ 6))
                                 #3#)) . #4#)
                     (EXIT (LETT |List2|
                                 (APPEND (LIST |Pr5|) |List2|) . #4#)))
                (LETT |j| (QSADD1 |j|) . #4#) (GO G190) G191
                (EXIT NIL))
           (EXIT (APPEND |Listf| |List2|)))))) 

(DEFUN |SHP;polsth3| (|p1| |p| |p2| |q| |c1| $)
  (PROG (|sc1| #0=#:G2084 |q1| |v| |Pr1| |Listf| |List1| |j| #1=#:G2086
               #2=#:G2104 #3=#:G2095 #4=#:G2096 |Pr2| #5=#:G2098 |Pr3|
               |List2|)
    (RETURN
      (SEQ (LETT |sc1|
                 (SPADCALL (SPADCALL |c1| (QREFELT $ 38))
                     (QREFELT $ 39))
                 . #6=(|SHP;polsth3|))
           (LETT |q1|
                 (PROG1 (LETT #0# (- |q| 1) . #6#)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#)) . #6#)
           (LETT |v| (+ |p| |q1|) . #6#)
           (LETT |Pr1|
                 (SPADCALL
                     (SPADCALL
                         (SPADCALL (|SHP;delta| |q1| $)
                             (SPADCALL |sc1| (+ |q| 1) (QREFELT $ 19))
                             (QREFELT $ 15))
                         0 (QREFELT $ 21))
                     |p1| (QREFELT $ 22)) . #6#)
           (LETT |Listf| (LIST |Pr1|) . #6#)
           (LETT |List1|
                 (SPADCALL
                     (SPADCALL (SPADCALL |p1| (QREFELT $ 40)) |p2|
                         (QREFELT $ 22))
                     |p1| (QREFELT $ 36)) . #6#)
           (LETT |List2| NIL . #6#)
           (SEQ (LETT |j| 0 . #6#)
                (LETT #2#
                      (PROG1 (LETT #1# (- |p| 1) . #6#)
                        (|check-subtype| (>= #1# 0)
                            '(|NonNegativeInteger|) #1#)) . #6#)
                G190 (COND ((QSGREATERP |j| #2#) (GO G191)))
                (SEQ (LETT |Pr2|
                           (SPADCALL
                               (SPADCALL
                                   (|SHP;delta|
                                    (PROG1 (LETT #3# (- |v| |j|) . #6#)
                                      (|check-subtype| (>= #3# 0)
                                       '(|NonNegativeInteger|) #3#))
                                    $)
                                   0 (QREFELT $ 21))
                               (SPADCALL |List1|
                                   (PROG1
                                    (LETT #4# (+ (- |v| |j|) 1) . #6#)
                                     (|check-subtype| (>= #4# 0)
                                      '(|NonNegativeInteger|) #4#))
                                   (QREFELT $ 35))
                               (QREFELT $ 22)) . #6#)
                     (LETT |Pr3|
                           (PROG2 (LETT #5#
                                        (SPADCALL |Pr2| |c1|
                                         (QREFELT $ 29)) . #6#)
                                  (QCDR #5#)
                             (|check-union| (QEQCAR #5# 0)
                                 (|UnivariatePolynomial| (QREFELT $ 7)
                                     (QREFELT $ 6))
                                 #5#)) . #6#)
                     (EXIT (LETT |List2|
                                 (APPEND (LIST |Pr3|) |List2|) . #6#)))
                (LETT |j| (QSADD1 |j|) . #6#) (GO G190) G191
                (EXIT NIL))
           (EXIT (APPEND |Listf| |List2|)))))) 

(DEFUN |SHP;SturmHabichtSequence;2UpL;9| (|p1| |p2| $)
  (PROG (|p| |q| |c1|)
    (RETURN
      (SEQ (LETT |p| (SPADCALL |p1| (QREFELT $ 10))
                 . #0=(|SHP;SturmHabichtSequence;2UpL;9|))
           (LETT |q| (SPADCALL |p2| (QREFELT $ 10)) . #0#)
           (LETT |c1| (SPADCALL |p1| (QREFELT $ 14)) . #0#)
           (COND
             ((OR (SPADCALL |c1| (|spadConstant| $ 11) (QREFELT $ 41))
                  (EQL |q| 1))
              (EXIT (|SHP;polsth1| |p1| |p| |p2| |q| |c1| $))))
           (EXIT (COND
                   ((EQL |q| 0)
                    (|SHP;polsth2| |p1| |p| |p2| |q| |c1| $))
                   ('T (|SHP;polsth3| |p1| |p| |p2| |q| |c1| $)))))))) 

(DEFUN |SHP;SturmHabichtCoefficients;2UpL;10| (|p1| |p2| $)
  (PROG (|List1| |qp| #0=#:G2111 |j| |p| #1=#:G2112 #2=#:G2107)
    (RETURN
      (SEQ (LETT |List1| (SPADCALL |p1| |p2| (QREFELT $ 42))
                 . #3=(|SHP;SturmHabichtCoefficients;2UpL;10|))
           (LETT |qp| (LENGTH |List1|) . #3#)
           (EXIT (PROGN
                   (LETT #0# NIL . #3#)
                   (SEQ (LETT |j| 1 . #3#) (LETT |p| NIL . #3#)
                        (LETT #1# |List1| . #3#) G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |p| (CAR #1#) . #3#) NIL)
                               (QSGREATERP |j| |qp|))
                           (GO G191)))
                        (SEQ (EXIT (LETT #0#
                                    (CONS
                                     (SPADCALL |p|
                                      (PROG1
                                       (LETT #2# (- |qp| |j|) . #3#)
                                        (|check-subtype| (>= #2# 0)
                                         '(|NonNegativeInteger|) #2#))
                                      (QREFELT $ 43))
                                     #0#) . #3#)))
                        (LETT #1#
                              (PROG1 (CDR #1#)
                                (LETT |j| (QSADD1 |j|) . #3#)) . #3#)
                        (GO G190) G191 (EXIT (NREVERSE0 #0#))))))))) 

(DEFUN |SHP;variation| (|Lsig| $)
  (PROG (|elt1| |elt2| |sig1| |List1|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |Lsig| 1 (QREFELT $ 46)) 0)
             ('T
              (SEQ (LETT |elt1| (|SPADfirst| |Lsig|)
                         . #0=(|SHP;variation|))
                   (LETT |elt2|
                         (SPADCALL |Lsig| 2 (QREFELT $ 47)) . #0#)
                   (LETT |sig1|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL |elt1| |elt2|
                                     (QREFELT $ 15))
                                 (QREFELT $ 38))
                             (QREFELT $ 39)) . #0#)
                   (LETT |List1| (CDR |Lsig|) . #0#)
                   (EXIT (COND
                           ((SPADCALL |sig1| (|spadConstant| $ 11)
                                (QREFELT $ 41))
                            (|SHP;variation| |List1| $))
                           ('T (+ 1 (|SHP;variation| |List1| $)))))))))))) 

(DEFUN |SHP;permanence| (|Lsig| $)
  (PROG (|elt1| |elt2| |sig1| |List1|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |Lsig| 1 (QREFELT $ 46)) 0)
             ('T
              (SEQ (LETT |elt1| (|SPADfirst| |Lsig|)
                         . #0=(|SHP;permanence|))
                   (LETT |elt2|
                         (SPADCALL |Lsig| 2 (QREFELT $ 47)) . #0#)
                   (LETT |sig1|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL |elt1| |elt2|
                                     (QREFELT $ 15))
                                 (QREFELT $ 38))
                             (QREFELT $ 39)) . #0#)
                   (LETT |List1| (CDR |Lsig|) . #0#)
                   (EXIT (COND
                           ((SPADCALL |sig1|
                                (SPADCALL (|spadConstant| $ 11)
                                    (QREFELT $ 23))
                                (QREFELT $ 41))
                            (|SHP;permanence| |List1| $))
                           ('T (+ 1 (|SHP;permanence| |List1| $)))))))))))) 

(DEFUN |SHP;qzeros| (|Lsig| $)
  (SEQ (SEQ G190
            (COND
              ((NULL (SPADCALL (SPADCALL |Lsig| (QREFELT $ 48))
                         (|spadConstant| $ 20) (QREFELT $ 41)))
               (GO G191)))
            (SEQ (EXIT (LETT |Lsig| (REVERSE (CDR (REVERSE |Lsig|)))
                             |SHP;qzeros|)))
            NIL (GO G190) G191 (EXIT NIL))
       (EXIT |Lsig|))) 

(DEFUN |SHP;epsil| (|int1| |elt1| |elt2| $)
  (PROG (|ct1| |ct2| #0=#:G2123 |ct3| |ct4|)
    (RETURN
      (SEQ (COND
             ((OR (EQL |int1| 0) (ODDP |int1|)) 0)
             ('T
              (SEQ (LETT |ct1|
                         (COND
                           ((SPADCALL (|spadConstant| $ 20) |elt1|
                                (QREFELT $ 49))
                            1)
                           ('T -1))
                         . #1=(|SHP;epsil|))
                   (LETT |ct2|
                         (COND
                           ((SPADCALL (|spadConstant| $ 20) |elt2|
                                (QREFELT $ 49))
                            1)
                           ('T -1)) . #1#)
                   (LETT |ct3|
                         (PROG2 (LETT #0#
                                      (SPADCALL |int1| 2
                                       (QREFELT $ 37)) . #1#)
                                (QCDR #0#)
                           (|check-union| (QEQCAR #0# 0)
                               (|NonNegativeInteger|) #0#)) . #1#)
                   (LETT |ct4| (* |ct1| |ct2|) . #1#)
                   (EXIT (* (EXPT -1 |ct3|) |ct4|))))))))) 

(DEFUN |SHP;numbnce| (|Lsig| $)
  (PROG (|eltp|)
    (RETURN
      (SEQ (COND
             ((NULL |Lsig|) 0)
             (#0='T
              (SEQ (LETT |eltp| (SPADCALL |Lsig| 1 (QREFELT $ 47))
                         |SHP;numbnce|)
                   (EXIT (COND
                           ((SPADCALL |eltp| (|spadConstant| $ 20)
                                (QREFELT $ 41))
                            0)
                           (#0# (+ 1 (|SHP;numbnce| (CDR |Lsig|) $)))))))))))) 

(DEFUN |SHP;numbce| (|Lsig| $)
  (PROG (|eltp|)
    (RETURN
      (SEQ (COND
             ((NULL |Lsig|) 0)
             (#0='T
              (SEQ (LETT |eltp| (SPADCALL |Lsig| 1 (QREFELT $ 47))
                         |SHP;numbce|)
                   (EXIT (COND
                           ((SPADCALL |eltp| (|spadConstant| $ 20)
                                (QREFELT $ 41))
                            (+ 1 (|SHP;numbce| (CDR |Lsig|) $)))
                           (#0# 0)))))))))) 

(DEFUN |SHP;wfunctaux| (|Lsig| $)
  (PROG (|cont1| |List2| |cont2| |j| |List1| |ind2| |ind3| |ind4|)
    (RETURN
      (SEQ (COND
             ((NULL |Lsig|) 0)
             ('T
              (SEQ (LETT |List2| NIL . #0=(|SHP;wfunctaux|))
                   (LETT |List1| |Lsig| . #0#)
                   (LETT |cont1| (|SHP;numbnce| |List1| $) . #0#)
                   (SEQ (LETT |j| 1 . #0#) G190
                        (COND ((QSGREATERP |j| |cont1|) #1=(GO G191)))
                        (SEQ (LETT |List2|
                                   (APPEND |List2|
                                    (LIST (|SPADfirst| |List1|))) . #0#)
                             (EXIT (LETT |List1| (CDR |List1|) . #0#)))
                        (LETT |j| (QSADD1 |j|) . #0#) #2=(GO G190) G191
                        (EXIT NIL))
                   (LETT |ind2| 0 . #0#)
                   (LETT |cont2| (|SHP;numbce| |List1| $) . #0#)
                   (SEQ (LETT |j| 1 . #0#) G190
                        (COND ((QSGREATERP |j| |cont2|) #1#))
                        (SEQ (LETT |List1| (CDR |List1|) . #0#)
                             (EXIT (LETT |ind2|
                                    (|SHP;epsil| |cont2|
                                     (SPADCALL |List2| (QREFELT $ 48))
                                     (|SPADfirst| |List1|) $) . #0#)))
                        (LETT |j| (QSADD1 |j|) . #0#) #2# G191
                        (EXIT NIL))
                   (LETT |ind3|
                         (- (|SHP;permanence| |List2| $)
                            (|SHP;variation| |List2| $)) . #0#)
                   (LETT |ind4| (+ |ind2| |ind3|) . #0#)
                   (EXIT (+ |ind4| (|SHP;wfunctaux| |List1| $)))))))))) 

(DEFUN |SHP;wfunct| (|Lsig| $)
  (PROG (|List1|)
    (RETURN
      (SEQ (LETT |List1| (|SHP;qzeros| |Lsig| $) |SHP;wfunct|)
           (EXIT (|SHP;wfunctaux| |List1| $)))))) 

(DEFUN |SHP;SturmHabicht;2UpI;19| (|p1| |p2| $)
  (PROG (|List1| |qp| #0=#:G2145 |j| |p| #1=#:G2146 #2=#:G2140)
    (RETURN
      (SEQ (COND
             ((OR (SPADCALL |p2| (|spadConstant| $ 18) (QREFELT $ 33))
                  (EQL (SPADCALL |p1| (QREFELT $ 10)) 0))
              0)
             ('T
              (SEQ (LETT |List1| (SPADCALL |p1| |p2| (QREFELT $ 42))
                         . #3=(|SHP;SturmHabicht;2UpI;19|))
                   (LETT |qp| (LENGTH |List1|) . #3#)
                   (EXIT (|SHP;wfunct|
                             (PROGN
                               (LETT #0# NIL . #3#)
                               (SEQ (LETT |j| 1 . #3#)
                                    (LETT |p| NIL . #3#)
                                    (LETT #1# |List1| . #3#) G190
                                    (COND
                                      ((OR (ATOM #1#)
                                        (PROGN
                                          (LETT |p| (CAR #1#) . #3#)
                                          NIL)
                                        (QSGREATERP |j| |qp|))
                                       (GO G191)))
                                    (SEQ
                                     (EXIT
                                      (LETT #0#
                                       (CONS
                                        (SPADCALL |p|
                                         (PROG1
                                          (LETT #2# (- |qp| |j|) . #3#)
                                           (|check-subtype| (>= #2# 0)
                                            '(|NonNegativeInteger|)
                                            #2#))
                                         (QREFELT $ 43))
                                        #0#) . #3#)))
                                    (LETT #1#
                                     (PROG1 (CDR #1#)
                                       (LETT |j| (QSADD1 |j|) . #3#)) . #3#)
                                    (GO G190) G191
                                    (EXIT (NREVERSE0 #0#))))
                             $))))))))) 

(DEFUN |SHP;countRealRoots;UpI;20| (|p1| $)
  (SPADCALL |p1| (|spadConstant| $ 12) (QREFELT $ 50))) 

(DEFUN |SHP;SturmHabichtMultiple;2UpI;21| (|p1| |p2| $)
  (PROG (|qp| #0=#:G2173 |j| |p| #1=#:G2174 #2=#:G2148 |ans| SH |sqfr|
              #3=#:G2175 |f| #4=#:G2176)
    (RETURN
      (SEQ (COND
             ((OR (SPADCALL |p2| (|spadConstant| $ 18) (QREFELT $ 33))
                  (EQL (SPADCALL |p1| (QREFELT $ 10)) 0))
              0)
             ('T
              (SEQ (LETT SH (SPADCALL |p1| |p2| (QREFELT $ 42))
                         . #5=(|SHP;SturmHabichtMultiple;2UpI;21|))
                   (LETT |qp| (LENGTH SH) . #5#)
                   (LETT |ans|
                         (|SHP;wfunct|
                             (PROGN
                               (LETT #0# NIL . #5#)
                               (SEQ (LETT |j| 1 . #5#)
                                    (LETT |p| NIL . #5#)
                                    (LETT #1# SH . #5#) G190
                                    (COND
                                      ((OR (ATOM #1#)
                                        (PROGN
                                          (LETT |p| (CAR #1#) . #5#)
                                          NIL)
                                        (QSGREATERP |j| |qp|))
                                       #6=(GO G191)))
                                    (SEQ
                                     (EXIT
                                      (LETT #0#
                                       (CONS
                                        (SPADCALL |p|
                                         (PROG1
                                          (LETT #2# (- |qp| |j|) . #5#)
                                           (|check-subtype| (>= #2# 0)
                                            '(|NonNegativeInteger|)
                                            #2#))
                                         (QREFELT $ 43))
                                        #0#) . #5#)))
                                    (LETT #1#
                                     (PROG1 (CDR #1#)
                                       (LETT |j| (QSADD1 |j|) . #5#)) . #5#)
                                    #7=(GO G190) G191
                                    (EXIT (NREVERSE0 #0#))))
                             $) . #5#)
                   (LETT SH (REVERSE SH) . #5#)
                   (SEQ G190
                        (COND
                          ((NULL (SPADCALL (|SPADfirst| SH)
                                     (|spadConstant| $ 18)
                                     (QREFELT $ 33)))
                           #6#))
                        (SEQ (EXIT (LETT SH (CDR SH) . #5#))) NIL #7#
                        G191 (EXIT NIL))
                   (EXIT (COND
                           ((EQL (SPADCALL (|SPADfirst| SH)
                                     (QREFELT $ 10))
                                 0)
                            |ans|)
                           ((QEQCAR (SPADCALL
                                     (SPADCALL |p1| (QREFELT $ 40))
                                     (|SPADfirst| SH) (QREFELT $ 52))
                                    0)
                            (+ |ans|
                               (SPADCALL (|SPADfirst| SH) |p2|
                                   (QREFELT $ 53))))
                           ('T
                            (SEQ (LETT |sqfr|
                                       (SPADCALL
                                        (SPADCALL |p1| (QREFELT $ 55))
                                        (QREFELT $ 60)) . #5#)
                                 (COND
                                   ((EQL (LENGTH |sqfr|) 1)
                                    (COND
                                      ((EQL
                                        (QVELT (|SPADfirst| |sqfr|) 2)
                                        1)
                                       (EXIT |ans|)))))
                                 (EXIT (SPADCALL (ELT $ 61)
                                        (PROGN
                                          (LETT #3# NIL . #5#)
                                          (SEQ (LETT |f| NIL . #5#)
                                           (LETT #4# |sqfr| . #5#) G190
                                           (COND
                                             ((OR (ATOM #4#)
                                               (PROGN
                                                 (LETT |f|
                                                  (CAR #4#) . #5#)
                                                 NIL))
                                              #6#))
                                           (SEQ
                                            (EXIT
                                             (LETT #3#
                                              (CONS
                                               (* (QVELT |f| 2)
                                                (SPADCALL (QVELT |f| 1)
                                                 |p2| (QREFELT $ 50)))
                                               #3#) . #5#)))
                                           (LETT #4# (CDR #4#) . #5#)
                                           #7# G191
                                           (EXIT (NREVERSE0 #3#))))
                                        (QREFELT $ 64)))))))))))))) 

(DEFUN |SHP;countRealRootsMultiple;UpI;22| (|p1| $)
  (SPADCALL |p1| (|spadConstant| $ 12) (QREFELT $ 53))) 

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

(DEFUN |SturmHabichtPackage;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|SturmHabichtPackage|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$| (LIST '|SturmHabichtPackage| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 66) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#1| '(|GcdDomain|)))) . #0#))
        (|haddProp| |$ConstructorCache| '|SturmHabichtPackage|
            (LIST DV$1 DV$2) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (COND
          ((|testBitVector| |pv$| 1)
           (PROGN
             (QSETREFV $ 53
                 (CONS (|dispatchFunction|
                           |SHP;SturmHabichtMultiple;2UpI;21|)
                       $))
             (QSETREFV $ 65
                 (CONS (|dispatchFunction|
                           |SHP;countRealRootsMultiple;UpI;22|)
                       $)))))
        $)))) 

(MAKEPROP '|SturmHabichtPackage| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|NonNegativeInteger|) (|UnivariatePolynomial| 7 6)
             (0 . |degree|) (5 . |One|) (9 . |One|)
             (13 . |pseudoRemainder|) (19 . |leadingCoefficient|)
             (24 . *) (30 . *) (36 . -) (41 . |Zero|) (45 . **)
             (51 . |Zero|) (55 . |monomial|) (61 . *) (67 . -)
             (|List| 9) (72 . |last|) (|PositiveInteger|) (77 . **)
             (|Union| $ '"failed") (83 . |exquo|) '"last" (89 . |elt|)
             (|Boolean|) (95 . =) (|Integer|) (101 . |elt|)
             |SHP;subresultantSequence;2UpL;4| (107 . |exquo|)
             (113 . |sign|) (118 . |coerce|) (123 . |differentiate|)
             (128 . =) |SHP;SturmHabichtSequence;2UpL;9|
             (134 . |coefficient|) (|List| 6)
             |SHP;SturmHabichtCoefficients;2UpL;10| (140 . |size?|)
             (146 . |elt|) (152 . |last|) (157 . <)
             |SHP;SturmHabicht;2UpI;19| |SHP;countRealRoots;UpI;20|
             (163 . |exquo|) (169 . |SturmHabichtMultiple|)
             (|Factored| $) (175 . |squareFree|)
             (|Union| '"nil" '"sqfr" '"irred" '"prime")
             (|Record| (|:| |flg| 56) (|:| |fctr| 9) (|:| |xpnt| 34))
             (|List| 57) (|Factored| 9) (180 . |factorList|) (185 . +)
             (|Mapping| 34 34 34) (|List| 34) (191 . |reduce|)
             (197 . |countRealRootsMultiple|))
          '#(|subresultantSequence| 202 |countRealRootsMultiple| 208
             |countRealRoots| 213 |SturmHabichtSequence| 218
             |SturmHabichtMultiple| 224 |SturmHabichtCoefficients| 230
             |SturmHabicht| 236)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 65
                                '(1 9 8 0 10 0 6 0 11 0 9 0 12 2 9 0 0
                                  0 13 1 9 6 0 14 2 6 0 0 0 15 2 9 0 6
                                  0 16 1 9 0 0 17 0 9 0 18 2 6 0 0 8 19
                                  0 6 0 20 2 9 0 6 8 21 2 9 0 0 0 22 1
                                  6 0 0 23 1 24 9 0 25 2 6 0 0 26 27 2
                                  9 28 0 6 29 2 24 9 0 30 31 2 9 32 0 0
                                  33 2 24 9 0 34 35 2 8 28 0 0 37 1 6
                                  34 0 38 1 6 0 34 39 1 9 0 0 40 2 6 32
                                  0 0 41 2 9 6 0 8 43 2 44 32 0 8 46 2
                                  44 6 0 34 47 1 44 6 0 48 2 6 32 0 0
                                  49 2 9 28 0 0 52 2 0 34 9 9 53 1 9 54
                                  0 55 1 59 58 0 60 2 34 0 0 0 61 2 63
                                  34 62 0 64 1 0 34 9 65 2 0 24 9 9 36
                                  1 1 34 9 65 1 0 34 9 51 2 0 24 9 9 42
                                  2 1 34 9 9 53 2 0 44 9 9 45 2 0 34 9
                                  9 50)))))
          '|lookupComplete|)) 
