aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/polset.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/polset.spad.pamphlet')
-rw-r--r--src/algebra/polset.spad.pamphlet1042
1 files changed, 968 insertions, 74 deletions
diff --git a/src/algebra/polset.spad.pamphlet b/src/algebra/polset.spad.pamphlet
index 4e21255d..14527801 100644
--- a/src/algebra/polset.spad.pamphlet
+++ b/src/algebra/polset.spad.pamphlet
@@ -368,15 +368,128 @@ Note that this code is not included in the generated catdef.spad file.
<<PSETCAT.lsp BOOTSTRAP>>=
-(|/VERSIONCHECK| 2)
-
-(SETQ |PolynomialSetCategory;CAT| (QUOTE NIL))
-
-(SETQ |PolynomialSetCategory;AL| (QUOTE NIL))
-
-(DEFUN |PolynomialSetCategory| (|&REST| #1=#:G82375 |&AUX| #2=#:G82373) (DSETQ #2# #1#) (LET (#3=#:G82374) (COND ((SETQ #3# (|assoc| (|devaluateList| #2#) |PolynomialSetCategory;AL|)) (CDR #3#)) (T (SETQ |PolynomialSetCategory;AL| (|cons5| (CONS (|devaluateList| #2#) (SETQ #3# (APPLY (FUNCTION |PolynomialSetCategory;|) #2#))) |PolynomialSetCategory;AL|)) #3#))))
-
-(DEFUN |PolynomialSetCategory;| (|t#1| |t#2| |t#3| |t#4|) (PROG (#1=#:G82372) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1| |t#2| |t#3| |t#4|)) (LIST (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|) (|devaluate| |t#4|))) (|sublisV| (PAIR (QUOTE (#2=#:G82371)) (LIST (QUOTE (|List| |t#4|)))) (COND (|PolynomialSetCategory;CAT|) ((QUOTE T) (LETT |PolynomialSetCategory;CAT| (|Join| (|SetCategory|) (|Collection| (QUOTE |t#4|)) (|CoercibleTo| (QUOTE #2#)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|retractIfCan| ((|Union| |$| "failed") (|List| |t#4|))) T) ((|retract| (|$| (|List| |t#4|))) T) ((|mvar| (|t#3| |$|)) T) ((|variables| ((|List| |t#3|) |$|)) T) ((|mainVariables| ((|List| |t#3|) |$|)) T) ((|mainVariable?| ((|Boolean|) |t#3| |$|)) T) ((|collectUnder| (|$| |$| |t#3|)) T) ((|collect| (|$| |$| |t#3|)) T) ((|collectUpper| (|$| |$| |t#3|)) T) ((|sort| ((|Record| (|:| |under| |$|) (|:| |floor| |$|) (|:| |upper| |$|)) |$| |t#3|)) T) ((|trivialIdeal?| ((|Boolean|) |$|)) T) ((|roughBase?| ((|Boolean|) |$|)) (|has| |t#1| (|IntegralDomain|))) ((|roughSubIdeal?| ((|Boolean|) |$| |$|)) (|has| |t#1| (|IntegralDomain|))) ((|roughEqualIdeals?| ((|Boolean|) |$| |$|)) (|has| |t#1| (|IntegralDomain|))) ((|roughUnitIdeal?| ((|Boolean|) |$|)) (|has| |t#1| (|IntegralDomain|))) ((|headRemainder| ((|Record| (|:| |num| |t#4|) (|:| |den| |t#1|)) |t#4| |$|)) (|has| |t#1| (|IntegralDomain|))) ((|remainder| ((|Record| (|:| |rnum| |t#1|) (|:| |polnum| |t#4|) (|:| |den| |t#1|)) |t#4| |$|)) (|has| |t#1| (|IntegralDomain|))) ((|rewriteIdealWithHeadRemainder| ((|List| |t#4|) (|List| |t#4|) |$|)) (|has| |t#1| (|IntegralDomain|))) ((|rewriteIdealWithRemainder| ((|List| |t#4|) (|List| |t#4|) |$|)) (|has| |t#1| (|IntegralDomain|))) ((|triangular?| ((|Boolean|) |$|)) (|has| |t#1| (|IntegralDomain|))))) (QUOTE ((|finiteAggregate| T))) (QUOTE ((|Boolean|) (|List| |t#4|) (|List| |t#3|))) NIL)) . #3=(|PolynomialSetCategory|)))))) . #3#) (SETELT #1# 0 (LIST (QUOTE |PolynomialSetCategory|) (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|) (|devaluate| |t#4|)))))))
+(/VERSIONCHECK 2)
+
+(DEFPARAMETER |PolynomialSetCategory;CAT| 'NIL)
+
+(DEFPARAMETER |PolynomialSetCategory;AL| 'NIL)
+
+(DEFUN |PolynomialSetCategory| (&REST #0=#:G1422 &AUX #1=#:G1420)
+ (DSETQ #1# #0#)
+ (LET (#2=#:G1421)
+ (COND
+ ((SETQ #2#
+ (|assoc| (|devaluateList| #1#) |PolynomialSetCategory;AL|))
+ (CDR #2#))
+ (T (SETQ |PolynomialSetCategory;AL|
+ (|cons5| (CONS (|devaluateList| #1#)
+ (SETQ #2#
+ (APPLY #'|PolynomialSetCategory;|
+ #1#)))
+ |PolynomialSetCategory;AL|))
+ #2#))))
+
+(DEFUN |PolynomialSetCategory;| (|t#1| |t#2| |t#3| |t#4|)
+ (PROG (#0=#:G1419)
+ (RETURN
+ (PROG1 (LETT #0#
+ (|sublisV|
+ (PAIR '(|t#1| |t#2| |t#3| |t#4|)
+ (LIST (|devaluate| |t#1|)
+ (|devaluate| |t#2|)
+ (|devaluate| |t#3|)
+ (|devaluate| |t#4|)))
+ (|sublisV|
+ (PAIR '(#1=#:G1418) (LIST '(|List| |t#4|)))
+ (COND
+ (|PolynomialSetCategory;CAT|)
+ ('T
+ (LETT |PolynomialSetCategory;CAT|
+ (|Join| (|SetCategory|)
+ (|Collection| '|t#4|)
+ (|CoercibleTo| '#1#)
+ (|mkCategory| '|domain|
+ '(((|retractIfCan|
+ ((|Union| $ "failed")
+ (|List| |t#4|)))
+ T)
+ ((|retract| ($ (|List| |t#4|)))
+ T)
+ ((|mvar| (|t#3| $)) T)
+ ((|variables|
+ ((|List| |t#3|) $))
+ T)
+ ((|mainVariables|
+ ((|List| |t#3|) $))
+ T)
+ ((|mainVariable?|
+ ((|Boolean|) |t#3| $))
+ T)
+ ((|collectUnder| ($ $ |t#3|))
+ T)
+ ((|collect| ($ $ |t#3|)) T)
+ ((|collectUpper| ($ $ |t#3|))
+ T)
+ ((|sort|
+ ((|Record| (|:| |under| $)
+ (|:| |floor| $)
+ (|:| |upper| $))
+ $ |t#3|))
+ T)
+ ((|trivialIdeal?|
+ ((|Boolean|) $))
+ T)
+ ((|roughBase?| ((|Boolean|) $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|roughSubIdeal?|
+ ((|Boolean|) $ $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|roughEqualIdeals?|
+ ((|Boolean|) $ $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|roughUnitIdeal?|
+ ((|Boolean|) $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|headRemainder|
+ ((|Record| (|:| |num| |t#4|)
+ (|:| |den| |t#1|))
+ |t#4| $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|remainder|
+ ((|Record| (|:| |rnum| |t#1|)
+ (|:| |polnum| |t#4|)
+ (|:| |den| |t#1|))
+ |t#4| $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|rewriteIdealWithHeadRemainder|
+ ((|List| |t#4|)
+ (|List| |t#4|) $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|rewriteIdealWithRemainder|
+ ((|List| |t#4|)
+ (|List| |t#4|) $))
+ (|has| |t#1|
+ (|IntegralDomain|)))
+ ((|triangular?|
+ ((|Boolean|) $))
+ (|has| |t#1|
+ (|IntegralDomain|))))
+ '((|finiteAggregate| T))
+ '((|Boolean|) (|List| |t#4|)
+ (|List| |t#3|))
+ NIL))
+ . #2=(|PolynomialSetCategory|)))))) . #2#)
+ (SETELT #0# 0
+ (LIST '|PolynomialSetCategory| (|devaluate| |t#1|)
+ (|devaluate| |t#2|) (|devaluate| |t#3|)
+ (|devaluate| |t#4|)))))))
@
\section{PSETCAT-.lsp BOOTSTRAP}
{\bf PSETCAT-} depends on {\bf PSETCAT}. We need to break this cycle to build
@@ -389,71 +502,852 @@ Note that this code is not included in the generated catdef.spad file.
<<PSETCAT-.lsp BOOTSTRAP>>=
-(|/VERSIONCHECK| 2)
-
-(DEFUN |PSETCAT-;elements| (|ps| |$|) (PROG (|lp|) (RETURN (LETT |lp| (SPADCALL |ps| (QREFELT |$| 12)) |PSETCAT-;elements|))))
-
-(DEFUN |PSETCAT-;variables1| (|lp| |$|) (PROG (#1=#:G82392 |p| #2=#:G82393 |lvars|) (RETURN (SEQ (LETT |lvars| (PROGN (LETT #1# NIL |PSETCAT-;variables1|) (SEQ (LETT |p| NIL |PSETCAT-;variables1|) (LETT #2# |lp| |PSETCAT-;variables1|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;variables1|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |p| (QREFELT |$| 14)) #1#) |PSETCAT-;variables1|))) (LETT #2# (CDR #2#) |PSETCAT-;variables1|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |PSETCAT-;variables1|) (EXIT (SPADCALL (CONS (FUNCTION |PSETCAT-;variables1!0|) |$|) (SPADCALL (SPADCALL |lvars| (QREFELT |$| 18)) (QREFELT |$| 19)) (QREFELT |$| 21)))))))
-
-(DEFUN |PSETCAT-;variables1!0| (|#1| |#2| |$|) (SPADCALL |#2| |#1| (QREFELT |$| 16)))
-
-(DEFUN |PSETCAT-;variables2| (|lp| |$|) (PROG (#1=#:G82397 |p| #2=#:G82398 |lvars|) (RETURN (SEQ (LETT |lvars| (PROGN (LETT #1# NIL |PSETCAT-;variables2|) (SEQ (LETT |p| NIL |PSETCAT-;variables2|) (LETT #2# |lp| |PSETCAT-;variables2|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;variables2|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |p| (QREFELT |$| 22)) #1#) |PSETCAT-;variables2|))) (LETT #2# (CDR #2#) |PSETCAT-;variables2|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |PSETCAT-;variables2|) (EXIT (SPADCALL (CONS (FUNCTION |PSETCAT-;variables2!0|) |$|) (SPADCALL |lvars| (QREFELT |$| 19)) (QREFELT |$| 21)))))))
-
-(DEFUN |PSETCAT-;variables2!0| (|#1| |#2| |$|) (SPADCALL |#2| |#1| (QREFELT |$| 16)))
-
-(DEFUN |PSETCAT-;variables;SL;4| (|ps| |$|) (|PSETCAT-;variables1| (|PSETCAT-;elements| |ps| |$|) |$|))
-
-(DEFUN |PSETCAT-;mainVariables;SL;5| (|ps| |$|) (|PSETCAT-;variables2| (SPADCALL (ELT |$| 24) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)) |$|))
-
-(DEFUN |PSETCAT-;mainVariable?;VarSetSB;6| (|v| |ps| |$|) (PROG (|lp|) (RETURN (SEQ (LETT |lp| (SPADCALL (ELT |$| 24) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)) |PSETCAT-;mainVariable?;VarSetSB;6|) (SEQ G190 (COND ((NULL (COND ((OR (NULL |lp|) (SPADCALL (SPADCALL (|SPADfirst| |lp|) (QREFELT |$| 22)) |v| (QREFELT |$| 28))) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (EXIT (LETT |lp| (CDR |lp|) |PSETCAT-;mainVariable?;VarSetSB;6|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))))))
-
-(DEFUN |PSETCAT-;collectUnder;SVarSetS;7| (|ps| |v| |$|) (PROG (|p| |lp| |lq|) (RETURN (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;collectUnder;SVarSetS;7|) (LETT |lq| NIL |PSETCAT-;collectUnder;SVarSetS;7|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collectUnder;SVarSetS;7|) (LETT |lp| (CDR |lp|) |PSETCAT-;collectUnder;SVarSetS;7|) (EXIT (COND ((OR (SPADCALL |p| (QREFELT |$| 24)) (SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 16))) (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collectUnder;SVarSetS;7|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |lq| (QREFELT |$| 30)))))))
-
-(DEFUN |PSETCAT-;collectUpper;SVarSetS;8| (|ps| |v| |$|) (PROG (|p| |lp| |lq|) (RETURN (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;collectUpper;SVarSetS;8|) (LETT |lq| NIL |PSETCAT-;collectUpper;SVarSetS;8|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collectUpper;SVarSetS;8|) (LETT |lp| (CDR |lp|) |PSETCAT-;collectUpper;SVarSetS;8|) (EXIT (COND ((NULL (SPADCALL |p| (QREFELT |$| 24))) (COND ((SPADCALL |v| (SPADCALL |p| (QREFELT |$| 22)) (QREFELT |$| 16)) (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collectUpper;SVarSetS;8|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |lq| (QREFELT |$| 30)))))))
-
-(DEFUN |PSETCAT-;collect;SVarSetS;9| (|ps| |v| |$|) (PROG (|p| |lp| |lq|) (RETURN (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;collect;SVarSetS;9|) (LETT |lq| NIL |PSETCAT-;collect;SVarSetS;9|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collect;SVarSetS;9|) (LETT |lp| (CDR |lp|) |PSETCAT-;collect;SVarSetS;9|) (EXIT (COND ((NULL (SPADCALL |p| (QREFELT |$| 24))) (COND ((SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 28)) (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collect;SVarSetS;9|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |lq| (QREFELT |$| 30)))))))
-
-(DEFUN |PSETCAT-;sort;SVarSetR;10| (|ps| |v| |$|) (PROG (|p| |lp| |us| |vs| |ws|) (RETURN (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;sort;SVarSetR;10|) (LETT |us| NIL |PSETCAT-;sort;SVarSetR;10|) (LETT |vs| NIL |PSETCAT-;sort;SVarSetR;10|) (LETT |ws| NIL |PSETCAT-;sort;SVarSetR;10|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;sort;SVarSetR;10|) (LETT |lp| (CDR |lp|) |PSETCAT-;sort;SVarSetR;10|) (EXIT (COND ((OR (SPADCALL |p| (QREFELT |$| 24)) (SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 16))) (LETT |us| (CONS |p| |us|) |PSETCAT-;sort;SVarSetR;10|)) ((SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 28)) (LETT |vs| (CONS |p| |vs|) |PSETCAT-;sort;SVarSetR;10|)) ((QUOTE T) (LETT |ws| (CONS |p| |ws|) |PSETCAT-;sort;SVarSetR;10|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (VECTOR (SPADCALL |us| (QREFELT |$| 30)) (SPADCALL |vs| (QREFELT |$| 30)) (SPADCALL |ws| (QREFELT |$| 30))))))))
-
-(DEFUN |PSETCAT-;=;2SB;11| (|ps1| |ps2| |$|) (PROG (#1=#:G82439 #2=#:G82440 #3=#:G82437 |p| #4=#:G82438) (RETURN (SEQ (SPADCALL (SPADCALL (PROGN (LETT #1# NIL |PSETCAT-;=;2SB;11|) (SEQ (LETT |p| NIL |PSETCAT-;=;2SB;11|) (LETT #2# (|PSETCAT-;elements| |ps1| |$|) |PSETCAT-;=;2SB;11|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;=;2SB;11|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS |p| #1#) |PSETCAT-;=;2SB;11|))) (LETT #2# (CDR #2#) |PSETCAT-;=;2SB;11|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 37)) (SPADCALL (PROGN (LETT #3# NIL |PSETCAT-;=;2SB;11|) (SEQ (LETT |p| NIL |PSETCAT-;=;2SB;11|) (LETT #4# (|PSETCAT-;elements| |ps2| |$|) |PSETCAT-;=;2SB;11|) G190 (COND ((OR (ATOM #4#) (PROGN (LETT |p| (CAR #4#) |PSETCAT-;=;2SB;11|) NIL)) (GO G191))) (SEQ (EXIT (LETT #3# (CONS |p| #3#) |PSETCAT-;=;2SB;11|))) (LETT #4# (CDR #4#) |PSETCAT-;=;2SB;11|) (GO G190) G191 (EXIT (NREVERSE0 #3#)))) (QREFELT |$| 37)) (QREFELT |$| 38))))))
-
-(DEFUN |PSETCAT-;localInf?| (|p| |q| |$|) (SPADCALL (SPADCALL |p| (QREFELT |$| 40)) (SPADCALL |q| (QREFELT |$| 40)) (QREFELT |$| 41)))
-
-(DEFUN |PSETCAT-;localTriangular?| (|lp| |$|) (PROG (|q| |p|) (RETURN (SEQ (LETT |lp| (SPADCALL (ELT |$| 42) |lp| (QREFELT |$| 26)) |PSETCAT-;localTriangular?|) (EXIT (COND ((NULL |lp|) (QUOTE T)) ((SPADCALL (ELT |$| 24) |lp| (QREFELT |$| 43)) (QUOTE NIL)) ((QUOTE T) (SEQ (LETT |lp| (SPADCALL (CONS (FUNCTION |PSETCAT-;localTriangular?!0|) |$|) |lp| (QREFELT |$| 45)) |PSETCAT-;localTriangular?|) (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;localTriangular?|) (LETT |lp| (CDR |lp|) |PSETCAT-;localTriangular?|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (SPADCALL (SPADCALL (LETT |q| (|SPADfirst| |lp|) |PSETCAT-;localTriangular?|) (QREFELT |$| 22)) (SPADCALL |p| (QREFELT |$| 22)) (QREFELT |$| 16))))) (GO G191))) (SEQ (LETT |p| |q| |PSETCAT-;localTriangular?|) (EXIT (LETT |lp| (CDR |lp|) |PSETCAT-;localTriangular?|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (NULL |lp|))))))))))
-
-(DEFUN |PSETCAT-;localTriangular?!0| (|#1| |#2| |$|) (SPADCALL (SPADCALL |#2| (QREFELT |$| 22)) (SPADCALL |#1| (QREFELT |$| 22)) (QREFELT |$| 16)))
-
-(DEFUN |PSETCAT-;triangular?;SB;14| (|ps| |$|) (|PSETCAT-;localTriangular?| (|PSETCAT-;elements| |ps| |$|) |$|))
-
-(DEFUN |PSETCAT-;trivialIdeal?;SB;15| (|ps| |$|) (NULL (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))))
-
-(DEFUN |PSETCAT-;roughUnitIdeal?;SB;16| (|ps| |$|) (SPADCALL (ELT |$| 24) (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)) (QREFELT |$| 43)))
-
-(DEFUN |PSETCAT-;relativelyPrimeLeadingMonomials?| (|p| |q| |$|) (PROG (|dp| |dq|) (RETURN (SEQ (LETT |dp| (SPADCALL |p| (QREFELT |$| 40)) |PSETCAT-;relativelyPrimeLeadingMonomials?|) (LETT |dq| (SPADCALL |q| (QREFELT |$| 40)) |PSETCAT-;relativelyPrimeLeadingMonomials?|) (EXIT (SPADCALL (SPADCALL |dp| |dq| (QREFELT |$| 49)) (SPADCALL |dp| |dq| (QREFELT |$| 50)) (QREFELT |$| 51)))))))
-
-(DEFUN |PSETCAT-;roughBase?;SB;18| (|ps| |$|) (PROG (|p| |lp| |rB?| |copylp|) (RETURN (SEQ (LETT |lp| (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)) |PSETCAT-;roughBase?;SB;18|) (EXIT (COND ((NULL |lp|) (QUOTE T)) ((QUOTE T) (SEQ (LETT |rB?| (QUOTE T) |PSETCAT-;roughBase?;SB;18|) (SEQ G190 (COND ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) |rB?|))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;roughBase?;SB;18|) (LETT |lp| (CDR |lp|) |PSETCAT-;roughBase?;SB;18|) (LETT |copylp| |lp| |PSETCAT-;roughBase?;SB;18|) (EXIT (SEQ G190 (COND ((NULL (COND ((NULL |copylp|) (QUOTE NIL)) ((QUOTE T) |rB?|))) (GO G191))) (SEQ (LETT |rB?| (|PSETCAT-;relativelyPrimeLeadingMonomials?| |p| (|SPADfirst| |copylp|) |$|) |PSETCAT-;roughBase?;SB;18|) (EXIT (LETT |copylp| (CDR |copylp|) |PSETCAT-;roughBase?;SB;18|))) NIL (GO G190) G191 (EXIT NIL)))) NIL (GO G190) G191 (EXIT NIL)) (EXIT |rB?|)))))))))
-
-(DEFUN |PSETCAT-;roughSubIdeal?;2SB;19| (|ps1| |ps2| |$|) (PROG (|lp|) (RETURN (SEQ (LETT |lp| (SPADCALL (|PSETCAT-;elements| |ps1| |$|) |ps2| (QREFELT |$| 53)) |PSETCAT-;roughSubIdeal?;2SB;19|) (EXIT (NULL (SPADCALL (ELT |$| 42) |lp| (QREFELT |$| 26))))))))
-
-(DEFUN |PSETCAT-;roughEqualIdeals?;2SB;20| (|ps1| |ps2| |$|) (COND ((SPADCALL |ps1| |ps2| (QREFELT |$| 55)) (QUOTE T)) ((SPADCALL |ps1| |ps2| (QREFELT |$| 56)) (SPADCALL |ps2| |ps1| (QREFELT |$| 56))) ((QUOTE T) (QUOTE NIL))))
-
-(DEFUN |PSETCAT-;exactQuo| (|r| |s| |$|) (SPADCALL |r| |s| (QREFELT |$| 58)))
-
-(DEFUN |PSETCAT-;exactQuo| (|r| |s| |$|) (PROG (#1=#:G82473) (RETURN (PROG2 (LETT #1# (SPADCALL |r| |s| (QREFELT |$| 60)) |PSETCAT-;exactQuo|) (QCDR #1#) (|check-union| (QEQCAR #1# 0) (QREFELT |$| 7) #1#)))))
-
-(DEFUN |PSETCAT-;headRemainder;PSR;23| (|a| |ps| |$|) (PROG (|lp1| |p| |e| |g| |#G47| |#G48| |lca| |lcp| |r| |lp2|) (RETURN (SEQ (LETT |lp1| (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)) |PSETCAT-;headRemainder;PSR;23|) (EXIT (COND ((NULL |lp1|) (CONS |a| (|spadConstant| |$| 61))) ((SPADCALL (ELT |$| 24) |lp1| (QREFELT |$| 43)) (CONS (SPADCALL |a| (QREFELT |$| 62)) (|spadConstant| |$| 61))) ((QUOTE T) (SEQ (LETT |r| (|spadConstant| |$| 61) |PSETCAT-;headRemainder;PSR;23|) (LETT |lp1| (SPADCALL (CONS (|function| |PSETCAT-;localInf?|) |$|) (REVERSE (|PSETCAT-;elements| |ps| |$|)) (QREFELT |$| 45)) |PSETCAT-;headRemainder;PSR;23|) (LETT |lp2| |lp1| |PSETCAT-;headRemainder;PSR;23|) (SEQ G190 (COND ((NULL (COND ((OR (SPADCALL |a| (QREFELT |$| 42)) (NULL |lp2|)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |lp2|) |PSETCAT-;headRemainder;PSR;23|) (LETT |e| (SPADCALL (SPADCALL |a| (QREFELT |$| 40)) (SPADCALL |p| (QREFELT |$| 40)) (QREFELT |$| 63)) |PSETCAT-;headRemainder;PSR;23|) (EXIT (COND ((QEQCAR |e| 0) (SEQ (LETT |g| (SPADCALL (LETT |lca| (SPADCALL |a| (QREFELT |$| 64)) |PSETCAT-;headRemainder;PSR;23|) (LETT |lcp| (SPADCALL |p| (QREFELT |$| 64)) |PSETCAT-;headRemainder;PSR;23|) (QREFELT |$| 65)) |PSETCAT-;headRemainder;PSR;23|) (PROGN (LETT |#G47| (|PSETCAT-;exactQuo| |lca| |g| |$|) |PSETCAT-;headRemainder;PSR;23|) (LETT |#G48| (|PSETCAT-;exactQuo| |lcp| |g| |$|) |PSETCAT-;headRemainder;PSR;23|) (LETT |lca| |#G47| |PSETCAT-;headRemainder;PSR;23|) (LETT |lcp| |#G48| |PSETCAT-;headRemainder;PSR;23|)) (LETT |a| (SPADCALL (SPADCALL |lcp| (SPADCALL |a| (QREFELT |$| 62)) (QREFELT |$| 66)) (SPADCALL (SPADCALL |lca| (QCDR |e|) (QREFELT |$| 67)) (SPADCALL |p| (QREFELT |$| 62)) (QREFELT |$| 68)) (QREFELT |$| 69)) |PSETCAT-;headRemainder;PSR;23|) (LETT |r| (SPADCALL |r| |lcp| (QREFELT |$| 70)) |PSETCAT-;headRemainder;PSR;23|) (EXIT (LETT |lp2| |lp1| |PSETCAT-;headRemainder;PSR;23|)))) ((QUOTE T) (LETT |lp2| (CDR |lp2|) |PSETCAT-;headRemainder;PSR;23|))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (CONS |a| |r|))))))))))
-
-(DEFUN |PSETCAT-;makeIrreducible!| (|frac| |$|) (PROG (|g|) (RETURN (SEQ (LETT |g| (SPADCALL (QCDR |frac|) (QCAR |frac|) (QREFELT |$| 73)) |PSETCAT-;makeIrreducible!|) (EXIT (COND ((SPADCALL |g| (QREFELT |$| 74)) |frac|) ((QUOTE T) (SEQ (PROGN (RPLACA |frac| (SPADCALL (QCAR |frac|) |g| (QREFELT |$| 75))) (QCAR |frac|)) (PROGN (RPLACD |frac| (|PSETCAT-;exactQuo| (QCDR |frac|) |g| |$|)) (QCDR |frac|)) (EXIT |frac|)))))))))
-
-(DEFUN |PSETCAT-;remainder;PSR;25| (|a| |ps| |$|) (PROG (|hRa| |r| |lca| |g| |b| |c|) (RETURN (SEQ (LETT |hRa| (|PSETCAT-;makeIrreducible!| (SPADCALL |a| |ps| (QREFELT |$| 76)) |$|) |PSETCAT-;remainder;PSR;25|) (LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;25|) (LETT |r| (QCDR |hRa|) |PSETCAT-;remainder;PSR;25|) (EXIT (COND ((SPADCALL |a| (QREFELT |$| 42)) (VECTOR (|spadConstant| |$| 61) |a| |r|)) ((QUOTE T) (SEQ (LETT |b| (SPADCALL (|spadConstant| |$| 61) (SPADCALL |a| (QREFELT |$| 40)) (QREFELT |$| 67)) |PSETCAT-;remainder;PSR;25|) (LETT |c| (SPADCALL |a| (QREFELT |$| 64)) |PSETCAT-;remainder;PSR;25|) (SEQ G190 (COND ((NULL (COND ((SPADCALL (LETT |a| (SPADCALL |a| (QREFELT |$| 62)) |PSETCAT-;remainder;PSR;25|) (QREFELT |$| 42)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |hRa| (|PSETCAT-;makeIrreducible!| (SPADCALL |a| |ps| (QREFELT |$| 76)) |$|) |PSETCAT-;remainder;PSR;25|) (LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;25|) (LETT |r| (SPADCALL |r| (QCDR |hRa|) (QREFELT |$| 70)) |PSETCAT-;remainder;PSR;25|) (LETT |g| (SPADCALL |c| (LETT |lca| (SPADCALL |a| (QREFELT |$| 64)) |PSETCAT-;remainder;PSR;25|) (QREFELT |$| 65)) |PSETCAT-;remainder;PSR;25|) (LETT |b| (SPADCALL (SPADCALL (SPADCALL (QCDR |hRa|) (|PSETCAT-;exactQuo| |c| |g| |$|) (QREFELT |$| 70)) |b| (QREFELT |$| 66)) (SPADCALL (|PSETCAT-;exactQuo| |lca| |g| |$|) (SPADCALL |a| (QREFELT |$| 40)) (QREFELT |$| 67)) (QREFELT |$| 77)) |PSETCAT-;remainder;PSR;25|) (EXIT (LETT |c| |g| |PSETCAT-;remainder;PSR;25|))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (VECTOR |c| |b| |r|))))))))))
-
-(DEFUN |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26| (|ps| |cs| |$|) (PROG (|p| |rs|) (RETURN (SEQ (COND ((SPADCALL |cs| (QREFELT |$| 80)) |ps|) ((SPADCALL |cs| (QREFELT |$| 81)) (LIST (|spadConstant| |$| 82))) ((QUOTE T) (SEQ (LETT |ps| (SPADCALL (ELT |$| 42) |ps| (QREFELT |$| 26)) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (EXIT (COND ((NULL |ps|) |ps|) ((SPADCALL (ELT |$| 24) |ps| (QREFELT |$| 43)) (LIST (|spadConstant| |$| 83))) ((QUOTE T) (SEQ (LETT |rs| NIL |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (SEQ G190 (COND ((NULL (COND ((NULL |ps|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |ps|) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (LETT |ps| (CDR |ps|) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (LETT |p| (QCAR (SPADCALL |p| |cs| (QREFELT |$| 76))) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (EXIT (COND ((NULL (SPADCALL |p| (QREFELT |$| 42))) (COND ((SPADCALL |p| (QREFELT |$| 24)) (SEQ (LETT |ps| NIL |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) (EXIT (LETT |rs| (LIST (|spadConstant| |$| 83)) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)))) ((QUOTE T) (SEQ (SPADCALL |p| (QREFELT |$| 84)) (EXIT (LETT |rs| (CONS |p| |rs|) |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|))))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |rs| (QREFELT |$| 85))))))))))))))
-
-(DEFUN |PSETCAT-;rewriteIdealWithRemainder;LSL;27| (|ps| |cs| |$|) (PROG (|p| |rs|) (RETURN (SEQ (COND ((SPADCALL |cs| (QREFELT |$| 80)) |ps|) ((SPADCALL |cs| (QREFELT |$| 81)) (LIST (|spadConstant| |$| 82))) ((QUOTE T) (SEQ (LETT |ps| (SPADCALL (ELT |$| 42) |ps| (QREFELT |$| 26)) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (EXIT (COND ((NULL |ps|) |ps|) ((SPADCALL (ELT |$| 24) |ps| (QREFELT |$| 43)) (LIST (|spadConstant| |$| 83))) ((QUOTE T) (SEQ (LETT |rs| NIL |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (SEQ G190 (COND ((NULL (COND ((NULL |ps|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |p| (|SPADfirst| |ps|) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (LETT |ps| (CDR |ps|) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (LETT |p| (QVELT (SPADCALL |p| |cs| (QREFELT |$| 87)) 1) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (EXIT (COND ((NULL (SPADCALL |p| (QREFELT |$| 42))) (COND ((SPADCALL |p| (QREFELT |$| 24)) (SEQ (LETT |ps| NIL |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) (EXIT (LETT |rs| (LIST (|spadConstant| |$| 83)) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)))) ((QUOTE T) (LETT |rs| (CONS (SPADCALL |p| (QREFELT |$| 88)) |rs|) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|))))))) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL |rs| (QREFELT |$| 85))))))))))))))
-
-(DEFUN |PolynomialSetCategory&| (|#1| |#2| |#3| |#4| |#5|) (PROG (|DV$1| |DV$2| |DV$3| |DV$4| |DV$5| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|PolynomialSetCategory&|)) (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 (QUOTE |PolynomialSetCategory&|) |DV$1| |DV$2| |DV$3| |DV$4| |DV$5|) . #1#) (LETT |$| (GETREFV 90) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#2| (QUOTE (|IntegralDomain|))))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (QSETREFV |$| 8 |#3|) (QSETREFV |$| 9 |#4|) (QSETREFV |$| 10 |#5|) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 48 (CONS (|dispatchFunction| |PSETCAT-;roughUnitIdeal?;SB;16|) |$|)) (QSETREFV |$| 52 (CONS (|dispatchFunction| |PSETCAT-;roughBase?;SB;18|) |$|)) (QSETREFV |$| 54 (CONS (|dispatchFunction| |PSETCAT-;roughSubIdeal?;2SB;19|) |$|)) (QSETREFV |$| 57 (CONS (|dispatchFunction| |PSETCAT-;roughEqualIdeals?;2SB;20|) |$|))))) (COND ((|HasCategory| |#2| (QUOTE (|GcdDomain|))) (COND ((|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|Symbol|)))) (PROGN (QSETREFV |$| 72 (CONS (|dispatchFunction| |PSETCAT-;headRemainder;PSR;23|) |$|)) (QSETREFV |$| 79 (CONS (|dispatchFunction| |PSETCAT-;remainder;PSR;25|) |$|)) (QSETREFV |$| 86 (CONS (|dispatchFunction| |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|) |$|)) (QSETREFV |$| 89 (CONS (|dispatchFunction| |PSETCAT-;rewriteIdealWithRemainder;LSL;27|) |$|))))))) |$|))))
-
-(MAKEPROP (QUOTE |PolynomialSetCategory&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|local| |#3|) (|local| |#4|) (|local| |#5|) (|List| 10) (0 . |members|) (|List| 9) (5 . |variables|) (|Boolean|) (10 . |<|) (|List| |$|) (16 . |concat|) (21 . |removeDuplicates|) (|Mapping| 15 9 9) (26 . |sort|) (32 . |mvar|) |PSETCAT-;variables;SL;4| (37 . |ground?|) (|Mapping| 15 10) (42 . |remove|) |PSETCAT-;mainVariables;SL;5| (48 . |=|) |PSETCAT-;mainVariable?;VarSetSB;6| (54 . |construct|) |PSETCAT-;collectUnder;SVarSetS;7| |PSETCAT-;collectUpper;SVarSetS;8| |PSETCAT-;collect;SVarSetS;9| (|Record| (|:| |under| |$|) (|:| |floor| |$|) (|:| |upper| |$|)) |PSETCAT-;sort;SVarSetR;10| (|Set| 10) (59 . |brace|) (64 . |=|) |PSETCAT-;=;2SB;11| (70 . |degree|) (75 . |<|) (81 . |zero?|) (86 . |any?|) (|Mapping| 15 10 10) (92 . |sort|) |PSETCAT-;triangular?;SB;14| |PSETCAT-;trivialIdeal?;SB;15| (98 . |roughUnitIdeal?|) (103 . |sup|) (109 . |+|) (115 . |=|) (121 . |roughBase?|) (126 . |rewriteIdealWithRemainder|) (132 . |roughSubIdeal?|) (138 . |=|) (144 . |roughSubIdeal?|) (150 . |roughEqualIdeals?|) (156 . |quo|) (|Union| |$| (QUOTE "failed")) (162 . |exquo|) (168 . |One|) (172 . |reductum|) (177 . |subtractIfCan|) (183 . |leadingCoefficient|) (188 . |gcd|) (194 . |*|) (200 . |monomial|) (206 . |*|) (212 . |-|) (218 . |*|) (|Record| (|:| |num| 10) (|:| |den| 7)) (224 . |headRemainder|) (230 . |gcd|) (236 . |one?|) (241 . |exactQuotient!|) (247 . |headRemainder|) (253 . |+|) (|Record| (|:| |rnum| 7) (|:| |polnum| 10) (|:| |den| 7)) (259 . |remainder|) (265 . |trivialIdeal?|) (270 . |roughUnitIdeal?|) (275 . |Zero|) (279 . |One|) (283 . |primitivePart!|) (288 . |removeDuplicates|) (293 . |rewriteIdealWithHeadRemainder|) (299 . |remainder|) (305 . |unitCanonical|) (310 . |rewriteIdealWithRemainder|))) (QUOTE #(|variables| 316 |trivialIdeal?| 321 |triangular?| 326 |sort| 331 |roughUnitIdeal?| 337 |roughSubIdeal?| 342 |roughEqualIdeals?| 348 |roughBase?| 354 |rewriteIdealWithRemainder| 359 |rewriteIdealWithHeadRemainder| 365 |remainder| 371 |mainVariables| 377 |mainVariable?| 382 |headRemainder| 388 |collectUpper| 394 |collectUnder| 400 |collect| 406 |=| 412)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 89 (QUOTE (1 6 11 0 12 1 10 13 0 14 2 9 15 0 0 16 1 13 0 17 18 1 13 0 0 19 2 13 0 20 0 21 1 10 9 0 22 1 10 15 0 24 2 11 0 25 0 26 2 9 15 0 0 28 1 6 0 11 30 1 36 0 11 37 2 36 15 0 0 38 1 10 8 0 40 2 8 15 0 0 41 1 10 15 0 42 2 11 15 25 0 43 2 11 0 44 0 45 1 0 15 0 48 2 8 0 0 0 49 2 8 0 0 0 50 2 8 15 0 0 51 1 0 15 0 52 2 6 11 11 0 53 2 0 15 0 0 54 2 6 15 0 0 55 2 6 15 0 0 56 2 0 15 0 0 57 2 7 0 0 0 58 2 7 59 0 0 60 0 7 0 61 1 10 0 0 62 2 8 59 0 0 63 1 10 7 0 64 2 7 0 0 0 65 2 10 0 7 0 66 2 10 0 7 8 67 2 10 0 0 0 68 2 10 0 0 0 69 2 7 0 0 0 70 2 0 71 10 0 72 2 10 7 7 0 73 1 7 15 0 74 2 10 0 0 7 75 2 6 71 10 0 76 2 10 0 0 0 77 2 0 78 10 0 79 1 6 15 0 80 1 6 15 0 81 0 10 0 82 0 10 0 83 1 10 0 0 84 1 11 0 0 85 2 0 11 11 0 86 2 6 78 10 0 87 1 10 0 0 88 2 0 11 11 0 89 1 0 13 0 23 1 0 15 0 47 1 0 15 0 46 2 0 34 0 9 35 1 0 15 0 48 2 0 15 0 0 54 2 0 15 0 0 57 1 0 15 0 52 2 0 11 11 0 89 2 0 11 11 0 86 2 0 78 10 0 79 1 0 13 0 27 2 0 15 9 0 29 2 0 71 10 0 72 2 0 0 0 9 32 2 0 0 0 9 31 2 0 0 0 9 33 2 0 15 0 0 39)))))) (QUOTE |lookupComplete|)))
+(/VERSIONCHECK 2)
+
+(DEFUN |PSETCAT-;elements| (|ps| $)
+ (PROG (|lp|)
+ (RETURN
+ (LETT |lp| (SPADCALL |ps| (QREFELT $ 12)) |PSETCAT-;elements|))))
+
+(DEFUN |PSETCAT-;variables1| (|lp| $)
+ (PROG (#0=#:G1428 |p| #1=#:G1429 |lvars|)
+ (RETURN
+ (SEQ (LETT |lvars|
+ (PROGN
+ (LETT #0# NIL |PSETCAT-;variables1|)
+ (SEQ (LETT |p| NIL |PSETCAT-;variables1|)
+ (LETT #1# |lp| |PSETCAT-;variables1|) G190
+ (COND
+ ((OR (ATOM #1#)
+ (PROGN
+ (LETT |p| (CAR #1#)
+ |PSETCAT-;variables1|)
+ NIL))
+ (GO G191)))
+ (SEQ (EXIT (LETT #0#
+ (CONS (SPADCALL |p| (QREFELT $ 14))
+ #0#)
+ |PSETCAT-;variables1|)))
+ (LETT #1# (CDR #1#) |PSETCAT-;variables1|)
+ (GO G190) G191 (EXIT (NREVERSE0 #0#))))
+ |PSETCAT-;variables1|)
+ (EXIT (SPADCALL (CONS #'|PSETCAT-;variables1!0| $)
+ (SPADCALL (SPADCALL |lvars| (QREFELT $ 18))
+ (QREFELT $ 19))
+ (QREFELT $ 21)))))))
+
+(DEFUN |PSETCAT-;variables1!0| (|#1| |#2| $)
+ (SPADCALL |#2| |#1| (QREFELT $ 16)))
+
+(DEFUN |PSETCAT-;variables2| (|lp| $)
+ (PROG (#0=#:G1433 |p| #1=#:G1434 |lvars|)
+ (RETURN
+ (SEQ (LETT |lvars|
+ (PROGN
+ (LETT #0# NIL |PSETCAT-;variables2|)
+ (SEQ (LETT |p| NIL |PSETCAT-;variables2|)
+ (LETT #1# |lp| |PSETCAT-;variables2|) G190
+ (COND
+ ((OR (ATOM #1#)
+ (PROGN
+ (LETT |p| (CAR #1#)
+ |PSETCAT-;variables2|)
+ NIL))
+ (GO G191)))
+ (SEQ (EXIT (LETT #0#
+ (CONS (SPADCALL |p| (QREFELT $ 22))
+ #0#)
+ |PSETCAT-;variables2|)))
+ (LETT #1# (CDR #1#) |PSETCAT-;variables2|)
+ (GO G190) G191 (EXIT (NREVERSE0 #0#))))
+ |PSETCAT-;variables2|)
+ (EXIT (SPADCALL (CONS #'|PSETCAT-;variables2!0| $)
+ (SPADCALL |lvars| (QREFELT $ 19)) (QREFELT $ 21)))))))
+
+(DEFUN |PSETCAT-;variables2!0| (|#1| |#2| $)
+ (SPADCALL |#2| |#1| (QREFELT $ 16)))
+
+(DEFUN |PSETCAT-;variables;SL;4| (|ps| $)
+ (|PSETCAT-;variables1| (|PSETCAT-;elements| |ps| $) $))
+
+(DEFUN |PSETCAT-;mainVariables;SL;5| (|ps| $)
+ (|PSETCAT-;variables2|
+ (SPADCALL (ELT $ 24) (|PSETCAT-;elements| |ps| $) (QREFELT $ 26))
+ $))
+
+(DEFUN |PSETCAT-;mainVariable?;VarSetSB;6| (|v| |ps| $)
+ (PROG (|lp|)
+ (RETURN
+ (SEQ (LETT |lp|
+ (SPADCALL (ELT $ 24) (|PSETCAT-;elements| |ps| $)
+ (QREFELT $ 26))
+ |PSETCAT-;mainVariable?;VarSetSB;6|)
+ (SEQ G190
+ (COND
+ ((NULL (COND
+ ((NULL |lp|) 'NIL)
+ ('T
+ (SPADCALL
+ (SPADCALL
+ (SPADCALL (|SPADfirst| |lp|)
+ (QREFELT $ 22))
+ |v| (QREFELT $ 28))
+ (QREFELT $ 29)))))
+ (GO G191)))
+ (SEQ (EXIT (LETT |lp| (CDR |lp|)
+ |PSETCAT-;mainVariable?;VarSetSB;6|)))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL (NULL |lp|) (QREFELT $ 29)))))))
+
+(DEFUN |PSETCAT-;collectUnder;SVarSetS;7| (|ps| |v| $)
+ (PROG (|p| |lp| |lq|)
+ (RETURN
+ (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| $)
+ |PSETCAT-;collectUnder;SVarSetS;7|)
+ (LETT |lq| NIL |PSETCAT-;collectUnder;SVarSetS;7|)
+ (SEQ G190
+ (COND
+ ((NULL (SPADCALL (NULL |lp|) (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;collectUnder;SVarSetS;7|)
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;collectUnder;SVarSetS;7|)
+ (EXIT (COND
+ ((OR (SPADCALL |p| (QREFELT $ 24))
+ (SPADCALL
+ (SPADCALL |p| (QREFELT $ 22)) |v|
+ (QREFELT $ 16)))
+ (LETT |lq| (CONS |p| |lq|)
+ |PSETCAT-;collectUnder;SVarSetS;7|)))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL |lq| (QREFELT $ 31)))))))
+
+(DEFUN |PSETCAT-;collectUpper;SVarSetS;8| (|ps| |v| $)
+ (PROG (|p| |lp| |lq|)
+ (RETURN
+ (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| $)
+ |PSETCAT-;collectUpper;SVarSetS;8|)
+ (LETT |lq| NIL |PSETCAT-;collectUpper;SVarSetS;8|)
+ (SEQ G190
+ (COND
+ ((NULL (SPADCALL (NULL |lp|) (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;collectUpper;SVarSetS;8|)
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;collectUpper;SVarSetS;8|)
+ (EXIT (COND
+ ((NULL (SPADCALL |p| (QREFELT $ 24)))
+ (COND
+ ((SPADCALL |v|
+ (SPADCALL |p| (QREFELT $ 22))
+ (QREFELT $ 16))
+ (LETT |lq| (CONS |p| |lq|)
+ |PSETCAT-;collectUpper;SVarSetS;8|)))))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL |lq| (QREFELT $ 31)))))))
+
+(DEFUN |PSETCAT-;collect;SVarSetS;9| (|ps| |v| $)
+ (PROG (|p| |lp| |lq|)
+ (RETURN
+ (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| $)
+ |PSETCAT-;collect;SVarSetS;9|)
+ (LETT |lq| NIL |PSETCAT-;collect;SVarSetS;9|)
+ (SEQ G190
+ (COND
+ ((NULL (SPADCALL (NULL |lp|) (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;collect;SVarSetS;9|)
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;collect;SVarSetS;9|)
+ (EXIT (COND
+ ((NULL (SPADCALL |p| (QREFELT $ 24)))
+ (COND
+ ((SPADCALL
+ (SPADCALL |p| (QREFELT $ 22)) |v|
+ (QREFELT $ 28))
+ (LETT |lq| (CONS |p| |lq|)
+ |PSETCAT-;collect;SVarSetS;9|)))))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL |lq| (QREFELT $ 31)))))))
+
+(DEFUN |PSETCAT-;sort;SVarSetR;10| (|ps| |v| $)
+ (PROG (|p| |lp| |us| |vs| |ws|)
+ (RETURN
+ (SEQ (LETT |lp| (|PSETCAT-;elements| |ps| $)
+ |PSETCAT-;sort;SVarSetR;10|)
+ (LETT |us| NIL |PSETCAT-;sort;SVarSetR;10|)
+ (LETT |vs| NIL |PSETCAT-;sort;SVarSetR;10|)
+ (LETT |ws| NIL |PSETCAT-;sort;SVarSetR;10|)
+ (SEQ G190
+ (COND
+ ((NULL (SPADCALL (NULL |lp|) (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;sort;SVarSetR;10|)
+ (LETT |lp| (CDR |lp|) |PSETCAT-;sort;SVarSetR;10|)
+ (EXIT (COND
+ ((OR (SPADCALL |p| (QREFELT $ 24))
+ (SPADCALL
+ (SPADCALL |p| (QREFELT $ 22)) |v|
+ (QREFELT $ 16)))
+ (LETT |us| (CONS |p| |us|)
+ |PSETCAT-;sort;SVarSetR;10|))
+ ((SPADCALL (SPADCALL |p| (QREFELT $ 22))
+ |v| (QREFELT $ 28))
+ (LETT |vs| (CONS |p| |vs|)
+ |PSETCAT-;sort;SVarSetR;10|))
+ ('T
+ (LETT |ws| (CONS |p| |ws|)
+ |PSETCAT-;sort;SVarSetR;10|)))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (VECTOR (SPADCALL |us| (QREFELT $ 31))
+ (SPADCALL |vs| (QREFELT $ 31))
+ (SPADCALL |ws| (QREFELT $ 31))))))))
+
+(DEFUN |PSETCAT-;=;2SB;11| (|ps1| |ps2| $)
+ (PROG (#0=#:G1468 #1=#:G1469 #2=#:G1470 |p| #3=#:G1471)
+ (RETURN
+ (SEQ (SPADCALL
+ (SPADCALL
+ (PROGN
+ (LETT #0# NIL |PSETCAT-;=;2SB;11|)
+ (SEQ (LETT |p| NIL |PSETCAT-;=;2SB;11|)
+ (LETT #1# (|PSETCAT-;elements| |ps1| $)
+ |PSETCAT-;=;2SB;11|)
+ G190
+ (COND
+ ((OR (ATOM #1#)
+ (PROGN
+ (LETT |p| (CAR #1#)
+ |PSETCAT-;=;2SB;11|)
+ NIL))
+ (GO G191)))
+ (SEQ (EXIT (LETT #0# (CONS |p| #0#)
+ |PSETCAT-;=;2SB;11|)))
+ (LETT #1# (CDR #1#) |PSETCAT-;=;2SB;11|)
+ (GO G190) G191 (EXIT (NREVERSE0 #0#))))
+ (QREFELT $ 38))
+ (SPADCALL
+ (PROGN
+ (LETT #2# NIL |PSETCAT-;=;2SB;11|)
+ (SEQ (LETT |p| NIL |PSETCAT-;=;2SB;11|)
+ (LETT #3# (|PSETCAT-;elements| |ps2| $)
+ |PSETCAT-;=;2SB;11|)
+ G190
+ (COND
+ ((OR (ATOM #3#)
+ (PROGN
+ (LETT |p| (CAR #3#)
+ |PSETCAT-;=;2SB;11|)
+ NIL))
+ (GO G191)))
+ (SEQ (EXIT (LETT #2# (CONS |p| #2#)
+ |PSETCAT-;=;2SB;11|)))
+ (LETT #3# (CDR #3#) |PSETCAT-;=;2SB;11|)
+ (GO G190) G191 (EXIT (NREVERSE0 #2#))))
+ (QREFELT $ 38))
+ (QREFELT $ 39))))))
+
+(DEFUN |PSETCAT-;localInf?| (|p| |q| $)
+ (SPADCALL (SPADCALL |p| (QREFELT $ 41)) (SPADCALL |q| (QREFELT $ 41))
+ (QREFELT $ 42)))
+
+(DEFUN |PSETCAT-;localTriangular?| (|lp| $)
+ (PROG (|q| |p|)
+ (RETURN
+ (SEQ (LETT |lp| (SPADCALL (ELT $ 43) |lp| (QREFELT $ 26))
+ |PSETCAT-;localTriangular?|)
+ (EXIT (COND
+ ((NULL |lp|) 'T)
+ ((SPADCALL (ELT $ 24) |lp| (QREFELT $ 44)) 'NIL)
+ ('T
+ (SEQ (LETT |lp|
+ (SPADCALL
+ (CONS
+ #'|PSETCAT-;localTriangular?!0| $)
+ |lp| (QREFELT $ 46))
+ |PSETCAT-;localTriangular?|)
+ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;localTriangular?|)
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;localTriangular?|)
+ (SEQ G190
+ (COND
+ ((NULL (COND
+ ((NULL |lp|) 'NIL)
+ ('T
+ (SPADCALL
+ (SPADCALL
+ (LETT |q|
+ (|SPADfirst| |lp|)
+ |PSETCAT-;localTriangular?|)
+ (QREFELT $ 22))
+ (SPADCALL |p|
+ (QREFELT $ 22))
+ (QREFELT $ 16)))))
+ (GO G191)))
+ (SEQ (LETT |p| |q|
+ |PSETCAT-;localTriangular?|)
+ (EXIT
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;localTriangular?|)))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (NULL |lp|))))))))))
+
+(DEFUN |PSETCAT-;localTriangular?!0| (|#1| |#2| $)
+ (SPADCALL (SPADCALL |#2| (QREFELT $ 22))
+ (SPADCALL |#1| (QREFELT $ 22)) (QREFELT $ 16)))
+
+(DEFUN |PSETCAT-;triangular?;SB;14| (|ps| $)
+ (|PSETCAT-;localTriangular?| (|PSETCAT-;elements| |ps| $) $))
+
+(DEFUN |PSETCAT-;trivialIdeal?;SB;15| (|ps| $)
+ (NULL (SPADCALL (ELT $ 43) (|PSETCAT-;elements| |ps| $)
+ (QREFELT $ 26))))
+
+(DEFUN |PSETCAT-;roughUnitIdeal?;SB;16| (|ps| $)
+ (SPADCALL (ELT $ 24)
+ (SPADCALL (ELT $ 43) (|PSETCAT-;elements| |ps| $) (QREFELT $ 26))
+ (QREFELT $ 44)))
+
+(DEFUN |PSETCAT-;relativelyPrimeLeadingMonomials?| (|p| |q| $)
+ (PROG (|dp| |dq|)
+ (RETURN
+ (SEQ (LETT |dp| (SPADCALL |p| (QREFELT $ 41))
+ |PSETCAT-;relativelyPrimeLeadingMonomials?|)
+ (LETT |dq| (SPADCALL |q| (QREFELT $ 41))
+ |PSETCAT-;relativelyPrimeLeadingMonomials?|)
+ (EXIT (SPADCALL (SPADCALL |dp| |dq| (QREFELT $ 50))
+ (SPADCALL |dp| |dq| (QREFELT $ 51))
+ (QREFELT $ 52)))))))
+
+(DEFUN |PSETCAT-;roughBase?;SB;18| (|ps| $)
+ (PROG (|p| |lp| |rB?| |copylp|)
+ (RETURN
+ (SEQ (LETT |lp|
+ (SPADCALL (ELT $ 43) (|PSETCAT-;elements| |ps| $)
+ (QREFELT $ 26))
+ |PSETCAT-;roughBase?;SB;18|)
+ (EXIT (COND
+ ((NULL |lp|) 'T)
+ ('T
+ (SEQ (LETT |rB?| 'T |PSETCAT-;roughBase?;SB;18|)
+ (SEQ G190
+ (COND
+ ((NULL (COND
+ ((NULL |lp|) 'NIL)
+ ('T |rB?|)))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp|)
+ |PSETCAT-;roughBase?;SB;18|)
+ (LETT |lp| (CDR |lp|)
+ |PSETCAT-;roughBase?;SB;18|)
+ (LETT |copylp| |lp|
+ |PSETCAT-;roughBase?;SB;18|)
+ (EXIT
+ (SEQ G190
+ (COND
+ ((NULL
+ (COND
+ ((NULL |copylp|) 'NIL)
+ ('T |rB?|)))
+ (GO G191)))
+ (SEQ
+ (LETT |rB?|
+ (|PSETCAT-;relativelyPrimeLeadingMonomials?|
+ |p| (|SPADfirst| |copylp|) $)
+ |PSETCAT-;roughBase?;SB;18|)
+ (EXIT
+ (LETT |copylp| (CDR |copylp|)
+ |PSETCAT-;roughBase?;SB;18|)))
+ NIL (GO G190) G191 (EXIT NIL))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT |rB?|)))))))))
+
+(DEFUN |PSETCAT-;roughSubIdeal?;2SB;19| (|ps1| |ps2| $)
+ (PROG (|lp|)
+ (RETURN
+ (SEQ (LETT |lp|
+ (SPADCALL (|PSETCAT-;elements| |ps1| $) |ps2|
+ (QREFELT $ 54))
+ |PSETCAT-;roughSubIdeal?;2SB;19|)
+ (EXIT (NULL (SPADCALL (ELT $ 43) |lp| (QREFELT $ 26))))))))
+
+(DEFUN |PSETCAT-;roughEqualIdeals?;2SB;20| (|ps1| |ps2| $)
+ (COND
+ ((SPADCALL |ps1| |ps2| (QREFELT $ 56)) 'T)
+ ((SPADCALL |ps1| |ps2| (QREFELT $ 57))
+ (SPADCALL |ps2| |ps1| (QREFELT $ 57)))
+ ('T 'NIL)))
+
+(DEFUN |PSETCAT-;exactQuo| (|r| |s| $)
+ (SPADCALL |r| |s| (QREFELT $ 59)))
+
+(DEFUN |PSETCAT-;exactQuo| (|r| |s| $)
+ (PROG (#0=#:G1504)
+ (RETURN
+ (PROG2 (LETT #0# (SPADCALL |r| |s| (QREFELT $ 61))
+ |PSETCAT-;exactQuo|)
+ (QCDR #0#)
+ (|check-union| (QEQCAR #0# 0) (QREFELT $ 7) #0#)))))
+
+(DEFUN |PSETCAT-;headRemainder;PSR;23| (|a| |ps| $)
+ (PROG (|lp1| |p| |e| |g| |#G47| |#G48| |lca| |lcp| |r| |lp2|)
+ (RETURN
+ (SEQ (LETT |lp1|
+ (SPADCALL (ELT $ 43) (|PSETCAT-;elements| |ps| $)
+ (QREFELT $ 26))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (EXIT (COND
+ ((NULL |lp1|) (CONS |a| (|spadConstant| $ 62)))
+ ((SPADCALL (ELT $ 24) |lp1| (QREFELT $ 44))
+ (CONS (SPADCALL |a| (QREFELT $ 63))
+ (|spadConstant| $ 62)))
+ ('T
+ (SEQ (LETT |r| (|spadConstant| $ 62)
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |lp1|
+ (SPADCALL
+ (CONS
+ (|function| |PSETCAT-;localInf?|)
+ $)
+ (REVERSE
+ (|PSETCAT-;elements| |ps| $))
+ (QREFELT $ 46))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |lp2| |lp1|
+ |PSETCAT-;headRemainder;PSR;23|)
+ (SEQ G190
+ (COND
+ ((NULL (COND
+ ((SPADCALL |a| (QREFELT $ 43))
+ 'NIL)
+ ('T
+ (SPADCALL (NULL |lp2|)
+ (QREFELT $ 29)))))
+ (GO G191)))
+ (SEQ (LETT |p| (|SPADfirst| |lp2|)
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |e|
+ (SPADCALL
+ (SPADCALL |a| (QREFELT $ 41))
+ (SPADCALL |p| (QREFELT $ 41))
+ (QREFELT $ 64))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (EXIT
+ (COND
+ ((QEQCAR |e| 0)
+ (SEQ
+ (LETT |g|
+ (SPADCALL
+ (LETT |lca|
+ (SPADCALL |a|
+ (QREFELT $ 65))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |lcp|
+ (SPADCALL |p|
+ (QREFELT $ 65))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (QREFELT $ 66))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (PROGN
+ (LETT |#G47|
+ (|PSETCAT-;exactQuo| |lca|
+ |g| $)
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |#G48|
+ (|PSETCAT-;exactQuo| |lcp|
+ |g| $)
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |lca| |#G47|
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |lcp| |#G48|
+ |PSETCAT-;headRemainder;PSR;23|))
+ (LETT |a|
+ (SPADCALL
+ (SPADCALL |lcp|
+ (SPADCALL |a|
+ (QREFELT $ 63))
+ (QREFELT $ 67))
+ (SPADCALL
+ (SPADCALL |lca| (QCDR |e|)
+ (QREFELT $ 68))
+ (SPADCALL |p|
+ (QREFELT $ 63))
+ (QREFELT $ 69))
+ (QREFELT $ 70))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (LETT |r|
+ (SPADCALL |r| |lcp|
+ (QREFELT $ 71))
+ |PSETCAT-;headRemainder;PSR;23|)
+ (EXIT
+ (LETT |lp2| |lp1|
+ |PSETCAT-;headRemainder;PSR;23|))))
+ ('T
+ (LETT |lp2| (CDR |lp2|)
+ |PSETCAT-;headRemainder;PSR;23|)))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (CONS |a| |r|))))))))))
+
+(DEFUN |PSETCAT-;makeIrreducible!| (|frac| $)
+ (PROG (|g|)
+ (RETURN
+ (SEQ (LETT |g|
+ (SPADCALL (QCDR |frac|) (QCAR |frac|) (QREFELT $ 74))
+ |PSETCAT-;makeIrreducible!|)
+ (EXIT (COND
+ ((SPADCALL |g| (|spadConstant| $ 62) (QREFELT $ 76))
+ |frac|)
+ ('T
+ (SEQ (PROGN
+ (RPLACA |frac|
+ (SPADCALL (QCAR |frac|) |g|
+ (QREFELT $ 77)))
+ (QCAR |frac|))
+ (PROGN
+ (RPLACD |frac|
+ (|PSETCAT-;exactQuo| (QCDR |frac|)
+ |g| $))
+ (QCDR |frac|))
+ (EXIT |frac|)))))))))
+
+(DEFUN |PSETCAT-;remainder;PSR;25| (|a| |ps| $)
+ (PROG (|hRa| |r| |lca| |g| |b| |c|)
+ (RETURN
+ (SEQ (LETT |hRa|
+ (|PSETCAT-;makeIrreducible!|
+ (SPADCALL |a| |ps| (QREFELT $ 78)) $)
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;25|)
+ (LETT |r| (QCDR |hRa|) |PSETCAT-;remainder;PSR;25|)
+ (EXIT (COND
+ ((SPADCALL |a| (QREFELT $ 43))
+ (VECTOR (|spadConstant| $ 62) |a| |r|))
+ ('T
+ (SEQ (LETT |b|
+ (SPADCALL (|spadConstant| $ 62)
+ (SPADCALL |a| (QREFELT $ 41))
+ (QREFELT $ 68))
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |c| (SPADCALL |a| (QREFELT $ 65))
+ |PSETCAT-;remainder;PSR;25|)
+ (SEQ G190
+ (COND
+ ((NULL (SPADCALL
+ (SPADCALL
+ (LETT |a|
+ (SPADCALL |a| (QREFELT $ 63))
+ |PSETCAT-;remainder;PSR;25|)
+ (QREFELT $ 43))
+ (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ (LETT |hRa|
+ (|PSETCAT-;makeIrreducible!|
+ (SPADCALL |a| |ps| (QREFELT $ 78))
+ $)
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |a| (QCAR |hRa|)
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |r|
+ (SPADCALL |r| (QCDR |hRa|)
+ (QREFELT $ 71))
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |g|
+ (SPADCALL |c|
+ (LETT |lca|
+ (SPADCALL |a| (QREFELT $ 65))
+ |PSETCAT-;remainder;PSR;25|)
+ (QREFELT $ 66))
+ |PSETCAT-;remainder;PSR;25|)
+ (LETT |b|
+ (SPADCALL
+ (SPADCALL
+ (SPADCALL (QCDR |hRa|)
+ (|PSETCAT-;exactQuo| |c| |g| $)
+ (QREFELT $ 71))
+ |b| (QREFELT $ 67))
+ (SPADCALL
+ (|PSETCAT-;exactQuo| |lca| |g| $)
+ (SPADCALL |a| (QREFELT $ 41))
+ (QREFELT $ 68))
+ (QREFELT $ 79))
+ |PSETCAT-;remainder;PSR;25|)
+ (EXIT
+ (LETT |c| |g|
+ |PSETCAT-;remainder;PSR;25|)))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (VECTOR |c| |b| |r|))))))))))
+
+(DEFUN |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26| (|ps| |cs| $)
+ (PROG (|p| |rs|)
+ (RETURN
+ (SEQ (COND
+ ((SPADCALL |cs| (QREFELT $ 82)) |ps|)
+ ((SPADCALL |cs| (QREFELT $ 83))
+ (LIST (|spadConstant| $ 84)))
+ ('T
+ (SEQ (LETT |ps| (SPADCALL (ELT $ 43) |ps| (QREFELT $ 26))
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (EXIT (COND
+ ((NULL |ps|) |ps|)
+ ((SPADCALL (ELT $ 24) |ps| (QREFELT $ 44))
+ (LIST (|spadConstant| $ 75)))
+ ('T
+ (SEQ (LETT |rs| NIL
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (SEQ G190
+ (COND
+ ((NULL
+ (SPADCALL (NULL |ps|)
+ (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ
+ (LETT |p| (|SPADfirst| |ps|)
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (LETT |ps| (CDR |ps|)
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (LETT |p|
+ (QCAR
+ (SPADCALL |p| |cs|
+ (QREFELT $ 78)))
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (EXIT
+ (COND
+ ((NULL
+ (SPADCALL |p|
+ (QREFELT $ 43)))
+ (COND
+ ((SPADCALL |p|
+ (QREFELT $ 24))
+ (SEQ
+ (LETT |ps| NIL
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ (EXIT
+ (LETT |rs|
+ (LIST
+ (|spadConstant| $ 75))
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|))))
+ ('T
+ (SEQ
+ (SPADCALL |p|
+ (QREFELT $ 85))
+ (EXIT
+ (LETT |rs|
+ (CONS |p| |rs|)
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)))))))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL |rs| (QREFELT $ 86))))))))))))))
+
+(DEFUN |PSETCAT-;rewriteIdealWithRemainder;LSL;27| (|ps| |cs| $)
+ (PROG (|p| |rs|)
+ (RETURN
+ (SEQ (COND
+ ((SPADCALL |cs| (QREFELT $ 82)) |ps|)
+ ((SPADCALL |cs| (QREFELT $ 83))
+ (LIST (|spadConstant| $ 84)))
+ ('T
+ (SEQ (LETT |ps| (SPADCALL (ELT $ 43) |ps| (QREFELT $ 26))
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (EXIT (COND
+ ((NULL |ps|) |ps|)
+ ((SPADCALL (ELT $ 24) |ps| (QREFELT $ 44))
+ (LIST (|spadConstant| $ 75)))
+ ('T
+ (SEQ (LETT |rs| NIL
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (SEQ G190
+ (COND
+ ((NULL
+ (SPADCALL (NULL |ps|)
+ (QREFELT $ 29)))
+ (GO G191)))
+ (SEQ
+ (LETT |p| (|SPADfirst| |ps|)
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (LETT |ps| (CDR |ps|)
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (LETT |p|
+ (QVELT
+ (SPADCALL |p| |cs|
+ (QREFELT $ 88))
+ 1)
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (EXIT
+ (COND
+ ((NULL
+ (SPADCALL |p|
+ (QREFELT $ 43)))
+ (COND
+ ((SPADCALL |p|
+ (QREFELT $ 24))
+ (SEQ
+ (LETT |ps| NIL
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ (EXIT
+ (LETT |rs|
+ (LIST
+ (|spadConstant| $ 75))
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|))))
+ ('T
+ (LETT |rs|
+ (CONS
+ (SPADCALL |p|
+ (QREFELT $ 89))
+ |rs|)
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)))))))
+ NIL (GO G190) G191 (EXIT NIL))
+ (EXIT (SPADCALL |rs| (QREFELT $ 86))))))))))))))
+
+(DEFUN |PolynomialSetCategory&| (|#1| |#2| |#3| |#4| |#5|)
+ (PROG (|dv$1| |dv$2| |dv$3| |dv$4| |dv$5| |dv$| $ |pv$|)
+ (RETURN
+ (PROGN
+ (LETT |dv$1| (|devaluate| |#1|)
+ . #0=(|PolynomialSetCategory&|))
+ (LETT |dv$2| (|devaluate| |#2|) . #0#)
+ (LETT |dv$3| (|devaluate| |#3|) . #0#)
+ (LETT |dv$4| (|devaluate| |#4|) . #0#)
+ (LETT |dv$5| (|devaluate| |#5|) . #0#)
+ (LETT |dv$|
+ (LIST '|PolynomialSetCategory&| |dv$1| |dv$2| |dv$3|
+ |dv$4| |dv$5|) . #0#)
+ (LETT $ (GETREFV 91) . #0#)
+ (QSETREFV $ 0 |dv$|)
+ (QSETREFV $ 3
+ (LETT |pv$|
+ (|buildPredVector| 0 0
+ (LIST (|HasCategory| |#2| '(|IntegralDomain|)))) . #0#))
+ (|stuffDomainSlots| $)
+ (QSETREFV $ 6 |#1|)
+ (QSETREFV $ 7 |#2|)
+ (QSETREFV $ 8 |#3|)
+ (QSETREFV $ 9 |#4|)
+ (QSETREFV $ 10 |#5|)
+ (COND
+ ((|testBitVector| |pv$| 1)
+ (PROGN
+ (QSETREFV $ 49
+ (CONS (|dispatchFunction|
+ |PSETCAT-;roughUnitIdeal?;SB;16|)
+ $))
+ (QSETREFV $ 53
+ (CONS (|dispatchFunction| |PSETCAT-;roughBase?;SB;18|)
+ $))
+ (QSETREFV $ 55
+ (CONS (|dispatchFunction|
+ |PSETCAT-;roughSubIdeal?;2SB;19|)
+ $))
+ (QSETREFV $ 58
+ (CONS (|dispatchFunction|
+ |PSETCAT-;roughEqualIdeals?;2SB;20|)
+ $)))))
+ (COND
+ ((|HasCategory| |#2| '(|GcdDomain|))
+ (COND
+ ((|HasCategory| |#4| '(|ConvertibleTo| (|Symbol|)))
+ (PROGN
+ (QSETREFV $ 73
+ (CONS (|dispatchFunction|
+ |PSETCAT-;headRemainder;PSR;23|)
+ $))
+ (QSETREFV $ 81
+ (CONS (|dispatchFunction|
+ |PSETCAT-;remainder;PSR;25|)
+ $))
+ (QSETREFV $ 87
+ (CONS (|dispatchFunction|
+ |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+ $))
+ (QSETREFV $ 90
+ (CONS (|dispatchFunction|
+ |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+ $)))))))
+ $))))
+
+(MAKEPROP '|PolynomialSetCategory&| '|infovec|
+ (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
+ (|local| |#3|) (|local| |#4|) (|local| |#5|) (|List| 10)
+ (0 . |members|) (|List| 9) (5 . |variables|) (|Boolean|)
+ (10 . <) (|List| $) (16 . |concat|)
+ (21 . |removeDuplicates|) (|Mapping| 15 9 9) (26 . |sort|)
+ (32 . |mvar|) |PSETCAT-;variables;SL;4| (37 . |ground?|)
+ (|Mapping| 15 10) (42 . |remove|)
+ |PSETCAT-;mainVariables;SL;5| (48 . =) (54 . |not|)
+ |PSETCAT-;mainVariable?;VarSetSB;6| (59 . |construct|)
+ |PSETCAT-;collectUnder;SVarSetS;7|
+ |PSETCAT-;collectUpper;SVarSetS;8|
+ |PSETCAT-;collect;SVarSetS;9|
+ (|Record| (|:| |under| $) (|:| |floor| $) (|:| |upper| $))
+ |PSETCAT-;sort;SVarSetR;10| (|Set| 10) (64 . |brace|)
+ (69 . =) |PSETCAT-;=;2SB;11| (75 . |degree|) (80 . <)
+ (86 . |zero?|) (91 . |any?|) (|Mapping| 15 10 10)
+ (97 . |sort|) |PSETCAT-;triangular?;SB;14|
+ |PSETCAT-;trivialIdeal?;SB;15| (103 . |roughUnitIdeal?|)
+ (108 . |sup|) (114 . +) (120 . =) (126 . |roughBase?|)
+ (131 . |rewriteIdealWithRemainder|)
+ (137 . |roughSubIdeal?|) (143 . =)
+ (149 . |roughSubIdeal?|) (155 . |roughEqualIdeals?|)
+ (161 . |quo|) (|Union| $ '"failed") (167 . |exquo|)
+ (173 . |One|) (177 . |reductum|) (182 . |subtractIfCan|)
+ (188 . |leadingCoefficient|) (193 . |gcd|) (199 . *)
+ (205 . |monomial|) (211 . *) (217 . -) (223 . *)
+ (|Record| (|:| |num| 10) (|:| |den| 7))
+ (229 . |headRemainder|) (235 . |gcd|) (241 . |One|)
+ (245 . =) (251 . |exactQuotient!|) (257 . |headRemainder|)
+ (263 . +)
+ (|Record| (|:| |rnum| 7) (|:| |polnum| 10) (|:| |den| 7))
+ (269 . |remainder|) (275 . |trivialIdeal?|)
+ (280 . |roughUnitIdeal?|) (285 . |Zero|)
+ (289 . |primitivePart!|) (294 . |removeDuplicates|)
+ (299 . |rewriteIdealWithHeadRemainder|)
+ (305 . |remainder|) (311 . |unitCanonical|)
+ (316 . |rewriteIdealWithRemainder|))
+ '#(|variables| 322 |trivialIdeal?| 327 |triangular?| 332
+ |sort| 337 |roughUnitIdeal?| 343 |roughSubIdeal?| 348
+ |roughEqualIdeals?| 354 |roughBase?| 360
+ |rewriteIdealWithRemainder| 365
+ |rewriteIdealWithHeadRemainder| 371 |remainder| 377
+ |mainVariables| 383 |mainVariable?| 388 |headRemainder|
+ 394 |collectUpper| 400 |collectUnder| 406 |collect| 412 =
+ 418)
+ 'NIL
+ (CONS (|makeByteWordVec2| 1 'NIL)
+ (CONS '#()
+ (CONS '#()
+ (|makeByteWordVec2| 90
+ '(1 6 11 0 12 1 10 13 0 14 2 9 15 0 0
+ 16 1 13 0 17 18 1 13 0 0 19 2 13 0 20
+ 0 21 1 10 9 0 22 1 10 15 0 24 2 11 0
+ 25 0 26 2 9 15 0 0 28 1 15 0 0 29 1 6
+ 0 11 31 1 37 0 11 38 2 37 15 0 0 39 1
+ 10 8 0 41 2 8 15 0 0 42 1 10 15 0 43
+ 2 11 15 25 0 44 2 11 0 45 0 46 1 0 15
+ 0 49 2 8 0 0 0 50 2 8 0 0 0 51 2 8 15
+ 0 0 52 1 0 15 0 53 2 6 11 11 0 54 2 0
+ 15 0 0 55 2 6 15 0 0 56 2 6 15 0 0 57
+ 2 0 15 0 0 58 2 7 0 0 0 59 2 7 60 0 0
+ 61 0 7 0 62 1 10 0 0 63 2 8 60 0 0 64
+ 1 10 7 0 65 2 7 0 0 0 66 2 10 0 7 0
+ 67 2 10 0 7 8 68 2 10 0 0 0 69 2 10 0
+ 0 0 70 2 7 0 0 0 71 2 0 72 10 0 73 2
+ 10 7 7 0 74 0 10 0 75 2 7 15 0 0 76 2
+ 10 0 0 7 77 2 6 72 10 0 78 2 10 0 0 0
+ 79 2 0 80 10 0 81 1 6 15 0 82 1 6 15
+ 0 83 0 10 0 84 1 10 0 0 85 1 11 0 0
+ 86 2 0 11 11 0 87 2 6 80 10 0 88 1 10
+ 0 0 89 2 0 11 11 0 90 1 0 13 0 23 1 0
+ 15 0 48 1 0 15 0 47 2 0 35 0 9 36 1 0
+ 15 0 49 2 0 15 0 0 55 2 0 15 0 0 58 1
+ 0 15 0 53 2 0 11 11 0 90 2 0 11 11 0
+ 87 2 0 80 10 0 81 1 0 13 0 27 2 0 15
+ 9 0 30 2 0 72 10 0 73 2 0 0 0 9 33 2
+ 0 0 0 9 32 2 0 0 0 9 34 2 0 15 0 0
+ 40)))))
+ '|lookupComplete|))
@
\section{domain GPOLSET GeneralPolynomialSet}
<<domain GPOLSET GeneralPolynomialSet>>=