
(/VERSIONCHECK 2) 

(DEFUN |GENMFACT;factor;PF;1| (|p| $)
  (SEQ (COND
         ((|HasCategory| (QREFELT $ 9) '(|FiniteFieldCategory|))
          (SPADCALL |p| (QREFELT $ 13)))
         (#0='T
          (SEQ (COND
                 ((|domainEqual| (QREFELT $ 9)
                      (|Polynomial| (QREFELT $ 8)))
                  (COND
                    ((|HasCategory| (QREFELT $ 8) '(|EuclideanDomain|))
                     (EXIT (SPADCALL |p| (QREFELT $ 15)))))))
               (COND
                 ((|domainEqual| (QREFELT $ 9)
                      (|Fraction| (QREFELT $ 8)))
                  (COND
                    ((|HasCategory| (QREFELT $ 8)
                         '(|CharacteristicZero|))
                     (COND
                       ((|HasCategory| (QREFELT $ 8)
                            '(|EuclideanDomain|))
                        (EXIT (SPADCALL |p| (QREFELT $ 17)))))))))
               (EXIT (COND
                       ((|domainEqual| (QREFELT $ 9)
                            (|Fraction| (|Polynomial| (QREFELT $ 8))))
                        (SPADCALL |p| (QREFELT $ 19)))
                       (#0#
                        (SEQ (COND
                               ((|HasCategory| (QREFELT $ 9)
                                    '(|CharacteristicZero|))
                                (COND
                                  ((|HasCategory| (QREFELT $ 9)
                                    '(|EuclideanDomain|))
                                   (EXIT (SPADCALL |p| (QREFELT $ 21)))))))
                             (EXIT (SPADCALL |p| (QREFELT $ 23)))))))))))) 

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

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

(MAKEPROP '|GeneralizedMultivariateFactorize| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|local| |#5|)
             (|Factored| 10) (|MultFiniteFactorize| 6 7 9 10)
             (0 . |factor|) (|MPolyCatPolyFactorizer| 7 6 8 10)
             (5 . |factor|) (|MRationalFactorize| 7 6 8 10)
             (10 . |factor|)
             (|MPolyCatRationalFunctionFactorizer| 7 6 8 10)
             (15 . |factor|) (|MultivariateFactorize| 6 7 9 10)
             (20 . |factor|) (|Factored| $) (25 . |squareFree|)
             |GENMFACT;factor;PF;1|)
          '#(|factor| 30) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 24
                                '(1 12 11 10 13 1 14 11 10 15 1 16 11
                                  10 17 1 18 11 10 19 1 20 11 10 21 1
                                  10 22 0 23 1 0 11 10 24)))))
          '|lookupComplete|)) 
