
(/VERSIONCHECK 2) 

(DEFUN |JGB;convert1| (|p| $)
  (PROG (|up| |res| |m| |clcup| |lcup| |x| |cc| |xx|)
    (RETURN
     (SEQ (LETT |xx| (SPADCALL |p| (QREFELT $ 12)) . #1=(|JGB;convert1|))
          (EXIT
           (COND
            ((QEQCAR |xx| 1)
             (SEQ (LETT |cc| (SPADCALL |p| (QREFELT $ 13)) . #1#)
                  (EXIT (SPADCALL |cc| (QREFELT $ 15)))))
            ('T
             (SEQ (LETT |x| (QCDR |xx|) . #1#)
                  (COND
                   ((NULL (SPADCALL |x| (QREFELT $ 10) (QREFELT $ 18)))
                    (EXIT (|error| "illegal jet variable"))))
                  (LETT |up| (SPADCALL |p| |x| (QREFELT $ 20)) . #1#)
                  (LETT |res| (|spadConstant| $ 21) . #1#)
                  (SEQ G190
                       (COND
                        ((NULL
                          (COND ((SPADCALL |up| (QREFELT $ 23)) 'NIL) ('T 'T)))
                         (GO G191)))
                       (SEQ (LETT |lcup| (SPADCALL |up| (QREFELT $ 24)) . #1#)
                            (LETT |clcup| (|JGB;convert1| |lcup| $) . #1#)
                            (LETT |m|
                                  (SPADCALL |clcup| |x|
                                            (SPADCALL |up| (QREFELT $ 26))
                                            (QREFELT $ 27))
                                  . #1#)
                            (LETT |res|
                                  (SPADCALL |res|
                                            (SPADCALL
                                             (|JGB;convert1|
                                              (SPADCALL |up| (QREFELT $ 24)) $)
                                             |x| (SPADCALL |up| (QREFELT $ 26))
                                             (QREFELT $ 27))
                                            (QREFELT $ 28))
                                  . #1#)
                            (EXIT
                             (LETT |up| (SPADCALL |up| (QREFELT $ 29)) . #1#)))
                       NIL (GO G190) G191 (EXIT NIL))
                  (EXIT |res|))))))))) 

(DEFUN |JGB;convert2| (|p| $)
  (PROG (|up| |res| |x| |cc| |xx|)
    (RETURN
     (SEQ (LETT |xx| (SPADCALL |p| (QREFELT $ 30)) . #1=(|JGB;convert2|))
          (EXIT
           (COND
            ((QEQCAR |xx| 1)
             (SEQ (LETT |cc| (SPADCALL |p| (QREFELT $ 31)) . #1#)
                  (EXIT (SPADCALL |cc| (QREFELT $ 32)))))
            ('T
             (SEQ (LETT |x| (QCDR |xx|) . #1#)
                  (LETT |up| (SPADCALL |p| |x| (QREFELT $ 33)) . #1#)
                  (LETT |res| (|spadConstant| $ 34) . #1#)
                  (SEQ G190
                       (COND
                        ((NULL
                          (COND ((SPADCALL |up| (QREFELT $ 36)) 'NIL) ('T 'T)))
                         (GO G191)))
                       (SEQ
                        (LETT |res|
                              (SPADCALL |res|
                                        (SPADCALL
                                         (|JGB;convert2|
                                          (SPADCALL |up| (QREFELT $ 37)) $)
                                         |x| (SPADCALL |up| (QREFELT $ 38))
                                         (QREFELT $ 39))
                                        (QREFELT $ 40))
                              . #1#)
                        (EXIT
                         (LETT |up| (SPADCALL |up| (QREFELT $ 41)) . #1#)))
                       NIL (GO G190) G191 (EXIT NIL))
                  (EXIT |res|))))))))) 

(DEFUN |JGB;groebner;2L;3| (|lp| $)
  (PROG (#1=#:G1838 |dp| #2=#:G1837 |gb| |nlp| #3=#:G1836 |p| #4=#:G1835)
    (RETURN
     (SEQ
      (LETT |nlp|
            (PROGN
             (LETT #4# NIL . #5=(|JGB;groebner;2L;3|))
             (SEQ (LETT |p| NIL . #5#) (LETT #3# |lp| . #5#) G190
                  (COND
                   ((OR (ATOM #3#) (PROGN (LETT |p| (CAR #3#) . #5#) NIL))
                    (GO G191)))
                  (SEQ
                   (EXIT (LETT #4# (CONS (|JGB;convert1| |p| $) #4#) . #5#)))
                  (LETT #3# (CDR #3#) . #5#) (GO G190) G191
                  (EXIT (NREVERSE #4#))))
            . #5#)
      (LETT |gb| (SPADCALL |nlp| (QREFELT $ 43)) . #5#)
      (EXIT
       (PROGN
        (LETT #2# NIL . #5#)
        (SEQ (LETT |dp| NIL . #5#) (LETT #1# |gb| . #5#) G190
             (COND
              ((OR (ATOM #1#) (PROGN (LETT |dp| (CAR #1#) . #5#) NIL))
               (GO G191)))
             (SEQ (EXIT (LETT #2# (CONS (|JGB;convert2| |dp| $) #2#) . #5#)))
             (LETT #1# (CDR #1#) . #5#) (GO G190) G191
             (EXIT (NREVERSE #2#))))))))) 

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

(DEFUN |JetGroebner;| (|#1| |#2| |#3| |#4| |#5|)
  (PROG (|pv$| $ |dv$| DV$5 DV$4 DV$3 DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|JetGroebner|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT DV$3 (|devaluate| |#3|) . #1#)
      (LETT DV$4 (|devaluate| |#4|) . #1#)
      (LETT DV$5 (|devaluate| |#5|) . #1#)
      (LETT |dv$| (LIST '|JetGroebner| DV$1 DV$2 DV$3 DV$4 DV$5) . #1#)
      (LETT $ (GETREFV 46) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|JetGroebner|
                  (LIST DV$1 DV$2 DV$3 DV$4 DV$5) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 8 |#3|)
      (QSETREFV $ 9 |#4|)
      (QSETREFV $ 10 |#5|)
      (SETF |pv$| (QREFELT $ 3))
      $)))) 

(MAKEPROP '|JetGroebner| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|local| |#3|) (|local| |#4|) (|local| |#5|)
              (|Union| 9 '"failed") (0 . |mainVariable|) (5 . |retract|)
              (|DistributedJetBundlePolynomial| 7 8 9 10) (10 . |coerce|)
              (|Boolean|) (|List| 9) (15 . |member?|)
              (|SparseUnivariatePolynomial| $) (21 . |univariate|)
              (27 . |Zero|) (|SparseUnivariatePolynomial| 6) (31 . |zero?|)
              (36 . |leadingCoefficient|) (|NonNegativeInteger|)
              (41 . |degree|) (46 . |monomial|) (53 . +) (59 . |reductum|)
              (64 . |mainVariable|) (69 . |retract|) (74 . |coerce|)
              (79 . |univariate|) (85 . |Zero|)
              (|SparseUnivariatePolynomial| 14) (89 . |zero?|)
              (94 . |leadingCoefficient|) (99 . |degree|) (104 . |monomial|)
              (111 . +) (117 . |reductum|) (|List| $) (122 . |groebner|)
              (|List| 6) |JGB;groebner;2L;3|)
           '#(|groebner| 127) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 45
                                                 '(1 6 11 0 12 1 6 7 0 13 1 14
                                                   0 7 15 2 17 16 9 0 18 2 6 19
                                                   0 9 20 0 14 0 21 1 22 16 0
                                                   23 1 22 6 0 24 1 22 25 0 26
                                                   3 14 0 0 9 25 27 2 14 0 0 0
                                                   28 1 22 0 0 29 1 14 11 0 30
                                                   1 14 7 0 31 1 6 0 7 32 2 14
                                                   19 0 9 33 0 6 0 34 1 35 16 0
                                                   36 1 35 14 0 37 1 35 25 0 38
                                                   3 6 0 0 9 25 39 2 6 0 0 0 40
                                                   1 35 0 0 41 1 14 42 42 43 1
                                                   0 44 44 45)))))
           '|lookupComplete|)) 
