
(/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 (|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)))
         $))
       (#1='T
        (SEQ
         (LETT |i|
               (SPADCALL (SPADCALL (QCDR |t|) (QREFELT $ 19))
                         (SPADCALL (QCDR |s|) (QREFELT $ 19))
                         (SPADCALL (QCAR |s|) (QCAR |t|) (QREFELT $ 17))
                         (QREFELT $ 22))
               . #2=(|PFR;multiplyFracTerms|))
         (EXIT
          (COND ((QEQCAR |i| 1) (|error| "PartialFraction: not in ideal"))
                (#1#
                 (SEQ (LETT |coefs| (QCDR |i|) . #2#)
                      (LETT |c| (|PFR;copypf| (|spadConstant| $ 23) $) . #2#)
                      (COND
                       ((SPADCALL (QCDR |coefs|) (|spadConstant| $ 24)
                                  (QREFELT $ 25))
                        (LETT |c|
                              (|PFR;normalizeFracTerm|
                               (CONS (QCDR |coefs|) (QCDR |t|)) $)
                              . #2#)))
                      (COND
                       ((SPADCALL (QCAR |coefs|) (|spadConstant| $ 24)
                                  (QREFELT $ 25))
                        (SEQ
                         (LETT |d|
                               (|PFR;normalizeFracTerm|
                                (CONS (QCAR |coefs|) (QCDR |s|)) $)
                               . #2#)
                         (PROGN
                          (RPLACA |c|
                                  (SPADCALL (QCAR |c|) (QCAR |d|)
                                            (QREFELT $ 26)))
                          (QCAR |c|))
                         (EXIT
                          (COND
                           ((NULL (NULL (QCDR |d|)))
                            (PROGN
                             (RPLACD |c| (APPEND (QCDR |d|) (QCDR |c|)))
                             (QCDR |c|))))))))
                      (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 $ 28))
            . #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 $ 29)) . #1#)
              (LETT |expon| 0 . #1#)
              (LETT |q| (SPADCALL (QCDR |qr|) |f| (QREFELT $ 28)) . #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 $ 28))
                               . #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 $ 26))
                           (QREFELT $ 31)))
                (#2#
                 (CONS (QCAR |qr|)
                       (LIST
                        (CONS (QCDR |qr|)
                              (SPADCALL |f| (- |nexpon| |expon|)
                                        (QREFELT $ 32)))))))))))))))) 

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

(DEFUN |PFR;padicFraction;2$;6| (|a| $)
  (PROG (|d| |sp| |l| |f| |e| #1=#:G1891 |s| |b|)
    (RETURN
     (SEQ
      (LETT |b| (SPADCALL |a| (QREFELT $ 39)) . #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))
                          (GO G191)))
                        (SEQ
                         (LETT |e| (SPADCALL (QCDR |s|) 1 (QREFELT $ 29))
                               . #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 $ 41))
                                               . #2#)
                                         (QREFELT $ 42))
                                        . #2#)
                                  (EXIT
                                   (SEQ G190
                                        (COND
                                         ((NULL
                                           (SPADCALL |sp| (|spadConstant| $ 43)
                                                     (QREFELT $ 44)))
                                          (GO G191)))
                                        (SEQ
                                         (LETT |l|
                                               (CONS
                                                (CONS
                                                 (SPADCALL |sp| (QREFELT $ 45))
                                                 (SPADCALL |f| (- |e| |d|)
                                                           (QREFELT $ 32)))
                                                |l|)
                                               . #2#)
                                         (EXIT
                                          (LETT |d|
                                                (SPADCALL
                                                 (LETT |sp|
                                                       (SPADCALL |sp|
                                                                 (QREFELT $
                                                                          46))
                                                       . #2#)
                                                 (QREFELT $ 42))
                                                . #2#)))
                                        NIL (GO G190) G191 (EXIT NIL))))))))
                        (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
                   (EXIT
                    (CONS (QCAR |b|)
                          (SPADCALL (CONS (|function| |PFR;LessThan|) $) |l|
                                    (QREFELT $ 48)))))))))))) 

