
(/VERSIONCHECK 2) 

(DEFUN |FSPRMELT;F2P| (|f| |l| $)
  (PROG ()
    (RETURN
     (SPADCALL
      (SPADCALL (SPADCALL (SPADCALL |f| (QREFELT $ 9)) (QREFELT $ 10))
                (QREFELT $ 11))
      (SPADCALL (CONS #'|FSPRMELT;F2P!0| (VECTOR $ |l|))
                (CONS #'|FSPRMELT;F2P!1| $) (SPADCALL |f| (QREFELT $ 15))
                (QREFELT $ 20))
      (QREFELT $ 21))))) 

(DEFUN |FSPRMELT;F2P!1| (|r1| $)
  (SPADCALL (SPADCALL |r1| (QREFELT $ 12)) (QREFELT $ 14))) 

(DEFUN |FSPRMELT;F2P!0| (|k1| $$)
  (PROG (|l| $)
    (LETT |l| (QREFELT $$ 1) . #1=(|FSPRMELT;F2P|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (|FSPRMELT;K2P| |k1| |l| $))))) 

(DEFUN |FSPRMELT;K2P| (|k| |l| $)
  (PROG (#1=#:G677 |v|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ (LETT |v| (SPADCALL |k| (QREFELT $ 24)) . #2=(|FSPRMELT;K2P|))
             (EXIT
              (COND
               ((QEQCAR |v| 0)
                (COND
                 ((SPADCALL (QCDR |v|) |l| (QREFELT $ 28))
                  (PROGN
                   (LETT #1# (SPADCALL (QCDR |v|) (QREFELT $ 29)) . #2#)
                   (GO #1#))))))))
        (EXIT (SPADCALL (SPADCALL |k| (QREFELT $ 31)) (QREFELT $ 14)))))
      #1# (EXIT #1#))))) 

(DEFUN |FSPRMELT;primitiveElement;LR;3| (|l| $)
  (PROG (#1=#:G687 #2=#:G686 #3=#:G688 #4=#:G701 |c| #5=#:G702 |a| |rec| |pols|
         #6=#:G699 |k| #7=#:G700 |v| #8=#:G698 |kers| #9=#:G697 #10=#:G696 |vv|
         #11=#:G695 #12=#:G694 |vars| #13=#:G693 |i| #14=#:G692 |u| |uu|)
    (RETURN
     (SEQ
      (LETT |u|
            (SPADCALL
             (LETT |uu| (SPADCALL (QREFELT $ 32))
                   . #15=(|FSPRMELT;primitiveElement;LR;3|))
             (QREFELT $ 34))
            . #15#)
      (LETT |vars|
            (PROGN
             (LETT #14# NIL . #15#)
             (SEQ (LETT |i| 1 . #15#) (LETT #13# (LENGTH |l|) . #15#) G190
                  (COND ((QSGREATERP |i| #13#) #16=(GO G191)))
                  (SEQ
                   (EXIT
                    (LETT #14#
                          (CONS
                           (SPADCALL (STRCONC |u| (STRINGIMAGE |i|))
                                     (QREFELT $ 35))
                           #14#)
                          . #15#)))
                  (LETT |i| (QSADD1 |i|) . #15#) #17=(GO G190) G191
                  (EXIT (NREVERSE0 #14#))))
            . #15#)
      (LETT |vv|
            (PROGN
             (LETT #12# NIL . #15#)
             (SEQ (LETT |v| NIL . #15#) (LETT #11# |vars| . #15#) G190
                  (COND
                   ((OR (ATOM #11#) (PROGN (LETT |v| (CAR #11#) . #15#) NIL))
                    #16#))
                  (SEQ
                   (EXIT
                    (LETT #12#
                          (CONS
                           (SPADCALL (SPADCALL |v| (QREFELT $ 36))
                                     (QREFELT $ 31))
                           #12#)
                          . #15#)))
                  (LETT #11# (CDR #11#) . #15#) #17# G191
                  (EXIT (NREVERSE0 #12#))))
            . #15#)
      (LETT |kers|
            (PROGN
             (LETT #10# NIL . #15#)
             (SEQ (LETT |a| NIL . #15#) (LETT #9# |l| . #15#) G190
                  (COND
                   ((OR (ATOM #9#) (PROGN (LETT |a| (CAR #9#) . #15#) NIL))
                    #16#))
                  (SEQ
                   (EXIT
                    (LETT #10# (CONS (SPADCALL |a| (QREFELT $ 37)) #10#)
                          . #15#)))
                  (LETT #9# (CDR #9#) . #15#) #17# G191
                  (EXIT (NREVERSE0 #10#))))
            . #15#)
      (LETT |pols|
            (PROGN
             (LETT #8# NIL . #15#)
             (SEQ (LETT |v| NIL . #15#) (LETT #7# |vv| . #15#)
                  (LETT |k| NIL . #15#) (LETT #6# |kers| . #15#) G190
                  (COND
                   ((OR (ATOM #6#) (PROGN (LETT |k| (CAR #6#) . #15#) NIL)
                        (ATOM #7#) (PROGN (LETT |v| (CAR #7#) . #15#) NIL))
                    #16#))
                  (SEQ
                   (EXIT
                    (LETT #8#
                          (CONS
                           (|FSPRMELT;F2P|
                            (SPADCALL
                             (SPADCALL
                              (SPADCALL (SPADCALL |k| (QREFELT $ 39)) |v|
                                        (QREFELT $ 41))
                              |kers| (QREFELT $ 44))
                             |kers| |vv| (QREFELT $ 47))
                            |vars| $)
                           #8#)
                          . #15#)))
                  (LETT #6# (PROG1 (CDR #6#) (LETT #7# (CDR #7#) . #15#))
                        . #15#)
                  #17# G191 (EXIT (NREVERSE0 #8#))))
            . #15#)
      (LETT |rec| (SPADCALL |pols| |vars| |uu| (QREFELT $ 51)) . #15#)
      (EXIT
       (VECTOR
        (PROGN
         (LETT #1# NIL . #15#)
         (SEQ (LETT |a| NIL . #15#) (LETT #5# |l| . #15#) (LETT |c| NIL . #15#)
              (LETT #4# (QVELT |rec| 0) . #15#) G190
              (COND
               ((OR (ATOM #4#) (PROGN (LETT |c| (CAR #4#) . #15#) NIL)
                    (ATOM #5#) (PROGN (LETT |a| (CAR #5#) . #15#) NIL))
                #16#))
              (SEQ
               (EXIT
                (PROGN
                 (LETT #3# (SPADCALL |c| |a| (QREFELT $ 53)) . #15#)
                 (COND
                  (#1# (LETT #2# (SPADCALL #2# #3# (QREFELT $ 54)) . #15#))
                  ('T (PROGN (LETT #2# #3# . #15#) (LETT #1# 'T . #15#)))))))
              (LETT #4# (PROG1 (CDR #4#) (LETT #5# (CDR #5#) . #15#)) . #15#)
              #17# G191 (EXIT NIL))
         (COND (#1# #2#) ('T (|spadConstant| $ 55))))
        (QVELT |rec| 1) (QVELT |rec| 2))))))) 

(DEFUN |FSPRMELT;F2UP| (|p| |k| |q| $)
  (PROG (|ans| |f|)
    (RETURN
     (SEQ (LETT |ans| (|spadConstant| $ 59) . #1=(|FSPRMELT;F2UP|))
          (SEQ G190
               (COND
                ((NULL (COND ((SPADCALL |p| (QREFELT $ 60)) 'NIL) ('T 'T)))
                 (GO G191)))
               (SEQ
                (LETT |f|
                      (SPADCALL (SPADCALL |p| (QREFELT $ 61)) |k|
                                (QREFELT $ 63))
                      . #1#)
                (LETT |ans|
                      (SPADCALL |ans|
                                (SPADCALL
                                 (SPADCALL (SPADCALL |f| (QREFELT $ 65)) |q|
                                           (QREFELT $ 66))
                                 (SPADCALL
                                  (SPADCALL
                                   (SPADCALL (SPADCALL |f| (QREFELT $ 67))
                                             (QREFELT $ 68))
                                   (QREFELT $ 11))
                                  (SPADCALL |p| (QREFELT $ 70)) (QREFELT $ 71))
                                 (QREFELT $ 72))
                                (QREFELT $ 73))
                      . #1#)
                (EXIT (LETT |p| (SPADCALL |p| (QREFELT $ 74)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |ans|))))) 

(DEFUN |FSPRMELT;primitiveElement;2FR;5| (|a1| |a2| $)
  (PROG (|q| |r| |kg| |gg| |ic1| |c2g| |g| |w| |rec| |p2| |p1| |k1| |l| |b|
         |bb| |a| |aa|)
    (RETURN
     (SEQ
      (LETT |a|
            (SPADCALL
             (LETT |aa| (SPADCALL (QREFELT $ 32))
                   . #1=(|FSPRMELT;primitiveElement;2FR;5|))
             (QREFELT $ 75))
            . #1#)
      (LETT |b|
            (SPADCALL (LETT |bb| (SPADCALL (QREFELT $ 32)) . #1#)
                      (QREFELT $ 75))
            . #1#)
      (LETT |l| (LIST |aa| |bb|) . #1#)
      (LETT |p1|
            (SPADCALL (LETT |k1| (SPADCALL |a1| (QREFELT $ 37)) . #1#)
                      (QREFELT $ 39))
            . #1#)
      (LETT |p2|
            (SPADCALL
             (CONS #'|FSPRMELT;primitiveElement;2FR;5!0| (VECTOR |a| $ |k1|))
             (SPADCALL (SPADCALL |a2| (QREFELT $ 37)) (QREFELT $ 39))
             (QREFELT $ 77))
            . #1#)
      (LETT |rec|
            (SPADCALL (|FSPRMELT;F2P| (SPADCALL |p1| |a| (QREFELT $ 41)) |l| $)
                      |aa|
                      (|FSPRMELT;F2P| (SPADCALL |p2| |b| (QREFELT $ 41)) |l| $)
                      |bb| (QREFELT $ 79))
            . #1#)
      (LETT |w|
            (SPADCALL (SPADCALL (QVELT |rec| 0) |a1| (QREFELT $ 53))
                      (SPADCALL (QVELT |rec| 1) |a2| (QREFELT $ 53))
                      (QREFELT $ 54))
            . #1#)
      (LETT |g| (SPADCALL (QVELT |rec| 2) (QREFELT $ 80)) . #1#)
      (EXIT
       (COND
        ((ZEROP (QVELT |rec| 0))
         (SEQ
          (LETT |c2g|
                (SPADCALL
                 (SPADCALL (SPADCALL (QVELT |rec| 1) (QREFELT $ 81))
                           (QREFELT $ 11))
                 |g| (QREFELT $ 82))
                . #1#)
          (LETT |r|
                (SPADCALL |p1|
                          (SPADCALL (SPADCALL |p2| |c2g| (QREFELT $ 41))
                                    (SPADCALL |a| (QREFELT $ 37)) |p1|
                                    (QREFELT $ 84))
                          (QREFELT $ 85))
                . #1#)
          (LETT |q| (|FSPRMELT;getpoly| |r| |g| $) . #1#)
          (EXIT
           (VECTOR |w| |q|
                   (SPADCALL (QVELT |rec| 1)
                             (SPADCALL (|spadConstant| $ 87) 1 (QREFELT $ 71))
                             (QREFELT $ 88))
                   (QVELT |rec| 2)))))
        ('T
         (SEQ
          (LETT |ic1|
                (SPADCALL (SPADCALL (QVELT |rec| 0) (QREFELT $ 81))
                          (QREFELT $ 11))
                . #1#)
          (LETT |gg|
                (SPADCALL
                 (SPADCALL (SPADCALL |ic1| |g| (QREFELT $ 82)) (QREFELT $ 89))
                 (SPADCALL (SPADCALL (QVELT |rec| 1) |ic1| (QREFELT $ 53)) 1
                           (QREFELT $ 71))
                 (QREFELT $ 90))
                . #1#)
          (LETT |kg| (SPADCALL |g| (QREFELT $ 37)) . #1#)
          (LETT |r|
                (SPADCALL (SPADCALL |p1| |gg| (QREFELT $ 66))
                          (|FSPRMELT;F2UP| |p2| (SPADCALL |a| (QREFELT $ 37))
                           |gg| $)
                          (QREFELT $ 85))
                . #1#)
          (LETT |q| (|FSPRMELT;getpoly| |r| |g| $) . #1#)
          (EXIT
           (VECTOR |w|
                   (SPADCALL (SPADCALL |ic1| 1 (QREFELT $ 71))
                             (SPADCALL
                              (SPADCALL (QVELT |rec| 1) |ic1| (QREFELT $ 53))
                              |q| (QREFELT $ 91))
                             (QREFELT $ 90))
                   |q| (QVELT |rec| 2))))))))))) 

(DEFUN |FSPRMELT;primitiveElement;2FR;5!0| (|z1| $$)
  (PROG (|k1| $ |a|)
    (LETT |k1| (QREFELT $$ 2) . #1=(|FSPRMELT;primitiveElement;2FR;5|))
    (LETT $ (QREFELT $$ 1) . #1#)
    (LETT |a| (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (SPADCALL (SPADCALL |z1| (LIST |k1|) (QREFELT $ 44)) (LIST |k1|)
                (LIST |a|) (QREFELT $ 47)))))) 

(DEFUN |FSPRMELT;getpoly| (|r| |g| $)
  (PROG (|k|)
    (RETURN
     (SEQ
      (COND
       ((EQL (SPADCALL |r| (QREFELT $ 70)) 1)
        (SEQ (LETT |k| (SPADCALL |g| (QREFELT $ 37)) |FSPRMELT;getpoly|)
             (EXIT
              (SPADCALL
               (SPADCALL
                (SPADCALL (SPADCALL |r| 0 (QREFELT $ 95))
                          (SPADCALL |r| (QREFELT $ 61)) (QREFELT $ 96))
                (QREFELT $ 97))
               |k| (SPADCALL |k| (QREFELT $ 39)) (QREFELT $ 84)))))
       ('T (|error| "GCD not of degree 1"))))))) 

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

(DEFUN |FunctionSpacePrimitiveElement;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|FunctionSpacePrimitiveElement|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|FunctionSpacePrimitiveElement| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 98) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#2|
                                                         '(|AlgebraicallyClosedField|))))
                      . #1#))
      (|haddProp| |$ConstructorCache| '|FunctionSpacePrimitiveElement|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (COND
       ((|testBitVector| |pv$| 1)
        (PROGN
         (QSETREFV $ 93
                   (CONS (|dispatchFunction| |FSPRMELT;primitiveElement;2FR;5|)
                         $)))))
      $)))) 

(MAKEPROP '|FunctionSpacePrimitiveElement| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|SparseMultivariatePolynomial| 6 30) (0 . |denom|)
              (5 . |coerce|) (10 . |inv|) (15 . |coerce|) (|Polynomial| 7)
              (20 . |coerce|) (25 . |numer|) (|Mapping| 13 23) (|Mapping| 13 6)
              (|SparseMultivariatePolynomial| 6 23)
              (|PolynomialCategoryLifting| (|IndexedExponents| 23) 23 6 18 13)
              (30 . |map|) (37 . *) (|Union| 26 '"failed") (|Kernel| 7)
              (43 . |symbolIfCan|) (|Boolean|) (|Symbol|) (|List| 26)
              (48 . |member?|) (54 . |coerce|) (|Kernel| $) (59 . |coerce|)
              (64 . |new|) (|String|) (68 . |string|) (73 . |coerce|)
              (78 . |kernel|) (83 . |retract|) (|SparseUnivariatePolynomial| $)
              (88 . |minPoly|) (|SparseUnivariatePolynomial| 7) (93 . |elt|)
              (|List| 23) (|AlgebraicManipulations| 6 7) (99 . |ratDenom|)
              (|List| 30) (|List| $) (105 . |subst|)
              (|Record| (|:| |coef| (|List| 52)) (|:| |poly| (|List| 40))
                        (|:| |prim| 40))
              (|List| 13) (|PrimitiveElement| 7) (112 . |primitiveElement|)
              (|Integer|) (119 . *) (125 . +) (131 . |Zero|)
              (|Record| (|:| |primelt| 7) (|:| |poly| (|List| 40))
                        (|:| |prim| 40))
              (|List| 7) |FSPRMELT;primitiveElement;LR;3| (135 . |Zero|)
              (139 . |zero?|) (144 . |leadingCoefficient|) (|Fraction| 38)
              (149 . |univariate|) (|Fraction| 40) (155 . |numer|)
              (160 . |elt|) (166 . |denom|) (171 . |retract|)
              (|NonNegativeInteger|) (176 . |degree|) (181 . |monomial|)
              (187 . *) (193 . +) (199 . |reductum|) (204 . |coerce|)
              (|Mapping| 7 7) (209 . |map|)
              (|Record| (|:| |coef1| 52) (|:| |coef2| 52) (|:| |prim| 40))
              (215 . |primitiveElement|) (223 . |rootOf|) (228 . |coerce|)
              (233 . *)
              (|PolynomialCategoryQuotientFunctions| (|IndexedExponents| 23) 23
                                                     6 18 7)
              (239 . |univariate|) (246 . |gcd|) (252 . |One|) (256 . |One|)
              (260 . *) (266 . |coerce|) (271 . -) (277 . *)
              (|Record| (|:| |primelt| 7) (|:| |pol1| 40) (|:| |pol2| 40)
                        (|:| |prim| 40))
              (283 . |primitiveElement|) (289 . |Zero|) (293 . |coefficient|)
              (299 . /) (305 . -))
           '#(|primitiveElement| 310) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 97
                                                 '(1 7 8 0 9 1 7 0 8 10 1 7 0 0
                                                   11 1 7 0 6 12 1 13 0 7 14 1
                                                   7 8 0 15 3 19 13 16 17 18 20
                                                   2 13 0 7 0 21 1 23 22 0 24 2
                                                   27 25 26 0 28 1 13 0 26 29 1
                                                   7 0 30 31 0 26 0 32 1 26 33
                                                   0 34 1 26 0 33 35 1 23 0 26
                                                   36 1 7 30 0 37 1 7 38 30 39
                                                   2 40 7 0 7 41 2 43 7 7 42 44
                                                   3 7 0 0 45 46 47 3 50 48 49
                                                   27 26 51 2 7 0 52 0 53 2 7 0
                                                   0 0 54 0 7 0 55 0 40 0 59 1
                                                   40 25 0 60 1 40 7 0 61 2 7
                                                   62 0 30 63 1 64 40 0 65 2 40
                                                   0 0 0 66 1 64 40 0 67 1 40 7
                                                   0 68 1 40 69 0 70 2 40 0 7
                                                   69 71 2 40 0 0 0 72 2 40 0 0
                                                   0 73 1 40 0 0 74 1 7 0 26 75
                                                   2 40 0 76 0 77 4 50 78 13 26
                                                   13 26 79 1 7 0 38 80 1 7 0
                                                   52 81 2 7 0 0 0 82 3 83 40 7
                                                   23 40 84 2 40 0 0 0 85 0 6 0
                                                   86 0 7 0 87 2 40 0 52 0 88 1
                                                   40 0 7 89 2 40 0 0 0 90 2 40
                                                   0 7 0 91 2 0 92 7 7 93 0 6 0
                                                   94 2 40 7 0 69 95 2 7 0 0 0
                                                   96 1 7 0 0 97 2 1 92 7 7 93
                                                   1 0 56 57 58)))))
           '|lookupComplete|)) 
