
(/VERSIONCHECK 2) 

(DEFUN |FACUTIL;lowerPolynomial;SupSup;1| (|f| $)
  (COND
    ((SPADCALL |f| (QREFELT $ 12)) (|spadConstant| $ 14))
    ('T
     (SPADCALL
         (SPADCALL
             (SPADCALL (SPADCALL |f| (QREFELT $ 15)) (QREFELT $ 16))
             (SPADCALL |f| (QREFELT $ 18)) (QREFELT $ 19))
         (SPADCALL (SPADCALL |f| (QREFELT $ 20)) (QREFELT $ 21))
         (QREFELT $ 22))))) 

(DEFUN |FACUTIL;raisePolynomial;SupSup;2| (|u| $)
  (COND
    ((SPADCALL |u| (QREFELT $ 23)) (|spadConstant| $ 24))
    ('T
     (SPADCALL
         (SPADCALL
             (SPADCALL (SPADCALL |u| (QREFELT $ 25)) (QREFELT $ 26))
             (SPADCALL |u| (QREFELT $ 27)) (QREFELT $ 28))
         (SPADCALL (SPADCALL |u| (QREFELT $ 29)) (QREFELT $ 30))
         (QREFELT $ 31))))) 

(DEFUN |FACUTIL;completeEval;SupLLSup;3| (|f| |lvar| |lval| $)
  (COND
    ((SPADCALL |f| (QREFELT $ 12)) (|spadConstant| $ 14))
    ('T
     (SPADCALL
         (SPADCALL
             (SPADCALL
                 (SPADCALL (SPADCALL |f| (QREFELT $ 15)) |lvar| |lval|
                     (QREFELT $ 34))
                 (QREFELT $ 16))
             (SPADCALL |f| (QREFELT $ 18)) (QREFELT $ 19))
         (SPADCALL (SPADCALL |f| (QREFELT $ 20)) |lvar| |lval|
             (QREFELT $ 35))
         (QREFELT $ 22))))) 