(DEFUN |PFR;compactFraction;2$;7| (|a| $)
  (PROG (|b| |e| |f| |s| |bf| |bw| #1=#:G1895 #2=#:G1903 |t| |af|)
    (RETURN
     (SEQ
      (COND ((SPADCALL 2 (LENGTH (QCDR |a|)) (QREFELT $ 50)) |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 $ 29)) . #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
                                                                             $
                                                                             29)))
                                                                        . #3#)
                                                                (|check-subtype|
                                                                 (>= #1# 0)
                                                                 '(|NonNegativeInteger|)
                                                                 #1#))
                                                              (QREFELT $ 51))
                                                    (QREFELT $ 17))
                                          (QREFELT $ 26)))
                        (QCAR |s|)))
                      ('T
                       (SEQ (LETT |b| (|PFR;normalizeFracTerm| |s| $) . #3#)
                            (LETT |bw|
                                  (SPADCALL |bw| (QCAR |b|) (QREFELT $ 26))
                                  . #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 $ 29))
                                   . #3#)))))))
                   (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
              (LETT |b| (|PFR;normalizeFracTerm| |s| $) . #3#)
              (EXIT
               (CONS (SPADCALL |bw| (QCAR |b|) (QREFELT $ 26))
                     (APPEND (QCDR |b|) |bf|)))))))))) 

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

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

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

(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 $ 54)) NIL)) 

(DEFUN |PFR;coerce;$F;13| (|a| $)
  (PROG (|q| #1=#:G1920 |s|)
    (RETURN
     (SEQ
      (LETT |q| (SPADCALL (QCAR |a|) (QREFELT $ 57)) . #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 $ 58))
                             (QREFELT $ 59))
                   . #2#)))
           (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT |q|))))) 

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

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

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

(DEFUN |PFR;firstDenom;$F;17| (|a| $)
  (COND ((NULL (QCDR |a|)) (|spadConstant| $ 33))
        ('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) (SPADCALL |n| (LENGTH |l|) (QREFELT $ 50)))
            (EXIT (|spadConstant| $ 23))))
          (EXIT
           (CONS (|spadConstant| $ 24)
                 (LIST (SPADCALL |l| |n| (QREFELT $ 80))))))))) 

(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=#:G1961)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |nm| (|spadConstant| $ 24) (QREFELT $ 16))
        (|spadConstant| $ 23))
       ('T
        (SEQ
         (LETT |u| (SPADCALL |dn| (QREFELT $ 63))
               . #2=(|PFR;partialFraction;RF$;22|))
         (LETT |u|
               (PROG2
                   (LETT #1# (SPADCALL |u| (QREFELT $ 65)) . #2#)
                   (QCDR #1#)
                 (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))
               . #2#)
         (EXIT
          (|PFR;partialFractionNormalized| (SPADCALL |u| |nm| (QREFELT $ 17))
           (SPADCALL |u| |dn| (QREFELT $ 67)) $))))))))) 

(DEFUN |PFR;padicallyExpand;2RSup;23| (|p| |r| $)
  (PROG (|qr|)
    (RETURN
     (SEQ
      (LETT |qr| (SPADCALL |r| |p| (QREFELT $ 28))
            |PFR;padicallyExpand;2RSup;23|)
      (EXIT
       (COND
        ((SPADCALL (QCAR |qr|) (|spadConstant| $ 24) (QREFELT $ 16))
         (SPADCALL (QCDR |qr|) (QREFELT $ 83)))
        ('T
         (SPADCALL (SPADCALL (QCDR |qr|) (QREFELT $ 83))
                   (SPADCALL (SPADCALL (|spadConstant| $ 30) 1 (QREFELT $ 84))
                             (SPADCALL |p| (QCAR |qr|) (QREFELT $ 41))
                             (QREFELT $ 85))
                   (QREFELT $ 86))))))))) 

