
(/VERSIONCHECK 2) 

(DEFUN |UP;coerce;$Of;1| (|p| $)
  (SPADCALL |p| (SPADCALL (QREFELT $ 6) (QREFELT $ 11)) (QREFELT $ 12))) 

(DEFUN |UP;coerce;V$;2| (|v| $)
  (SPADCALL (|spadConstant| $ 15) 1 (QREFELT $ 17))) 

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

(DEFUN |UnivariatePolynomial;| (|#1| |#2|)
  (PROG (|pv$| #1=#:G708 $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #2=(|UnivariatePolynomial|))
      (LETT DV$2 (|devaluate| |#2|) . #2#)
      (LETT |dv$| (LIST '|UnivariatePolynomial| DV$1 DV$2) . #2#)
      (LETT $ (GETREFV 72) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#2|
                                                         '(|PolynomialFactorizationExplicit|))
                                          (|HasCategory| |#2|
                                                         '(|CommutativeRing|))
                                          (|HasCategory| |#2|
                                                         '(|IntegralDomain|))
                                          (OR
                                           (|HasCategory| |#2|
                                                          '(|CommutativeRing|))
                                           (|HasCategory| |#2|
                                                          '(|IntegralDomain|)))
                                          (|HasCategory| |#2|
                                                         '(|canonicalUnitNormal|))
                                          (AND
                                           (|HasCategory|
                                            (|SingletonAsOrderedSet|)
                                            '(|PatternMatchable| (|Float|)))
                                           (|HasCategory| |#2|
                                                          '(|PatternMatchable|
                                                            (|Float|))))
                                          (AND
                                           (|HasCategory|
                                            (|SingletonAsOrderedSet|)
                                            '(|PatternMatchable| (|Integer|)))
                                           (|HasCategory| |#2|
                                                          '(|PatternMatchable|
                                                            (|Integer|))))
                                          (AND
                                           (|HasCategory|
                                            (|SingletonAsOrderedSet|)
                                            '(|ConvertibleTo|
                                              (|Pattern| (|Float|))))
                                           (|HasCategory| |#2|
                                                          '(|ConvertibleTo|
                                                            (|Pattern|
                                                             (|Float|)))))
                                          (AND
                                           (|HasCategory|
                                            (|SingletonAsOrderedSet|)
                                            '(|ConvertibleTo|
                                              (|Pattern| (|Integer|))))
                                           (|HasCategory| |#2|
                                                          '(|ConvertibleTo|
                                                            (|Pattern|
                                                             (|Integer|)))))
                                          (AND
                                           (|HasCategory|
                                            (|SingletonAsOrderedSet|)
                                            '(|ConvertibleTo| (|InputForm|)))
                                           (|HasCategory| |#2|
                                                          '(|ConvertibleTo|
                                                            (|InputForm|))))
                                          (|HasCategory| |#2| '(|Comparable|))
                                          (|HasCategory| |#2|
                                                         '(|LinearlyExplicitRingOver|
                                                           (|Integer|)))
                                          (|HasCategory| |#2|
                                                         '(|Algebra|
                                                           (|Fraction|
                                                            (|Integer|))))
                                          (|HasCategory| |#2|
                                                         '(|CharacteristicNonZero|))
                                          (|HasCategory| |#2|
                                                         '(|CharacteristicZero|))
                                          (|HasCategory| |#2|
                                                         '(|RetractableTo|
                                                           (|Integer|)))
                                          (|HasCategory| |#2|
                                                         '(|RetractableTo|
                                                           (|Fraction|
                                                            (|Integer|))))
                                          (|HasCategory| |#2| '(|Field|))
                                          (|HasCategory| |#2| '(|StepThrough|))
                                          (|HasCategory| |#2|
                                                         '(|PartialDifferentialRing|
                                                           (|Symbol|)))
                                          (OR
                                           (|HasCategory| |#2|
                                                          '(|RetractableTo|
                                                            (|Fraction|
                                                             (|Integer|))))
                                           (|HasCategory| |#2|
                                                          '(|Algebra|
                                                            (|Fraction|
                                                             (|Integer|)))))
                                          (|HasCategory| |#2|
                                                         '(|DifferentialRing|))
                                          (LETT #1#
                                                (|HasCategory| |#2|
                                                               '(|GcdDomain|))
                                                . #2#)
                                          (OR
                                           (|HasCategory| |#2|
                                                          '(|CommutativeRing|))
                                           (|HasCategory| |#2| '(|Field|)) #1#
                                           (|HasCategory| |#2|
                                                          '(|IntegralDomain|))
                                           (|HasCategory| |#2|
                                                          '(|PolynomialFactorizationExplicit|)))
                                          (OR (|HasCategory| |#2| '(|Field|))
                                              #1#
                                              (|HasCategory| |#2|
                                                             '(|IntegralDomain|))
                                              (|HasCategory| |#2|
                                                             '(|PolynomialFactorizationExplicit|)))
                                          (OR (|HasCategory| |#2| '(|Field|))
                                              #1#
                                              (|HasCategory| |#2|
                                                             '(|PolynomialFactorizationExplicit|)))))
                      . #2#))
      (|haddProp| |$ConstructorCache| '|UnivariatePolynomial| (LIST DV$1 DV$2)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (AND (|HasCategory| $ '(|CharacteristicNonZero|))
           (|HasCategory| |#2| '(|PolynomialFactorizationExplicit|))
           (|augmentPredVector| $ 67108864))
      (AND
       (OR
        (AND (|HasCategory| $ '(|CharacteristicNonZero|))
             (|HasCategory| |#2| '(|PolynomialFactorizationExplicit|)))
        (|HasCategory| |#2| '(|CharacteristicNonZero|)))
       (|augmentPredVector| $ 134217728))
      (QSETREFV $ 8 (|SparseUnivariatePolynomial| |#2|))
      $)))) 

(MAKEPROP '|UnivariatePolynomial| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|SparseUnivariatePolynomial| 7)
              (|local| |#1|) (|local| |#2|) '|Rep| (|Symbol|) (|OutputForm|)
              (0 . |outputForm|) (5 . |outputForm|) |UP;coerce;$Of;1|
              (11 . |One|) (15 . |One|) (|NonNegativeInteger|)
              (19 . |monomial|) (|Variable| 6) |UP;coerce;V$;2| (|InputForm|)
              (|Pattern| (|Float|)) (|Pattern| 55)
              (|PatternMatchResult| (|Float|) $) (|PatternMatchResult| 55 $)
              (|Union| 46 '#1="failed") (|Matrix| $) (|Union| $ '#1#)
              (|Fraction| 55) (|SingletonAsOrderedSet|) (|Boolean|)
              (|Record| (|:| |coef| 32) (|:| |generator| $)) (|List| $)
              (|Union| 32 '"failed")
              (|Record| (|:| |quotient| $) (|:| |remainder| $))
              (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
              (|Record| (|:| |coef1| $) (|:| |coef2| $)) (|Union| 36 '"failed")
              (|Fraction| $) (|SparseUnivariatePolynomial| $) (|Factored| $)
              (|Record| (|:| |primePart| $) (|:| |commonPart| $))
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|Record| (|:| |coef| 7) (|:| |quotient| $) (|:| |remainder| $))
              (|Union| 38 '"failed")
              (|Record| (|:| |mat| 47) (|:| |vec| (|Vector| 55))) (|Vector| $)
              (|Matrix| 55) (|List| 9) (|List| 16) (|Factored| 39)
              (|Union| 52 '#1#) (|List| 39) (|Union| 28 '#2="failed")
              (|Union| 55 '#2#) (|Integer|) (|Mapping| 7 7) (|Vector| 7)
              (|List| 29) (|Record| (|:| |var| 29) (|:| |exponent| 16))
              (|Union| 59 '#3="failed") (|Union| 29 '#3#) (|Matrix| 7)
              (|Record| (|:| |mat| 62) (|:| |vec| 57)) (|List| 7) (|List| 66)
              (|Equation| $) (|Union| 7 '#2#) (|Mapping| 16 16)
              (|PositiveInteger|) (|SingleInteger|) (|String|))
           '#(~= 25 |zero?| 31 |vectorise| 36 |variables| 42 |unmakeSUP| 47
              |univariate| 52 |unitNormal| 63 |unitCanonical| 68 |unit?| 73
              |totalDegree| 78 |subtractIfCan| 89 |subResultantGcd| 95
              |squareFreePolynomial| 101 |squareFreePart| 106 |squareFree| 111
              |solveLinearPolynomialEquation| 116 |smaller?| 122 |sizeLess?|
              128 |shiftRight| 134 |shiftLeft| 140 |separate| 146 |sample| 152
              |retractIfCan| 156 |retract| 176 |resultant| 196 |rem| 209
              |reductum| 215 |reducedSystem| 220 |recip| 242 |quo| 247
              |pseudoRemainder| 253 |pseudoQuotient| 259 |pseudoDivide| 265
              |principalIdeal| 271 |primitivePart| 276 |primitiveMonomials| 287
              |prime?| 292 |pomopo!| 297 |patternMatch| 305 |order| 319 |one?|
              325 |numberOfMonomials| 330 |nextItem| 335 |multivariate| 340
              |multiplyExponents| 352 |multiEuclidean| 358 |monomials| 364
              |monomial?| 369 |monomial| 374 |monicDivide| 394 |minimumDegree|
              407 |mapExponents| 424 |map| 430 |makeSUP| 436 |mainVariable| 441
              |leadingMonomial| 446 |leadingCoefficient| 451 |lcm| 456 |latex|
              467 |karatsubaDivide| 472 |isTimes| 478 |isPlus| 483 |isExpt| 488
              |integrate| 493 |init| 498 |hash| 502 |ground?| 507 |ground| 512
              |gcdPolynomial| 517 |gcd| 523 |fmecg| 534
              |factorSquareFreePolynomial| 542 |factorPolynomial| 547 |factor|
              552 |extendedEuclidean| 557 |exquo| 570 |expressIdealMember| 582
              |eval| 588 |euclideanSize| 642 |elt| 647 |divideExponents| 677
              |divide| 683 |discriminant| 689 |differentiate| 700 |degree| 783
              |convert| 800 |content| 815 |conditionP| 826 |composite| 831
              |coerce| 843 |coefficients| 878 |coefficient| 883 |charthRoot|
              903 |characteristic| 908 |binomThmExpt| 912 |associates?| 919 ^
              925 |Zero| 937 |One| 941 D 945 = 1021 / 1027 - 1033 + 1044 *
              1050)
           'NIL
           (CONS
            (|makeByteWordVec2| 26
                                '(0 0 1 18 0 1 18 0 26 25 0 0 3 13 2 0 0 0 3 3
                                  12 13 14 15 2 24 20 0 0 4 13 0 0 0 0 2 13 13
                                  0 0 0 0 0 0 0 0 6 7 11 19 0 0 0 0 0 0 0 0 0 0
                                  0 0 0 2 3 5 8 9 10 16 17 18 3))
            (CONS
             '#(|UnivariatePolynomialCategory&| |PolynomialCategory&|
                |PolynomialFactorizationExplicit&| |EuclideanDomain&|
                |FiniteAbelianMonoidRing&| |UniqueFactorizationDomain&| NIL
                |AbelianMonoidRing&| |GcdDomain&| |IntegralDomain&|
                |DifferentialExtension&| |FullyLinearlyExplicitRingOver&|
                |Algebra&| |Algebra&| |Algebra&| |PartialDifferentialRing&|
                |DifferentialRing&| NIL |Module&| NIL NIL |Module&| NIL NIL
                |Module&| NIL |PartialDifferentialRing&| NIL |Ring&| NIL NIL
                NIL NIL NIL NIL NIL NIL NIL |AbelianGroup&| NIL NIL
                |AbelianMonoid&| |Monoid&| NIL |SemiGroup&| |AbelianSemiGroup&|
                NIL NIL NIL NIL |Evalable&| |FullyRetractableTo&|
                |SetCategory&| NIL NIL |RetractableTo&| |InnerEvalable&|
                |InnerEvalable&| |InnerEvalable&| |RetractableTo&| NIL
                |BasicType&| NIL NIL NIL NIL NIL NIL NIL |RetractableTo&|
                |RetractableTo&| NIL NIL)
             (CONS
              '#((|UnivariatePolynomialCategory| 7)
                 (|PolynomialCategory| 7 16 29)
                 (|PolynomialFactorizationExplicit|) (|EuclideanDomain|)
                 (|FiniteAbelianMonoidRing| 7 16) (|UniqueFactorizationDomain|)
                 (|PrincipalIdealDomain|) (|AbelianMonoidRing| 7 16)
                 (|GcdDomain|) (|IntegralDomain|) (|DifferentialExtension| 7)
                 (|FullyLinearlyExplicitRingOver| 7) (|Algebra| $$)
                 (|Algebra| 28) (|Algebra| 7) (|PartialDifferentialRing| 29)
                 (|DifferentialRing|) (|LinearlyExplicitRingOver| 7)
                 (|Module| $$) (|EntireRing|) (|LinearlyExplicitRingOver| 55)
                 (|Module| 28) (|CharacteristicNonZero|) (|CharacteristicZero|)
                 (|Module| 7) (|CommutativeRing|) (|PartialDifferentialRing| 9)
                 (|BiModule| 7 7) (|Ring|) (|BiModule| $$ $$)
                 (|BiModule| 28 28) (|LeftModule| 7) (|Rng|) (|RightModule| 7)
                 (|LeftModule| $$) (|RightModule| $$) (|LeftModule| 28)
                 (|RightModule| 28) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|SemiRing|) (|AbelianMonoid|)
                 (|Monoid|) (|SemiRng|) (|SemiGroup|) (|AbelianSemiGroup|)
                 (|PatternMatchable| (|Float|)) (|PatternMatchable| 55)
                 (|Comparable|) (|StepThrough|) (|Evalable| $$)
                 (|FullyRetractableTo| 7) (|SetCategory|) (|Eltable| $$ $$)
                 (|Eltable| 7 7) (|RetractableTo| 29) (|InnerEvalable| 29 $$)
                 (|InnerEvalable| 29 7) (|InnerEvalable| $$ $$)
                 (|RetractableTo| 7) (|unitsKnown|) (|BasicType|)
                 (|CoercibleTo| 10) (|CommutativeStar|) (|noZeroDivisors|)
                 (|canonicalUnitNormal|) (|ConvertibleTo| 21)
                 (|ConvertibleTo| 22) (|ConvertibleTo| 20) (|RetractableTo| 55)
                 (|RetractableTo| 28) (|additiveValuation|)
                 (|Eltable| (|Fraction| $$) (|Fraction| $$)))
              (|makeByteWordVec2| 71
                                  '(1 10 0 9 11 2 8 10 0 10 12 0 0 0 14 0 7 0
                                    15 2 0 0 7 16 17 2 0 30 0 0 1 1 0 30 0 1 2
                                    0 57 0 16 1 1 0 58 0 1 1 0 0 5 1 1 0 5 0 1
                                    2 0 39 0 29 1 1 3 42 0 1 1 3 0 0 1 1 3 30 0
                                    1 2 0 16 0 58 1 1 0 16 0 1 2 0 27 0 0 1 2 3
                                    0 0 0 1 1 1 50 39 1 1 23 0 0 1 1 23 40 0 1
                                    2 1 51 52 39 1 2 11 30 0 0 1 2 18 30 0 0 1
                                    2 0 0 0 16 1 2 0 0 0 16 1 2 23 41 0 0 1 0 0
                                    0 1 1 17 53 0 1 1 16 54 0 1 1 0 61 0 1 1 0
                                    67 0 1 1 17 28 0 1 1 16 55 0 1 1 0 29 0 1 1
                                    0 7 0 1 2 2 7 0 0 1 3 2 0 0 0 29 1 2 18 0 0
                                    0 1 1 0 0 0 1 2 12 45 26 46 1 1 12 47 26 1
                                    1 0 62 26 1 2 0 63 26 46 1 1 0 27 0 1 2 18
                                    0 0 0 1 2 0 0 0 0 1 2 3 0 0 0 1 2 3 43 0 0
                                    1 1 18 31 32 1 2 23 0 0 29 1 1 23 0 0 1 1 0
                                    32 0 1 1 1 30 0 1 4 0 0 0 7 16 0 1 3 6 23 0
                                    21 23 1 3 7 24 0 22 24 1 2 3 16 0 0 1 1 0
                                    30 0 1 1 0 16 0 1 1 19 27 0 1 2 0 0 39 29 1
                                    2 0 0 5 29 1 2 0 0 0 16 1 2 18 33 32 0 1 1
                                    0 32 0 1 1 0 30 0 1 3 0 0 0 58 49 1 3 0 0 0
                                    29 16 1 2 0 0 7 16 17 2 0 34 0 0 1 3 0 34 0
                                    0 29 1 2 0 49 0 58 1 2 0 16 0 29 1 1 0 16 0
                                    1 2 0 0 68 0 1 2 0 0 56 0 1 1 0 5 0 1 1 0
                                    61 0 1 1 0 0 0 1 1 0 7 0 1 2 23 0 0 0 1 1
                                    23 0 32 1 1 0 71 0 1 2 0 34 0 16 1 1 0 33 0
                                    1 1 0 33 0 1 1 0 60 0 1 1 13 0 0 1 0 19 0 1
                                    1 0 70 0 1 1 0 30 0 1 1 0 7 0 1 2 23 39 39
                                    39 1 1 23 0 32 1 2 23 0 0 0 1 4 0 0 0 16 7
                                    0 1 1 1 50 39 1 1 1 50 39 1 1 1 40 0 1 2 18
                                    35 0 0 1 3 18 37 0 0 0 1 2 3 27 0 0 1 2 3
                                    27 0 7 1 2 18 33 32 0 1 3 0 0 0 29 0 1 3 0
                                    0 0 58 32 1 3 0 0 0 58 64 1 3 0 0 0 32 32 1
                                    3 0 0 0 29 7 1 3 0 0 0 0 0 1 2 0 0 0 65 1 2
                                    0 0 0 66 1 1 18 16 0 1 2 18 7 38 7 1 2 3 38
                                    0 38 1 2 3 38 38 38 1 2 0 0 0 0 1 2 0 7 0 7
                                    1 2 0 27 0 16 1 2 18 34 0 0 1 1 2 7 0 1 2 2
                                    0 0 29 1 3 20 0 0 9 16 1 3 20 0 0 48 49 1 2
                                    20 0 0 48 1 2 20 0 0 9 1 3 0 0 0 56 0 1 2 0
                                    0 0 56 1 3 0 0 0 56 16 1 1 0 0 0 1 2 0 0 0
                                    16 1 3 0 0 0 58 49 1 2 0 0 0 58 1 3 0 0 0
                                    29 16 1 2 0 0 0 29 1 2 0 16 0 29 1 2 0 49 0
                                    58 1 1 0 16 0 1 1 10 20 0 1 1 8 21 0 1 1 9
                                    22 0 1 2 23 0 0 29 1 1 23 7 0 1 1 27 25 26
                                    1 2 3 27 0 0 1 2 3 44 38 0 1 1 21 0 28 1 1
                                    3 0 0 1 1 0 0 18 19 1 0 0 29 1 1 0 0 7 1 1
                                    0 0 55 1 1 0 10 0 13 1 0 64 0 1 3 0 0 0 58
                                    49 1 3 0 0 0 29 16 1 2 0 7 0 16 1 1 28 27 0
                                    1 0 0 16 1 3 2 0 0 0 16 1 2 3 30 0 0 1 2 0
                                    0 0 16 1 2 0 0 0 69 1 0 0 0 1 0 0 0 14 3 20
                                    0 0 48 49 1 2 20 0 0 48 1 3 20 0 0 9 16 1 2
                                    20 0 0 9 1 3 0 0 0 56 16 1 2 0 0 0 56 1 1 0
                                    0 0 1 2 0 0 0 16 1 3 0 0 0 58 49 1 3 0 0 0
                                    29 16 1 2 0 0 0 29 1 2 0 0 0 58 1 2 0 30 0
                                    0 1 2 18 0 0 7 1 1 0 0 0 1 2 0 0 0 0 1 2 0
                                    0 0 0 1 2 13 0 28 0 1 2 13 0 0 28 1 2 0 0 0
                                    7 1 2 0 0 7 0 1 2 0 0 0 0 1 2 0 0 55 0 1 2
                                    0 0 16 0 1 2 0 0 69 0 1)))))
           '|lookupComplete|)) 
