
(/VERSIONCHECK 2) 

(DEFUN |RFFACTOR;factorFraction;FF;1| (|p| $)
  (PROG (MR FF MFF)
    (RETURN
      (SEQ (COND
             ((|domainEqual| (QREFELT $ 6) (|Fraction| (|Integer|)))
              (SEQ (LETT MR
                         (|MRationalFactorize|
                             (|IndexedExponents| (|Symbol|)) (|Symbol|)
                             (|Integer|) (|Polynomial| (QREFELT $ 6)))
                         . #0=(|RFFACTOR;factorFraction;FF;1|))
                   (EXIT (SPADCALL
                             (SPADCALL (SPADCALL |p| (QREFELT $ 9))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     MR))
                             (SPADCALL (SPADCALL |p| (QREFELT $ 10))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     MR))
                             (QREFELT $ 13)))))
             ((|HasCategory| (QREFELT $ 6) '(|FiniteFieldCategory|))
              (SEQ (LETT FF
                         (|MultFiniteFactorize| (|Symbol|)
                             (|IndexedExponents| (|Symbol|))
                             (QREFELT $ 6)
                             (|Polynomial| (QREFELT $ 6))) . #0#)
                   (EXIT (SPADCALL
                             (SPADCALL (SPADCALL |p| (QREFELT $ 9))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     FF))
                             (SPADCALL (SPADCALL |p| (QREFELT $ 10))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     FF))
                             (QREFELT $ 13)))))
             ((|HasCategory| (QREFELT $ 6) '(|CharacteristicZero|))
              (SEQ (LETT MFF
                         (|MultivariateFactorize| (|Symbol|)
                             (|IndexedExponents| (|Symbol|))
                             (QREFELT $ 6)
                             (|Polynomial| (QREFELT $ 6))) . #0#)
                   (EXIT (SPADCALL
                             (SPADCALL (SPADCALL |p| (QREFELT $ 9))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     MFF))
                             (SPADCALL (SPADCALL |p| (QREFELT $ 10))
                                 (|compiledLookupCheck| '|factor|
                                     (LIST
                                      (LIST '|Factored|
                                       (LIST '|Polynomial|
                                        (|devaluate| (ELT $ 6))))
                                      (LIST '|Polynomial|
                                       (|devaluate| (ELT $ 6))))
                                     MFF))
                             (QREFELT $ 13)))))
             ('T (|error| "case not handled"))))))) 

(DEFUN |RationalFunctionFactorizer| (#0=#:G1820)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1821)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache|
                             '|RationalFunctionFactorizer|)
                       '|domainEqualList|)
                   . #2=(|RationalFunctionFactorizer|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|RationalFunctionFactorizer;| #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|RationalFunctionFactorizer|))))))))))) 

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

(MAKEPROP '|RationalFunctionFactorizer| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Polynomial| 6)
             (|Fraction| 7) (0 . |numer|) (5 . |denom|) (|Factored| 7)
             (|Fraction| 11) (10 . /) |RFFACTOR;factorFraction;FF;1|)
          '#(|factorFraction| 16) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 14
                                '(1 8 7 0 9 1 8 7 0 10 2 12 0 11 11 13
                                  1 0 12 8 14)))))
          '|lookupComplete|)) 