(DEFUN |PFR;=;2$B;24| (|a| |b| $)
  (COND ((SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 25)) 'NIL)
        ((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 $ 60)) (SPADCALL |b| (QREFELT $ 60))
                   (QREFELT $ 87))))) 

(DEFUN |PFR;-;2$;25| (|a| $)
  (PROG (|l| #1=#:G1980 |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 $ 88)) (QCDR |s|))
                        |l|)
                       . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (CONS (SPADCALL (QCAR |a|) (QREFELT $ 88)) |l|)))))) 

(DEFUN |PFR;*;R2$;26| (|r| |a| $)
  (PROG (#1=#:G1983 |c| #2=#:G1987 |s| |b|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |r| (|spadConstant| $ 24) (QREFELT $ 16))
        (|spadConstant| $ 23))
       ((SPADCALL |r| (|spadConstant| $ 30) (QREFELT $ 16)) |a|)
       ('T
        (SEQ
         (LETT |b|
               (SPADCALL (SPADCALL |r| (QCAR |a|) (QREFELT $ 17))
                         (QREFELT $ 31))
               . #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 $ 26)))
                  (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 $ 54)) |a| (QREFELT $ 90))) 

(DEFUN |PFR;+;3$;28| (|a| |b| $)
  (SPADCALL
   (CONS (SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 26))
         (SPADCALL (CONS (|function| |PFR;LessThan|) $)
                   (APPEND (QCDR |a|) (SPADCALL (QCDR |b|) (QREFELT $ 10)))
                   (QREFELT $ 48)))
   (QREFELT $ 39))) 

(DEFUN |PFR;*;3$;29| (|a| |b| $)
  (PROG (|c| #1=#:G2002 |t| #2=#:G2001 |s| |af|)
    (RETURN
     (SEQ
      (COND ((NULL (QCDR |a|)) (SPADCALL (QCAR |a|) |b| (QREFELT $ 90)))
            ((NULL (QCDR |b|)) (SPADCALL (QCAR |b|) |a| (QREFELT $ 90)))
            ('T
             (SEQ
              (LETT |af| (CONS (|spadConstant| $ 24) (QCDR |a|))
                    . #3=(|PFR;*;3$;29|))
              (LETT |c|
                    (SPADCALL (SPADCALL (QCAR |a|) |b| (QREFELT $ 90))
                              (SPADCALL (QCAR |b|) |af| (QREFELT $ 90))
                              (QREFELT $ 38))
                    . #3#)
              (SEQ (LETT |s| NIL . #3#) (LETT #2# (QCDR |a|) . #3#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |s| (CAR #2#) . #3#) NIL))
                     (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))
                            (GO G191)))
                          (SEQ
                           (EXIT
                            (LETT |c|
                                  (SPADCALL |c|
                                            (|PFR;multiplyFracTerms| |s| |t| $)
                                            (QREFELT $ 38))
                                  . #3#)))
                          (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
              (EXIT |c|)))))))) 

(DEFUN |PFR;coerce;$Of;30| (|a| $)
  (PROG (|l| #1=#:G2015 |s|)
    (RETURN
     (SEQ
      (COND ((NULL (QCDR |a|)) (SPADCALL (QCAR |a|) (QREFELT $ 93)))
            (#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 $ 93))) . #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| $ 33)
                                 (QREFELT $ 34))
                       (LETT |l|
                             (CONS (SPADCALL (QCAR |s|) (QREFELT $ 93)) |l|)
                             . #3#))
                      ('T
                       (LETT |l|
                             (CONS
                              (SPADCALL (SPADCALL (QCAR |s|) (QREFELT $ 93))
                                        (SPADCALL (QCDR |s|) (QREFELT $ 94))
                                        (QREFELT $ 95))
                              |l|)
                             . #3#)))))
                   (LETT #1# (CDR #1#) . #3#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (COND ((EQL (LENGTH |l|) 1) (|SPADfirst| |l|))
                     (#2#
                      (SPADCALL (ELT $ 96) (REVERSE |l|)
                                (QREFELT $ 99)))))))))))) 

(DEFUN |PartialFraction| (#1=#:G2022)
  (PROG ()
    (RETURN
     (PROG (#2=#:G2023)
       (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 112) . #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|)
      (SETF |pv$| (QREFELT $ 3))
      (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 . ~=) (51 . +)
              (|Record| (|:| |quotient| $) (|:| |remainder| $)) (57 . |divide|)
              (63 . |nthExponent|) (69 . |One|) |PFR;coerce;R$;11|
              (73 . |nilFactor|) (79 . |One|) (83 . =) (|NonNegativeInteger|)
              (89 . |numberOfFactors|) |PFR;*;3$;29| |PFR;+;3$;28|
              |PFR;compactFraction;2$;7| (|SparseUnivariatePolynomial| 6)
              |PFR;padicallyExpand;2RSup;23| (94 . |degree|) (99 . |Zero|)
              (103 . ~=) (109 . |leadingCoefficient|) (114 . |reductum|)
              (|Mapping| 15 8 8) (119 . |sort|) |PFR;padicFraction;2$;6|
              (125 . >) (131 . ^) (137 . |characteristic|)
              |PFR;characteristic;Nni;10| (141 . |coerce|) |PFR;coerce;I$;12|
              (|Fraction| 6) (146 . |coerce|) (151 . /) (157 . +)
              |PFR;coerce;$F;13| (|Fraction| 13) (163 . |denom|) (168 . |unit|)
              (|Union| $ '"failed") (173 . |recip|) (178 . |numer|) (183 . *)
              |PFR;coerce;F$;14| |PFR;=;2$B;24| (189 . |inv|) (194 . |numer|)
              (199 . |denom|) (204 . |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|
              (209 . |elt|) |PFR;nthFractionalTerm;$I$;20|
              |PFR;wholePart;$R;21| (215 . |coerce|) (220 . |monomial|)
              (226 . *) (232 . +) (238 . =) (244 . -) |PFR;-;2$;25|
              |PFR;*;R2$;26| |PFR;*;I2$;27| (|OutputForm|) (249 . |coerce|)
              (254 . |coerce|) (259 . /) (265 . +) (|Mapping| 92 92 92)
              (|List| 92) (271 . |reduce|) |PFR;coerce;$Of;30| (|Fraction| 12)
              (|Factored| $) (|Union| 104 '#1#) (|List| $)
              (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
              (|Record| (|:| |coef| 104) (|:| |generator| $))
              (|SparseUnivariatePolynomial| $)
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|PositiveInteger|) (|SingleInteger|) (|String|))
           '#(~= 277 |zero?| 283 |wholePart| 288 |unitNormal| 293
              |unitCanonical| 298 |unit?| 303 |subtractIfCan| 308
              |squareFreePart| 314 |squareFree| 319 |sizeLess?| 324 |sample|
              330 |rem| 334 |recip| 340 |quo| 345 |principalIdeal| 351 |prime?|
              356 |partialFraction| 361 |padicallyExpand| 367 |padicFraction|
              373 |one?| 378 |numberOfFractionalTerms| 383 |nthFractionalTerm|
              388 |multiEuclidean| 394 |lcm| 400 |latex| 411 |inv| 416 |hash|
              421 |gcdPolynomial| 426 |gcd| 432 |firstNumer| 443 |firstDenom|
              448 |factor| 453 |extendedEuclidean| 458 |exquo| 471
              |expressIdealMember| 477 |euclideanSize| 483 |divide| 488
              |compactFraction| 494 |coerce| 499 |characteristic| 534
              |associates?| 538 ^ 544 |Zero| 562 |One| 566 = 570 / 576 - 582 +
              593 * 599)
           '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| 101)
                 (|Algebra| $$) (|Module| 6) (|Module| 101) (|EntireRing|)
                 (|CommutativeRing|) (|Module| $$) (|BiModule| 6 6)
                 (|BiModule| 101 101) (|BiModule| $$ $$) (|Ring|)
                 (|RightModule| 6) (|LeftModule| 6) (|RightModule| 101)
                 (|LeftModule| 101) (|LeftModule| $$) (|Rng|)
                 (|RightModule| $$) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|SemiRing|) (|AbelianMonoid|)
                 (|Monoid|) (|SemiRng|) (|SemiGroup|) (|AbelianSemiGroup|)
                 (|SetCategory|) (|canonicalsClosed|) (|canonicalUnitNormal|)
                 (|noZeroDivisors|) (|CommutativeStar|) (|unitsKnown|)
                 (|BasicType|) (|CoercibleTo| 92))
              (|makeByteWordVec2| 111
                                  '(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 15 0 0 25 2 6 0 0 0 26
                                    2 6 27 0 0 28 2 13 12 0 12 29 0 6 0 30 2 13
                                    0 6 12 32 0 13 0 33 2 13 15 0 0 34 1 13 35
                                    0 36 1 40 35 0 42 0 40 0 43 2 40 15 0 0 44
                                    1 40 6 0 45 1 40 0 0 46 2 9 0 47 0 48 2 12
                                    15 0 0 50 2 6 0 0 35 51 0 6 35 52 1 6 0 12
                                    54 1 56 0 6 57 2 56 0 6 6 58 2 56 0 0 0 59
                                    1 61 13 0 62 1 13 6 0 63 1 6 64 0 65 1 61
                                    13 0 66 2 13 0 6 0 67 1 56 0 0 70 1 56 6 0
                                    71 1 56 6 0 72 1 13 0 6 73 2 9 8 0 12 80 1
                                    40 0 6 83 2 40 0 6 35 84 2 40 0 0 0 85 2 40
                                    0 0 0 86 2 56 15 0 0 87 1 6 0 0 88 1 6 92 0
                                    93 1 13 92 0 94 2 92 0 0 0 95 2 92 0 0 0 96
                                    2 98 92 97 0 99 2 0 15 0 0 1 1 0 15 0 1 1 0
                                    6 0 82 1 0 108 0 1 1 0 0 0 1 1 0 15 0 1 2 0
                                    64 0 0 1 1 0 0 0 1 1 0 102 0 1 2 0 15 0 0 1
                                    0 0 0 1 2 0 0 0 0 1 1 0 64 0 76 2 0 0 0 0 1
                                    1 0 106 104 1 1 0 15 0 1 2 0 0 6 13 74 2 0
                                    40 6 6 41 1 0 0 0 49 1 0 15 0 1 1 0 12 0 79
                                    2 0 0 0 12 81 2 0 103 104 0 1 1 0 0 104 1 2
                                    0 0 0 0 1 1 0 111 0 1 1 0 0 0 1 1 0 110 0 1
                                    2 0 107 107 107 1 1 0 0 104 1 2 0 0 0 0 1 1
                                    0 6 0 78 1 0 13 0 77 1 0 102 0 1 2 0 105 0
                                    0 1 3 0 21 0 0 0 1 2 0 64 0 0 75 2 0 103
                                    104 0 1 1 0 35 0 1 2 0 27 0 0 1 1 0 0 0 39
                                    1 0 0 61 68 1 0 56 0 60 1 0 0 6 31 1 0 0
                                    101 1 1 0 0 12 55 1 0 0 0 1 1 0 92 0 100 0
                                    0 35 53 2 0 15 0 0 1 2 0 0 0 12 1 2 0 0 0
                                    35 1 2 0 0 0 109 1 0 0 0 23 0 0 0 11 2 0 15
                                    0 0 69 2 0 0 0 0 1 2 0 0 0 0 1 1 0 0 0 89 2
                                    0 0 0 0 38 2 0 0 0 6 1 2 0 0 6 0 90 2 0 0
                                    101 0 1 2 0 0 0 101 1 2 0 0 0 0 37 2 0 0 12
                                    0 91 2 0 0 35 0 1 2 0 0 109 0 1)))))
           '|lookupComplete|)) 
