
(/VERSIONCHECK 2) 

(DEFUN |GBINTERN;virtualDegree;DpolNni;1| (|p| $) (SPADCALL |p| (QREFELT $ 11))) 

(PUT '|GBINTERN;virtualDegree;DpolNni;2| '|SPADreplace| '(XLAM (|p|) 0)) 

(DEFUN |GBINTERN;virtualDegree;DpolNni;2| (|p| $) 0) 

(DEFUN |GBINTERN;critpOrder;2RB;3| (|cp1| |cp2| $)
  (COND ((< (QVELT |cp1| 1) (QVELT |cp2| 1)) 'T)
        ((< (QVELT |cp2| 1) (QVELT |cp1| 1)) 'NIL)
        ('T (SPADCALL (QVELT |cp1| 0) (QVELT |cp2| 0) (QREFELT $ 14))))) 

(DEFUN |GBINTERN;makeCrit;RDpolNniR;4| (|sp1| |p2| |totdeg2| $)
  (PROG (|tdeg| |e2| #1=#:G686 |e1| |deg| |p1|)
    (RETURN
     (SEQ (LETT |p1| (QCDR |sp1|) . #2=(|GBINTERN;makeCrit;RDpolNniR;4|))
          (LETT |deg|
                (SPADCALL (SPADCALL |p1| (QREFELT $ 17))
                          (SPADCALL |p2| (QREFELT $ 17)) (QREFELT $ 18))
                . #2#)
          (LETT |e1|
                (PROG2
                    (LETT #1#
                          (SPADCALL |deg| (SPADCALL |p1| (QREFELT $ 17))
                                    (QREFELT $ 20))
                          . #2#)
                    (QCDR #1#)
                  (|check-union| (QEQCAR #1# 0) (QREFELT $ 7) #1#))
                . #2#)
          (LETT |e2|
                (PROG2
                    (LETT #1#
                          (SPADCALL |deg| (SPADCALL |p2| (QREFELT $ 17))
                                    (QREFELT $ 20))
                          . #2#)
                    (QCDR #1#)
                  (|check-union| (QEQCAR #1# 0) (QREFELT $ 7) #1#))
                . #2#)
          (LETT |tdeg|
                (MAX
                 (+ (QCAR |sp1|)
                    (SPADCALL
                     (SPADCALL (|spadConstant| $ 21) |e1| (QREFELT $ 23))
                     (QREFELT $ 12)))
                 (+ |totdeg2|
                    (SPADCALL
                     (SPADCALL (|spadConstant| $ 21) |e2| (QREFELT $ 23))
                     (QREFELT $ 12))))
                . #2#)
          (EXIT (VECTOR |deg| |tdeg| |p1| |p2|)))))) 

(DEFUN |GBINTERN;gbasis;L2IL;5| (|Pol| |xx1| |xx2| $)
  (PROG (#1=#:G728 |x| #2=#:G727 |xx| |redPols| |basPols| D D1 #3=#:G726
         #4=#:G725 #5=#:G716 |h| |s| D0 #6=#:G724 #7=#:G723 #8=#:G722 #9=#:G721
         |toth| |Pol1|)
    (RETURN
     (SEQ
      (LETT |Pol1|
            (SPADCALL (CONS #'|GBINTERN;gbasis;L2IL;5!0| $) |Pol|
                      (QREFELT $ 28))
            . #10=(|GBINTERN;gbasis;L2IL;5|))
      (LETT |basPols|
            (SPADCALL (SPADCALL (|SPADfirst| |Pol1|) (QREFELT $ 29))
                      (SPADCALL (|SPADfirst| |Pol1|) (QREFELT $ 12)) NIL
                      (QREFELT $ 31))
            . #10#)
      (LETT |Pol1| (CDR |Pol1|) . #10#) (LETT D NIL . #10#)
      (SEQ G190
           (COND ((NULL (COND ((NULL |Pol1|) 'NIL) ('T 'T))) #11=(GO G191)))
           (SEQ
            (LETT |h| (SPADCALL (|SPADfirst| |Pol1|) (QREFELT $ 29)) . #10#)
            (LETT |Pol1| (CDR |Pol1|) . #10#)
            (LETT |toth| (SPADCALL |h| (QREFELT $ 12)) . #10#)
            (LETT D1
                  (PROGN
                   (LETT #9# NIL . #10#)
                   (SEQ (LETT |x| NIL . #10#) (LETT #8# |basPols| . #10#) G190
                        (COND
                         ((OR (ATOM #8#)
                              (PROGN (LETT |x| (CAR #8#) . #10#) NIL))
                          #11#))
                        (SEQ
                         (EXIT
                          (LETT #9#
                                (CONS (SPADCALL |x| |h| |toth| (QREFELT $ 25))
                                      #9#)
                                . #10#)))
                        (LETT #8# (CDR #8#) . #10#) #12=(GO G190) G191
                        (EXIT (NREVERSE0 #9#))))
                  . #10#)
            (LETT D
                  (SPADCALL
                   (SPADCALL (SPADCALL (ELT $ 16) D1 (QREFELT $ 34))
                             (QREFELT $ 35))
                   (SPADCALL |h| D (QREFELT $ 36)) (QREFELT $ 37))
                  . #10#)
            (EXIT
             (LETT |basPols| (SPADCALL |h| |toth| |basPols| (QREFELT $ 31))
                   . #10#)))
           NIL #12# G191 (EXIT NIL))
      (LETT D (SPADCALL (ELT $ 16) D (QREFELT $ 34)) . #10#)
      (LETT |xx| |xx2| . #10#)
      (LETT |redPols|
            (PROGN
             (LETT #7# NIL . #10#)
             (SEQ (LETT |x| NIL . #10#) (LETT #6# |basPols| . #10#) G190
                  (COND
                   ((OR (ATOM #6#) (PROGN (LETT |x| (CAR #6#) . #10#) NIL))
                    #11#))
                  (SEQ (EXIT (LETT #7# (CONS (QCDR |x|) #7#) . #10#)))
                  (LETT #6# (CDR #6#) . #10#) #12# G191
                  (EXIT (NREVERSE0 #7#))))
            . #10#)
      (SEQ
       (EXIT
        (SEQ G190 (COND ((NULL (COND ((NULL D) 'NIL) ('T 'T))) #11#))
             (SEQ (LETT D0 (|SPADfirst| D) . #10#)
                  (LETT |s|
                        (SPADCALL (SPADCALL D0 (QREFELT $ 38)) (QREFELT $ 29))
                        . #10#)
                  (LETT D (CDR D) . #10#)
                  (LETT |h|
                        (SPADCALL (SPADCALL |s| |redPols| (QREFELT $ 39))
                                  (QREFELT $ 29))
                        . #10#)
                  (COND ((EQL |xx1| 1) (SPADCALL |h| (QREFELT $ 41))))
                  (EXIT
                   (COND
                    ((SPADCALL |h| (|spadConstant| $ 44) (QREFELT $ 45))
                     (SEQ
                      (COND
                       ((EQL |xx2| 1)
                        (SEQ
                         (SPADCALL D0 |s| |h| (LENGTH |basPols|) (LENGTH D)
                                   |xx| (QREFELT $ 47))
                         (EXIT (LETT |xx| 2 . #10#)))))
                      (EXIT " go to top of while ")))
                    ((SPADCALL (SPADCALL |h| (QREFELT $ 17))
                               (|spadConstant| $ 43) (QREFELT $ 48))
                     (SEQ (LETT D NIL . #10#)
                          (COND
                           ((EQL |xx2| 1)
                            (SEQ
                             (SPADCALL D0 |s| |h| (LENGTH |basPols|) (LENGTH D)
                                       |xx| (QREFELT $ 47))
                             (EXIT (LETT |xx| 2 . #10#)))))
                          (LETT |basPols| (SPADCALL |h| 0 NIL (QREFELT $ 31))
                                . #10#)
                          (EXIT
                           (PROGN (LETT #5# "out of while" . #10#) (GO #5#)))))
                    ('T
                     (SEQ
                      (LETT D1
                            (PROGN
                             (LETT #4# NIL . #10#)
                             (SEQ (LETT |x| NIL . #10#)
                                  (LETT #3# |basPols| . #10#) G190
                                  (COND
                                   ((OR (ATOM #3#)
                                        (PROGN
                                         (LETT |x| (CAR #3#) . #10#)
                                         NIL))
                                    #11#))
                                  (SEQ
                                   (EXIT
                                    (LETT #4#
                                          (CONS
                                           (SPADCALL |x| |h| (QVELT D0 1)
                                                     (QREFELT $ 25))
                                           #4#)
                                          . #10#)))
                                  (LETT #3# (CDR #3#) . #10#) #12# G191
                                  (EXIT (NREVERSE0 #4#))))
                            . #10#)
                      (LETT D
                            (SPADCALL
                             (SPADCALL (SPADCALL (ELT $ 16) D1 (QREFELT $ 34))
                                       (QREFELT $ 35))
                             (SPADCALL |h| D (QREFELT $ 36)) (QREFELT $ 37))
                            . #10#)
                      (LETT |basPols|
                            (SPADCALL |h| (QVELT D0 1) |basPols|
                                      (QREFELT $ 31))
                            . #10#)
                      (LETT |redPols| (SPADCALL |redPols| |h| (QREFELT $ 49))
                            . #10#)
                      (EXIT
                       (COND
                        ((EQL |xx2| 1)
                         (SEQ
                          (SPADCALL D0 |s| |h| (LENGTH |basPols|) (LENGTH D)
                                    |xx| (QREFELT $ 47))
                          (EXIT (LETT |xx| 2 . #10#)))))))))))
             NIL #12# G191 (EXIT NIL)))
       #5# (EXIT #5#))
      (LETT |Pol|
            (PROGN
             (LETT #2# NIL . #10#)
             (SEQ (LETT |x| NIL . #10#) (LETT #1# |basPols| . #10#) G190
                  (COND
                   ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) . #10#) NIL))
                    #11#))
                  (SEQ (EXIT (LETT #2# (CONS (QCDR |x|) #2#) . #10#)))
                  (LETT #1# (CDR #1#) . #10#) #12# G191
                  (EXIT (NREVERSE0 #2#))))
            . #10#)
      (COND
       ((EQL |xx2| 1)
        (SEQ (SPADCALL |Pol| (QREFELT $ 50))
             (EXIT
              (SPADCALL "    THE GROEBNER BASIS POLYNOMIALS"
                        (QREFELT $ 53))))))
      (COND
       ((EQL |xx1| 1)
        (COND
         ((NULL (EQL |xx2| 1))
          (SPADCALL "    THE GROEBNER BASIS POLYNOMIALS" (QREFELT $ 53))))))
      (EXIT |Pol|))))) 

(DEFUN |GBINTERN;gbasis;L2IL;5!0| (|z1| |z2| $)
  (SPADCALL (SPADCALL |z2| (QREFELT $ 17)) (SPADCALL |z1| (QREFELT $ 17))
            (QREFELT $ 14))) 

(DEFUN |GBINTERN;critMonD1;Expon2L;6| (|e| D2 $)
  (PROG (|x|)
    (RETURN
     (SEQ
      (COND ((NULL D2) NIL)
            (#1='T
             (SEQ (LETT |x| (|SPADfirst| D2) |GBINTERN;critMonD1;Expon2L;6|)
                  (EXIT
                   (COND
                    ((SPADCALL |e| (QVELT |x| 0) (QREFELT $ 55))
                     (SPADCALL |e| (CDR D2) (QREFELT $ 56)))
                    (#1#
                     (CONS |x| (SPADCALL |e| (CDR D2) (QREFELT $ 56))))))))))))) 

(DEFUN |GBINTERN;critMTonD1;2L;7| (D1 $)
  (PROG (|r1| |e1| |cT1| |s1| |f1|)
    (RETURN
     (SEQ
      (COND ((NULL D1) NIL)
            (#1='T
             (SEQ
              (LETT |f1| (|SPADfirst| D1) . #2=(|GBINTERN;critMTonD1;2L;7|))
              (LETT |s1| (LENGTH D1) . #2#)
              (LETT |cT1| (SPADCALL |f1| (QREFELT $ 57)) . #2#)
              (COND ((EQL |s1| 1) (COND (|cT1| (EXIT NIL)))))
              (EXIT
               (COND ((EQL |s1| 1) D1)
                     (#1#
                      (SEQ (LETT |e1| (QVELT |f1| 0) . #2#)
                           (LETT |r1| (CDR D1) . #2#)
                           (EXIT
                            (COND
                             ((SPADCALL |e1| (QVELT (|SPADfirst| |r1|) 0)
                                        (QREFELT $ 48))
                              (COND
                               (|cT1|
                                (SPADCALL (CONS |f1| (CDR |r1|))
                                          (QREFELT $ 35)))
                               (#1# (SPADCALL |r1| (QREFELT $ 35)))))
                             (#1#
                              (SEQ
                               (LETT D1 (SPADCALL |e1| |r1| (QREFELT $ 56))
                                     . #2#)
                               (EXIT
                                (COND (|cT1| (SPADCALL D1 (QREFELT $ 35)))
                                      (#1#
                                       (CONS |f1|
                                             (SPADCALL D1
                                                       (QREFELT $
                                                                35))))))))))))))))))))) 

(DEFUN |GBINTERN;critBonD;Dpol2L;8| (|h| D $)
  (PROG (|x|)
    (RETURN
     (SEQ
      (COND ((NULL D) NIL)
            (#1='T
             (SEQ (LETT |x| (|SPADfirst| D) |GBINTERN;critBonD;Dpol2L;8|)
                  (EXIT
                   (COND
                    ((SPADCALL (SPADCALL |h| (QREFELT $ 17)) (QVELT |x| 0)
                               (SPADCALL (QVELT |x| 2) (QREFELT $ 17))
                               (SPADCALL (QVELT |x| 3) (QREFELT $ 17))
                               (QREFELT $ 58))
                     (SPADCALL |h| (CDR D) (QREFELT $ 36)))
                    (#1#
                     (CONS |x| (SPADCALL |h| (CDR D) (QREFELT $ 36))))))))))))) 

(DEFUN |GBINTERN;updatF;DpolNni2L;9| (|h| |deg| F $)
  (PROG (|f1|)
    (RETURN
     (SEQ
      (COND ((NULL F) (LIST (CONS |deg| |h|)))
            (#1='T
             (SEQ (LETT |f1| (|SPADfirst| F) |GBINTERN;updatF;DpolNni2L;9|)
                  (EXIT
                   (COND
                    ((SPADCALL (SPADCALL |h| (QREFELT $ 17))
                               (SPADCALL (QCDR |f1|) (QREFELT $ 17))
                               (QREFELT $ 55))
                     (SPADCALL |h| |deg| (CDR F) (QREFELT $ 31)))
                    (#1#
                     (CONS |f1|
                           (SPADCALL |h| |deg| (CDR F)
                                     (QREFELT $ 31))))))))))))) 

(DEFUN |GBINTERN;updatD;3L;10| (D1 D2 $)
  (PROG (|dl2| |dl1|)
    (RETURN
     (SEQ
      (COND ((NULL D1) D2) ((NULL D2) D1)
            (#1='T
             (SEQ (LETT |dl1| (|SPADfirst| D1) . #2=(|GBINTERN;updatD;3L;10|))
                  (LETT |dl2| (|SPADfirst| D2) . #2#)
                  (EXIT
                   (COND
                    ((SPADCALL |dl1| |dl2| (QREFELT $ 16))
                     (CONS |dl1| (SPADCALL (CDR D1) D2 (QREFELT $ 37))))
                    (#1#
                     (CONS |dl2|
                           (SPADCALL D1 (CDR D2) (QREFELT $ 37))))))))))))) 

(DEFUN |GBINTERN;gcdCo| (|c1| |c2| $)
  (PROG (#1=#:G749 |d|)
    (RETURN
     (SEQ
      (LETT |d| (SPADCALL |c1| |c2| (QREFELT $ 59)) . #2=(|GBINTERN;gcdCo|))
      (EXIT
       (CONS
        (PROG2
            (LETT #1# (SPADCALL |c1| |d| (QREFELT $ 60)) . #2#)
            (QCDR #1#)
          (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))
        (PROG2
            (LETT #1# (SPADCALL |c2| |d| (QREFELT $ 60)) . #2#)
            (QCDR #1#)
          (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#)))))))) 

(DEFUN |GBINTERN;sPol;RDpol;12| (|p| $)
  (PROG (#1=#:G755 |cc| |fj| |fi| |Tij|)
    (RETURN
     (SEQ (LETT |Tij| (QVELT |p| 0) . #2=(|GBINTERN;sPol;RDpol;12|))
          (LETT |fi| (QVELT |p| 2) . #2#) (LETT |fj| (QVELT |p| 3) . #2#)
          (LETT |cc|
                (|GBINTERN;gcdCo| (SPADCALL |fi| (QREFELT $ 61))
                 (SPADCALL |fj| (QREFELT $ 61)) $)
                . #2#)
          (EXIT
           (SPADCALL
            (SPADCALL (SPADCALL |fi| (QREFELT $ 62))
                      (SPADCALL (QCDR |cc|)
                                (PROG2
                                    (LETT #1#
                                          (SPADCALL |Tij|
                                                    (SPADCALL |fi|
                                                              (QREFELT $ 17))
                                                    (QREFELT $ 20))
                                          . #2#)
                                    (QCDR #1#)
                                  (|check-union| (QEQCAR #1# 0) (QREFELT $ 7)
                                                 #1#))
                                (QREFELT $ 23))
                      (QREFELT $ 63))
            (SPADCALL (SPADCALL |fj| (QREFELT $ 62))
                      (SPADCALL (QCAR |cc|)
                                (PROG2
                                    (LETT #1#
                                          (SPADCALL |Tij|
                                                    (SPADCALL |fj|
                                                              (QREFELT $ 17))
                                                    (QREFELT $ 20))
                                          . #2#)
                                    (QCDR #1#)
                                  (|check-union| (QEQCAR #1# 0) (QREFELT $ 7)
                                                 #1#))
                                (QREFELT $ 23))
                      (QREFELT $ 63))
            (QREFELT $ 64))))))) 

(DEFUN |GBINTERN;redPo;DpolLR;13| (|s| F $)
  (PROG (|m| |cc| |e| |s1| |f1| |Fh|)
    (RETURN
     (SEQ (LETT |m| (|spadConstant| $ 21) . #1=(|GBINTERN;redPo;DpolLR;13|))
          (LETT |Fh| F . #1#)
          (SEQ G190
               (COND
                ((NULL
                  (COND
                   ((OR (SPADCALL |s| (|spadConstant| $ 44) (QREFELT $ 45))
                        (NULL F))
                    'NIL)
                   ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |f1| (|SPADfirst| F) . #1#)
                    (LETT |s1| (SPADCALL |s| (QREFELT $ 17)) . #1#)
                    (LETT |e|
                          (SPADCALL |s1| (SPADCALL |f1| (QREFELT $ 17))
                                    (QREFELT $ 20))
                          . #1#)
                    (EXIT
                     (COND
                      ((QEQCAR |e| 0)
                       (SEQ
                        (LETT |cc|
                              (|GBINTERN;gcdCo| (SPADCALL |f1| (QREFELT $ 61))
                               (SPADCALL |s| (QREFELT $ 61)) $)
                              . #1#)
                        (LETT |s|
                              (SPADCALL
                               (SPADCALL (QCAR |cc|)
                                         (SPADCALL |s| (QREFELT $ 62))
                                         (QREFELT $ 65))
                               (SPADCALL
                                (SPADCALL (QCDR |cc|) (QCDR |e|)
                                          (QREFELT $ 23))
                                (SPADCALL |f1| (QREFELT $ 62)) (QREFELT $ 63))
                               (QREFELT $ 64))
                              . #1#)
                        (LETT |m| (SPADCALL |m| (QCAR |cc|) (QREFELT $ 66))
                              . #1#)
                        (EXIT (LETT F |Fh| . #1#))))
                      ('T (LETT F (CDR F) . #1#)))))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT (CONS |s| |m|)))))) 

(DEFUN |GBINTERN;redPol;DpolLDpol;14| (|s| F $)
  (SPADCALL (QCAR (SPADCALL |s| F (QREFELT $ 68))) F (QREFELT $ 69))) 

(DEFUN |GBINTERN;critT;RB;15| (|p| $)
  (SPADCALL (QVELT |p| 0)
            (SPADCALL (SPADCALL (QVELT |p| 2) (QREFELT $ 17))
                      (SPADCALL (QVELT |p| 3) (QREFELT $ 17)) (QREFELT $ 70))
            (QREFELT $ 48))) 

(DEFUN |GBINTERN;critM;2ExponB;16| (|e1| |e2| $)
  (PROG (|en|)
    (RETURN
     (QEQCAR
      (LETT |en| (SPADCALL |e2| |e1| (QREFELT $ 20))
            |GBINTERN;critM;2ExponB;16|)
      0)))) 

(DEFUN |GBINTERN;critB;4ExponB;17| (|eh| |eik| |ei| |ek| $)
  (COND
   ((SPADCALL |eh| |eik| (QREFELT $ 55))
    (COND
     ((OR (SPADCALL |eik| (SPADCALL |eh| |ei| (QREFELT $ 18)) (QREFELT $ 48))
          (SPADCALL |eik| (SPADCALL |eh| |ek| (QREFELT $ 18)) (QREFELT $ 48)))
      'NIL)
     ('T 'T)))
   ('T 'NIL))) 

(DEFUN |GBINTERN;hMonic;2Dpol;18| (|p| $)
  (COND ((SPADCALL |p| (|spadConstant| $ 44) (QREFELT $ 45)) |p|)
        ('T (SPADCALL |p| (QREFELT $ 71))))) 

(DEFUN |GBINTERN;credPol;DpolLDpol;19| (|h| F $)
  (PROG (|h0| |hred|)
    (RETURN
     (SEQ
      (COND ((NULL F) |h|)
            ('T
             (SEQ
              (LETT |h0|
                    (SPADCALL (SPADCALL |h| (QREFELT $ 61))
                              (SPADCALL |h| (QREFELT $ 17)) (QREFELT $ 23))
                    . #1=(|GBINTERN;credPol;DpolLDpol;19|))
              (SEQ G190
                   (COND
                    ((NULL
                      (SEQ (LETT |h| (SPADCALL |h| (QREFELT $ 62)) . #1#)
                           (EXIT
                            (COND
                             ((SPADCALL |h| (|spadConstant| $ 44)
                                        (QREFELT $ 45))
                              'NIL)
                             ('T 'T)))))
                     (GO G191)))
                   (SEQ (LETT |hred| (SPADCALL |h| F (QREFELT $ 68)) . #1#)
                        (LETT |h| (QCAR |hred|) . #1#)
                        (EXIT
                         (LETT |h0|
                               (SPADCALL
                                (SPADCALL (QCDR |hred|) |h0| (QREFELT $ 65))
                                (SPADCALL (SPADCALL |h| (QREFELT $ 61))
                                          (SPADCALL |h| (QREFELT $ 17))
                                          (QREFELT $ 23))
                                (QREFELT $ 72))
                               . #1#)))
                   NIL (GO G190) G191 (EXIT NIL))
              (EXIT |h0|)))))))) 

(DEFUN |GBINTERN;minGbasis;2L;20| (F $)
  (PROG (|newbas|)
    (RETURN
     (SEQ
      (COND ((NULL F) NIL)
            ('T
             (SEQ
              (LETT |newbas| (SPADCALL (CDR F) (QREFELT $ 73))
                    |GBINTERN;minGbasis;2L;20|)
              (EXIT
               (CONS
                (SPADCALL (SPADCALL (|SPADfirst| F) |newbas| (QREFELT $ 69))
                          (QREFELT $ 29))
                |newbas|))))))))) 

(DEFUN |GBINTERN;lepol;DpolI;21| (|p1| $)
  (PROG (|n|)
    (RETURN
     (SEQ (LETT |n| 0 . #1=(|GBINTERN;lepol;DpolI;21|))
          (SEQ G190
               (COND
                ((NULL
                  (COND
                   ((SPADCALL |p1| (|spadConstant| $ 44) (QREFELT $ 45)) 'NIL)
                   ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |n| (+ |n| 1) . #1#)
                    (EXIT (LETT |p1| (SPADCALL |p1| (QREFELT $ 62)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |n|))))) 

(DEFUN |GBINTERN;prinb;IV;22| (|n| $)
  (PROG (|x|)
    (RETURN
     (SEQ (LETT |x| 1 . #1=(|GBINTERN;prinb;IV;22|)) G190
          (COND ((QSGREATERP |x| |n|) (GO G191)))
          (SEQ (EXIT (SPADCALL "    " (QREFELT $ 53))))
          (LETT |x| (QSADD1 |x|) . #1#) (GO G190) G191 (EXIT NIL))))) 

(DEFUN |GBINTERN;prinshINFO;DpolV;23| (|h| $)
  (SEQ (SPADCALL 2 (QREFELT $ 75))
       (SPADCALL " reduced Critpair - Polynom :" (QREFELT $ 53))
       (SPADCALL 2 (QREFELT $ 75))
       (SPADCALL (SPADCALL |h| (QREFELT $ 76)) (QREFELT $ 77))
       (EXIT (SPADCALL 2 (QREFELT $ 75))))) 

(DEFUN |GBINTERN;prindINFO;R2Dpol4I;24| (|cp| |ps| |ph| |i1| |i2| |n| $)
  (PROG (|ll| |a| |cpj| |cpi|)
    (RETURN
     (SEQ (LETT |cpi| (QVELT |cp| 2) . #1=(|GBINTERN;prindINFO;R2Dpol4I;24|))
          (LETT |cpj| (QVELT |cp| 3) . #1#)
          (COND
           ((EQL |n| 1)
            (SEQ (SPADCALL 1 (QREFELT $ 75))
                 (SPADCALL "you choose option  -info-  " (QREFELT $ 53))
                 (SPADCALL "abbrev. for the following information strings are"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  ci  =>  Leading monomial  for critpair calculation"
                  (QREFELT $ 53))
                 (SPADCALL "  tci =>  Number of terms of polynomial i"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  cj  =>  Leading monomial  for critpair calculation"
                  (QREFELT $ 53))
                 (SPADCALL "  tcj =>  Number of terms of polynomial j"
                           (QREFELT $ 53))
                 (SPADCALL "  c   =>  Leading monomial of critpair polynomial"
                           (QREFELT $ 53))
                 (SPADCALL "  tc  =>  Number of terms of critpair polynomial"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  rc  =>  Leading monomial of redcritpair polynomial"
                  (QREFELT $ 53))
                 (SPADCALL
                  "  trc =>  Number of terms of redcritpair polynomial"
                  (QREFELT $ 53))
                 (SPADCALL
                  "  tF  =>  Number of polynomials in reduction list F"
                  (QREFELT $ 53))
                 (SPADCALL "  tD  =>  Number of critpairs still to do"
                           (QREFELT $ 53))
                 (SPADCALL 4 (QREFELT $ 75)) (EXIT (LETT |n| 2 . #1#)))))
          (SPADCALL 1 (QREFELT $ 75)) (LETT |a| (|spadConstant| $ 21) . #1#)
          (EXIT
           (COND
            ((SPADCALL |ph| (|spadConstant| $ 44) (QREFELT $ 45))
             (COND
              ((SPADCALL |ps| (|spadConstant| $ 44) (QREFELT $ 45))
               (SEQ
                (LETT |ll|
                      (LIST
                       (VECTOR
                        (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpi| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpj| (QREFELT $ 74)) |ps| 0 |ph| 0 |i1|
                        |i2|))
                      . #1#)
                (SPADCALL (SPADCALL |ll| (QREFELT $ 80)) (QREFELT $ 77))
                (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))
              (#2='T
               (SEQ
                (LETT |ll|
                      (LIST
                       (VECTOR
                        (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpi| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpj| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |ps| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |ps| (QREFELT $ 74)) |ph| 0 |i1| |i2|))
                      . #1#)
                (SPADCALL (SPADCALL |ll| (QREFELT $ 80)) (QREFELT $ 77))
                (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))))
            (#2#
             (SEQ
              (LETT |ll|
                    (LIST
                     (VECTOR
                      (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |cpi| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |cpj| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |ps| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |ps| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |ph| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |ph| (QREFELT $ 74)) |i1| |i2|))
                    . #1#)
              (SPADCALL (SPADCALL |ll| (QREFELT $ 80)) (QREFELT $ 77))
              (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|))))))))) 

(DEFUN |GBINTERN;prinpolINFO;LV;25| (|pl| $)
  (PROG (|n|)
    (RETURN
     (SEQ (LETT |n| (LENGTH |pl|) |GBINTERN;prinpolINFO;LV;25|)
          (SPADCALL 1 (QREFELT $ 75))
          (EXIT
           (COND
            ((EQL |n| 1)
             (SEQ
              (SPADCALL "  There is 1  Groebner Basis Polynomial "
                        (QREFELT $ 53))
              (EXIT (SPADCALL 2 (QREFELT $ 75)))))
            ('T
             (SEQ (SPADCALL "  There are " (QREFELT $ 53))
                  (SPADCALL 1 (QREFELT $ 75))
                  (SPADCALL (SPADCALL |n| (QREFELT $ 81)) (QREFELT $ 77))
                  (SPADCALL 1 (QREFELT $ 75))
                  (SPADCALL "  Groebner Basis Polynomials. " (QREFELT $ 53))
                  (EXIT (SPADCALL 2 (QREFELT $ 75))))))))))) 

(DEFUN |GBINTERN;fprindINFO;R2Dpol5I;26| (|cp| |ps| |ph| |i1| |i2| |i3| |n| $)
  (PROG (|ll| |a| |cpj| |cpi|)
    (RETURN
     (SEQ (LETT |cpi| (QVELT |cp| 2) . #1=(|GBINTERN;fprindINFO;R2Dpol5I;26|))
          (LETT |cpj| (QVELT |cp| 3) . #1#)
          (COND
           ((EQL |n| 1)
            (SEQ (SPADCALL 1 (QREFELT $ 75))
                 (SPADCALL "you choose option  -info-  " (QREFELT $ 53))
                 (SPADCALL "abbrev. for the following information strings are"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  ci  =>  Leading monomial  for critpair calculation"
                  (QREFELT $ 53))
                 (SPADCALL "  tci =>  Number of terms of polynomial i"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  cj  =>  Leading monomial  for critpair calculation"
                  (QREFELT $ 53))
                 (SPADCALL "  tcj =>  Number of terms of polynomial j"
                           (QREFELT $ 53))
                 (SPADCALL "  c   =>  Leading monomial of critpair polynomial"
                           (QREFELT $ 53))
                 (SPADCALL "  tc  =>  Number of terms of critpair polynomial"
                           (QREFELT $ 53))
                 (SPADCALL
                  "  rc  =>  Leading monomial of redcritpair polynomial"
                  (QREFELT $ 53))
                 (SPADCALL
                  "  trc =>  Number of terms of redcritpair polynomial"
                  (QREFELT $ 53))
                 (SPADCALL
                  "  tF  =>  Number of polynomials in reduction list F"
                  (QREFELT $ 53))
                 (SPADCALL "  tD  =>  Number of critpairs still to do"
                           (QREFELT $ 53))
                 (SPADCALL "  tDF =>  Number of subproblems still to do"
                           (QREFELT $ 53))
                 (SPADCALL 4 (QREFELT $ 75)) (EXIT (LETT |n| 2 . #1#)))))
          (SPADCALL 1 (QREFELT $ 75)) (LETT |a| (|spadConstant| $ 21) . #1#)
          (EXIT
           (COND
            ((SPADCALL |ph| (|spadConstant| $ 44) (QREFELT $ 45))
             (COND
              ((SPADCALL |ps| (|spadConstant| $ 44) (QREFELT $ 45))
               (SEQ
                (LETT |ll|
                      (LIST
                       (VECTOR
                        (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpi| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpj| (QREFELT $ 74)) |ps| 0 |ph| 0 |i1| |i2|
                        |i3|))
                      . #1#)
                (SPADCALL (SPADCALL |ll| (QREFELT $ 84)) (QREFELT $ 77))
                (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))
              (#2='T
               (SEQ
                (LETT |ll|
                      (LIST
                       (VECTOR
                        (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpi| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |cpj| (QREFELT $ 74))
                        (SPADCALL |a| (SPADCALL |ps| (QREFELT $ 17))
                                  (QREFELT $ 23))
                        (SPADCALL |ps| (QREFELT $ 74)) |ph| 0 |i1| |i2| |i3|))
                      . #1#)
                (SPADCALL (SPADCALL |ll| (QREFELT $ 84)) (QREFELT $ 77))
                (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))))
            (#2#
             (SEQ
              (LETT |ll|
                    (LIST
                     (VECTOR
                      (SPADCALL |a| (SPADCALL |cpi| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |cpi| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |cpj| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |cpj| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |ps| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |ps| (QREFELT $ 74))
                      (SPADCALL |a| (SPADCALL |ph| (QREFELT $ 17))
                                (QREFELT $ 23))
                      (SPADCALL |ph| (QREFELT $ 74)) |i1| |i2| |i3|))
                    . #1#)
              (SPADCALL (SPADCALL |ll| (QREFELT $ 84)) (QREFELT $ 77))
              (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|))))))))) 

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

(DEFUN |GroebnerInternalPackage;| (|#1| |#2| |#3| |#4|)
  (PROG (|pv$| $ |dv$| DV$4 DV$3 DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|GroebnerInternalPackage|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT DV$3 (|devaluate| |#3|) . #1#)
      (LETT DV$4 (|devaluate| |#4|) . #1#)
      (LETT |dv$| (LIST '|GroebnerInternalPackage| DV$1 DV$2 DV$3 DV$4) . #1#)
      (LETT $ (GETREFV 86) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|GroebnerInternalPackage|
                  (LIST DV$1 DV$2 DV$3 DV$4) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 8 |#3|)
      (QSETREFV $ 9 |#4|)
      (COND
       ((|HasSignature| |#4|
                        (LIST '|totalDegree|
                              (LIST '(|NonNegativeInteger|)
                                    (|devaluate| |#4|))))
        (QSETREFV $ 12
                  (CONS (|dispatchFunction| |GBINTERN;virtualDegree;DpolNni;1|)
                        $)))
       ('T
        (QSETREFV $ 12
                  (CONS (|dispatchFunction| |GBINTERN;virtualDegree;DpolNni;2|)
                        $))))
      $)))) 

(MAKEPROP '|GroebnerInternalPackage| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|local| |#3|) (|local| |#4|) (|NonNegativeInteger|)
              (0 . |totalDegree|) (5 . |virtualDegree|) (|Boolean|) (10 . <)
              (|Record| (|:| |lcmfij| 7) (|:| |totdeg| 10) (|:| |poli| 9)
                        (|:| |polj| 9))
              |GBINTERN;critpOrder;2RB;3| (16 . |degree|) (21 . |sup|)
              (|Union| $ '"failed") (27 . |subtractIfCan|) (33 . |One|)
              (37 . |One|) (41 . |monomial|)
              (|Record| (|:| |totdeg| 10) (|:| |pol| 9))
              |GBINTERN;makeCrit;RDpolNniR;4| (|Mapping| 13 9 9) (|List| 9)
              (47 . |sort|) |GBINTERN;hMonic;2Dpol;18| (|List| 24)
              |GBINTERN;updatF;DpolNni2L;9| (|Mapping| 13 15 15) (|List| 15)
              (53 . |sort|) |GBINTERN;critMTonD1;2L;7|
              |GBINTERN;critBonD;Dpol2L;8| |GBINTERN;updatD;3L;10|
              |GBINTERN;sPol;RDpol;12| |GBINTERN;redPol;DpolLDpol;14| (|Void|)
              |GBINTERN;prinshINFO;DpolV;23| (59 . |Zero|) (63 . |Zero|)
              (67 . |Zero|) (71 . =) (|Integer|)
              |GBINTERN;prindINFO;R2Dpol4I;24| (77 . =) (83 . |concat|)
              |GBINTERN;prinpolINFO;LV;25| (|String|) (|OutputForm|)
              (89 . |messagePrint|) |GBINTERN;gbasis;L2IL;5|
              |GBINTERN;critM;2ExponB;16| |GBINTERN;critMonD1;Expon2L;6|
              |GBINTERN;critT;RB;15| |GBINTERN;critB;4ExponB;17| (94 . |gcd|)
              (100 . |exquo|) (106 . |leadingCoefficient|) (111 . |reductum|)
              (116 . *) (122 . -) (128 . *) (134 . *)
              (|Record| (|:| |poly| 9) (|:| |mult| 6))
              |GBINTERN;redPo;DpolLR;13| |GBINTERN;credPol;DpolLDpol;19|
              (140 . +) (146 . |primitivePart|) (151 . +)
              |GBINTERN;minGbasis;2L;20| |GBINTERN;lepol;DpolI;21|
              |GBINTERN;prinb;IV;22| (157 . |coerce|) (162 . |print|)
              (|Record| (|:| |ci| 9) (|:| |tci| 46) (|:| |cj| 9) (|:| |tcj| 46)
                        (|:| |c| 9) (|:| |tc| 46) (|:| |rc| 9) (|:| |trc| 46)
                        (|:| |tF| 46) (|:| |tD| 46))
              (|List| 78) (167 . |coerce|) (172 . |coerce|)
              (|Record| (|:| |ci| 9) (|:| |tci| 46) (|:| |cj| 9) (|:| |tcj| 46)
                        (|:| |c| 9) (|:| |tc| 46) (|:| |rc| 9) (|:| |trc| 46)
                        (|:| |tF| 46) (|:| |tDD| 46) (|:| |tDF| 46))
              (|List| 82) (177 . |coerce|) |GBINTERN;fprindINFO;R2Dpol5I;26|)
           '#(|virtualDegree| 182 |updatF| 187 |updatD| 194 |sPol| 200 |redPol|
              205 |redPo| 211 |prinshINFO| 217 |prinpolINFO| 222 |prindINFO|
              227 |prinb| 237 |minGbasis| 242 |makeCrit| 247 |lepol| 254
              |hMonic| 259 |gbasis| 264 |fprindINFO| 271 |critpOrder| 282
              |critT| 288 |critMonD1| 293 |critMTonD1| 299 |critM| 304
              |critBonD| 310 |critB| 316 |credPol| 324)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 85
                                                 '(1 9 10 0 11 1 0 10 9 12 2 7
                                                   13 0 0 14 1 9 7 0 17 2 7 0 0
                                                   0 18 2 7 19 0 0 20 0 6 0 21
                                                   0 9 0 22 2 9 0 6 7 23 2 27 0
                                                   26 0 28 2 33 0 32 0 34 0 6 0
                                                   42 0 7 0 43 0 9 0 44 2 9 13
                                                   0 0 45 2 7 13 0 0 48 2 27 0
                                                   0 9 49 1 52 40 51 53 2 6 0 0
                                                   0 59 2 6 19 0 0 60 1 9 6 0
                                                   61 1 9 0 0 62 2 9 0 0 0 63 2
                                                   9 0 0 0 64 2 9 0 6 0 65 2 6
                                                   0 0 0 66 2 7 0 0 0 70 1 9 0
                                                   0 71 2 9 0 0 0 72 1 9 52 0
                                                   76 1 52 40 0 77 1 79 52 0 80
                                                   1 46 52 0 81 1 83 52 0 84 1
                                                   0 10 9 12 3 0 30 9 10 30 31
                                                   2 0 33 33 33 37 1 0 9 15 38
                                                   2 0 9 9 27 39 2 0 67 9 27 68
                                                   1 0 40 9 41 1 0 40 27 50 6 0
                                                   46 15 9 9 46 46 46 47 1 0 40
                                                   46 75 1 0 27 27 73 3 0 15 24
                                                   9 10 25 1 0 46 9 74 1 0 9 9
                                                   29 3 0 27 27 46 46 54 7 0 46
                                                   15 9 9 46 46 46 46 85 2 0 13
                                                   15 15 16 1 0 13 15 57 2 0 33
                                                   7 33 56 1 0 33 33 35 2 0 13
                                                   7 7 55 2 0 33 9 33 36 4 0 13
                                                   7 7 7 7 58 2 0 9 9 27
                                                   69)))))
           '|lookupComplete|)) 
