
(/VERSIONCHECK 2) 

(DEFUN |MONOTOOL;normalDenom;FMUP;1| (|f| |derivation| $)
  (QCAR (SPADCALL (SPADCALL |f| (QREFELT $ 9)) |derivation|
            (QREFELT $ 12)))) 

(DEFUN |MONOTOOL;split;UPMR;2| (|p| |derivation| $)
  (PROG (|pbar| #0=#:G1828 |rec|)
    (RETURN
      (SEQ (LETT |pbar|
                 (PROG2 (LETT #0#
                              (SPADCALL
                                  (SPADCALL |p|
                                      (SPADCALL |p| |derivation|)
                                      (QREFELT $ 14))
                                  (SPADCALL |p|
                                      (SPADCALL |p| (QREFELT $ 15))
                                      (QREFELT $ 14))
                                  (QREFELT $ 17))
                              . #1=(|MONOTOOL;split;UPMR;2|))
                        (QCDR #0#)
                   (|check-union| (QEQCAR #0# 0) (QREFELT $ 7) #0#)) . #1#)
           (EXIT (COND
                   ((ZEROP (SPADCALL |pbar| (QREFELT $ 19)))
                    (CONS |p| (|spadConstant| $ 21)))
                   ('T
                    (SEQ (LETT |rec|
                               (SPADCALL
                                   (PROG2
                                    (LETT #0#
                                     (SPADCALL |p| |pbar|
                                      (QREFELT $ 17)) . #1#)
                                    (QCDR #0#)
                                     (|check-union| (QEQCAR #0# 0)
                                      (QREFELT $ 7) #0#))
                                   |derivation| (QREFELT $ 12)) . #1#)
                         (EXIT (CONS (QCAR |rec|)
                                     (SPADCALL |pbar| (QCDR |rec|)
                                      (QREFELT $ 22)))))))))))) 

(DEFUN |MONOTOOL;splitSquarefree;UPMR;3| (|p| |derivation| $)
  (PROG (|q| |rec| #0=#:G1847 |r| |g| |s| #1=#:G1840 |h| |n|)
    (RETURN
      (SEQ (LETT |s| (|spadConstant| $ 24)
                 . #2=(|MONOTOOL;splitSquarefree;UPMR;3|))
           (LETT |n| |s| . #2#)
           (LETT |q| (SPADCALL |p| (QREFELT $ 26)) . #2#)
           (SEQ (LETT |rec| NIL . #2#)
                (LETT #0# (SPADCALL |q| (QREFELT $ 29)) . #2#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |rec| (CAR #0#) . #2#) NIL))
                   (GO G191)))
                (SEQ (LETT |r| (QCAR |rec|) . #2#)
                     (LETT |g|
                           (SPADCALL |r| (SPADCALL |r| |derivation|)
                               (QREFELT $ 14)) . #2#)
                     (COND
                       ((NULL (SPADCALL |g| (QREFELT $ 31)))
                        (LETT |s|
                              (SPADCALL |s|
                                  (SPADCALL |g| (QCDR |rec|)
                                      (QREFELT $ 33))
                                  (QREFELT $ 34)) . #2#)))
                     (LETT |h|
                           (PROG2 (LETT #1#
                                        (SPADCALL |r| |g|
                                         (QREFELT $ 17)) . #2#)
                                  (QCDR #1#)
                             (|check-union| (QEQCAR #1# 0)
                                 (QREFELT $ 7) #1#)) . #2#)
                     (EXIT (COND
                             ((NULL (SPADCALL |h| (QREFELT $ 31)))
                              (LETT |n|
                                    (SPADCALL |n|
                                     (SPADCALL |h| (QCDR |rec|)
                                      (QREFELT $ 33))
                                     (QREFELT $ 34)) . #2#)))))
                (LETT #0# (CDR #0#) . #2#) (GO G190) G191 (EXIT NIL))
           (EXIT (CONS |n|
                       (SPADCALL (SPADCALL |q| (QREFELT $ 35)) |s|
                           (QREFELT $ 36)))))))) 

(DEFUN |MONOTOOL;decompose;FMR;4| (|f| |derivation| $)
  (PROG (|qr| |rec| #0=#:G1858 |eeu|)
    (RETURN
      (SEQ (LETT |qr|
                 (SPADCALL (SPADCALL |f| (QREFELT $ 39))
                     (SPADCALL |f| (QREFELT $ 9)) (QREFELT $ 41))
                 . #1=(|MONOTOOL;decompose;FMR;4|))
           (LETT |rec|
                 (SPADCALL (SPADCALL |f| (QREFELT $ 9)) |derivation|
                     (QREFELT $ 12)) . #1#)
           (LETT |eeu|
                 (PROG2 (LETT #0#
                              (SPADCALL (QCAR |rec|) (QCDR |rec|)
                                  (QCDR |qr|) (QREFELT $ 44)) . #1#)
                        (QCDR #0#)
                   (|check-union| (QEQCAR #0# 0)
                       (|Record| (|:| |coef1| (QREFELT $ 7))
                           (|:| |coef2| (QREFELT $ 7)))
                       #0#)) . #1#)
           (EXIT (VECTOR (QCAR |qr|)
                         (SPADCALL (QCDR |eeu|) (QCAR |rec|)
                             (QREFELT $ 45))
                         (SPADCALL (QCAR |eeu|) (QCDR |rec|)
                             (QREFELT $ 45)))))))) 

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

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

(MAKEPROP '|MonomialExtensionTools| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|Fraction| 7) (0 . |denom|)
             (|Record| (|:| |normal| 7) (|:| |special| 7))
             (|Mapping| 7 7) |MONOTOOL;split;UPMR;2|
             |MONOTOOL;normalDenom;FMUP;1| (5 . |gcd|)
             (11 . |differentiate|) (|Union| $ '"failed")
             (16 . |exquo|) (|NonNegativeInteger|) (22 . |degree|)
             (27 . |One|) (31 . |One|) (35 . *) (|Factored| 7)
             (41 . |One|) (|Factored| $) (45 . |squareFree|)
             (|Record| (|:| |factor| 7) (|:| |exponent| 32))
             (|List| 27) (50 . |factors|) (|Boolean|) (55 . |ground?|)
             (|Integer|) (60 . |sqfrFactor|) (66 . *) (72 . |unit|)
             (77 . *) (|Record| (|:| |normal| 23) (|:| |special| 23))
             |MONOTOOL;splitSquarefree;UPMR;3| (83 . |numer|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (88 . |divide|) (|Record| (|:| |coef1| $) (|:| |coef2| $))
             (|Union| 42 '"failed") (94 . |extendedEuclidean|)
             (101 . /)
             (|Record| (|:| |poly| 7) (|:| |normal| 8)
                 (|:| |special| 8))
             |MONOTOOL;decompose;FMR;4|)
          '#(|splitSquarefree| 107 |split| 113 |normalDenom| 119
             |decompose| 125)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 47
                                '(1 8 7 0 9 2 7 0 0 0 14 1 7 0 0 15 2 7
                                  16 0 0 17 1 7 18 0 19 0 6 0 20 0 7 0
                                  21 2 7 0 0 0 22 0 23 0 24 1 7 25 0 26
                                  1 23 28 0 29 1 7 30 0 31 2 23 0 7 32
                                  33 2 23 0 0 0 34 1 23 7 0 35 2 23 0 7
                                  0 36 1 8 7 0 39 2 7 40 0 0 41 3 7 43
                                  0 0 0 44 2 8 0 7 7 45 2 0 37 7 11 38
                                  2 0 10 7 11 12 2 0 7 8 11 13 2 0 46 8
                                  11 47)))))
          '|lookupComplete|)) 
