
(/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))
            (#1='T
             (SEQ
              (LETT |red| (SPADCALL (QCDR (QCDR |p|)) (QREFELT $ 24))
                    |NSMP;tail;2$;9|)
              (EXIT
               (COND
                ((SPADCALL |red| (QREFELT $ 26))
                 (SPADCALL |red| (QREFELT $ 27)))
                (#1# (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 (|mM| |m|)
    (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))
                 . #1=(|NSMP;localMonicModulo|)))
          (#2='T
           (LETT |m|
                 (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 51))
                 . #1#)))
         (COND
          ((SPADCALL |m| (QREFELT $ 26))
           (LETT |mM| (SPADCALL |m| (QREFELT $ 27)) . #1#))
          (#2# (LETT |mM| (CONS 1 (CONS (QCAR (QCDR |a|)) |m|)) . #1#)))
         (EXIT |mM|)))))))) 

(DEFUN |NSMP;localMonicModulo!0| (|a1| $$)
  (PROG (|b| $)
    (LETT |b| (QREFELT $$ 1) . #1=(|NSMP;localMonicModulo|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|NSMP;localMonicModulo| |a1| |b| $))))) 

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

(DEFUN |NSMP;prem;3$;19| (|a| |b| $)
  (PROG (#1=#:G1944 |test| |delta| |term| #2=#:G1937 #3=#:G1947 |r| #4=#:G1924
         |lcb| |db|)
    (RETURN
     (SEQ
      (EXIT
       (COND ((QEQCAR |b| 0) (|error| "in prem$NSMP: ground? #2"))
             (#5='T
              (SEQ
               (LETT |db| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 12))
                     . #6=(|NSMP;prem;3$;19|))
               (LETT |lcb| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #6#)
               (LETT |test|
                     (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43)) |db|)
                     . #6#)
               (LETT |delta| (MAX (+ |test| 1) 0) . #6#)
               (COND
                ((OR (QEQCAR |a| 0)
                     (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|))
                               (QREFELT $ 46)))
                 (EXIT
                  (SPADCALL
                   (SPADCALL |lcb|
                             (PROG1 (LETT #4# |delta| . #6#)
                               (|check-subtype| (>= #4# 0)
                                                '(|NonNegativeInteger|) #4#))
                             (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))
                         . #6#)
                   (EXIT
                    (COND
                     ((SPADCALL |r| (QREFELT $ 26))
                      (PROGN
                       (LETT #3# (SPADCALL |r| (QREFELT $ 27)) . #6#)
                       (GO #3#)))
                     (#5# (CONS 1 (CONS (QCAR (QCDR |a|)) |r|)))))))
                 (#5#
                  (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| . #6#)
                                  (|check-subtype| (>= #2# 0)
                                                   '(|NonNegativeInteger|)
                                                   #2#))
                                (QREFELT $ 36))
                               . #6#)
                         (LETT |a|
                               (SPADCALL (SPADCALL |lcb| |a| (QREFELT $ 59))
                                         (SPADCALL |term| |b| (QREFELT $ 59))
                                         (QREFELT $ 63))
                               . #6#)
                         (LETT |delta| (- |delta| 1) . #6#)
                         (EXIT
                          (LETT |test|
                                (-
                                 (SPADCALL |a| (QCAR (QCDR |b|))
                                           (QREFELT $ 43))
                                 |db|)
                                . #6#)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT
                    (SPADCALL
                     (SPADCALL |lcb|
                               (PROG1 (LETT #1# |delta| . #6#)
                                 (|check-subtype| (>= #1# 0)
                                                  '(|NonNegativeInteger|) #1#))
                               (QREFELT $ 61))
                     |a| (QREFELT $ 59)))))))))))
      #3# (EXIT #3#))))) 

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

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

(DEFUN |NSMP;lazyPrem;3$;22| (|a| |b| $)
  (PROG (|test| |term| #1=#:G1963 |lcb| |db|)
    (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))
                      . #2=(|NSMP;lazyPrem;3$;22|))
                (LETT |lcb| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #2#)
                (LETT |test|
                      (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43)) |db|)
                      . #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 #1# |test| . #2#)
                               (|check-subtype| (>= #1# 0)
                                                '(|NonNegativeInteger|) #1#))
                             (QREFELT $ 36))
                            . #2#)
                      (LETT |a|
                            (SPADCALL (SPADCALL |lcb| |a| (QREFELT $ 59))
                                      (SPADCALL |term| |b| (QREFELT $ 59))
                                      (QREFELT $ 63))
                            . #2#)
                      (EXIT
                       (LETT |test|
                             (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43))
                                |db|)
                             . #2#)))
                     NIL (GO G190) G191 (EXIT NIL))
                (EXIT |a|)))))))))) 

(DEFUN |NSMP;lazyPquo;3$;23| (|a| |b| $)
  (PROG (|test| |q| |term| #1=#:G1975 |lcb| |db|)
    (RETURN
     (SEQ
      (COND ((QEQCAR |b| 0) (|error| " in lazyPquo$NSMP: #2 is constant"))
            ((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))
                      . #2=(|NSMP;lazyPquo;3$;23|))
                (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 |test|
                      (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43)) |db|)
                      . #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 #1# |test| . #2#)
                               (|check-subtype| (>= #1# 0)
                                                '(|NonNegativeInteger|) #1#))
                             (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#)
                      (EXIT
                       (LETT |test|
                             (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43))
                                |db|)
                             . #2#)))
                     NIL (GO G190) G191 (EXIT NIL))
                (EXIT |q|)))))))))) 

(DEFUN |NSMP;lazyPseudoDivide;2$R;24| (|a| |b| $)
  (PROG (#1=#:G1994 |test| |delta| |q| |term| #2=#:G1991 |lcb| |db| |cgqr|)
    (RETURN
     (SEQ
      (COND
       ((QEQCAR |b| 0) (|error| " in lazyPseudoDivide$NSMP: #2 is constant"))
       ((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))
                 . #3=(|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)) . #3#)
               (LETT |lcb| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14)) . #3#)
               (LETT |test|
                     (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43)) |db|)
                     . #3#)
               (LETT |q| (|spadConstant| $ 13) . #3#)
               (LETT |delta| (MAX (+ |test| 1) 0) . #3#)
               (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| . #3#)
                              (|check-subtype| (>= #2# 0)
                                               '(|NonNegativeInteger|) #2#))
                            (QREFELT $ 36))
                           . #3#)
                     (LETT |a|
                           (SPADCALL (SPADCALL |lcb| |a| (QREFELT $ 59))
                                     (SPADCALL |term| |b| (QREFELT $ 59))
                                     (QREFELT $ 63))
                           . #3#)
                     (LETT |q|
                           (SPADCALL (SPADCALL |lcb| |q| (QREFELT $ 59)) |term|
                                     (QREFELT $ 73))
                           . #3#)
                     (LETT |delta| (- |delta| 1) . #3#)
                     (EXIT
                      (LETT |test|
                            (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43))
                               |db|)
                            . #3#)))
                    NIL (GO G190) G191 (EXIT NIL))
               (EXIT
                (VECTOR |lcb|
                        (PROG1 (LETT #1# |delta| . #3#)
                          (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                                           #1#))
                        |q| |a|))))))))))) 

(DEFUN |NSMP;lazyResidueClass;2$R;25| (|a| |b| $)
  (PROG (|test| |pow| |term| #1=#:G2008 |db| |lrc| |lcb|)
    (RETURN
     (SEQ
      (COND
       ((QEQCAR |b| 0) (|error| " in lazyResidueClass$NSMP: #2 is constant"))
       (#2='T
        (SEQ
         (LETT |lcb| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 14))
               . #3=(|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))
                   . #3#)
             (EXIT
              (VECTOR (|NSMP;PSimp| (QVELT |lrc| 0) (QCAR (QCDR |a|)) $)
                      (QVELT |lrc| 1) (QVELT |lrc| 2)))))
           (#2#
            (SEQ (LETT |db| (SPADCALL (QCDR (QCDR |b|)) (QREFELT $ 12)) . #3#)
                 (LETT |test|
                       (- (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43)) |db|)
                       . #3#)
                 (LETT |pow| 0 . #3#)
                 (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 #1# |test| . #3#)
                                (|check-subtype| (>= #1# 0)
                                                 '(|NonNegativeInteger|) #1#))
                              (QREFELT $ 36))
                             . #3#)
                       (LETT |a|
                             (SPADCALL (SPADCALL |lcb| |a| (QREFELT $ 59))
                                       (SPADCALL |term| |b| (QREFELT $ 59))
                                       (QREFELT $ 63))
                             . #3#)
                       (LETT |pow| (+ |pow| 1) . #3#)
                       (EXIT
                        (LETT |test|
                              (-
                               (SPADCALL |a| (QCAR (QCDR |b|)) (QREFELT $ 43))
                               |db|)
                              . #3#)))
                      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 (#1=#:G2026 |c| |a| #2=#:G2032 #3=#:G2025 |b|)
    (RETURN
     (SEQ
      (EXIT
       (COND ((ZEROP |n|) (|error| "LazardQuotient$NSMP : n = 0"))
             ((EQL |n| 1) |x|)
             ('T
              (SEQ (LETT |a| 1 . #4=(|NSMP;LazardQuotient;2$Nni$;27|))
                   (SEQ G190
                        (COND
                         ((NULL
                           (SEQ
                            (LETT |b| (SPADCALL 2 |a| (QREFELT $ 85)) . #4#)
                            (EXIT (COND ((< |n| |b|) 'NIL) ('T 'T)))))
                          (GO G191)))
                        (SEQ (EXIT (LETT |a| |b| . #4#))) NIL #5=(GO G190) G191
                        (EXIT NIL))
                   (LETT |c| |x| . #4#)
                   (LETT |n|
                         (PROG1 (LETT #3# (- |n| |a|) . #4#)
                           (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|)
                                            #3#))
                         . #4#)
                   (EXIT
                    (SEQ G190 NIL
                         (SEQ
                          (EXIT
                           (COND
                            ((EQL |a| 1) (PROGN (LETT #2# |c| . #4#) (GO #2#)))
                            ('T
                             (SEQ (LETT |a| (QUOTIENT2 |a| 2) . #4#)
                                  (LETT |c|
                                        (|NSMP;exactQuo|
                                         (SPADCALL |c| |c| (QREFELT $ 59)) |y|
                                         $)
                                        . #4#)
                                  (EXIT
                                   (COND
                                    ((NULL (< |n| |a|))
                                     (SEQ
                                      (LETT |c|
                                            (|NSMP;exactQuo|
                                             (SPADCALL |c| |x| (QREFELT $ 59))
                                             |y| $)
                                            . #4#)
                                      (EXIT
                                       (LETT |n|
                                             (PROG1
                                                 (LETT #1# (- |n| |a|) . #4#)
                                               (|check-subtype| (>= #1# 0)
                                                                '(|NonNegativeInteger|)
                                                                #1#))
                                             . #4#)))))))))))
                         NIL #5# G191 (EXIT NIL)))))))
      #2# (EXIT #2#))))) 

(DEFUN |NSMP;LazardQuotient2;3$Nni$;28| (|p| |a| |b| |n| $)
  (PROG (|c| #1=#:G2036)
    (RETURN
     (SEQ
      (COND ((ZEROP |n|) (|error| " in LazardQuotient2$NSMP: bad #4"))
            ((EQL |n| 1) |p|)
            ('T
             (SEQ
              (LETT |c|
                    (SPADCALL |a| |b|
                              (PROG1
                                  (LETT #1# (- |n| 1)
                                        . #2=(|NSMP;LazardQuotient2;3$Nni$;28|))
                                (|check-subtype| (>= #1# 0)
                                                 '(|NonNegativeInteger|) #1#))
                              (QREFELT $ 86))
                    . #2#)
              (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"))
   ((NULL (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 42)))
    (|error| "subResultantGcd$NSMP: mvar(#1) ~= mvar(#2)"))
   ('T
    (|NSMP;PSimp| (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 90))
     (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"))
       ((NULL (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 42)))
        (|error| "halfExtendedSubResultantGcd1$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (SEQ
         (LETT |hesrg|
               (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 93))
               |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"))
       ((NULL (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 42)))
        (|error| "halfExtendedSubResultantGcd2$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (SEQ
         (LETT |hesrg|
               (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 96))
               |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"))
       ((NULL (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 42)))
        (|error| "extendedSubResultantGcd$NSMP: mvar(#1) ~= mvar(#2)"))
       ('T
        (SEQ
         (LETT |esrg|
               (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 99))
               |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"))
   ((NULL (SPADCALL (QCAR (QCDR |a|)) (QCAR (QCDR |b|)) (QREFELT $ 42)))
    (|error| "resultant$NSMP: mvar(#1) ~= mvar(#2)"))
   ('T (SPADCALL (QCDR (QCDR |a|)) (QCDR (QCDR |b|)) (QREFELT $ 101))))) 

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

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

(DEFUN |NSMP;exactQuotient;$R$;37| (|a| |b| $)
  (PROG ()
    (RETURN
     (COND ((SPADCALL |b| (QCDR (|spadConstant| $ 35)) (QREFELT $ 107)) |a|)
           ((QEQCAR |a| 0) (CONS 0 (SPADCALL (QCDR |a|) |b| (QREFELT $ 108))))
           ('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| (|a1| $$)
  (PROG (|b| $)
    (LETT |b| (QREFELT $$ 1) . #1=(|NSMP;exactQuotient;$R$;37|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |a1| |b| (QREFELT $ 109)))))) 

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

(DEFUN |NSMP;exactQuotient!;$R$;38!0| (|a1| $$)
  (PROG (|b| $)
    (LETT |b| (QREFELT $$ 1) . #1=(|NSMP;exactQuotient!;$R$;38|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |a1| |b| (QREFELT $ 110)))))) 

(DEFUN |NSMP;exactQuotient;$R$;39| (|a| |b| $)
  (PROG (#1=#:G2102)
    (RETURN
     (COND ((SPADCALL |b| (QCDR (|spadConstant| $ 35)) (QREFELT $ 107)) |a|)
           ((QEQCAR |a| 0)
            (CONS 0
                  (PROG2
                      (LETT #1# (SPADCALL (QCDR |a|) |b| (QREFELT $ 111))
                            |NSMP;exactQuotient;$R$;39|)
                      (QCDR #1#)
                    (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))))
           ('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| (|a1| $$)
  (PROG (|b| $)
    (LETT |b| (QREFELT $$ 1) . #1=(|NSMP;exactQuotient;$R$;39|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |a1| |b| (QREFELT $ 109)))))) 

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

(DEFUN |NSMP;exactQuotient!;$R$;40!0| (|a1| $$)
  (PROG (|b| $)
    (LETT |b| (QREFELT $$ 1) . #1=(|NSMP;exactQuotient!;$R$;40|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |a1| |b| (QREFELT $ 110)))))) 

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

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

(DEFUN |NSMP;content;$R;43| (|p| $)
  (PROG (|up| |r|)
    (RETURN
     (SEQ
      (COND ((QEQCAR |p| 0) (QCDR |p|))
            ('T
             (SEQ (LETT |up| (QCDR (QCDR |p|)) . #1=(|NSMP;content;$R;43|))
                  (LETT |r| (|spadConstant| $ 77) . #1#)
                  (SEQ G190
                       (COND
                        ((NULL
                          (COND
                           ((OR (SPADCALL |up| (QREFELT $ 115))
                                (SPADCALL |r| (QCDR (|spadConstant| $ 35))
                                          (QREFELT $ 107)))
                            'NIL)
                           ('T 'T)))
                         (GO G191)))
                       (SEQ
                        (LETT |r|
                              (|NSMP;localGcd| |r|
                               (SPADCALL |up| (QREFELT $ 14)) $)
                              . #1#)
                        (EXIT
                         (LETT |up| (SPADCALL |up| (QREFELT $ 24)) . #1#)))
                       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 $ 113))
                    |NSMP;primitivePart!;2$;44|)
              (PROGN
               (RPLACD #1=(QCDR |p|)
                       (SPADCALL
                        (SPADCALL
                         (CONS #'|NSMP;primitivePart!;2$;44!0| (VECTOR $ |cp|))
                         (QCDR (QCDR |p|)) (QREFELT $ 50))
                        (QREFELT $ 116)))
               (QCDR #1#))
              (EXIT |p|)))))))) 

(DEFUN |NSMP;primitivePart!;2$;44!0| (|a1| $$)
  (PROG (|cp| $)
    (LETT |cp| (QREFELT $$ 1) . #1=(|NSMP;primitivePart!;2$;44|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |a1| |cp| (QREFELT $ 110)))))) 

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

(DEFUN |NewSparseMultivariatePolynomial;| (|#1| |#2|)
  (PROG (|pv$| #1=#:G2167 #2=#:G2168 $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #3=(|NewSparseMultivariatePolynomial|))
      (LETT DV$2 (|devaluate| |#2|) . #3#)
      (LETT |dv$| (LIST '|NewSparseMultivariatePolynomial| DV$1 DV$2) . #3#)
      (LETT $ (GETREFV 162) . #3#)
      (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| '(|Comparable|))
                                          (|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 #2#
                                                (|HasCategory| |#2|
                                                               '(|ConvertibleTo|
                                                                 (|Symbol|)))
                                                . #3#)
                                          (AND
                                           (|HasCategory| |#1|
                                                          '(|RetractableTo|
                                                            (|Integer|)))
                                           #2#)
                                          (|HasCategory| |#1| '(|Field|))
                                          (AND
                                           (|HasCategory| |#1|
                                                          '(|Algebra|
                                                            (|Fraction|
                                                             (|Integer|))))
                                           #2#)
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|Algebra|
                                                             (|Fraction|
                                                              (|Integer|))))
                                            #2#)
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|Algebra|
                                                             (|Integer|)))
                                            #2#
                                            (|not|
                                             (|HasCategory| |#1|
                                                            '(|Algebra|
                                                              (|Fraction|
                                                               (|Integer|)))))))
                                          (OR
                                           (AND #2#
                                                (|not|
                                                 (|HasCategory| |#1|
                                                                '(|Algebra|
                                                                  (|Fraction|
                                                                   (|Integer|)))))
                                                (|not|
                                                 (|HasCategory| |#1|
                                                                '(|Algebra|
                                                                  (|Integer|)))))
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|Algebra|
                                                             (|Integer|)))
                                            #2#
                                            (|not|
                                             (|HasCategory| |#1|
                                                            '(|Algebra|
                                                              (|Fraction|
                                                               (|Integer|)))))
                                            (|not|
                                             (|HasCategory| |#1|
                                                            '(|IntegerNumberSystem|))))
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|Algebra|
                                                             (|Fraction|
                                                              (|Integer|))))
                                            #2#
                                            (|not|
                                             (|HasCategory| |#1|
                                                            '(|QuotientFieldCategory|
                                                              (|Integer|))))))
                                          (OR
                                           (|HasCategory| |#1|
                                                          '(|Algebra|
                                                            (|Fraction|
                                                             (|Integer|))))
                                           (|HasCategory| |#1|
                                                          '(|RetractableTo|
                                                            (|Fraction|
                                                             (|Integer|)))))
                                          (LETT #1#
                                                (|HasCategory| |#1|
                                                               '(|GcdDomain|))
                                                . #3#)
                                          (OR
                                           (|HasCategory| |#1|
                                                          '(|CommutativeRing|))
                                           #1#
                                           (|HasCategory| |#1|
                                                          '(|IntegralDomain|))
                                           (|HasCategory| |#1|
                                                          '(|PolynomialFactorizationExplicit|)))
                                          (OR #1#
                                              (|HasCategory| |#1|
                                                             '(|IntegralDomain|))
                                              (|HasCategory| |#1|
                                                             '(|PolynomialFactorizationExplicit|)))
                                          (OR #1#
                                              (|HasCategory| |#1|
                                                             '(|PolynomialFactorizationExplicit|)))))
                      . #3#))
      (|haddProp| |$ConstructorCache| '|NewSparseMultivariatePolynomial|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (AND (|HasCategory| |#1| '(|PolynomialFactorizationExplicit|))
           (|HasCategory| $ '(|CharacteristicNonZero|))
           (|augmentPredVector| $ 268435456))
      (AND
       (OR (|HasCategory| |#1| '(|CharacteristicNonZero|))
           (AND (|HasCategory| |#1| '(|PolynomialFactorizationExplicit|))
                (|HasCategory| $ '(|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 $ 91
                   (CONS (|dispatchFunction| |NSMP;subResultantGcd;3$;30|) $))
         (QSETREFV $ 94
                   (CONS
                    (|dispatchFunction|
                     |NSMP;halfExtendedSubResultantGcd1;2$R;31|)
                    $))
         (QSETREFV $ 97
                   (CONS
                    (|dispatchFunction|
                     |NSMP;halfExtendedSubResultantGcd2;2$R;32|)
                    $))
         (QSETREFV $ 100
                   (CONS
                    (|dispatchFunction| |NSMP;extendedSubResultantGcd;2$R;33|)
                    $))
         (QSETREFV $ 102 (CONS (|dispatchFunction| |NSMP;resultant;3$;34|) $))
         (QSETREFV $ 104
                   (CONS (|dispatchFunction| |NSMP;subResultantChain;2$L;35|)
                         $))
         (QSETREFV $ 106
                   (CONS (|dispatchFunction| |NSMP;lastSubResultant;3$;36|) $))
         (COND
          ((|HasCategory| |#1| '(|EuclideanDomain|))
           (PROGN
            (QSETREFV $ 109
                      (CONS (|dispatchFunction| |NSMP;exactQuotient;$R$;37|)
                            $))
            (QSETREFV $ 110
                      (CONS (|dispatchFunction| |NSMP;exactQuotient!;$R$;38|)
                            $))))
          ('T
           (PROGN
            (QSETREFV $ 109
                      (CONS (|dispatchFunction| |NSMP;exactQuotient;$R$;39|)
                            $))
            (QSETREFV $ 110
                      (CONS (|dispatchFunction| |NSMP;exactQuotient!;$R$;40|)
                            $))))))))
      (COND
       ((|testBitVector| |pv$| 25)
        (PROGN
         (QSETREFV $ 114 (CONS (|dispatchFunction| |NSMP;gcd;R$R;42|) $))
         (QSETREFV $ 113 (CONS (|dispatchFunction| |NSMP;content;$R;43|) $))
         (QSETREFV $ 117
                   (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 . |subResultantGcd|)
              (241 . |subResultantGcd|)
              (|Record| (|:| |gcd| $) (|:| |coef1| $))
              (247 . |halfExtendedSubResultantGcd1|)
              (253 . |halfExtendedSubResultantGcd1|)
              (|Record| (|:| |gcd| $) (|:| |coef2| $))
              (259 . |halfExtendedSubResultantGcd2|)
              (265 . |halfExtendedSubResultantGcd2|)
              (|Record| (|:| |gcd| $) (|:| |coef1| $) (|:| |coef2| $))
              (271 . |extendedSubResultantGcd|)
              (277 . |extendedSubResultantGcd|) (283 . |resultant|)
              (289 . |resultant|) (295 . |subResultantsChain|)
              (301 . |subResultantChain|) (307 . |lastSubResultant|)
              (313 . |lastSubResultant|) (319 . =) (325 . |quo|)
              (331 . |exactQuotient|) (337 . |exactQuotient!|) (343 . |exquo|)
              (349 . |gcd|) (355 . |content|) (360 . |gcd|) (366 . |zero?|)
              (371 . |unitCanonical|) (376 . |primitivePart!|)
              (|Union| 134 '#1="failed") (|Matrix| $) (|Polynomial| 129)
              (|InputForm|) (|Pattern| (|Float|)) (|Pattern| 140)
              (|PatternMatchResult| (|Float|) $) (|PatternMatchResult| 140 $)
              (|String|) (|Polynomial| 140) (|Polynomial| 6) (|Fraction| 140)
              (|SparseUnivariatePolynomial| $) (|Factored| $)
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|Record| (|:| |mat| 135) (|:| |vec| (|Vector| 140)))
              (|Vector| $) (|Matrix| 140) (|Factored| 130) (|Union| 138 '#1#)
              (|List| 130) (|Union| 129 '#2="failed") (|Integer|)
              (|Union| 140 '#2#)
              (|Record| (|:| |coef| $) (|:| |gap| 11) (|:| |remainder| $))
              (|Union| 25 '"failed") (|List| 7)
              (|Record| (|:| |var| 7) (|:| |exponent| 11))
              (|Union| 145 '#3="failed") (|Union| 29 '#3#)
              (|SparseUnivariatePolynomial| 6) (|List| 11) (|Union| 7 '#3#)
              (|Record| (|:| |mat| 152) (|:| |vec| (|Vector| 6))) (|Matrix| 6)
              (|List| 6) (|Equation| $) (|List| 154) (|Mapping| 6 6)
              (|IndexedExponents| 7) (|Union| 6 '#2#) (|Mapping| 157 157)
              (|OutputForm|) (|SingleInteger|))
           '#(|zero?| 381 |tail| 386 |subResultantGcd| 391 |subResultantChain|
              397 |retractIfCan| 403 |resultant| 408 |pseudoDivide| 414
              |primitivePart!| 420 |prem| 425 |pquo| 431 |nextsubResultant2|
              437 |mvar| 445 |monomial| 450 |monicModulo| 457 |mdeg| 463
              |mainMonomial| 468 |mainCoefficients| 473 |leastMonomial| 478
              |leadingCoefficient| 483 |lazyResidueClass| 489
              |lazyPseudoDivide| 495 |lazyPrem| 501 |lazyPquo| 507
              |lastSubResultant| 513 |iteratedInitials| 519 |init| 524 |head|
              529 |halfExtendedSubResultantGcd2| 534
              |halfExtendedSubResultantGcd1| 540 |ground?| 546 |ground| 551
              |gcd| 556 |extendedSubResultantGcd| 562 |exquo| 568
              |exactQuotient!| 574 |exactQuotient| 580 |degree| 586
              |deepestInitial| 592 |content| 597 |coerce| 602 |coefficient| 612
              ^ 619 |Zero| 625 |One| 629 |LazardQuotient2| 633 |LazardQuotient|
              641 = 648 - 654 + 660 * 666)
           '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 NIL |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| 129) (|Algebra| 6)
                 (|PartialDifferentialRing| 7) (|LinearlyExplicitRingOver| 6)
                 (|CommutativeRing|) (|Module| $$) (|EntireRing|)
                 (|LinearlyExplicitRingOver| 140) (|Module| 129)
                 (|CharacteristicNonZero|) (|CharacteristicZero|) (|Module| 6)
                 (|BiModule| 6 6) (|Ring|) (|BiModule| $$ $$)
                 (|BiModule| 129 129) (|LeftModule| 6) (|Rng|)
                 (|RightModule| 6) (|LeftModule| $$) (|RightModule| $$)
                 (|LeftModule| 129) (|RightModule| 129) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|SemiRing|) (|AbelianMonoid|)
                 (|Monoid|) (|SemiRng|) (|SemiGroup|) (|AbelianSemiGroup|)
                 (|PatternMatchable| (|Float|)) (|PatternMatchable| 140)
                 (|Comparable|) (|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| 160) (|CommutativeStar|) (|noZeroDivisors|)
                 (|canonicalUnitNormal|) (|ConvertibleTo| 122)
                 (|ConvertibleTo| 123) (|ConvertibleTo| 121)
                 (|RetractableTo| 140) (|RetractableTo| 129)
                 (|ConvertibleTo| 126) (|ConvertibleTo| (|Polynomial| 6))
                 (|CoercibleTo| (|Polynomial| 6)))
              (|makeByteWordVec2| 117
                                  '(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 8 0 0 0 90 2 0 0 0 0 91
                                    2 8 92 0 0 93 2 0 92 0 0 94 2 8 95 0 0 96 2
                                    0 95 0 0 97 2 8 98 0 0 99 2 0 98 0 0 100 2
                                    8 2 0 0 101 2 0 0 0 0 102 2 8 29 0 0 103 2
                                    0 29 0 0 104 2 8 0 0 0 105 2 0 0 0 0 106 2
                                    6 25 0 0 107 2 6 0 0 0 108 2 0 0 0 6 109 2
                                    0 0 0 6 110 2 6 56 0 0 111 2 6 0 0 0 112 1
                                    0 6 0 113 2 0 6 6 0 114 1 8 25 0 115 1 8 0
                                    0 116 1 0 0 0 117 1 0 25 0 34 1 0 0 0 28 2
                                    3 0 0 0 91 2 3 29 0 0 104 1 0 17 0 18 2 3 0
                                    0 0 102 2 0 68 0 0 69 1 25 0 0 117 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 106 1 0 29 0 30 1 0
                                    0 0 21 1 0 0 0 23 2 3 95 0 0 97 2 3 92 0 0
                                    94 1 0 25 0 52 1 0 6 0 55 2 25 6 6 0 114 2
                                    3 98 0 0 100 2 3 56 0 0 83 2 3 0 0 6 110 2
                                    3 0 0 6 109 2 0 11 0 7 43 1 0 0 0 33 1 25 6
                                    0 113 1 0 5 0 15 1 0 0 5 16 3 0 0 0 7 11 44
                                    2 0 0 0 11 61 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 6 0 58 2 0 0 0 0
                                    59)))))
           '|lookupIncomplete|)) 
