
(/VERSIONCHECK 2) 

(DEFUN |IDEAL;npoly| (|f| $)
  (COND
    ((SPADCALL |f| (|spadConstant| $ 13) (QREFELT $ 15))
     (|spadConstant| $ 16))
    ('T
     (SPADCALL
         (SPADCALL (SPADCALL |f| (QREFELT $ 17))
             (SPADCALL 0 (SPADCALL |f| (QREFELT $ 20)) (QREFELT $ 22))
             (QREFELT $ 23))
         (|IDEAL;npoly| (SPADCALL |f| (QREFELT $ 24)) $)
         (QREFELT $ 25))))) 

(DEFUN |IDEAL;oldpoly| (|q| $)
  (PROG (|dq| |n| |g|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |q| (|spadConstant| $ 16) (QREFELT $ 26))
              (CONS 0 (|spadConstant| $ 13)))
             (#0='T
              (SEQ (LETT |dq| (SPADCALL |q| (QREFELT $ 27))
                         . #1=(|IDEAL;oldpoly|))
                   (LETT |n| (SPADCALL |dq| (QREFELT $ 28)) . #1#)
                   (EXIT (COND
                           ((EQL |n| 0)
                            (SEQ (LETT |g|
                                       (|IDEAL;oldpoly|
                                        (SPADCALL |q| (QREFELT $ 29))
                                        $) . #1#)
                                 (EXIT (COND
                                         ((QEQCAR |g| 1)
                                          (CONS 1 "failed"))
                                         (#0#
                                          (CONS 0
                                           (SPADCALL
                                            (SPADCALL
                                             (SPADCALL |q|
                                              (QREFELT $ 30))
                                             (SPADCALL |dq|
                                              (QREFELT $ 31))
                                             (QREFELT $ 32))
                                            (QCDR |g|) (QREFELT $ 33))))))))
                           (#0# (CONS 1 "failed"))))))))))) 

(DEFUN |IDEAL;leadterm| (|f| |lvar| $)
  (PROG (|lf|)
    (RETURN
      (COND
        ((OR (NULL (LETT |lf| (SPADCALL |f| (QREFELT $ 35))
                         |IDEAL;leadterm|))
             (SPADCALL |lf| |lvar| (QREFELT $ 36)))
         |f|)
        ('T
         (|IDEAL;leadterm|
             (SPADCALL (SPADCALL |f| (|SPADfirst| |lf|) (QREFELT $ 38))
                 (QREFELT $ 40))
             |lvar| $)))))) 

(DEFUN |IDEAL;choosel| (|f| |g| $)
  (PROG (|f1|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |g| (|spadConstant| $ 13) (QREFELT $ 15)) |f|)
             (#0='T
              (SEQ (LETT |f1| (SPADCALL |f| |g| (QREFELT $ 42))
                         |IDEAL;choosel|)
                   (EXIT (COND
                           ((QEQCAR |f1| 1) |f|)
                           (#0# (|IDEAL;choosel| (QCDR |f1|) |g| $))))))))))) 

(DEFUN |IDEAL;contractGrob| (I1 $)
  (PROG (J1 #0=#:G1865 |f| #1=#:G1866 #2=#:G1847)
    (RETURN
      (SEQ (LETT J1 (SPADCALL I1 (QREFELT $ 45))
                 . #3=(|IDEAL;contractGrob|))
           (SEQ G190
                (COND
                  ((NULL (QEQCAR (|IDEAL;oldpoly| (|SPADfirst| J1) $)
                                 1))
                   #4=(GO G191)))
                (SEQ (EXIT (LETT J1 (CDR J1) . #3#))) NIL #5=(GO G190)
                G191 (EXIT NIL))
           (EXIT (CONS (PROGN
                         (LETT #0# NIL . #3#)
                         (SEQ (LETT |f| NIL . #3#) (LETT #1# J1 . #3#)
                              G190
                              (COND
                                ((OR (ATOM #1#)
                                     (PROGN
                                       (LETT |f| (CAR #1#) . #3#)
                                       NIL))
                                 #4#))
                              (SEQ (EXIT
                                    (LETT #0#
                                     (CONS
                                      (PROG2
                                       (LETT #2#
                                        (|IDEAL;oldpoly| |f| $) . #3#)
                                       (QCDR #2#)
                                        (|check-union| (QEQCAR #2# 0)
                                         (QREFELT $ 9) #2#))
                                      #0#) . #3#)))
                              (LETT #1# (CDR #1#) . #3#) #5# G191
                              (EXIT (NREVERSE0 #0#))))
                       'T)))))) 

(DEFUN |IDEAL;makeleast| (|fullVars| |leastVars| $)
  (PROG (|n| #0=#:G1871 |vv| #1=#:G1872)
    (RETURN
      (SEQ (LETT |n| (LENGTH |leastVars|) . #2=(|IDEAL;makeleast|))
           (EXIT (COND
                   ((< (LENGTH |fullVars|) |n|) (|error| "wrong vars"))
                   ((EQL |n| 0) |fullVars|)
                   ('T
                    (APPEND (PROGN
                              (LETT #0# NIL . #2#)
                              (SEQ (LETT |vv| NIL . #2#)
                                   (LETT #1# |fullVars| . #2#) G190
                                   (COND
                                     ((OR (ATOM #1#)
                                       (PROGN
                                         (LETT |vv| (CAR #1#) . #2#)
                                         NIL))
                                      (GO G191)))
                                   (SEQ
                                    (EXIT
                                     (COND
                                       ((COND
                                          ((SPADCALL |vv| |leastVars|
                                            (QREFELT $ 46))
                                           'NIL)
                                          ('T 'T))
                                        (LETT #0#
                                         (CONS |vv| #0#) . #2#)))))
                                   (LETT #1# (CDR #1#) . #2#) (GO G190)
                                   G191 (EXIT (NREVERSE0 #0#))))
                            |leastVars|)))))))) 

(DEFUN |IDEAL;isMonic?| (|f| |x| $)
  (SPADCALL (SPADCALL (SPADCALL |f| |x| (QREFELT $ 38)) (QREFELT $ 40))
      (QREFELT $ 47))) 

(DEFUN |IDEAL;subset| (|lv| $)
  (PROG (|v| |ll| #0=#:G1879 |set| #1=#:G1880 |l1|)
    (RETURN
      (SEQ (COND
             ((EQL (LENGTH |lv|) 1) (LIST |lv| NIL))
             ('T
              (SEQ (LETT |v| (SPADCALL |lv| 1 (QREFELT $ 51))
                         . #2=(|IDEAL;subset|))
                   (LETT |ll| (|IDEAL;subset| (CDR |lv|) $) . #2#)
                   (LETT |l1|
                         (PROGN
                           (LETT #0# NIL . #2#)
                           (SEQ (LETT |set| NIL . #2#)
                                (LETT #1# |ll| . #2#) G190
                                (COND
                                  ((OR (ATOM #1#)
                                    (PROGN
                                      (LETT |set| (CAR #1#) . #2#)
                                      NIL))
                                   (GO G191)))
                                (SEQ (EXIT
                                      (LETT #0#
                                       (CONS (CONS |v| |set|) #0#) . #2#)))
                                (LETT #1# (CDR #1#) . #2#) (GO G190)
                                G191 (EXIT (NREVERSE0 #0#)))) . #2#)
                   (EXIT (SPADCALL |l1| |ll| (QREFELT $ 53)))))))))) 

(DEFUN |IDEAL;monomDim| (|listm| |lv| $)
  (PROG (|f| #0=#:G1891 |monvar| |lsubset| |subs| #1=#:G1892 |mvset|
             #2=#:G1893 |ldif| #3=#:G1890)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |monvar| NIL . #4=(|IDEAL;monomDim|))
                      (SEQ (LETT |f| NIL . #4#)
                           (LETT #0#
                                 (SPADCALL |listm| (QREFELT $ 55)) . #4#)
                           G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |f| (CAR #0#) . #4#)
                                    NIL))
                              #5=(GO G191)))
                           (SEQ (LETT |mvset|
                                      (SPADCALL |f| (QREFELT $ 35)) . #4#)
                                (EXIT (COND
                                        ((< 1 (LENGTH |mvset|))
                                         (LETT |monvar|
                                          (CONS |mvset| |monvar|) . #4#))
                                        ('T
                                         (LETT |lv|
                                          (SPADCALL |lv|
                                           (SPADCALL
                                            (SPADCALL |mvset| 1
                                             (QREFELT $ 51))
                                            |lv| (QREFELT $ 61))
                                           (QREFELT $ 62)) . #4#)))))
                           (LETT #0# (CDR #0#) . #4#) #6=(GO G190) G191
                           (EXIT NIL))
                      (EXIT (COND
                              ((NULL |lv|) 0)
                              ('T
                               (SEQ (LETT |lsubset|
                                     (SPADCALL
                                      (CONS #'|IDEAL;monomDim!0| $)
                                      (|IDEAL;subset| |lv| $)
                                      (QREFELT $ 66)) . #4#)
                                    (SEQ (LETT |subs| NIL . #4#)
                                     (LETT #1# |lsubset| . #4#) G190
                                     (COND
                                       ((OR (ATOM #1#)
                                         (PROGN
                                           (LETT |subs|
                                            (CAR #1#) . #4#)
                                           NIL))
                                        #5#))
                                     (SEQ (LETT |ldif| |lv| . #4#)
                                      (SEQ (LETT |mvset| NIL . #4#)
                                       (LETT #2# |monvar| . #4#) G190
                                       (COND
                                         ((OR (ATOM #2#)
                                           (PROGN
                                             (LETT |mvset|
                                              (CAR #2#) . #4#)
                                             NIL)
                                           (NULL
                                            (COND
                                              ((SPADCALL |ldif| NIL
                                                (QREFELT $ 36))
                                               'NIL)
                                              ('T 'T))))
                                          #5#))
                                       (SEQ
                                        (EXIT
                                         (LETT |ldif|
                                          (SPADCALL |mvset| |subs|
                                           (QREFELT $ 67)) . #4#)))
                                       (LETT #2# (CDR #2#) . #4#) #6#
                                       G191 (EXIT NIL))
                                      (EXIT
                                       (COND
                                         ((NULL (NULL |ldif|))
                                          (PROGN
                                            (LETT #3#
                                             (LENGTH |subs|) . #4#)
                                            (GO #3#))))))
                                     (LETT #1# (CDR #1#) . #4#) #6#
                                     G191 (EXIT NIL))
                                    (EXIT 0)))))))
           #3# (EXIT #3#))))) 

(DEFUN |IDEAL;monomDim!0| (|#1| |#2| $)
  (SPADCALL (SPADCALL |#2| (QREFELT $ 63))
      (SPADCALL |#1| (QREFELT $ 63)) (QREFELT $ 64))) 

(DEFUN |IDEAL;=;2$B;10| (I J $)
  (COND
    ((SPADCALL I J (QREFELT $ 68)) (SPADCALL J I (QREFELT $ 68)))
    ('T 'NIL))) 

(DEFUN |IDEAL;element?;DPoly$B;11| (|f| I $)
  (PROG (|Id|)
    (RETURN
      (SEQ (LETT |Id| (QCAR (SPADCALL I (QREFELT $ 70)))
                 |IDEAL;element?;DPoly$B;11|)
           (EXIT (COND
                   ((NULL |Id|)
                    (SPADCALL |f| (|spadConstant| $ 13) (QREFELT $ 15)))
                   ('T
                    (SPADCALL (SPADCALL |f| |Id| (QREFELT $ 72))
                        (|spadConstant| $ 13) (QREFELT $ 15))))))))) 

(DEFUN |IDEAL;in?;2$B;12| (I J $)
  (PROG (|f| #0=#:G1904 #1=#:G1901 #2=#:G1899 #3=#:G1900)
    (RETURN
      (SEQ (LETT J (SPADCALL J (QREFELT $ 70))
                 . #4=(|IDEAL;in?;2$B;12|))
           (EXIT (COND
                   ((NULL (QCAR I)) 'T)
                   ('T
                    (PROGN
                      (LETT #3# NIL . #4#)
                      (SEQ (LETT |f| NIL . #4#)
                           (LETT #0# (QCAR I) . #4#) G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |f| (CAR #0#) . #4#)
                                    NIL))
                              (GO G191)))
                           (SEQ (EXIT (PROGN
                                        (LETT #1#
                                         (SPADCALL |f| J
                                          (QREFELT $ 73)) . #4#)
                                        (COND
                                          (#3#
                                           (LETT #2#
                                            (COND (#2# #1#) ('T 'NIL)) . #4#))
                                          ('T
                                           (PROGN
                                             (LETT #2# #1# . #4#)
                                             (LETT #3# 'T . #4#)))))))
                           (LETT #0# (CDR #0#) . #4#) (GO G190) G191
                           (EXIT NIL))
                      (COND (#3# #2#) ('T 'T)))))))))) 

(DEFUN |IDEAL;groebner;2$;13| (I $)
  (PROG (|f| #0=#:G1912 #1=#:G1907 #2=#:G1905 #3=#:G1906)
    (RETURN
      (SEQ (COND
             ((QCDR I)
              (COND
                ((PROGN
                   (LETT #3# NIL . #4=(|IDEAL;groebner;2$;13|))
                   (SEQ (LETT |f| NIL . #4#) (LETT #0# (QCAR I) . #4#)
                        G190
                        (COND
                          ((OR (ATOM #0#)
                               (PROGN (LETT |f| (CAR #0#) . #4#) NIL))
                           (GO G191)))
                        (SEQ (EXIT (PROGN
                                     (LETT #1#
                                      (COND
                                        ((SPADCALL |f| (QREFELT $ 74))
                                         'NIL)
                                        ('T 'T)) . #4#)
                                     (COND
                                       (#3#
                                        (LETT #2#
                                         (COND (#2# 'T) ('T #1#)) . #4#))
                                       ('T
                                        (PROGN
                                          (LETT #2# #1# . #4#)
                                          (LETT #3# 'T . #4#)))))))
                        (LETT #0# (CDR #0#) . #4#) (GO G190) G191
                        (EXIT NIL))
                   (COND (#3# #2#) ('T 'NIL)))
                 I)
                ('T (CONS NIL 'T))))
             ('T (CONS (SPADCALL (QCAR I) (QREFELT $ 75)) 'T))))))) 

(DEFUN |IDEAL;intersect;3$;14| (I J $)
  (PROG (|Id| |Jd| |tp| |tp1| #0=#:G1920 #1=#:G1921 #2=#:G1922 |f|
              #3=#:G1923)
    (RETURN
      (SEQ (COND
             ((NULL (LETT |Id| (QCAR I) . #4=(|IDEAL;intersect;3$;14|)))
              I)
             ((NULL (LETT |Jd| (QCAR J) . #4#)) J)
             ('T
              (SEQ (LETT |tp|
                         (SPADCALL (|spadConstant| $ 48)
                             (SPADCALL 1 (|spadConstant| $ 19)
                                 (QREFELT $ 22))
                             (QREFELT $ 23)) . #4#)
                   (LETT |tp1|
                         (SPADCALL |tp| (|spadConstant| $ 57)
                             (QREFELT $ 76)) . #4#)
                   (EXIT (|IDEAL;contractGrob|
                             (SPADCALL
                                 (PROGN
                                   (LETT #0# NIL . #4#)
                                   (SEQ (LETT |f| NIL . #4#)
                                    (LETT #1# |Id| . #4#) G190
                                    (COND
                                      ((OR (ATOM #1#)
                                        (PROGN
                                          (LETT |f| (CAR #1#) . #4#)
                                          NIL))
                                       #5=(GO G191)))
                                    (SEQ
                                     (EXIT
                                      (LETT #0#
                                       (CONS
                                        (SPADCALL |tp|
                                         (|IDEAL;npoly| |f| $)
                                         (QREFELT $ 77))
                                        #0#) . #4#)))
                                    (LETT #1# (CDR #1#) . #4#)
                                    #6=(GO G190) G191
                                    (EXIT (NREVERSE0 #0#))))
                                 (PROGN
                                   (LETT #2# NIL . #4#)
                                   (SEQ (LETT |f| NIL . #4#)
                                    (LETT #3# |Jd| . #4#) G190
                                    (COND
                                      ((OR (ATOM #3#)
                                        (PROGN
                                          (LETT |f| (CAR #3#) . #4#)
                                          NIL))
                                       #5#))
                                    (SEQ
                                     (EXIT
                                      (LETT #2#
                                       (CONS
                                        (SPADCALL |tp1|
                                         (|IDEAL;npoly| |f| $)
                                         (QREFELT $ 77))
                                        #2#) . #4#)))
                                    (LETT #3# (CDR #3#) . #4#) #6# G191
                                    (EXIT (NREVERSE0 #2#))))
                                 (QREFELT $ 78))
                             $))))))))) 

(DEFUN |IDEAL;intersect;L$;15| (|lid| $)
  (PROG (|l| #0=#:G1928 #1=#:G1926 #2=#:G1924 #3=#:G1925)
    (RETURN
      (SEQ (PROGN
             (LETT #3# NIL . #4=(|IDEAL;intersect;L$;15|))
             (SEQ (LETT |l| NIL . #4#) (LETT #0# |lid| . #4#) G190
                  (COND
                    ((OR (ATOM #0#)
                         (PROGN (LETT |l| (CAR #0#) . #4#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (PROGN
                               (LETT #1# |l| . #4#)
                               (COND
                                 (#3# (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 79)) . #4#))
                                 ('T
                                  (PROGN
                                    (LETT #2# #1# . #4#)
                                    (LETT #3# 'T . #4#)))))))
                  (LETT #0# (CDR #0#) . #4#) (GO G190) G191 (EXIT NIL))
             (COND (#3# #2#) ('T (|IdentityError| '|intersect|)))))))) 

(DEFUN |IDEAL;quotient;$DPoly$;16| (I |f| $)
  (PROG (#0=#:G1933 |g| #1=#:G1934 #2=#:G1847)
    (RETURN
      (SEQ (CONS (SPADCALL
                     (PROGN
                       (LETT #0# NIL
                             . #3=(|IDEAL;quotient;$DPoly$;16|))
                       (SEQ (LETT |g| NIL . #3#)
                            (LETT #1#
                                  (QCAR (SPADCALL I
                                         (SPADCALL (LIST |f|)
                                          (QREFELT $ 82))
                                         (QREFELT $ 79))) . #3#)
                            G190
                            (COND
                              ((OR (ATOM #1#)
                                   (PROGN
                                     (LETT |g| (CAR #1#) . #3#)
                                     NIL))
                               (GO G191)))
                            (SEQ (EXIT (LETT #0#
                                        (CONS
                                         (PROG2
                                          (LETT #2#
                                           (SPADCALL |g| |f|
                                            (QREFELT $ 42)) . #3#)
                                          (QCDR #2#)
                                           (|check-union|
                                            (QEQCAR #2# 0)
                                            (QREFELT $ 9) #2#))
                                         #0#) . #3#)))
                            (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                            (EXIT (NREVERSE0 #0#))))
                     (QREFELT $ 84))
                 'T))))) 

(DEFUN |IDEAL;quotient;3$;17| (I J $)
  (PROG (|Jdl| |f| #0=#:G1943 #1=#:G1940 #2=#:G1938 #3=#:G1939)
    (RETURN
      (SEQ (LETT |Jdl| (QCAR J) . #4=(|IDEAL;quotient;3$;17|))
           (EXIT (COND
                   ((NULL |Jdl|)
                    (SPADCALL (LIST (|spadConstant| $ 49))
                        (QREFELT $ 86)))
                   ('T
                    (CONS (QCAR (PROGN
                                  (LETT #3# NIL . #4#)
                                  (SEQ (LETT |f| NIL . #4#)
                                       (LETT #0# |Jdl| . #4#) G190
                                       (COND
                                         ((OR (ATOM #0#)
                                           (PROGN
                                             (LETT |f| (CAR #0#) . #4#)
                                             NIL))
                                          (GO G191)))
                                       (SEQ
                                        (EXIT
                                         (PROGN
                                           (LETT #1#
                                            (SPADCALL I |f|
                                             (QREFELT $ 85)) . #4#)
                                           (COND
                                             (#3#
                                              (LETT #2#
                                               (SPADCALL #2# #1#
                                                (QREFELT $ 79)) . #4#))
                                             ('T
                                              (PROGN
                                                (LETT #2# #1# . #4#)
                                                (LETT #3# 'T . #4#)))))))
                                       (LETT #0# (CDR #0#) . #4#)
                                       (GO G190) G191 (EXIT NIL))
                                  (COND
                                    (#3# #2#)
                                    ('T (|IdentityError| '|intersect|)))))
                          'T)))))))) 

(DEFUN |IDEAL;+;3$;18| (I J $)
  (CONS (SPADCALL (SPADCALL (QCAR I) (QCAR J) (QREFELT $ 88))
            (QREFELT $ 75))
        'T)) 

(DEFUN |IDEAL;*;3$;19| (I J $)
  (PROG (|g| #0=#:G1950 #1=#:G1951 |f| #2=#:G1952 #3=#:G1947 #4=#:G1945
             #5=#:G1946)
    (RETURN
      (SEQ (CONS (SPADCALL
                     (PROGN
                       (LETT #5# NIL . #6=(|IDEAL;*;3$;19|))
                       (SEQ (LETT |g| NIL . #6#)
                            (LETT #0# (QCAR J) . #6#) G190
                            (COND
                              ((OR (ATOM #0#)
                                   (PROGN
                                     (LETT |g| (CAR #0#) . #6#)
                                     NIL))
                               #7=(GO G191)))
                            (SEQ (EXIT (PROGN
                                         (LETT #3#
                                          (PROGN
                                            (LETT #1# NIL . #6#)
                                            (SEQ (LETT |f| NIL . #6#)
                                             (LETT #2# (QCAR I) . #6#)
                                             G190
                                             (COND
                                               ((OR (ATOM #2#)
                                                 (PROGN
                                                   (LETT |f|
                                                    (CAR #2#) . #6#)
                                                   NIL))
                                                #7#))
                                             (SEQ
                                              (EXIT
                                               (LETT #1#
                                                (CONS
                                                 (SPADCALL |f| |g|
                                                  (QREFELT $ 90))
                                                 #1#) . #6#)))
                                             (LETT #2# (CDR #2#) . #6#)
                                             #8=(GO G190) G191
                                             (EXIT (NREVERSE0 #1#)))) . #6#)
                                         (COND
                                           (#5#
                                            (LETT #4#
                                             (APPEND #4# #3#) . #6#))
                                           ('T
                                            (PROGN
                                              (LETT #4# #3# . #6#)
                                              (LETT #5# 'T . #6#)))))))
                            (LETT #0# (CDR #0#) . #6#) #8# G191
                            (EXIT NIL))
                       (COND (#5# #4#) ('T NIL)))
                     (QREFELT $ 75))
                 'T))))) 

(DEFUN |IDEAL;**;$Nni$;20| (I |n| $)
  (PROG (#0=#:G1953)
    (RETURN
      (COND
        ((EQL |n| 0) (CONS (LIST (|spadConstant| $ 49)) 'T))
        ('T
         (SPADCALL I
             (SPADCALL I
                 (PROG1 (LETT #0# (- |n| 1) |IDEAL;**;$Nni$;20|)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#))
                 (QREFELT $ 92))
             (QREFELT $ 91))))))) 

(DEFUN |IDEAL;saturate;$DPoly$;21| (I |f| $)
  (PROG (|tp| #0=#:G1958 |g| #1=#:G1959)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (|spadConstant| $ 13) (QREFELT $ 15))
              (|error| "f is zero"))
             ('T
              (SEQ (LETT |tp|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL (|spadConstant| $ 48)
                                     (SPADCALL 1 (|spadConstant| $ 19)
                                      (QREFELT $ 22))
                                     (QREFELT $ 23))
                                 (|IDEAL;npoly| |f| $) (QREFELT $ 77))
                             (|spadConstant| $ 57) (QREFELT $ 76))
                         . #2=(|IDEAL;saturate;$DPoly$;21|))
                   (EXIT (|IDEAL;contractGrob|
                             (CONS |tp|
                                   (PROGN
                                     (LETT #0# NIL . #2#)
                                     (SEQ (LETT |g| NIL . #2#)
                                      (LETT #1# (QCAR I) . #2#) G190
                                      (COND
                                        ((OR (ATOM #1#)
                                          (PROGN
                                            (LETT |g| (CAR #1#) . #2#)
                                            NIL))
                                         (GO G191)))
                                      (SEQ
                                       (EXIT
                                        (LETT #0#
                                         (CONS (|IDEAL;npoly| |g| $)
                                          #0#) . #2#)))
                                      (LETT #1# (CDR #1#) . #2#)
                                      (GO G190) G191
                                      (EXIT (NREVERSE0 #0#)))))
                             $))))))))) 

(DEFUN |IDEAL;saturate;$DPolyL$;22| (I |f| |lvar| $)
  (PROG (|Id| #0=#:G1974 #1=#:G1962 #2=#:G1960 #3=#:G1961 |fullVars|
              |newVars| #4=#:G1975 #5=#:G1976 |subVars| #6=#:G1977
              #7=#:G1978 J #8=#:G1979 #9=#:G1980 |ltJ| |ltg|
              #10=#:G1981 #11=#:G1969 #12=#:G1967 #13=#:G1968 |s|
              #14=#:G1982 |vv| #15=#:G1983 |fullPol| #16=#:G1984 |g|
              #17=#:G1985)
    (RETURN
      (SEQ (LETT |Id| (QCAR I) . #18=(|IDEAL;saturate;$DPolyL$;22|))
           (LETT |fullVars|
                 (PROGN
                   (LETT #3# NIL . #18#)
                   (SEQ (LETT |g| NIL . #18#) (LETT #0# |Id| . #18#)
                        G190
                        (COND
                          ((OR (ATOM #0#)
                               (PROGN (LETT |g| (CAR #0#) . #18#) NIL))
                           #19=(GO G191)))
                        (SEQ (EXIT (PROGN
                                     (LETT #1#
                                      (SPADCALL |g| (QREFELT $ 35)) . #18#)
                                     (COND
                                       (#3#
                                        (LETT #2#
                                         (SPADCALL #2# #1#
                                          (QREFELT $ 94)) . #18#))
                                       ('T
                                        (PROGN
                                          (LETT #2# #1# . #18#)
                                          (LETT #3# 'T . #18#)))))))
                        (LETT #0# (CDR #0#) . #18#) #20=(GO G190) G191
                        (EXIT NIL))
                   (COND
                     (#3# #2#)
                     (#21='T (|IdentityError| '|setUnion|)))) . #18#)
           (LETT |newVars|
                 (|IDEAL;makeleast| |fullVars| |lvar| $) . #18#)
           (LETT |subVars|
                 (PROGN
                   (LETT #4# NIL . #18#)
                   (SEQ (LETT |vv| NIL . #18#)
                        (LETT #5# |newVars| . #18#) G190
                        (COND
                          ((OR (ATOM #5#)
                               (PROGN
                                 (LETT |vv| (CAR #5#) . #18#)
                                 NIL))
                           #19#))
                        (SEQ (EXIT (LETT #4#
                                    (CONS
                                     (SPADCALL (|spadConstant| $ 49)
                                      |vv| 1 (QREFELT $ 95))
                                     #4#) . #18#)))
                        (LETT #5# (CDR #5#) . #18#) #20# G191
                        (EXIT (NREVERSE0 #4#)))) . #18#)
           (LETT J
                 (SPADCALL
                     (PROGN
                       (LETT #6# NIL . #18#)
                       (SEQ (LETT |g| NIL . #18#)
                            (LETT #7# |Id| . #18#) G190
                            (COND
                              ((OR (ATOM #7#)
                                   (PROGN
                                     (LETT |g| (CAR #7#) . #18#)
                                     NIL))
                               #19#))
                            (SEQ (EXIT (LETT #6#
                                        (CONS
                                         (SPADCALL |g| |fullVars|
                                          |subVars| (QREFELT $ 96))
                                         #6#) . #18#)))
                            (LETT #7# (CDR #7#) . #18#) #20# G191
                            (EXIT (NREVERSE0 #6#))))
                     (QREFELT $ 75)) . #18#)
           (LETT |ltJ|
                 (PROGN
                   (LETT #8# NIL . #18#)
                   (SEQ (LETT |g| NIL . #18#) (LETT #9# J . #18#) G190
                        (COND
                          ((OR (ATOM #9#)
                               (PROGN (LETT |g| (CAR #9#) . #18#) NIL))
                           #19#))
                        (SEQ (EXIT (LETT #8#
                                    (CONS
                                     (|IDEAL;leadterm| |g| |lvar| $)
                                     #8#) . #18#)))
                        (LETT #9# (CDR #9#) . #18#) #20# G191
                        (EXIT (NREVERSE0 #8#)))) . #18#)
           (LETT |s|
                 (PROGN
                   (LETT #13# NIL . #18#)
                   (SEQ (LETT |ltg| NIL . #18#)
                        (LETT #10# |ltJ| . #18#) G190
                        (COND
                          ((OR (ATOM #10#)
                               (PROGN
                                 (LETT |ltg| (CAR #10#) . #18#)
                                 NIL))
                           #19#))
                        (SEQ (EXIT (PROGN
                                     (LETT #11#
                                      (|IDEAL;choosel| |ltg| |f| $) . #18#)
                                     (COND
                                       (#13#
                                        (LETT #12#
                                         (SPADCALL #12# #11#
                                          (QREFELT $ 90)) . #18#))
                                       ('T
                                        (PROGN
                                          (LETT #12# #11# . #18#)
                                          (LETT #13# 'T . #18#)))))))
                        (LETT #10# (CDR #10#) . #18#) #20# G191
                        (EXIT NIL))
                   (COND (#13# #12#) (#21# (|spadConstant| $ 49)))) . #18#)
           (LETT |fullPol|
                 (PROGN
                   (LETT #14# NIL . #18#)
                   (SEQ (LETT |vv| NIL . #18#)
                        (LETT #15# |fullVars| . #18#) G190
                        (COND
                          ((OR (ATOM #15#)
                               (PROGN
                                 (LETT |vv| (CAR #15#) . #18#)
                                 NIL))
                           #19#))
                        (SEQ (EXIT (LETT #14#
                                    (CONS
                                     (SPADCALL (|spadConstant| $ 49)
                                      |vv| 1 (QREFELT $ 95))
                                     #14#) . #18#)))
                        (LETT #15# (CDR #15#) . #18#) #20# G191
                        (EXIT (NREVERSE0 #14#)))) . #18#)
           (EXIT (CONS (PROGN
                         (LETT #16# NIL . #18#)
                         (SEQ (LETT |g| NIL . #18#)
                              (LETT #17#
                                    (QCAR
                                     (SPADCALL
                                      (SPADCALL J (QREFELT $ 82)) |s|
                                      (QREFELT $ 93))) . #18#)
                              G190
                              (COND
                                ((OR (ATOM #17#)
                                     (PROGN
                                       (LETT |g| (CAR #17#) . #18#)
                                       NIL))
                                 #19#))
                              (SEQ (EXIT
                                    (LETT #16#
                                     (CONS
                                      (SPADCALL |g| |newVars| |fullPol|
                                       (QREFELT $ 96))
                                      #16#) . #18#)))
                              (LETT #17# (CDR #17#) . #18#) #20# G191
                              (EXIT (NREVERSE0 #16#))))
                       'T)))))) 

(DEFUN |IDEAL;zeroDim?;$LB;23| (I |lvar| $)
  (PROG (J |n| |f| #0=#:G2000 #1=#:G1991 |x|)
    (RETURN
      (SEQ (LETT J (QCAR (SPADCALL I (QREFELT $ 70)))
                 . #2=(|IDEAL;zeroDim?;$LB;23|))
           (EXIT (COND
                   ((OR (NULL J)
                        (SPADCALL J (LIST (|spadConstant| $ 49))
                            (QREFELT $ 98)))
                    'NIL)
                   ('T
                    (SEQ (LETT |n| (LENGTH |lvar|) . #2#)
                         (EXIT (COND
                                 ((< (LENGTH J) |n|) 'NIL)
                                 ('T
                                  (SEQ (SEQ (LETT |f| NIL . #2#)
                                        (LETT #0# J . #2#) G190
                                        (COND
                                          ((OR (ATOM #0#)
                                            (PROGN
                                              (LETT |f|
                                               (CAR #0#) . #2#)
                                              NIL)
                                            (NULL
                                             (COND
                                               ((NULL |lvar|) 'NIL)
                                               ('T 'T))))
                                           (GO G191)))
                                        (SEQ
                                         (LETT |x|
                                          (PROG2
                                           (LETT #1#
                                            (SPADCALL |f|
                                             (QREFELT $ 100)) . #2#)
                                           (QCDR #1#)
                                            (|check-union|
                                             (QEQCAR #1# 0)
                                             (QREFELT $ 8) #1#)) . #2#)
                                         (EXIT
                                          (COND
                                            ((|IDEAL;isMonic?| |f| |x|
                                              $)
                                             (LETT |lvar|
                                              (SPADCALL |lvar|
                                               (SPADCALL |x| |lvar|
                                                (QREFELT $ 61))
                                               (QREFELT $ 62)) . #2#)))))
                                        (LETT #0# (CDR #0#) . #2#)
                                        (GO G190) G191 (EXIT NIL))
                                       (EXIT (NULL |lvar|)))))))))))))) 

(DEFUN |IDEAL;zeroDim?;$B;24| (I $)
  (PROG (|g| #0=#:G2006 #1=#:G2003 #2=#:G2001 #3=#:G2002)
    (RETURN
      (SEQ (SPADCALL I
               (PROGN
                 (LETT #3# NIL . #4=(|IDEAL;zeroDim?;$B;24|))
                 (SEQ (LETT |g| NIL . #4#) (LETT #0# (QCAR I) . #4#)
                      G190
                      (COND
                        ((OR (ATOM #0#)
                             (PROGN (LETT |g| (CAR #0#) . #4#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (PROGN
                                   (LETT #1#
                                    (SPADCALL |g| (QREFELT $ 35)) . #4#)
                                   (COND
                                     (#3#
                                      (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 94)) . #4#))
                                     ('T
                                      (PROGN
                                        (LETT #2# #1# . #4#)
                                        (LETT #3# 'T . #4#)))))))
                      (LETT #0# (CDR #0#) . #4#) (GO G190) G191
                      (EXIT NIL))
                 (COND (#3# #2#) ('T (|IdentityError| '|setUnion|))))
               (QREFELT $ 101)))))) 

(DEFUN |IDEAL;inRadical?;DPoly$B;25| (|f| I $)
  (PROG (|tp| |Id| #0=#:G2067 |g| #1=#:G2068)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (|spadConstant| $ 13) (QREFELT $ 15)) 'T)
             ('T
              (SEQ (LETT |tp|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL (|spadConstant| $ 48)
                                     (SPADCALL 1 (|spadConstant| $ 19)
                                      (QREFELT $ 22))
                                     (QREFELT $ 23))
                                 (|IDEAL;npoly| |f| $) (QREFELT $ 77))
                             (|spadConstant| $ 57) (QREFELT $ 76))
                         . #2=(|IDEAL;inRadical?;DPoly$B;25|))
                   (LETT |Id| (QCAR I) . #2#)
                   (EXIT (SPADCALL
                             (SPADCALL (|spadConstant| $ 57)
                                 (SPADCALL
                                     (CONS |tp|
                                      (PROGN
                                        (LETT #0# NIL . #2#)
                                        (SEQ (LETT |g| NIL . #2#)
                                         (LETT #1# |Id| . #2#) G190
                                         (COND
                                           ((OR (ATOM #1#)
                                             (PROGN
                                               (LETT |g|
                                                (CAR #1#) . #2#)
                                               NIL))
                                            (GO G191)))
                                         (SEQ
                                          (EXIT
                                           (LETT #0#
                                            (CONS (|IDEAL;npoly| |g| $)
                                             #0#) . #2#)))
                                         (LETT #1# (CDR #1#) . #2#)
                                         (GO G190) G191
                                         (EXIT (NREVERSE0 #0#)))))
                                     (QREFELT $ 45))
                                 (QREFELT $ 103))
                             (|spadConstant| $ 16) (QREFELT $ 26)))))))))) 

(DEFUN |IDEAL;dimension;$LI;26| (I |lvar| $)
  (PROG (|f| #0=#:G2082 #1=#:G2071 #2=#:G2069 #3=#:G2070 |vv|
             #4=#:G2083 #5=#:G2075 #6=#:G2073 #7=#:G2074 |truelist|
             |ed| |leadid| |n1|)
    (RETURN
      (SEQ (LETT I (SPADCALL I (QREFELT $ 70))
                 . #8=(|IDEAL;dimension;$LI;26|))
           (EXIT (COND
                   ((NULL (QCAR I)) (LENGTH |lvar|))
                   ((SPADCALL (|spadConstant| $ 49) I (QREFELT $ 73))
                    -1)
                   ('T
                    (SEQ (LETT |truelist|
                               (PROGN
                                 (LETT #3# NIL . #8#)
                                 (SEQ (LETT |f| NIL . #8#)
                                      (LETT #0# (QCAR I) . #8#) G190
                                      (COND
                                        ((OR (ATOM #0#)
                                          (PROGN
                                            (LETT |f| (CAR #0#) . #8#)
                                            NIL))
                                         #9=(GO G191)))
                                      (SEQ
                                       (EXIT
                                        (PROGN
                                          (LETT #1#
                                           (SPADCALL |f|
                                            (QREFELT $ 35)) . #8#)
                                          (COND
                                            (#3#
                                             (LETT #2#
                                              (SPADCALL #2# #1#
                                               (QREFELT $ 94)) . #8#))
                                            ('T
                                             (PROGN
                                               (LETT #2# #1# . #8#)
                                               (LETT #3# 'T . #8#)))))))
                                      (LETT #0# (CDR #0#) . #8#)
                                      #10=(GO G190) G191 (EXIT NIL))
                                 (COND
                                   (#3# #2#)
                                   ('T (|IdentityError| '|setUnion|)))) . #8#)
                         (EXIT (COND
                                 ((PROGN
                                    (LETT #7# NIL . #8#)
                                    (SEQ (LETT |vv| NIL . #8#)
                                     (LETT #4# |truelist| . #8#) G190
                                     (COND
                                       ((OR (ATOM #4#)
                                         (PROGN
                                           (LETT |vv| (CAR #4#) . #8#)
                                           NIL))
                                        #9#))
                                     (SEQ
                                      (EXIT
                                       (PROGN
                                         (LETT #5#
                                          (COND
                                            ((SPADCALL |vv| |lvar|
                                              (QREFELT $ 46))
                                             'NIL)
                                            ('T 'T)) . #8#)
                                         (COND
                                           (#7#
                                            (LETT #6#
                                             (COND (#6# 'T) ('T #5#)) . #8#))
                                           ('T
                                            (PROGN
                                              (LETT #6# #5# . #8#)
                                              (LETT #7# 'T . #8#)))))))
                                     (LETT #4# (CDR #4#) . #8#) #10#
                                     G191 (EXIT NIL))
                                    (COND (#7# #6#) ('T 'NIL)))
                                  (|error| "wrong variables"))
                                 ('T
                                  (SEQ (LETT |truelist|
                                        (SPADCALL |lvar|
                                         (SPADCALL |lvar| |truelist|
                                          (QREFELT $ 67))
                                         (QREFELT $ 67)) . #8#)
                                       (LETT |ed|
                                        (- (LENGTH |lvar|)
                                         (LENGTH |truelist|)) . #8#)
                                       (LETT |leadid|
                                        (SPADCALL I (QREFELT $ 105)) . #8#)
                                       (LETT |n1|
                                        (|IDEAL;monomDim| |leadid|
                                         |truelist| $) . #8#)
                                       (EXIT (+ |ed| |n1|)))))))))))))) 

(DEFUN |IDEAL;dimension;$I;27| (I $)
  (PROG (|g| #0=#:G2089 #1=#:G2086 #2=#:G2084 #3=#:G2085)
    (RETURN
      (SEQ (SPADCALL I
               (PROGN
                 (LETT #3# NIL . #4=(|IDEAL;dimension;$I;27|))
                 (SEQ (LETT |g| NIL . #4#) (LETT #0# (QCAR I) . #4#)
                      G190
                      (COND
                        ((OR (ATOM #0#)
                             (PROGN (LETT |g| (CAR #0#) . #4#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (PROGN
                                   (LETT #1#
                                    (SPADCALL |g| (QREFELT $ 35)) . #4#)
                                   (COND
                                     (#3#
                                      (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 94)) . #4#))
                                     ('T
                                      (PROGN
                                        (LETT #2# #1# . #4#)
                                        (LETT #3# 'T . #4#)))))))
                      (LETT #0# (CDR #0#) . #4#) (GO G190) G191
                      (EXIT NIL))
                 (COND (#3# #2#) ('T (|IdentityError| '|setUnion|))))
               (QREFELT $ 106)))))) 

(DEFUN |IDEAL;leadingIdeal;2$;28| (I $)
  (PROG (|Idl| #0=#:G2093 |f| #1=#:G2094)
    (RETURN
      (SEQ (LETT |Idl| (QCAR (SPADCALL I (QREFELT $ 70)))
                 . #2=(|IDEAL;leadingIdeal;2$;28|))
           (EXIT (CONS (PROGN
                         (LETT #0# NIL . #2#)
                         (SEQ (LETT |f| NIL . #2#)
                              (LETT #1# |Idl| . #2#) G190
                              (COND
                                ((OR (ATOM #1#)
                                     (PROGN
                                       (LETT |f| (CAR #1#) . #2#)
                                       NIL))
                                 (GO G191)))
                              (SEQ (EXIT
                                    (LETT #0#
                                     (CONS
                                      (SPADCALL |f|
                                       (SPADCALL |f| (QREFELT $ 24))
                                       (QREFELT $ 108))
                                      #0#) . #2#)))
                              (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                              (EXIT (NREVERSE0 #0#))))
                       'T)))))) 

(DEFUN |IDEAL;monompol| (|df| |lcf| |lv| $)
  (PROG (|v| #0=#:G2099 |dd| #1=#:G2098 |g|)
    (RETURN
      (SEQ (LETT |g| (SPADCALL |lcf| (QREFELT $ 110))
                 . #2=(|IDEAL;monompol|))
           (SEQ (LETT |v| NIL . #2#) (LETT #0# |lv| . #2#)
                (LETT |dd| NIL . #2#) (LETT #1# |df| . #2#) G190
                (COND
                  ((OR (ATOM #1#)
                       (PROGN (LETT |dd| (CAR #1#) . #2#) NIL)
                       (ATOM #0#)
                       (PROGN (LETT |v| (CAR #0#) . #2#) NIL))
                   (GO G191)))
                (SEQ (EXIT (LETT |g|
                                 (SPADCALL |g|
                                     (SPADCALL |v| (QREFELT $ 112))
                                     |dd| (QREFELT $ 113)) . #2#)))
                (LETT #1#
                      (PROG1 (CDR #1#) (LETT #0# (CDR #0#) . #2#)) . #2#)
                (GO G190) G191 (EXIT NIL))
           (EXIT |g|))))) 

(DEFUN |IDEAL;relationsIdeal;LSt;30| (|listf| $)
  (PROG (|nf| #0=#:G2128 #1=#:G2102 #2=#:G2100 #3=#:G2101 |lvint|
              #4=#:G2129 #5=#:G2130 |vl| #6=#:G2131 |nvar| |VarSet1|
              #7=#:G2132 |vv| #8=#:G2133 #9=#:G2107 |lv1| |DirP|
              |nExponent| |nPoly| |gp| |i| #10=#:G2134 |vec2| |df|
              |lcf| |f| |lp| #11=#:G2135 |v| #12=#:G2136 |npol|
              #13=#:G2137 |pol| #14=#:G2139 #15=#:G2138 |leq| |n|
              #16=#:G2117 |lf| #17=#:G2140 |dq| |lcq| |q| |vdq| |j| |p|
              #18=#:G2141 #19=#:G2120 #20=#:G2118 #21=#:G2119 |g|
              |solsn|)
    (RETURN
      (SEQ (COND
             ((NULL |listf|) (SPADCALL NIL NIL (QREFELT $ 117)))
             ('T
              (SEQ (LETT |nf| (LENGTH |listf|)
                         . #22=(|IDEAL;relationsIdeal;LSt;30|))
                   (LETT |lvint|
                         (PROGN
                           (LETT #3# NIL . #22#)
                           (SEQ (LETT |g| NIL . #22#)
                                (LETT #0# |listf| . #22#) G190
                                (COND
                                  ((OR (ATOM #0#)
                                    (PROGN
                                      (LETT |g| (CAR #0#) . #22#)
                                      NIL))
                                   #23=(GO G191)))
                                (SEQ (EXIT
                                      (PROGN
                                        (LETT #1#
                                         (SPADCALL |g| (QREFELT $ 35)) . #22#)
                                        (COND
                                          (#3#
                                           (LETT #2#
                                            (SPADCALL #2# #1#
                                             (QREFELT $ 94)) . #22#))
                                          ('T
                                           (PROGN
                                             (LETT #2# #1# . #22#)
                                             (LETT #3# 'T . #22#)))))))
                                (LETT #0# (CDR #0#) . #22#)
                                #24=(GO G190) G191 (EXIT NIL))
                           (COND
                             (#3# #2#)
                             ('T (|IdentityError| '|setUnion|)))) . #22#)
                   (LETT |vl|
                         (PROGN
                           (LETT #4# NIL . #22#)
                           (SEQ (LETT |vv| NIL . #22#)
                                (LETT #5# |lvint| . #22#) G190
                                (COND
                                  ((OR (ATOM #5#)
                                    (PROGN
                                      (LETT |vv| (CAR #5#) . #22#)
                                      NIL))
                                   #23#))
                                (SEQ (EXIT
                                      (LETT #4#
                                       (CONS
                                        (SPADCALL |vv| (QREFELT $ 112))
                                        #4#) . #22#)))
                                (LETT #5# (CDR #5#) . #22#) #24# G191
                                (EXIT (NREVERSE0 #4#)))) . #22#)
                   (LETT |nvar|
                         (PROGN
                           (LETT #6# NIL . #22#)
                           (SEQ (LETT |i| 1 . #22#) G190
                                (COND ((QSGREATERP |i| |nf|) #23#))
                                (SEQ (EXIT
                                      (LETT #6#
                                       (CONS (SPADCALL (QREFELT $ 118))
                                        #6#) . #22#)))
                                (LETT |i| (QSADD1 |i|) . #22#) #24#
                                G191 (EXIT (NREVERSE0 #6#)))) . #22#)
                   (LETT |VarSet1|
                         (|OrderedVariableList|
                             (SPADCALL |vl| |nvar| (QREFELT $ 120))) . #22#)
                   (LETT |lv1|
                         (PROGN
                           (LETT #7# NIL . #22#)
                           (SEQ (LETT |vv| NIL . #22#)
                                (LETT #8# |nvar| . #22#) G190
                                (COND
                                  ((OR (ATOM #8#)
                                    (PROGN
                                      (LETT |vv| (CAR #8#) . #22#)
                                      NIL))
                                   #23#))
                                (SEQ (EXIT
                                      (LETT #7#
                                       (CONS
                                        (PROG2
                                         (LETT #9#
                                          (SPADCALL |vv|
                                           (|compiledLookupCheck|
                                            '|variable|
                                            (LIST
                                             (LIST '|Union| '$
                                              '"failed")
                                             (LIST '|Symbol|))
                                            |VarSet1|)) . #22#)
                                         (QCDR #9#)
                                          (|check-union| (QEQCAR #9# 0)
                                           |VarSet1| #9#))
                                        #7#) . #22#)))
                                (LETT #8# (CDR #8#) . #22#) #24# G191
                                (EXIT (NREVERSE0 #7#)))) . #22#)
                   (LETT |DirP|
                         (|DirectProduct| |nf| (|NonNegativeInteger|)) . #22#)
                   (LETT |nExponent|
                         (|Product| (QREFELT $ 7) |DirP|) . #22#)
                   (LETT |nPoly|
                         (|PolynomialRing| (QREFELT $ 6) |nExponent|) . #22#)
                   (LETT |gp|
                         (|GroebnerPackage| (QREFELT $ 6) |nExponent|
                             |VarSet1| |nPoly|) . #22#)
                   (LETT |lf| NIL . #22#) (LETT |lp| NIL . #22#)
                   (SEQ (LETT |i| 1 . #22#) (LETT |f| NIL . #22#)
                        (LETT #10# |listf| . #22#) G190
                        (COND
                          ((OR (ATOM #10#)
                               (PROGN
                                 (LETT |f| (CAR #10#) . #22#)
                                 NIL))
                           #23#))
                        (SEQ (LETT |vec2|
                                   (SPADCALL |nf| 0 (QREFELT $ 122)) . #22#)
                             (SPADCALL |vec2| |i| 1 (QREFELT $ 123))
                             (LETT |g|
                                   (SPADCALL
                                    (|compiledLookupCheck| '|Zero|
                                     (LIST '$) |nPoly|)) . #22#)
                             (LETT |pol| (|spadConstant| $ 124) . #22#)
                             (SEQ G190
                                  (COND
                                    ((NULL
                                      (COND
                                        ((SPADCALL |f|
                                          (|spadConstant| $ 13)
                                          (QREFELT $ 15))
                                         'NIL)
                                        ('T 'T)))
                                     #23#))
                                  (SEQ (LETT |df|
                                        (SPADCALL
                                         (SPADCALL |f|
                                          (SPADCALL |f| (QREFELT $ 24))
                                          (QREFELT $ 108))
                                         |lvint| (QREFELT $ 126)) . #22#)
                                       (LETT |lcf|
                                        (SPADCALL |f| (QREFELT $ 17)) . #22#)
                                       (LETT |pol|
                                        (SPADCALL |pol|
                                         (|IDEAL;monompol| |df| |lcf|
                                          |lvint| $)
                                         (QREFELT $ 127)) . #22#)
                                       (LETT |g|
                                        (SPADCALL |g|
                                         (SPADCALL |lcf|
                                          (SPADCALL
                                           (SPADCALL |f|
                                            (QREFELT $ 20))
                                           (SPADCALL
                                            (|compiledLookupCheck|
                                             '|Zero| (LIST '$) |DirP|))
                                           (|compiledLookupCheck|
                                            '|makeprod|
                                            (LIST '$
                                             (|devaluate| (ELT $ 7))
                                             (|devaluate| |DirP|))
                                            |nExponent|))
                                          (|compiledLookupCheck|
                                           '|monomial|
                                           (LIST '$
                                            (|devaluate| (ELT $ 6))
                                            (|devaluate| |nExponent|))
                                           |nPoly|))
                                         (|compiledLookupCheck| '+
                                          (LIST '$ '$ '$) |nPoly|)) . #22#)
                                       (EXIT
                                        (LETT |f|
                                         (SPADCALL |f| (QREFELT $ 24)) . #22#)))
                                  NIL #24# G191 (EXIT NIL))
                             (LETT |lp| (CONS |pol| |lp|) . #22#)
                             (EXIT (LETT |lf|
                                    (CONS
                                     (SPADCALL
                                      (SPADCALL (|spadConstant| $ 48)
                                       (SPADCALL (|spadConstant| $ 19)
                                        (SPADCALL |vec2|
                                         (|compiledLookupCheck|
                                          '|directProduct|
                                          (LIST '$
                                           (LIST '|Vector|
                                            (LIST
                                             '|NonNegativeInteger|)))
                                          |DirP|))
                                        (|compiledLookupCheck|
                                         '|makeprod|
                                         (LIST '$
                                          (|devaluate| (ELT $ 7))
                                          (|devaluate| |DirP|))
                                         |nExponent|))
                                       (|compiledLookupCheck|
                                        '|monomial|
                                        (LIST '$
                                         (|devaluate| (ELT $ 6))
                                         (|devaluate| |nExponent|))
                                        |nPoly|))
                                      |g|
                                      (|compiledLookupCheck| '-
                                       (LIST '$ '$ '$) |nPoly|))
                                     |lf|) . #22#)))
                        (LETT #10#
                              (PROG1 (CDR #10#)
                                (LETT |i| (QSADD1 |i|) . #22#)) . #22#)
                        #24# G191 (EXIT NIL))
                   (LETT |npol|
                         (PROGN
                           (LETT #11# NIL . #22#)
                           (SEQ (LETT |v| NIL . #22#)
                                (LETT #12# |nvar| . #22#) G190
                                (COND
                                  ((OR (ATOM #12#)
                                    (PROGN
                                      (LETT |v| (CAR #12#) . #22#)
                                      NIL))
                                   #23#))
                                (SEQ (EXIT
                                      (LETT #11#
                                       (CONS
                                        (SPADCALL |v| (QREFELT $ 128))
                                        #11#) . #22#)))
                                (LETT #12# (CDR #12#) . #22#) #24# G191
                                (EXIT (NREVERSE0 #11#)))) . #22#)
                   (LETT |leq|
                         (PROGN
                           (LETT #13# NIL . #22#)
                           (SEQ (LETT |pol| NIL . #22#)
                                (LETT #14# (REVERSE |lp|) . #22#)
                                (LETT |p| NIL . #22#)
                                (LETT #15# |npol| . #22#) G190
                                (COND
                                  ((OR (ATOM #15#)
                                    (PROGN
                                      (LETT |p| (CAR #15#) . #22#)
                                      NIL)
                                    (ATOM #14#)
                                    (PROGN
                                      (LETT |pol| (CAR #14#) . #22#)
                                      NIL))
                                   #23#))
                                (SEQ (EXIT
                                      (LETT #13#
                                       (CONS
                                        (SPADCALL |p| |pol|
                                         (QREFELT $ 130))
                                        #13#) . #22#)))
                                (LETT #15#
                                      (PROG1 (CDR #15#)
                                        (LETT #14# (CDR #14#) . #22#)) . #22#)
                                #24# G191 (EXIT (NREVERSE0 #13#)))) . #22#)
                   (LETT |lf|
                         (SPADCALL |lf|
                             (|compiledLookupCheck| '|groebner|
                                 (LIST (LIST '|List|
                                        (|devaluate| |nPoly|))
                                       (LIST '|List|
                                        (|devaluate| |nPoly|)))
                                 |gp|)) . #22#)
                   (SEQ (EXIT (SEQ G190
                                   (COND
                                     ((NULL
                                       (COND
                                         ((SPADCALL |lf| NIL
                                           (|compiledLookupCheck| '=
                                            (LIST (LIST '|Boolean|) '$
                                             '$)
                                            (|List| |nPoly|)))
                                          'NIL)
                                         ('T 'T)))
                                      #23#))
                                   (SEQ
                                    (LETT |q|
                                     (|SPADfirst| |lf|) . #22#)
                                    (LETT |dq|
                                     (SPADCALL |q|
                                      (|compiledLookupCheck| '|degree|
                                       (LIST (|devaluate| |nExponent|)
                                        '$)
                                       |nPoly|)) . #22#)
                                    (LETT |n|
                                     (SPADCALL |dq|
                                      (|compiledLookupCheck|
                                       '|selectfirst|
                                       (LIST (|devaluate| (ELT $ 7))
                                        '$)
                                       |nExponent|)) . #22#)
                                    (COND
                                      ((SPADCALL |n|
                                        (|spadConstant| $ 19)
                                        (QREFELT $ 131))
                                       (PROGN
                                         (LETT #16# "done" . #22#)
                                         (GO #16#))))
                                    (EXIT
                                     (LETT |lf| (CDR |lf|) . #22#)))
                                   NIL #24# G191 (EXIT NIL)))
                        #16# (EXIT #16#))
                   (LETT |solsn| NIL . #22#)
                   (SEQ (LETT |q| NIL . #22#) (LETT #17# |lf| . #22#)
                        G190
                        (COND
                          ((OR (ATOM #17#)
                               (PROGN
                                 (LETT |q| (CAR #17#) . #22#)
                                 NIL))
                           #23#))
                        (SEQ (LETT |g| (|spadConstant| $ 124) . #22#)
                             (SEQ G190
                                  (COND
                                    ((NULL
                                      (COND
                                        ((SPADCALL |q|
                                          (SPADCALL
                                           (|compiledLookupCheck|
                                            '|Zero| (LIST '$) |nPoly|))
                                          (|compiledLookupCheck| '=
                                           (LIST (LIST '|Boolean|) '$
                                            '$)
                                           |nPoly|))
                                         'NIL)
                                        ('T 'T)))
                                     #23#))
                                  (SEQ (LETT |dq|
                                        (SPADCALL |q|
                                         (|compiledLookupCheck|
                                          '|degree|
                                          (LIST
                                           (|devaluate| |nExponent|)
                                           '$)
                                          |nPoly|)) . #22#)
                                       (LETT |lcq|
                                        (SPADCALL |q|
                                         (|compiledLookupCheck|
                                          '|leadingCoefficient|
                                          (LIST (|devaluate| (ELT $ 6))
                                           '$)
                                          |nPoly|)) . #22#)
                                       (LETT |q|
                                        (SPADCALL |q|
                                         (|compiledLookupCheck|
                                          '|reductum| (LIST '$ '$)
                                          |nPoly|)) . #22#)
                                       (LETT |vdq|
                                        (SPADCALL |dq|
                                         (|compiledLookupCheck|
                                          '|selectsecond|
                                          (LIST (|devaluate| |DirP|)
                                           '$)
                                          |nExponent|)) . #22#)
                                       (EXIT
                                        (LETT |g|
                                         (SPADCALL |g|
                                          (SPADCALL |lcq|
                                           (PROGN
                                             (LETT #21# NIL . #22#)
                                             (SEQ (LETT |j| 1 . #22#)
                                              (LETT |p| NIL . #22#)
                                              (LETT #18# |npol| . #22#)
                                              G190
                                              (COND
                                                ((OR (ATOM #18#)
                                                  (PROGN
                                                    (LETT |p|
                                                     (CAR #18#) . #22#)
                                                    NIL))
                                                 #23#))
                                              (SEQ
                                               (EXIT
                                                (PROGN
                                                  (LETT #19#
                                                   (SPADCALL |p|
                                                    (SPADCALL |vdq| |j|
                                                     (QREFELT $ 132))
                                                    (QREFELT $ 133)) . #22#)
                                                  (COND
                                                    (#21#
                                                     (LETT #20#
                                                      (SPADCALL #20#
                                                       #19#
                                                       (QREFELT $ 134)) . #22#))
                                                    ('T
                                                     (PROGN
                                                       (LETT #20#
                                                        #19# . #22#)
                                                       (LETT #21#
                                                        'T . #22#)))))))
                                              (LETT #18#
                                               (PROG1 (CDR #18#)
                                                 (LETT |j|
                                                  (QSADD1 |j|) . #22#)) . #22#)
                                              #24# G191 (EXIT NIL))
                                             (COND
                                               (#21# #20#)
                                               ('T
                                                (|spadConstant| $ 135))))
                                           (QREFELT $ 136))
                                          (QREFELT $ 127)) . #22#)))
                                  NIL #24# G191 (EXIT NIL))
                             (EXIT (LETT |solsn|
                                    (CONS |g| |solsn|) . #22#)))
                        (LETT #17# (CDR #17#) . #22#) #24# G191
                        (EXIT NIL))
                   (EXIT (SPADCALL |solsn| |leq| (QREFELT $ 117)))))))))) 

(DEFUN |IDEAL;coerce;L$;31| (|Id| $) (CONS |Id| 'NIL)) 

(DEFUN |IDEAL;coerce;$Of;32| (I $)
  (PROG (|Idl|)
    (RETURN
      (SEQ (LETT |Idl| (QCAR I) |IDEAL;coerce;$Of;32|)
           (EXIT (COND
                   ((NULL |Idl|)
                    (SPADCALL (LIST (|spadConstant| $ 13))
                        (QREFELT $ 139)))
                   ('T (SPADCALL |Idl| (QREFELT $ 139))))))))) 

(DEFUN |IDEAL;ideal;L$;33| (|Id| $)
  (PROG (#0=#:G2147 |f| #1=#:G2148)
    (RETURN
      (SEQ (CONS (PROGN
                   (LETT #0# NIL . #2=(|IDEAL;ideal;L$;33|))
                   (SEQ (LETT |f| NIL . #2#) (LETT #1# |Id| . #2#) G190
                        (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |f| (CAR #1#) . #2#) NIL))
                           (GO G191)))
                        (SEQ (EXIT (COND
                                     ((COND
                                        ((SPADCALL |f|
                                          (|spadConstant| $ 13)
                                          (QREFELT $ 15))
                                         'NIL)
                                        ('T 'T))
                                      (LETT #0# (CONS |f| #0#) . #2#)))))
                        (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                        (EXIT (NREVERSE0 #0#))))
                 'NIL))))) 

(DEFUN |IDEAL;groebnerIdeal;L$;34| (|Id| $) (CONS |Id| 'T)) 

(PUT '|IDEAL;generators;$L;35| '|SPADreplace| 'QCAR) 

(DEFUN |IDEAL;generators;$L;35| (I $) (QCAR I)) 

(PUT '|IDEAL;groebner?;$B;36| '|SPADreplace| 'QCDR) 

(DEFUN |IDEAL;groebner?;$B;36| (I $) (QCDR I)) 

(DEFUN |IDEAL;one?;$B;37| (I $)
  (SPADCALL (|spadConstant| $ 49) I (QREFELT $ 73))) 

(DEFUN |IDEAL;zero?;$B;38| (I $)
  (NULL (QCAR (SPADCALL I (QREFELT $ 70))))) 

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

(DEFUN |PolynomialIdeals;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|PolynomialIdeals|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|PolynomialIdeals| DV$1 DV$2 DV$3 DV$4) . #0#)
        (LETT $ (GETREFV 148) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#3|
                                '(|ConvertibleTo| (|Symbol|))))) . #0#))
        (|haddProp| |$ConstructorCache| '|PolynomialIdeals|
            (LIST DV$1 DV$2 DV$3 DV$4) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (QSETREFV $ 9 |#4|)
        (QSETREFV $ 10
            (|Record| (|:| |idl| (|List| |#4|))
                (|:| |isGr| (|Boolean|))))
        (QSETREFV $ 11 (|Product| (|NonNegativeInteger|) |#2|))
        (QSETREFV $ 12 (|PolynomialRing| |#1| (QREFELT $ 11)))
        (COND
          ((|testBitVector| |pv$| 1)
           (PROGN
             (QSETREFV $ 137
                 (CONS (|dispatchFunction|
                           |IDEAL;relationsIdeal;LSt;30|)
                       $)))))
        $)))) 

(MAKEPROP '|PolynomialIdeals| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) '|Rep| '|newExpon|
             '|newPoly| (0 . |Zero|) (|Boolean|) (4 . =) (10 . |Zero|)
             (14 . |leadingCoefficient|) (19 . |Zero|) (23 . |Zero|)
             (27 . |degree|) (|NonNegativeInteger|) (32 . |makeprod|)
             (38 . |monomial|) (44 . |reductum|) (49 . +) (55 . =)
             (61 . |degree|) (66 . |selectfirst|) (71 . |reductum|)
             (76 . |leadingCoefficient|) (81 . |selectsecond|)
             (86 . |monomial|) (92 . +) (|List| 8) (98 . |variables|)
             (103 . =) (|SparseUnivariatePolynomial| $)
             (109 . |univariate|) (|SparseUnivariatePolynomial| 9)
             (115 . |leadingCoefficient|) (|Union| $ '"failed")
             (120 . |exquo|) (|List| 12) (|GroebnerPackage| 6 11 8 12)
             (126 . |groebner|) (131 . |member?|) (137 . |ground?|)
             (142 . |One|) (146 . |One|) (|Integer|) (150 . |elt|)
             (|List| 34) (156 . |concat|) (|List| 9)
             |IDEAL;generators;$L;35| (162 . |One|) (166 . |One|)
             (|Product| 21 7) (170 . |One|) (174 . |One|)
             (178 . |position|) (184 . |delete|) (190 . |#|) (195 . <)
             (|Mapping| 14 34 34) (201 . |sort|)
             (207 . |setDifference|) |IDEAL;in?;2$B;12|
             |IDEAL;=;2$B;10| |IDEAL;groebner;2$;13|
             (|GroebnerPackage| 6 7 8 9) (213 . |normalForm|)
             |IDEAL;element?;DPoly$B;11| (219 . |zero?|)
             (224 . |groebner|) (229 . -) (235 . *) (241 . |concat|)
             |IDEAL;intersect;3$;14| (|List| $) |IDEAL;intersect;L$;15|
             |IDEAL;coerce;L$;31| (|GroebnerInternalPackage| 6 7 8 9)
             (247 . |minGbasis|) |IDEAL;quotient;$DPoly$;16|
             |IDEAL;ideal;L$;33| |IDEAL;quotient;3$;17|
             (252 . |concat|) |IDEAL;+;3$;18| (258 . *) |IDEAL;*;3$;19|
             |IDEAL;**;$Nni$;20| |IDEAL;saturate;$DPoly$;21|
             (264 . |setUnion|) (270 . |monomial|) (277 . |eval|)
             |IDEAL;saturate;$DPolyL$;22| (284 . =)
             (|Union| 8 '"failed") (290 . |mainVariable|)
             |IDEAL;zeroDim?;$LB;23| |IDEAL;zeroDim?;$B;24|
             (295 . |normalForm|) |IDEAL;inRadical?;DPoly$B;25|
             |IDEAL;leadingIdeal;2$;28| |IDEAL;dimension;$LI;26|
             |IDEAL;dimension;$I;27| (301 . -) (|Polynomial| 6)
             (307 . |coerce|) (|Symbol|) (312 . |convert|)
             (317 . |monomial|) (|List| 109) (|List| 129)
             (|SuchThat| 114 115) (324 . |construct|) (330 . |new|)
             (|List| 111) (334 . |concat|) (|Vector| 21) (340 . |new|)
             (346 . |setelt|) (353 . |Zero|) (|List| 21)
             (357 . |degree|) (363 . +) (369 . |coerce|)
             (|Equation| 109) (374 . =) (380 . =) (386 . |elt|)
             (392 . **) (398 . *) (404 . |One|) (408 . *)
             (414 . |relationsIdeal|) (|OutputForm|) (419 . |coerce|)
             |IDEAL;coerce;$Of;32| |IDEAL;groebnerIdeal;L$;34|
             |IDEAL;groebner?;$B;36| |IDEAL;one?;$B;37|
             |IDEAL;zero?;$B;38|
             (|Record| (|:| |mval| (|Matrix| 6))
                 (|:| |invmval| (|Matrix| 6)) (|:| |genIdeal| $))
             (|SingleInteger|) (|String|))
          '#(~= 424 |zeroDim?| 430 |zero?| 441 |saturate| 446
             |relationsIdeal| 459 |quotient| 464 |one?| 476
             |leadingIdeal| 481 |latex| 486 |intersect| 491
             |inRadical?| 502 |in?| 508 |ideal| 514 |hash| 519
             |groebnerIdeal| 524 |groebner?| 529 |groebner| 534
             |generators| 539 |generalPosition| 544 |element?| 550
             |dimension| 556 |coerce| 567 |backOldPos| 577 = 582 + 588
             ** 594 * 600)
          'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0))
                (CONS '#(|SetCategory&| |BasicType&| NIL)
                      (CONS '#((|SetCategory|) (|BasicType|)
                               (|CoercibleTo| 138))
                            (|makeByteWordVec2| 147
                                '(0 9 0 13 2 9 14 0 0 15 0 12 0 16 1 9
                                  6 0 17 0 6 0 18 0 7 0 19 1 9 7 0 20 2
                                  11 0 21 7 22 2 12 0 6 11 23 1 9 0 0
                                  24 2 12 0 0 0 25 2 12 14 0 0 26 1 12
                                  11 0 27 1 11 21 0 28 1 12 0 0 29 1 12
                                  6 0 30 1 11 7 0 31 2 9 0 6 7 32 2 9 0
                                  0 0 33 1 9 34 0 35 2 34 14 0 0 36 2 9
                                  37 0 8 38 1 39 9 0 40 2 9 41 0 0 42 1
                                  44 43 43 45 2 34 14 8 0 46 1 9 14 0
                                  47 0 6 0 48 0 9 0 49 2 34 8 0 50 51 2
                                  52 0 0 0 53 0 11 0 56 0 12 0 57 0 58
                                  0 59 0 21 0 60 2 34 50 8 0 61 2 34 0
                                  0 50 62 1 34 21 0 63 2 21 14 0 0 64 2
                                  52 0 65 0 66 2 34 0 0 0 67 2 71 9 9
                                  54 72 1 9 14 0 74 1 71 54 54 75 2 12
                                  0 0 0 76 2 12 0 0 0 77 2 43 0 0 0 78
                                  1 83 54 54 84 2 54 0 0 0 88 2 9 0 0 0
                                  90 2 34 0 0 0 94 3 9 0 0 8 21 95 3 9
                                  0 0 34 80 96 2 54 14 0 0 98 1 9 99 0
                                  100 2 44 12 12 43 103 2 9 0 0 0 108 1
                                  109 0 6 110 1 8 111 0 112 3 109 0 0
                                  111 21 113 2 116 0 114 115 117 0 111
                                  0 118 2 119 0 0 0 120 2 121 0 21 21
                                  122 3 121 21 0 50 21 123 0 109 0 124
                                  2 9 125 0 34 126 2 109 0 0 0 127 1
                                  109 0 111 128 2 129 0 109 109 130 2 7
                                  14 0 0 131 2 121 21 0 50 132 2 109 0
                                  0 21 133 2 109 0 0 0 134 0 109 0 135
                                  2 109 0 6 0 136 1 0 116 54 137 1 54
                                  138 0 139 2 0 14 0 0 1 2 0 14 0 34
                                  101 1 0 14 0 102 1 0 14 0 144 3 0 0 0
                                  9 34 97 2 0 0 0 9 93 1 1 116 54 137 2
                                  0 0 0 0 87 2 0 0 0 9 85 1 0 14 0 143
                                  1 0 0 0 105 1 0 147 0 1 2 0 0 0 0 79
                                  1 0 0 80 81 2 0 14 9 0 104 2 0 14 0 0
                                  68 1 0 0 54 86 1 0 146 0 1 1 0 0 54
                                  141 1 0 14 0 142 1 0 0 0 70 1 0 54 0
                                  55 2 0 145 0 34 1 2 0 14 9 0 73 1 0
                                  50 0 107 2 0 50 0 34 106 1 0 0 54 82
                                  1 0 138 0 140 1 0 0 145 1 2 0 14 0 0
                                  69 2 0 0 0 0 89 2 0 0 0 21 92 2 0 0 0
                                  0 91)))))
          '|lookupComplete|)) 
