
(/VERSIONCHECK 2) 

(DEFUN |PFR;copypf| (|a| $)
  (CONS (QCAR |a|) (SPADCALL (QCDR |a|) (QREFELT $ 10)))) 

(DEFUN |PFR;LessThan| (|s| |t| $)
  (COND ((GGREATERP (QCDR |s|) (QCDR |t|)) 'NIL) ('T 'T))) 

(DEFUN |PFR;multiplyFracTerms| (|s| |t| $)
  (PROG (#1=#:G708 |d| |c| |coefs| |i|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL (SPADCALL (QCDR |s|) 1 (QREFELT $ 14))
                  (SPADCALL (QCDR |t|) 1 (QREFELT $ 14)) (QREFELT $ 16))
        (|PFR;normalizeFracTerm|
         (CONS (SPADCALL (QCAR |s|) (QCAR |t|) (QREFELT $ 17))
               (SPADCALL (QCDR |s|) (QCDR |t|) (QREFELT $ 18)))
         $))
       (#2='T
        (SEQ
         (LETT |i|
               (SPADCALL (SPADCALL (QCDR |t|) (QREFELT $ 19))
                         (SPADCALL (QCDR |s|) (QREFELT $ 19))
                         (SPADCALL (QCAR |s|) (QCAR |t|) (QREFELT $ 17))
                         (QREFELT $ 22))
               . #3=(|PFR;multiplyFracTerms|))
         (EXIT
          (COND ((QEQCAR |i| 1) (|error| "PartialFraction: not in ideal"))
                (#2#
                 (SEQ (LETT |coefs| (QCDR |i|) . #3#)
                      (LETT |c| (|PFR;copypf| (|spadConstant| $ 23) $) . #3#)
                      (COND
                       ((NULL
                         (SPADCALL (QCDR |coefs|) (|spadConstant| $ 24)
                                   (QREFELT $ 16)))
                        (LETT |c|
                              (|PFR;normalizeFracTerm|
                               (CONS (QCDR |coefs|) (QCDR |t|)) $)
                              . #3#)))
                      (COND
                       ((NULL
                         (SPADCALL (QCAR |coefs|) (|spadConstant| $ 24)
                                   (QREFELT $ 16)))
                        (SEQ
                         (EXIT
                          (SEQ
                           (LETT |d|
                                 (|PFR;normalizeFracTerm|
                                  (CONS (QCAR |coefs|) (QCDR |s|)) $)
                                 . #3#)
                           (PROGN
                            (RPLACA |c|
                                    (SPADCALL (QCAR |c|) (QCAR |d|)
                                              (QREFELT $ 25)))
                            (QCAR |c|))
                           (EXIT
                            (COND
                             ((NULL (NULL (QCDR |d|)))
                              (PROGN
                               (LETT #1#
                                     (PROGN
                                      (RPLACD |c|
                                              (APPEND (QCDR |d|) (QCDR |c|)))
                                      (QCDR |c|))
                                     . #3#)
                               (GO #1#)))))))
                         #1# (EXIT #1#))))
                      (EXIT |c|)))))))))))) 

(DEFUN |PFR;normalizeFracTerm| (|s| $)
  (PROG (|q| |expon| |nexpon| |f| |qr|)
    (RETURN
     (SEQ
      (LETT |qr|
            (SPADCALL (QCAR |s|) (SPADCALL (QCDR |s|) (QREFELT $ 19))
                      (QREFELT $ 27))
            . #1=(|PFR;normalizeFracTerm|))
      (EXIT
       (COND
        ((SPADCALL (QCDR |qr|) (|spadConstant| $ 24) (QREFELT $ 16))
         (CONS (QCAR |qr|) NIL))
        (#2='T
         (SEQ (LETT |f| (SPADCALL (QCDR |s|) 1 (QREFELT $ 14)) . #1#)
              (LETT |nexpon| (SPADCALL (QCDR |s|) 1 (QREFELT $ 28)) . #1#)
              (LETT |expon| 0 . #1#)
              (LETT |q| (SPADCALL (QCDR |qr|) |f| (QREFELT $ 27)) . #1#)
              (SEQ G190
                   (COND
                    ((NULL
                      (COND
                       ((SPADCALL (QCDR |q|) (|spadConstant| $ 24)
                                  (QREFELT $ 16))
                        (< |expon| |nexpon|))
                       ('T 'NIL)))
                     (GO G191)))
                   (SEQ (LETT |expon| (+ |expon| 1) . #1#)
                        (PROGN (RPLACD |qr| (QCAR |q|)) (QCDR |qr|))
                        (EXIT
                         (LETT |q| (SPADCALL (QCDR |qr|) |f| (QREFELT $ 27))
                               . #1#)))
                   NIL (GO G190) G191 (EXIT NIL))
              (EXIT
               (COND
                ((EQL |expon| 0)
                 (CONS (QCAR |qr|) (LIST (CONS (QCDR |qr|) (QCDR |s|)))))
                ((EQL |expon| |nexpon|)
                 (SPADCALL (SPADCALL (QCAR |qr|) (QCDR |qr|) (QREFELT $ 25))
                           (QREFELT $ 30)))
                (#2#
                 (CONS (QCAR |qr|)
                       (LIST
                        (CONS (QCDR |qr|)
                              (SPADCALL |f| (- |nexpon| |expon|)
                                        (QREFELT $ 31)))))))))))))))) 

(DEFUN |PFR;partialFractionNormalized| (|nm| |dn| $)
  (PROG (|c| |d| #1=#:G731 |i| |qr|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |nm| (|spadConstant| $ 24) (QREFELT $ 16))
        (|spadConstant| $ 23))
       ((SPADCALL |dn| (|spadConstant| $ 32) (QREFELT $ 33))
        (SPADCALL |nm| (QREFELT $ 30)))
       ('T
        (SEQ
         (LETT |qr|
               (SPADCALL |nm| (SPADCALL |dn| (QREFELT $ 19)) (QREFELT $ 27))
               . #2=(|PFR;partialFractionNormalized|))
         (LETT |c|
               (CONS (|spadConstant| $ 24)
                     (LIST
                      (CONS (QCDR |qr|)
                            (SPADCALL (SPADCALL |dn| 1 (QREFELT $ 14))
                                      (SPADCALL |dn| 1 (QREFELT $ 28))
                                      (QREFELT $ 31)))))
               . #2#)
         (SEQ (LETT |i| 2 . #2#)
              (LETT #1# (SPADCALL |dn| (QREFELT $ 35)) . #2#) G190
              (COND ((QSGREATERP |i| #1#) (GO G191)))
              (SEQ
               (LETT |d|
                     (CONS (|spadConstant| $ 24)
                           (LIST
                            (CONS (|spadConstant| $ 29)
                                  (SPADCALL (SPADCALL |dn| |i| (QREFELT $ 14))
                                            (SPADCALL |dn| |i| (QREFELT $ 28))
                                            (QREFELT $ 31)))))
                     . #2#)
               (EXIT (LETT |c| (SPADCALL |c| |d| (QREFELT $ 36)) . #2#)))
              (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
         (EXIT
          (SPADCALL (SPADCALL (QCAR |qr|) (QREFELT $ 30)) |c|
                    (QREFELT $ 37)))))))))) 

(DEFUN |PFR;padicFraction;2$;6| (|a| $)
  (PROG (|d| |sp| |l| |f| |e| #1=#:G742 |s| |b|)
    (RETURN
     (SEQ
      (LETT |b| (SPADCALL |a| (QREFELT $ 38)) . #2=(|PFR;padicFraction;2$;6|))
      (EXIT
       (COND ((NULL (QCDR |b|)) |b|)
             ('T
              (SEQ (LETT |l| NIL . #2#)
                   (SEQ (LETT |s| NIL . #2#) (LETT #1# (QCDR |b|) . #2#) G190
                        (COND
                         ((OR (ATOM #1#)
                              (PROGN (LETT |s| (CAR #1#) . #2#) NIL))
                          #3=(GO G191)))
                        (SEQ
                         (LETT |e| (SPADCALL (QCDR |s|) 1 (QREFELT $ 28))
                               . #2#)
                         (EXIT
                          (COND ((EQL |e| 1) (LETT |l| (CONS |s| |l|) . #2#))
                                ('T
                                 (SEQ
                                  (LETT |f|
                                        (SPADCALL (QCDR |s|) 1 (QREFELT $ 14))
                                        . #2#)
                                  (LETT |d|
                                        (SPADCALL
                                         (LETT |sp|
                                               (SPADCALL |f| (QCAR |s|)
                                                         (QREFELT $ 40))
                                               . #2#)
                                         (QREFELT $ 41))
                                        . #2#)
                                  (EXIT
                                   (SEQ G190
                                        (COND
                                         ((NULL
                                           (COND
                                            ((SPADCALL |sp|
                                                       (|spadConstant| $ 42)
                                                       (QREFELT $ 43))
                                             'NIL)
                                            ('T 'T)))
                                          #3#))
                                        (SEQ
                                         (LETT |l|
                                               (CONS
                                                (CONS
                                                 (SPADCALL |sp| (QREFELT $ 44))
                                                 (SPADCALL |f| (- |e| |d|)
                                                           (QREFELT $ 31)))
                                                |l|)
                                               . #2#)
                                         (EXIT
                                          (LETT |d|
                                                (SPADCALL
                                                 (LETT |sp|
                                                       (SPADCALL |sp|
                                                                 (QREFELT $
                                                                          45))
                                                       . #2#)
                                                 (QREFELT $ 41))
                                                . #2#)))
                                        NIL #4=(GO G190) G191 (EXIT NIL))))))))
                        (LETT #1# (CDR #1#) . #2#) #4# G191 (EXIT NIL))
                   (EXIT
                    (CONS (QCAR |b|)
                          (SPADCALL (CONS (|function| |PFR;LessThan|) $) |l|
                                    (QREFELT $ 47)))))))))))) 

(DEFUN |PFR;compactFraction;2$;7| (|a| $)
  (PROG (|b| |e| |f| |s| |bf| |bw| #1=#:G746 #2=#:G754 |t| |af|)
    (RETURN
     (SEQ
      (COND ((< (LENGTH (QCDR |a|)) 2) |a|)
            ('T
             (SEQ
              (LETT |af| (REVERSE (QCDR |a|))
                    . #3=(|PFR;compactFraction;2$;7|))
              (LETT |bf| NIL . #3#) (LETT |bw| (QCAR |a|) . #3#)
              (LETT |s|
                    (CONS (QCAR (|SPADfirst| |af|)) (QCDR (|SPADfirst| |af|)))
                    . #3#)
              (LETT |f| (SPADCALL (QCDR |s|) 1 (QREFELT $ 14)) . #3#)
              (LETT |e| (SPADCALL (QCDR |s|) 1 (QREFELT $ 28)) . #3#)
              (SEQ (LETT |t| NIL . #3#) (LETT #2# (CDR |af|) . #3#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |t| (CAR #2#) . #3#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (COND
                      ((SPADCALL |f| (SPADCALL (QCDR |t|) 1 (QREFELT $ 14))
                                 (QREFELT $ 16))
                       (PROGN
                        (RPLACA |s|
                                (SPADCALL (QCAR |s|)
                                          (SPADCALL (QCAR |t|)
                                                    (SPADCALL |f|
                                                              (PROG1
                                                                  (LETT #1#
                                                                        (- |e|
                                                                           (SPADCALL
                                                                            (QCDR
                                                                             |t|)
                                                                            1
                                                                            (QREFELT
                                                                             $
                                                                             28)))
                                                                        . #3#)
                                                                (|check-subtype|
                                                                 (>= #1# 0)
                                                                 '(|NonNegativeInteger|)
                                                                 #1#))
                                                              (QREFELT $ 49))
                                                    (QREFELT $ 17))
                                          (QREFELT $ 25)))
                        (QCAR |s|)))
                      ('T
                       (SEQ (LETT |b| (|PFR;normalizeFracTerm| |s| $) . #3#)
                            (LETT |bw|
                                  (SPADCALL |bw| (QCAR |b|) (QREFELT $ 25))
                                  . #3#)
                            (COND
                             ((NULL (NULL (QCDR |b|)))
                              (LETT |bf| (CONS (|SPADfirst| (QCDR |b|)) |bf|)
                                    . #3#)))
                            (LETT |s| (CONS (QCAR |t|) (QCDR |t|)) . #3#)
                            (LETT |f| (SPADCALL (QCDR |s|) 1 (QREFELT $ 14))
                                  . #3#)
                            (EXIT
                             (LETT |e| (SPADCALL (QCDR |s|) 1 (QREFELT $ 28))
                                   . #3#)))))))
                   (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
              (LETT |b| (|PFR;normalizeFracTerm| |s| $) . #3#)
              (EXIT
               (CONS (SPADCALL |bw| (QCAR |b|) (QREFELT $ 25))
                     (APPEND (QCDR |b|) |bf|)))))))))) 

(DEFUN |PFR;Zero;$;8| ($) (CONS (|spadConstant| $ 24) NIL)) 

(DEFUN |PFR;One;$;9| ($) (CONS (|spadConstant| $ 29) NIL)) 

(DEFUN |PFR;characteristic;Nni;10| ($) (SPADCALL (QREFELT $ 50))) 

(PUT '|PFR;coerce;R$;11| '|SPADreplace| '(XLAM (|r|) (CONS |r| NIL))) 

(DEFUN |PFR;coerce;R$;11| (|r| $) (CONS |r| NIL)) 

(DEFUN |PFR;coerce;I$;12| (|n| $) (CONS (SPADCALL |n| (QREFELT $ 52)) NIL)) 

(DEFUN |PFR;coerce;$F;13| (|a| $)
  (PROG (|q| #1=#:G768 |s|)
    (RETURN
     (SEQ
      (LETT |q| (SPADCALL (QCAR |a|) (QREFELT $ 55)) . #2=(|PFR;coerce;$F;13|))
      (SEQ (LETT |s| NIL . #2#) (LETT #1# (QCDR |a|) . #2#) G190
           (COND
            ((OR (ATOM #1#) (PROGN (LETT |s| (CAR #1#) . #2#) NIL)) (GO G191)))
           (SEQ
            (EXIT
             (LETT |q|
                   (SPADCALL |q|
                             (SPADCALL (QCAR |s|)
                                       (SPADCALL (QCDR |s|) (QREFELT $ 19))
                                       (QREFELT $ 56))
                             (QREFELT $ 57))
                   . #2#)))
           (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT |q|))))) 

(DEFUN |PFR;coerce;F$;14| (|q| $)
  (PROG (|r1| |u| #1=#:G774)
    (RETURN
     (SEQ
      (LETT |u|
            (PROG2
                (LETT #1#
                      (SPADCALL
                       (SPADCALL (SPADCALL |q| (QREFELT $ 60)) (QREFELT $ 61))
                       (QREFELT $ 63))
                      . #2=(|PFR;coerce;F$;14|))
                (QCDR #1#)
              (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))
            . #2#)
      (LETT |r1|
            (SPADCALL |u|
                      (SPADCALL (SPADCALL |q| (QREFELT $ 64)) (QREFELT $ 19))
                      (QREFELT $ 17))
            . #2#)
      (EXIT
       (|PFR;partialFractionNormalized| |r1|
        (SPADCALL |u| (SPADCALL |q| (QREFELT $ 60)) (QREFELT $ 65)) $)))))) 

(DEFUN |PFR;exquo;2$U;15| (|a| |b| $)
  (PROG (|br|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |b| (|spadConstant| $ 23) (QREFELT $ 67)) (CONS 1 "failed"))
       ((SPADCALL |b| (|spadConstant| $ 11) (QREFELT $ 67)) (CONS 0 |a|))
       ('T
        (SEQ
         (LETT |br| (SPADCALL (SPADCALL |b| (QREFELT $ 58)) (QREFELT $ 68))
               |PFR;exquo;2$U;15|)
         (EXIT
          (CONS 0
                (SPADCALL |a|
                          (SPADCALL (SPADCALL |br| (QREFELT $ 69))
                                    (SPADCALL (SPADCALL |br| (QREFELT $ 70))
                                              (QREFELT $ 71))
                                    (QREFELT $ 72))
                          (QREFELT $ 36))))))))))) 

(DEFUN |PFR;recip;$U;16| (|a| $)
  (SPADCALL (|spadConstant| $ 11) |a| (QREFELT $ 73))) 

(DEFUN |PFR;firstDenom;$F;17| (|a| $)
  (COND ((NULL (QCDR |a|)) (|spadConstant| $ 32))
        ('T (QCDR (|SPADfirst| (QCDR |a|)))))) 

(DEFUN |PFR;firstNumer;$R;18| (|a| $)
  (COND ((NULL (QCDR |a|)) (|spadConstant| $ 24))
        ('T (QCAR (|SPADfirst| (QCDR |a|)))))) 

(DEFUN |PFR;numberOfFractionalTerms;$I;19| (|a| $) (LENGTH (QCDR |a|))) 

(DEFUN |PFR;nthFractionalTerm;$I$;20| (|a| |n| $)
  (PROG (|l|)
    (RETURN
     (SEQ (LETT |l| (QCDR |a|) |PFR;nthFractionalTerm;$I$;20|)
          (COND
           ((OR (< |n| 1) (< (LENGTH |l|) |n|)) (EXIT (|spadConstant| $ 23))))
          (EXIT
           (CONS (|spadConstant| $ 24)
                 (LIST (SPADCALL |l| |n| (QREFELT $ 78))))))))) 

(PUT '|PFR;wholePart;$R;21| '|SPADreplace| 'QCAR) 

(DEFUN |PFR;wholePart;$R;21| (|a| $) (QCAR |a|)) 

(DEFUN |PFR;partialFraction;RF$;22| (|nm| |dn| $)
  (PROG (|u| #1=#:G804)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |nm| (|spadConstant| $ 24) (QREFELT $ 16))
        (|spadConstant| $ 23))
       ('T
        (SEQ
         (LETT |u| (SPADCALL |dn| (QREFELT $ 61))
               . #2=(|PFR;partialFraction;RF$;22|))
         (LETT |u|
               (PROG2
                   (LETT #1# (SPADCALL |u| (QREFELT $ 63)) . #2#)
                   (QCDR #1#)
                 (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))
               . #2#)
         (EXIT
          (|PFR;partialFractionNormalized| (SPADCALL |u| |nm| (QREFELT $ 17))
           (SPADCALL |u| |dn| (QREFELT $ 65)) $))))))))) 

(DEFUN |PFR;padicallyExpand;2RSup;23| (|p| |r| $)
  (PROG (|qr|)
    (RETURN
     (SEQ
      (LETT |qr| (SPADCALL |r| |p| (QREFELT $ 27))
            |PFR;padicallyExpand;2RSup;23|)
      (EXIT
       (COND
        ((SPADCALL (QCAR |qr|) (|spadConstant| $ 24) (QREFELT $ 16))
         (SPADCALL (QCDR |qr|) (QREFELT $ 81)))
        ('T
         (SPADCALL (SPADCALL (QCDR |qr|) (QREFELT $ 81))
                   (SPADCALL (SPADCALL (|spadConstant| $ 29) 1 (QREFELT $ 82))
                             (SPADCALL |p| (QCAR |qr|) (QREFELT $ 40))
                             (QREFELT $ 83))
                   (QREFELT $ 84))))))))) 

(DEFUN |PFR;=;2$B;24| (|a| |b| $)
  (COND ((NULL (SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 16))) 'NIL)
        ('T
         (COND
          ((NULL (QCDR |a|))
           (COND
            ((NULL (QCDR |b|)) (SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 16)))
            (#1='T 'NIL)))
          ((NULL (QCDR |b|)) 'NIL)
          (#1#
           (SPADCALL (SPADCALL |a| (QREFELT $ 58))
                     (SPADCALL |b| (QREFELT $ 58)) (QREFELT $ 85))))))) 

(DEFUN |PFR;-;2$;25| (|a| $)
  (PROG (|l| #1=#:G823 |s|)
    (RETURN
     (SEQ (LETT |l| NIL . #2=(|PFR;-;2$;25|))
          (SEQ (LETT |s| NIL . #2#) (LETT #1# (REVERSE (QCDR |a|)) . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |s| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (LETT |l|
                       (CONS
                        (CONS (SPADCALL (QCAR |s|) (QREFELT $ 86)) (QCDR |s|))
                        |l|)
                       . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (CONS (SPADCALL (QCAR |a|) (QREFELT $ 86)) |l|)))))) 

(DEFUN |PFR;*;R2$;26| (|r| |a| $)
  (PROG (#1=#:G826 |c| #2=#:G830 |s| |b|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |r| (|spadConstant| $ 24) (QREFELT $ 16))
        (|spadConstant| $ 23))
       ((SPADCALL |r| (|spadConstant| $ 29) (QREFELT $ 16)) |a|)
       ('T
        (SEQ
         (LETT |b|
               (SPADCALL (SPADCALL |r| (QCAR |a|) (QREFELT $ 17))
                         (QREFELT $ 30))
               . #3=(|PFR;*;R2$;26|))
         (SEQ (LETT |s| NIL . #3#) (LETT #2# (REVERSE (QCDR |a|)) . #3#) G190
              (COND
               ((OR (ATOM #2#) (PROGN (LETT |s| (CAR #2#) . #3#) NIL))
                (GO G191)))
              (SEQ
               (EXIT
                (SEQ
                 (LETT |c|
                       (|PFR;normalizeFracTerm|
                        (CONS (SPADCALL |r| (QCAR |s|) (QREFELT $ 17))
                              (QCDR |s|))
                        $)
                       . #3#)
                 (PROGN
                  (RPLACA |b| (SPADCALL (QCAR |b|) (QCAR |c|) (QREFELT $ 25)))
                  (QCAR |b|))
                 (EXIT
                  (COND
                   ((NULL (NULL (QCDR |c|)))
                    (PROGN
                     (LETT #1#
                           (PROGN
                            (RPLACD |b| (APPEND (QCDR |c|) (QCDR |b|)))
                            (QCDR |b|))
                           . #3#)
                     (GO #1#)))))))
               #1# (EXIT #1#))
              (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
         (EXIT |b|)))))))) 

(DEFUN |PFR;*;I2$;27| (|n| |a| $)
  (SPADCALL (SPADCALL |n| (QREFELT $ 52)) |a| (QREFELT $ 88))) 

(DEFUN |PFR;+;3$;28| (|a| |b| $)
  (SPADCALL
   (CONS (SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 25))
         (SPADCALL (CONS (|function| |PFR;LessThan|) $)
                   (APPEND (QCDR |a|) (SPADCALL (QCDR |b|) (QREFELT $ 10)))
                   (QREFELT $ 47)))
   (QREFELT $ 38))) 

(DEFUN |PFR;*;3$;29| (|a| |b| $)
  (PROG (|c| #1=#:G843 |t| #2=#:G842 |s| |af|)
    (RETURN
     (SEQ
      (COND ((NULL (QCDR |a|)) (SPADCALL (QCAR |a|) |b| (QREFELT $ 88)))
            ((NULL (QCDR |b|)) (SPADCALL (QCAR |b|) |a| (QREFELT $ 88)))
            ('T
             (SEQ
              (LETT |af| (CONS (|spadConstant| $ 24) (QCDR |a|))
                    . #3=(|PFR;*;3$;29|))
              (LETT |c|
                    (SPADCALL (SPADCALL (QCAR |a|) |b| (QREFELT $ 88))
                              (SPADCALL (QCAR |b|) |af| (QREFELT $ 88))
                              (QREFELT $ 37))
                    . #3#)
              (SEQ (LETT |s| NIL . #3#) (LETT #2# (QCDR |a|) . #3#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |s| (CAR #2#) . #3#) NIL))
                     #4=(GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |t| NIL . #3#) (LETT #1# (QCDR |b|) . #3#) G190
                          (COND
                           ((OR (ATOM #1#)
                                (PROGN (LETT |t| (CAR #1#) . #3#) NIL))
                            #4#))
                          (SEQ
                           (EXIT
                            (LETT |c|
                                  (SPADCALL |c|
                                            (|PFR;multiplyFracTerms| |s| |t| $)
                                            (QREFELT $ 37))
                                  . #3#)))
                          (LETT #1# (CDR #1#) . #3#) #5=(GO G190) G191
                          (EXIT NIL))))
                   (LETT #2# (CDR #2#) . #3#) #5# G191 (EXIT NIL))
              (EXIT |c|)))))))) 

(DEFUN |PFR;coerce;$Of;30| (|a| $)
  (PROG (|l| #1=#:G853 |s|)
    (RETURN
     (SEQ
      (COND ((NULL (QCDR |a|)) (SPADCALL (QCAR |a|) (QREFELT $ 91)))
            (#2='T
             (SEQ
              (COND
               ((SPADCALL (QCAR |a|) (|spadConstant| $ 24) (QREFELT $ 16))
                (LETT |l| NIL . #3=(|PFR;coerce;$Of;30|)))
               (#2#
                (LETT |l| (LIST (SPADCALL (QCAR |a|) (QREFELT $ 91))) . #3#)))
              (SEQ (LETT |s| NIL . #3#) (LETT #1# (QCDR |a|) . #3#) G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |s| (CAR #1#) . #3#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (COND
                      ((SPADCALL (QCDR |s|) (|spadConstant| $ 32)
                                 (QREFELT $ 33))
                       (LETT |l|
                             (CONS (SPADCALL (QCAR |s|) (QREFELT $ 91)) |l|)
                             . #3#))
                      ('T
                       (LETT |l|
                             (CONS
                              (SPADCALL (SPADCALL (QCAR |s|) (QREFELT $ 91))
                                        (SPADCALL (QCDR |s|) (QREFELT $ 92))
                                        (QREFELT $ 93))
                              |l|)
                             . #3#)))))
                   (LETT #1# (CDR #1#) . #3#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (COND ((EQL (LENGTH |l|) 1) (|SPADfirst| |l|))
                     (#2#
                      (SPADCALL (ELT $ 94) (REVERSE |l|)
                                (QREFELT $ 97)))))))))))) 

(DEFUN |PartialFraction| (#1=#:G860)
  (PROG ()
    (RETURN
     (PROG (#2=#:G861)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|PartialFraction|)
                                           '|domainEqualList|)
                . #3=(|PartialFraction|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|PartialFraction;| #1#) (LETT #2# T . #3#))
            (COND
             ((NOT #2#) (HREM |$ConstructorCache| '|PartialFraction|))))))))))) 

(DEFUN |PartialFraction;| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|PartialFraction|))
      (LETT |dv$| (LIST '|PartialFraction| DV$1) . #1#)
      (LETT $ (GETREFV 110) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|PartialFraction| (LIST DV$1)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7
                (|Record| (|:| |whole| |#1|)
                          (|:| |fract|
                               (|List|
                                (|Record| (|:| |num| |#1|)
                                          (|:| |den| (|Factored| |#1|)))))))
      $)))) 

(MAKEPROP '|PartialFraction| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) '|Rep|
              (|Record| (|:| |num| 6) (|:| |den| 13)) (|List| 8) (0 . |copy|)
              (CONS IDENTITY (FUNCALL (|dispatchFunction| |PFR;One;$;9|) $))
              (|Integer|) (|Factored| 6) (5 . |nthFactor|) (|Boolean|) (11 . =)
              (17 . *) (23 . *) (29 . |expand|)
              (|Record| (|:| |coef1| $) (|:| |coef2| $))
              (|Union| 20 '#1="failed") (34 . |extendedEuclidean|)
              (CONS IDENTITY (FUNCALL (|dispatchFunction| |PFR;Zero;$;8|) $))
              (41 . |Zero|) (45 . +)
              (|Record| (|:| |quotient| $) (|:| |remainder| $)) (51 . |divide|)
              (57 . |nthExponent|) (63 . |One|) |PFR;coerce;R$;11|
              (67 . |nilFactor|) (73 . |One|) (77 . =) (|NonNegativeInteger|)
              (83 . |numberOfFactors|) |PFR;*;3$;29| |PFR;+;3$;28|
              |PFR;compactFraction;2$;7| (|SparseUnivariatePolynomial| 6)
              |PFR;padicallyExpand;2RSup;23| (88 . |degree|) (93 . |Zero|)
              (97 . =) (103 . |leadingCoefficient|) (108 . |reductum|)
              (|Mapping| 15 8 8) (113 . |sort|) |PFR;padicFraction;2$;6|
              (119 . ^) (125 . |characteristic|) |PFR;characteristic;Nni;10|
              (129 . |coerce|) |PFR;coerce;I$;12| (|Fraction| 6)
              (134 . |coerce|) (139 . /) (145 . +) |PFR;coerce;$F;13|
              (|Fraction| 13) (151 . |denom|) (156 . |unit|)
              (|Union| $ '"failed") (161 . |recip|) (166 . |numer|) (171 . *)
              |PFR;coerce;F$;14| |PFR;=;2$B;24| (177 . |inv|) (182 . |numer|)
              (187 . |denom|) (192 . |coerce|) |PFR;partialFraction;RF$;22|
              |PFR;exquo;2$U;15| |PFR;recip;$U;16| |PFR;firstDenom;$F;17|
              |PFR;firstNumer;$R;18| |PFR;numberOfFractionalTerms;$I;19|
              (197 . |elt|) |PFR;nthFractionalTerm;$I$;20|
              |PFR;wholePart;$R;21| (203 . |coerce|) (208 . |monomial|)
              (214 . *) (220 . +) (226 . =) (232 . -) |PFR;-;2$;25|
              |PFR;*;R2$;26| |PFR;*;I2$;27| (|OutputForm|) (237 . |coerce|)
              (242 . |coerce|) (247 . /) (253 . +) (|Mapping| 90 90 90)
              (|List| 90) (259 . |reduce|) |PFR;coerce;$Of;30| (|Fraction| 12)
              (|Factored| $) (|Union| 102 '#1#) (|List| $)
              (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
              (|Record| (|:| |coef| 102) (|:| |generator| $))
              (|SparseUnivariatePolynomial| $)
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|PositiveInteger|) (|SingleInteger|) (|String|))
           '#(~= 265 |zero?| 271 |wholePart| 276 |unitNormal| 281
              |unitCanonical| 286 |unit?| 291 |subtractIfCan| 296
              |squareFreePart| 302 |squareFree| 307 |sizeLess?| 312 |sample|
              318 |rem| 322 |recip| 328 |quo| 333 |principalIdeal| 339 |prime?|
              344 |partialFraction| 349 |padicallyExpand| 355 |padicFraction|
              361 |one?| 366 |numberOfFractionalTerms| 371 |nthFractionalTerm|
              376 |multiEuclidean| 382 |lcm| 388 |latex| 399 |inv| 404 |hash|
              409 |gcdPolynomial| 414 |gcd| 420 |firstNumer| 431 |firstDenom|
              436 |factor| 441 |extendedEuclidean| 446 |exquo| 459
              |expressIdealMember| 465 |euclideanSize| 471 |divide| 476
              |compactFraction| 482 |coerce| 487 |characteristic| 522
              |associates?| 526 ^ 532 |Zero| 550 |One| 554 = 558 / 564 - 570 +
              581 * 587)
           'NIL
           (CONS
            (|makeByteWordVec2| 1
                                '(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                                  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
            (CONS
             '#(|Field&| |EuclideanDomain&| NIL |UniqueFactorizationDomain&|
                |GcdDomain&| |DivisionRing&| |IntegralDomain&| |Algebra&|
                |Algebra&| |Algebra&| |Module&| |Module&| NIL NIL |Module&| NIL
                NIL NIL |Ring&| NIL NIL NIL NIL NIL NIL NIL |AbelianGroup&| NIL
                NIL |AbelianMonoid&| |Monoid&| NIL |SemiGroup&|
                |AbelianSemiGroup&| |SetCategory&| NIL NIL NIL NIL NIL
                |BasicType&| NIL)
             (CONS
              '#((|Field|) (|EuclideanDomain|) (|PrincipalIdealDomain|)
                 (|UniqueFactorizationDomain|) (|GcdDomain|) (|DivisionRing|)
                 (|IntegralDomain|) (|Algebra| 6) (|Algebra| 99) (|Algebra| $$)
                 (|Module| 6) (|Module| 99) (|EntireRing|) (|CommutativeRing|)
                 (|Module| $$) (|BiModule| 6 6) (|BiModule| 99 99)
                 (|BiModule| $$ $$) (|Ring|) (|RightModule| 6) (|LeftModule| 6)
                 (|RightModule| 99) (|LeftModule| 99) (|LeftModule| $$) (|Rng|)
                 (|RightModule| $$) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|SemiRing|) (|AbelianMonoid|)
                 (|Monoid|) (|SemiRng|) (|SemiGroup|) (|AbelianSemiGroup|)
                 (|SetCategory|) (|canonicalsClosed|) (|canonicalUnitNormal|)
                 (|noZeroDivisors|) (|CommutativeStar|) (|unitsKnown|)
                 (|BasicType|) (|CoercibleTo| 90))
              (|makeByteWordVec2| 109
                                  '(1 9 0 0 10 2 13 6 0 12 14 2 6 15 0 0 16 2 6
                                    0 0 0 17 2 13 0 0 0 18 1 13 6 0 19 3 6 21 0
                                    0 0 22 0 6 0 24 2 6 0 0 0 25 2 6 26 0 0 27
                                    2 13 12 0 12 28 0 6 0 29 2 13 0 6 12 31 0
                                    13 0 32 2 13 15 0 0 33 1 13 34 0 35 1 39 34
                                    0 41 0 39 0 42 2 39 15 0 0 43 1 39 6 0 44 1
                                    39 0 0 45 2 9 0 46 0 47 2 6 0 0 34 49 0 6
                                    34 50 1 6 0 12 52 1 54 0 6 55 2 54 0 6 6 56
                                    2 54 0 0 0 57 1 59 13 0 60 1 13 6 0 61 1 6
                                    62 0 63 1 59 13 0 64 2 13 0 6 0 65 1 54 0 0
                                    68 1 54 6 0 69 1 54 6 0 70 1 13 0 6 71 2 9
                                    8 0 12 78 1 39 0 6 81 2 39 0 6 34 82 2 39 0
                                    0 0 83 2 39 0 0 0 84 2 54 15 0 0 85 1 6 0 0
                                    86 1 6 90 0 91 1 13 90 0 92 2 90 0 0 0 93 2
                                    90 0 0 0 94 2 96 90 95 0 97 2 0 15 0 0 1 1
                                    0 15 0 1 1 0 6 0 80 1 0 106 0 1 1 0 0 0 1 1
                                    0 15 0 1 2 0 62 0 0 1 1 0 0 0 1 1 0 100 0 1
                                    2 0 15 0 0 1 0 0 0 1 2 0 0 0 0 1 1 0 62 0
                                    74 2 0 0 0 0 1 1 0 104 102 1 1 0 15 0 1 2 0
                                    0 6 13 72 2 0 39 6 6 40 1 0 0 0 48 1 0 15 0
                                    1 1 0 12 0 77 2 0 0 0 12 79 2 0 101 102 0 1
                                    1 0 0 102 1 2 0 0 0 0 1 1 0 109 0 1 1 0 0 0
                                    1 1 0 108 0 1 2 0 105 105 105 1 1 0 0 102 1
                                    2 0 0 0 0 1 1 0 6 0 76 1 0 13 0 75 1 0 100
                                    0 1 2 0 103 0 0 1 3 0 21 0 0 0 1 2 0 62 0 0
                                    73 2 0 101 102 0 1 1 0 34 0 1 2 0 26 0 0 1
                                    1 0 0 0 38 1 0 0 59 66 1 0 54 0 58 1 0 0 6
                                    30 1 0 0 99 1 1 0 0 12 53 1 0 0 0 1 1 0 90
                                    0 98 0 0 34 51 2 0 15 0 0 1 2 0 0 0 12 1 2
                                    0 0 0 34 1 2 0 0 0 107 1 0 0 0 23 0 0 0 11
                                    2 0 15 0 0 67 2 0 0 0 0 1 2 0 0 0 0 1 1 0 0
                                    0 87 2 0 0 0 0 37 2 0 0 0 6 1 2 0 0 6 0 88
                                    2 0 0 99 0 1 2 0 0 0 99 1 2 0 0 0 0 36 2 0
                                    0 12 0 89 2 0 0 34 0 1 2 0 0 107 0 1)))))
           '|lookupComplete|)) 