(DEFUN |FACUTIL;degree;SupLL;4| (|f| |lvar| $)
  (PROG (|coefs| #0=#:G1831 |xx| #1=#:G1832 |fc| #2=#:G1833 #3=#:G1827
                 #4=#:G1825 #5=#:G1826 |ldeg|)
    (RETURN
      (SEQ (LETT |coefs| (SPADCALL |f| (QREFELT $ 37))
                 . #6=(|FACUTIL;degree;SupLL;4|))
           (EXIT (LETT |ldeg|
                       (PROGN
                         (LETT #0# NIL . #6#)
                         (SEQ (LETT |xx| NIL . #6#)
                              (LETT #1# |lvar| . #6#) G190
                              (COND
                                ((OR (ATOM #1#)
                                     (PROGN
                                       (LETT |xx| (CAR #1#) . #6#)
                                       NIL))
                                 #7=(GO G191)))
                              (SEQ (EXIT
                                    (LETT #0#
                                     (CONS
                                      (PROGN
                                        (LETT #5# NIL . #6#)
                                        (SEQ (LETT |fc| NIL . #6#)
                                         (LETT #2# |coefs| . #6#) G190
                                         (COND
                                           ((OR (ATOM #2#)
                                             (PROGN
                                               (LETT |fc|
                                                (CAR #2#) . #6#)
                                               NIL))
                                            #7#))
                                         (SEQ
                                          (EXIT
                                           (PROGN
                                             (LETT #3#
                                              (SPADCALL |fc| |xx|
                                               (QREFELT $ 38)) . #6#)
                                             (COND
                                               (#5#
                                                (LETT #4#
                                                 (MAX #4# #3#) . #6#))
                                               ('T
                                                (PROGN
                                                  (LETT #4# #3# . #6#)
                                                  (LETT #5# 'T . #6#)))))))
                                         (LETT #2# (CDR #2#) . #6#)
                                         #8=(GO G190) G191 (EXIT NIL))
                                        (COND
                                          (#5# #4#)
                                          ('T (|IdentityError| '|max|))))
                                      #0#) . #6#)))
                              (LETT #1# (CDR #1#) . #6#) #8# G191
                              (EXIT (NREVERSE0 #0#)))) . #6#)))))) 

(DEFUN |FACUTIL;variables;SupL;5| (|f| $)
  (PROG (|cf| #0=#:G1838 #1=#:G1836 #2=#:G1834 #3=#:G1835)
    (RETURN
      (SEQ (PROGN
             (LETT #3# NIL . #4=(|FACUTIL;variables;SupL;5|))
             (SEQ (LETT |cf| NIL . #4#)
                  (LETT #0# (SPADCALL |f| (QREFELT $ 37)) . #4#) G190
                  (COND
                    ((OR (ATOM #0#)
                         (PROGN (LETT |cf| (CAR #0#) . #4#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (PROGN
                               (LETT #1#
                                     (SPADCALL |cf| (QREFELT $ 41)) . #4#)
                               (COND
                                 (#3# (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 42)) . #4#))
                                 ('T
                                  (PROGN
                                    (LETT #2# #1# . #4#)
                                    (LETT #3# 'T . #4#)))))))
                  (LETT #0# (CDR #0#) . #4#) (GO G190) G191 (EXIT NIL))
             (COND (#3# #2#) ('T (|IdentityError| '|setUnion|)))))))) 

(DEFUN |FACUTIL;ran;IR;6| (|k| $) (SPADCALL (QREFELT $ 44))) 

(DEFUN |FACUTIL;ran;IR;7| (|k| $)
  (SPADCALL (- (RANDOM (+ (SPADCALL 2 |k| (QREFELT $ 48)) 1)) |k|)
            (QREFELT $ 49))) 

(DEFUN |FACUTIL;normalDeriv;SupISup;8| (|f| |m| $)
  (PROG (|#G1| |k| |n1| #0=#:G1843 |ris| |n|)
    (RETURN
      (SEQ (LETT |#G1| (SPADCALL |f| (QREFELT $ 18))
                 . #1=(|FACUTIL;normalDeriv;SupISup;8|))
           (LETT |n1| |#G1| . #1#)
           (EXIT (COND
                   ((< |#G1| |m|) (|spadConstant| $ 24))
                   ((EQL |n1| |m|)
                    (SPADCALL (SPADCALL |f| (QREFELT $ 15))
                        (QREFELT $ 50)))
                   ('T
                    (SEQ (LETT |k|
                               (SPADCALL |n1| |m| (QREFELT $ 51)) . #1#)
                         (LETT |ris| (|spadConstant| $ 24) . #1#)
                         (LETT |n| |n1| . #1#)
                         (SEQ G190
                              (COND
                                ((NULL (COND
                                         ((< |n| |m|) 'NIL)
                                         ('T 'T)))
                                 #2=(GO G191)))
                              (SEQ (SEQ G190
                                    (COND ((NULL (< |n| |n1|)) #2#))
                                    (SEQ
                                     (LETT |k|
                                      (QUOTIENT2 (* |k| (- |n1| |m|))
                                       |n1|) . #1#)
                                     (EXIT
                                      (LETT |n1| (- |n1| 1) . #1#)))
                                    NIL #3=(GO G190) G191 (EXIT NIL))
                                   (LETT |ris|
                                    (SPADCALL |ris|
                                     (SPADCALL
                                      (SPADCALL |k|
                                       (SPADCALL |f| (QREFELT $ 15))
                                       (QREFELT $ 54))
                                      (PROG1
                                       (LETT #0# (- |n| |m|) . #1#)
                                        (|check-subtype| (>= #0# 0)
                                         '(|NonNegativeInteger|) #0#))
                                      (QREFELT $ 28))
                                     (QREFELT $ 31)) . #1#)
                                   (LETT |f|
                                    (SPADCALL |f| (QREFELT $ 20)) . #1#)
                                   (EXIT
                                    (LETT |n|
                                     (SPADCALL |f| (QREFELT $ 18)) . #1#)))
                              NIL #3# G191 (EXIT NIL))
                         (EXIT |ris|))))))))) 

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

(DEFUN |FactoringUtilities;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|FactoringUtilities|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|FactoringUtilities| DV$1 DV$2 DV$3 DV$4) . #0#)
        (LETT $ (GETREFV 56) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|FactoringUtilities|
            (LIST DV$1 DV$2 DV$3 DV$4) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (QSETREFV $ 9 |#4|)
        (COND
          ((|HasCategory| |#3| '(|FiniteFieldCategory|))
           (QSETREFV $ 46
               (CONS (|dispatchFunction| |FACUTIL;ran;IR;6|) $)))
          ('T
           (QSETREFV $ 46
               (CONS (|dispatchFunction| |FACUTIL;ran;IR;7|) $))))
        $)))) 

(MAKEPROP '|FactoringUtilities| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|Boolean|)
             (|SparseUnivariatePolynomial| 9) (0 . |zero?|)
             (|SparseUnivariatePolynomial| 8) (5 . |Zero|)
             (9 . |leadingCoefficient|) (14 . |ground|)
             (|NonNegativeInteger|) (19 . |degree|) (24 . |monomial|)
             (30 . |reductum|) |FACUTIL;lowerPolynomial;SupSup;1|
             (35 . +) (41 . |zero?|) (46 . |Zero|)
             (50 . |leadingCoefficient|) (55 . |coerce|)
             (60 . |degree|) (65 . |monomial|) (71 . |reductum|)
             |FACUTIL;raisePolynomial;SupSup;2| (76 . +) (|List| 7)
             (|List| 8) (82 . |eval|) |FACUTIL;completeEval;SupLLSup;3|
             (|List| 9) (89 . |coefficients|) (94 . |degree|)
             (|List| 17) |FACUTIL;degree;SupLL;4| (100 . |variables|)
             (105 . |setUnion|) |FACUTIL;variables;SupL;5|
             (111 . |random|) (|Integer|) (115 . |ran|)
             (|PositiveInteger|) (120 . *) (126 . |coerce|)
             (131 . |coerce|) (136 . |binomial|) (142 . |One|)
             (146 . |One|) (150 . *) |FACUTIL;normalDeriv;SupISup;8|)
          '#(|variables| 156 |ran| 161 |raisePolynomial| 166
             |normalDeriv| 171 |lowerPolynomial| 177 |degree| 182
             |completeEval| 188)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 55
                                '(1 11 10 0 12 0 13 0 14 1 11 9 0 15 1
                                  9 8 0 16 1 11 17 0 18 2 13 0 8 17 19
                                  1 11 0 0 20 2 13 0 0 0 22 1 13 10 0
                                  23 0 11 0 24 1 13 8 0 25 1 9 0 8 26 1
                                  13 17 0 27 2 11 0 9 17 28 1 13 0 0 29
                                  2 11 0 0 0 31 3 9 0 0 32 33 34 1 11
                                  36 0 37 2 9 17 0 7 38 1 9 32 0 41 2
                                  32 0 0 0 42 0 8 0 44 1 0 8 45 46 2 45
                                  0 47 0 48 1 8 0 45 49 1 11 0 9 50 2
                                  45 0 0 0 51 0 8 0 52 0 9 0 53 2 9 0
                                  45 0 54 1 0 32 11 43 1 0 8 45 46 1 0
                                  11 13 30 2 0 11 11 45 55 1 0 13 11 21
                                  2 0 39 11 32 40 3 0 13 11 32 33 35)))))
          '|lookupComplete|)) 
