
(/VERSIONCHECK 2) 

(DEFUN |ORESUP;^;$Pi$;1| (|x| |n| $)
  (SPADCALL |x| |n| (QREFELT $ 10))) 

(DEFUN |ORESUP;**;$Pi$;2| (|x| |n| $)
  (SPADCALL |x| |n| (QREFELT $ 13))) 

(DEFUN |ORESUP;^;$Nni$;3| (|x| |n| $)
  (SPADCALL |x| |n| (QREFELT $ 15))) 

(DEFUN |ORESUP;**;$Nni$;4| (|x| |n| $)
  (COND
    ((ZEROP |n|) (|spadConstant| $ 17))
    ('T (SPADCALL |x| |n| (QREFELT $ 13))))) 

(DEFUN |ORESUP;*;3$;5| (|x| |y| $)
  (SPADCALL |x| |y| (QREFELT $ 7) (QREFELT $ 8) (QREFELT $ 21))) 

(DEFUN |ORESUP;apply;$3R;6| (|p| |c| |r| $)
  (SPADCALL |p| |c| |r| (QREFELT $ 7) (QREFELT $ 8) (QREFELT $ 23))) 

(DEFUN |ORESUP;monicLeftDivide;2$R;7| (|a| |b| $)
  (SPADCALL |a| |b| (QREFELT $ 7) (QREFELT $ 26))) 

(DEFUN |ORESUP;monicRightDivide;2$R;8| (|a| |b| $)
  (SPADCALL |a| |b| (QREFELT $ 7) (QREFELT $ 29))) 

(DEFUN |ORESUP;leftDivide;2$R;9| (|a| |b| $)
  (SPADCALL |a| |b| (QREFELT $ 7) (QREFELT $ 31))) 

(DEFUN |ORESUP;rightDivide;2$R;10| (|a| |b| $)
  (SPADCALL |a| |b| (QREFELT $ 7) (QREFELT $ 33))) 

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

(DEFUN |SparseUnivariateSkewPolynomial;| (|#1| |#2| |#3|)
  (PROG (DV$1 DV$2 DV$3 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|SparseUnivariateSkewPolynomial|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT |dv$|
              (LIST '|SparseUnivariateSkewPolynomial| DV$1 DV$2 DV$3) . #0#)
        (LETT $ (GETREFV 47) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#1| '(|CommutativeRing|))
                            (|HasCategory| |#1|
                                '(|RetractableTo|
                                     (|Fraction| (|Integer|))))
                            (|HasCategory| |#1|
                                '(|RetractableTo| (|Integer|)))
                            (|HasCategory| |#1| '(|IntegralDomain|))
                            (|HasCategory| |#1| '(|GcdDomain|))
                            (|HasCategory| |#1| '(|Field|)))) . #0#))
        (|haddProp| |$ConstructorCache|
            '|SparseUnivariateSkewPolynomial| (LIST DV$1 DV$2 DV$3)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (COND
          ((|testBitVector| |pv$| 4)
           (PROGN
             (QSETREFV $ 28
                 (CONS (|dispatchFunction|
                           |ORESUP;monicLeftDivide;2$R;7|)
                       $))
             (QSETREFV $ 30
                 (CONS (|dispatchFunction|
                           |ORESUP;monicRightDivide;2$R;8|)
                       $)))))
        (COND
          ((|testBitVector| |pv$| 6)
           (PROGN
             (QSETREFV $ 32
                 (CONS (|dispatchFunction| |ORESUP;leftDivide;2$R;9|)
                       $))
             (QSETREFV $ 34
                 (CONS (|dispatchFunction| |ORESUP;rightDivide;2$R;10|)
                       $)))))
        $)))) 

(MAKEPROP '|SparseUnivariateSkewPolynomial| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL (|SparseUnivariatePolynomial| 6)
             (|local| |#1|) (|local| |#2|) (|local| |#3|)
             (|PositiveInteger|) |ORESUP;**;$Pi$;2| |ORESUP;^;$Pi$;1|
             (|RepeatedSquaring| $$) (0 . |expt|)
             (|NonNegativeInteger|) |ORESUP;**;$Nni$;4|
             |ORESUP;^;$Nni$;3| (6 . |One|) (|Automorphism| 6)
             (|Mapping| 6 6)
             (|UnivariateSkewPolynomialCategoryOps| 6 $$)
             (10 . |times|) |ORESUP;*;3$;5| (18 . |apply|)
             |ORESUP;apply;$3R;6|
             (|Record| (|:| |quotient| $$) (|:| |remainder| $$))
             (27 . |monicLeftDivide|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (34 . |monicLeftDivide|) (40 . |monicRightDivide|)
             (47 . |monicRightDivide|) (53 . |leftDivide|)
             (60 . |leftDivide|) (66 . |rightDivide|)
             (73 . |rightDivide|)
             (|Record| (|:| |coef1| $) (|:| |coef2| $)
                 (|:| |generator| $))
             (|Union| $ '"failed") (|Union| 38 '"failed")
             (|Fraction| 40) (|Union| 40 '"failed") (|Integer|)
             (|OutputForm|) (|List| 6) (|Union| 6 '"failed")
             (|Boolean|) (|String|) (|SingleInteger|))
          '#(~= 79 |zero?| 85 |subtractIfCan| 90 |sample| 96
             |rightRemainder| 100 |rightQuotient| 106 |rightLcm| 112
             |rightGcd| 118 |rightExtendedGcd| 124 |rightExactQuotient|
             130 |rightDivide| 136 |retractIfCan| 142 |retract| 157
             |reductum| 172 |recip| 177 |primitivePart| 182
             |outputForm| 187 |one?| 193 |monomial| 198
             |monicRightDivide| 204 |monicLeftDivide| 210
             |minimumDegree| 216 |leftRemainder| 221 |leftQuotient| 227
             |leftLcm| 233 |leftGcd| 239 |leftExtendedGcd| 245
             |leftExactQuotient| 251 |leftDivide| 257
             |leadingCoefficient| 263 |latex| 268 |hash| 273 |exquo|
             278 |degree| 284 |content| 289 |coerce| 294 |coefficients|
             314 |coefficient| 319 |characteristic| 325 |apply| 329 ^
             336 |Zero| 348 |One| 352 = 356 - 362 + 373 ** 379 * 391)
          'NIL
          (CONS (|makeByteWordVec2| 3
                    '(0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
                      3))
                (CONS '#(|UnivariateSkewPolynomialCategory&| |Algebra&|
                         |Module&| |Ring&| NIL NIL NIL NIL NIL
                         |AbelianGroup&| NIL NIL |AbelianMonoid&|
                         |Monoid&| NIL |SemiGroup&| |AbelianSemiGroup&|
                         |FullyRetractableTo&| |SetCategory&|
                         |RetractableTo&| NIL |BasicType&| NIL
                         |RetractableTo&| |RetractableTo&|)
                      (CONS '#((|UnivariateSkewPolynomialCategory| 6)
                               (|Algebra| 6) (|Module| 6) (|Ring|)
                               (|BiModule| 6 6) (|Rng|)
                               (|LeftModule| 6) (|RightModule| 6)
                               (|LeftModule| $$) (|AbelianGroup|)
                               (|CancellationAbelianMonoid|)
                               (|SemiRing|) (|AbelianMonoid|)
                               (|Monoid|) (|SemiRng|) (|SemiGroup|)
                               (|AbelianSemiGroup|)
                               (|FullyRetractableTo| 6) (|SetCategory|)
                               (|RetractableTo| 6) (|unitsKnown|)
                               (|BasicType|) (|CoercibleTo| 41)
                               (|RetractableTo| 38)
                               (|RetractableTo| 40))
                            (|makeByteWordVec2| 46
                                '(2 12 2 2 9 13 0 0 0 17 4 20 2 2 2 18
                                  19 21 5 20 6 2 6 6 18 19 23 3 20 25 2
                                  2 18 26 2 0 27 0 0 28 3 20 25 2 2 18
                                  29 2 0 27 0 0 30 3 20 25 2 2 18 31 2
                                  0 27 0 0 32 3 20 25 2 2 18 33 2 0 27
                                  0 0 34 2 0 44 0 0 1 1 0 44 0 1 2 0 36
                                  0 0 1 0 0 0 1 2 6 0 0 0 1 2 6 0 0 0 1
                                  2 6 0 0 0 1 2 6 0 0 0 1 2 6 35 0 0 1
                                  2 6 36 0 0 1 2 6 27 0 0 34 1 2 37 0 1
                                  1 3 39 0 1 1 0 43 0 1 1 2 38 0 1 1 3
                                  40 0 1 1 0 6 0 1 1 0 0 0 1 1 0 36 0 1
                                  1 5 0 0 1 2 0 41 0 41 1 1 0 44 0 1 2
                                  0 0 6 14 1 2 4 27 0 0 30 2 4 27 0 0
                                  28 1 0 14 0 1 2 6 0 0 0 1 2 6 0 0 0 1
                                  2 6 0 0 0 1 2 6 0 0 0 1 2 6 35 0 0 1
                                  2 6 36 0 0 1 2 6 27 0 0 32 1 0 6 0 1
                                  1 0 45 0 1 1 0 46 0 1 2 4 36 0 6 1 1
                                  0 14 0 1 1 5 6 0 1 1 2 0 38 1 1 0 0 6
                                  1 1 0 0 40 1 1 0 41 0 1 1 0 42 0 1 2
                                  0 6 0 14 1 0 0 14 1 3 0 6 0 6 6 24 2
                                  0 0 0 14 16 2 0 0 0 9 11 0 0 0 1 0 0
                                  0 17 2 0 44 0 0 1 1 0 0 0 1 2 0 0 0 0
                                  1 2 0 0 0 0 1 2 0 0 0 14 15 2 0 0 0 9
                                  10 2 0 0 6 0 1 2 0 0 0 6 1 2 0 0 40 0
                                  1 2 0 0 0 0 22 2 0 0 14 0 1 2 0 0 9 0
                                  1)))))
          '|lookupComplete|)) 
