
(/VERSIONCHECK 2) 

(DEFUN |NSMP;PSimp| (|up| |mv| $)
  (COND
    ((EQL (SPADCALL |up| (QREFELT $ 12)) 0)
     (SPADCALL |up| (QREFELT $ 14)))
    ('T (CONS 1 (CONS |mv| |up|))))) 

(PUT '|NSMP;coerce;$Smp;2| '|SPADreplace| '(XLAM (|p|) |p|)) 

(DEFUN |NSMP;coerce;$Smp;2| (|p| $) |p|) 

(PUT '|NSMP;coerce;Smp$;3| '|SPADreplace| '(XLAM (|p|) |p|)) 

(DEFUN |NSMP;coerce;Smp$;3| (|p| $) |p|) 

(PUT '|NSMP;retractIfCan;$U;4| '|SPADreplace|
     '(XLAM (|p|) (CONS 0 |p|))) 

(DEFUN |NSMP;retractIfCan;$U;4| (|p| $) (CONS 0 |p|)) 

(DEFUN |NSMP;mvar;$VarSet;5| (|p| $)
  (COND
    ((QEQCAR |p| 0)
     (|error| " Error in mvar from NSMP : #1 has no variables."))
    ('T (QCAR (QCDR |p|))))) 

(DEFUN |NSMP;mdeg;$Nni;6| (|p| $)
  (COND
    ((QEQCAR |p| 0) 0)
    ('T (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 12))))) 

(DEFUN |NSMP;init;2$;7| (|p| $)
  (COND
    ((QEQCAR |p| 0)
     (|error| " Error in init from NSMP : #1 has no variables."))
    ('T (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 14))))) 

(DEFUN |NSMP;head;2$;8| (|p| $)
  (COND
    ((QEQCAR |p| 0) |p|)
    ('T
     (CONS 1
           (CONS (QCAR (QCDR |p|))
                 (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 22))))))) 

(DEFUN |NSMP;tail;2$;9| (|p| $)
  (PROG (|red|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |p| 0) (|spadConstant| $ 13))
             ('T
              (SEQ (LETT |red|
                         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 24))
                         |NSMP;tail;2$;9|)
                   (EXIT (COND
                           ((SPADCALL |red| (QREFELT $ 26))
                            (SPADCALL |red| (QREFELT $ 27)))
                           ('T (CONS 1 (CONS (QCAR (QCDR |p|)) |red|)))))))))))) 

(DEFUN |NSMP;iteratedInitials;$L;10| (|p| $)
  (SEQ (COND
         ((QEQCAR |p| 0) NIL)
         ('T
          (SEQ (LETT |p| (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 14))
                     |NSMP;iteratedInitials;$L;10|)
               (EXIT (SPADCALL |p| (SPADCALL |p| (QREFELT $ 30))
                         (QREFELT $ 32)))))))) 

(DEFUN |NSMP;localDeepestInitial| (|p| $)
  (COND
    ((QEQCAR |p| 0) |p|)
    ('T
     (|NSMP;localDeepestInitial|
         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 14)) $)))) 

(DEFUN |NSMP;deepestInitial;2$;12| (|p| $)
  (COND
    ((QEQCAR |p| 0)
     (|error| "Error in deepestInitial from NSMP : #1 has no variables."))
    ('T
     (|NSMP;localDeepestInitial|
         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 14)) $)))) 

(DEFUN |NSMP;mainMonomial;2$;13| (|p| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 34))
     (|error| "Error in mainMonomial from NSMP : the argument is zero"))
    ((QEQCAR |p| 0) (|spadConstant| $ 35))
    ('T
     (SPADCALL (|spadConstant| $ 35) (QCAR (QCDR |p|))
         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 12)) (QREFELT $ 36))))) 

(DEFUN |NSMP;leastMonomial;2$;14| (|p| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 34))
     (|error| "Error in leastMonomial from NSMP : the argument is zero"))
    ((QEQCAR |p| 0) (|spadConstant| $ 35))
    ('T
     (SPADCALL (|spadConstant| $ 35) (QCAR (QCDR |p|))
         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 38)) (QREFELT $ 36))))) 

(DEFUN |NSMP;mainCoefficients;$L;15| (|p| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 34))
     (|error| "Error in mainCoefficients from NSMP : the argument is zero"))
    ((QEQCAR |p| 0) (LIST |p|))
    ('T (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 40))))) 

(DEFUN |NSMP;leadingCoefficient;$VarSet$;16| (|p| |x| $)
  (PROG (|d|)
    (RETURN
      (COND
        ((QEQCAR |p| 0) |p|)
        ((SPADCALL (QCAR (QCDR |p|)) |x| (QREFELT $ 42))
         (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 14)))
        ((ZEROP (LETT |d| (SPADCALL |p| |x| (QREFELT $ 43))
                      |NSMP;leadingCoefficient;$VarSet$;16|))
         |p|)
        ('T (SPADCALL |p| |x| |d| (QREFELT $ 44))))))) 

(DEFUN |NSMP;localMonicModulo| (|a| |b| $)
  (PROG (|m| |mM|)
    (RETURN
      (SEQ (COND
             ((OR (QEQCAR |a| 0)
                  (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                      (QREFELT $ 46)))
              |a|)
             ('T
              (SEQ (COND
                     ((SPADCALL (QCAR (QCDR |b|)) (QCAR (QCDR |a|))
                          (QREFELT $ 46))
                      (LETT |m|
                            (SPADCALL
                                (CONS #'|NSMP;localMonicModulo!0|
                                      (VECTOR $ |b|))
                                (QCDR (QCDR |a|)) (QREFELT $ 50))
                            . #0=(|NSMP;localMonicModulo|)))
                     ('T
                      (LETT |m|
                            (SPADCALL (QCDR (QCDR |a|))
                                (QCDR (QCDR |b|)) (QREFELT $ 51)) . #0#)))
                   (COND
                     ((SPADCALL |m| (QREFELT $ 26))
                      (LETT |mM| (SPADCALL |m| (QREFELT $ 27)) . #0#))
                     ('T
                      (LETT |mM|
                            (CONS 1 (CONS (QCAR (QCDR |a|)) |m|)) . #0#)))
                   (EXIT |mM|)))))))) 

(DEFUN |NSMP;localMonicModulo!0| (|#1| $$)
  (|NSMP;localMonicModulo| |#1| (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |NSMP;monicModulo;3$;18| (|a| |b| $)
  (PROG (|ib| |r| |rec| |mM|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |b| 0)
              (|error| "Error in monicModulo from NSMP : #2 is constant"))
             (#0='T
              (SEQ (LETT |ib| (SPADCALL |b| (QREFELT $ 21))
                         . #1=(|NSMP;monicModulo;3$;18|))
                   (COND
                     ((NULL (SPADCALL |ib| (QREFELT $ 52)))
                      (EXIT (|error| "Error in monicModulo from NSMP : #2 is not monic"))))
                   (COND
                     ((SPADCALL |ib| (|spadConstant| $ 35)
                          (QREFELT $ 54))
                      (LETT |mM|
                            (|NSMP;localMonicModulo| |a| |b| $) . #1#))
                     (#0#
                      (SEQ (LETT |r|
                                 (SPADCALL |ib| (QREFELT $ 55)) . #1#)
                           (LETT |rec|
                                 (SPADCALL |r| (QREFELT $ 57)) . #1#)
                           (EXIT (COND
                                   ((QEQCAR |rec| 1)
                                    (|error|
                                     "Error in monicModulo from NSMP : #2 is not monic"))
                                   ((QEQCAR |a| 0) |a|)
                                   (#0#
                                    (SEQ
                                     (LETT |a|
                                      (SPADCALL (QCDR |rec|) |a|
                                       (QREFELT $ 58)) . #1#)
                                     (LETT |b|
                                      (SPADCALL (QCDR |rec|) |b|
                                       (QREFELT $ 58)) . #1#)
                                     (EXIT
                                      (LETT |mM|
                                       (SPADCALL |ib|
                                        (|NSMP;localMonicModulo| |a|
                                         |b| $)
                                        (QREFELT $ 59)) . #1#)))))))))
                   (EXIT |mM|)))))))) 

(DEFUN |NSMP;prem;3$;19| (|a| |b| $)
  (PROG (|db| |lcb| #0=#:G1938 |r| #1=#:G1961 #2=#:G1951 |term| |delta|
              |test| #3=#:G1958)
    (RETURN
      (SEQ (EXIT (COND
                   ((QEQCAR |b| 0)
                    (|error| "in prem$NSMP: ground? #2"))
                   ('T
                    (SEQ (LETT |db|
                               (SPADCALL (QCDR (QCDR |b|))
                                   (QREFELT $ 12))
                               . #4=(|NSMP;prem;3$;19|))
                         (LETT |lcb|
                               (SPADCALL (QCDR (QCDR |b|))
                                   (QREFELT $ 14)) . #4#)
                         (LETT |test|
                               (- (SPADCALL |a| (QCAR (QCDR |b|))
                                      (QREFELT $ 43))
                                  |db|) . #4#)
                         (LETT |delta| (MAX (+ |test| 1) 0) . #4#)
                         (COND
                           ((OR (QEQCAR |a| 0)
                                (SPADCALL (QCAR (QCDR |a|))
                                    (QCAR (QCDR |b|)) (QREFELT $ 46)))
                            (EXIT (SPADCALL
                                      (SPADCALL |lcb|
                                       (PROG1 (LETT #0# |delta| . #4#)
                                         (|check-subtype| (>= #0# 0)
                                          '(|NonNegativeInteger|) #0#))
                                       (QREFELT $ 61))
                                      |a| (QREFELT $ 59)))))
                         (EXIT (COND
                                 ((SPADCALL (QCAR (QCDR |a|))
                                      (QCAR (QCDR |b|)) (QREFELT $ 42))
                                  (SEQ (LETT |r|
                                        (SPADCALL (QCDR (QCDR |a|))
                                         (QCDR (QCDR |b|))
                                         (QREFELT $ 62)) . #4#)
                                       (EXIT
                                        (COND
                                          ((SPADCALL |r|
                                            (QREFELT $ 26))
                                           (PROGN
                                             (LETT #1#
                                              (SPADCALL |r|
                                               (QREFELT $ 27)) . #4#)
                                             (GO #1#)))
                                          ('T
                                           (CONS 1
                                            (CONS (QCAR (QCDR |a|))
                                             |r|)))))))
                                 ('T
                                  (SEQ (SEQ G190
                                        (COND
                                          ((NULL
                                            (COND
                                              ((OR
                                                (SPADCALL |a|
                                                 (QREFELT $ 34))
                                                (MINUSP |test|))
                                               'NIL)
                                              ('T 'T)))
                                           (GO G191)))
                                        (SEQ
                                         (LETT |term|
                                          (SPADCALL
                                           (SPADCALL |a|
                                            (QCAR (QCDR |b|))
                                            (QREFELT $ 45))
                                           (QCAR (QCDR |b|))
                                           (PROG1
                                            (LETT #2# |test| . #4#)
                                             (|check-subtype|
                                              (>= #2# 0)
                                              '(|NonNegativeInteger|)
                                              #2#))
                                           (QREFELT $ 36)) . #4#)
                                         (LETT |a|
                                          (SPADCALL
                                           (SPADCALL |lcb| |a|
                                            (QREFELT $ 59))
                                           (SPADCALL |term| |b|
                                            (QREFELT $ 59))
                                           (QREFELT $ 63)) . #4#)
                                         (LETT |delta|
                                          (- |delta| 1) . #4#)
                                         (EXIT
                                          (LETT |test|
                                           (-
                                            (SPADCALL |a|
                                             (QCAR (QCDR |b|))
                                             (QREFELT $ 43))
                                            |db|) . #4#)))
                                        NIL (GO G190) G191 (EXIT NIL))
                                       (EXIT
                                        (SPADCALL
                                         (SPADCALL |lcb|
                                          (PROG1
                                           (LETT #3# |delta| . #4#)
                                            (|check-subtype| (>= #3# 0)
                                             '(|NonNegativeInteger|)
                                             #3#))
                                          (QREFELT $ 61))
                                         |a| (QREFELT $ 59)))))))))))
           #1# (EXIT #1#))))) 

(DEFUN |NSMP;pquo;3$;20| (|a| |b| $)
  (PROG (|cPS| |c|)
    (RETURN
      (SEQ (LETT |cPS| (SPADCALL |a| |b| (QREFELT $ 66))
                 . #0=(|NSMP;pquo;3$;20|))
           (LETT |c|
                 (SPADCALL (QVELT |cPS| 0) (QVELT |cPS| 1)
                     (QREFELT $ 61)) . #0#)
           (EXIT (SPADCALL |c| (QVELT |cPS| 2) (QREFELT $ 59))))))) 

(DEFUN |NSMP;pseudoDivide;2$R;21| (|a| |b| $)
  (PROG (|cPS| |c|)
    (RETURN
      (SEQ (LETT |cPS| (SPADCALL |a| |b| (QREFELT $ 66))
                 . #0=(|NSMP;pseudoDivide;2$R;21|))
           (LETT |c|
                 (SPADCALL (QVELT |cPS| 0) (QVELT |cPS| 1)
                     (QREFELT $ 61)) . #0#)
           (EXIT (CONS (SPADCALL |c| (QVELT |cPS| 2) (QREFELT $ 59))
                       (SPADCALL |c| (QVELT |cPS| 3) (QREFELT $ 59)))))))) 

(DEFUN |NSMP;lazyPrem;3$;22| (|a| |b| $)
  (PROG (|db| |lcb| #0=#:G1977 |term| |test|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |b| 0) (|error| "in lazyPrem$NSMP: ground? #2"))
             ((OR (QEQCAR |a| 0)
                  (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                      (QREFELT $ 46)))
              |a|)
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 42))
                 (|NSMP;PSimp|
                     (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|))
                         (QREFELT $ 70))
                     (QCAR (QCDR |a|)) $))
                ('T
                 (SEQ (LETT |db|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 12))
                            . #1=(|NSMP;lazyPrem;3$;22|))
                      (LETT |lcb|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #1#)
                      (LETT |test|
                            (- (SPADCALL |a| (QCAR (QCDR |b|))
                                   (QREFELT $ 43))
                               |db|) . #1#)
                      (SEQ G190
                           (COND
                             ((NULL (COND
                                      ((OR
                                        (SPADCALL |a| (QREFELT $ 34))
                                        (MINUSP |test|))
                                       'NIL)
                                      ('T 'T)))
                              (GO G191)))
                           (SEQ (LETT |term|
                                      (SPADCALL
                                       (SPADCALL |a| (QCAR (QCDR |b|))
                                        (QREFELT $ 45))
                                       (QCAR (QCDR |b|))
                                       (PROG1 (LETT #0# |test| . #1#)
                                         (|check-subtype| (>= #0# 0)
                                          '(|NonNegativeInteger|) #0#))
                                       (QREFELT $ 36)) . #1#)
                                (LETT |a|
                                      (SPADCALL
                                       (SPADCALL |lcb| |a|
                                        (QREFELT $ 59))
                                       (SPADCALL |term| |b|
                                        (QREFELT $ 59))
                                       (QREFELT $ 63)) . #1#)
                                (EXIT (LETT |test|
                                       (-
                                        (SPADCALL |a| (QCAR (QCDR |b|))
                                         (QREFELT $ 43))
                                        |db|) . #1#)))
                           NIL (GO G190) G191 (EXIT NIL))
                      (EXIT |a|)))))))))) 

(DEFUN |NSMP;lazyPquo;3$;23| (|a| |b| $)
  (PROG (|db| |lcb| #0=#:G1989 |term| |q| |test|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |b| 0)
              (|error| " in lazyPquo$NSMP: #2 is conctant"))
             ((OR (QEQCAR |a| 0)
                  (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                      (QREFELT $ 46)))
              (|spadConstant| $ 13))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 42))
                 (|NSMP;PSimp|
                     (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|))
                         (QREFELT $ 72))
                     (QCAR (QCDR |a|)) $))
                ('T
                 (SEQ (LETT |db|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 12))
                            . #1=(|NSMP;lazyPquo;3$;23|))
                      (LETT |lcb|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #1#)
                      (LETT |test|
                            (- (SPADCALL |a| (QCAR (QCDR |b|))
                                   (QREFELT $ 43))
                               |db|) . #1#)
                      (LETT |q| (|spadConstant| $ 13) . #1#)
                      (LETT |test|
                            (- (SPADCALL |a| (QCAR (QCDR |b|))
                                   (QREFELT $ 43))
                               |db|) . #1#)
                      (SEQ G190
                           (COND
                             ((NULL (COND
                                      ((OR
                                        (SPADCALL |a| (QREFELT $ 34))
                                        (MINUSP |test|))
                                       'NIL)
                                      ('T 'T)))
                              (GO G191)))
                           (SEQ (LETT |term|
                                      (SPADCALL
                                       (SPADCALL |a| (QCAR (QCDR |b|))
                                        (QREFELT $ 45))
                                       (QCAR (QCDR |b|))
                                       (PROG1 (LETT #0# |test| . #1#)
                                         (|check-subtype| (>= #0# 0)
                                          '(|NonNegativeInteger|) #0#))
                                       (QREFELT $ 36)) . #1#)
                                (LETT |a|
                                      (SPADCALL
                                       (SPADCALL |lcb| |a|
                                        (QREFELT $ 59))
                                       (SPADCALL |term| |b|
                                        (QREFELT $ 59))
                                       (QREFELT $ 63)) . #1#)
                                (LETT |q|
                                      (SPADCALL
                                       (SPADCALL |lcb| |q|
                                        (QREFELT $ 59))
                                       |term| (QREFELT $ 73)) . #1#)
                                (EXIT (LETT |test|
                                       (-
                                        (SPADCALL |a| (QCAR (QCDR |b|))
                                         (QREFELT $ 43))
                                        |db|) . #1#)))
                           NIL (GO G190) G191 (EXIT NIL))
                      (EXIT |q|)))))))))) 

(DEFUN |NSMP;lazyPseudoDivide;2$R;24| (|a| |b| $)
  (PROG (|cgqr| |db| |lcb| #0=#:G2005 |term| |q| |delta| |test|
                #1=#:G2008)
    (RETURN
      (SEQ (COND
             ((QEQCAR |b| 0)
              (|error| " in lazyPseudoDivide$NSMP: #2 is conctant"))
             ((OR (QEQCAR |a| 0)
                  (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                      (QREFELT $ 46)))
              (VECTOR (|spadConstant| $ 35) 0 (|spadConstant| $ 13)
                      |a|))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 42))
                 (SEQ (LETT |cgqr|
                            (SPADCALL (QCDR (QCDR |a|))
                                (QCDR (QCDR |b|)) (QREFELT $ 76))
                            . #2=(|NSMP;lazyPseudoDivide;2$R;24|))
                      (EXIT (VECTOR (QVELT |cgqr| 0) (QVELT |cgqr| 1)
                                    (|NSMP;PSimp| (QVELT |cgqr| 2)
                                     (QCAR (QCDR |a|)) $)
                                    (|NSMP;PSimp| (QVELT |cgqr| 3)
                                     (QCAR (QCDR |a|)) $)))))
                ('T
                 (SEQ (LETT |db|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 12)) . #2#)
                      (LETT |lcb|
                            (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #2#)
                      (LETT |test|
                            (- (SPADCALL |a| (QCAR (QCDR |b|))
                                   (QREFELT $ 43))
                               |db|) . #2#)
                      (LETT |q| (|spadConstant| $ 13) . #2#)
                      (LETT |delta| (MAX (+ |test| 1) 0) . #2#)
                      (SEQ G190
                           (COND
                             ((NULL (COND
                                      ((OR
                                        (SPADCALL |a| (QREFELT $ 34))
                                        (MINUSP |test|))
                                       'NIL)
                                      ('T 'T)))
                              (GO G191)))
                           (SEQ (LETT |term|
                                      (SPADCALL
                                       (SPADCALL |a| (QCAR (QCDR |b|))
                                        (QREFELT $ 45))
                                       (QCAR (QCDR |b|))
                                       (PROG1 (LETT #0# |test| . #2#)
                                         (|check-subtype| (>= #0# 0)
                                          '(|NonNegativeInteger|) #0#))
                                       (QREFELT $ 36)) . #2#)
                                (LETT |a|
                                      (SPADCALL
                                       (SPADCALL |lcb| |a|
                                        (QREFELT $ 59))
                                       (SPADCALL |term| |b|
                                        (QREFELT $ 59))
                                       (QREFELT $ 63)) . #2#)
                                (LETT |q|
                                      (SPADCALL
                                       (SPADCALL |lcb| |q|
                                        (QREFELT $ 59))
                                       |term| (QREFELT $ 73)) . #2#)
                                (LETT |delta| (- |delta| 1) . #2#)
                                (EXIT (LETT |test|
                                       (-
                                        (SPADCALL |a| (QCAR (QCDR |b|))
                                         (QREFELT $ 43))
                                        |db|) . #2#)))
                           NIL (GO G190) G191 (EXIT NIL))
                      (EXIT (VECTOR |lcb|
                                    (PROG1 (LETT #1# |delta| . #2#)
                                      (|check-subtype| (>= #1# 0)
                                       '(|NonNegativeInteger|) #1#))
                                    |q| |a|))))))))))) 

(DEFUN |NSMP;lazyResidueClass;2$R;25| (|a| |b| $)
  (PROG (|lcb| |lrc| |db| #0=#:G2022 |term| |pow| |test|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |b| 0)
              (|error| " in lazyResidueClass$NSMP: #2 is conctant"))
             ('T
              (SEQ (LETT |lcb|
                         (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14))
                         . #1=(|NSMP;lazyResidueClass;2$R;25|))
                   (COND
                     ((OR (QEQCAR |a| 0)
                          (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                              (QREFELT $ 46)))
                      (EXIT (VECTOR |a| |lcb| 0))))
                   (EXIT (COND
                           ((SPADCALL (QCAR (QCDR |a|))
                                (QCAR (QCDR |b|)) (QREFELT $ 42))
                            (SEQ (LETT |lrc|
                                       (SPADCALL (QCDR (QCDR |a|))
                                        (QCDR (QCDR |b|))
                                        (QREFELT $ 79)) . #1#)
                                 (EXIT (VECTOR
                                        (|NSMP;PSimp| (QVELT |lrc| 0)
                                         (QCAR (QCDR |a|)) $)
                                        (QVELT |lrc| 1)
                                        (QVELT |lrc| 2)))))
                           ('T
                            (SEQ (LETT |db|
                                       (SPADCALL (QCDR (QCDR |b|))
                                        (QREFELT $ 12)) . #1#)
                                 (LETT |test|
                                       (-
                                        (SPADCALL |a| (QCAR (QCDR |b|))
                                         (QREFELT $ 43))
                                        |db|) . #1#)
                                 (LETT |pow| 0 . #1#)
                                 (SEQ G190
                                      (COND
                                        ((NULL
                                          (COND
                                            ((OR
                                              (SPADCALL |a|
                                               (QREFELT $ 34))
                                              (MINUSP |test|))
                                             'NIL)
                                            ('T 'T)))
                                         (GO G191)))
                                      (SEQ
                                       (LETT |term|
                                        (SPADCALL
                                         (SPADCALL |a|
                                          (QCAR (QCDR |b|))
                                          (QREFELT $ 45))
                                         (QCAR (QCDR |b|))
                                         (PROG1 (LETT #0# |test| . #1#)
                                           (|check-subtype| (>= #0# 0)
                                            '(|NonNegativeInteger|)
                                            #0#))
                                         (QREFELT $ 36)) . #1#)
                                       (LETT |a|
                                        (SPADCALL
                                         (SPADCALL |lcb| |a|
                                          (QREFELT $ 59))
                                         (SPADCALL |term| |b|
                                          (QREFELT $ 59))
                                         (QREFELT $ 63)) . #1#)
                                       (LETT |pow| (+ |pow| 1) . #1#)
                                       (EXIT
                                        (LETT |test|
                                         (-
                                          (SPADCALL |a|
                                           (QCAR (QCDR |b|))
                                           (QREFELT $ 43))
                                          |db|) . #1#)))
                                      NIL (GO G190) G191 (EXIT NIL))
                                 (EXIT (VECTOR |a| |lcb| |pow|))))))))))))) 

(DEFUN |NSMP;exactQuo| (|x| |y| $)
  (PROG (|ex|)
    (RETURN
      (SEQ (LETT |ex| (SPADCALL |x| |y| (QREFELT $ 83))
                 |NSMP;exactQuo|)
           (EXIT (COND
                   ((QEQCAR |ex| 0) (QCDR |ex|))
                   ('T (|error| "in exactQuotient$NSMP: bad args")))))))) 

(DEFUN |NSMP;LazardQuotient;2$Nni$;27| (|x| |y| |n| $)
  (PROG (|b| #0=#:G2039 #1=#:G2046 |a| |c| #2=#:G2040)
    (RETURN
      (SEQ (EXIT (COND
                   ((ZEROP |n|)
                    (|error| "LazardQuotient$NSMP : n = 0"))
                   ((EQL |n| 1) |x|)
                   ('T
                    (SEQ (LETT |a| 1
                               . #3=(|NSMP;LazardQuotient;2$Nni$;27|))
                         (SEQ G190
                              (COND
                                ((NULL (SEQ
                                        (LETT |b|
                                         (SPADCALL 2 |a|
                                          (QREFELT $ 85)) . #3#)
                                        (EXIT
                                         (COND
                                           ((< |n| |b|) 'NIL)
                                           ('T 'T)))))
                                 (GO G191)))
                              (SEQ (EXIT (LETT |a| |b| . #3#))) NIL
                              #4=(GO G190) G191 (EXIT NIL))
                         (LETT |c| |x| . #3#)
                         (LETT |n|
                               (PROG1 (LETT #0# (- |n| |a|) . #3#)
                                 (|check-subtype| (>= #0# 0)
                                     '(|NonNegativeInteger|) #0#)) . #3#)
                         (EXIT (SEQ G190 NIL
                                    (SEQ
                                     (EXIT
                                      (COND
                                        ((EQL |a| 1)
                                         (PROGN
                                           (LETT #1# |c| . #3#)
                                           (GO #1#)))
                                        ('T
                                         (SEQ
                                          (LETT |a|
                                           (QUOTIENT2 |a| 2) . #3#)
                                          (LETT |c|
                                           (|NSMP;exactQuo|
                                            (SPADCALL |c| |c|
                                             (QREFELT $ 59))
                                            |y| $) . #3#)
                                          (EXIT
                                           (COND
                                             ((NULL (< |n| |a|))
                                              (SEQ
                                               (LETT |c|
                                                (|NSMP;exactQuo|
                                                 (SPADCALL |c| |x|
                                                  (QREFELT $ 59))
                                                 |y| $) . #3#)
                                               (EXIT
                                                (LETT |n|
                                                 (PROG1
                                                  (LETT #2#
                                                   (- |n| |a|) . #3#)
                                                   (|check-subtype|
                                                    (>= #2# 0)
                                                    '(|NonNegativeInteger|)
                                                    #2#)) . #3#)))))))))))
                                    NIL #4# G191 (EXIT NIL)))))))
           #1# (EXIT #1#))))) 

(DEFUN |NSMP;LazardQuotient2;3$Nni$;28| (|p| |a| |b| |n| $)
  (PROG (#0=#:G2050 |c|)
    (RETURN
      (SEQ (COND
             ((ZEROP |n|) (|error| " in LazardQuotient2$NSMP: bad #4"))
             ((EQL |n| 1) |p|)
             ('T
              (SEQ (LETT |c|
                         (SPADCALL |a| |b|
                             (PROG1 (LETT #0# (- |n| 1)
                                     . #1=(|NSMP;LazardQuotient2;3$Nni$;28|))
                               (|check-subtype| (>= #0# 0)
                                   '(|NonNegativeInteger|) #0#))
                             (QREFELT $ 86)) . #1#)
                   (EXIT (|NSMP;exactQuo|
                             (SPADCALL |c| |p| (QREFELT $ 59)) |b| $))))))))) 

(DEFUN |NSMP;nextsubResultant2;5$;29| (|p| |q| |z| |s| $)
  (|NSMP;PSimp|
      (SPADCALL (QCDR (QCDR |p|)) (QCDR (QCDR |q|)) (QCDR (QCDR |z|))
          |s| (QREFELT $ 88))
      (QCAR (QCDR |p|)) $)) 

(DEFUN |NSMP;subResultantGcd;3$;30| (|a| |b| $)
  (COND
    ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
     (|error| "subResultantGcd$NSMP: one arg is constant"))
    ('T
     (COND
       ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 90))
        (|error| "subResultantGcd$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (|NSMP;PSimp|
            (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|))
                (QREFELT $ 91))
            (QCAR (QCDR |a|)) $)))))) 

(DEFUN |NSMP;halfExtendedSubResultantGcd1;2$R;31| (|a| |b| $)
  (PROG (|hesrg|)
    (RETURN
      (SEQ (COND
             ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
              (|error| "halfExtendedSubResultantGcd1$NSMP: one arg is constant"))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 90))
                 (|error| "halfExtendedSubResultantGcd1$NSMP: mvar(#1) ~= mvar(#2)"))
                ('T
                 (SEQ (LETT |hesrg|
                            (SPADCALL (QCDR (QCDR |a|))
                                (QCDR (QCDR |b|)) (QREFELT $ 94))
                            |NSMP;halfExtendedSubResultantGcd1;2$R;31|)
                      (EXIT (CONS (|NSMP;PSimp| (QCAR |hesrg|)
                                      (QCAR (QCDR |a|)) $)
                                  (|NSMP;PSimp| (QCDR |hesrg|)
                                      (QCAR (QCDR |a|)) $)))))))))))) 

(DEFUN |NSMP;halfExtendedSubResultantGcd2;2$R;32| (|a| |b| $)
  (PROG (|hesrg|)
    (RETURN
      (SEQ (COND
             ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
              (|error| "halfExtendedSubResultantGcd2$NSMP: one arg is constant"))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 90))
                 (|error| "halfExtendedSubResultantGcd2$NSMP: mvar(#1) ~= mvar(#2)"))
                ('T
                 (SEQ (LETT |hesrg|
                            (SPADCALL (QCDR (QCDR |a|))
                                (QCDR (QCDR |b|)) (QREFELT $ 97))
                            |NSMP;halfExtendedSubResultantGcd2;2$R;32|)
                      (EXIT (CONS (|NSMP;PSimp| (QCAR |hesrg|)
                                      (QCAR (QCDR |a|)) $)
                                  (|NSMP;PSimp| (QCDR |hesrg|)
                                      (QCAR (QCDR |a|)) $)))))))))))) 

(DEFUN |NSMP;extendedSubResultantGcd;2$R;33| (|a| |b| $)
  (PROG (|esrg|)
    (RETURN
      (SEQ (COND
             ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
              (|error| "extendedSubResultantGcd$NSMP: one arg is constant"))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 90))
                 (|error| "extendedSubResultantGcd$NSMP: mvar(#1) ~= mvar(#2)"))
                ('T
                 (SEQ (LETT |esrg|
                            (SPADCALL (QCDR (QCDR |a|))
                                (QCDR (QCDR |b|)) (QREFELT $ 100))
                            |NSMP;extendedSubResultantGcd;2$R;33|)
                      (EXIT (VECTOR (|NSMP;PSimp| (QVELT |esrg| 0)
                                     (QCAR (QCDR |a|)) $)
                                    (|NSMP;PSimp| (QVELT |esrg| 1)
                                     (QCAR (QCDR |a|)) $)
                                    (|NSMP;PSimp| (QVELT |esrg| 2)
                                     (QCAR (QCDR |a|)) $)))))))))))) 

(DEFUN |NSMP;resultant;3$;34| (|a| |b| $)
  (COND
    ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
     (|error| "resultant$NSMP: one arg is constant"))
    ('T
     (COND
       ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 90))
        (|error| "resultant$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 102))))))) 

(DEFUN |NSMP;subResultantChain;2$L;35| (|a| |b| $)
  (PROG (#0=#:G2098 |up| #1=#:G2099)
    (RETURN
      (SEQ (COND
             ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
              (|error| "subResultantChain$NSMP: one arg is constant"))
             ('T
              (COND
                ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                     (QREFELT $ 90))
                 (|error| "subResultantChain$NSMP: mvar(#1) ~= mvar(#2)"))
                ('T
                 (PROGN
                   (LETT #0# NIL
                         . #2=(|NSMP;subResultantChain;2$L;35|))
                   (SEQ (LETT |up| NIL . #2#)
                        (LETT #1#
                              (SPADCALL (QCDR (QCDR |a|))
                                  (QCDR (QCDR |b|)) (QREFELT $ 104)) . #2#)
                        G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |up| (CAR #1#) . #2#) NIL))
                           (GO G191)))
                        (SEQ (EXIT (LETT #0#
                                    (CONS
                                     (|NSMP;PSimp| |up|
                                      (QCAR (QCDR |a|)) $)
                                     #0#) . #2#)))
                        (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                        (EXIT (NREVERSE0 #0#)))))))))))) 

(DEFUN |NSMP;lastSubResultant;3$;36| (|a| |b| $)
  (COND
    ((OR (QEQCAR |a| 0) (QEQCAR |b| 0))
     (|error| "lastSubResultant$NSMP: one arg is constant"))
    ('T
     (COND
       ((SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 90))
        (|error| "lastSubResultant$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (|NSMP;PSimp|
            (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|))
                (QREFELT $ 106))
            (QCAR (QCDR |a|)) $)))))) 

(DEFUN |NSMP;exactQuotient;$R$;37| (|a| |b| $)
  (COND
    ((SPADCALL |b| (QCDR (|spadConstant| $ 35)) (QREFELT $ 108)) |a|)
    ((QEQCAR |a| 0) (CONS 0 (SPADCALL (QCDR |a|) |b| (QREFELT $ 109))))
    ('T
     (CONS 1
           (CONS (QCAR (QCDR |a|))
                 (SPADCALL
                     (CONS #'|NSMP;exactQuotient;$R$;37!0|
                           (VECTOR $ |b|))
                     (QCDR (QCDR |a|)) (QREFELT $ 50))))))) 

(DEFUN |NSMP;exactQuotient;$R$;37!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 110))) 

(DEFUN |NSMP;exactQuotient!;$R$;38| (|a| |b| $)
  (SEQ (COND
         ((SPADCALL |b| (QCDR (|spadConstant| $ 35)) (QREFELT $ 108))
          |a|)
         ((QEQCAR |a| 0)
          (CONS 0 (SPADCALL (QCDR |a|) |b| (QREFELT $ 109))))
         ('T
          (SEQ (PROGN
                 (RPLACD #0=(QCDR |a|)
                         (SPADCALL
                             (CONS #'|NSMP;exactQuotient!;$R$;38!0|
                                   (VECTOR $ |b|))
                             (QCDR (QCDR |a|)) (QREFELT $ 50)))
                 (QCDR #0#))
               (EXIT |a|)))))) 

(DEFUN |NSMP;exactQuotient!;$R$;38!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 111))) 

(DEFUN |NSMP;exactQuotient;$R$;39| (|a| |b| $)
  (PROG (#0=#:G2112)
    (RETURN
      (COND
        ((SPADCALL |b| (QCDR (|spadConstant| $ 35)) (QREFELT $ 108))
         |a|)
        ((QEQCAR |a| 0)
         (CONS 0
               (PROG2 (LETT #0#
                            (SPADCALL (QCDR |a|) |b| (QREFELT $ 112))
                            |NSMP;exactQuotient;$R$;39|)
                      (QCDR #0#)
                 (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#))))
        ('T
         (CONS 1
               (CONS (QCAR (QCDR |a|))
                     (SPADCALL
                         (CONS #'|NSMP;exactQuotient;$R$;39!0|
                               (VECTOR $ |b|))
                         (QCDR (QCDR |a|)) (QREFELT $ 50))))))))) 

(DEFUN |NSMP;exactQuotient;$R$;39!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 110))) 

(DEFUN |NSMP;exactQuotient!;$R$;40| (|a| |b| $)
  (PROG (#0=#:G2119)
    (RETURN
      (SEQ (COND
             ((SPADCALL |b| (QCDR (|spadConstant| $ 35))
                  (QREFELT $ 108))
              |a|)
             ((QEQCAR |a| 0)
              (CONS 0
                    (PROG2 (LETT #0#
                                 (SPADCALL (QCDR |a|) |b|
                                     (QREFELT $ 112))
                                 |NSMP;exactQuotient!;$R$;40|)
                           (QCDR #0#)
                      (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#))))
             ('T
              (SEQ (PROGN
                     (RPLACD #1=(QCDR |a|)
                             (SPADCALL
                                 (CONS #'|NSMP;exactQuotient!;$R$;40!0|
                                       (VECTOR $ |b|))
                                 (QCDR (QCDR |a|)) (QREFELT $ 50)))
                     (QCDR #1#))
                   (EXIT |a|)))))))) 

(DEFUN |NSMP;exactQuotient!;$R$;40!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 111))) 

(DEFUN |NSMP;localGcd| (|r| |p| $)
  (COND
    ((QEQCAR |p| 0) (SPADCALL |r| (QCDR |p|) (QREFELT $ 113)))
    ('T (SPADCALL |r| (SPADCALL |p| (QREFELT $ 114)) (QREFELT $ 113))))) 

(DEFUN |NSMP;gcd;R$R;42| (|r| |p| $)
  (COND
    ((OR (SPADCALL |r| (QCDR (|spadConstant| $ 35)) (QREFELT $ 108))
         (SPADCALL |p| (QREFELT $ 34)))
     |r|)
    ('T (|NSMP;localGcd| |r| |p| $)))) 

(DEFUN |NSMP;content;$R;43| (|p| $)
  (PROG (|r| |up|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |p| 0) (QCDR |p|))
             ('T
              (SEQ (LETT |up| (QCDR (QCDR |p|))
                         . #0=(|NSMP;content;$R;43|))
                   (LETT |r| (|spadConstant| $ 77) . #0#)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((OR (SPADCALL |up| (QREFELT $ 116))
                                     (SPADCALL |r|
                                      (QCDR (|spadConstant| $ 35))
                                      (QREFELT $ 108)))
                                    'NIL)
                                   ('T 'T)))
                           (GO G191)))
                        (SEQ (LETT |r|
                                   (|NSMP;localGcd| |r|
                                    (SPADCALL |up| (QREFELT $ 14)) $) . #0#)
                             (EXIT (LETT |up|
                                    (SPADCALL |up| (QREFELT $ 24)) . #0#)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT |r|)))))))) 

(DEFUN |NSMP;primitivePart!;2$;44| (|p| $)
  (PROG (|cp|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 34)) |p|)
             ((QEQCAR |p| 0) (|spadConstant| $ 35))
             ('T
              (SEQ (LETT |cp| (SPADCALL |p| (QREFELT $ 114))
                         |NSMP;primitivePart!;2$;44|)
                   (PROGN
                     (RPLACD (QCDR |p|)
                             (SPADCALL
                                 (SPADCALL
                                     (CONS
                                      #'|NSMP;primitivePart!;2$;44!0|
                                      (VECTOR $ |cp|))
                                     (QCDR (QCDR |p|)) (QREFELT $ 50))
                                 (QREFELT $ 117)))
                     (QCDR (QCDR |p|)))
                   (EXIT |p|)))))))) 

(DEFUN |NSMP;primitivePart!;2$;44!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 111))) 

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

(DEFUN |NewSparseMultivariatePolynomial;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ #0=#:G2169 #1=#:G2168 |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #2=(|NewSparseMultivariatePolynomial|))
        (LETT DV$2 (|devaluate| |#2|) . #2#)
        (LETT |dv$|
              (LIST '|NewSparseMultivariatePolynomial| DV$1 DV$2) . #2#)
        (LETT $ (GETREFV 163) . #2#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#1|
                                '(|PolynomialFactorizationExplicit|))
                            (|HasCategory| |#1| '(|CommutativeRing|))
                            (|HasCategory| |#1| '(|IntegralDomain|))
                            (OR (|HasCategory| |#1|
                                    '(|CommutativeRing|))
                                (|HasCategory| |#1|
                                    '(|IntegralDomain|)))
                            (|HasCategory| |#1|
                                '(|canonicalUnitNormal|))
                            (AND (|HasCategory| |#1|
                                     '(|PatternMatchable| (|Float|)))
                                 (|HasCategory| |#2|
                                     '(|PatternMatchable| (|Float|))))
                            (AND (|HasCategory| |#1|
                                     '(|PatternMatchable| (|Integer|)))
                                 (|HasCategory| |#2|
                                     '(|PatternMatchable| (|Integer|))))
                            (AND (|HasCategory| |#1|
                                     '(|ConvertibleTo|
                                       (|Pattern| (|Float|))))
                                 (|HasCategory| |#2|
                                     '(|ConvertibleTo|
                                       (|Pattern| (|Float|)))))
                            (AND (|HasCategory| |#1|
                                     '(|ConvertibleTo|
                                       (|Pattern| (|Integer|))))
                                 (|HasCategory| |#2|
                                     '(|ConvertibleTo|
                                       (|Pattern| (|Integer|)))))
                            (AND (|HasCategory| |#1|
                                     '(|ConvertibleTo| (|InputForm|)))
                                 (|HasCategory| |#2|
                                     '(|ConvertibleTo| (|InputForm|))))
                            (|HasCategory| |#1| '(|OrderedSet|))
                            (|HasCategory| |#1|
                                '(|LinearlyExplicitRingOver|
                                     (|Integer|)))
                            (|HasCategory| |#1|
                                '(|Algebra| (|Fraction| (|Integer|))))
                            (|HasCategory| |#1|
                                '(|CharacteristicNonZero|))
                            (|HasCategory| |#1|
                                '(|CharacteristicZero|))
                            (|HasCategory| |#1|
                                '(|RetractableTo| (|Integer|)))
                            (|HasCategory| |#1|
                                '(|RetractableTo|
                                     (|Fraction| (|Integer|))))
                            (LETT #0#
                                  (|HasCategory| |#2|
                                      '(|ConvertibleTo| (|Symbol|))) . #2#)
                            (AND (|HasCategory| |#1|
                                     '(|RetractableTo| (|Integer|)))
                                 #0#)
                            (|HasCategory| |#1| '(|Field|))
                            (AND (|HasCategory| |#1|
                                     '(|Algebra|
                                       (|Fraction| (|Integer|))))
                                 #0#)
                            (OR (AND (|HasCategory| |#1|
                                      '(|Algebra| (|Integer|)))
                                     #0#
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|Algebra|
                                         (|Fraction| (|Integer|))))))
                                (AND (|HasCategory| |#1|
                                      '(|Algebra|
                                        (|Fraction| (|Integer|))))
                                     #0#))
                            (OR (AND (|HasCategory| |#1|
                                      '(|Algebra| (|Integer|)))
                                     #0#
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|IntegerNumberSystem|)))
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|Algebra|
                                         (|Fraction| (|Integer|))))))
                                (AND #0#
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|Algebra| (|Integer|))))
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|Algebra|
                                         (|Fraction| (|Integer|))))))
                                (AND (|HasCategory| |#1|
                                      '(|Algebra|
                                        (|Fraction| (|Integer|))))
                                     #0#
                                     (|not|
                                      (|HasCategory| |#1|
                                       '(|QuotientFieldCategory|
                                         (|Integer|))))))
                            (OR (|HasCategory| |#1|
                                    '(|Algebra|
                                      (|Fraction| (|Integer|))))
                                (|HasCategory| |#1|
                                    '(|RetractableTo|
                                      (|Fraction| (|Integer|)))))
                            (LETT #1#
                                  (|HasCategory| |#1| '(|GcdDomain|)) . #2#)
                            (OR (|HasCategory| |#1|
                                    '(|CommutativeRing|))
                                #1#
                                (|HasCategory| |#1|
                                    '(|IntegralDomain|))
                                (|HasCategory| |#1|
                                    '(|PolynomialFactorizationExplicit|)))
                            (OR #1#
                                (|HasCategory| |#1|
                                    '(|IntegralDomain|))
                                (|HasCategory| |#1|
                                    '(|PolynomialFactorizationExplicit|)))
                            (OR #1#
                                (|HasCategory| |#1|
                                    '(|PolynomialFactorizationExplicit|))))) . #2#))
        (|haddProp| |$ConstructorCache|
            '|NewSparseMultivariatePolynomial| (LIST DV$1 DV$2)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (AND (|HasCategory| $ '(|CharacteristicNonZero|))
             (|HasCategory| |#1| '(|PolynomialFactorizationExplicit|))
             (|augmentPredVector| $ 268435456))
        (AND (OR (AND (|HasCategory| $ '(|CharacteristicNonZero|))
                      (|HasCategory| |#1|
                          '(|PolynomialFactorizationExplicit|)))
                 (|HasCategory| |#1| '(|CharacteristicNonZero|)))
             (|augmentPredVector| $ 536870912))
        (QSETREFV $ 8 (|NewSparseUnivariatePolynomial| $))
        (QSETREFV $ 9
            (|Record| (|:| |v| |#2|) (|:| |ts| (QREFELT $ 8))))
        (QSETREFV $ 10 (|Union| |#1| (QREFELT $ 9)))
        (COND
          ((|testBitVector| |pv$| 3)
           (PROGN
             (QSETREFV $ 82
                 (|PseudoRemainderSequence| $ (QREFELT $ 8)))
             (QSETREFV $ 86
                 (CONS (|dispatchFunction|
                           |NSMP;LazardQuotient;2$Nni$;27|)
                       $))
             (QSETREFV $ 87
                 (CONS (|dispatchFunction|
                           |NSMP;LazardQuotient2;3$Nni$;28|)
                       $))
             (QSETREFV $ 89
                 (CONS (|dispatchFunction|
                           |NSMP;nextsubResultant2;5$;29|)
                       $))
             (QSETREFV $ 92
                 (CONS (|dispatchFunction|
                           |NSMP;subResultantGcd;3$;30|)
                       $))
             (QSETREFV $ 95
                 (CONS (|dispatchFunction|
                           |NSMP;halfExtendedSubResultantGcd1;2$R;31|)
                       $))
             (QSETREFV $ 98
                 (CONS (|dispatchFunction|
                           |NSMP;halfExtendedSubResultantGcd2;2$R;32|)
                       $))
             (QSETREFV $ 101
                 (CONS (|dispatchFunction|
                           |NSMP;extendedSubResultantGcd;2$R;33|)
                       $))
             (QSETREFV $ 103
                 (CONS (|dispatchFunction| |NSMP;resultant;3$;34|) $))
             (QSETREFV $ 105
                 (CONS (|dispatchFunction|
                           |NSMP;subResultantChain;2$L;35|)
                       $))
             (QSETREFV $ 107
                 (CONS (|dispatchFunction|
                           |NSMP;lastSubResultant;3$;36|)
                       $))
             (COND
               ((|HasCategory| |#1| '(|EuclideanDomain|))
                (PROGN
                  (QSETREFV $ 110
                            (CONS (|dispatchFunction|
                                      |NSMP;exactQuotient;$R$;37|)
                                  $))
                  (QSETREFV $ 111
                      (CONS (|dispatchFunction|
                                |NSMP;exactQuotient!;$R$;38|)
                            $))))
               ('T
                (PROGN
                  (QSETREFV $ 110
                      (CONS (|dispatchFunction|
                                |NSMP;exactQuotient;$R$;39|)
                            $))
                  (QSETREFV $ 111
                      (CONS (|dispatchFunction|
                                |NSMP;exactQuotient!;$R$;40|)
                            $))))))))
        (COND
          ((|testBitVector| |pv$| 25)
           (PROGN
             (QSETREFV $ 115
                 (CONS (|dispatchFunction| |NSMP;gcd;R$R;42|) $))
             (QSETREFV $ 114
                 (CONS (|dispatchFunction| |NSMP;content;$R;43|) $))
             (QSETREFV $ 118
                 (CONS (|dispatchFunction| |NSMP;primitivePart!;2$;44|)
                       $)))))
        $)))) 

(MAKEPROP '|NewSparseMultivariatePolynomial| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL (|SparseMultivariatePolynomial| 6 7)
             (|local| |#1|) (|local| |#2|) 'D '|VPoly| '|Rep|
             (|NonNegativeInteger|) (0 . |degree|) (5 . |Zero|)
             (9 . |leadingCoefficient|) |NSMP;coerce;$Smp;2|
             |NSMP;coerce;Smp$;3| (|Union| 5 '"failed")
             |NSMP;retractIfCan;$U;4| |NSMP;mvar;$VarSet;5|
             |NSMP;mdeg;$Nni;6| |NSMP;init;2$;7|
             (14 . |leadingMonomial|) |NSMP;head;2$;8|
             (19 . |reductum|) (|Boolean|) (24 . |ground?|)
             (29 . |ground|) |NSMP;tail;2$;9| (|List| $)
             |NSMP;iteratedInitials;$L;10| (|List| $$) (34 . |cons|)
             |NSMP;deepestInitial;2$;12| (40 . |zero?|) (45 . |One|)
             (49 . |monomial|) |NSMP;mainMonomial;2$;13|
             (56 . |minimumDegree|) |NSMP;leastMonomial;2$;14|
             (61 . |coefficients|) |NSMP;mainCoefficients;$L;15|
             (66 . =) (72 . |degree|) (78 . |coefficient|)
             |NSMP;leadingCoefficient;$VarSet$;16| (85 . <)
             (|NewSparseUnivariatePolynomial| $$) (|Mapping| $$ $$)
             (|NewSparseUnivariatePolynomialFunctions2| $$ $$)
             (91 . |map|) (97 . |monicModulo|) (103 . |ground?|)
             (108 . |One|) (112 . =) (118 . |ground|)
             (|Union| $ '"failed") (123 . |recip|) (128 . *) (134 . *)
             |NSMP;monicModulo;3$;18| (140 . **)
             (146 . |pseudoRemainder|) (152 . -) |NSMP;prem;3$;19|
             (|Record| (|:| |coef| $) (|:| |gap| 11) (|:| |quotient| $)
                 (|:| |remainder| $))
             |NSMP;lazyPseudoDivide;2$R;24| |NSMP;pquo;3$;20|
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             |NSMP;pseudoDivide;2$R;21| (158 . |lazyPseudoRemainder|)
             |NSMP;lazyPrem;3$;22| (164 . |lazyPseudoQuotient|)
             (170 . +) |NSMP;lazyPquo;3$;23|
             (|Record| (|:| |coef| $$) (|:| |gap| 11)
                 (|:| |quotient| $) (|:| |remainder| $))
             (176 . |lazyPseudoDivide|) (182 . |Zero|)
             (|Record| (|:| |polnum| $) (|:| |polden| $$)
                 (|:| |power| 11))
             (186 . |lazyResidueClass|)
             (|Record| (|:| |polnum| $) (|:| |polden| $)
                 (|:| |power| 11))
             |NSMP;lazyResidueClass;2$R;25| '|packD| (192 . |exquo|)
             (|PositiveInteger|) (198 . *) (204 . |LazardQuotient|)
             (211 . |LazardQuotient2|) (219 . |nextsousResultant2|)
             (227 . |nextsubResultant2|) (235 . ~=)
             (241 . |subResultantGcd|) (247 . |subResultantGcd|)
             (|Record| (|:| |gcd| $) (|:| |coef1| $))
             (253 . |halfExtendedSubResultantGcd1|)
             (259 . |halfExtendedSubResultantGcd1|)
             (|Record| (|:| |gcd| $) (|:| |coef2| $))
             (265 . |halfExtendedSubResultantGcd2|)
             (271 . |halfExtendedSubResultantGcd2|)
             (|Record| (|:| |gcd| $) (|:| |coef1| $) (|:| |coef2| $))
             (277 . |extendedSubResultantGcd|)
             (283 . |extendedSubResultantGcd|) (289 . |resultant|)
             (295 . |resultant|) (301 . |subResultantsChain|)
             (307 . |subResultantChain|) (313 . |lastSubResultant|)
             (319 . |lastSubResultant|) (325 . =) (331 . |quo|)
             (337 . |exactQuotient|) (343 . |exactQuotient!|)
             (349 . |exquo|) (355 . |gcd|) (361 . |content|)
             (366 . |gcd|) (372 . |zero?|) (377 . |unitCanonical|)
             (382 . |primitivePart!|) (|Union| 135 '"failed")
             (|Matrix| $) (|Polynomial| 130) (|InputForm|)
             (|Pattern| (|Float|)) (|Pattern| 142)
             (|PatternMatchResult| (|Float|) $)
             (|PatternMatchResult| 142 $) (|String|) (|Polynomial| 142)
             (|Polynomial| 6) (|Fraction| 142)
             (|SparseUnivariatePolynomial| $) (|Factored| $)
             (|Record| (|:| |unit| $) (|:| |canonical| $)
                 (|:| |associate| $))
             (|Record| (|:| |mat| 136) (|:| |vec| (|Vector| 142)))
             (|Vector| $) (|Matrix| 142) (|Factored| 131)
             (|Union| 139 '"failed") (|List| 131)
             (|Union| 130 '"failed") (|Union| 142 '"failed")
             (|Integer|)
             (|Record| (|:| |coef| $) (|:| |gap| 11)
                 (|:| |remainder| $))
             (|Union| 25 '"failed") (|List| 7)
             (|Record| (|:| |var| 7) (|:| |exponent| 11))
             (|Union| 146 '"failed") (|Union| 29 '"failed")
             (|SparseUnivariatePolynomial| 6) (|List| 11)
             (|Union| 7 '"failed") (|Matrix| 6)
             (|Record| (|:| |mat| 152) (|:| |vec| (|Vector| 6)))
             (|List| 6) (|List| 156) (|Equation| $)
             (|IndexedExponents| 7) (|Mapping| 6 6)
             (|Union| 6 '"failed") (|Mapping| 157 157) (|OutputForm|)
             (|SingleInteger|))
          '#(|zero?| 387 |tail| 392 |subResultantGcd| 397
             |subResultantChain| 403 |retractIfCan| 409 |resultant| 414
             |pseudoDivide| 420 |primitivePart!| 426 |prem| 431 |pquo|
             437 |nextsubResultant2| 443 |mvar| 451 |monomial| 456
             |monicModulo| 463 |mdeg| 469 |mainMonomial| 474
             |mainCoefficients| 479 |leastMonomial| 484
             |leadingCoefficient| 489 |lazyResidueClass| 495
             |lazyPseudoDivide| 501 |lazyPrem| 507 |lazyPquo| 513
             |lastSubResultant| 519 |iteratedInitials| 525 |init| 530
             |head| 535 |halfExtendedSubResultantGcd2| 540
             |halfExtendedSubResultantGcd1| 546 |ground?| 552 |ground|
             557 |gcd| 562 |extendedSubResultantGcd| 568 |exquo| 574
             |exactQuotient!| 580 |exactQuotient| 586 |degree| 592
             |deepestInitial| 598 |content| 603 |coerce| 608
             |coefficient| 618 |Zero| 625 |One| 629 |LazardQuotient2|
             633 |LazardQuotient| 641 = 648 - 654 + 660 ** 666 * 672)
          'NIL
          (CONS (|makeByteWordVec2| 28
                    '(0 0 1 0 1 0 28 27 0 3 13 2 0 0 26 3 3 12 13 14 15
                      2 0 0 4 13 0 0 0 0 2 13 13 0 0 0 0 0 0 0 0 6 7 11
                      0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 5 8 9 10 16 17 19
                      18 18))
                (CONS '#(|RecursivePolynomialCategory&|
                         |PolynomialCategory&|
                         |PolynomialFactorizationExplicit&|
                         |FiniteAbelianMonoidRing&|
                         |UniqueFactorizationDomain&|
                         |AbelianMonoidRing&| |GcdDomain&|
                         |IntegralDomain&|
                         |FullyLinearlyExplicitRingOver&| |Algebra&|
                         |Algebra&| |Algebra&|
                         |PartialDifferentialRing&| NIL NIL |Module&|
                         NIL NIL |Module&| NIL NIL |Module&| NIL
                         |Ring&| NIL NIL NIL NIL NIL NIL NIL NIL NIL
                         |AbelianGroup&| NIL NIL |AbelianMonoid&|
                         |Monoid&| NIL |SemiGroup&| |AbelianSemiGroup&|
                         NIL NIL |OrderedSet&| |Evalable&|
                         |FullyRetractableTo&| |SetCategory&|
                         |RetractableTo&| NIL |RetractableTo&|
                         |InnerEvalable&| |InnerEvalable&|
                         |InnerEvalable&| |RetractableTo&| NIL
                         |BasicType&| NIL NIL NIL NIL NIL NIL NIL
                         |RetractableTo&| |RetractableTo&| NIL NIL NIL)
                      (CONS '#((|RecursivePolynomialCategory| 6
                                   (|IndexedExponents| 7) 7)
                               (|PolynomialCategory| 6
                                   (|IndexedExponents| 7) 7)
                               (|PolynomialFactorizationExplicit|)
                               (|FiniteAbelianMonoidRing| 6
                                   (|IndexedExponents| 7))
                               (|UniqueFactorizationDomain|)
                               (|AbelianMonoidRing| 6
                                   (|IndexedExponents| 7))
                               (|GcdDomain|) (|IntegralDomain|)
                               (|FullyLinearlyExplicitRingOver| 6)
                               (|Algebra| $$) (|Algebra| 130)
                               (|Algebra| 6)
                               (|PartialDifferentialRing| 7)
                               (|LinearlyExplicitRingOver| 6)
                               (|CommutativeRing|) (|Module| $$)
                               (|EntireRing|)
                               (|LinearlyExplicitRingOver| 142)
                               (|Module| 130) (|CharacteristicNonZero|)
                               (|CharacteristicZero|) (|Module| 6)
                               (|BiModule| 6 6) (|Ring|)
                               (|BiModule| $$ $$) (|BiModule| 130 130)
                               (|LeftModule| 6) (|Rng|)
                               (|RightModule| 6) (|LeftModule| $$)
                               (|RightModule| $$) (|LeftModule| 130)
                               (|RightModule| 130) (|AbelianGroup|)
                               (|CancellationAbelianMonoid|)
                               (|SemiRing|) (|AbelianMonoid|)
                               (|Monoid|) (|SemiRng|) (|SemiGroup|)
                               (|AbelianSemiGroup|)
                               (|PatternMatchable| (|Float|))
                               (|PatternMatchable| 142) (|OrderedSet|)
                               (|Evalable| $$) (|FullyRetractableTo| 6)
                               (|SetCategory|)
                               (|RetractableTo|
                                   (|SparseMultivariatePolynomial| 6 7))
                               (|CoercibleTo|
                                   (|SparseMultivariatePolynomial| 6 7))
                               (|RetractableTo| 7)
                               (|InnerEvalable| 7 $$)
                               (|InnerEvalable| 7 6)
                               (|InnerEvalable| $$ $$)
                               (|RetractableTo| 6) (|unitsKnown|)
                               (|BasicType|) (|CoercibleTo| 161)
                               (|CommutativeStar|) (|noZeroDivisors|)
                               (|canonicalUnitNormal|)
                               (|ConvertibleTo| 123)
                               (|ConvertibleTo| 124)
                               (|ConvertibleTo| 122)
                               (|RetractableTo| 142)
                               (|RetractableTo| 130)
                               (|ConvertibleTo| 127)
                               (|ConvertibleTo| (|Polynomial| 6))
                               (|CoercibleTo| (|Polynomial| 6)))
                            (|makeByteWordVec2| 118
                                '(1 8 11 0 12 0 0 0 13 1 8 2 0 14 1 8 0
                                  0 22 1 8 0 0 24 1 8 25 0 26 1 8 2 0
                                  27 2 31 0 2 0 32 1 0 25 0 34 0 0 0 35
                                  3 0 0 0 7 11 36 1 8 11 0 38 1 8 31 0
                                  40 2 7 25 0 0 42 2 0 11 0 7 43 3 0 0
                                  0 7 11 44 2 7 25 0 0 46 2 49 47 48 47
                                  50 2 8 0 0 0 51 1 0 25 0 52 0 6 0 53
                                  2 0 25 0 0 54 1 0 6 0 55 1 6 56 0 57
                                  2 0 0 6 0 58 2 0 0 0 0 59 2 0 0 0 11
                                  61 2 8 0 0 0 62 2 0 0 0 0 63 2 8 0 0
                                  0 70 2 8 0 0 0 72 2 0 0 0 0 73 2 8 75
                                  0 0 76 0 6 0 77 2 8 78 0 0 79 2 0 56
                                  0 0 83 2 11 0 84 0 85 3 0 0 0 0 11 86
                                  4 0 0 0 0 0 11 87 4 82 8 8 8 8 2 88 4
                                  0 0 0 0 0 0 89 2 7 25 0 0 90 2 8 0 0
                                  0 91 2 0 0 0 0 92 2 8 93 0 0 94 2 0
                                  93 0 0 95 2 8 96 0 0 97 2 0 96 0 0 98
                                  2 8 99 0 0 100 2 0 99 0 0 101 2 8 2 0
                                  0 102 2 0 0 0 0 103 2 8 29 0 0 104 2
                                  0 29 0 0 105 2 8 0 0 0 106 2 0 0 0 0
                                  107 2 6 25 0 0 108 2 6 0 0 0 109 2 0
                                  0 0 6 110 2 0 0 0 6 111 2 6 56 0 0
                                  112 2 6 0 0 0 113 1 0 6 0 114 2 0 6 6
                                  0 115 1 8 25 0 116 1 8 0 0 117 1 0 0
                                  0 118 1 0 25 0 34 1 0 0 0 28 2 3 0 0
                                  0 92 2 3 29 0 0 105 1 0 17 0 18 2 3 0
                                  0 0 103 2 0 68 0 0 69 1 25 0 0 118 2
                                  0 0 0 0 64 2 0 0 0 0 67 4 3 0 0 0 0 0
                                  89 1 0 7 0 19 3 0 0 0 7 11 36 2 0 0 0
                                  0 60 1 0 11 0 20 1 0 0 0 37 1 0 29 0
                                  41 1 0 0 0 39 2 0 0 0 7 45 2 0 80 0 0
                                  81 2 0 65 0 0 66 2 0 0 0 0 71 2 0 0 0
                                  0 74 2 3 0 0 0 107 1 0 29 0 30 1 0 0
                                  0 21 1 0 0 0 23 2 3 96 0 0 98 2 3 93
                                  0 0 95 1 0 25 0 52 1 0 6 0 55 2 25 6
                                  6 0 115 2 3 99 0 0 101 2 3 56 0 0 83
                                  2 3 0 0 6 111 2 3 0 0 6 110 2 0 11 0
                                  7 43 1 0 0 0 33 1 25 6 0 114 1 0 0 5
                                  16 1 0 5 0 15 3 0 0 0 7 11 44 0 0 0
                                  13 0 0 0 35 4 3 0 0 0 0 11 87 3 3 0 0
                                  0 11 86 2 0 25 0 0 54 2 0 0 0 0 63 2
                                  0 0 0 0 73 2 0 0 0 11 61 2 0 0 6 0 58
                                  2 0 0 0 0 59)))))
          '|lookupIncomplete|)) 
