
(/VERSIONCHECK 2) 

(DEFUN |MPRFF;factor;PRFF;1| (|p| $)
  (PROG (|truelist| |tp| |nump| |denp| |flist| #0=#:G1834 |u|
            #1=#:G1835 |x| #2=#:G1836 |fcont| #3=#:G1837 #4=#:G1838
            |ffact| |ff| #5=#:G1839 #6=#:G1831 #7=#:G1829 #8=#:G1830)
    (RETURN
      (SEQ (LETT |truelist| (SPADCALL |p| (QREFELT $ 11))
                 . #9=(|MPRFF;factor;PRFF;1|))
           (LETT |tp| (SPADCALL |p| (QREFELT $ 13)) . #9#)
           (LETT |nump| (QCAR |tp|) . #9#)
           (LETT |denp|
                 (SPADCALL (SPADCALL (QCDR |tp|) (QREFELT $ 16))
                     (QREFELT $ 17)) . #9#)
           (COND
             ((|domainEqual| (QREFELT $ 8) (|Fraction| (|Integer|)))
              (LETT |flist| (SPADCALL |nump| (QREFELT $ 20)) . #9#))
             ((|HasCategory| (QREFELT $ 8) '(|FiniteFieldCategory|))
              (LETT |flist| (SPADCALL |nump| (QREFELT $ 22)) . #9#))
             ((|HasCategory| (QREFELT $ 8) '(|Field|))
              (|error| "not done yet"))
             ((|HasCategory| (QREFELT $ 8) '(|CharacteristicZero|))
              (LETT |flist| (SPADCALL |nump| (QREFELT $ 24)) . #9#))
             (#10='T (|error| "can't happen")))
           (LETT |ffact|
                 (PROGN
                   (LETT #0# NIL . #9#)
                   (SEQ (LETT |u| NIL . #9#)
                        (LETT #1#
                              (SPADCALL |flist| (QREFELT $ 27)) . #9#)
                        G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |u| (CAR #1#) . #9#) NIL))
                           #11=(GO G191)))
                        (SEQ (EXIT (LETT #0#
                                    (CONS
                                     (CONS
                                      (SPADCALL
                                       (SPADCALL (QCAR |u|)
                                        (QREFELT $ 16))
                                       (QREFELT $ 28))
                                      (QCDR |u|))
                                     #0#) . #9#)))
                        (LETT #1# (CDR #1#) . #9#) #12=(GO G190) G191
                        (EXIT (NREVERSE0 #0#)))) . #9#)
           (LETT |fcont|
                 (SPADCALL
                     (SPADCALL (SPADCALL |flist| (QREFELT $ 29))
                         (QREFELT $ 16))
                     (QREFELT $ 28)) . #9#)
           (SEQ (LETT |x| NIL . #9#) (LETT #2# |truelist| . #9#) G190
                (COND
                  ((OR (ATOM #2#)
                       (PROGN (LETT |x| (CAR #2#) . #9#) NIL))
                   #11#))
                (SEQ (LETT |fcont|
                           (SPADCALL |fcont| |x| (QREFELT $ 30)) . #9#)
                     (EXIT (LETT |ffact|
                                 (PROGN
                                   (LETT #3# NIL . #9#)
                                   (SEQ (LETT |ff| NIL . #9#)
                                    (LETT #4# |ffact| . #9#) G190
                                    (COND
                                      ((OR (ATOM #4#)
                                        (PROGN
                                          (LETT |ff| (CAR #4#) . #9#)
                                          NIL))
                                       #11#))
                                    (SEQ
                                     (EXIT
                                      (LETT #3#
                                       (CONS
                                        (CONS
                                         (SPADCALL (QCAR |ff|) |x|
                                          (QREFELT $ 30))
                                         (QCDR |ff|))
                                        #3#) . #9#)))
                                    (LETT #4# (CDR #4#) . #9#) #12#
                                    G191 (EXIT (NREVERSE0 #3#)))) . #9#)))
                (LETT #2# (CDR #2#) . #9#) #12# G191 (EXIT NIL))
           (EXIT (SPADCALL (SPADCALL |denp| |fcont| (QREFELT $ 31))
                     (PROGN
                       (LETT #8# NIL . #9#)
                       (SEQ (LETT |ff| NIL . #9#)
                            (LETT #5# |ffact| . #9#) G190
                            (COND
                              ((OR (ATOM #5#)
                                   (PROGN
                                     (LETT |ff| (CAR #5#) . #9#)
                                     NIL))
                               #11#))
                            (SEQ (EXIT (PROGN
                                         (LETT #6#
                                          (SPADCALL (QCAR |ff|)
                                           (QCDR |ff|) (QREFELT $ 34)) . #9#)
                                         (COND
                                           (#8#
                                            (LETT #7#
                                             (SPADCALL #7# #6#
                                              (QREFELT $ 35)) . #9#))
                                           ('T
                                            (PROGN
                                              (LETT #7# #6# . #9#)
                                              (LETT #8# 'T . #9#)))))))
                            (LETT #5# (CDR #5#) . #9#) #12# G191
                            (EXIT NIL))
                       (COND (#8# #7#) (#10# (|spadConstant| $ 36))))
                     (QREFELT $ 37))))))) 

(DEFUN |MPRFF;pushdown;PRFOVPRF;2| (|g| |x| $)
  (PROG (|rf| |ug|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |g| (QREFELT $ 40)) |g|)
             ('T
              (SEQ (LETT |rf| (|spadConstant| $ 41)
                         . #0=(|MPRFF;pushdown;PRFOVPRF;2|))
                   (LETT |ug| (SPADCALL |g| |x| (QREFELT $ 43)) . #0#)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((SPADCALL |ug|
                                     (|spadConstant| $ 47)
                                     (QREFELT $ 48))
                                    'NIL)
                                   ('T 'T)))
                           (GO G191)))
                        (SEQ (LETT |rf|
                                   (SPADCALL |rf|
                                    (SPADCALL |ug| |x| (QREFELT $ 49))
                                    (QREFELT $ 50)) . #0#)
                             (EXIT (LETT |ug|
                                    (SPADCALL |ug| (QREFELT $ 51)) . #0#)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT |rf|)))))))) 

(DEFUN |MPRFF;pushdterm;SupOVPRF;3| (|t| |x| $)
  (PROG (|n| |cf|)
    (RETURN
      (SEQ (LETT |n| (SPADCALL |t| (QREFELT $ 54))
                 . #0=(|MPRFF;pushdterm;SupOVPRF;3|))
           (LETT |cf|
                 (SPADCALL
                     (SPADCALL (|spadConstant| $ 59)
                         (SPADCALL |x| (QREFELT $ 58)) |n|
                         (QREFELT $ 60))
                     (QREFELT $ 16)) . #0#)
           (EXIT (SPADCALL |cf| (SPADCALL |t| (QREFELT $ 61))
                     (QREFELT $ 31))))))) 

(DEFUN |MPRFF;pushup;PRFOVPRF;4| (|f| |x| $)
  (PROG (#0=#:G1851 |v| |g|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (QREFELT $ 40))
              (SPADCALL (SPADCALL |f| (QREFELT $ 62)) |x|
                  (QREFELT $ 63)))
             ('T
              (SEQ (LETT |v|
                         (PROG2 (LETT #0# (SPADCALL |f| (QREFELT $ 65))
                                      . #1=(|MPRFF;pushup;PRFOVPRF;4|))
                                (QCDR #0#)
                           (|check-union| (QEQCAR #0# 0) (QREFELT $ 7)
                               #0#)) . #1#)
                   (LETT |g| (SPADCALL |f| |v| (QREFELT $ 43)) . #1#)
                   (EXIT (SPADCALL
                             (SPADCALL
                                 (CONS #'|MPRFF;pushup;PRFOVPRF;4!0|
                                       (VECTOR $ |x|))
                                 |g| (QREFELT $ 67))
                             |v| (QREFELT $ 68)))))))))) 

(DEFUN |MPRFF;pushup;PRFOVPRF;4!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 30))) 

(DEFUN |MPRFF;pushuconst;FOVPRF;5| (|r| |x| $)
  (PROG (|xs|)
    (RETURN
      (SEQ (LETT |xs| (SPADCALL |x| (QREFELT $ 58))
                 |MPRFF;pushuconst;FOVPRF;5|)
           (EXIT (COND
                   ((< 0
                       (SPADCALL (SPADCALL |r| (QREFELT $ 69)) |xs|
                           (QREFELT $ 72)))
                    (|error| "bad polynomial form"))
                   ('T
                    (SPADCALL
                        (SPADCALL
                            (SPADCALL (SPADCALL |r| (QREFELT $ 69))
                                (QREFELT $ 16))
                            (QREFELT $ 17))
                        (SPADCALL
                            (SPADCALL (SPADCALL |r| (QREFELT $ 73))
                                |xs| (QREFELT $ 74))
                            |x| (QREFELT $ 76))
                        (QREFELT $ 31))))))))) 

(DEFUN |MPRFF;pushucoef;SupOVPRF;6| (|c| |x| $)
  (COND
    ((SPADCALL |c| (|spadConstant| $ 77) (QREFELT $ 78))
     (|spadConstant| $ 41))
    ('T
     (SPADCALL
         (SPADCALL
             (SPADCALL
                 (SPADCALL (SPADCALL |c| (QREFELT $ 79))
                     (QREFELT $ 16))
                 (QREFELT $ 28))
             |x| (SPADCALL |c| (QREFELT $ 80)) (QREFELT $ 81))
         (SPADCALL (SPADCALL |c| (QREFELT $ 82)) |x| (QREFELT $ 76))
         (QREFELT $ 50))))) 

(DEFUN |MPRFF;totalfract;PRFR;7| (|p| $)
  (PROG (|x| #0=#:G1864 |g|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (|spadConstant| $ 41) (QREFELT $ 83))
              (CONS (|spadConstant| $ 71) (|spadConstant| $ 59)))
             ('T
              (SEQ (SEQ (LETT |x| NIL . #1=(|MPRFF;totalfract;PRFR;7|))
                        (LETT #0# (SPADCALL |p| (QREFELT $ 11)) . #1#)
                        G190
                        (COND
                          ((OR (ATOM #0#)
                               (PROGN (LETT |x| (CAR #0#) . #1#) NIL))
                           (GO G191)))
                        (SEQ (EXIT (LETT |p|
                                    (SPADCALL |p| |x| (QREFELT $ 52)) . #1#)))
                        (LETT #0# (CDR #0#) . #1#) (GO G190) G191
                        (EXIT NIL))
                   (LETT |g| (SPADCALL |p| (QREFELT $ 62)) . #1#)
                   (EXIT (CONS (SPADCALL |g| (QREFELT $ 73))
                               (SPADCALL |g| (QREFELT $ 69))))))))))) 

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

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

(MAKEPROP '|MPolyCatRationalFunctionFactorizer| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|List| 7) (0 . |variables|)
             (|Record| (|:| |sup| 14) (|:| |inf| 14))
             |MPRFF;totalfract;PRFR;7| (|Polynomial| 8) (|Fraction| 14)
             (5 . |coerce|) (10 . |inv|) (|Factored| 14)
             (|MRationalFactorize| (|IndexedExponents| 57) 57 32 14)
             (15 . |factor|)
             (|MultFiniteFactorize| 57 (|IndexedExponents| 57) 8 14)
             (20 . |factor|)
             (|MultivariateFactorize| 57 (|IndexedExponents| 57) 8 14)
             (25 . |factor|)
             (|Record| (|:| |factor| 14) (|:| |exponent| 32))
             (|List| 25) (30 . |factors|) (35 . |coerce|) (40 . |unit|)
             |MPRFF;pushup;PRFOVPRF;4| (45 . *) (|Integer|)
             (|Factored| 9) (51 . |primeFactor|) (57 . *) (63 . |One|)
             (67 . *) |MPRFF;factor;PRFF;1| (|Boolean|)
             (73 . |ground?|) (78 . |Zero|)
             (|SparseUnivariatePolynomial| $) (82 . |univariate|)
             (88 . |Zero|) (92 . |Zero|)
             (|SparseUnivariatePolynomial| 9) (96 . |Zero|) (100 . =)
             |MPRFF;pushdterm;SupOVPRF;3| (106 . +) (112 . |reductum|)
             |MPRFF;pushdown;PRFOVPRF;2| (|NonNegativeInteger|)
             (117 . |degree|) (122 . |One|) (126 . |One|) (|Symbol|)
             (130 . |convert|) (135 . |One|) (139 . |monomial|)
             (146 . |leadingCoefficient|) (151 . |retract|)
             |MPRFF;pushuconst;FOVPRF;5| (|Union| 7 '"failed")
             (156 . |mainVariable|) (|Mapping| 9 9) (161 . |map|)
             (167 . |multivariate|) (173 . |denom|) (178 . |Zero|)
             (182 . |Zero|) (186 . |degree|) (192 . |numer|)
             (197 . |univariate|) (|SparseUnivariatePolynomial| 14)
             |MPRFF;pushucoef;SupOVPRF;6| (203 . |Zero|) (207 . =)
             (213 . |leadingCoefficient|) (218 . |degree|)
             (223 . |monomial|) (230 . |reductum|) (235 . =))
          '#(|totalfract| 241 |pushup| 246 |pushuconst| 252 |pushucoef|
             258 |pushdterm| 264 |pushdown| 270 |factor| 276)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 83
                                '(1 9 10 0 11 1 15 0 14 16 1 15 0 0 17
                                  1 19 18 14 20 1 21 18 14 22 1 23 18
                                  14 24 1 18 26 0 27 1 9 0 15 28 1 18
                                  14 0 29 2 9 0 15 0 31 2 33 0 9 32 34
                                  2 33 0 0 0 35 0 33 0 36 2 33 0 9 0 37
                                  1 9 39 0 40 0 9 0 41 2 9 42 0 7 43 0
                                  6 0 44 0 8 0 45 0 46 0 47 2 46 39 0 0
                                  48 2 9 0 0 0 50 1 46 0 0 51 1 46 53 0
                                  54 0 8 0 55 0 9 0 56 1 7 57 0 58 0 14
                                  0 59 3 14 0 0 57 53 60 1 46 9 0 61 1
                                  9 15 0 62 1 9 64 0 65 2 46 0 66 0 67
                                  2 9 0 42 7 68 1 15 14 0 69 0 15 0 70
                                  0 14 0 71 2 14 53 0 57 72 1 15 14 0
                                  73 2 14 42 0 57 74 0 75 0 77 2 75 39
                                  0 0 78 1 75 14 0 79 1 75 53 0 80 3 9
                                  0 0 7 53 81 1 75 0 0 82 2 9 39 0 0 83
                                  1 0 12 9 13 2 0 9 9 7 30 2 0 9 15 7
                                  63 2 0 9 75 7 76 2 0 9 46 7 49 2 0 9
                                  9 7 52 1 0 33 9 38)))))
          '|lookupComplete|)) 
