
(/VERSIONCHECK 2) 

(DEFUN |UPSQFREE;squareFreePart;2P;1| (|p| $)
  (PROG (#0=#:G1827)
    (RETURN
      (PROG2 (LETT #0#
                   (SPADCALL |p|
                       (SPADCALL |p| (SPADCALL |p| (QREFELT $ 8))
                           (QREFELT $ 9))
                       (QREFELT $ 11))
                   |UPSQFREE;squareFreePart;2P;1|)
             (QCDR #0#)
        (|check-union| (QEQCAR #0# 0) (QREFELT $ 7) #0#))))) 

(DEFUN |UPSQFREE;squareFreePart;2P;2| (|p| $)
  (PROG (|s| |f| #0=#:G1838 #1=#:G1836 #2=#:G1834 #3=#:G1835)
    (RETURN
      (SEQ (SPADCALL
               (SPADCALL
                   (LETT |s| (SPADCALL |p| (QREFELT $ 14))
                         . #4=(|UPSQFREE;squareFreePart;2P;2|))
                   (QREFELT $ 15))
               (PROGN
                 (LETT #3# NIL . #4#)
                 (SEQ (LETT |f| NIL . #4#)
                      (LETT #0# (SPADCALL |s| (QREFELT $ 18)) . #4#)
                      G190
                      (COND
                        ((OR (ATOM #0#)
                             (PROGN (LETT |f| (CAR #0#) . #4#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (PROGN
                                   (LETT #1# (QCAR |f|) . #4#)
                                   (COND
                                     (#3#
                                      (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 19)) . #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 (|spadConstant| $ 20))))
               (QREFELT $ 19)))))) 

(DEFUN |UPSQFREE;BumInSepFFE;2R;3| (|ffe| $)
  (VECTOR (CONS 1 "sqfr")
          (SPADCALL (ELT $ 21) (QVELT |ffe| 1) (QREFELT $ 23))
          (SPADCALL (SPADCALL (QREFELT $ 25)) (QVELT |ffe| 2)
              (QREFELT $ 27)))) 

(DEFUN |UPSQFREE;BumInSepFFE;2R;4| (|ffe| $)
  (PROG (|np| |nthrp|)
    (RETURN
      (SEQ (LETT |np|
                 (SPADCALL (QVELT |ffe| 1) (SPADCALL (QREFELT $ 25))
                     (QREFELT $ 31))
                 . #0=(|UPSQFREE;BumInSepFFE;2R;4|))
           (LETT |nthrp| (SPADCALL |np| (QREFELT $ 32)) . #0#)
           (EXIT (COND
                   ((QEQCAR |nthrp| 1)
                    (VECTOR (CONS 0 "nil") |np| (QVELT |ffe| 2)))
                   ('T
                    (VECTOR (CONS 1 "sqfr") (QCDR |nthrp|)
                            (SPADCALL (SPADCALL (QREFELT $ 25))
                                (QVELT |ffe| 2) (QREFELT $ 27)))))))))) 

(DEFUN |UPSQFREE;BumInSepFFE;2R;5| (|ffe| $)
  (VECTOR (CONS 0 "nil")
          (SPADCALL (QVELT |ffe| 1) (SPADCALL (QREFELT $ 25))
              (QREFELT $ 31))
          (QVELT |ffe| 2))) 

(DEFUN |UPSQFREE;squareFree;PF;6| (|p| $)
  (PROG (|#G11| |u| |c| |a| |ci| #0=#:G1883 |di| |pi| |i| #1=#:G1886
                |lcp| |lffe| #2=#:G1889)
    (RETURN
      (SEQ (LETT |ci| |p| . #3=(|UPSQFREE;squareFree;PF;6|))
           (LETT |di| (SPADCALL |p| (QREFELT $ 8)) . #3#)
           (LETT |pi| (SPADCALL |ci| |di| (QREFELT $ 9)) . #3#)
           (EXIT (COND
                   ((EQL (SPADCALL |pi| (QREFELT $ 33)) 0)
                    (SEQ (PROGN
                           (LETT |#G11|
                                 (SPADCALL |p| (QREFELT $ 36)) . #3#)
                           (LETT |u| (QVELT |#G11| 0) . #3#)
                           (LETT |c| (QVELT |#G11| 1) . #3#)
                           (LETT |a| (QVELT |#G11| 2) . #3#)
                           |#G11|)
                         (EXIT (SPADCALL |u|
                                   (LIST
                                    (VECTOR (CONS 1 "sqfr") |c| 1))
                                   (QREFELT $ 39)))))
                   ('T
                    (SEQ (LETT |i| 0 . #3#) (LETT |lffe| NIL . #3#)
                         (LETT |lcp|
                               (SPADCALL |p| (QREFELT $ 40)) . #3#)
                         (SEQ G190
                              (COND
                                ((NULL (COND
                                         ((EQL
                                           (SPADCALL |ci|
                                            (QREFELT $ 33))
                                           0)
                                          'NIL)
                                         ('T 'T)))
                                 (GO G191)))
                              (SEQ (EXIT
                                    (SEQ
                                     (LETT |ci|
                                      (PROG2
                                       (LETT #0#
                                        (SPADCALL |ci| |pi|
                                         (QREFELT $ 11)) . #3#)
                                       (QCDR #0#)
                                        (|check-union| (QEQCAR #0# 0)
                                         (QREFELT $ 7) #0#)) . #3#)
                                     (LETT |di|
                                      (SPADCALL
                                       (PROG2
                                        (LETT #0#
                                         (SPADCALL |di| |pi|
                                          (QREFELT $ 11)) . #3#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 0)
                                          (QREFELT $ 7) #0#))
                                       (SPADCALL |ci| (QREFELT $ 8))
                                       (QREFELT $ 41)) . #3#)
                                     (LETT |pi|
                                      (SPADCALL |ci| |di|
                                       (QREFELT $ 9)) . #3#)
                                     (LETT |i| (+ |i| 1) . #3#)
                                     (EXIT
                                      (COND
                                        ((< 0
                                          (SPADCALL |pi|
                                           (QREFELT $ 33)))
                                         (PROGN
                                           (LETT #2#
                                            (SEQ
                                             (LETT |lcp|
                                              (PROG2
                                               (LETT #1#
                                                (SPADCALL |lcp|
                                                 (SPADCALL
                                                  (SPADCALL |pi|
                                                   (QREFELT $ 40))
                                                  |i| (QREFELT $ 44))
                                                 (QREFELT $ 45)) . #3#)
                                               (QCDR #1#)
                                                (|check-union|
                                                 (QEQCAR #1# 0)
                                                 (QREFELT $ 6) #1#)) . #3#)
                                             (EXIT
                                              (LETT |lffe|
                                               (CONS
                                                (VECTOR (CONS 1 "sqfr")
                                                 |pi| |i|)
                                                |lffe|) . #3#))) . #3#)
                                           (GO #2#)))))))
                                   #2# (EXIT #2#))
                              NIL (GO G190) G191 (EXIT NIL))
                         (EXIT (SPADCALL
                                   (SPADCALL |lcp| (QREFELT $ 46))
                                   |lffe| (QREFELT $ 39))))))))))) 

(DEFUN |UPSQFREE;squareFree;PF;7| (|p| $)
  (PROG (|#G13| |u| |c| |a| |diprev| |di| |ci| |i| #0=#:G1907 |lc| |pi|
                |dunit| #1=#:G1903 |redSqfr| #2=#:G1918 |ffe|
                #3=#:G1919 |lsnil| |lffe|)
    (RETURN
      (SEQ (LETT |ci|
                 (SPADCALL |p| (SPADCALL |p| (QREFELT $ 8))
                     (QREFELT $ 9))
                 . #4=(|UPSQFREE;squareFree;PF;7|))
           (EXIT (COND
                   ((EQL (SPADCALL |ci| (QREFELT $ 33)) 0)
                    (SEQ (PROGN
                           (LETT |#G13|
                                 (SPADCALL |p| (QREFELT $ 36)) . #4#)
                           (LETT |u| (QVELT |#G13| 0) . #4#)
                           (LETT |c| (QVELT |#G13| 1) . #4#)
                           (LETT |a| (QVELT |#G13| 2) . #4#)
                           |#G13|)
                         (EXIT (SPADCALL |u|
                                   (LIST
                                    (VECTOR (CONS 1 "sqfr") |c| 1))
                                   (QREFELT $ 39)))))
                   ('T
                    (SEQ (LETT |di|
                               (PROG2 (LETT #1#
                                       (SPADCALL |p| |ci|
                                        (QREFELT $ 11)) . #4#)
                                      (QCDR #1#)
                                 (|check-union| (QEQCAR #1# 0)
                                     (QREFELT $ 7) #1#)) . #4#)
                         (LETT |i| 0 . #4#) (LETT |lffe| NIL . #4#)
                         (LETT |dunit| (|spadConstant| $ 20) . #4#)
                         (SEQ G190
                              (COND
                                ((NULL (COND
                                         ((EQL
                                           (SPADCALL |di|
                                            (QREFELT $ 33))
                                           0)
                                          'NIL)
                                         ('T 'T)))
                                 #5=(GO G191)))
                              (SEQ (LETT |diprev| |di| . #4#)
                                   (LETT |di|
                                    (SPADCALL |ci| |di| (QREFELT $ 9)) . #4#)
                                   (LETT |ci|
                                    (PROG2
                                     (LETT #1#
                                      (SPADCALL |ci| |di|
                                       (QREFELT $ 11)) . #4#)
                                     (QCDR #1#)
                                      (|check-union| (QEQCAR #1# 0)
                                       (QREFELT $ 7) #1#)) . #4#)
                                   (LETT |i| (+ |i| 1) . #4#)
                                   (EXIT
                                    (COND
                                      ((EQL
                                        (SPADCALL |diprev|
                                         (QREFELT $ 33))
                                        (SPADCALL |di| (QREFELT $ 33)))
                                       (SEQ
                                        (LETT |lc|
                                         (PROG2
                                          (LETT #0#
                                           (SPADCALL
                                            (SPADCALL |diprev|
                                             (QREFELT $ 40))
                                            (SPADCALL |di|
                                             (QREFELT $ 40))
                                            (QREFELT $ 45)) . #4#)
                                          (QCDR #0#)
                                           (|check-union|
                                            (QEQCAR #0# 0)
                                            (QREFELT $ 6) #0#)) . #4#)
                                        (EXIT
                                         (LETT |dunit|
                                          (SPADCALL
                                           (SPADCALL |lc| |i|
                                            (QREFELT $ 44))
                                           |dunit| (QREFELT $ 47)) . #4#))))
                                      ('T
                                       (SEQ
                                        (LETT |pi|
                                         (PROG2
                                          (LETT #1#
                                           (SPADCALL |diprev| |di|
                                            (QREFELT $ 11)) . #4#)
                                          (QCDR #1#)
                                           (|check-union|
                                            (QEQCAR #1# 0)
                                            (QREFELT $ 7) #1#)) . #4#)
                                        (EXIT
                                         (LETT |lffe|
                                          (CONS
                                           (VECTOR (CONS 1 "sqfr") |pi|
                                            |i|)
                                           |lffe|) . #4#)))))))
                              NIL #6=(GO G190) G191 (EXIT NIL))
                         (LETT |dunit|
                               (SPADCALL |dunit|
                                   (SPADCALL |di| (+ |i| 1)
                                    (QREFELT $ 48))
                                   (QREFELT $ 19)) . #4#)
                         (EXIT (COND
                                 ((EQL (SPADCALL |ci| (QREFELT $ 33))
                                       0)
                                  (SPADCALL
                                      (SPADCALL |dunit| |ci|
                                       (QREFELT $ 19))
                                      |lffe| (QREFELT $ 39)))
                                 ('T
                                  (SEQ (LETT |redSqfr|
                                        (SPADCALL
                                         (PROG2
                                          (LETT #1#
                                           (SPADCALL |ci|
                                            (SPADCALL (QREFELT $ 25))
                                            (QREFELT $ 49)) . #4#)
                                          (QCDR #1#)
                                           (|check-union|
                                            (QEQCAR #1# 0)
                                            (QREFELT $ 7) #1#))
                                         (QREFELT $ 14)) . #4#)
                                       (LETT |lsnil|
                                        (PROGN
                                          (LETT #2# NIL . #4#)
                                          (SEQ (LETT |ffe| NIL . #4#)
                                           (LETT #3#
                                            (SPADCALL |redSqfr|
                                             (QREFELT $ 50)) . #4#)
                                           G190
                                           (COND
                                             ((OR (ATOM #3#)
                                               (PROGN
                                                 (LETT |ffe|
                                                  (CAR #3#) . #4#)
                                                 NIL))
                                              #5#))
                                           (SEQ
                                            (EXIT
                                             (LETT #2#
                                              (CONS
                                               (SPADCALL |ffe|
                                                (QREFELT $ 30))
                                               #2#) . #4#)))
                                           (LETT #3# (CDR #3#) . #4#)
                                           #6# G191
                                           (EXIT (NREVERSE0 #2#)))) . #4#)
                                       (LETT |lffe|
                                        (APPEND |lsnil| |lffe|) . #4#)
                                       (EXIT
                                        (SPADCALL
                                         (SPADCALL |dunit|
                                          (SPADCALL |redSqfr|
                                           (QREFELT $ 15))
                                          (QREFELT $ 19))
                                         |lffe| (QREFELT $ 39))))))))))))))) 

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

(DEFUN |UnivariatePolynomialSquareFree;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|UnivariatePolynomialSquareFree|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|UnivariatePolynomialSquareFree| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 51) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|UnivariatePolynomialSquareFree| (LIST DV$1 DV$2)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (COND
          ((|HasCategory| |#1| '(|CharacteristicZero|))
           (QSETREFV $ 12
               (CONS (|dispatchFunction|
                         |UPSQFREE;squareFreePart;2P;1|)
                     $)))
          ('T
           (QSETREFV $ 12
               (CONS (|dispatchFunction|
                         |UPSQFREE;squareFreePart;2P;2|)
                     $))))
        (COND
          ((|HasCategory| |#1| '(|FiniteFieldCategory|))
           (QSETREFV $ 30
               (CONS (|dispatchFunction| |UPSQFREE;BumInSepFFE;2R;3|)
                     $)))
          ((|HasCategory| |#1| '(|CharacteristicNonZero|))
           (QSETREFV $ 30
               (CONS (|dispatchFunction| |UPSQFREE;BumInSepFFE;2R;4|)
                     $)))
          ('T
           (QSETREFV $ 30
               (CONS (|dispatchFunction| |UPSQFREE;BumInSepFFE;2R;5|)
                     $))))
        (COND
          ((|HasCategory| |#1| '(|CharacteristicZero|))
           (QSETREFV $ 14
               (CONS (|dispatchFunction| |UPSQFREE;squareFree;PF;6|) $)))
          ('T
           (QSETREFV $ 14
               (CONS (|dispatchFunction| |UPSQFREE;squareFree;PF;7|) $))))
        $)))) 

(MAKEPROP '|UnivariatePolynomialSquareFree| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (0 . |differentiate|) (5 . |gcd|) (|Union| $ '"failed")
             (11 . |exquo|) (17 . |squareFreePart|) (|Factored| 7)
             (22 . |squareFree|) (27 . |unit|)
             (|Record| (|:| |factor| 7) (|:| |exponent| 26))
             (|List| 16) (32 . |factors|) (37 . *) (43 . |One|)
             (47 . |charthRoot|) (|Mapping| 6 6) (52 . |map|)
             (|NonNegativeInteger|) (58 . |characteristic|) (|Integer|)
             (62 . *) (|Union| '"nil" '"sqfr" '"irred" '"prime")
             (|Record| (|:| |flg| 28) (|:| |fctr| 7) (|:| |xpnt| 26))
             (68 . |BumInSepFFE|) (73 . |multiplyExponents|)
             (79 . |charthRoot|) (84 . |degree|) (89 . |Zero|)
             (|Record| (|:| |unit| $) (|:| |canonical| $)
                 (|:| |associate| $))
             (93 . |unitNormal|) (98 . |One|) (|List| 29)
             (102 . |makeFR|) (108 . |leadingCoefficient|) (113 . -)
             (119 . |Zero|) (123 . |Zero|) (127 . **) (133 . |exquo|)
             (139 . |coerce|) (144 . *) (150 . **)
             (156 . |divideExponents|) (162 . |factorList|))
          '#(|squareFreePart| 167 |squareFree| 172 |BumInSepFFE| 177)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 50
                                '(1 7 0 0 8 2 7 0 0 0 9 2 7 10 0 0 11 1
                                  0 7 7 12 1 0 13 7 14 1 13 7 0 15 1 13
                                  17 0 18 2 7 0 0 0 19 0 7 0 20 1 6 0 0
                                  21 2 7 0 22 0 23 0 7 24 25 2 26 0 24
                                  0 27 1 0 29 29 30 2 7 0 0 24 31 1 7
                                  10 0 32 1 7 24 0 33 0 6 0 34 1 7 35 0
                                  36 0 6 0 37 2 13 0 7 38 39 1 7 6 0 40
                                  2 7 0 0 0 41 0 7 0 42 0 13 0 43 2 6 0
                                  0 24 44 2 6 10 0 0 45 1 7 0 6 46 2 7
                                  0 6 0 47 2 7 0 0 24 48 2 7 10 0 24 49
                                  1 13 38 0 50 1 0 7 7 12 1 0 13 7 14 1
                                  0 29 29 30)))))
          '|lookupComplete|)) 
