
(/VERSIONCHECK 2) 

(DEFUN |GPOLSET;construct;L$;1| (|lp| $)
  (SPADCALL |lp| (QREFELT $ 12))) 

(DEFUN |GPOLSET;copy;2$;2| (|ps| $)
  (SPADCALL (SPADCALL (SPADCALL |ps| (QREFELT $ 14)) (QREFELT $ 15))
      (QREFELT $ 13))) 

(PUT '|GPOLSET;empty;$;3| '|SPADreplace| '(XLAM NIL NIL)) 

(DEFUN |GPOLSET;empty;$;3| ($) NIL) 

(PUT '|GPOLSET;parts;$L;4| '|SPADreplace| '(XLAM (|ps|) |ps|)) 

(DEFUN |GPOLSET;parts;$L;4| (|ps| $) |ps|) 

(DEFUN |GPOLSET;map;M2$;5| (|f| |ps| $)
  (SPADCALL (SPADCALL |f| (SPADCALL |ps| (QREFELT $ 14))
                (QREFELT $ 20))
            (QREFELT $ 13))) 

(DEFUN |GPOLSET;map!;M2$;6| (|f| |ps| $)
  (SPADCALL (SPADCALL |f| (SPADCALL |ps| (QREFELT $ 14))
                (QREFELT $ 22))
            (QREFELT $ 13))) 

(DEFUN |GPOLSET;member?;P$B;7| (|p| |ps| $)
  (SPADCALL |p| (SPADCALL |ps| (QREFELT $ 14)) (QREFELT $ 25))) 

(DEFUN |GPOLSET;=;2$B;8| (|ps1| |ps2| $)
  (PROG (#0=#:G1829 #1=#:G1830 #2=#:G1831 |p| #3=#:G1832)
    (RETURN
      (SEQ (SPADCALL
               (SPADCALL
                   (PROGN
                     (LETT #0# NIL . #4=(|GPOLSET;=;2$B;8|))
                     (SEQ (LETT |p| NIL . #4#)
                          (LETT #1#
                                (SPADCALL |ps1| (QREFELT $ 18)) . #4#)
                          G190
                          (COND
                            ((OR (ATOM #1#)
                                 (PROGN
                                   (LETT |p| (CAR #1#) . #4#)
                                   NIL))
                             #5=(GO G191)))
                          (SEQ (EXIT (LETT #0# (CONS |p| #0#) . #4#)))
                          (LETT #1# (CDR #1#) . #4#) #6=(GO G190) G191
                          (EXIT (NREVERSE0 #0#))))
                   (QREFELT $ 28))
               (SPADCALL
                   (PROGN
                     (LETT #2# NIL . #4#)
                     (SEQ (LETT |p| NIL . #4#)
                          (LETT #3#
                                (SPADCALL |ps2| (QREFELT $ 18)) . #4#)
                          G190
                          (COND
                            ((OR (ATOM #3#)
                                 (PROGN
                                   (LETT |p| (CAR #3#) . #4#)
                                   NIL))
                             #5#))
                          (SEQ (EXIT (LETT #2# (CONS |p| #2#) . #4#)))
                          (LETT #3# (CDR #3#) . #4#) #6# G191
                          (EXIT (NREVERSE0 #2#))))
                   (QREFELT $ 28))
               (QREFELT $ 29)))))) 

(DEFUN |GPOLSET;coerce;$Of;9| (|ps| $)
  (PROG (|lp| #0=#:G1837 |p| #1=#:G1838)
    (RETURN
      (SEQ (LETT |lp|
                 (SPADCALL (ELT $ 31) (SPADCALL |ps| (QREFELT $ 14))
                     (QREFELT $ 33))
                 . #2=(|GPOLSET;coerce;$Of;9|))
           (EXIT (SPADCALL
                     (PROGN
                       (LETT #0# NIL . #2#)
                       (SEQ (LETT |p| NIL . #2#) (LETT #1# |lp| . #2#)
                            G190
                            (COND
                              ((OR (ATOM #1#)
                                   (PROGN
                                     (LETT |p| (CAR #1#) . #2#)
                                     NIL))
                               (GO G191)))
                            (SEQ (EXIT (LETT #0#
                                        (CONS
                                         (SPADCALL |p| (QREFELT $ 35))
                                         #0#) . #2#)))
                            (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                            (EXIT (NREVERSE0 #0#))))
                     (QREFELT $ 37))))))) 

(DEFUN |GPOLSET;mvar;$VarSet;10| (|ps| $)
  (PROG (|lv|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ps| (QREFELT $ 39))
              (|error| "Error from GPOLSET in mvar : #1 is empty"))
             ('T
              (SEQ (LETT |lv| (SPADCALL |ps| (QREFELT $ 41))
                         |GPOLSET;mvar;$VarSet;10|)
                   (EXIT (COND
                           ((NULL |lv|)
                            (|error| "Error from GPOLSET in mvar : every polynomial in #1 is constant"))
                           ('T
                            (SPADCALL (ELT $ 42) |lv| (QREFELT $ 44)))))))))))) 

(DEFUN |GPOLSET;retractIfCan;LU;11| (|lp| $)
  (CONS 0 (SPADCALL |lp| (QREFELT $ 13)))) 

(PUT '|GPOLSET;coerce;$L;12| '|SPADreplace| '(XLAM (|ps|) |ps|)) 

(DEFUN |GPOLSET;coerce;$L;12| (|ps| $) |ps|) 

(DEFUN |GPOLSET;convert;L$;13| (|lp| $)
  (SPADCALL |lp| (QREFELT $ 13))) 

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

(DEFUN |GeneralPolynomialSet;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ #0=#:G1860 |pv$| #1=#:G1861)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #2=(|GeneralPolynomialSet|))
        (LETT DV$2 (|devaluate| |#2|) . #2#)
        (LETT DV$3 (|devaluate| |#3|) . #2#)
        (LETT DV$4 (|devaluate| |#4|) . #2#)
        (LETT |dv$|
              (LIST '|GeneralPolynomialSet| DV$1 DV$2 DV$3 DV$4) . #2#)
        (LETT $ (GETREFV 62) . #2#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#4|
                                '(|ConvertibleTo| (|InputForm|)))
                            (LETT #0#
                                  (|HasCategory| |#4| '(|SetCategory|)) . #2#)
                            (AND #0#
                                 (|HasCategory| |#4|
                                     (LIST '|Evalable|
                                      (|devaluate| |#4|))))
                            (|HasCategory| |#1| '(|IntegralDomain|)))) . #2#))
        (|haddProp| |$ConstructorCache| '|GeneralPolynomialSet|
            (LIST DV$1 DV$2 DV$3 DV$4) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (QSETREFV $ 9 |#4|)
        (AND (|HasCategory| $ '(|shallowlyMutable|))
             (|augmentPredVector| $ 16))
        (AND (LETT #1# (|HasCategory| $ '(|finiteAggregate|)) . #2#)
             (|augmentPredVector| $ 32))
        (AND #1# #0# (|augmentPredVector| $ 64))
        (QSETREFV $ 10 (|List| |#4|))
        $)))) 

(MAKEPROP '|GeneralPolynomialSet| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) '|Rep| (|List| 9)
             (0 . |removeDuplicates|) |GPOLSET;construct;L$;1|
             (5 . |members|) (10 . |copy|) |GPOLSET;copy;2$;2|
             |GPOLSET;empty;$;3| |GPOLSET;parts;$L;4| (|Mapping| 9 9)
             (15 . |map|) |GPOLSET;map;M2$;5| (21 . |map!|)
             |GPOLSET;map!;M2$;6| (|Boolean|) (27 . |member?|)
             |GPOLSET;member?;P$B;7| (|Set| 9) (33 . |brace|) (38 . =)
             |GPOLSET;=;2$B;8| (44 . |infRittWu?|) (|Mapping| 24 9 9)
             (50 . |sort|) (|OutputForm|) (56 . |coerce|) (|List| $)
             (61 . |brace|) |GPOLSET;coerce;$Of;9| (66 . |empty?|)
             (|List| 8) (71 . |variables|) (76 . |max|)
             (|Mapping| 8 8 8) (82 . |reduce|)
             |GPOLSET;mvar;$VarSet;10| (|Union| $ '"failed")
             |GPOLSET;retractIfCan;LU;11| |GPOLSET;coerce;$L;12|
             |GPOLSET;convert;L$;13| (|NonNegativeInteger|)
             (|Mapping| 9 9 9) (|Equation| 9) (|List| 52)
             (|Mapping| 24 9) (|InputForm|)
             (|Record| (|:| |num| 9) (|:| |den| 6))
             (|Record| (|:| |rnum| 6) (|:| |polnum| 9) (|:| |den| 6))
             (|Record| (|:| |under| $) (|:| |floor| $) (|:| |upper| $))
             (|Union| 9 '"failed") (|String|) (|SingleInteger|))
          '#(~= 88 |variables| 94 |trivialIdeal?| 99 |triangular?| 104
             |sort| 109 |size?| 115 |select| 121 |sample| 127
             |roughUnitIdeal?| 131 |roughSubIdeal?| 136
             |roughEqualIdeals?| 142 |roughBase?| 148
             |rewriteIdealWithRemainder| 153
             |rewriteIdealWithHeadRemainder| 159 |retractIfCan| 165
             |retract| 170 |removeDuplicates| 175 |remove| 180
             |remainder| 192 |reduce| 198 |parts| 219 |mvar| 224
             |more?| 229 |members| 235 |member?| 240 |map!| 246 |map|
             252 |mainVariables| 258 |mainVariable?| 263 |less?| 269
             |latex| 275 |iexactQuo| 280 |headRemainder| 286 |hash| 292
             |find| 297 |every?| 303 |eval| 309 |eq?| 335 |empty?| 341
             |empty| 346 |count| 350 |copy| 362 |convert| 367
             |construct| 377 |collectUpper| 382 |collectUnder| 388
             |collect| 394 |coerce| 400 |any?| 410 = 416 |#| 422)
          'NIL
          (CONS (|makeByteWordVec2| 3 '(0 0 0 0 0 3 0 0 0 0 0 0 3 1))
                (CONS '#(|PolynomialSetCategory&| |Collection&|
                         |HomogeneousAggregate&| |SetCategory&|
                         |Aggregate&| |Evalable&| |BasicType&| NIL NIL
                         NIL NIL NIL |InnerEvalable&| NIL)
                      (CONS '#((|PolynomialSetCategory| 6 7 8 9)
                               (|Collection| 9)
                               (|HomogeneousAggregate| 9)
                               (|SetCategory|) (|Aggregate|)
                               (|Evalable| 9) (|BasicType|)
                               (|shallowlyMutable|) (|finiteAggregate|)
                               (|CoercibleTo| (|List| 9)) (|Type|)
                               (|CoercibleTo| 34) (|InnerEvalable| 9 9)
                               (|ConvertibleTo| 55))
                            (|makeByteWordVec2| 61
                                '(1 11 0 0 12 1 0 11 0 14 1 11 0 0 15 2
                                  11 0 19 0 20 2 11 0 19 0 22 2 11 24 9
                                  0 25 1 27 0 11 28 2 27 24 0 0 29 2 9
                                  24 0 0 31 2 11 0 32 0 33 1 9 34 0 35
                                  1 34 0 36 37 1 0 24 0 39 1 0 40 0 41
                                  2 8 0 0 0 42 2 40 8 43 0 44 2 0 24 0
                                  0 1 1 0 40 0 41 1 0 24 0 1 1 4 24 0 1
                                  2 0 58 0 8 1 2 0 24 0 50 1 2 6 0 54 0
                                  1 0 0 0 1 1 4 24 0 1 2 4 24 0 0 1 2 4
                                  24 0 0 1 1 4 24 0 1 2 4 11 11 0 1 2 4
                                  11 11 0 1 1 0 46 11 47 1 0 0 11 1 1 7
                                  0 0 1 2 7 0 9 0 1 2 6 0 54 0 1 2 4 57
                                  9 0 1 4 7 9 51 0 9 9 1 2 6 9 51 0 1 3
                                  6 9 51 0 9 1 1 6 11 0 18 1 0 8 0 45 2
                                  0 24 0 50 1 1 6 11 0 14 2 7 24 9 0 26
                                  2 5 0 19 0 23 2 0 0 19 0 21 1 0 40 0
                                  1 2 0 24 8 0 1 2 0 24 0 50 1 1 0 60 0
                                  1 2 4 6 6 6 1 2 4 56 9 0 1 1 0 61 0 1
                                  2 0 59 54 0 1 2 6 24 54 0 1 2 3 0 0
                                  52 1 2 3 0 0 53 1 3 3 0 0 11 11 1 3 3
                                  0 0 9 9 1 2 0 24 0 0 1 1 0 24 0 39 0
                                  0 0 17 2 7 50 9 0 1 2 6 50 54 0 1 1 0
                                  0 0 16 1 1 55 0 1 1 0 0 11 49 1 0 0
                                  11 13 2 0 0 0 8 1 2 0 0 0 8 1 2 0 0 0
                                  8 1 1 0 11 0 48 1 0 34 0 38 2 6 24 54
                                  0 1 2 0 24 0 0 30 1 6 50 0 1)))))
          '|lookupComplete|)) 
