
(/VERSIONCHECK 2) 

(DEFUN |TWOFACT;computeDegree| (|m| |mx| |q| $)
  (PROG (#1=#:G1808 |n| |n2| |n1| |my|)
    (RETURN
     (SEQ
      (LETT |my| (SPADCALL |m| (QREFELT $ 9)) . #2=(|TWOFACT;computeDegree|))
      (LETT |n1| (INTEGER-LENGTH (* (SPADCALL 10 |mx| (QREFELT $ 12)) |my|))
            . #2#)
      (LETT |n2| (- (INTEGER-LENGTH |q|) 1) . #2#)
      (LETT |n| (+ (QUOTIENT2 |n1| |n2|) 1) . #2#)
      (EXIT
       (PROG1 (LETT #1# |n| . #2#)
         (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))))))) 

(DEFUN |TWOFACT;exchangeVars| (|p| $)
  (COND
   ((SPADCALL |p| (|spadConstant| $ 14) (QREFELT $ 16)) (|spadConstant| $ 14))
   ('T
    (SPADCALL
     (|TWOFACT;exchangeVarTerm| (SPADCALL |p| (QREFELT $ 18))
      (SPADCALL |p| (QREFELT $ 9)) $)
     (|TWOFACT;exchangeVars| (SPADCALL |p| (QREFELT $ 19)) $) (QREFELT $ 20))))) 

(DEFUN |TWOFACT;exchangeVarTerm| (|c| |e| $)
  (COND
   ((SPADCALL |c| (|spadConstant| $ 21) (QREFELT $ 22)) (|spadConstant| $ 14))
   ('T
    (SPADCALL
     (SPADCALL (SPADCALL (SPADCALL |c| (QREFELT $ 23)) |e| (QREFELT $ 24))
               (SPADCALL |c| (QREFELT $ 25)) (QREFELT $ 26))
     (|TWOFACT;exchangeVarTerm| (SPADCALL |c| (QREFELT $ 27)) |e| $)
     (QREFELT $ 20))))) 

(DEFUN |TWOFACT;pthRoot| (|poly| |p| |PthRootPow| $)
  (PROG (|tmp|)
    (RETURN
     (SEQ
      (LETT |tmp|
            (SPADCALL
             (SPADCALL (CONS #'|TWOFACT;pthRoot!0| (VECTOR $ |PthRootPow|))
                       |poly| (QREFELT $ 30))
             |p| (QREFELT $ 32))
            |TWOFACT;pthRoot|)
      (EXIT
       (COND ((QEQCAR |tmp| 1) (|error| "consistency error in TwoFactor"))
             ('T (QCDR |tmp|)))))))) 

(DEFUN |TWOFACT;pthRoot!0| (|x| $$)
  (PROG (|PthRootPow| $)
    (LETT |PthRootPow| (QREFELT $$ 1) . #1=(|TWOFACT;pthRoot|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |x| |PthRootPow| (QREFELT $ 28)))))) 

(DEFUN |TWOFACT;generalSqFr;SupF;5| (|m| $)
  (PROG (|pfaclist| |contlist| #1=#:G1879 |w| #2=#:G1878 |sqp| |unitPart|
         #3=#:G1877 |v| |nfacs| |uexp| #4=#:G1861 #5=#:G1876 |u| |sqfrm|
         #6=#:G1855 |cont| #7=#:G1875 #8=#:G1874 |l|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |m| (|spadConstant| $ 14) (QREFELT $ 16))
        (|spadConstant| $ 34))
       ((EQL (SPADCALL |m| (QREFELT $ 9)) 0)
        (SEQ
         (LETT |l| (SPADCALL (SPADCALL |m| (QREFELT $ 18)) (QREFELT $ 36))
               . #9=(|TWOFACT;generalSqFr;SupF;5|))
         (EXIT
          (SPADCALL (SPADCALL (SPADCALL |l| (QREFELT $ 38)) (QREFELT $ 39))
                    (PROGN
                     (LETT #8# NIL . #9#)
                     (SEQ (LETT |u| NIL . #9#)
                          (LETT #7# (SPADCALL |l| (QREFELT $ 43)) . #9#) G190
                          (COND
                           ((OR (ATOM #7#)
                                (PROGN (LETT |u| (CAR #7#) . #9#) NIL))
                            #10=(GO G191)))
                          (SEQ
                           (EXIT
                            (LETT #8#
                                  (CONS
                                   (VECTOR (QVELT |u| 0)
                                           (SPADCALL (QVELT |u| 1)
                                                     (QREFELT $ 39))
                                           (QVELT |u| 2))
                                   #8#)
                                  . #9#)))
                          (LETT #7# (CDR #7#) . #9#) #11=(GO G190) G191
                          (EXIT (NREVERSE0 #8#))))
                    (QREFELT $ 46)))))
       (#12='T
        (SEQ (LETT |cont| (SPADCALL |m| (QREFELT $ 47)) . #9#)
             (LETT |m|
                   (PROG2
                       (LETT #6# (SPADCALL |m| |cont| (QREFELT $ 48)) . #9#)
                       (QCDR #6#)
                     (|check-union| (QEQCAR #6# 0)
                                    (|SparseUnivariatePolynomial|
                                     (|SparseUnivariatePolynomial|
                                      (QREFELT $ 6)))
                                    #6#))
                   . #9#)
             (LETT |sqfrm| (SPADCALL |m| (QREFELT $ 49)) . #9#)
             (LETT |pfaclist| NIL . #9#)
             (LETT |unitPart| (SPADCALL |sqfrm| (QREFELT $ 50)) . #9#)
             (SEQ (LETT |u| NIL . #9#)
                  (LETT #5# (SPADCALL |sqfrm| (QREFELT $ 51)) . #9#) G190
                  (COND
                   ((OR (ATOM #5#) (PROGN (LETT |u| (CAR #5#) . #9#) NIL))
                    #10#))
                  (SEQ
                   (EXIT
                    (COND
                     ((SPADCALL (QVELT |u| 0) (CONS 0 "nil") (QREFELT $ 52))
                      (SEQ
                       (LETT |uexp|
                             (PROG1 (LETT #4# (QVELT |u| 2) . #9#)
                               (|check-subtype| (>= #4# 0)
                                                '(|NonNegativeInteger|) #4#))
                             . #9#)
                       (LETT |nfacs|
                             (SPADCALL (|TWOFACT;exchangeVars| (QVELT |u| 1) $)
                                       (QREFELT $ 49))
                             . #9#)
                       (SEQ (LETT |v| NIL . #9#)
                            (LETT #3# (SPADCALL |nfacs| (QREFELT $ 51)) . #9#)
                            G190
                            (COND
                             ((OR (ATOM #3#)
                                  (PROGN (LETT |v| (CAR #3#) . #9#) NIL))
                              #10#))
                            (SEQ
                             (EXIT
                              (LETT |pfaclist|
                                    (CONS
                                     (VECTOR (QVELT |v| 0)
                                             (|TWOFACT;exchangeVars|
                                              (QVELT |v| 1) $)
                                             (* (QVELT |v| 2) |uexp|))
                                     |pfaclist|)
                                    . #9#)))
                            (LETT #3# (CDR #3#) . #9#) #11# G191 (EXIT NIL))
                       (EXIT
                        (LETT |unitPart|
                              (SPADCALL
                               (SPADCALL (SPADCALL |nfacs| (QREFELT $ 50))
                                         |uexp| (QREFELT $ 53))
                               |unitPart| (QREFELT $ 54))
                              . #9#))))
                     ('T (LETT |pfaclist| (CONS |u| |pfaclist|) . #9#)))))
                  (LETT #5# (CDR #5#) . #9#) #11# G191 (EXIT NIL))
             (EXIT
              (COND
               ((SPADCALL |cont| (|spadConstant| $ 56) (QREFELT $ 22))
                (SPADCALL |unitPart| |pfaclist| (QREFELT $ 46)))
               (#12#
                (SEQ (LETT |sqp| (SPADCALL |cont| (QREFELT $ 36)) . #9#)
                     (LETT |contlist|
                           (PROGN
                            (LETT #2# NIL . #9#)
                            (SEQ (LETT |w| NIL . #9#)
                                 (LETT #1# (SPADCALL |sqp| (QREFELT $ 43))
                                       . #9#)
                                 G190
                                 (COND
                                  ((OR (ATOM #1#)
                                       (PROGN (LETT |w| (CAR #1#) . #9#) NIL))
                                   #10#))
                                 (SEQ
                                  (EXIT
                                   (LETT #2#
                                         (CONS
                                          (VECTOR (QVELT |w| 0)
                                                  (SPADCALL (QVELT |w| 1)
                                                            (QREFELT $ 39))
                                                  (QVELT |w| 2))
                                          #2#)
                                         . #9#)))
                                 (LETT #1# (CDR #1#) . #9#) #11# G191
                                 (EXIT (NREVERSE0 #2#))))
                           . #9#)
                     (LETT |pfaclist| (APPEND |contlist| |pfaclist|) . #9#)
                     (EXIT
                      (SPADCALL
                       (SPADCALL (SPADCALL |sqp| (QREFELT $ 38)) |unitPart|
                                 (QREFELT $ 57))
                       |pfaclist| (QREFELT $ 46)))))))))))))) 

(DEFUN |TWOFACT;generalTwoFactor;SupF;6| (|m| $)
  (PROG (|ll| #1=#:G1934 |v| #2=#:G1933 |unitPart| |twoF| |ydeg| #3=#:G1913
         #4=#:G1912 #5=#:G1914 #6=#:G1932 |w| #7=#:G1931 #8=#:G1930 |m2|
         #9=#:G1929 #10=#:G1928 |res| |m1| |PthRootPow| #11=#:G1903 |p| |fac|
         |expon| #12=#:G1899 |expo| #13=#:G1927 |u| |sqfrm| #14=#:G1926
         #15=#:G1925 |contfact| |cont| #16=#:G1924 #17=#:G1923 |l|)
    (RETURN
     (SEQ
      (COND
       ((SPADCALL |m| (|spadConstant| $ 14) (QREFELT $ 16))
        (|spadConstant| $ 34))
       ((EQL (SPADCALL |m| (QREFELT $ 9)) 0)
        (SEQ
         (LETT |l| (SPADCALL (SPADCALL |m| (QREFELT $ 18)) (QREFELT $ 60))
               . #18=(|TWOFACT;generalTwoFactor;SupF;6|))
         (EXIT
          (SPADCALL (SPADCALL (SPADCALL |l| (QREFELT $ 38)) (QREFELT $ 39))
                    (PROGN
                     (LETT #17# NIL . #18#)
                     (SEQ (LETT |u| NIL . #18#)
                          (LETT #16# (SPADCALL |l| (QREFELT $ 43)) . #18#) G190
                          (COND
                           ((OR (ATOM #16#)
                                (PROGN (LETT |u| (CAR #16#) . #18#) NIL))
                            #19=(GO G191)))
                          (SEQ
                           (EXIT
                            (LETT #17#
                                  (CONS
                                   (VECTOR (QVELT |u| 0)
                                           (SPADCALL (QVELT |u| 1)
                                                     (QREFELT $ 39))
                                           (QVELT |u| 2))
                                   #17#)
                                  . #18#)))
                          (LETT #16# (CDR #16#) . #18#) #20=(GO G190) G191
                          (EXIT (NREVERSE0 #17#))))
                    (QREFELT $ 46)))))
       (#21='T
        (SEQ (LETT |ll| NIL . #18#)
             (LETT |cont| (SPADCALL |m| (QREFELT $ 47)) . #18#)
             (COND
              ((< 0 (SPADCALL |cont| (QREFELT $ 25)))
               (SEQ (LETT |m1| (SPADCALL |m| |cont| (QREFELT $ 48)) . #18#)
                    (EXIT
                     (COND ((QEQCAR |m1| 1) (|error| "content doesn't divide"))
                           (#21#
                            (SEQ (LETT |m| (QCDR |m1|) . #18#)
                                 (LETT |contfact|
                                       (SPADCALL |cont| (QREFELT $ 60)) . #18#)
                                 (LETT |unitPart|
                                       (SPADCALL
                                        (SPADCALL |contfact| (QREFELT $ 38))
                                        (QREFELT $ 39))
                                       . #18#)
                                 (EXIT
                                  (LETT |ll|
                                        (PROGN
                                         (LETT #15# NIL . #18#)
                                         (SEQ (LETT |w| NIL . #18#)
                                              (LETT #14#
                                                    (SPADCALL |contfact|
                                                              (QREFELT $ 43))
                                                    . #18#)
                                              G190
                                              (COND
                                               ((OR (ATOM #14#)
                                                    (PROGN
                                                     (LETT |w| (CAR #14#)
                                                           . #18#)
                                                     NIL))
                                                #19#))
                                              (SEQ
                                               (EXIT
                                                (LETT #15#
                                                      (CONS
                                                       (VECTOR (QVELT |w| 0)
                                                               (SPADCALL
                                                                (QVELT |w| 1)
                                                                (QREFELT $ 39))
                                                               (QVELT |w| 2))
                                                       #15#)
                                                      . #18#)))
                                              (LETT #14# (CDR #14#) . #18#)
                                              #20# G191
                                              (EXIT (NREVERSE0 #15#))))
                                        . #18#))))))))
              (#21# (LETT |unitPart| (SPADCALL |cont| (QREFELT $ 39)) . #18#)))
             (LETT |sqfrm| (SPADCALL |m| (QREFELT $ 49)) . #18#)
             (SEQ (LETT |u| NIL . #18#)
                  (LETT #13# (SPADCALL |sqfrm| (QREFELT $ 64)) . #18#) G190
                  (COND
                   ((OR (ATOM #13#) (PROGN (LETT |u| (CAR #13#) . #18#) NIL))
                    #19#))
                  (SEQ (LETT |expo| (QCDR |u|) . #18#)
                       (COND
                        ((< |expo| 0)
                         (|error| "negative exponent in a factorisation")))
                       (LETT |expon|
                             (PROG1 (LETT #12# |expo| . #18#)
                               (|check-subtype| (>= #12# 0)
                                                '(|NonNegativeInteger|) #12#))
                             . #18#)
                       (LETT |fac| (QCAR |u|) . #18#)
                       (EXIT
                        (COND
                         ((EQL (SPADCALL |fac| (QREFELT $ 9)) 1)
                          (LETT |ll|
                                (CONS (VECTOR (CONS 2 "irred") |fac| |expon|)
                                      |ll|)
                                . #18#))
                         ((SPADCALL (SPADCALL |fac| (QREFELT $ 65))
                                    (|spadConstant| $ 14) (QREFELT $ 16))
                          (COND
                           ((SPADCALL
                             (SPADCALL (ELT $ 66) |fac| (QREFELT $ 68))
                             (|spadConstant| $ 14) (QREFELT $ 16))
                            (SEQ (LETT |p| (SPADCALL (QREFELT $ 69)) . #18#)
                                 (LETT |PthRootPow|
                                       (PROG2
                                           (LETT #11#
                                                 (SPADCALL
                                                  (SPADCALL (QREFELT $ 70)) |p|
                                                  (QREFELT $ 71))
                                                 . #18#)
                                           (QCDR #11#)
                                         (|check-union| (QEQCAR #11# 0)
                                                        (|NonNegativeInteger|)
                                                        #11#))
                                       . #18#)
                                 (LETT |m1|
                                       (SPADCALL
                                        (SPADCALL
                                         (CONS
                                          #'|TWOFACT;generalTwoFactor;SupF;6!0|
                                          (VECTOR $ |PthRootPow| |p|))
                                         |fac| (QREFELT $ 68))
                                        |p| (QREFELT $ 72))
                                       . #18#)
                                 (EXIT
                                  (COND
                                   ((QEQCAR |m1| 1)
                                    (|error| "consistency error in TwoFactor"))
                                   ('T
                                    (SEQ
                                     (LETT |res|
                                           (SPADCALL (QCDR |m1|)
                                                     (QREFELT $ 73))
                                           . #18#)
                                     (LETT |unitPart|
                                           (SPADCALL |unitPart|
                                                     (SPADCALL
                                                      (SPADCALL |res|
                                                                (QREFELT $ 50))
                                                      (* |p| |expon|)
                                                      (QREFELT $ 53))
                                                     (QREFELT $ 54))
                                           . #18#)
                                     (EXIT
                                      (LETT |ll|
                                            (APPEND
                                             (PROGN
                                              (LETT #10# NIL . #18#)
                                              (SEQ (LETT |v| NIL . #18#)
                                                   (LETT #9#
                                                         (SPADCALL |res|
                                                                   (QREFELT $
                                                                            51))
                                                         . #18#)
                                                   G190
                                                   (COND
                                                    ((OR (ATOM #9#)
                                                         (PROGN
                                                          (LETT |v| (CAR #9#)
                                                                . #18#)
                                                          NIL))
                                                     #19#))
                                                   (SEQ
                                                    (EXIT
                                                     (LETT #10#
                                                           (CONS
                                                            (VECTOR
                                                             (QVELT |v| 0)
                                                             (QVELT |v| 1)
                                                             (* (* |expon| |p|)
                                                                (QVELT |v| 2)))
                                                            #10#)
                                                           . #18#)))
                                                   (LETT #9# (CDR #9#) . #18#)
                                                   #20# G191
                                                   (EXIT (NREVERSE0 #10#))))
                                             |ll|)
                                            . #18#))))))))
                           ('T
                            (SEQ
                             (LETT |m2|
                                   (SPADCALL (SPADCALL |fac| (QREFELT $ 75))
                                             (QREFELT $ 73))
                                   . #18#)
                             (LETT |unitPart|
                                   (SPADCALL |unitPart|
                                             (SPADCALL
                                              (SPADCALL |m2| (QREFELT $ 50))
                                              |expon| (QREFELT $ 53))
                                             (QREFELT $ 54))
                                   . #18#)
                             (EXIT
                              (LETT |ll|
                                    (APPEND
                                     (PROGN
                                      (LETT #8# NIL . #18#)
                                      (SEQ (LETT |v| NIL . #18#)
                                           (LETT #7#
                                                 (SPADCALL |m2| (QREFELT $ 51))
                                                 . #18#)
                                           G190
                                           (COND
                                            ((OR (ATOM #7#)
                                                 (PROGN
                                                  (LETT |v| (CAR #7#) . #18#)
                                                  NIL))
                                             #19#))
                                           (SEQ
                                            (EXIT
                                             (LETT #8#
                                                   (CONS
                                                    (VECTOR (QVELT |v| 0)
                                                            (SPADCALL
                                                             (QVELT |v| 1)
                                                             (QREFELT $ 75))
                                                            (SPADCALL |expon|
                                                                      (QVELT
                                                                       |v| 2)
                                                                      (QREFELT
                                                                       $ 76)))
                                                    #8#)
                                                   . #18#)))
                                           (LETT #7# (CDR #7#) . #18#) #20#
                                           G191 (EXIT (NREVERSE0 #8#))))
                                     |ll|)
                                    . #18#))))))
                         ('T
                          (SEQ
                           (LETT |ydeg|
                                 (PROGN
                                  (LETT #3# NIL . #18#)
                                  (SEQ (LETT |w| NIL . #18#)
                                       (LETT #6#
                                             (SPADCALL |fac| (QREFELT $ 78))
                                             . #18#)
                                       G190
                                       (COND
                                        ((OR (ATOM #6#)
                                             (PROGN
                                              (LETT |w| (CAR #6#) . #18#)
                                              NIL))
                                         #19#))
                                       (SEQ
                                        (EXIT
                                         (PROGN
                                          (LETT #5#
                                                (SPADCALL |w| (QREFELT $ 25))
                                                . #18#)
                                          (COND
                                           (#3#
                                            (LETT #4# (MAX #4# #5#) . #18#))
                                           ('T
                                            (PROGN
                                             (LETT #4# #5# . #18#)
                                             (LETT #3# 'T . #18#)))))))
                                       (LETT #6# (CDR #6#) . #18#) #20# G191
                                       (EXIT NIL))
                                  (COND (#3# #4#)
                                        ('T (|IdentityError| '|max|))))
                                 . #18#)
                           (LETT |twoF| (SPADCALL |fac| |ydeg| (QREFELT $ 79))
                                 . #18#)
                           (LETT |unitPart|
                                 (SPADCALL |unitPart|
                                           (SPADCALL
                                            (SPADCALL |twoF| (QREFELT $ 50))
                                            |expon| (QREFELT $ 53))
                                           (QREFELT $ 54))
                                 . #18#)
                           (EXIT
                            (LETT |ll|
                                  (APPEND
                                   (PROGN
                                    (LETT #2# NIL . #18#)
                                    (SEQ (LETT |v| NIL . #18#)
                                         (LETT #1#
                                               (SPADCALL |twoF| (QREFELT $ 51))
                                               . #18#)
                                         G190
                                         (COND
                                          ((OR (ATOM #1#)
                                               (PROGN
                                                (LETT |v| (CAR #1#) . #18#)
                                                NIL))
                                           #19#))
                                         (SEQ
                                          (EXIT
                                           (LETT #2#
                                                 (CONS
                                                  (VECTOR (QVELT |v| 0)
                                                          (QVELT |v| 1)
                                                          (SPADCALL |expon|
                                                                    (QVELT |v|
                                                                           2)
                                                                    (QREFELT $
                                                                             76)))
                                                  #2#)
                                                 . #18#)))
                                         (LETT #1# (CDR #1#) . #18#) #20# G191
                                         (EXIT (NREVERSE0 #2#))))
                                   |ll|)
                                  . #18#)))))))
                  (LETT #13# (CDR #13#) . #18#) #20# G191 (EXIT NIL))
             (EXIT (SPADCALL |unitPart| |ll| (QREFELT $ 46)))))))))) 

(DEFUN |TWOFACT;generalTwoFactor;SupF;6!0| (|x| $$)
  (PROG (|p| |PthRootPow| $)
    (LETT |p| (QREFELT $$ 2) . #1=(|TWOFACT;generalTwoFactor;SupF;6|))
    (LETT |PthRootPow| (QREFELT $$ 1) . #1#)
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|TWOFACT;pthRoot| |x| |p| |PthRootPow| $))))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7| (|m| |dx| $)
  (PROG (#1=#:G1971 #2=#:G1970 #3=#:G1972 #4=#:G1981 |ff1| |lfactk| #5=#:G1960
         |ffn| #6=#:G1966 #7=#:G1965 #8=#:G1967 #9=#:G1980 #10=#:G1792 |lfacth|
         #11=#:G1979 |g| #12=#:G1978 |normfacs| #13=#:G1968 |ffu| |ff| |c|
         |Normp| |dx1| #14=#:G1956 |lfact| #15=#:G1977 |lf| #16=#:G1976
         |lfact1| |fumex| |prime| |look| |umex| |i| |val| |lcmm| |m1| |mm| TP
         |SUEx| |extField| |n| |umv| |vval| |lcm| |try| |dm|)
    (RETURN
     (SEQ
      (LETT |n| (|TWOFACT;computeDegree| |m| |dx| (SPADCALL (QREFELT $ 70)) $)
            . #17=(|TWOFACT;twoFactor;SupIF;7|))
      (LETT |look| 'T . #17#) (LETT |dm| (SPADCALL |m| (QREFELT $ 9)) . #17#)
      (LETT |try| (MIN 5 (SPADCALL (QREFELT $ 70))) . #17#) (LETT |i| 0 . #17#)
      (LETT |lcm| (SPADCALL |m| (QREFELT $ 18)) . #17#)
      (SEQ G190
           (COND
            ((NULL (COND (|look| (< |i| |try|)) ('T 'NIL))) #18=(GO G191)))
           (SEQ (LETT |vval| (SPADCALL (QREFELT $ 80)) . #17#)
                (LETT |i| (+ |i| 1) . #17#)
                (EXIT
                 (COND
                  ((SPADCALL (SPADCALL |lcm| |vval| (QREFELT $ 81))
                             (QREFELT $ 82))
                   "next value")
                  ('T
                   (SEQ
                    (LETT |umv|
                          (SPADCALL
                           (CONS #'|TWOFACT;twoFactor;SupIF;7!0|
                                 (VECTOR $ |vval|))
                           |m| (QREFELT $ 85))
                          . #17#)
                    (COND
                     ((NULL
                       (EQL
                        (SPADCALL
                         (SPADCALL |umv| (SPADCALL |umv| (QREFELT $ 66))
                                   (QREFELT $ 86))
                         (QREFELT $ 25))
                        0))
                      (EXIT "next val")))
                    (LETT |n| 1 . #17#) (EXIT (LETT |look| 'NIL . #17#)))))))
           NIL #19=(GO G190) G191 (EXIT NIL))
      (LETT |extField| (|FiniteFieldExtension| (QREFELT $ 6) |n|) . #17#)
      (LETT |SUEx| (|SparseUnivariatePolynomial| |extField|) . #17#)
      (LETT TP (|SparseUnivariatePolynomial| |SUEx|) . #17#)
      (LETT |mm| (SPADCALL (|compiledLookupCheck| '|Zero| (LIST '$) TP))
            . #17#)
      (LETT |m1| |m| . #17#)
      (SEQ G190
           (COND
            ((NULL
              (COND ((SPADCALL |m1| (|spadConstant| $ 14) (QREFELT $ 16)) 'NIL)
                    ('T 'T)))
             #18#))
           (SEQ
            (LETT |mm|
                  (SPADCALL |mm|
                            (SPADCALL
                             (SPADCALL
                              (|compiledLookupCheck| '|coerce|
                                                     (LIST '$
                                                           (|devaluate|
                                                            (ELT $ 6)))
                                                     |extField|)
                              (SPADCALL |m1| (QREFELT $ 18))
                              (|compiledLookupCheck| '|map|
                                                     (LIST (|devaluate| |SUEx|)
                                                           (LIST '|Mapping|
                                                                 (|devaluate|
                                                                  |extField|)
                                                                 (|devaluate|
                                                                  (ELT $ 6)))
                                                           (LIST
                                                            '|SparseUnivariatePolynomial|
                                                            (|devaluate|
                                                             (ELT $ 6))))
                                                     (|UnivariatePolynomialCategoryFunctions2|
                                                      (ELT $ 6)
                                                      (|SparseUnivariatePolynomial|
                                                       (ELT $ 6))
                                                      |extField| |SUEx|)))
                             (SPADCALL |m1| (QREFELT $ 9))
                             (|compiledLookupCheck| '|monomial|
                                                    (LIST '$
                                                          (|devaluate| |SUEx|)
                                                          (LIST
                                                           '|NonNegativeInteger|))
                                                    TP))
                            (|compiledLookupCheck| '+ (LIST '$ '$ '$) TP))
                  . #17#)
            (EXIT (LETT |m1| (SPADCALL |m1| (QREFELT $ 19)) . #17#)))
           NIL #19# G191 (EXIT NIL))
      (LETT |lcmm|
            (SPADCALL |mm|
                      (|compiledLookupCheck| '|leadingCoefficient|
                                             (LIST (|devaluate| |SUEx|) '$)
                                             TP))
            . #17#)
      (COND
       ((NULL |look|)
        (SEQ
         (LETT |val|
               (SPADCALL |vval|
                         (|compiledLookupCheck| '|coerce|
                                                (LIST '$
                                                      (|devaluate| (ELT $ 6)))
                                                |extField|))
               . #17#)
         (EXIT
          (LETT |umex|
                (SPADCALL
                 (|compiledLookupCheck| '|coerce|
                                        (LIST '$ (|devaluate| (ELT $ 6)))
                                        |extField|)
                 |umv|
                 (|compiledLookupCheck| '|map|
                                        (LIST (|devaluate| |SUEx|)
                                              (LIST '|Mapping|
                                                    (|devaluate| |extField|)
                                                    (|devaluate| (ELT $ 6)))
                                              (LIST
                                               '|SparseUnivariatePolynomial|
                                               (|devaluate| (ELT $ 6))))
                                        (|UnivariatePolynomialCategoryFunctions2|
                                         (ELT $ 6)
                                         (|SparseUnivariatePolynomial|
                                          (ELT $ 6))
                                         |extField| |SUEx|)))
                . #17#)))))
      (SEQ G190 (COND ((NULL |look|) #18#))
           (SEQ
            (LETT |val|
                  (SPADCALL
                   (|compiledLookupCheck| '|random| (LIST '$) |extField|))
                  . #17#)
            (LETT |i| (+ |i| 1) . #17#)
            (EXIT
             (COND
              ((SPADCALL
                (SPADCALL |lcmm| |val|
                          (|compiledLookupCheck| '|elt|
                                                 (LIST (|devaluate| |extField|)
                                                       '$
                                                       (|devaluate|
                                                        |extField|))
                                                 |SUEx|))
                (SPADCALL (|compiledLookupCheck| '|Zero| (LIST '$) |extField|))
                (|compiledLookupCheck| '= (LIST (LIST '|Boolean|) '$ '$)
                                       |extField|))
               "next value")
              ('T
               (SEQ
                (LETT |umex|
                      (SPADCALL
                       (CONS #'|TWOFACT;twoFactor;SupIF;7!1|
                             (VECTOR |SUEx| |extField| |val|))
                       |mm|
                       (|compiledLookupCheck| '|map|
                                              (LIST (|devaluate| |SUEx|)
                                                    (LIST '|Mapping|
                                                          (|devaluate|
                                                           |extField|)
                                                          (|devaluate| |SUEx|))
                                                    (|devaluate| TP))
                                              (|UnivariatePolynomialCategoryFunctions2|
                                               |SUEx| TP |extField| |SUEx|)))
                      . #17#)
                (COND
                 ((NULL
                   (EQL
                    (SPADCALL
                     (SPADCALL |umex|
                               (SPADCALL |umex|
                                         (|compiledLookupCheck|
                                          '|differentiate| (LIST '$ '$)
                                          |SUEx|))
                               (|compiledLookupCheck| '|gcd| (LIST '$ '$ '$)
                                                      |SUEx|))
                     (|compiledLookupCheck| '|degree|
                                            (LIST (LIST '|NonNegativeInteger|)
                                                  '$)
                                            |SUEx|))
                    0))
                  (EXIT "next val")))
                (EXIT (LETT |look| 'NIL . #17#)))))))
           NIL #19# G191 (EXIT NIL))
      (LETT |prime|
            (SPADCALL
             (SPADCALL
              (SPADCALL (|compiledLookupCheck| '|One| (LIST '$) |extField|)) 1
              (|compiledLookupCheck| '|monomial|
                                     (LIST '$ (|devaluate| |extField|)
                                           (LIST '|NonNegativeInteger|))
                                     |SUEx|))
             (SPADCALL |val| 0
                       (|compiledLookupCheck| '|monomial|
                                              (LIST '$ (|devaluate| |extField|)
                                                    (LIST
                                                     '|NonNegativeInteger|))
                                              |SUEx|))
             (|compiledLookupCheck| '- (LIST '$ '$ '$) |SUEx|))
            . #17#)
      (LETT |fumex|
            (SPADCALL |umex|
                      (|compiledLookupCheck| '|factor|
                                             (LIST
                                              (LIST '|Factored|
                                                    (|devaluate| |SUEx|))
                                              (|devaluate| |SUEx|))
                                             (|DistinctDegreeFactorize|
                                              |extField| |SUEx|)))
            . #17#)
      (LETT |lfact1|
            (SPADCALL |fumex|
                      (|compiledLookupCheck| '|factors|
                                             (LIST
                                              (LIST '|List|
                                                    (LIST '|Record|
                                                          (LIST '|:| '|factor|
                                                                (|devaluate|
                                                                 |SUEx|))
                                                          (LIST '|:|
                                                                '|exponent|
                                                                (LIST
                                                                 '|Integer|))))
                                              '$)
                                             (|Factored| |SUEx|)))
            . #17#)
      (EXIT
       (COND ((EQL (LENGTH |lfact1|) 1) (SPADCALL |m| 1 (QREFELT $ 87)))
             (#20='T
              (SEQ
               (LETT |lfact|
                     (PROGN
                      (LETT #16# NIL . #17#)
                      (SEQ (LETT |lf| NIL . #17#) (LETT #15# |lfact1| . #17#)
                           G190
                           (COND
                            ((OR (ATOM #15#)
                                 (PROGN (LETT |lf| (CAR #15#) . #17#) NIL))
                             #18#))
                           (SEQ
                            (EXIT
                             (LETT #16#
                                   (CONS
                                    (SPADCALL
                                     (|compiledLookupCheck| '|coerce|
                                                            (LIST '$
                                                                  (|devaluate|
                                                                   |extField|))
                                                            |SUEx|)
                                     (QCAR |lf|)
                                     (|compiledLookupCheck| '|map|
                                                            (LIST
                                                             (|devaluate| TP)
                                                             (LIST '|Mapping|
                                                                   (|devaluate|
                                                                    |SUEx|)
                                                                   (|devaluate|
                                                                    |extField|))
                                                             (|devaluate|
                                                              |SUEx|))
                                                            (|UnivariatePolynomialCategoryFunctions2|
                                                             |extField| |SUEx|
                                                             |SUEx| TP)))
                                    #16#)
                                   . #17#)))
                           (LETT #15# (CDR #15#) . #17#) #19# G191
                           (EXIT (NREVERSE0 #16#))))
                     . #17#)
               (LETT |lfact|
                     (CONS
                      (SPADCALL
                       (|compiledLookupCheck| '|coerce|
                                              (LIST '$
                                                    (|devaluate| |extField|))
                                              |SUEx|)
                       (SPADCALL |fumex|
                                 (|compiledLookupCheck| '|unit|
                                                        (LIST
                                                         (|devaluate| |SUEx|)
                                                         '$)
                                                        (|Factored| |SUEx|)))
                       (|compiledLookupCheck| '|map|
                                              (LIST (|devaluate| TP)
                                                    (LIST '|Mapping|
                                                          (|devaluate| |SUEx|)
                                                          (|devaluate|
                                                           |extField|))
                                                    (|devaluate| |SUEx|))
                                              (|UnivariatePolynomialCategoryFunctions2|
                                               |extField| |SUEx| |SUEx| TP)))
                      |lfact|)
                     . #17#)
               (LETT |dx1|
                     (PROG1 (LETT #14# (+ |dx| 1) . #17#)
                       (|check-subtype| (> #14# 0) '(|PositiveInteger|) #14#))
                     . #17#)
               (LETT |lfacth|
                     (SPADCALL |mm| |lfact| |prime| |dx1|
                               (|compiledLookupCheck| '|completeHensel|
                                                      (LIST
                                                       (LIST '|List|
                                                             (|devaluate| TP))
                                                       (|devaluate| TP)
                                                       (LIST '|List|
                                                             (|devaluate| TP))
                                                       (|devaluate| |SUEx|)
                                                       (LIST
                                                        '|PositiveInteger|))
                                                      (|GeneralHenselPackage|
                                                       |SUEx| TP)))
                     . #17#)
               (LETT |lfactk| NIL . #17#)
               (LETT |Normp|
                     (|NormRetractPackage| (QREFELT $ 6) |extField| |SUEx| TP
                                           |n|)
                     . #17#)
               (SEQ G190
                    (COND ((NULL (COND ((NULL |lfacth|) 'NIL) ('T 'T))) #18#))
                    (SEQ
                     (EXIT
                      (SEQ (LETT |ff| (|SPADfirst| |lfacth|) . #17#)
                           (LETT |lfacth| (CDR |lfacth|) . #17#)
                           (SEQ
                            (LETT |c|
                                  (SPADCALL
                                   (SPADCALL |ff|
                                             (|compiledLookupCheck|
                                              '|leadingCoefficient|
                                              (LIST (|devaluate| |SUEx|) '$)
                                              TP))
                                   (|compiledLookupCheck| '|leadingCoefficient|
                                                          (LIST
                                                           (|devaluate|
                                                            |extField|)
                                                           '$)
                                                          |SUEx|))
                                  . #17#)
                            (EXIT
                             (COND
                              ((NULL
                                (SPADCALL |c|
                                          (SPADCALL
                                           (|compiledLookupCheck| '|One|
                                                                  (LIST '$)
                                                                  |extField|))
                                          (|compiledLookupCheck| '=
                                                                 (LIST
                                                                  (LIST
                                                                   '|Boolean|)
                                                                  '$ '$)
                                                                 |extField|)))
                               (LETT |ff|
                                     (SPADCALL
                                      (SPADCALL
                                       (SPADCALL |c|
                                                 (|compiledLookupCheck| '|inv|
                                                                        (LIST
                                                                         '$ '$)
                                                                        |extField|))
                                       (|compiledLookupCheck| '|coerce|
                                                              (LIST '$
                                                                    (|devaluate|
                                                                     |extField|))
                                                              |SUEx|))
                                      |ff|
                                      (|compiledLookupCheck| '*
                                                             (LIST '$
                                                                   (|devaluate|
                                                                    |SUEx|)
                                                                   '$)
                                                             TP))
                                     . #17#)))))
                           (SEQ
                            (LETT |ffu|
                                  (SPADCALL |ff|
                                            (|compiledLookupCheck|
                                             '|retractIfCan|
                                             (LIST
                                              (LIST '|Union|
                                                    (LIST
                                                     '|SparseUnivariatePolynomial|
                                                     (LIST
                                                      '|SparseUnivariatePolynomial|
                                                      (|devaluate| (ELT $ 6))))
                                                    '#21="failed")
                                              (|devaluate| TP))
                                             |Normp|))
                                  . #17#)
                            (EXIT
                             (COND
                              ((NULL (QEQCAR |ffu| 1))
                               (PROGN
                                (LETT #13#
                                      (LETT |lfactk|
                                            (CONS (QCDR |ffu|) |lfactk|)
                                            . #17#)
                                      . #17#)
                                (GO #13#))))))
                           (LETT |normfacs|
                                 (SPADCALL |ff|
                                           (|compiledLookupCheck|
                                            '|normFactors|
                                            (LIST
                                             (LIST '|List| (|devaluate| TP))
                                             (|devaluate| TP))
                                            |Normp|))
                                 . #17#)
                           (LETT |lfacth|
                                 (PROGN
                                  (LETT #12# NIL . #17#)
                                  (SEQ (LETT |g| NIL . #17#)
                                       (LETT #11# |lfacth| . #17#) G190
                                       (COND
                                        ((OR (ATOM #11#)
                                             (PROGN
                                              (LETT |g| (CAR #11#) . #17#)
                                              NIL))
                                         #18#))
                                       (SEQ
                                        (EXIT
                                         (COND
                                          ((COND
                                            ((SPADCALL |g| |normfacs|
                                                       (|compiledLookupCheck|
                                                        '|member?|
                                                        (LIST (LIST '|Boolean|)
                                                              (|devaluate| TP)
                                                              '$)
                                                        (|List| TP)))
                                             'NIL)
                                            ('T 'T))
                                           (LETT #12# (CONS |g| #12#)
                                                 . #17#)))))
                                       (LETT #11# (CDR #11#) . #17#) #19# G191
                                       (EXIT (NREVERSE0 #12#))))
                                 . #17#)
                           (LETT |ffn|
                                 (PROGN
                                  (LETT #6# NIL . #17#)
                                  (SEQ (LETT #10# NIL . #17#)
                                       (LETT #9# |normfacs| . #17#) G190
                                       (COND
                                        ((OR (ATOM #9#)
                                             (PROGN
                                              (LETT #10# (CAR #9#) . #17#)
                                              NIL))
                                         #18#))
                                       (SEQ
                                        (EXIT
                                         (PROGN
                                          (LETT #8# #10# . #17#)
                                          (COND
                                           (#6#
                                            (LETT #7#
                                                  (SPADCALL #7# #8#
                                                            (|compiledLookupCheck|
                                                             '* (LIST '$ '$ '$)
                                                             TP))
                                                  . #17#))
                                           ('T
                                            (PROGN
                                             (LETT #7# #8# . #17#)
                                             (LETT #6# 'T . #17#)))))))
                                       (LETT #9# (CDR #9#) . #17#) #19# G191
                                       (EXIT NIL))
                                  (COND (#6# #7#)
                                        ('T
                                         (SPADCALL
                                          (|compiledLookupCheck| '|One|
                                                                 (LIST '$)
                                                                 TP)))))
                                 . #17#)
                           (EXIT
                            (LETT |lfactk|
                                  (CONS
                                   (PROG2
                                       (LETT #5#
                                             (SPADCALL |ffn|
                                                       (|compiledLookupCheck|
                                                        '|retractIfCan|
                                                        (LIST
                                                         (LIST '|Union|
                                                               (LIST
                                                                '|SparseUnivariatePolynomial|
                                                                (LIST
                                                                 '|SparseUnivariatePolynomial|
                                                                 (|devaluate|
                                                                  (ELT $ 6))))
                                                               '#21#)
                                                         (|devaluate| TP))
                                                        |Normp|))
                                             . #17#)
                                       (QCDR #5#)
                                     (|check-union| (QEQCAR #5# 0)
                                                    (|SparseUnivariatePolynomial|
                                                     (|SparseUnivariatePolynomial|
                                                      (QREFELT $ 6)))
                                                    #5#))
                                   |lfactk|)
                                  . #17#))))
                     #13# (EXIT #13#))
                    NIL #19# G191 (EXIT NIL))
               (EXIT
                (PROGN
                 (LETT #1# NIL . #17#)
                 (SEQ (LETT |ff1| NIL . #17#) (LETT #4# |lfactk| . #17#) G190
                      (COND
                       ((OR (ATOM #4#)
                            (PROGN (LETT |ff1| (CAR #4#) . #17#) NIL))
                        #18#))
                      (SEQ
                       (EXIT
                        (PROGN
                         (LETT #3# (SPADCALL |ff1| 1 (QREFELT $ 87)) . #17#)
                         (COND
                          (#1#
                           (LETT #2# (SPADCALL #2# #3# (QREFELT $ 88)) . #17#))
                          ('T
                           (PROGN
                            (LETT #2# #3# . #17#)
                            (LETT #1# 'T . #17#)))))))
                      (LETT #4# (CDR #4#) . #17#) #19# G191 (EXIT NIL))
                 (COND (#1# #2#) (#20# (|spadConstant| $ 89))))))))))))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7!1| (|x| $$)
  (PROG (|val| |extField| |SUEx|)
    (LETT |val| (QREFELT $$ 2) . #1=(|TWOFACT;twoFactor;SupIF;7|))
    (LETT |extField| (QREFELT $$ 1) . #1#)
    (LETT |SUEx| (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (SPADCALL |x| |val|
                (|compiledLookupCheck| '|elt|
                                       (LIST (|devaluate| |extField|) '$
                                             (|devaluate| |extField|))
                                       |SUEx|)))))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7!0| (|x| $$)
  (PROG (|vval| $)
    (LETT |vval| (QREFELT $$ 1) . #1=(|TWOFACT;twoFactor;SupIF;7|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |x| |vval| (QREFELT $ 81)))))) 

(DEFUN |TwoFactorize| (#1=#:G1982)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1983)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|TwoFactorize|)
                                           '|domainEqualList|)
                . #3=(|TwoFactorize|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|TwoFactorize;| #1#) (LETT #2# T . #3#))
            (COND
             ((NOT #2#) (HREM |$ConstructorCache| '|TwoFactorize|))))))))))) 

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

(MAKEPROP '|TwoFactorize| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|NonNegativeInteger|)
              (|SparseUnivariatePolynomial| 17) (0 . |degree|)
              (|PositiveInteger|) (|Integer|) (5 . *) (11 . |Zero|)
              (15 . |Zero|) (|Boolean|) (19 . =)
              (|SparseUnivariatePolynomial| 6) (25 . |leadingCoefficient|)
              (30 . |reductum|) (35 . +) (41 . |Zero|) (45 . =)
              (51 . |leadingCoefficient|) (56 . |monomial|) (62 . |degree|)
              (67 . |monomial|) (73 . |reductum|) (78 . ^) (|Mapping| 6 6)
              (84 . |map|) (|Union| $ '"failed") (90 . |divideExponents|)
              (|Factored| 8) (96 . |Zero|) (|Factored| $) (100 . |squareFree|)
              (|Factored| 17) (105 . |unit|) (110 . |coerce|)
              (|Union| '"nil" '"sqfr" '"irred" '"prime")
              (|Record| (|:| |flg| 40) (|:| |fctr| 17) (|:| |xpnt| 11))
              (|List| 41) (115 . |factorList|)
              (|Record| (|:| |flg| 40) (|:| |fctr| 8) (|:| |xpnt| 11))
              (|List| 44) (120 . |makeFR|) (126 . |content|) (131 . |exquo|)
              (137 . |squareFree|) (142 . |unit|) (147 . |factorList|)
              (152 . =) (158 . ^) (164 . *) (170 . |One|) (174 . |One|)
              (178 . *) |TWOFACT;generalSqFr;SupF;5|
              (|DistinctDegreeFactorize| 6 17) (184 . |factor|) (189 . |Zero|)
              (|Record| (|:| |factor| 8) (|:| |exponent| 11)) (|List| 62)
              (193 . |factors|) (198 . |differentiate|) (203 . |differentiate|)
              (|Mapping| 17 17) (208 . |map|) (214 . |characteristic|)
              (218 . |size|) (222 . |exquo|) (228 . |divideExponents|)
              |TWOFACT;generalTwoFactor;SupF;6|
              (|CommuteUnivariatePolynomialCategory| 6 17 8) (234 . |swap|)
              (239 . *) (|List| 17) (245 . |coefficients|)
              |TWOFACT;twoFactor;SupIF;7| (250 . |random|) (254 . |elt|)
              (260 . |zero?|) (|Mapping| 6 17)
              (|UnivariatePolynomialCategoryFunctions2| 17 8 6 17)
              (265 . |map|) (271 . |gcd|) (277 . |primeFactor|) (283 . *)
              (289 . |One|))
           '#(|twoFactor| 293 |generalTwoFactor| 299 |generalSqFr| 304) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 89
                                                 '(1 8 7 0 9 2 11 0 10 0 12 0 6
                                                   0 13 0 8 0 14 2 8 15 0 0 16
                                                   1 8 17 0 18 1 8 0 0 19 2 8 0
                                                   0 0 20 0 17 0 21 2 17 15 0 0
                                                   22 1 17 6 0 23 2 17 0 6 7 24
                                                   1 17 7 0 25 2 8 0 17 7 26 1
                                                   17 0 0 27 2 6 0 0 7 28 2 17
                                                   0 29 0 30 2 17 31 0 7 32 0
                                                   33 0 34 1 17 35 0 36 1 37 17
                                                   0 38 1 8 0 17 39 1 37 42 0
                                                   43 2 33 0 8 45 46 1 8 17 0
                                                   47 2 8 31 0 17 48 1 8 35 0
                                                   49 1 33 8 0 50 1 33 45 0 51
                                                   2 40 15 0 0 52 2 8 0 0 7 53
                                                   2 8 0 0 0 54 0 6 0 55 0 17 0
                                                   56 2 8 0 17 0 57 1 59 37 17
                                                   60 0 37 0 61 1 33 63 0 64 1
                                                   8 0 0 65 1 17 0 0 66 2 8 0
                                                   67 0 68 0 6 7 69 0 6 7 70 2
                                                   7 31 0 0 71 2 8 31 0 7 72 1
                                                   74 8 8 75 2 11 0 7 0 76 1 8
                                                   77 0 78 0 6 0 80 2 17 6 0 6
                                                   81 1 6 15 0 82 2 84 17 83 8
                                                   85 2 17 0 0 0 86 2 33 0 8 11
                                                   87 2 33 0 0 0 88 0 33 0 89 2
                                                   0 33 8 11 79 1 0 33 8 73 1 0
                                                   33 8 58)))))
           '|lookupComplete|)) 
