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

(DEFUN |GBINTERN;gbasis;L2IL;5| (|Pol| |xx1| |xx2| $)
  (PROG (|Pol1| |toth| #0=#:G1875 #1=#:G1876 #2=#:G1877 #3=#:G1878 D0
                |s| |h| #4=#:G1870 #5=#:G1879 #6=#:G1880 D1 D |basPols|
                |redPols| |xx| #7=#:G1881 |x| #8=#:G1882)
    (RETURN
      (SEQ (LETT |Pol1|
                 (SPADCALL (CONS #'|GBINTERN;gbasis;L2IL;5!0| $) |Pol|
                     (QREFELT $ 28))
                 . #9=(|GBINTERN;gbasis;L2IL;5|))
           (LETT |basPols|
                 (SPADCALL
                     (SPADCALL (|SPADfirst| |Pol1|) (QREFELT $ 29))
                     (SPADCALL (|SPADfirst| |Pol1|) (QREFELT $ 12)) NIL
                     (QREFELT $ 31)) . #9#)
           (LETT |Pol1| (CDR |Pol1|) . #9#) (LETT D NIL . #9#)
           (SEQ G190
                (COND
                  ((NULL (COND ((NULL |Pol1|) 'NIL) ('T 'T)))
                   #10=(GO G191)))
                (SEQ (LETT |h|
                           (SPADCALL (|SPADfirst| |Pol1|)
                               (QREFELT $ 29)) . #9#)
                     (LETT |Pol1| (CDR |Pol1|) . #9#)
                     (LETT |toth| (SPADCALL |h| (QREFELT $ 12)) . #9#)
                     (LETT D1
                           (PROGN
                             (LETT #0# NIL . #9#)
                             (SEQ (LETT |x| NIL . #9#)
                                  (LETT #1# |basPols| . #9#) G190
                                  (COND
                                    ((OR (ATOM #1#)
                                      (PROGN
                                        (LETT |x| (CAR #1#) . #9#)
                                        NIL))
                                     #10#))
                                  (SEQ (EXIT
                                        (LETT #0#
                                         (CONS
                                          (SPADCALL |x| |h| |toth|
                                           (QREFELT $ 25))
                                          #0#) . #9#)))
                                  (LETT #1# (CDR #1#) . #9#)
                                  #11=(GO G190) G191
                                  (EXIT (NREVERSE0 #0#)))) . #9#)
                     (LETT D
                           (SPADCALL
                               (SPADCALL
                                   (SPADCALL (ELT $ 16) D1
                                    (QREFELT $ 34))
                                   (QREFELT $ 35))
                               (SPADCALL |h| D (QREFELT $ 36))
                               (QREFELT $ 37)) . #9#)
                     (EXIT (LETT |basPols|
                                 (SPADCALL |h| |toth| |basPols|
                                     (QREFELT $ 31)) . #9#)))
                NIL #11# G191 (EXIT NIL))
           (LETT D (SPADCALL (ELT $ 16) D (QREFELT $ 34)) . #9#)
           (LETT |xx| |xx2| . #9#)
           (LETT |redPols|
                 (PROGN
                   (LETT #2# NIL . #9#)
                   (SEQ (LETT |x| NIL . #9#) (LETT #3# |basPols| . #9#)
                        G190
                        (COND
                          ((OR (ATOM #3#)
                               (PROGN (LETT |x| (CAR #3#) . #9#) NIL))
                           #10#))
                        (SEQ (EXIT (LETT #2#
                                    (CONS (QCDR |x|) #2#) . #9#)))
                        (LETT #3# (CDR #3#) . #9#) #11# G191
                        (EXIT (NREVERSE0 #2#)))) . #9#)
           (SEQ (EXIT (SEQ G190
                           (COND
                             ((NULL (COND ((NULL D) 'NIL) ('T 'T)))
                              #10#))
                           (SEQ (LETT D0 (|SPADfirst| D) . #9#)
                                (LETT |s|
                                      (SPADCALL
                                       (SPADCALL D0 (QREFELT $ 38))
                                       (QREFELT $ 29)) . #9#)
                                (LETT D (CDR D) . #9#)
                                (LETT |h|
                                      (SPADCALL
                                       (SPADCALL |s| |redPols|
                                        (QREFELT $ 39))
                                       (QREFELT $ 29)) . #9#)
                                (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 . #9#)))))
                                          (EXIT " go to top of while ")))
                                        ((SPADCALL
                                          (SPADCALL |h| (QREFELT $ 17))
                                          (|spadConstant| $ 43)
                                          (QREFELT $ 48))
                                         (SEQ (LETT D NIL . #9#)
                                          (COND
                                            ((EQL |xx2| 1)
                                             (SEQ
                                              (SPADCALL D0 |s| |h|
                                               (LENGTH |basPols|)
                                               (LENGTH D) |xx|
                                               (QREFELT $ 47))
                                              (EXIT
                                               (LETT |xx| 2 . #9#)))))
                                          (LETT |basPols|
                                           (SPADCALL |h| 0 NIL
                                            (QREFELT $ 31)) . #9#)
                                          (EXIT
                                           (PROGN
                                             (LETT #4#
                                              "out of while" . #9#)
                                             (GO #4#)))))
                                        ('T
                                         (SEQ
                                          (LETT D1
                                           (PROGN
                                             (LETT #5# NIL . #9#)
                                             (SEQ (LETT |x| NIL . #9#)
                                              (LETT #6#
                                               |basPols| . #9#)
                                              G190
                                              (COND
                                                ((OR (ATOM #6#)
                                                  (PROGN
                                                    (LETT |x|
                                                     (CAR #6#) . #9#)
                                                    NIL))
                                                 #10#))
                                              (SEQ
                                               (EXIT
                                                (LETT #5#
                                                 (CONS
                                                  (SPADCALL |x| |h|
                                                   (QVELT D0 1)
                                                   (QREFELT $ 25))
                                                  #5#) . #9#)))
                                              (LETT #6#
                                               (CDR #6#) . #9#)
                                              #11# G191
                                              (EXIT (NREVERSE0 #5#)))) . #9#)
                                          (LETT D
                                           (SPADCALL
                                            (SPADCALL
                                             (SPADCALL (ELT $ 16) D1
                                              (QREFELT $ 34))
                                             (QREFELT $ 35))
                                            (SPADCALL |h| D
                                             (QREFELT $ 36))
                                            (QREFELT $ 37)) . #9#)
                                          (LETT |basPols|
                                           (SPADCALL |h| (QVELT D0 1)
                                            |basPols| (QREFELT $ 31)) . #9#)
                                          (LETT |redPols|
                                           (SPADCALL |redPols| |h|
                                            (QREFELT $ 49)) . #9#)
                                          (EXIT
                                           (COND
                                             ((EQL |xx2| 1)
                                              (SEQ
                                               (SPADCALL D0 |s| |h|
                                                (LENGTH |basPols|)
                                                (LENGTH D) |xx|
                                                (QREFELT $ 47))
                                               (EXIT
                                                (LETT |xx| 2 . #9#)))))))))))
                           NIL #11# G191 (EXIT NIL)))
                #4# (EXIT #4#))
           (LETT |Pol|
                 (PROGN
                   (LETT #7# NIL . #9#)
                   (SEQ (LETT |x| NIL . #9#) (LETT #8# |basPols| . #9#)
                        G190
                        (COND
                          ((OR (ATOM #8#)
                               (PROGN (LETT |x| (CAR #8#) . #9#) NIL))
                           #10#))
                        (SEQ (EXIT (LETT #7#
                                    (CONS (QCDR |x|) #7#) . #9#)))
                        (LETT #8# (CDR #8#) . #9#) #11# G191
                        (EXIT (NREVERSE0 #7#)))) . #9#)
           (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| (|#1| |#2| $)
  (SPADCALL (SPADCALL |#2| (QREFELT $ 17))
      (SPADCALL |#1| (QREFELT $ 17)) (QREFELT $ 14))) 

(DEFUN |GBINTERN;critMonD1;Expon2L;6| (|e| D2 $)
  (PROG (|x|)
    (RETURN
      (SEQ (COND
             ((NULL D2) NIL)
             ('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)))
                           ('T
                            (CONS |x|
                                  (SPADCALL |e| (CDR D2)
                                      (QREFELT $ 56))))))))))))) 

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

(DEFUN |GBINTERN;critBonD;Dpol2L;8| (|h| D $)
  (PROG (|x|)
    (RETURN
      (SEQ (COND
             ((NULL D) NIL)
             ('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)))
                           ('T
                            (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|)))
             ('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)))
                           ('T
                            (CONS |f1|
                                  (SPADCALL |h| |deg| (CDR F)
                                      (QREFELT $ 31))))))))))))) 

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

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

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

(DEFUN |GBINTERN;redPo;DpolLR;13| (|s| F $)
  (PROG (|Fh| |f1| |s1| |e| |cc| |m|)
    (RETURN
      (SEQ (LETT |m| (|spadConstant| $ 21)
                 . #0=(|GBINTERN;redPo;DpolLR;13|))
           (LETT |Fh| F . #0#)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((OR (SPADCALL |s| (|spadConstant| $ 44)
                                    (QREFELT $ 45))
                                (NULL F))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |f1| (|SPADfirst| F) . #0#)
                     (LETT |s1| (SPADCALL |s| (QREFELT $ 17)) . #0#)
                     (LETT |e|
                           (SPADCALL |s1|
                               (SPADCALL |f1| (QREFELT $ 17))
                               (QREFELT $ 20)) . #0#)
                     (EXIT (COND
                             ((QEQCAR |e| 0)
                              (SEQ (LETT |cc|
                                    (|GBINTERN;gcdCo|
                                     (SPADCALL |f1| (QREFELT $ 61))
                                     (SPADCALL |s| (QREFELT $ 61)) $) . #0#)
                                   (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)) . #0#)
                                   (LETT |m|
                                    (SPADCALL |m| (QCAR |cc|)
                                     (QREFELT $ 66)) . #0#)
                                   (EXIT (LETT F |Fh| . #0#))))
                             ('T (LETT F (CDR F) . #0#)))))
                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 (|hred| |h0|)
    (RETURN
      (SEQ (COND
             ((NULL F) |h|)
             ('T
              (SEQ (LETT |h0|
                         (SPADCALL (SPADCALL |h| (QREFELT $ 61))
                             (SPADCALL |h| (QREFELT $ 17))
                             (QREFELT $ 23))
                         . #0=(|GBINTERN;credPol;DpolLDpol;19|))
                   (SEQ G190
                        (COND
                          ((NULL (SEQ (LETT |h|
                                       (SPADCALL |h| (QREFELT $ 62)) . #0#)
                                      (EXIT
                                       (COND
                                         ((SPADCALL |h|
                                           (|spadConstant| $ 44)
                                           (QREFELT $ 45))
                                          'NIL)
                                         ('T 'T)))))
                           (GO G191)))
                        (SEQ (LETT |hred|
                                   (SPADCALL |h| F (QREFELT $ 68)) . #0#)
                             (LETT |h| (QCAR |hred|) . #0#)
                             (EXIT (LETT |h0|
                                    (SPADCALL
                                     (SPADCALL (QCDR |hred|) |h0|
                                      (QREFELT $ 65))
                                     (SPADCALL
                                      (SPADCALL |h| (QREFELT $ 61))
                                      (SPADCALL |h| (QREFELT $ 17))
                                      (QREFELT $ 23))
                                     (QREFELT $ 72)) . #0#)))
                        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 . #0=(|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) . #0#)
                     (EXIT (LETT |p1|
                                 (SPADCALL |p1| (QREFELT $ 62)) . #0#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT |n|))))) 

(DEFUN |GBINTERN;prinb;IV;22| (|n| $)
  (PROG (|x|)
    (RETURN
      (SEQ (LETT |x| 1 . #0=(|GBINTERN;prinb;IV;22|)) G190
           (COND ((QSGREATERP |x| |n|) (GO G191)))
           (SEQ (EXIT (SPADCALL "    " (QREFELT $ 53))))
           (LETT |x| (QSADD1 |x|) . #0#) (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 (|cpi| |cpj| |a| |ll|)
    (RETURN
      (SEQ (LETT |cpi| (QVELT |cp| 2)
                 . #0=(|GBINTERN;prindINFO;R2Dpol4I;24|))
           (LETT |cpj| (QVELT |cp| 3) . #0#)
           (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 . #0#)))))
           (SPADCALL 1 (QREFELT $ 75))
           (LETT |a| (|spadConstant| $ 21) . #0#)
           (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|)) . #0#)
                            (SPADCALL (SPADCALL |ll| (QREFELT $ 80))
                                      (QREFELT $ 77))
                            (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))
                      (#1='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|)) . #0#)
                            (SPADCALL (SPADCALL |ll| (QREFELT $ 80))
                                (QREFELT $ 77))
                            (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))))
                   (#1#
                    (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|)) . #0#)
                         (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 (|cpi| |cpj| |a| |ll|)
    (RETURN
      (SEQ (LETT |cpi| (QVELT |cp| 2)
                 . #0=(|GBINTERN;fprindINFO;R2Dpol5I;26|))
           (LETT |cpj| (QVELT |cp| 3) . #0#)
           (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 . #0#)))))
           (SPADCALL 1 (QREFELT $ 75))
           (LETT |a| (|spadConstant| $ 21) . #0#)
           (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|)) . #0#)
                            (SPADCALL (SPADCALL |ll| (QREFELT $ 84))
                                (QREFELT $ 77))
                            (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))
                      (#1='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|)) . #0#)
                            (SPADCALL (SPADCALL |ll| (QREFELT $ 84))
                                (QREFELT $ 77))
                            (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|)))))
                   (#1#
                    (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|)) . #0#)
                         (SPADCALL (SPADCALL |ll| (QREFELT $ 84))
                             (QREFELT $ 77))
                         (SPADCALL 1 (QREFELT $ 75)) (EXIT |n|))))))))) 

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

(DEFUN |GroebnerInternalPackage;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|GroebnerInternalPackage|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|GroebnerInternalPackage| DV$1 DV$2 DV$3 DV$4) . #0#)
        (LETT $ (GETREFV 86) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|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|)) 
