
(/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 #0=#:G1863)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1864)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|UnivariatePolynomial|)
                       '|domainEqualList|)
                   . #2=(|UnivariatePolynomial|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function| |UnivariatePolynomial;|) #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache| '|UnivariatePolynomial|))))))))))) 

(DEFUN |UnivariatePolynomial;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ #0=#:G1862 |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #1=(|UnivariatePolynomial|))
        (LETT DV$2 (|devaluate| |#2|) . #1#)
        (LETT |dv$| (LIST '|UnivariatePolynomial| DV$1 DV$2) . #1#)
        (LETT $ (GETREFV 72) . #1#)
        (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| '(|OrderedSet|))
                            (|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|
                                    '(|Algebra|
                                      (|Fraction| (|Integer|))))
                                (|HasCategory| |#2|
                                    '(|RetractableTo|
                                      (|Fraction| (|Integer|)))))
                            (|HasCategory| |#2| '(|DifferentialRing|))
                            (LETT #0#
                                  (|HasCategory| |#2| '(|GcdDomain|)) . #1#)
                            (OR (|HasCategory| |#2|
                                    '(|CommutativeRing|))
                                (|HasCategory| |#2| '(|Field|)) #0#
                                (|HasCategory| |#2|
                                    '(|IntegralDomain|))
                                (|HasCategory| |#2|
                                    '(|PolynomialFactorizationExplicit|)))
                            (OR (|HasCategory| |#2| '(|Field|)) #0#
                                (|HasCategory| |#2|
                                    '(|IntegralDomain|))
                                (|HasCategory| |#2|
                                    '(|PolynomialFactorizationExplicit|)))
                            (OR (|HasCategory| |#2| '(|Field|)) #0#
                                (|HasCategory| |#2|
                                    '(|PolynomialFactorizationExplicit|))))) . #1#))
        (|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 '"failed")
             (|Matrix| $) (|Union| $ '"failed") (|Fraction| 55)
             (|SingletonAsOrderedSet|)
             (|Record| (|:| |coef| 31) (|:| |generator| $)) (|List| $)
             (|Union| 31 '"failed") (|Boolean|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (|Record| (|:| |coef1| $) (|:| |coef2| $)
                 (|:| |generator| $))
             (|Record| (|:| |coef1| $) (|:| |coef2| $))
             (|Union| 36 '"failed") (|Fraction| $) (|Factored| $)
             (|SparseUnivariatePolynomial| $)
             (|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| 40) (|Union| 52 '"failed") (|List| 40)
             (|Union| 28 '"failed") (|Union| 55 '"failed") (|Integer|)
             (|Mapping| 7 7) (|Vector| 7) (|List| 29)
             (|Record| (|:| |var| 29) (|:| |exponent| 16))
             (|Union| 59 '"failed") (|Union| 29 '"failed") (|Matrix| 7)
             (|Record| (|:| |mat| 62) (|:| |vec| 57)) (|List| 7)
             (|List| 66) (|Equation| $) (|Union| 7 '"failed")
             (|Mapping| 16 16) (|PositiveInteger|) (|String|)
             (|SingleInteger|))
          '#(~= 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 |sizeLess?| 122
             |shiftRight| 128 |shiftLeft| 134 |separate| 140 |sample|
             146 |retractIfCan| 150 |retract| 170 |resultant| 190 |rem|
             203 |reductum| 209 |reducedSystem| 214 |recip| 236 |quo|
             241 |pseudoRemainder| 247 |pseudoQuotient| 253
             |pseudoDivide| 259 |principalIdeal| 265 |primitivePart|
             270 |primitiveMonomials| 281 |prime?| 286 |pomopo!| 291
             |patternMatch| 299 |order| 313 |one?| 319
             |numberOfMonomials| 324 |nextItem| 329 |multivariate| 334
             |multiplyExponents| 346 |multiEuclidean| 352 |monomials|
             358 |monomial?| 363 |monomial| 368 |monicDivide| 388
             |minimumDegree| 401 |min| 418 |max| 424 |mapExponents| 430
             |map| 436 |makeSUP| 442 |mainVariable| 447
             |leadingMonomial| 452 |leadingCoefficient| 457 |lcm| 462
             |latex| 473 |karatsubaDivide| 478 |isTimes| 484 |isPlus|
             489 |isExpt| 494 |integrate| 499 |init| 504 |hash| 508
             |ground?| 513 |ground| 518 |gcdPolynomial| 523 |gcd| 529
             |fmecg| 540 |factorSquareFreePolynomial| 548
             |factorPolynomial| 553 |factor| 558 |extendedEuclidean|
             563 |exquo| 576 |expressIdealMember| 588 |eval| 594
             |euclideanSize| 648 |elt| 653 |divideExponents| 683
             |divide| 689 |discriminant| 695 |differentiate| 706
             |degree| 789 |convert| 806 |content| 821 |conditionP| 832
             |composite| 837 |coerce| 849 |coefficients| 884
             |coefficient| 889 |charthRoot| 909 |characteristic| 914
             |binomThmExpt| 918 |associates?| 925 ^ 931 |Zero| 943
             |One| 947 D 951 >= 1027 > 1033 = 1039 <= 1045 < 1051 /
             1057 - 1063 + 1074 ** 1080 * 1092)
          '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 |OrderedSet&| 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) (|OrderedSet|)
                               (|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 33 0 0 1 1 0
                                  33 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 40 0 29 1 1 3 42 0
                                  1 1 3 0 0 1 1 3 33 0 1 1 0 16 0 1 2 0
                                  16 0 58 1 2 0 27 0 0 1 2 3 0 0 0 1 1
                                  1 50 40 1 1 23 0 0 1 1 23 39 0 1 2 1
                                  51 52 40 1 2 18 33 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 30 31 1 2 23 0 0 29 1 1 23 0 0 1 1
                                  0 31 0 1 1 1 33 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 33 0 1 1 0 16 0 1 1 19
                                  27 0 1 2 0 0 40 29 1 2 0 0 5 29 1 2 0
                                  0 0 16 1 2 18 32 31 0 1 1 0 31 0 1 1
                                  0 33 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 11 0 0 0 1 2 11 0 0 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 31 1 1 0 70 0 1 2 0 34 0
                                  16 1 1 0 32 0 1 1 0 32 0 1 1 0 60 0 1
                                  1 13 0 0 1 0 19 0 1 1 0 71 0 1 1 0 33
                                  0 1 1 0 7 0 1 2 23 40 40 40 1 2 23 0
                                  0 0 1 1 23 0 31 1 4 0 0 0 16 7 0 1 1
                                  1 50 40 1 1 1 50 40 1 1 1 39 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 32 31 0 1 3 0 0 0
                                  29 0 1 3 0 0 0 58 31 1 3 0 0 0 58 64
                                  1 3 0 0 0 31 31 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 3 0 0 0 29 16 1 2 0 0 0 29
                                  1 2 0 0 0 58 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 44 38 0 1 2 3 27 0 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 33 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 29 16 1 3 0 0 0 58 49 1
                                  2 0 0 0 58 1 2 0 0 0 29 1 2 11 33 0 0
                                  1 2 11 33 0 0 1 2 0 33 0 0 1 2 11 33
                                  0 0 1 2 11 33 0 0 1 2 18 0 0 7 1 2 0
                                  0 0 0 1 1 0 0 0 1 2 0 0 0 0 1 2 0 0 0
                                  16 1 2 0 0 0 69 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|)) 
