diff options
author | dos-reis <gdr@axiomatics.org> | 2008-03-14 04:33:31 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-03-14 04:33:31 +0000 |
commit | bf8029a3f0eb72caa84f6cd31e2f5f784cff5bcc (patch) | |
tree | 64f5135ee043fe87b69769f881d37482b341c672 /src/algebra | |
parent | d1ebc50619fe75e940812f84220d087a2f77b3f5 (diff) | |
download | open-axiom-bf8029a3f0eb72caa84f6cd31e2f5f784cff5bcc.tar.gz |
* algebra/catdef.spad.pamphlet: Update cached Lisp translation.
* algebra/sf.spad.pamphlet: Likewise.
* algebra/si.spad.pamphlet: Likewise.
* algebra/fspace.spad.pamphlet: Likewise.
* algebra/ffcat.spad.pamphlet: Likewise.
* algebra/polset.spad.pamphlet: Likewise.
* algebra/fraction.spad.pamphlet: Likewise.
* algebra/triset.spad.pamphlet: Likewise.
* algebra/polycat.spad.pamphlet: Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/ffcat.spad.pamphlet | 651 | ||||
-rw-r--r-- | src/algebra/fraction.spad.pamphlet | 576 | ||||
-rw-r--r-- | src/algebra/polset.spad.pamphlet | 1042 | ||||
-rw-r--r-- | src/algebra/polycat.spad.pamphlet | 6751 | ||||
-rw-r--r-- | src/algebra/triset.spad.pamphlet | 1182 |
5 files changed, 6474 insertions, 3728 deletions
diff --git a/src/algebra/ffcat.spad.pamphlet b/src/algebra/ffcat.spad.pamphlet index 9505c555..f8047d80 100644 --- a/src/algebra/ffcat.spad.pamphlet +++ b/src/algebra/ffcat.spad.pamphlet @@ -714,15 +714,65 @@ Note that this code is not included in the generated catdef.spad file. <<FFIELDC.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) +(/VERSIONCHECK 2) -(SETQ |FiniteFieldCategory;AL| (QUOTE NIL)) +(DEFPARAMETER |FiniteFieldCategory;AL| 'NIL) -(DEFUN |FiniteFieldCategory| NIL (LET (#:G83129) (COND (|FiniteFieldCategory;AL|) (T (SETQ |FiniteFieldCategory;AL| (|FiniteFieldCategory;|)))))) +(DEFUN |FiniteFieldCategory| () + (LET (#:G1395) + (COND + (|FiniteFieldCategory;AL|) + (T (SETQ |FiniteFieldCategory;AL| (|FiniteFieldCategory;|)))))) -(DEFUN |FiniteFieldCategory;| NIL (PROG (#1=#:G83127) (RETURN (PROG1 (LETT #1# (|Join| (|FieldOfPrimeCharacteristic|) (|Finite|) (|StepThrough|) (|DifferentialRing|) (|mkCategory| (QUOTE |domain|) (QUOTE (((|charthRoot| (|$| |$|)) T) ((|conditionP| ((|Union| (|Vector| |$|) "failed") (|Matrix| |$|))) T) ((|factorsOfCyclicGroupSize| ((|List| (|Record| (|:| |factor| (|Integer|)) (|:| |exponent| (|Integer|)))))) T) ((|tableForDiscreteLogarithm| ((|Table| (|PositiveInteger|) (|NonNegativeInteger|)) (|Integer|))) T) ((|createPrimitiveElement| (|$|)) T) ((|primitiveElement| (|$|)) T) ((|primitive?| ((|Boolean|) |$|)) T) ((|discreteLog| ((|NonNegativeInteger|) |$|)) T) ((|order| ((|PositiveInteger|) |$|)) T) ((|representationType| ((|Union| "prime" "polynomial" "normal" "cyclic"))) T))) NIL (QUOTE ((|PositiveInteger|) (|NonNegativeInteger|) (|Boolean|) (|Table| (|PositiveInteger|) (|NonNegativeInteger|)) (|Integer|) (|List| (|Record| (|:| |factor| (|Integer|)) (|:| |exponent| (|Integer|)))) (|Matrix| |$|))) NIL)) |FiniteFieldCategory|) (SETELT #1# 0 (QUOTE (|FiniteFieldCategory|))))))) +(DEFUN |FiniteFieldCategory;| () + (PROG (#0=#:G1393) + (RETURN + (PROG1 (LETT #0# + (|Join| (|FieldOfPrimeCharacteristic|) (|Finite|) + (|StepThrough|) (|DifferentialRing|) + (|mkCategory| '|domain| + '(((|charthRoot| ($ $)) T) + ((|conditionP| + ((|Union| (|Vector| $) "failed") + (|Matrix| $))) + T) + ((|factorsOfCyclicGroupSize| + ((|List| + (|Record| + (|:| |factor| (|Integer|)) + (|:| |exponent| (|Integer|)))))) + T) + ((|tableForDiscreteLogarithm| + ((|Table| (|PositiveInteger|) + (|NonNegativeInteger|)) + (|Integer|))) + T) + ((|createPrimitiveElement| ($)) T) + ((|primitiveElement| ($)) T) + ((|primitive?| ((|Boolean|) $)) T) + ((|discreteLog| + ((|NonNegativeInteger|) $)) + T) + ((|order| ((|PositiveInteger|) $)) T) + ((|representationType| + ((|Union| "prime" "polynomial" + "normal" "cyclic"))) + T)) + NIL + '((|PositiveInteger|) + (|NonNegativeInteger|) (|Boolean|) + (|Table| (|PositiveInteger|) + (|NonNegativeInteger|)) + (|Integer|) + (|List| (|Record| + (|:| |factor| (|Integer|)) + (|:| |exponent| (|Integer|)))) + (|Matrix| $)) + NIL)) + |FiniteFieldCategory|) + (SETELT #0# 0 '(|FiniteFieldCategory|)))))) -(MAKEPROP (QUOTE |FiniteFieldCategory|) (QUOTE NILADIC) T) +(MAKEPROP '|FiniteFieldCategory| 'NILADIC T) @ \section{FFIELDC-.lsp BOOTSTRAP} {\bf FFIELDC-} depends on {\bf FFIELDC}. We need to break this cycle to build @@ -735,43 +785,596 @@ Note that this code is not included in the generated catdef.spad file. <<FFIELDC-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) +(/VERSIONCHECK 2) -(DEFUN |FFIELDC-;differentiate;2S;1| (|x| |$|) (|spadConstant| |$| 7)) +(DEFUN |FFIELDC-;differentiate;2S;1| (|x| $) (|spadConstant| $ 7)) -(DEFUN |FFIELDC-;init;S;2| (|$|) (|spadConstant| |$| 7)) +(DEFUN |FFIELDC-;init;S;2| ($) (|spadConstant| $ 7)) -(DEFUN |FFIELDC-;nextItem;SU;3| (|a| |$|) (COND ((SPADCALL (LETT |a| (SPADCALL (|+| (SPADCALL |a| (QREFELT |$| 11)) 1) (QREFELT |$| 12)) |FFIELDC-;nextItem;SU;3|) (QREFELT |$| 14)) (CONS 1 "failed")) ((QUOTE T) (CONS 0 |a|)))) +(DEFUN |FFIELDC-;nextItem;SU;3| (|a| $) + (COND + ((SPADCALL + (LETT |a| + (SPADCALL (+ (SPADCALL |a| (QREFELT $ 11)) 1) + (QREFELT $ 12)) + |FFIELDC-;nextItem;SU;3|) + (QREFELT $ 14)) + (CONS 1 "failed")) + ('T (CONS 0 |a|)))) -(DEFUN |FFIELDC-;order;SOpc;4| (|e| |$|) (SPADCALL (SPADCALL |e| (QREFELT |$| 17)) (QREFELT |$| 20))) +(DEFUN |FFIELDC-;order;SOpc;4| (|e| $) + (SPADCALL (SPADCALL |e| (QREFELT $ 17)) (QREFELT $ 20))) -(DEFUN |FFIELDC-;conditionP;MU;5| (|mat| |$|) (PROG (|l|) (RETURN (SEQ (LETT |l| (SPADCALL |mat| (QREFELT |$| 24)) |FFIELDC-;conditionP;MU;5|) (COND ((OR (NULL |l|) (SPADCALL (ELT |$| 14) (|SPADfirst| |l|) (QREFELT |$| 27))) (EXIT (CONS 1 "failed")))) (EXIT (CONS 0 (SPADCALL (ELT |$| 28) (|SPADfirst| |l|) (QREFELT |$| 30)))))))) +(DEFUN |FFIELDC-;conditionP;MU;5| (|mat| $) + (PROG (|l|) + (RETURN + (SEQ (LETT |l| (SPADCALL |mat| (QREFELT $ 24)) + |FFIELDC-;conditionP;MU;5|) + (COND + ((OR (NULL |l|) + (SPADCALL (ELT $ 14) (|SPADfirst| |l|) + (QREFELT $ 27))) + (EXIT (CONS 1 "failed")))) + (EXIT (CONS 0 + (SPADCALL (ELT $ 28) (|SPADfirst| |l|) + (QREFELT $ 30)))))))) -(DEFUN |FFIELDC-;charthRoot;2S;6| (|x| |$|) (SPADCALL |x| (QUOTIENT2 (SPADCALL (QREFELT |$| 35)) (SPADCALL (QREFELT |$| 36))) (QREFELT |$| 37))) +(DEFUN |FFIELDC-;charthRoot;2S;6| (|x| $) + (SPADCALL |x| + (QUOTIENT2 (SPADCALL (QREFELT $ 35)) (SPADCALL (QREFELT $ 36))) + (QREFELT $ 37))) -(DEFUN |FFIELDC-;charthRoot;SU;7| (|x| |$|) (CONS 0 (SPADCALL |x| (QREFELT |$| 28)))) +(DEFUN |FFIELDC-;charthRoot;SU;7| (|x| $) + (CONS 0 (SPADCALL |x| (QREFELT $ 28)))) -(DEFUN |FFIELDC-;createPrimitiveElement;S;8| (|$|) (PROG (|sm1| |start| |i| #1=#:G83175 |e| |found|) (RETURN (SEQ (LETT |sm1| (|-| (SPADCALL (QREFELT |$| 35)) 1) |FFIELDC-;createPrimitiveElement;S;8|) (LETT |start| (COND ((SPADCALL (SPADCALL (QREFELT |$| 42)) (CONS 1 "polynomial") (QREFELT |$| 43)) (SPADCALL (QREFELT |$| 36))) ((QUOTE T) 1)) |FFIELDC-;createPrimitiveElement;S;8|) (LETT |found| (QUOTE NIL) |FFIELDC-;createPrimitiveElement;S;8|) (SEQ (LETT |i| |start| |FFIELDC-;createPrimitiveElement;S;8|) G190 (COND ((NULL (COND (|found| (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191))) (SEQ (LETT |e| (SPADCALL (PROG1 (LETT #1# |i| |FFIELDC-;createPrimitiveElement;S;8|) (|check-subtype| (|>| #1# 0) (QUOTE (|PositiveInteger|)) #1#)) (QREFELT |$| 12)) |FFIELDC-;createPrimitiveElement;S;8|) (EXIT (LETT |found| (EQL (SPADCALL |e| (QREFELT |$| 17)) |sm1|) |FFIELDC-;createPrimitiveElement;S;8|))) (LETT |i| (|+| |i| 1) |FFIELDC-;createPrimitiveElement;S;8|) (GO G190) G191 (EXIT NIL)) (EXIT |e|))))) +(DEFUN |FFIELDC-;createPrimitiveElement;S;8| ($) + (PROG (|sm1| |start| |i| #0=#:G1434 |e| |found|) + (RETURN + (SEQ (LETT |sm1| (- (SPADCALL (QREFELT $ 35)) 1) + |FFIELDC-;createPrimitiveElement;S;8|) + (LETT |start| + (COND + ((SPADCALL (SPADCALL (QREFELT $ 42)) + (CONS 1 "polynomial") (QREFELT $ 43)) + (SPADCALL (QREFELT $ 36))) + ('T 1)) + |FFIELDC-;createPrimitiveElement;S;8|) + (LETT |found| 'NIL |FFIELDC-;createPrimitiveElement;S;8|) + (SEQ (LETT |i| |start| + |FFIELDC-;createPrimitiveElement;S;8|) + G190 + (COND + ((NULL (SPADCALL |found| (QREFELT $ 44))) (GO G191))) + (SEQ (LETT |e| + (SPADCALL + (PROG1 (LETT #0# |i| + |FFIELDC-;createPrimitiveElement;S;8|) + (|check-subtype| (> #0# 0) + '(|PositiveInteger|) #0#)) + (QREFELT $ 12)) + |FFIELDC-;createPrimitiveElement;S;8|) + (EXIT (LETT |found| + (EQL (SPADCALL |e| (QREFELT $ 17)) + |sm1|) + |FFIELDC-;createPrimitiveElement;S;8|))) + (LETT |i| (+ |i| 1) + |FFIELDC-;createPrimitiveElement;S;8|) + (GO G190) G191 (EXIT NIL)) + (EXIT |e|))))) -(DEFUN |FFIELDC-;primitive?;SB;9| (|a| |$|) (PROG (|explist| |q| |exp| #1=#:G83187 |equalone|) (RETURN (SEQ (COND ((SPADCALL |a| (QREFELT |$| 14)) (QUOTE NIL)) ((QUOTE T) (SEQ (LETT |explist| (SPADCALL (QREFELT |$| 47)) |FFIELDC-;primitive?;SB;9|) (LETT |q| (|-| (SPADCALL (QREFELT |$| 35)) 1) |FFIELDC-;primitive?;SB;9|) (LETT |equalone| (QUOTE NIL) |FFIELDC-;primitive?;SB;9|) (SEQ (LETT |exp| NIL |FFIELDC-;primitive?;SB;9|) (LETT #1# |explist| |FFIELDC-;primitive?;SB;9|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |exp| (CAR #1#) |FFIELDC-;primitive?;SB;9|) NIL) (NULL (COND (|equalone| (QUOTE NIL)) ((QUOTE T) (QUOTE T))))) (GO G191))) (SEQ (EXIT (LETT |equalone| (SPADCALL (SPADCALL |a| (QUOTIENT2 |q| (QCAR |exp|)) (QREFELT |$| 48)) (QREFELT |$| 49)) |FFIELDC-;primitive?;SB;9|))) (LETT #1# (CDR #1#) |FFIELDC-;primitive?;SB;9|) (GO G190) G191 (EXIT NIL)) (EXIT (COND (|equalone| (QUOTE NIL)) ((QUOTE T) (QUOTE T))))))))))) +(DEFUN |FFIELDC-;primitive?;SB;9| (|a| $) + (PROG (|explist| |q| |exp| #0=#:G1446 |equalone|) + (RETURN + (SEQ (COND + ((SPADCALL |a| (QREFELT $ 14)) 'NIL) + ('T + (SEQ (LETT |explist| (SPADCALL (QREFELT $ 48)) + |FFIELDC-;primitive?;SB;9|) + (LETT |q| (- (SPADCALL (QREFELT $ 35)) 1) + |FFIELDC-;primitive?;SB;9|) + (LETT |equalone| 'NIL |FFIELDC-;primitive?;SB;9|) + (SEQ (LETT |exp| NIL |FFIELDC-;primitive?;SB;9|) + (LETT #0# |explist| |FFIELDC-;primitive?;SB;9|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |exp| (CAR #0#) + |FFIELDC-;primitive?;SB;9|) + NIL) + (NULL (SPADCALL |equalone| + (QREFELT $ 44)))) + (GO G191))) + (SEQ (EXIT (LETT |equalone| + (SPADCALL + (SPADCALL |a| + (QUOTIENT2 |q| (QCAR |exp|)) + (QREFELT $ 49)) + (|spadConstant| $ 40) + (QREFELT $ 50)) + |FFIELDC-;primitive?;SB;9|))) + (LETT #0# (CDR #0#) |FFIELDC-;primitive?;SB;9|) + (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |equalone| (QREFELT $ 44)))))))))) -(DEFUN |FFIELDC-;order;SPi;10| (|e| |$|) (PROG (|lof| |rec| #1=#:G83195 |primeDivisor| |j| #2=#:G83196 |a| |goon| |ord|) (RETURN (SEQ (COND ((SPADCALL |e| (|spadConstant| |$| 7) (QREFELT |$| 51)) (|error| "order(0) is not defined ")) ((QUOTE T) (SEQ (LETT |ord| (|-| (SPADCALL (QREFELT |$| 35)) 1) |FFIELDC-;order;SPi;10|) (LETT |a| 0 |FFIELDC-;order;SPi;10|) (LETT |lof| (SPADCALL (QREFELT |$| 47)) |FFIELDC-;order;SPi;10|) (SEQ (LETT |rec| NIL |FFIELDC-;order;SPi;10|) (LETT #1# |lof| |FFIELDC-;order;SPi;10|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |rec| (CAR #1#) |FFIELDC-;order;SPi;10|) NIL)) (GO G191))) (SEQ (LETT |a| (QUOTIENT2 |ord| (LETT |primeDivisor| (QCAR |rec|) |FFIELDC-;order;SPi;10|)) |FFIELDC-;order;SPi;10|) (LETT |goon| (SPADCALL (SPADCALL |e| |a| (QREFELT |$| 48)) (QREFELT |$| 49)) |FFIELDC-;order;SPi;10|) (SEQ (LETT |j| 0 |FFIELDC-;order;SPi;10|) (LETT #2# (|-| (QCDR |rec|) 2) |FFIELDC-;order;SPi;10|) G190 (COND ((OR (QSGREATERP |j| #2#) (NULL |goon|)) (GO G191))) (SEQ (LETT |ord| |a| |FFIELDC-;order;SPi;10|) (LETT |a| (QUOTIENT2 |ord| |primeDivisor|) |FFIELDC-;order;SPi;10|) (EXIT (LETT |goon| (SPADCALL (SPADCALL |e| |a| (QREFELT |$| 48)) (QREFELT |$| 49)) |FFIELDC-;order;SPi;10|))) (LETT |j| (QSADD1 |j|) |FFIELDC-;order;SPi;10|) (GO G190) G191 (EXIT NIL)) (EXIT (COND (|goon| (LETT |ord| |a| |FFIELDC-;order;SPi;10|))))) (LETT #1# (CDR #1#) |FFIELDC-;order;SPi;10|) (GO G190) G191 (EXIT NIL)) (EXIT |ord|)))))))) +(DEFUN |FFIELDC-;order;SPi;10| (|e| $) + (PROG (|lof| |rec| #0=#:G1454 |primeDivisor| |j| #1=#:G1455 |a| + |goon| |ord|) + (RETURN + (SEQ (COND + ((SPADCALL |e| (|spadConstant| $ 7) (QREFELT $ 50)) + (|error| "order(0) is not defined ")) + ('T + (SEQ (LETT |ord| (- (SPADCALL (QREFELT $ 35)) 1) + |FFIELDC-;order;SPi;10|) + (LETT |a| 0 |FFIELDC-;order;SPi;10|) + (LETT |lof| (SPADCALL (QREFELT $ 48)) + |FFIELDC-;order;SPi;10|) + (SEQ (LETT |rec| NIL |FFIELDC-;order;SPi;10|) + (LETT #0# |lof| |FFIELDC-;order;SPi;10|) G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |rec| (CAR #0#) + |FFIELDC-;order;SPi;10|) + NIL)) + (GO G191))) + (SEQ (LETT |a| + (QUOTIENT2 |ord| + (LETT |primeDivisor| (QCAR |rec|) + |FFIELDC-;order;SPi;10|)) + |FFIELDC-;order;SPi;10|) + (LETT |goon| + (SPADCALL + (SPADCALL |e| |a| (QREFELT $ 49)) + (|spadConstant| $ 40) + (QREFELT $ 50)) + |FFIELDC-;order;SPi;10|) + (SEQ (LETT |j| 0 |FFIELDC-;order;SPi;10|) + (LETT #1# (- (QCDR |rec|) 2) + |FFIELDC-;order;SPi;10|) + G190 + (COND + ((OR (QSGREATERP |j| #1#) + (NULL |goon|)) + (GO G191))) + (SEQ (LETT |ord| |a| + |FFIELDC-;order;SPi;10|) + (LETT |a| + (QUOTIENT2 |ord| + |primeDivisor|) + |FFIELDC-;order;SPi;10|) + (EXIT + (LETT |goon| + (SPADCALL + (SPADCALL |e| |a| + (QREFELT $ 49)) + (|spadConstant| $ 40) + (QREFELT $ 50)) + |FFIELDC-;order;SPi;10|))) + (LETT |j| (QSADD1 |j|) + |FFIELDC-;order;SPi;10|) + (GO G190) G191 (EXIT NIL)) + (EXIT (COND + (|goon| + (LETT |ord| |a| + |FFIELDC-;order;SPi;10|))))) + (LETT #0# (CDR #0#) |FFIELDC-;order;SPi;10|) + (GO G190) G191 (EXIT NIL)) + (EXIT |ord|)))))))) -(DEFUN |FFIELDC-;discreteLog;SNni;11| (|b| |$|) (PROG (|faclist| |gen| |groupord| |f| #1=#:G83216 |fac| |t| #2=#:G83217 |exp| |exptable| |n| |end| |i| |rho| |found| |disc1| |c| |mult| |disclog| |a|) (RETURN (SEQ (COND ((SPADCALL |b| (QREFELT |$| 14)) (|error| "discreteLog: logarithm of zero")) ((QUOTE T) (SEQ (LETT |faclist| (SPADCALL (QREFELT |$| 47)) |FFIELDC-;discreteLog;SNni;11|) (LETT |a| |b| |FFIELDC-;discreteLog;SNni;11|) (LETT |gen| (SPADCALL (QREFELT |$| 53)) |FFIELDC-;discreteLog;SNni;11|) (EXIT (COND ((SPADCALL |b| |gen| (QREFELT |$| 51)) 1) ((QUOTE T) (SEQ (LETT |disclog| 0 |FFIELDC-;discreteLog;SNni;11|) (LETT |mult| 1 |FFIELDC-;discreteLog;SNni;11|) (LETT |groupord| (|-| (SPADCALL (QREFELT |$| 35)) 1) |FFIELDC-;discreteLog;SNni;11|) (LETT |exp| |groupord| |FFIELDC-;discreteLog;SNni;11|) (SEQ (LETT |f| NIL |FFIELDC-;discreteLog;SNni;11|) (LETT #1# |faclist| |FFIELDC-;discreteLog;SNni;11|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |f| (CAR #1#) |FFIELDC-;discreteLog;SNni;11|) NIL)) (GO G191))) (SEQ (LETT |fac| (QCAR |f|) |FFIELDC-;discreteLog;SNni;11|) (EXIT (SEQ (LETT |t| 0 |FFIELDC-;discreteLog;SNni;11|) (LETT #2# (|-| (QCDR |f|) 1) |FFIELDC-;discreteLog;SNni;11|) G190 (COND ((QSGREATERP |t| #2#) (GO G191))) (SEQ (LETT |exp| (QUOTIENT2 |exp| |fac|) |FFIELDC-;discreteLog;SNni;11|) (LETT |exptable| (SPADCALL |fac| (QREFELT |$| 55)) |FFIELDC-;discreteLog;SNni;11|) (LETT |n| (SPADCALL |exptable| (QREFELT |$| 56)) |FFIELDC-;discreteLog;SNni;11|) (LETT |c| (SPADCALL |a| |exp| (QREFELT |$| 48)) |FFIELDC-;discreteLog;SNni;11|) (LETT |end| (QUOTIENT2 (|-| |fac| 1) |n|) |FFIELDC-;discreteLog;SNni;11|) (LETT |found| (QUOTE NIL) |FFIELDC-;discreteLog;SNni;11|) (LETT |disc1| 0 |FFIELDC-;discreteLog;SNni;11|) (SEQ (LETT |i| 0 |FFIELDC-;discreteLog;SNni;11|) G190 (COND ((OR (QSGREATERP |i| |end|) (NULL (COND (|found| (QUOTE NIL)) ((QUOTE T) (QUOTE T))))) (GO G191))) (SEQ (LETT |rho| (SPADCALL (SPADCALL |c| (QREFELT |$| 11)) |exptable| (QREFELT |$| 58)) |FFIELDC-;discreteLog;SNni;11|) (EXIT (COND ((QEQCAR |rho| 0) (SEQ (LETT |found| (QUOTE T) |FFIELDC-;discreteLog;SNni;11|) (EXIT (LETT |disc1| (|*| (|+| (|*| |n| |i|) (QCDR |rho|)) |mult|) |FFIELDC-;discreteLog;SNni;11|)))) ((QUOTE T) (LETT |c| (SPADCALL |c| (SPADCALL |gen| (|*| (QUOTIENT2 |groupord| |fac|) (|-| |n|)) (QREFELT |$| 48)) (QREFELT |$| 59)) |FFIELDC-;discreteLog;SNni;11|))))) (LETT |i| (QSADD1 |i|) |FFIELDC-;discreteLog;SNni;11|) (GO G190) G191 (EXIT NIL)) (EXIT (COND (|found| (SEQ (LETT |mult| (|*| |mult| |fac|) |FFIELDC-;discreteLog;SNni;11|) (LETT |disclog| (|+| |disclog| |disc1|) |FFIELDC-;discreteLog;SNni;11|) (EXIT (LETT |a| (SPADCALL |a| (SPADCALL |gen| (|-| |disc1|) (QREFELT |$| 48)) (QREFELT |$| 59)) |FFIELDC-;discreteLog;SNni;11|)))) ((QUOTE T) (|error| "discreteLog: ?? discrete logarithm"))))) (LETT |t| (QSADD1 |t|) |FFIELDC-;discreteLog;SNni;11|) (GO G190) G191 (EXIT NIL)))) (LETT #1# (CDR #1#) |FFIELDC-;discreteLog;SNni;11|) (GO G190) G191 (EXIT NIL)) (EXIT |disclog|)))))))))))) +(DEFUN |FFIELDC-;discreteLog;SNni;11| (|b| $) + (PROG (|faclist| |gen| |groupord| |f| #0=#:G1475 |fac| |t| #1=#:G1476 + |exp| |exptable| |n| |end| |i| |rho| |found| |disc1| |c| + |mult| |disclog| |a|) + (RETURN + (SEQ (COND + ((SPADCALL |b| (QREFELT $ 14)) + (|error| "discreteLog: logarithm of zero")) + ('T + (SEQ (LETT |faclist| (SPADCALL (QREFELT $ 48)) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |a| |b| |FFIELDC-;discreteLog;SNni;11|) + (LETT |gen| (SPADCALL (QREFELT $ 53)) + |FFIELDC-;discreteLog;SNni;11|) + (EXIT (COND + ((SPADCALL |b| |gen| (QREFELT $ 50)) 1) + ('T + (SEQ (LETT |disclog| 0 + |FFIELDC-;discreteLog;SNni;11|) + (LETT |mult| 1 + |FFIELDC-;discreteLog;SNni;11|) + (LETT |groupord| + (- (SPADCALL (QREFELT $ 35)) 1) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |exp| |groupord| + |FFIELDC-;discreteLog;SNni;11|) + (SEQ (LETT |f| NIL + |FFIELDC-;discreteLog;SNni;11|) + (LETT #0# |faclist| + |FFIELDC-;discreteLog;SNni;11|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |f| (CAR #0#) + |FFIELDC-;discreteLog;SNni;11|) + NIL)) + (GO G191))) + (SEQ + (LETT |fac| (QCAR |f|) + |FFIELDC-;discreteLog;SNni;11|) + (EXIT + (SEQ + (LETT |t| 0 + |FFIELDC-;discreteLog;SNni;11|) + (LETT #1# (- (QCDR |f|) 1) + |FFIELDC-;discreteLog;SNni;11|) + G190 + (COND + ((QSGREATERP |t| #1#) + (GO G191))) + (SEQ + (LETT |exp| + (QUOTIENT2 |exp| |fac|) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |exptable| + (SPADCALL |fac| + (QREFELT $ 55)) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |n| + (SPADCALL |exptable| + (QREFELT $ 56)) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |c| + (SPADCALL |a| |exp| + (QREFELT $ 49)) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |end| + (QUOTIENT2 (- |fac| 1) |n|) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |found| 'NIL + |FFIELDC-;discreteLog;SNni;11|) + (LETT |disc1| 0 + |FFIELDC-;discreteLog;SNni;11|) + (SEQ + (LETT |i| 0 + |FFIELDC-;discreteLog;SNni;11|) + G190 + (COND + ((OR + (QSGREATERP |i| |end|) + (NULL + (SPADCALL |found| + (QREFELT $ 44)))) + (GO G191))) + (SEQ + (LETT |rho| + (SPADCALL + (SPADCALL |c| + (QREFELT $ 11)) + |exptable| + (QREFELT $ 58)) + |FFIELDC-;discreteLog;SNni;11|) + (EXIT + (COND + ((QEQCAR |rho| 0) + (SEQ + (LETT |found| 'T + |FFIELDC-;discreteLog;SNni;11|) + (EXIT + (LETT |disc1| + (* + (+ (* |n| |i|) + (QCDR |rho|)) + |mult|) + |FFIELDC-;discreteLog;SNni;11|)))) + ('T + (LETT |c| + (SPADCALL |c| + (SPADCALL |gen| + (* + (QUOTIENT2 + |groupord| |fac|) + (- |n|)) + (QREFELT $ 49)) + (QREFELT $ 59)) + |FFIELDC-;discreteLog;SNni;11|))))) + (LETT |i| (QSADD1 |i|) + |FFIELDC-;discreteLog;SNni;11|) + (GO G190) G191 (EXIT NIL)) + (EXIT + (COND + (|found| + (SEQ + (LETT |mult| + (* |mult| |fac|) + |FFIELDC-;discreteLog;SNni;11|) + (LETT |disclog| + (+ |disclog| |disc1|) + |FFIELDC-;discreteLog;SNni;11|) + (EXIT + (LETT |a| + (SPADCALL |a| + (SPADCALL |gen| + (- |disc1|) + (QREFELT $ 49)) + (QREFELT $ 59)) + |FFIELDC-;discreteLog;SNni;11|)))) + ('T + (|error| + "discreteLog: ?? discrete logarithm"))))) + (LETT |t| (QSADD1 |t|) + |FFIELDC-;discreteLog;SNni;11|) + (GO G190) G191 (EXIT NIL)))) + (LETT #0# (CDR #0#) + |FFIELDC-;discreteLog;SNni;11|) + (GO G190) G191 (EXIT NIL)) + (EXIT |disclog|)))))))))))) -(DEFUN |FFIELDC-;discreteLog;2SU;12| (|logbase| |b| |$|) (PROG (|groupord| |faclist| |f| #1=#:G83235 |fac| |primroot| |t| #2=#:G83236 |exp| |rhoHelp| #3=#:G83234 |rho| |disclog| |mult| |a|) (RETURN (SEQ (EXIT (COND ((SPADCALL |b| (QREFELT |$| 14)) (SEQ (SPADCALL "discreteLog: logarithm of zero" (QREFELT |$| 64)) (EXIT (CONS 1 "failed")))) ((SPADCALL |logbase| (QREFELT |$| 14)) (SEQ (SPADCALL "discreteLog: logarithm to base zero" (QREFELT |$| 64)) (EXIT (CONS 1 "failed")))) ((SPADCALL |b| |logbase| (QREFELT |$| 51)) (CONS 0 1)) ((QUOTE T) (COND ((NULL (ZEROP (REMAINDER2 (LETT |groupord| (SPADCALL |logbase| (QREFELT |$| 17)) |FFIELDC-;discreteLog;2SU;12|) (SPADCALL |b| (QREFELT |$| 17))))) (SEQ (SPADCALL "discreteLog: second argument not in cyclic group generated by first argument" (QREFELT |$| 64)) (EXIT (CONS 1 "failed")))) ((QUOTE T) (SEQ (LETT |faclist| (SPADCALL (SPADCALL |groupord| (QREFELT |$| 66)) (QREFELT |$| 68)) |FFIELDC-;discreteLog;2SU;12|) (LETT |a| |b| |FFIELDC-;discreteLog;2SU;12|) (LETT |disclog| 0 |FFIELDC-;discreteLog;2SU;12|) (LETT |mult| 1 |FFIELDC-;discreteLog;2SU;12|) (LETT |exp| |groupord| |FFIELDC-;discreteLog;2SU;12|) (SEQ (LETT |f| NIL |FFIELDC-;discreteLog;2SU;12|) (LETT #1# |faclist| |FFIELDC-;discreteLog;2SU;12|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |f| (CAR #1#) |FFIELDC-;discreteLog;2SU;12|) NIL)) (GO G191))) (SEQ (LETT |fac| (QCAR |f|) |FFIELDC-;discreteLog;2SU;12|) (LETT |primroot| (SPADCALL |logbase| (QUOTIENT2 |groupord| |fac|) (QREFELT |$| 48)) |FFIELDC-;discreteLog;2SU;12|) (EXIT (SEQ (LETT |t| 0 |FFIELDC-;discreteLog;2SU;12|) (LETT #2# (|-| (QCDR |f|) 1) |FFIELDC-;discreteLog;2SU;12|) G190 (COND ((QSGREATERP |t| #2#) (GO G191))) (SEQ (LETT |exp| (QUOTIENT2 |exp| |fac|) |FFIELDC-;discreteLog;2SU;12|) (LETT |rhoHelp| (SPADCALL |primroot| (SPADCALL |a| |exp| (QREFELT |$| 48)) |fac| (QREFELT |$| 70)) |FFIELDC-;discreteLog;2SU;12|) (EXIT (COND ((QEQCAR |rhoHelp| 1) (PROGN (LETT #3# (CONS 1 "failed") |FFIELDC-;discreteLog;2SU;12|) (GO #3#))) ((QUOTE T) (SEQ (LETT |rho| (|*| (QCDR |rhoHelp|) |mult|) |FFIELDC-;discreteLog;2SU;12|) (LETT |disclog| (|+| |disclog| |rho|) |FFIELDC-;discreteLog;2SU;12|) (LETT |mult| (|*| |mult| |fac|) |FFIELDC-;discreteLog;2SU;12|) (EXIT (LETT |a| (SPADCALL |a| (SPADCALL |logbase| (|-| |rho|) (QREFELT |$| 48)) (QREFELT |$| 59)) |FFIELDC-;discreteLog;2SU;12|))))))) (LETT |t| (QSADD1 |t|) |FFIELDC-;discreteLog;2SU;12|) (GO G190) G191 (EXIT NIL)))) (LETT #1# (CDR #1#) |FFIELDC-;discreteLog;2SU;12|) (GO G190) G191 (EXIT NIL)) (EXIT (CONS 0 |disclog|)))))))) #3# (EXIT #3#))))) +(DEFUN |FFIELDC-;discreteLog;2SU;12| (|logbase| |b| $) + (PROG (|groupord| |faclist| |f| #0=#:G1494 |fac| |primroot| |t| + #1=#:G1495 |exp| |rhoHelp| #2=#:G1493 |rho| |disclog| + |mult| |a|) + (RETURN + (SEQ (EXIT (COND + ((SPADCALL |b| (QREFELT $ 14)) + (SEQ (SPADCALL "discreteLog: logarithm of zero" + (QREFELT $ 64)) + (EXIT (CONS 1 "failed")))) + ((SPADCALL |logbase| (QREFELT $ 14)) + (SEQ (SPADCALL + "discreteLog: logarithm to base zero" + (QREFELT $ 64)) + (EXIT (CONS 1 "failed")))) + ((SPADCALL |b| |logbase| (QREFELT $ 50)) (CONS 0 1)) + ('T + (COND + ((NULL (ZEROP (REMAINDER2 + (LETT |groupord| + (SPADCALL |logbase| + (QREFELT $ 17)) + |FFIELDC-;discreteLog;2SU;12|) + (SPADCALL |b| (QREFELT $ 17))))) + (SEQ (SPADCALL + "discreteLog: second argument not in cyclic group generated by first argument" + (QREFELT $ 64)) + (EXIT (CONS 1 "failed")))) + ('T + (SEQ (LETT |faclist| + (SPADCALL + (SPADCALL |groupord| + (QREFELT $ 66)) + (QREFELT $ 68)) + |FFIELDC-;discreteLog;2SU;12|) + (LETT |a| |b| + |FFIELDC-;discreteLog;2SU;12|) + (LETT |disclog| 0 + |FFIELDC-;discreteLog;2SU;12|) + (LETT |mult| 1 + |FFIELDC-;discreteLog;2SU;12|) + (LETT |exp| |groupord| + |FFIELDC-;discreteLog;2SU;12|) + (SEQ (LETT |f| NIL + |FFIELDC-;discreteLog;2SU;12|) + (LETT #0# |faclist| + |FFIELDC-;discreteLog;2SU;12|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |f| (CAR #0#) + |FFIELDC-;discreteLog;2SU;12|) + NIL)) + (GO G191))) + (SEQ (LETT |fac| (QCAR |f|) + |FFIELDC-;discreteLog;2SU;12|) + (LETT |primroot| + (SPADCALL |logbase| + (QUOTIENT2 |groupord| |fac|) + (QREFELT $ 49)) + |FFIELDC-;discreteLog;2SU;12|) + (EXIT + (SEQ + (LETT |t| 0 + |FFIELDC-;discreteLog;2SU;12|) + (LETT #1# (- (QCDR |f|) 1) + |FFIELDC-;discreteLog;2SU;12|) + G190 + (COND + ((QSGREATERP |t| #1#) + (GO G191))) + (SEQ + (LETT |exp| + (QUOTIENT2 |exp| |fac|) + |FFIELDC-;discreteLog;2SU;12|) + (LETT |rhoHelp| + (SPADCALL |primroot| + (SPADCALL |a| |exp| + (QREFELT $ 49)) + |fac| (QREFELT $ 70)) + |FFIELDC-;discreteLog;2SU;12|) + (EXIT + (COND + ((QEQCAR |rhoHelp| 1) + (PROGN + (LETT #2# + (CONS 1 "failed") + |FFIELDC-;discreteLog;2SU;12|) + (GO #2#))) + ('T + (SEQ + (LETT |rho| + (* (QCDR |rhoHelp|) + |mult|) + |FFIELDC-;discreteLog;2SU;12|) + (LETT |disclog| + (+ |disclog| |rho|) + |FFIELDC-;discreteLog;2SU;12|) + (LETT |mult| + (* |mult| |fac|) + |FFIELDC-;discreteLog;2SU;12|) + (EXIT + (LETT |a| + (SPADCALL |a| + (SPADCALL |logbase| + (- |rho|) + (QREFELT $ 49)) + (QREFELT $ 59)) + |FFIELDC-;discreteLog;2SU;12|))))))) + (LETT |t| (QSADD1 |t|) + |FFIELDC-;discreteLog;2SU;12|) + (GO G190) G191 (EXIT NIL)))) + (LETT #0# (CDR #0#) + |FFIELDC-;discreteLog;2SU;12|) + (GO G190) G191 (EXIT NIL)) + (EXIT (CONS 0 |disclog|)))))))) + #2# (EXIT #2#))))) -(DEFUN |FFIELDC-;squareFreePolynomial| (|f| |$|) (SPADCALL |f| (QREFELT |$| 75))) +(DEFUN |FFIELDC-;squareFreePolynomial| (|f| $) + (SPADCALL |f| (QREFELT $ 75))) -(DEFUN |FFIELDC-;factorPolynomial| (|f| |$|) (SPADCALL |f| (QREFELT |$| 77))) +(DEFUN |FFIELDC-;factorPolynomial| (|f| $) + (SPADCALL |f| (QREFELT $ 77))) -(DEFUN |FFIELDC-;factorSquareFreePolynomial| (|f| |$|) (PROG (|flist| |u| #1=#:G83248 #2=#:G83245 #3=#:G83243 #4=#:G83244) (RETURN (SEQ (COND ((SPADCALL |f| (|spadConstant| |$| 78) (QREFELT |$| 79)) (|spadConstant| |$| 80)) ((QUOTE T) (SEQ (LETT |flist| (SPADCALL |f| (QUOTE T) (QREFELT |$| 83)) |FFIELDC-;factorSquareFreePolynomial|) (EXIT (SPADCALL (SPADCALL (QCAR |flist|) (QREFELT |$| 84)) (PROGN (LETT #4# NIL |FFIELDC-;factorSquareFreePolynomial|) (SEQ (LETT |u| NIL |FFIELDC-;factorSquareFreePolynomial|) (LETT #1# (QCDR |flist|) |FFIELDC-;factorSquareFreePolynomial|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |u| (CAR #1#) |FFIELDC-;factorSquareFreePolynomial|) NIL)) (GO G191))) (SEQ (EXIT (PROGN (LETT #2# (SPADCALL (QCAR |u|) (QCDR |u|) (QREFELT |$| 85)) |FFIELDC-;factorSquareFreePolynomial|) (COND (#4# (LETT #3# (SPADCALL #3# #2# (QREFELT |$| 86)) |FFIELDC-;factorSquareFreePolynomial|)) ((QUOTE T) (PROGN (LETT #3# #2# |FFIELDC-;factorSquareFreePolynomial|) (LETT #4# (QUOTE T) |FFIELDC-;factorSquareFreePolynomial|))))))) (LETT #1# (CDR #1#) |FFIELDC-;factorSquareFreePolynomial|) (GO G190) G191 (EXIT NIL)) (COND (#4# #3#) ((QUOTE T) (|spadConstant| |$| 87)))) (QREFELT |$| 88)))))))))) +(DEFUN |FFIELDC-;factorSquareFreePolynomial| (|f| $) + (PROG (|flist| |u| #0=#:G1507 #1=#:G1504 #2=#:G1502 #3=#:G1503) + (RETURN + (SEQ (COND + ((SPADCALL |f| (|spadConstant| $ 78) (QREFELT $ 79)) + (|spadConstant| $ 80)) + ('T + (SEQ (LETT |flist| (SPADCALL |f| 'T (QREFELT $ 83)) + |FFIELDC-;factorSquareFreePolynomial|) + (EXIT (SPADCALL + (SPADCALL (QCAR |flist|) (QREFELT $ 84)) + (PROGN + (LETT #3# NIL + |FFIELDC-;factorSquareFreePolynomial|) + (SEQ (LETT |u| NIL + |FFIELDC-;factorSquareFreePolynomial|) + (LETT #0# (QCDR |flist|) + |FFIELDC-;factorSquareFreePolynomial|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |u| (CAR #0#) + |FFIELDC-;factorSquareFreePolynomial|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (PROGN + (LETT #1# + (SPADCALL (QCAR |u|) + (QCDR |u|) (QREFELT $ 85)) + |FFIELDC-;factorSquareFreePolynomial|) + (COND + (#3# + (LETT #2# + (SPADCALL #2# #1# + (QREFELT $ 86)) + |FFIELDC-;factorSquareFreePolynomial|)) + ('T + (PROGN + (LETT #2# #1# + |FFIELDC-;factorSquareFreePolynomial|) + (LETT #3# 'T + |FFIELDC-;factorSquareFreePolynomial|))))))) + (LETT #0# (CDR #0#) + |FFIELDC-;factorSquareFreePolynomial|) + (GO G190) G191 (EXIT NIL)) + (COND + (#3# #2#) + ('T (|spadConstant| $ 87)))) + (QREFELT $ 88)))))))))) -(DEFUN |FFIELDC-;gcdPolynomial;3Sup;16| (|f| |g| |$|) (SPADCALL |f| |g| (QREFELT |$| 90))) +(DEFUN |FFIELDC-;gcdPolynomial;3Sup;16| (|f| |g| $) + (SPADCALL |f| |g| (QREFELT $ 90))) -(DEFUN |FiniteFieldCategory&| (|#1|) (PROG (|DV$1| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|FiniteFieldCategory&|)) (LETT |dv$| (LIST (QUOTE |FiniteFieldCategory&|) |DV$1|) . #1#) (LETT |$| (GETREFV 93) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) |$|)))) +(DEFUN |FiniteFieldCategory&| (|#1|) + (PROG (|dv$1| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|FiniteFieldCategory&|)) + (LETT |dv$| (LIST '|FiniteFieldCategory&| |dv$1|) . #0#) + (LETT $ (GETREFV 93) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + $)))) -(MAKEPROP (QUOTE |FiniteFieldCategory&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . |Zero|) |FFIELDC-;differentiate;2S;1| |FFIELDC-;init;S;2| (|PositiveInteger|) (4 . |lookup|) (9 . |index|) (|Boolean|) (14 . |zero?|) (|Union| |$| (QUOTE "failed")) |FFIELDC-;nextItem;SU;3| (19 . |order|) (|Integer|) (|OnePointCompletion| 10) (24 . |coerce|) |FFIELDC-;order;SOpc;4| (|List| 26) (|Matrix| 6) (29 . |nullSpace|) (|Mapping| 13 6) (|Vector| 6) (34 . |every?|) (40 . |charthRoot|) (|Mapping| 6 6) (45 . |map|) (|Union| (|Vector| |$|) (QUOTE "failed")) (|Matrix| |$|) |FFIELDC-;conditionP;MU;5| (|NonNegativeInteger|) (51 . |size|) (55 . |characteristic|) (59 . |**|) |FFIELDC-;charthRoot;2S;6| |FFIELDC-;charthRoot;SU;7| (65 . |One|) (|Union| (QUOTE "prime") (QUOTE "polynomial") (QUOTE "normal") (QUOTE "cyclic")) (69 . |representationType|) (73 . |=|) |FFIELDC-;createPrimitiveElement;S;8| (|Record| (|:| |factor| 18) (|:| |exponent| 18)) (|List| 45) (79 . |factorsOfCyclicGroupSize|) (83 . |**|) (89 . |one?|) |FFIELDC-;primitive?;SB;9| (94 . |=|) |FFIELDC-;order;SPi;10| (100 . |primitiveElement|) (|Table| 10 34) (104 . |tableForDiscreteLogarithm|) (109 . |#|) (|Union| 34 (QUOTE "failed")) (114 . |search|) (120 . |*|) |FFIELDC-;discreteLog;SNni;11| (|Void|) (|String|) (|OutputForm|) (126 . |messagePrint|) (|Factored| |$|) (131 . |factor|) (|Factored| 18) (136 . |factors|) (|DiscreteLogarithmPackage| 6) (141 . |shanksDiscLogAlgorithm|) |FFIELDC-;discreteLog;2SU;12| (|Factored| 73) (|SparseUnivariatePolynomial| 6) (|UnivariatePolynomialSquareFree| 6 73) (148 . |squareFree|) (|DistinctDegreeFactorize| 6 73) (153 . |factor|) (158 . |Zero|) (162 . |=|) (168 . |Zero|) (|Record| (|:| |irr| 73) (|:| |pow| 18)) (|Record| (|:| |cont| 6) (|:| |factors| (|List| 81))) (172 . |distdfact|) (178 . |coerce|) (183 . |primeFactor|) (189 . |*|) (195 . |One|) (199 . |*|) (|EuclideanDomain&| 73) (205 . |gcd|) (|SparseUnivariatePolynomial| |$|) |FFIELDC-;gcdPolynomial;3Sup;16|)) (QUOTE #(|primitive?| 211 |order| 216 |nextItem| 226 |init| 231 |gcdPolynomial| 235 |discreteLog| 241 |differentiate| 252 |createPrimitiveElement| 257 |conditionP| 261 |charthRoot| 266)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 92 (QUOTE (0 6 0 7 1 6 10 0 11 1 6 0 10 12 1 6 13 0 14 1 6 10 0 17 1 19 0 18 20 1 23 22 0 24 2 26 13 25 0 27 1 6 0 0 28 2 26 0 29 0 30 0 6 34 35 0 6 34 36 2 6 0 0 34 37 0 6 0 40 0 6 41 42 2 41 13 0 0 43 0 6 46 47 2 6 0 0 18 48 1 6 13 0 49 2 6 13 0 0 51 0 6 0 53 1 6 54 18 55 1 54 34 0 56 2 54 57 10 0 58 2 6 0 0 0 59 1 63 61 62 64 1 18 65 0 66 1 67 46 0 68 3 69 57 6 6 34 70 1 74 72 73 75 1 76 72 73 77 0 73 0 78 2 73 13 0 0 79 0 72 0 80 2 76 82 73 13 83 1 73 0 6 84 2 72 0 73 18 85 2 72 0 0 0 86 0 72 0 87 2 72 0 73 0 88 2 89 0 0 0 90 1 0 13 0 50 1 0 10 0 52 1 0 19 0 21 1 0 15 0 16 0 0 0 9 2 0 91 91 91 92 1 0 34 0 60 2 0 57 0 0 71 1 0 0 0 8 0 0 0 44 1 0 31 32 33 1 0 0 0 38 1 0 15 0 39)))))) (QUOTE |lookupComplete|))) +(MAKEPROP '|FiniteFieldCategory&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . |Zero|) + |FFIELDC-;differentiate;2S;1| |FFIELDC-;init;S;2| + (|PositiveInteger|) (4 . |lookup|) (9 . |index|) + (|Boolean|) (14 . |zero?|) (|Union| $ '"failed") + |FFIELDC-;nextItem;SU;3| (19 . |order|) (|Integer|) + (|OnePointCompletion| 10) (24 . |coerce|) + |FFIELDC-;order;SOpc;4| (|List| 26) (|Matrix| 6) + (29 . |nullSpace|) (|Mapping| 13 6) (|Vector| 6) + (34 . |every?|) (40 . |charthRoot|) (|Mapping| 6 6) + (45 . |map|) (|Union| (|Vector| $) '"failed") (|Matrix| $) + |FFIELDC-;conditionP;MU;5| (|NonNegativeInteger|) + (51 . |size|) (55 . |characteristic|) (59 . **) + |FFIELDC-;charthRoot;2S;6| |FFIELDC-;charthRoot;SU;7| + (65 . |One|) + (|Union| '"prime" '"polynomial" '"normal" '"cyclic") + (69 . |representationType|) (73 . =) (79 . |not|) + |FFIELDC-;createPrimitiveElement;S;8| + (|Record| (|:| |factor| 18) (|:| |exponent| 18)) + (|List| 46) (84 . |factorsOfCyclicGroupSize|) (88 . **) + (94 . =) |FFIELDC-;primitive?;SB;9| + |FFIELDC-;order;SPi;10| (100 . |primitiveElement|) + (|Table| 10 34) (104 . |tableForDiscreteLogarithm|) + (109 . |#|) (|Union| 34 '"failed") (114 . |search|) + (120 . *) |FFIELDC-;discreteLog;SNni;11| (|Void|) + (|String|) (|OutputForm|) (126 . |messagePrint|) + (|Factored| $) (131 . |factor|) (|Factored| 18) + (136 . |factors|) (|DiscreteLogarithmPackage| 6) + (141 . |shanksDiscLogAlgorithm|) + |FFIELDC-;discreteLog;2SU;12| (|Factored| 73) + (|SparseUnivariatePolynomial| 6) + (|UnivariatePolynomialSquareFree| 6 73) + (148 . |squareFree|) (|DistinctDegreeFactorize| 6 73) + (153 . |factor|) (158 . |Zero|) (162 . =) (168 . |Zero|) + (|Record| (|:| |irr| 73) (|:| |pow| 18)) + (|Record| (|:| |cont| 6) (|:| |factors| (|List| 81))) + (172 . |distdfact|) (178 . |coerce|) (183 . |primeFactor|) + (189 . *) (195 . |One|) (199 . *) (|EuclideanDomain&| 73) + (205 . |gcd|) (|SparseUnivariatePolynomial| $) + |FFIELDC-;gcdPolynomial;3Sup;16|) + '#(|primitive?| 211 |order| 216 |nextItem| 226 |init| 231 + |gcdPolynomial| 235 |discreteLog| 241 |differentiate| 252 + |createPrimitiveElement| 257 |conditionP| 261 |charthRoot| + 266) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 92 + '(0 6 0 7 1 6 10 0 11 1 6 0 10 12 1 6 + 13 0 14 1 6 10 0 17 1 19 0 18 20 1 23 + 22 0 24 2 26 13 25 0 27 1 6 0 0 28 2 + 26 0 29 0 30 0 6 34 35 0 6 34 36 2 6 + 0 0 34 37 0 6 0 40 0 6 41 42 2 41 13 + 0 0 43 1 13 0 0 44 0 6 47 48 2 6 0 0 + 18 49 2 6 13 0 0 50 0 6 0 53 1 6 54 + 18 55 1 54 34 0 56 2 54 57 10 0 58 2 + 6 0 0 0 59 1 63 61 62 64 1 18 65 0 66 + 1 67 47 0 68 3 69 57 6 6 34 70 1 74 + 72 73 75 1 76 72 73 77 0 73 0 78 2 73 + 13 0 0 79 0 72 0 80 2 76 82 73 13 83 + 1 73 0 6 84 2 72 0 73 18 85 2 72 0 0 + 0 86 0 72 0 87 2 72 0 73 0 88 2 89 0 + 0 0 90 1 0 13 0 51 1 0 10 0 52 1 0 19 + 0 21 1 0 15 0 16 0 0 0 9 2 0 91 91 91 + 92 1 0 34 0 60 2 0 57 0 0 71 1 0 0 0 + 8 0 0 0 45 1 0 31 32 33 1 0 0 0 38 1 + 0 15 0 39))))) + '|lookupComplete|)) @ \section{package FFSLPE FiniteFieldSolveLinearPolynomialEquation} <<package FFSLPE FiniteFieldSolveLinearPolynomialEquation>>= diff --git a/src/algebra/fraction.spad.pamphlet b/src/algebra/fraction.spad.pamphlet index 51cbb0d4..9fc563a2 100644 --- a/src/algebra/fraction.spad.pamphlet +++ b/src/algebra/fraction.spad.pamphlet @@ -273,15 +273,110 @@ Note that this code is not included in the generated catdef.spad file. <<QFCAT.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |QuotientFieldCategory;CAT| (QUOTE NIL)) - -(SETQ |QuotientFieldCategory;AL| (QUOTE NIL)) - -(DEFUN |QuotientFieldCategory| (#1=#:G103631) (LET (#2=#:G103632) (COND ((SETQ #2# (|assoc| (|devaluate| #1#) |QuotientFieldCategory;AL|)) (CDR #2#)) (T (SETQ |QuotientFieldCategory;AL| (|cons5| (CONS (|devaluate| #1#) (SETQ #2# (|QuotientFieldCategory;| #1#))) |QuotientFieldCategory;AL|)) #2#)))) - -(DEFUN |QuotientFieldCategory;| (|t#1|) (PROG (#1=#:G103630) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) (COND (|QuotientFieldCategory;CAT|) ((QUOTE T) (LETT |QuotientFieldCategory;CAT| (|Join| (|Field|) (|Algebra| (QUOTE |t#1|)) (|RetractableTo| (QUOTE |t#1|)) (|FullyEvalableOver| (QUOTE |t#1|)) (|DifferentialExtension| (QUOTE |t#1|)) (|FullyLinearlyExplicitRingOver| (QUOTE |t#1|)) (|Patternable| (QUOTE |t#1|)) (|FullyPatternMatchable| (QUOTE |t#1|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|/| (|$| |t#1| |t#1|)) T) ((|numer| (|t#1| |$|)) T) ((|denom| (|t#1| |$|)) T) ((|numerator| (|$| |$|)) T) ((|denominator| (|$| |$|)) T) ((|wholePart| (|t#1| |$|)) (|has| |t#1| (|EuclideanDomain|))) ((|fractionPart| (|$| |$|)) (|has| |t#1| (|EuclideanDomain|))) ((|random| (|$|)) (|has| |t#1| (|IntegerNumberSystem|))) ((|ceiling| (|t#1| |$|)) (|has| |t#1| (|IntegerNumberSystem|))) ((|floor| (|t#1| |$|)) (|has| |t#1| (|IntegerNumberSystem|))))) (QUOTE (((|StepThrough|) (|has| |t#1| (|StepThrough|))) ((|RetractableTo| (|Integer|)) (|has| |t#1| (|RetractableTo| (|Integer|)))) ((|RetractableTo| (|Fraction| (|Integer|))) (|has| |t#1| (|RetractableTo| (|Integer|)))) ((|OrderedSet|) (|has| |t#1| (|OrderedSet|))) ((|OrderedIntegralDomain|) (|has| |t#1| (|OrderedIntegralDomain|))) ((|RealConstant|) (|has| |t#1| (|RealConstant|))) ((|ConvertibleTo| (|InputForm|)) (|has| |t#1| (|ConvertibleTo| (|InputForm|)))) ((|CharacteristicZero|) (|has| |t#1| (|CharacteristicZero|))) ((|CharacteristicNonZero|) (|has| |t#1| (|CharacteristicNonZero|))) ((|RetractableTo| (|Symbol|)) (|has| |t#1| (|RetractableTo| (|Symbol|)))) ((|PolynomialFactorizationExplicit|) (|has| |t#1| (|PolynomialFactorizationExplicit|))))) (QUOTE NIL) NIL)) . #2=(|QuotientFieldCategory|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |QuotientFieldCategory|) (|devaluate| |t#1|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |QuotientFieldCategory;CAT| 'NIL) + +(DEFPARAMETER |QuotientFieldCategory;AL| 'NIL) + +(DEFUN |QuotientFieldCategory| (#0=#:G1388) + (LET (#1=#:G1389) + (COND + ((SETQ #1# + (|assoc| (|devaluate| #0#) |QuotientFieldCategory;AL|)) + (CDR #1#)) + (T (SETQ |QuotientFieldCategory;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# (|QuotientFieldCategory;| #0#))) + |QuotientFieldCategory;AL|)) + #1#)))) + +(DEFUN |QuotientFieldCategory;| (|t#1|) + (PROG (#0=#:G1387) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (COND + (|QuotientFieldCategory;CAT|) + ('T + (LETT |QuotientFieldCategory;CAT| + (|Join| (|Field|) (|Algebra| '|t#1|) + (|RetractableTo| '|t#1|) + (|FullyEvalableOver| '|t#1|) + (|DifferentialExtension| + '|t#1|) + (|FullyLinearlyExplicitRingOver| + '|t#1|) + (|Patternable| '|t#1|) + (|FullyPatternMatchable| + '|t#1|) + (|mkCategory| '|domain| + '(((/ ($ |t#1| |t#1|)) T) + ((|numer| (|t#1| $)) T) + ((|denom| (|t#1| $)) T) + ((|numerator| ($ $)) T) + ((|denominator| ($ $)) T) + ((|wholePart| (|t#1| $)) + (|has| |t#1| + (|EuclideanDomain|))) + ((|fractionPart| ($ $)) + (|has| |t#1| + (|EuclideanDomain|))) + ((|random| ($)) + (|has| |t#1| + (|IntegerNumberSystem|))) + ((|ceiling| (|t#1| $)) + (|has| |t#1| + (|IntegerNumberSystem|))) + ((|floor| (|t#1| $)) + (|has| |t#1| + (|IntegerNumberSystem|)))) + '(((|StepThrough|) + (|has| |t#1| + (|StepThrough|))) + ((|RetractableTo| + (|Integer|)) + (|has| |t#1| + (|RetractableTo| + (|Integer|)))) + ((|RetractableTo| + (|Fraction| (|Integer|))) + (|has| |t#1| + (|RetractableTo| + (|Integer|)))) + ((|OrderedSet|) + (|has| |t#1| + (|OrderedSet|))) + ((|OrderedIntegralDomain|) + (|has| |t#1| + (|OrderedIntegralDomain|))) + ((|RealConstant|) + (|has| |t#1| + (|RealConstant|))) + ((|ConvertibleTo| + (|InputForm|)) + (|has| |t#1| + (|ConvertibleTo| + (|InputForm|)))) + ((|CharacteristicZero|) + (|has| |t#1| + (|CharacteristicZero|))) + ((|CharacteristicNonZero|) + (|has| |t#1| + (|CharacteristicNonZero|))) + ((|RetractableTo| + (|Symbol|)) + (|has| |t#1| + (|RetractableTo| + (|Symbol|)))) + ((|PolynomialFactorizationExplicit|) + (|has| |t#1| + (|PolynomialFactorizationExplicit|)))) + 'NIL NIL)) + . #1=(|QuotientFieldCategory|))))) . #1#) + (SETELT #0# 0 + (LIST '|QuotientFieldCategory| (|devaluate| |t#1|))))))) @ \section{QFCAT-.lsp BOOTSTRAP} {\bf QFCAT-} depends on {\bf QFCAT}. We need to break this cycle to build @@ -294,65 +389,410 @@ Note that this code is not included in the generated catdef.spad file. <<QFCAT-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |QFCAT-;numerator;2A;1| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 9))) - -(DEFUN |QFCAT-;denominator;2A;2| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 9))) - -(DEFUN |QFCAT-;init;A;3| (|$|) (SPADCALL (|spadConstant| |$| 13) (|spadConstant| |$| 14) (QREFELT |$| 15))) - -(DEFUN |QFCAT-;nextItem;AU;4| (|n| |$|) (PROG (|m|) (RETURN (SEQ (LETT |m| (SPADCALL (SPADCALL |n| (QREFELT |$| 8)) (QREFELT |$| 18)) |QFCAT-;nextItem;AU;4|) (EXIT (COND ((QEQCAR |m| 1) (|error| "We seem to have a Fraction of a finite object")) ((QUOTE T) (CONS 0 (SPADCALL (QCDR |m|) (|spadConstant| |$| 14) (QREFELT |$| 15)))))))))) - -(DEFUN |QFCAT-;map;M2A;5| (|fn| |x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) |fn|) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) |fn|) (QREFELT |$| 15))) - -(DEFUN |QFCAT-;reducedSystem;MM;6| (|m| |$|) (SPADCALL |m| (QREFELT |$| 26))) - -(DEFUN |QFCAT-;characteristic;Nni;7| (|$|) (SPADCALL (QREFELT |$| 30))) - -(DEFUN |QFCAT-;differentiate;AMA;8| (|x| |deriv| |$|) (PROG (|n| |d|) (RETURN (SEQ (LETT |n| (SPADCALL |x| (QREFELT |$| 8)) |QFCAT-;differentiate;AMA;8|) (LETT |d| (SPADCALL |x| (QREFELT |$| 11)) |QFCAT-;differentiate;AMA;8|) (EXIT (SPADCALL (SPADCALL (SPADCALL (SPADCALL |n| |deriv|) |d| (QREFELT |$| 32)) (SPADCALL |n| (SPADCALL |d| |deriv|) (QREFELT |$| 32)) (QREFELT |$| 33)) (SPADCALL |d| 2 (QREFELT |$| 35)) (QREFELT |$| 15))))))) - -(DEFUN |QFCAT-;convert;AIf;9| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 38)) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 38)) (QREFELT |$| 39))) - -(DEFUN |QFCAT-;convert;AF;10| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 42)) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 42)) (QREFELT |$| 43))) - -(DEFUN |QFCAT-;convert;ADf;11| (|x| |$|) (|/| (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 46)) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 46)))) - -(DEFUN |QFCAT-;<;2AB;12| (|x| |y| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (SPADCALL |y| (QREFELT |$| 11)) (QREFELT |$| 32)) (SPADCALL (SPADCALL |y| (QREFELT |$| 8)) (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 32)) (QREFELT |$| 49))) - -(DEFUN |QFCAT-;<;2AB;13| (|x| |y| |$|) (PROG (|#G19| |#G20| |#G21| |#G22|) (RETURN (SEQ (COND ((SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (|spadConstant| |$| 51) (QREFELT |$| 49)) (PROGN (LETT |#G19| |y| |QFCAT-;<;2AB;13|) (LETT |#G20| |x| |QFCAT-;<;2AB;13|) (LETT |x| |#G19| |QFCAT-;<;2AB;13|) (LETT |y| |#G20| |QFCAT-;<;2AB;13|)))) (COND ((SPADCALL (SPADCALL |y| (QREFELT |$| 11)) (|spadConstant| |$| 51) (QREFELT |$| 49)) (PROGN (LETT |#G21| |y| |QFCAT-;<;2AB;13|) (LETT |#G22| |x| |QFCAT-;<;2AB;13|) (LETT |x| |#G21| |QFCAT-;<;2AB;13|) (LETT |y| |#G22| |QFCAT-;<;2AB;13|)))) (EXIT (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (SPADCALL |y| (QREFELT |$| 11)) (QREFELT |$| 32)) (SPADCALL (SPADCALL |y| (QREFELT |$| 8)) (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 32)) (QREFELT |$| 49))))))) - -(DEFUN |QFCAT-;<;2AB;14| (|x| |y| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (SPADCALL |y| (QREFELT |$| 11)) (QREFELT |$| 32)) (SPADCALL (SPADCALL |y| (QREFELT |$| 8)) (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 32)) (QREFELT |$| 49))) - -(DEFUN |QFCAT-;fractionPart;2A;15| (|x| |$|) (SPADCALL |x| (SPADCALL (SPADCALL |x| (QREFELT |$| 52)) (QREFELT |$| 9)) (QREFELT |$| 53))) - -(DEFUN |QFCAT-;coerce;SA;16| (|s| |$|) (SPADCALL (SPADCALL |s| (QREFELT |$| 56)) (QREFELT |$| 9))) - -(DEFUN |QFCAT-;retract;AS;17| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 58)) (QREFELT |$| 59))) - -(DEFUN |QFCAT-;retractIfCan;AU;18| (|x| |$|) (PROG (|r|) (RETURN (SEQ (LETT |r| (SPADCALL |x| (QREFELT |$| 62)) |QFCAT-;retractIfCan;AU;18|) (EXIT (COND ((QEQCAR |r| 1) (CONS 1 "failed")) ((QUOTE T) (SPADCALL (QCDR |r|) (QREFELT |$| 64))))))))) - -(DEFUN |QFCAT-;convert;AP;19| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 67)) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 67)) (QREFELT |$| 68))) - -(DEFUN |QFCAT-;patternMatch;AP2Pmr;20| (|x| |p| |l| |$|) (SPADCALL |x| |p| |l| (QREFELT |$| 72))) - -(DEFUN |QFCAT-;convert;AP;21| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 8)) (QREFELT |$| 76)) (SPADCALL (SPADCALL |x| (QREFELT |$| 11)) (QREFELT |$| 76)) (QREFELT |$| 77))) - -(DEFUN |QFCAT-;patternMatch;AP2Pmr;22| (|x| |p| |l| |$|) (SPADCALL |x| |p| |l| (QREFELT |$| 81))) - -(DEFUN |QFCAT-;coerce;FA;23| (|x| |$|) (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT |$| 86)) (QREFELT |$| 87)) (SPADCALL (SPADCALL |x| (QREFELT |$| 88)) (QREFELT |$| 87)) (QREFELT |$| 89))) - -(DEFUN |QFCAT-;retract;AI;24| (|x| |$|) (SPADCALL (SPADCALL |x| (QREFELT |$| 58)) (QREFELT |$| 91))) - -(DEFUN |QFCAT-;retractIfCan;AU;25| (|x| |$|) (PROG (|u|) (RETURN (SEQ (LETT |u| (SPADCALL |x| (QREFELT |$| 62)) |QFCAT-;retractIfCan;AU;25|) (EXIT (COND ((QEQCAR |u| 1) (CONS 1 "failed")) ((QUOTE T) (SPADCALL (QCDR |u|) (QREFELT |$| 94))))))))) - -(DEFUN |QFCAT-;random;A;26| (|$|) (PROG (|d|) (RETURN (SEQ (SEQ G190 (COND ((NULL (SPADCALL (LETT |d| (SPADCALL (QREFELT |$| 96)) |QFCAT-;random;A;26|) (QREFELT |$| 97))) (GO G191))) (SEQ (EXIT |d|)) NIL (GO G190) G191 (EXIT NIL)) (EXIT (SPADCALL (SPADCALL (QREFELT |$| 96)) |d| (QREFELT |$| 15))))))) - -(DEFUN |QFCAT-;reducedSystem;MVR;27| (|m| |v| |$|) (PROG (|n|) (RETURN (SEQ (LETT |n| (SPADCALL (SPADCALL (SPADCALL |v| (QREFELT |$| 100)) |m| (QREFELT |$| 101)) (QREFELT |$| 102)) |QFCAT-;reducedSystem;MVR;27|) (EXIT (CONS (SPADCALL |n| (SPADCALL |n| (QREFELT |$| 103)) (SPADCALL |n| (QREFELT |$| 104)) (|+| 1 (SPADCALL |n| (QREFELT |$| 105))) (SPADCALL |n| (QREFELT |$| 106)) (QREFELT |$| 107)) (SPADCALL |n| (SPADCALL |n| (QREFELT |$| 105)) (QREFELT |$| 109)))))))) - -(DEFUN |QuotientFieldCategory&| (|#1| |#2|) (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|QuotientFieldCategory&|)) (LETT |DV$2| (|devaluate| |#2|) . #1#) (LETT |dv$| (LIST (QUOTE |QuotientFieldCategory&|) |DV$1| |DV$2|) . #1#) (LETT |$| (GETREFV 119) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#2| (QUOTE (|PolynomialFactorizationExplicit|))) (|HasCategory| |#2| (QUOTE (|IntegerNumberSystem|))) (|HasCategory| |#2| (QUOTE (|EuclideanDomain|))) (|HasCategory| |#2| (QUOTE (|RetractableTo| (|Symbol|)))) (|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|))) (|HasCategory| |#2| (QUOTE (|CharacteristicZero|))) (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|InputForm|)))) (|HasCategory| |#2| (QUOTE (|RealConstant|))) (|HasCategory| |#2| (QUOTE (|OrderedIntegralDomain|))) (|HasCategory| |#2| (QUOTE (|OrderedSet|))) (|HasCategory| |#2| (QUOTE (|RetractableTo| (|Integer|)))) (|HasCategory| |#2| (QUOTE (|StepThrough|))))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 7 |#2|) (COND ((|testBitVector| |pv$| 12) (PROGN (QSETREFV |$| 16 (CONS (|dispatchFunction| |QFCAT-;init;A;3|) |$|)) (QSETREFV |$| 20 (CONS (|dispatchFunction| |QFCAT-;nextItem;AU;4|) |$|))))) (COND ((|testBitVector| |pv$| 7) (QSETREFV |$| 40 (CONS (|dispatchFunction| |QFCAT-;convert;AIf;9|) |$|)))) (COND ((|testBitVector| |pv$| 8) (PROGN (QSETREFV |$| 44 (CONS (|dispatchFunction| |QFCAT-;convert;AF;10|) |$|)) (QSETREFV |$| 47 (CONS (|dispatchFunction| |QFCAT-;convert;ADf;11|) |$|))))) (COND ((|testBitVector| |pv$| 9) (COND ((|HasAttribute| |#2| (QUOTE |canonicalUnitNormal|)) (QSETREFV |$| 50 (CONS (|dispatchFunction| |QFCAT-;<;2AB;12|) |$|))) ((QUOTE T) (QSETREFV |$| 50 (CONS (|dispatchFunction| |QFCAT-;<;2AB;13|) |$|))))) ((|testBitVector| |pv$| 10) (QSETREFV |$| 50 (CONS (|dispatchFunction| |QFCAT-;<;2AB;14|) |$|)))) (COND ((|testBitVector| |pv$| 3) (QSETREFV |$| 54 (CONS (|dispatchFunction| |QFCAT-;fractionPart;2A;15|) |$|)))) (COND ((|testBitVector| |pv$| 4) (PROGN (QSETREFV |$| 57 (CONS (|dispatchFunction| |QFCAT-;coerce;SA;16|) |$|)) (QSETREFV |$| 60 (CONS (|dispatchFunction| |QFCAT-;retract;AS;17|) |$|)) (QSETREFV |$| 65 (CONS (|dispatchFunction| |QFCAT-;retractIfCan;AU;18|) |$|))))) (COND ((|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|))))) (PROGN (QSETREFV |$| 69 (CONS (|dispatchFunction| |QFCAT-;convert;AP;19|) |$|)) (COND ((|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Integer|)))) (QSETREFV |$| 74 (CONS (|dispatchFunction| |QFCAT-;patternMatch;AP2Pmr;20|) |$|))))))) (COND ((|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|Pattern| (|Float|))))) (PROGN (QSETREFV |$| 78 (CONS (|dispatchFunction| |QFCAT-;convert;AP;21|) |$|)) (COND ((|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Float|)))) (QSETREFV |$| 83 (CONS (|dispatchFunction| |QFCAT-;patternMatch;AP2Pmr;22|) |$|))))))) (COND ((|testBitVector| |pv$| 11) (PROGN (QSETREFV |$| 90 (CONS (|dispatchFunction| |QFCAT-;coerce;FA;23|) |$|)) (COND ((|domainEqual| |#2| (|Integer|))) ((QUOTE T) (PROGN (QSETREFV |$| 92 (CONS (|dispatchFunction| |QFCAT-;retract;AI;24|) |$|)) (QSETREFV |$| 95 (CONS (|dispatchFunction| |QFCAT-;retractIfCan;AU;25|) |$|)))))))) (COND ((|testBitVector| |pv$| 2) (QSETREFV |$| 98 (CONS (|dispatchFunction| |QFCAT-;random;A;26|) |$|)))) |$|)))) - -(MAKEPROP (QUOTE |QuotientFieldCategory&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . |numer|) (5 . |coerce|) |QFCAT-;numerator;2A;1| (10 . |denom|) |QFCAT-;denominator;2A;2| (15 . |init|) (19 . |One|) (23 . |/|) (29 . |init|) (|Union| |$| (QUOTE "failed")) (33 . |nextItem|) (38 . |One|) (42 . |nextItem|) (|Mapping| 7 7) |QFCAT-;map;M2A;5| (|Matrix| 7) (|Matrix| 6) (|MatrixCommonDenominator| 7 6) (47 . |clearDenominator|) (|Matrix| |$|) |QFCAT-;reducedSystem;MM;6| (|NonNegativeInteger|) (52 . |characteristic|) |QFCAT-;characteristic;Nni;7| (56 . |*|) (62 . |-|) (|PositiveInteger|) (68 . |**|) |QFCAT-;differentiate;AMA;8| (|InputForm|) (74 . |convert|) (79 . |/|) (85 . |convert|) (|Float|) (90 . |convert|) (95 . |/|) (101 . |convert|) (|DoubleFloat|) (106 . |convert|) (111 . |convert|) (|Boolean|) (116 . |<|) (122 . |<|) (128 . |Zero|) (132 . |wholePart|) (137 . |-|) (143 . |fractionPart|) (|Symbol|) (148 . |coerce|) (153 . |coerce|) (158 . |retract|) (163 . |retract|) (168 . |retract|) (|Union| 7 (QUOTE "failed")) (173 . |retractIfCan|) (|Union| 55 (QUOTE "failed")) (178 . |retractIfCan|) (183 . |retractIfCan|) (|Pattern| 84) (188 . |convert|) (193 . |/|) (199 . |convert|) (|PatternMatchResult| 84 6) (|PatternMatchQuotientFieldCategory| 84 7 6) (204 . |patternMatch|) (|PatternMatchResult| 84 |$|) (211 . |patternMatch|) (|Pattern| 41) (218 . |convert|) (223 . |/|) (229 . |convert|) (|PatternMatchResult| 41 6) (|PatternMatchQuotientFieldCategory| 41 7 6) (234 . |patternMatch|) (|PatternMatchResult| 41 |$|) (241 . |patternMatch|) (|Integer|) (|Fraction| 84) (248 . |numer|) (253 . |coerce|) (258 . |denom|) (263 . |/|) (269 . |coerce|) (274 . |retract|) (279 . |retract|) (|Union| 84 (QUOTE "failed")) (284 . |retractIfCan|) (289 . |retractIfCan|) (294 . |random|) (298 . |zero?|) (303 . |random|) (|Vector| 6) (307 . |coerce|) (312 . |horizConcat|) (318 . |reducedSystem|) (323 . |minRowIndex|) (328 . |maxRowIndex|) (333 . |minColIndex|) (338 . |maxColIndex|) (343 . |subMatrix|) (|Vector| 7) (352 . |column|) (|Record| (|:| |mat| 23) (|:| |vec| 108)) (|Vector| |$|) |QFCAT-;reducedSystem;MVR;27| (|Union| 85 (QUOTE "failed")) (|Record| (|:| |mat| 115) (|:| |vec| (|Vector| 84))) (|Matrix| 84) (|List| 55) (|List| 29) (|OutputForm|))) (QUOTE #(|retractIfCan| 358 |retract| 368 |reducedSystem| 378 |random| 389 |patternMatch| 393 |numerator| 407 |nextItem| 412 |map| 417 |init| 423 |fractionPart| 427 |differentiate| 432 |denominator| 438 |convert| 443 |coerce| 468 |characteristic| 478 |<| 482)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 112 (QUOTE (1 6 7 0 8 1 6 0 7 9 1 6 7 0 11 0 7 0 13 0 7 0 14 2 6 0 7 7 15 0 0 0 16 1 7 17 0 18 0 6 0 19 1 0 17 0 20 1 25 23 24 26 0 7 29 30 2 7 0 0 0 32 2 7 0 0 0 33 2 7 0 0 34 35 1 7 37 0 38 2 37 0 0 0 39 1 0 37 0 40 1 7 41 0 42 2 41 0 0 0 43 1 0 41 0 44 1 7 45 0 46 1 0 45 0 47 2 7 48 0 0 49 2 0 48 0 0 50 0 7 0 51 1 6 7 0 52 2 6 0 0 0 53 1 0 0 0 54 1 7 0 55 56 1 0 0 55 57 1 6 7 0 58 1 7 55 0 59 1 0 55 0 60 1 6 61 0 62 1 7 63 0 64 1 0 63 0 65 1 7 66 0 67 2 66 0 0 0 68 1 0 66 0 69 3 71 70 6 66 70 72 3 0 73 0 66 73 74 1 7 75 0 76 2 75 0 0 0 77 1 0 75 0 78 3 80 79 6 75 79 81 3 0 82 0 75 82 83 1 85 84 0 86 1 6 0 84 87 1 85 84 0 88 2 6 0 0 0 89 1 0 0 85 90 1 7 84 0 91 1 0 84 0 92 1 7 93 0 94 1 0 93 0 95 0 7 0 96 1 7 48 0 97 0 0 0 98 1 24 0 99 100 2 24 0 0 0 101 1 6 23 27 102 1 23 84 0 103 1 23 84 0 104 1 23 84 0 105 1 23 84 0 106 5 23 0 0 84 84 84 84 107 2 23 108 0 84 109 1 0 93 0 95 1 0 63 0 65 1 0 84 0 92 1 0 55 0 60 2 0 110 27 111 112 1 0 23 27 28 0 0 0 98 3 0 82 0 75 82 83 3 0 73 0 66 73 74 1 0 0 0 10 1 0 17 0 20 2 0 0 21 0 22 0 0 0 16 1 0 0 0 54 2 0 0 0 21 36 1 0 0 0 12 1 0 45 0 47 1 0 37 0 40 1 0 41 0 44 1 0 66 0 69 1 0 75 0 78 1 0 0 55 57 1 0 0 85 90 0 0 29 31 2 0 48 0 0 50)))))) (QUOTE |lookupComplete|))) +(/VERSIONCHECK 2) + +(DEFUN |QFCAT-;numerator;2A;1| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 9))) + +(DEFUN |QFCAT-;denominator;2A;2| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 9))) + +(DEFUN |QFCAT-;init;A;3| ($) + (SPADCALL (|spadConstant| $ 13) (|spadConstant| $ 14) (QREFELT $ 15))) + +(DEFUN |QFCAT-;nextItem;AU;4| (|n| $) + (PROG (|m|) + (RETURN + (SEQ (LETT |m| + (SPADCALL (SPADCALL |n| (QREFELT $ 8)) (QREFELT $ 18)) + |QFCAT-;nextItem;AU;4|) + (EXIT (COND + ((QEQCAR |m| 1) + (|error| "We seem to have a Fraction of a finite object")) + ('T + (CONS 0 + (SPADCALL (QCDR |m|) (|spadConstant| $ 14) + (QREFELT $ 15)))))))))) + +(DEFUN |QFCAT-;map;M2A;5| (|fn| |x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 8)) |fn|) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) |fn|) (QREFELT $ 15))) + +(DEFUN |QFCAT-;reducedSystem;MM;6| (|m| $) + (SPADCALL |m| (QREFELT $ 26))) + +(DEFUN |QFCAT-;characteristic;Nni;7| ($) (SPADCALL (QREFELT $ 30))) + +(DEFUN |QFCAT-;differentiate;AMA;8| (|x| |deriv| $) + (PROG (|n| |d|) + (RETURN + (SEQ (LETT |n| (SPADCALL |x| (QREFELT $ 8)) + |QFCAT-;differentiate;AMA;8|) + (LETT |d| (SPADCALL |x| (QREFELT $ 11)) + |QFCAT-;differentiate;AMA;8|) + (EXIT (SPADCALL + (SPADCALL + (SPADCALL (SPADCALL |n| |deriv|) |d| + (QREFELT $ 32)) + (SPADCALL |n| (SPADCALL |d| |deriv|) + (QREFELT $ 32)) + (QREFELT $ 33)) + (SPADCALL |d| 2 (QREFELT $ 35)) (QREFELT $ 15))))))) + +(DEFUN |QFCAT-;convert;AIf;9| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 38)) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 38)) + (QREFELT $ 39))) + +(DEFUN |QFCAT-;convert;AF;10| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 42)) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 42)) + (QREFELT $ 43))) + +(DEFUN |QFCAT-;convert;ADf;11| (|x| $) + (/ (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 46)) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 46)))) + +(DEFUN |QFCAT-;<;2AB;12| (|x| |y| $) + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 8)) + (SPADCALL |y| (QREFELT $ 11)) (QREFELT $ 32)) + (SPADCALL (SPADCALL |y| (QREFELT $ 8)) + (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 32)) + (QREFELT $ 49))) + +(DEFUN |QFCAT-;<;2AB;13| (|x| |y| $) + (PROG (|#G19| |#G20| |#G21| |#G22|) + (RETURN + (SEQ (COND + ((SPADCALL (SPADCALL |x| (QREFELT $ 11)) + (|spadConstant| $ 51) (QREFELT $ 49)) + (PROGN + (LETT |#G19| |y| |QFCAT-;<;2AB;13|) + (LETT |#G20| |x| |QFCAT-;<;2AB;13|) + (LETT |x| |#G19| |QFCAT-;<;2AB;13|) + (LETT |y| |#G20| |QFCAT-;<;2AB;13|)))) + (COND + ((SPADCALL (SPADCALL |y| (QREFELT $ 11)) + (|spadConstant| $ 51) (QREFELT $ 49)) + (PROGN + (LETT |#G21| |y| |QFCAT-;<;2AB;13|) + (LETT |#G22| |x| |QFCAT-;<;2AB;13|) + (LETT |x| |#G21| |QFCAT-;<;2AB;13|) + (LETT |y| |#G22| |QFCAT-;<;2AB;13|)))) + (EXIT (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 8)) + (SPADCALL |y| (QREFELT $ 11)) (QREFELT $ 32)) + (SPADCALL (SPADCALL |y| (QREFELT $ 8)) + (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 32)) + (QREFELT $ 49))))))) + +(DEFUN |QFCAT-;<;2AB;14| (|x| |y| $) + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 8)) + (SPADCALL |y| (QREFELT $ 11)) (QREFELT $ 32)) + (SPADCALL (SPADCALL |y| (QREFELT $ 8)) + (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 32)) + (QREFELT $ 49))) + +(DEFUN |QFCAT-;fractionPart;2A;15| (|x| $) + (SPADCALL |x| (SPADCALL (SPADCALL |x| (QREFELT $ 52)) (QREFELT $ 9)) + (QREFELT $ 53))) + +(DEFUN |QFCAT-;coerce;SA;16| (|s| $) + (SPADCALL (SPADCALL |s| (QREFELT $ 56)) (QREFELT $ 9))) + +(DEFUN |QFCAT-;retract;AS;17| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 58)) (QREFELT $ 59))) + +(DEFUN |QFCAT-;retractIfCan;AU;18| (|x| $) + (PROG (|r|) + (RETURN + (SEQ (LETT |r| (SPADCALL |x| (QREFELT $ 62)) + |QFCAT-;retractIfCan;AU;18|) + (EXIT (COND + ((QEQCAR |r| 1) (CONS 1 "failed")) + ('T (SPADCALL (QCDR |r|) (QREFELT $ 64))))))))) + +(DEFUN |QFCAT-;convert;AP;19| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 67)) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 67)) + (QREFELT $ 68))) + +(DEFUN |QFCAT-;patternMatch;AP2Pmr;20| (|x| |p| |l| $) + (SPADCALL |x| |p| |l| (QREFELT $ 72))) + +(DEFUN |QFCAT-;convert;AP;21| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 8)) (QREFELT $ 76)) + (SPADCALL (SPADCALL |x| (QREFELT $ 11)) (QREFELT $ 76)) + (QREFELT $ 77))) + +(DEFUN |QFCAT-;patternMatch;AP2Pmr;22| (|x| |p| |l| $) + (SPADCALL |x| |p| |l| (QREFELT $ 81))) + +(DEFUN |QFCAT-;coerce;FA;23| (|x| $) + (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 86)) (QREFELT $ 87)) + (SPADCALL (SPADCALL |x| (QREFELT $ 88)) (QREFELT $ 87)) + (QREFELT $ 89))) + +(DEFUN |QFCAT-;retract;AI;24| (|x| $) + (SPADCALL (SPADCALL |x| (QREFELT $ 58)) (QREFELT $ 91))) + +(DEFUN |QFCAT-;retractIfCan;AU;25| (|x| $) + (PROG (|u|) + (RETURN + (SEQ (LETT |u| (SPADCALL |x| (QREFELT $ 62)) + |QFCAT-;retractIfCan;AU;25|) + (EXIT (COND + ((QEQCAR |u| 1) (CONS 1 "failed")) + ('T (SPADCALL (QCDR |u|) (QREFELT $ 94))))))))) + +(DEFUN |QFCAT-;random;A;26| ($) + (PROG (|d|) + (RETURN + (SEQ (SEQ G190 + (COND + ((NULL (SPADCALL + (LETT |d| (SPADCALL (QREFELT $ 96)) + |QFCAT-;random;A;26|) + (QREFELT $ 97))) + (GO G191))) + (SEQ (EXIT |d|)) NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL (SPADCALL (QREFELT $ 96)) |d| + (QREFELT $ 15))))))) + +(DEFUN |QFCAT-;reducedSystem;MVR;27| (|m| |v| $) + (PROG (|n|) + (RETURN + (SEQ (LETT |n| + (SPADCALL + (SPADCALL (SPADCALL |v| (QREFELT $ 100)) |m| + (QREFELT $ 101)) + (QREFELT $ 102)) + |QFCAT-;reducedSystem;MVR;27|) + (EXIT (CONS (SPADCALL |n| (SPADCALL |n| (QREFELT $ 103)) + (SPADCALL |n| (QREFELT $ 104)) + (+ 1 (SPADCALL |n| (QREFELT $ 105))) + (SPADCALL |n| (QREFELT $ 106)) + (QREFELT $ 107)) + (SPADCALL |n| (SPADCALL |n| (QREFELT $ 105)) + (QREFELT $ 109)))))))) + +(DEFUN |QuotientFieldCategory&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) + . #0=(|QuotientFieldCategory&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| + (LIST '|QuotientFieldCategory&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 119) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#2| + '(|PolynomialFactorizationExplicit|)) + (|HasCategory| |#2| + '(|IntegerNumberSystem|)) + (|HasCategory| |#2| '(|EuclideanDomain|)) + (|HasCategory| |#2| + '(|RetractableTo| (|Symbol|))) + (|HasCategory| |#2| + '(|CharacteristicNonZero|)) + (|HasCategory| |#2| + '(|CharacteristicZero|)) + (|HasCategory| |#2| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#2| '(|RealConstant|)) + (|HasCategory| |#2| + '(|OrderedIntegralDomain|)) + (|HasCategory| |#2| '(|OrderedSet|)) + (|HasCategory| |#2| + '(|RetractableTo| (|Integer|))) + (|HasCategory| |#2| '(|StepThrough|)))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|testBitVector| |pv$| 12) + (PROGN + (QSETREFV $ 16 + (CONS (|dispatchFunction| |QFCAT-;init;A;3|) $)) + (QSETREFV $ 20 + (CONS (|dispatchFunction| |QFCAT-;nextItem;AU;4|) $))))) + (COND + ((|testBitVector| |pv$| 7) + (QSETREFV $ 40 + (CONS (|dispatchFunction| |QFCAT-;convert;AIf;9|) $)))) + (COND + ((|testBitVector| |pv$| 8) + (PROGN + (QSETREFV $ 44 + (CONS (|dispatchFunction| |QFCAT-;convert;AF;10|) $)) + (QSETREFV $ 47 + (CONS (|dispatchFunction| |QFCAT-;convert;ADf;11|) $))))) + (COND + ((|testBitVector| |pv$| 9) + (COND + ((|HasAttribute| |#2| '|canonicalUnitNormal|) + (QSETREFV $ 50 + (CONS (|dispatchFunction| |QFCAT-;<;2AB;12|) $))) + ('T + (QSETREFV $ 50 + (CONS (|dispatchFunction| |QFCAT-;<;2AB;13|) $))))) + ((|testBitVector| |pv$| 10) + (QSETREFV $ 50 + (CONS (|dispatchFunction| |QFCAT-;<;2AB;14|) $)))) + (COND + ((|testBitVector| |pv$| 3) + (QSETREFV $ 54 + (CONS (|dispatchFunction| |QFCAT-;fractionPart;2A;15|) + $)))) + (COND + ((|testBitVector| |pv$| 4) + (PROGN + (QSETREFV $ 57 + (CONS (|dispatchFunction| |QFCAT-;coerce;SA;16|) $)) + (QSETREFV $ 60 + (CONS (|dispatchFunction| |QFCAT-;retract;AS;17|) $)) + (QSETREFV $ 65 + (CONS (|dispatchFunction| |QFCAT-;retractIfCan;AU;18|) + $))))) + (COND + ((|HasCategory| |#2| + '(|ConvertibleTo| (|Pattern| (|Integer|)))) + (PROGN + (QSETREFV $ 69 + (CONS (|dispatchFunction| |QFCAT-;convert;AP;19|) $)) + (COND + ((|HasCategory| |#2| '(|PatternMatchable| (|Integer|))) + (QSETREFV $ 74 + (CONS (|dispatchFunction| + |QFCAT-;patternMatch;AP2Pmr;20|) + $))))))) + (COND + ((|HasCategory| |#2| + '(|ConvertibleTo| (|Pattern| (|Float|)))) + (PROGN + (QSETREFV $ 78 + (CONS (|dispatchFunction| |QFCAT-;convert;AP;21|) $)) + (COND + ((|HasCategory| |#2| '(|PatternMatchable| (|Float|))) + (QSETREFV $ 83 + (CONS (|dispatchFunction| + |QFCAT-;patternMatch;AP2Pmr;22|) + $))))))) + (COND + ((|testBitVector| |pv$| 11) + (PROGN + (QSETREFV $ 90 + (CONS (|dispatchFunction| |QFCAT-;coerce;FA;23|) $)) + (COND + ((|domainEqual| |#2| (|Integer|))) + ('T + (PROGN + (QSETREFV $ 92 + (CONS (|dispatchFunction| |QFCAT-;retract;AI;24|) + $)) + (QSETREFV $ 95 + (CONS (|dispatchFunction| + |QFCAT-;retractIfCan;AU;25|) + $)))))))) + (COND + ((|testBitVector| |pv$| 2) + (QSETREFV $ 98 + (CONS (|dispatchFunction| |QFCAT-;random;A;26|) $)))) + $)))) + +(MAKEPROP '|QuotientFieldCategory&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (0 . |numer|) (5 . |coerce|) |QFCAT-;numerator;2A;1| + (10 . |denom|) |QFCAT-;denominator;2A;2| (15 . |init|) + (19 . |One|) (23 . /) (29 . |init|) (|Union| $ '"failed") + (33 . |nextItem|) (38 . |One|) (42 . |nextItem|) + (|Mapping| 7 7) |QFCAT-;map;M2A;5| (|Matrix| 7) + (|Matrix| 6) (|MatrixCommonDenominator| 7 6) + (47 . |clearDenominator|) (|Matrix| $) + |QFCAT-;reducedSystem;MM;6| (|NonNegativeInteger|) + (52 . |characteristic|) |QFCAT-;characteristic;Nni;7| + (56 . *) (62 . -) (|PositiveInteger|) (68 . **) + |QFCAT-;differentiate;AMA;8| (|InputForm|) + (74 . |convert|) (79 . /) (85 . |convert|) (|Float|) + (90 . |convert|) (95 . /) (101 . |convert|) + (|DoubleFloat|) (106 . |convert|) (111 . |convert|) + (|Boolean|) (116 . <) (122 . <) (128 . |Zero|) + (132 . |wholePart|) (137 . -) (143 . |fractionPart|) + (|Symbol|) (148 . |coerce|) (153 . |coerce|) + (158 . |retract|) (163 . |retract|) (168 . |retract|) + (|Union| 7 '"failed") (173 . |retractIfCan|) + (|Union| 55 '"failed") (178 . |retractIfCan|) + (183 . |retractIfCan|) (|Pattern| 84) (188 . |convert|) + (193 . /) (199 . |convert|) (|PatternMatchResult| 84 6) + (|PatternMatchQuotientFieldCategory| 84 7 6) + (204 . |patternMatch|) (|PatternMatchResult| 84 $) + (211 . |patternMatch|) (|Pattern| 41) (218 . |convert|) + (223 . /) (229 . |convert|) (|PatternMatchResult| 41 6) + (|PatternMatchQuotientFieldCategory| 41 7 6) + (234 . |patternMatch|) (|PatternMatchResult| 41 $) + (241 . |patternMatch|) (|Integer|) (|Fraction| 84) + (248 . |numer|) (253 . |coerce|) (258 . |denom|) (263 . /) + (269 . |coerce|) (274 . |retract|) (279 . |retract|) + (|Union| 84 '"failed") (284 . |retractIfCan|) + (289 . |retractIfCan|) (294 . |random|) (298 . |zero?|) + (303 . |random|) (|Vector| 6) (307 . |coerce|) + (312 . |horizConcat|) (318 . |reducedSystem|) + (323 . |minRowIndex|) (328 . |maxRowIndex|) + (333 . |minColIndex|) (338 . |maxColIndex|) + (343 . |subMatrix|) (|Vector| 7) (352 . |column|) + (|Record| (|:| |mat| 23) (|:| |vec| 108)) (|Vector| $) + |QFCAT-;reducedSystem;MVR;27| (|Union| 85 '"failed") + (|Record| (|:| |mat| 115) (|:| |vec| (|Vector| 84))) + (|Matrix| 84) (|List| 55) (|List| 29) (|OutputForm|)) + '#(|retractIfCan| 358 |retract| 368 |reducedSystem| 378 + |random| 389 |patternMatch| 393 |numerator| 407 |nextItem| + 412 |map| 417 |init| 423 |fractionPart| 427 + |differentiate| 432 |denominator| 438 |convert| 443 + |coerce| 468 |characteristic| 478 < 482) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 112 + '(1 6 7 0 8 1 6 0 7 9 1 6 7 0 11 0 7 0 + 13 0 7 0 14 2 6 0 7 7 15 0 0 0 16 1 7 + 17 0 18 0 6 0 19 1 0 17 0 20 1 25 23 + 24 26 0 7 29 30 2 7 0 0 0 32 2 7 0 0 + 0 33 2 7 0 0 34 35 1 7 37 0 38 2 37 0 + 0 0 39 1 0 37 0 40 1 7 41 0 42 2 41 0 + 0 0 43 1 0 41 0 44 1 7 45 0 46 1 0 45 + 0 47 2 7 48 0 0 49 2 0 48 0 0 50 0 7 + 0 51 1 6 7 0 52 2 6 0 0 0 53 1 0 0 0 + 54 1 7 0 55 56 1 0 0 55 57 1 6 7 0 58 + 1 7 55 0 59 1 0 55 0 60 1 6 61 0 62 1 + 7 63 0 64 1 0 63 0 65 1 7 66 0 67 2 + 66 0 0 0 68 1 0 66 0 69 3 71 70 6 66 + 70 72 3 0 73 0 66 73 74 1 7 75 0 76 2 + 75 0 0 0 77 1 0 75 0 78 3 80 79 6 75 + 79 81 3 0 82 0 75 82 83 1 85 84 0 86 + 1 6 0 84 87 1 85 84 0 88 2 6 0 0 0 89 + 1 0 0 85 90 1 7 84 0 91 1 0 84 0 92 1 + 7 93 0 94 1 0 93 0 95 0 7 0 96 1 7 48 + 0 97 0 0 0 98 1 24 0 99 100 2 24 0 0 + 0 101 1 6 23 27 102 1 23 84 0 103 1 + 23 84 0 104 1 23 84 0 105 1 23 84 0 + 106 5 23 0 0 84 84 84 84 107 2 23 108 + 0 84 109 1 0 93 0 95 1 0 63 0 65 1 0 + 84 0 92 1 0 55 0 60 2 0 110 27 111 + 112 1 0 23 27 28 0 0 0 98 3 0 82 0 75 + 82 83 3 0 73 0 66 73 74 1 0 0 0 10 1 + 0 17 0 20 2 0 0 21 0 22 0 0 0 16 1 0 + 0 0 54 2 0 0 0 21 36 1 0 0 0 12 1 0 + 45 0 47 1 0 37 0 40 1 0 41 0 44 1 0 + 66 0 69 1 0 75 0 78 1 0 0 55 57 1 0 0 + 85 90 0 0 29 31 2 0 48 0 0 50))))) + '|lookupComplete|)) @ \section{package QFCAT2 QuotientFieldCategoryFunctions2} <<package QFCAT2 QuotientFieldCategoryFunctions2>>= 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>>= diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet index 01cbbccc..bb940038 100644 --- a/src/algebra/polycat.spad.pamphlet +++ b/src/algebra/polycat.spad.pamphlet @@ -617,172 +617,243 @@ Note that this code is not included in the generated catdef.spad file. <<POLYCAT.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |PolynomialCategory;CAT| (QUOTE NIL)) - -(SETQ |PolynomialCategory;AL| (QUOTE NIL)) - -(DEFUN |PolynomialCategory| (|&REST| #1=#:G101841 |&AUX| #2=#:G101839) - (DSETQ #2# #1#) - (LET (#3=#:G101840) - (COND - ((SETQ #3# (|assoc| (|devaluateList| #2#) |PolynomialCategory;AL|)) - (CDR #3#)) - (T - (SETQ |PolynomialCategory;AL| - (|cons5| - (CONS - (|devaluateList| #2#) - (SETQ #3# (APPLY (FUNCTION |PolynomialCategory;|) #2#))) - |PolynomialCategory;AL|)) - #3#)))) - -(DEFUN |PolynomialCategory;| (|t#1| |t#2| |t#3|) - (PROG (#1=#:G101838) - (RETURN - (PROG1 - (LETT #1# - (|sublisV| - (PAIR - (QUOTE (|t#1| |t#2| |t#3|)) - (LIST - (|devaluate| |t#1|) - (|devaluate| |t#2|) - (|devaluate| |t#3|))) - (COND - (|PolynomialCategory;CAT|) - ((QUOTE T) - (LETT |PolynomialCategory;CAT| - (|Join| - (|PartialDifferentialRing| (QUOTE |t#3|)) - (|FiniteAbelianMonoidRing| (QUOTE |t#1|) (QUOTE |t#2|)) - (|Evalable| (QUOTE |$|)) - (|InnerEvalable| (QUOTE |t#3|) (QUOTE |t#1|)) - (|InnerEvalable| (QUOTE |t#3|) (QUOTE |$|)) - (|RetractableTo| (QUOTE |t#3|)) - (|FullyLinearlyExplicitRingOver| (QUOTE |t#1|)) - (|mkCategory| - (QUOTE |domain|) - (QUOTE ( - ((|degree| ((|NonNegativeInteger|) |$| |t#3|)) T) - ((|degree| - ((|List| (|NonNegativeInteger|)) - |$| - (|List| |t#3|))) T) - ((|coefficient| - (|$| |$| |t#3| (|NonNegativeInteger|))) T) - ((|coefficient| - (|$| - |$| - (|List| |t#3|) - (|List| (|NonNegativeInteger|)))) T) - ((|monomials| ((|List| |$|) |$|)) T) - ((|univariate| - ((|SparseUnivariatePolynomial| |$|) |$| |t#3|)) T) - ((|univariate| - ((|SparseUnivariatePolynomial| |t#1|) |$|)) T) - ((|mainVariable| ((|Union| |t#3| "failed") |$|)) T) - ((|minimumDegree| - ((|NonNegativeInteger|) |$| |t#3|)) T) - ((|minimumDegree| - ((|List| (|NonNegativeInteger|)) - |$| - (|List| |t#3|))) T) - ((|monicDivide| - ((|Record| - (|:| |quotient| |$|) - (|:| |remainder| |$|)) - |$| - |$| - |t#3|)) T) - ((|monomial| (|$| |$| |t#3| (|NonNegativeInteger|))) T) - ((|monomial| - (|$| - |$| - (|List| |t#3|) - (|List| (|NonNegativeInteger|)))) T) - ((|multivariate| - (|$| (|SparseUnivariatePolynomial| |t#1|) |t#3|)) T) - ((|multivariate| - (|$| (|SparseUnivariatePolynomial| |$|) |t#3|)) T) - ((|isPlus| ((|Union| (|List| |$|) "failed") |$|)) T) - ((|isTimes| ((|Union| (|List| |$|) "failed") |$|)) T) - ((|isExpt| - ((|Union| - (|Record| - (|:| |var| |t#3|) - (|:| |exponent| (|NonNegativeInteger|))) - "failed") - |$|)) T) - ((|totalDegree| ((|NonNegativeInteger|) |$|)) T) - ((|totalDegree| - ((|NonNegativeInteger|) |$| (|List| |t#3|))) T) - ((|variables| ((|List| |t#3|) |$|)) T) - ((|primitiveMonomials| ((|List| |$|) |$|)) T) - ((|resultant| (|$| |$| |$| |t#3|)) - (|has| |t#1| (|CommutativeRing|))) - ((|discriminant| (|$| |$| |t#3|)) - (|has| |t#1| (|CommutativeRing|))) - ((|content| (|$| |$| |t#3|)) - (|has| |t#1| (|GcdDomain|))) - ((|primitivePart| (|$| |$|)) - (|has| |t#1| (|GcdDomain|))) - ((|primitivePart| (|$| |$| |t#3|)) - (|has| |t#1| (|GcdDomain|))) - ((|squareFree| ((|Factored| |$|) |$|)) - (|has| |t#1| (|GcdDomain|))) - ((|squareFreePart| (|$| |$|)) ( - |has| |t#1| (|GcdDomain|))))) - (QUOTE ( - ((|OrderedSet|) (|has| |t#1| (|OrderedSet|))) - ((|ConvertibleTo| (|InputForm|)) - (AND - (|has| |t#3| (|ConvertibleTo| (|InputForm|))) - (|has| |t#1| (|ConvertibleTo| (|InputForm|))))) - ((|ConvertibleTo| (|Pattern| (|Integer|))) - (AND - (|has| |t#3| - (|ConvertibleTo| (|Pattern| (|Integer|)))) - (|has| |t#1| - (|ConvertibleTo| (|Pattern| (|Integer|)))))) - ((|ConvertibleTo| (|Pattern| (|Float|))) - (AND - (|has| |t#3| - (|ConvertibleTo| (|Pattern| (|Float|)))) - (|has| |t#1| - (|ConvertibleTo| (|Pattern| (|Float|)))))) - ((|PatternMatchable| (|Integer|)) - (AND - (|has| |t#3| (|PatternMatchable| (|Integer|))) - (|has| |t#1| (|PatternMatchable| (|Integer|))))) - ((|PatternMatchable| (|Float|)) - (AND - (|has| |t#3| (|PatternMatchable| (|Float|))) - (|has| |t#1| (|PatternMatchable| (|Float|))))) - ((|GcdDomain|) (|has| |t#1| (|GcdDomain|))) - (|canonicalUnitNormal| - (|has| |t#1| (ATTRIBUTE |canonicalUnitNormal|))) - ((|PolynomialFactorizationExplicit|) - (|has| |t#1| (|PolynomialFactorizationExplicit|))))) - (QUOTE ( - (|Factored| |$|) - (|List| |$|) - (|List| |t#3|) - (|NonNegativeInteger|) - (|SparseUnivariatePolynomial| |$|) - (|SparseUnivariatePolynomial| |t#1|) - (|List| (|NonNegativeInteger|)))) - NIL)) - . #2=(|PolynomialCategory|))))) - . #2#) - (SETELT #1# 0 - (LIST - (QUOTE |PolynomialCategory|) - (|devaluate| |t#1|) - (|devaluate| |t#2|) - (|devaluate| |t#3|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |PolynomialCategory;CAT| 'NIL) + +(DEFPARAMETER |PolynomialCategory;AL| 'NIL) + +(DEFUN |PolynomialCategory| (&REST #0=#:G1406 &AUX #1=#:G1404) + (DSETQ #1# #0#) + (LET (#2=#:G1405) + (COND + ((SETQ #2# + (|assoc| (|devaluateList| #1#) |PolynomialCategory;AL|)) + (CDR #2#)) + (T (SETQ |PolynomialCategory;AL| + (|cons5| (CONS (|devaluateList| #1#) + (SETQ #2# + (APPLY #'|PolynomialCategory;| #1#))) + |PolynomialCategory;AL|)) + #2#)))) +(DEFUN |PolynomialCategory;| (|t#1| |t#2| |t#3|) + (PROG (#0=#:G1403) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1| |t#2| |t#3|) + (LIST (|devaluate| |t#1|) + (|devaluate| |t#2|) + (|devaluate| |t#3|))) + (COND + (|PolynomialCategory;CAT|) + ('T + (LETT |PolynomialCategory;CAT| + (|Join| (|PartialDifferentialRing| + '|t#3|) + (|FiniteAbelianMonoidRing| + '|t#1| '|t#2|) + (|Evalable| '$) + (|InnerEvalable| '|t#3| '|t#1|) + (|InnerEvalable| '|t#3| '$) + (|RetractableTo| '|t#3|) + (|FullyLinearlyExplicitRingOver| + '|t#1|) + (|mkCategory| '|domain| + '(((|degree| + ((|NonNegativeInteger|) $ + |t#3|)) + T) + ((|degree| + ((|List| + (|NonNegativeInteger|)) + $ (|List| |t#3|))) + T) + ((|coefficient| + ($ $ |t#3| + (|NonNegativeInteger|))) + T) + ((|coefficient| + ($ $ (|List| |t#3|) + (|List| + (|NonNegativeInteger|)))) + T) + ((|monomials| + ((|List| $) $)) + T) + ((|univariate| + ((|SparseUnivariatePolynomial| + $) + $ |t#3|)) + T) + ((|univariate| + ((|SparseUnivariatePolynomial| + |t#1|) + $)) + T) + ((|mainVariable| + ((|Union| |t#3| "failed") + $)) + T) + ((|minimumDegree| + ((|NonNegativeInteger|) $ + |t#3|)) + T) + ((|minimumDegree| + ((|List| + (|NonNegativeInteger|)) + $ (|List| |t#3|))) + T) + ((|monicDivide| + ((|Record| + (|:| |quotient| $) + (|:| |remainder| $)) + $ $ |t#3|)) + T) + ((|monomial| + ($ $ |t#3| + (|NonNegativeInteger|))) + T) + ((|monomial| + ($ $ (|List| |t#3|) + (|List| + (|NonNegativeInteger|)))) + T) + ((|multivariate| + ($ + (|SparseUnivariatePolynomial| + |t#1|) + |t#3|)) + T) + ((|multivariate| + ($ + (|SparseUnivariatePolynomial| + $) + |t#3|)) + T) + ((|isPlus| + ((|Union| (|List| $) + "failed") + $)) + T) + ((|isTimes| + ((|Union| (|List| $) + "failed") + $)) + T) + ((|isExpt| + ((|Union| + (|Record| + (|:| |var| |t#3|) + (|:| |exponent| + (|NonNegativeInteger|))) + "failed") + $)) + T) + ((|totalDegree| + ((|NonNegativeInteger|) $)) + T) + ((|totalDegree| + ((|NonNegativeInteger|) $ + (|List| |t#3|))) + T) + ((|variables| + ((|List| |t#3|) $)) + T) + ((|primitiveMonomials| + ((|List| $) $)) + T) + ((|resultant| ($ $ $ |t#3|)) + (|has| |t#1| + (|CommutativeRing|))) + ((|discriminant| + ($ $ |t#3|)) + (|has| |t#1| + (|CommutativeRing|))) + ((|content| ($ $ |t#3|)) + (|has| |t#1| (|GcdDomain|))) + ((|primitivePart| ($ $)) + (|has| |t#1| (|GcdDomain|))) + ((|primitivePart| + ($ $ |t#3|)) + (|has| |t#1| (|GcdDomain|))) + ((|squareFree| + ((|Factored| $) $)) + (|has| |t#1| (|GcdDomain|))) + ((|squareFreePart| ($ $)) + (|has| |t#1| (|GcdDomain|)))) + '(((|OrderedSet|) + (|has| |t#1| + (|OrderedSet|))) + ((|ConvertibleTo| + (|InputForm|)) + (AND + (|has| |t#3| + (|ConvertibleTo| + (|InputForm|))) + (|has| |t#1| + (|ConvertibleTo| + (|InputForm|))))) + ((|ConvertibleTo| + (|Pattern| (|Integer|))) + (AND + (|has| |t#3| + (|ConvertibleTo| + (|Pattern| (|Integer|)))) + (|has| |t#1| + (|ConvertibleTo| + (|Pattern| (|Integer|)))))) + ((|ConvertibleTo| + (|Pattern| (|Float|))) + (AND + (|has| |t#3| + (|ConvertibleTo| + (|Pattern| (|Float|)))) + (|has| |t#1| + (|ConvertibleTo| + (|Pattern| (|Float|)))))) + ((|PatternMatchable| + (|Integer|)) + (AND + (|has| |t#3| + (|PatternMatchable| + (|Integer|))) + (|has| |t#1| + (|PatternMatchable| + (|Integer|))))) + ((|PatternMatchable| + (|Float|)) + (AND + (|has| |t#3| + (|PatternMatchable| + (|Float|))) + (|has| |t#1| + (|PatternMatchable| + (|Float|))))) + ((|GcdDomain|) + (|has| |t#1| (|GcdDomain|))) + (|canonicalUnitNormal| + (|has| |t#1| + (ATTRIBUTE + |canonicalUnitNormal|))) + ((|PolynomialFactorizationExplicit|) + (|has| |t#1| + (|PolynomialFactorizationExplicit|)))) + '((|Factored| $) (|List| $) + (|List| |t#3|) + (|NonNegativeInteger|) + (|SparseUnivariatePolynomial| + $) + (|SparseUnivariatePolynomial| + |t#1|) + (|List| + (|NonNegativeInteger|))) + NIL)) + . #1=(|PolynomialCategory|))))) . #1#) + (SETELT #0# 0 + (LIST '|PolynomialCategory| (|devaluate| |t#1|) + (|devaluate| |t#2|) (|devaluate| |t#3|))))))) @ \section{POLYCAT-.lsp BOOTSTRAP} {\bf POLYCAT-} depends on {\bf POLYCAT}. We need to break this cycle to build @@ -795,1927 +866,1709 @@ Note that this code is not included in the generated catdef.spad file. <<POLYCAT-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(DEFUN |POLYCAT-;eval;SLS;1| (|p| |l| |$|) - (PROG (#1=#:G101870 #2=#:G101860 #3=#:G101868 #4=#:G101869 - |lvar| #5=#:G101866 |e| #6=#:G101867) - (RETURN - (SEQ - (COND - ((NULL |l|) |p|) - ((QUOTE T) - (SEQ - (SEQ - (EXIT - (SEQ - (LETT |e| NIL |POLYCAT-;eval;SLS;1|) - (LETT #1# |l| |POLYCAT-;eval;SLS;1|) - G190 - (COND - ((OR - (ATOM #1#) - (PROGN (LETT |e| (CAR #1#) |POLYCAT-;eval;SLS;1|) NIL)) - (GO G191))) - (SEQ - (EXIT - (COND - ((QEQCAR - (SPADCALL - (SPADCALL |e| (QREFELT |$| 11)) - (QREFELT |$| 13)) - 1) - (PROGN - (LETT #2# - (|error| "cannot find a variable to evaluate") - |POLYCAT-;eval;SLS;1|) - (GO #2#)))))) - (LETT #1# (CDR #1#) |POLYCAT-;eval;SLS;1|) - (GO G190) - G191 - (EXIT NIL))) - #2# - (EXIT #2#)) - (LETT |lvar| - (PROGN - (LETT #3# NIL |POLYCAT-;eval;SLS;1|) - (SEQ - (LETT |e| NIL |POLYCAT-;eval;SLS;1|) - (LETT #4# |l| |POLYCAT-;eval;SLS;1|) - G190 - (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |e| (CAR #4#) |POLYCAT-;eval;SLS;1|) NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #3# - (CONS - (SPADCALL - (SPADCALL |e| (QREFELT |$| 11)) - (QREFELT |$| 14)) - #3#) - |POLYCAT-;eval;SLS;1|))) - (LETT #4# (CDR #4#) |POLYCAT-;eval;SLS;1|) - (GO G190) - G191 - (EXIT (NREVERSE0 #3#)))) - |POLYCAT-;eval;SLS;1|) - (EXIT - (SPADCALL - |p| - |lvar| - (PROGN - (LETT #5# NIL |POLYCAT-;eval;SLS;1|) - (SEQ - (LETT |e| NIL |POLYCAT-;eval;SLS;1|) - (LETT #6# |l| |POLYCAT-;eval;SLS;1|) - G190 - (COND - ((OR - (ATOM #6#) - (PROGN - (LETT |e| (CAR #6#) |POLYCAT-;eval;SLS;1|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #5# - (CONS (SPADCALL |e| (QREFELT |$| 15)) #5#) - |POLYCAT-;eval;SLS;1|))) - (LETT #6# (CDR #6#) |POLYCAT-;eval;SLS;1|) - (GO G190) - G191 - (EXIT (NREVERSE0 #5#)))) - (QREFELT |$| 18)))))))))) - -(DEFUN |POLYCAT-;monomials;SL;2| (|p| |$|) - (PROG (|ml|) - (RETURN - (SEQ - (LETT |ml| NIL |POLYCAT-;monomials;SL;2|) - (SEQ G190 - (COND - ((NULL - (COND - ((SPADCALL |p| (|spadConstant| |$| 21) (QREFELT |$| 24)) - (QUOTE NIL)) - ((QUOTE T) (QUOTE T)))) - (GO G191))) - (SEQ - (LETT |ml| - (CONS (SPADCALL |p| (QREFELT |$| 25)) |ml|) - |POLYCAT-;monomials;SL;2|) - (EXIT - (LETT |p| - (SPADCALL |p| (QREFELT |$| 26)) - |POLYCAT-;monomials;SL;2|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT (REVERSE |ml|)))))) - -(DEFUN |POLYCAT-;isPlus;SU;3| (|p| |$|) - (PROG (|l|) - (RETURN - (COND - ((NULL - (CDR - (LETT |l| - (SPADCALL |p| (QREFELT |$| 28)) - |POLYCAT-;isPlus;SU;3|))) - (CONS 1 "failed")) - ((QUOTE T) (CONS 0 |l|)))))) - -(DEFUN |POLYCAT-;isTimes;SU;4| (|p| |$|) - (PROG (|lv| #1=#:G101892 |v| #2=#:G101893 |l| |r|) - (RETURN - (SEQ - (COND - ((OR - (NULL - (LETT |lv| - (SPADCALL |p| (QREFELT |$| 31)) - |POLYCAT-;isTimes;SU;4|)) - (NULL (SPADCALL |p| (QREFELT |$| 32)))) - (CONS 1 "failed")) - ((QUOTE T) - (SEQ - (LETT |l| - (PROGN - (LETT #1# NIL |POLYCAT-;isTimes;SU;4|) - (SEQ - (LETT |v| NIL |POLYCAT-;isTimes;SU;4|) - (LETT #2# |lv| |POLYCAT-;isTimes;SU;4|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |v| (CAR #2#) |POLYCAT-;isTimes;SU;4|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS - (SPADCALL - (|spadConstant| |$| 33) - |v| - (SPADCALL |p| |v| (QREFELT |$| 36)) - (QREFELT |$| 37)) - #1#) - |POLYCAT-;isTimes;SU;4|))) - (LETT #2# (CDR #2#) |POLYCAT-;isTimes;SU;4|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - |POLYCAT-;isTimes;SU;4|) - (EXIT - (COND - ((SPADCALL - (LETT |r| - (SPADCALL |p| (QREFELT |$| 38)) - |POLYCAT-;isTimes;SU;4|) - (QREFELT |$| 39)) - (COND - ((NULL (CDR |lv|)) (CONS 1 "failed")) - ((QUOTE T) (CONS 0 |l|)))) - ((QUOTE T) - (CONS 0 - (CONS (SPADCALL |r| (QREFELT |$| 40)) |l|)))))))))))) - -(DEFUN |POLYCAT-;isExpt;SU;5| (|p| |$|) - (PROG (|u| |d|) - (RETURN - (SEQ - (LETT |u| (SPADCALL |p| (QREFELT |$| 42)) |POLYCAT-;isExpt;SU;5|) - (EXIT - (COND - ((OR - (QEQCAR |u| 1) - (NULL - (SPADCALL |p| - (SPADCALL - (|spadConstant| |$| 33) - (QCDR |u|) - (LETT |d| - (SPADCALL |p| (QCDR |u|) (QREFELT |$| 36)) - |POLYCAT-;isExpt;SU;5|) - (QREFELT |$| 37)) - (QREFELT |$| 24)))) +(/VERSIONCHECK 2) + +(DEFUN |POLYCAT-;eval;SLS;1| (|p| |l| $) + (PROG (#0=#:G1420 #1=#:G1414 #2=#:G1421 #3=#:G1422 |lvar| #4=#:G1423 + |e| #5=#:G1424) + (RETURN + (SEQ (COND + ((NULL |l|) |p|) + ('T + (SEQ (SEQ (EXIT (SEQ (LETT |e| NIL |POLYCAT-;eval;SLS;1|) + (LETT #0# |l| |POLYCAT-;eval;SLS;1|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |e| (CAR #0#) + |POLYCAT-;eval;SLS;1|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (COND + ((QEQCAR + (SPADCALL + (SPADCALL |e| (QREFELT $ 11)) + (QREFELT $ 13)) + 1) + (PROGN + (LETT #1# + (|error| + "cannot find a variable to evaluate") + |POLYCAT-;eval;SLS;1|) + (GO #1#)))))) + (LETT #0# (CDR #0#) + |POLYCAT-;eval;SLS;1|) + (GO G190) G191 (EXIT NIL))) + #1# (EXIT #1#)) + (LETT |lvar| + (PROGN + (LETT #2# NIL |POLYCAT-;eval;SLS;1|) + (SEQ (LETT |e| NIL |POLYCAT-;eval;SLS;1|) + (LETT #3# |l| |POLYCAT-;eval;SLS;1|) + G190 + (COND + ((OR (ATOM #3#) + (PROGN + (LETT |e| (CAR #3#) + |POLYCAT-;eval;SLS;1|) + NIL)) + (GO G191))) + (SEQ (EXIT + (LETT #2# + (CONS + (SPADCALL + (SPADCALL |e| (QREFELT $ 11)) + (QREFELT $ 14)) + #2#) + |POLYCAT-;eval;SLS;1|))) + (LETT #3# (CDR #3#) + |POLYCAT-;eval;SLS;1|) + (GO G190) G191 (EXIT (NREVERSE0 #2#)))) + |POLYCAT-;eval;SLS;1|) + (EXIT (SPADCALL |p| |lvar| + (PROGN + (LETT #4# NIL |POLYCAT-;eval;SLS;1|) + (SEQ (LETT |e| NIL + |POLYCAT-;eval;SLS;1|) + (LETT #5# |l| + |POLYCAT-;eval;SLS;1|) + G190 + (COND + ((OR (ATOM #5#) + (PROGN + (LETT |e| (CAR #5#) + |POLYCAT-;eval;SLS;1|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #4# + (CONS + (SPADCALL |e| (QREFELT $ 15)) + #4#) + |POLYCAT-;eval;SLS;1|))) + (LETT #5# (CDR #5#) + |POLYCAT-;eval;SLS;1|) + (GO G190) G191 + (EXIT (NREVERSE0 #4#)))) + (QREFELT $ 18)))))))))) + +(DEFUN |POLYCAT-;monomials;SL;2| (|p| $) + (PROG (|ml|) + (RETURN + (SEQ (LETT |ml| NIL |POLYCAT-;monomials;SL;2|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |p| (|spadConstant| $ 21) + (QREFELT $ 24)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |ml| + (CONS (SPADCALL |p| (QREFELT $ 26)) |ml|) + |POLYCAT-;monomials;SL;2|) + (EXIT (LETT |p| (SPADCALL |p| (QREFELT $ 27)) + |POLYCAT-;monomials;SL;2|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (REVERSE |ml|)))))) + +(DEFUN |POLYCAT-;isPlus;SU;3| (|p| $) + (PROG (|l|) + (RETURN + (COND + ((NULL (CDR (LETT |l| (SPADCALL |p| (QREFELT $ 29)) + |POLYCAT-;isPlus;SU;3|))) + (CONS 1 "failed")) + ('T (CONS 0 |l|)))))) + +(DEFUN |POLYCAT-;isTimes;SU;4| (|p| $) + (PROG (|lv| #0=#:G1446 |v| #1=#:G1447 |l| |r|) + (RETURN + (SEQ (COND + ((OR (NULL (LETT |lv| (SPADCALL |p| (QREFELT $ 32)) + |POLYCAT-;isTimes;SU;4|)) + (NULL (SPADCALL |p| (QREFELT $ 33)))) (CONS 1 "failed")) - ((QUOTE T) (CONS 0 (CONS (QCDR |u|) |d|))))))))) - -(DEFUN |POLYCAT-;coefficient;SVarSetNniS;6| (|p| |v| |n| |$|) - (SPADCALL (SPADCALL |p| |v| (QREFELT |$| 47)) |n| (QREFELT |$| 49))) - -(DEFUN |POLYCAT-;coefficient;SLLS;7| (|p| |lv| |ln| |$|) - (COND - ((NULL |lv|) - (COND - ((NULL |ln|) |p|) - ((QUOTE T) (|error| "mismatched lists in coefficient")))) - ((NULL |ln|) - (|error| "mismatched lists in coefficient")) - ((QUOTE T) - (SPADCALL - (SPADCALL - (SPADCALL |p| (|SPADfirst| |lv|) (QREFELT |$| 47)) - (|SPADfirst| |ln|) - (QREFELT |$| 49)) - (CDR |lv|) - (CDR |ln|) - (QREFELT |$| 52))))) - -(DEFUN |POLYCAT-;monomial;SLLS;8| (|p| |lv| |ln| |$|) - (COND - ((NULL |lv|) - (COND - ((NULL |ln|) |p|) - ((QUOTE T) (|error| "mismatched lists in monomial")))) - ((NULL |ln|) - (|error| "mismatched lists in monomial")) - ((QUOTE T) - (SPADCALL - (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |ln|) (QREFELT |$| 37)) - (CDR |lv|) - (CDR |ln|) - (QREFELT |$| 54))))) - -(DEFUN |POLYCAT-;retract;SVarSet;9| (|p| |$|) - (PROG (#1=#:G101918 |q|) - (RETURN - (SEQ - (LETT |q| - (PROG2 - (LETT #1# - (SPADCALL |p| (QREFELT |$| 42)) - |POLYCAT-;retract;SVarSet;9|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#)) - |POLYCAT-;retract;SVarSet;9|) - (EXIT - (COND - ((SPADCALL - (SPADCALL |q| (QREFELT |$| 56)) - |p| - (QREFELT |$| 24)) - |q|) - ((QUOTE T) - (|error| "Polynomial is not a single variable")))))))) - -(DEFUN |POLYCAT-;retractIfCan;SU;10| (|p| |$|) - (PROG (|q| #1=#:G101926) - (RETURN - (SEQ - (EXIT - (SEQ - (SEQ - (LETT |q| - (SPADCALL |p| (QREFELT |$| 42)) - |POLYCAT-;retractIfCan;SU;10|) - (EXIT - (COND - ((QEQCAR |q| 0) - (COND - ((SPADCALL - (SPADCALL (QCDR |q|) (QREFELT |$| 56)) - |p| - (QREFELT |$| 24)) - (PROGN - (LETT #1# |q| |POLYCAT-;retractIfCan;SU;10|) - (GO #1#)))))))) - (EXIT (CONS 1 "failed")))) - #1# - (EXIT #1#))))) - -(DEFUN |POLYCAT-;mkPrim| (|p| |$|) - (SPADCALL - (|spadConstant| |$| 34) - (SPADCALL |p| (QREFELT |$| 59)) - (QREFELT |$| 60))) - -(DEFUN |POLYCAT-;primitiveMonomials;SL;12| (|p| |$|) - (PROG (#1=#:G101931 |q| #2=#:G101932) - (RETURN - (SEQ - (PROGN - (LETT #1# NIL |POLYCAT-;primitiveMonomials;SL;12|) - (SEQ - (LETT |q| NIL |POLYCAT-;primitiveMonomials;SL;12|) - (LETT #2# - (SPADCALL |p| (QREFELT |$| 28)) - |POLYCAT-;primitiveMonomials;SL;12|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |q| (CAR #2#) |POLYCAT-;primitiveMonomials;SL;12|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS - (|POLYCAT-;mkPrim| |q| |$|) - #1#) - |POLYCAT-;primitiveMonomials;SL;12|))) - (LETT #2# (CDR #2#) |POLYCAT-;primitiveMonomials;SL;12|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))))))) - -(DEFUN |POLYCAT-;totalDegree;SNni;13| (|p| |$|) - (PROG (#1=#:G101934 |d| |u|) - (RETURN - (SEQ - (COND - ((SPADCALL |p| (QREFELT |$| 62)) 0) - ((QUOTE T) - (SEQ - (LETT |u| - (SPADCALL |p| - (PROG2 - (LETT #1# - (SPADCALL |p| (QREFELT |$| 42)) - |POLYCAT-;totalDegree;SNni;13|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#)) - (QREFELT |$| 47)) - |POLYCAT-;totalDegree;SNni;13|) - (LETT |d| 0 |POLYCAT-;totalDegree;SNni;13|) - (SEQ G190 - (COND - ((NULL - (COND - ((SPADCALL |u| (|spadConstant| |$| 63) (QREFELT |$| 64)) - (QUOTE NIL)) - ((QUOTE T) (QUOTE T)))) (GO G191))) - (SEQ - (LETT |d| - (MAX |d| - (|+| - (SPADCALL |u| (QREFELT |$| 65)) - (SPADCALL - (SPADCALL |u| (QREFELT |$| 66)) - (QREFELT |$| 67)))) - |POLYCAT-;totalDegree;SNni;13|) - (EXIT - (LETT |u| - (SPADCALL |u| (QREFELT |$| 68)) - |POLYCAT-;totalDegree;SNni;13|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT |d|)))))))) - -(DEFUN |POLYCAT-;totalDegree;SLNni;14| (|p| |lv| |$|) - (PROG (#1=#:G101942 |v| |w| |d| |u|) - (RETURN - (SEQ - (COND - ((SPADCALL |p| (QREFELT |$| 62)) 0) - ((QUOTE T) - (SEQ - (LETT |u| - (SPADCALL |p| - (LETT |v| - (PROG2 - (LETT #1# - (SPADCALL |p| (QREFELT |$| 42)) - |POLYCAT-;totalDegree;SLNni;14|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#)) - |POLYCAT-;totalDegree;SLNni;14|) - (QREFELT |$| 47)) - |POLYCAT-;totalDegree;SLNni;14|) - (LETT |d| 0 |POLYCAT-;totalDegree;SLNni;14|) - (LETT |w| 0 |POLYCAT-;totalDegree;SLNni;14|) - (COND - ((SPADCALL |v| |lv| (QREFELT |$| 70)) - (LETT |w| 1 |POLYCAT-;totalDegree;SLNni;14|))) - (SEQ G190 - (COND - ((NULL - (COND - ((SPADCALL |u| (|spadConstant| |$| 63) (QREFELT |$| 64)) - (QUOTE NIL)) - ((QUOTE T) (QUOTE T)))) - (GO G191))) - (SEQ - (LETT |d| - (MAX |d| - (|+| - (|*| |w| (SPADCALL |u| (QREFELT |$| 65))) - (SPADCALL - (SPADCALL |u| (QREFELT |$| 66)) - |lv| - (QREFELT |$| 71)))) - |POLYCAT-;totalDegree;SLNni;14|) - (EXIT - (LETT |u| - (SPADCALL |u| (QREFELT |$| 68)) - |POLYCAT-;totalDegree;SLNni;14|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT |d|)))))))) - -(DEFUN |POLYCAT-;resultant;2SVarSetS;15| (|p1| |p2| |mvar| |$|) - (SPADCALL - (SPADCALL |p1| |mvar| (QREFELT |$| 47)) - (SPADCALL |p2| |mvar| (QREFELT |$| 47)) - (QREFELT |$| 73))) - -(DEFUN |POLYCAT-;discriminant;SVarSetS;16| (|p| |var| |$|) - (SPADCALL (SPADCALL |p| |var| (QREFELT |$| 47)) (QREFELT |$| 75))) - -(DEFUN |POLYCAT-;allMonoms| (|l| |$|) - (PROG (#1=#:G101954 |p| #2=#:G101955) - (RETURN - (SEQ - (SPADCALL - (SPADCALL - (PROGN - (LETT #1# NIL |POLYCAT-;allMonoms|) - (SEQ - (LETT |p| NIL |POLYCAT-;allMonoms|) - (LETT #2# |l| |POLYCAT-;allMonoms|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN (LETT |p| (CAR #2#) |POLYCAT-;allMonoms|) NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS (SPADCALL |p| (QREFELT |$| 77)) #1#) - |POLYCAT-;allMonoms|))) - (LETT #2# (CDR #2#) |POLYCAT-;allMonoms|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 79)) - (QREFELT |$| 80)))))) - -(DEFUN |POLYCAT-;P2R| (|p| |b| |n| |$|) - (PROG (|w| |bj| #1=#:G101960 |i| #2=#:G101959) - (RETURN - (SEQ - (LETT |w| - (SPADCALL |n| (|spadConstant| |$| 22) (QREFELT |$| 82)) - |POLYCAT-;P2R|) - (SEQ - (LETT |bj| NIL |POLYCAT-;P2R|) - (LETT #1# |b| |POLYCAT-;P2R|) - (LETT |i| (SPADCALL |w| (QREFELT |$| 84)) |POLYCAT-;P2R|) - (LETT #2# (QVSIZE |w|) |POLYCAT-;P2R|) - G190 - (COND - ((OR - (|>| |i| #2#) - (ATOM #1#) - (PROGN (LETT |bj| (CAR #1#) |POLYCAT-;P2R|) NIL)) - (GO G191))) - (SEQ - (EXIT - (SPADCALL |w| |i| - (SPADCALL |p| |bj| (QREFELT |$| 85)) - (QREFELT |$| 86)))) - (LETT |i| - (PROG1 - (|+| |i| 1) - (LETT #1# (CDR #1#) |POLYCAT-;P2R|)) - |POLYCAT-;P2R|) - (GO G190) - G191 - (EXIT NIL)) - (EXIT |w|))))) - -(DEFUN |POLYCAT-;eq2R| (|l| |b| |$|) - (PROG (#1=#:G101964 |bj| #2=#:G101965 #3=#:G101966 |p| #4=#:G101967) - (RETURN - (SEQ - (SPADCALL - (PROGN - (LETT #1# NIL |POLYCAT-;eq2R|) - (SEQ - (LETT |bj| NIL |POLYCAT-;eq2R|) - (LETT #2# |b| |POLYCAT-;eq2R|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN (LETT |bj| (CAR #2#) |POLYCAT-;eq2R|) NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS - (PROGN - (LETT #3# NIL |POLYCAT-;eq2R|) - (SEQ - (LETT |p| NIL |POLYCAT-;eq2R|) - (LETT #4# |l| |POLYCAT-;eq2R|) - G190 - (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |p| (CAR #4#) |POLYCAT-;eq2R|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #3# - (CONS (SPADCALL |p| |bj| (QREFELT |$| 85)) #3#) - |POLYCAT-;eq2R|))) - (LETT #4# (CDR #4#) |POLYCAT-;eq2R|) - (GO G190) - G191 - (EXIT (NREVERSE0 #3#)))) - #1#) - |POLYCAT-;eq2R|))) - (LETT #2# (CDR #2#) |POLYCAT-;eq2R|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 89)))))) - -(DEFUN |POLYCAT-;reducedSystem;MM;20| (|m| |$|) - (PROG (#1=#:G101979 |r| #2=#:G101980 |b| #3=#:G101977 - |bj| #4=#:G101978 |d| |mm| |l|) - (RETURN - (SEQ - (LETT |l| - (SPADCALL |m| (QREFELT |$| 92)) - |POLYCAT-;reducedSystem;MM;20|) - (LETT |b| - (SPADCALL - (SPADCALL - (PROGN - (LETT #1# NIL |POLYCAT-;reducedSystem;MM;20|) - (SEQ - (LETT |r| NIL |POLYCAT-;reducedSystem;MM;20|) - (LETT #2# |l| |POLYCAT-;reducedSystem;MM;20|) + ('T + (SEQ (LETT |l| + (PROGN + (LETT #0# NIL |POLYCAT-;isTimes;SU;4|) + (SEQ (LETT |v| NIL |POLYCAT-;isTimes;SU;4|) + (LETT #1# |lv| |POLYCAT-;isTimes;SU;4|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |v| (CAR #1#) + |POLYCAT-;isTimes;SU;4|) + NIL)) + (GO G191))) + (SEQ (EXIT + (LETT #0# + (CONS + (SPADCALL (|spadConstant| $ 34) + |v| + (SPADCALL |p| |v| + (QREFELT $ 37)) + (QREFELT $ 38)) + #0#) + |POLYCAT-;isTimes;SU;4|))) + (LETT #1# (CDR #1#) + |POLYCAT-;isTimes;SU;4|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))) + |POLYCAT-;isTimes;SU;4|) + (LETT |r| (SPADCALL |p| (QREFELT $ 39)) + |POLYCAT-;isTimes;SU;4|) + (EXIT (COND + ((SPADCALL |r| (|spadConstant| $ 35) + (QREFELT $ 40)) + (COND + ((NULL (CDR |lv|)) (CONS 1 "failed")) + ('T (CONS 0 |l|)))) + ('T + (CONS 0 + (CONS (SPADCALL |r| (QREFELT $ 41)) + |l|)))))))))))) + +(DEFUN |POLYCAT-;isExpt;SU;5| (|p| $) + (PROG (|u| |d|) + (RETURN + (SEQ (LETT |u| (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;isExpt;SU;5|) + (EXIT (COND + ((OR (QEQCAR |u| 1) + (NULL (SPADCALL |p| + (SPADCALL (|spadConstant| $ 34) + (QCDR |u|) + (LETT |d| + (SPADCALL |p| (QCDR |u|) + (QREFELT $ 37)) + |POLYCAT-;isExpt;SU;5|) + (QREFELT $ 38)) + (QREFELT $ 24)))) + (CONS 1 "failed")) + ('T (CONS 0 (CONS (QCDR |u|) |d|))))))))) + +(DEFUN |POLYCAT-;coefficient;SVarSetNniS;6| (|p| |v| |n| $) + (SPADCALL (SPADCALL |p| |v| (QREFELT $ 48)) |n| (QREFELT $ 50))) + +(DEFUN |POLYCAT-;coefficient;SLLS;7| (|p| |lv| |ln| $) + (COND + ((NULL |lv|) + (COND + ((NULL |ln|) |p|) + ('T (|error| "mismatched lists in coefficient")))) + ((NULL |ln|) (|error| "mismatched lists in coefficient")) + ('T + (SPADCALL + (SPADCALL (SPADCALL |p| (|SPADfirst| |lv|) (QREFELT $ 48)) + (|SPADfirst| |ln|) (QREFELT $ 50)) + (CDR |lv|) (CDR |ln|) (QREFELT $ 53))))) + +(DEFUN |POLYCAT-;monomial;SLLS;8| (|p| |lv| |ln| $) + (COND + ((NULL |lv|) + (COND + ((NULL |ln|) |p|) + ('T (|error| "mismatched lists in monomial")))) + ((NULL |ln|) (|error| "mismatched lists in monomial")) + ('T + (SPADCALL + (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |ln|) + (QREFELT $ 38)) + (CDR |lv|) (CDR |ln|) (QREFELT $ 55))))) + +(DEFUN |POLYCAT-;retract;SVarSet;9| (|p| $) + (PROG (#0=#:G1472 |q|) + (RETURN + (SEQ (LETT |q| + (PROG2 (LETT #0# (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;retract;SVarSet;9|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 9) #0#)) + |POLYCAT-;retract;SVarSet;9|) + (EXIT (COND + ((SPADCALL (SPADCALL |q| (QREFELT $ 57)) |p| + (QREFELT $ 24)) + |q|) + ('T (|error| "Polynomial is not a single variable")))))))) + +(DEFUN |POLYCAT-;retractIfCan;SU;10| (|p| $) + (PROG (|q| #0=#:G1480) + (RETURN + (SEQ (EXIT (SEQ (SEQ (LETT |q| (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;retractIfCan;SU;10|) + (EXIT (COND + ((QEQCAR |q| 0) + (COND + ((SPADCALL + (SPADCALL (QCDR |q|) + (QREFELT $ 57)) + |p| (QREFELT $ 24)) + (PROGN + (LETT #0# |q| + |POLYCAT-;retractIfCan;SU;10|) + (GO #0#)))))))) + (EXIT (CONS 1 "failed")))) + #0# (EXIT #0#))))) + +(DEFUN |POLYCAT-;mkPrim| (|p| $) + (SPADCALL (|spadConstant| $ 35) (SPADCALL |p| (QREFELT $ 60)) + (QREFELT $ 61))) + +(DEFUN |POLYCAT-;primitiveMonomials;SL;12| (|p| $) + (PROG (#0=#:G1485 |q| #1=#:G1486) + (RETURN + (SEQ (PROGN + (LETT #0# NIL |POLYCAT-;primitiveMonomials;SL;12|) + (SEQ (LETT |q| NIL |POLYCAT-;primitiveMonomials;SL;12|) + (LETT #1# (SPADCALL |p| (QREFELT $ 29)) + |POLYCAT-;primitiveMonomials;SL;12|) G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |r| (CAR #2#) |POLYCAT-;reducedSystem;MM;20|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS (|POLYCAT-;allMonoms| |r| |$|) #1#) - |POLYCAT-;reducedSystem;MM;20|))) - (LETT #2# (CDR #2#) |POLYCAT-;reducedSystem;MM;20|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 79)) - (QREFELT |$| 80)) - |POLYCAT-;reducedSystem;MM;20|) - (LETT |d| - (PROGN - (LETT #3# NIL |POLYCAT-;reducedSystem;MM;20|) - (SEQ - (LETT |bj| NIL |POLYCAT-;reducedSystem;MM;20|) - (LETT #4# |b| |POLYCAT-;reducedSystem;MM;20|) - G190 - (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |bj| (CAR #4#) |POLYCAT-;reducedSystem;MM;20|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #3# - (CONS (SPADCALL |bj| (QREFELT |$| 59)) #3#) - |POLYCAT-;reducedSystem;MM;20|))) - (LETT #4# (CDR #4#) |POLYCAT-;reducedSystem;MM;20|) - (GO G190) - G191 - (EXIT (NREVERSE0 #3#)))) - |POLYCAT-;reducedSystem;MM;20|) - (LETT |mm| - (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|) - |POLYCAT-;reducedSystem;MM;20|) - (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|) - (SEQ G190 - (COND - ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - (GO G191))) - (SEQ - (LETT |mm| - (SPADCALL |mm| - (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|) (QREFELT |$| 93)) - |POLYCAT-;reducedSystem;MM;20|) - (EXIT (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT |mm|))))) - -(DEFUN |POLYCAT-;reducedSystem;MVR;21| (|m| |v| |$|) - (PROG (#1=#:G101994 |s| #2=#:G101995 |b| #3=#:G101992 |bj| #4=#:G101993 - |d| |n| |mm| |w| |l| |r|) - (RETURN - (SEQ - (LETT |l| (SPADCALL |m| (QREFELT |$| 92)) |POLYCAT-;reducedSystem;MVR;21|) - (LETT |r| (SPADCALL |v| (QREFELT |$| 97)) |POLYCAT-;reducedSystem;MVR;21|) - (LETT |b| - (SPADCALL - (SPADCALL - (|POLYCAT-;allMonoms| |r| |$|) - (SPADCALL - (PROGN - (LETT #1# NIL |POLYCAT-;reducedSystem;MVR;21|) - (SEQ - (LETT |s| NIL |POLYCAT-;reducedSystem;MVR;21|) - (LETT #2# |l| |POLYCAT-;reducedSystem;MVR;21|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |s| (CAR #2#) |POLYCAT-;reducedSystem;MVR;21|) + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |q| (CAR #1#) + |POLYCAT-;primitiveMonomials;SL;12|) NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS (|POLYCAT-;allMonoms| |s| |$|) #1#) - |POLYCAT-;reducedSystem;MVR;21|))) - (LETT #2# (CDR #2#) |POLYCAT-;reducedSystem;MVR;21|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 79)) - (QREFELT |$| 98)) - (QREFELT |$| 80)) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |d| - (PROGN - (LETT #3# NIL |POLYCAT-;reducedSystem;MVR;21|) - (SEQ - (LETT |bj| NIL |POLYCAT-;reducedSystem;MVR;21|) - (LETT #4# |b| |POLYCAT-;reducedSystem;MVR;21|) - G190 - (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |bj| (CAR #4#) |POLYCAT-;reducedSystem;MVR;21|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #3# - (CONS (SPADCALL |bj| (QREFELT |$| 59)) #3#) - |POLYCAT-;reducedSystem;MVR;21|))) - (LETT #4# (CDR #4#) |POLYCAT-;reducedSystem;MVR;21|) - (GO G190) - G191 - (EXIT (NREVERSE0 #3#)))) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |n| (LENGTH |d|) |POLYCAT-;reducedSystem;MVR;21|) - (LETT |mm| - (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |w| - (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| |$|) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|) - (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|) - (SEQ G190 - (COND - ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - (GO G191))) - (SEQ - (LETT |mm| - (SPADCALL |mm| - (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|) - (QREFELT |$| 93)) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |w| - (SPADCALL |w| - (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| |$|) - (QREFELT |$| 99)) - |POLYCAT-;reducedSystem;MVR;21|) - (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|) - (EXIT (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT (CONS |mm| |w|)))))) - -(DEFUN |POLYCAT-;gcdPolynomial;3Sup;22| (|pp| |qq| |$|) - (SPADCALL |pp| |qq| (QREFELT |$| 104))) - -(DEFUN |POLYCAT-;solveLinearPolynomialEquation;LSupU;23| (|lpp| |pp| |$|) - (SPADCALL |lpp| |pp| (QREFELT |$| 109))) - -(DEFUN |POLYCAT-;factorPolynomial;SupF;24| (|pp| |$|) - (SPADCALL |pp| (QREFELT |$| 114))) - -(DEFUN |POLYCAT-;factorSquareFreePolynomial;SupF;25| (|pp| |$|) - (SPADCALL |pp| (QREFELT |$| 117))) - -(DEFUN |POLYCAT-;factor;SF;26| (|p| |$|) - (PROG (|v| |ansR| #1=#:G102039 |w| #2=#:G102040 |up| |ansSUP| - #3=#:G102037 |ww| #4=#:G102038) - (RETURN - (SEQ - (LETT |v| (SPADCALL |p| (QREFELT |$| 42)) |POLYCAT-;factor;SF;26|) - (EXIT - (COND - ((QEQCAR |v| 1) - (SEQ - (LETT |ansR| - (SPADCALL (SPADCALL |p| (QREFELT |$| 38)) (QREFELT |$| 120)) - |POLYCAT-;factor;SF;26|) - (EXIT - (SPADCALL - (SPADCALL - (SPADCALL |ansR| (QREFELT |$| 122)) - (QREFELT |$| 40)) - (PROGN - (LETT #1# NIL |POLYCAT-;factor;SF;26|) - (SEQ - (LETT |w| NIL |POLYCAT-;factor;SF;26|) - (LETT #2# - (SPADCALL |ansR| (QREFELT |$| 126)) - |POLYCAT-;factor;SF;26|) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS (|POLYCAT-;mkPrim| |q| $) #0#) + |POLYCAT-;primitiveMonomials;SL;12|))) + (LETT #1# (CDR #1#) + |POLYCAT-;primitiveMonomials;SL;12|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))))))) + +(DEFUN |POLYCAT-;totalDegree;SNni;13| (|p| $) + (PROG (#0=#:G1488 |d| |u|) + (RETURN + (SEQ (COND + ((SPADCALL |p| (QREFELT $ 63)) 0) + ('T + (SEQ (LETT |u| + (SPADCALL |p| + (PROG2 (LETT #0# + (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;totalDegree;SNni;13|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 9) #0#)) + (QREFELT $ 48)) + |POLYCAT-;totalDegree;SNni;13|) + (LETT |d| 0 |POLYCAT-;totalDegree;SNni;13|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |u| + (|spadConstant| $ 64) + (QREFELT $ 65)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |d| + (MAX |d| + (+ (SPADCALL |u| (QREFELT $ 66)) + (SPADCALL + (SPADCALL |u| (QREFELT $ 67)) + (QREFELT $ 68)))) + |POLYCAT-;totalDegree;SNni;13|) + (EXIT (LETT |u| + (SPADCALL |u| (QREFELT $ 69)) + |POLYCAT-;totalDegree;SNni;13|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |d|)))))))) + +(DEFUN |POLYCAT-;totalDegree;SLNni;14| (|p| |lv| $) + (PROG (#0=#:G1496 |v| |w| |d| |u|) + (RETURN + (SEQ (COND + ((SPADCALL |p| (QREFELT $ 63)) 0) + ('T + (SEQ (LETT |u| + (SPADCALL |p| + (LETT |v| + (PROG2 + (LETT #0# + (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;totalDegree;SLNni;14|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 9) #0#)) + |POLYCAT-;totalDegree;SLNni;14|) + (QREFELT $ 48)) + |POLYCAT-;totalDegree;SLNni;14|) + (LETT |d| 0 |POLYCAT-;totalDegree;SLNni;14|) + (LETT |w| 0 |POLYCAT-;totalDegree;SLNni;14|) + (COND + ((SPADCALL |v| |lv| (QREFELT $ 71)) + (LETT |w| 1 |POLYCAT-;totalDegree;SLNni;14|))) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |u| + (|spadConstant| $ 64) + (QREFELT $ 65)) + (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |d| + (MAX |d| + (+ + (* |w| + (SPADCALL |u| (QREFELT $ 66))) + (SPADCALL + (SPADCALL |u| (QREFELT $ 67)) + |lv| (QREFELT $ 72)))) + |POLYCAT-;totalDegree;SLNni;14|) + (EXIT (LETT |u| + (SPADCALL |u| (QREFELT $ 69)) + |POLYCAT-;totalDegree;SLNni;14|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |d|)))))))) + +(DEFUN |POLYCAT-;resultant;2SVarSetS;15| (|p1| |p2| |mvar| $) + (SPADCALL (SPADCALL |p1| |mvar| (QREFELT $ 48)) + (SPADCALL |p2| |mvar| (QREFELT $ 48)) (QREFELT $ 74))) + +(DEFUN |POLYCAT-;discriminant;SVarSetS;16| (|p| |var| $) + (SPADCALL (SPADCALL |p| |var| (QREFELT $ 48)) (QREFELT $ 76))) + +(DEFUN |POLYCAT-;allMonoms| (|l| $) + (PROG (#0=#:G1508 |p| #1=#:G1509) + (RETURN + (SEQ (SPADCALL + (SPADCALL + (PROGN + (LETT #0# NIL |POLYCAT-;allMonoms|) + (SEQ (LETT |p| NIL |POLYCAT-;allMonoms|) + (LETT #1# |l| |POLYCAT-;allMonoms|) G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |p| (CAR #1#) + |POLYCAT-;allMonoms|) + NIL)) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS + (SPADCALL |p| (QREFELT $ 78)) + #0#) + |POLYCAT-;allMonoms|))) + (LETT #1# (CDR #1#) |POLYCAT-;allMonoms|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 80)) + (QREFELT $ 81)))))) + +(DEFUN |POLYCAT-;P2R| (|p| |b| |n| $) + (PROG (|w| |bj| #0=#:G1514 |i| #1=#:G1513) + (RETURN + (SEQ (LETT |w| + (SPADCALL |n| (|spadConstant| $ 22) (QREFELT $ 83)) + |POLYCAT-;P2R|) + (SEQ (LETT |bj| NIL |POLYCAT-;P2R|) + (LETT #0# |b| |POLYCAT-;P2R|) + (LETT |i| (SPADCALL |w| (QREFELT $ 85)) |POLYCAT-;P2R|) + (LETT #1# (QVSIZE |w|) |POLYCAT-;P2R|) G190 + (COND + ((OR (> |i| #1#) (ATOM #0#) + (PROGN + (LETT |bj| (CAR #0#) |POLYCAT-;P2R|) + NIL)) + (GO G191))) + (SEQ (EXIT (SPADCALL |w| |i| + (SPADCALL |p| |bj| (QREFELT $ 86)) + (QREFELT $ 87)))) + (LETT |i| + (PROG1 (+ |i| 1) + (LETT #0# (CDR #0#) |POLYCAT-;P2R|)) + |POLYCAT-;P2R|) + (GO G190) G191 (EXIT NIL)) + (EXIT |w|))))) + +(DEFUN |POLYCAT-;eq2R| (|l| |b| $) + (PROG (#0=#:G1518 |bj| #1=#:G1519 #2=#:G1520 |p| #3=#:G1521) + (RETURN + (SEQ (SPADCALL + (PROGN + (LETT #0# NIL |POLYCAT-;eq2R|) + (SEQ (LETT |bj| NIL |POLYCAT-;eq2R|) + (LETT #1# |b| |POLYCAT-;eq2R|) G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |bj| (CAR #1#) |POLYCAT-;eq2R|) + NIL)) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS + (PROGN + (LETT #2# NIL + |POLYCAT-;eq2R|) + (SEQ + (LETT |p| NIL + |POLYCAT-;eq2R|) + (LETT #3# |l| + |POLYCAT-;eq2R|) + G190 + (COND + ((OR (ATOM #3#) + (PROGN + (LETT |p| (CAR #3#) + |POLYCAT-;eq2R|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #2# + (CONS + (SPADCALL |p| |bj| + (QREFELT $ 86)) + #2#) + |POLYCAT-;eq2R|))) + (LETT #3# (CDR #3#) + |POLYCAT-;eq2R|) + (GO G190) G191 + (EXIT (NREVERSE0 #2#)))) + #0#) + |POLYCAT-;eq2R|))) + (LETT #1# (CDR #1#) |POLYCAT-;eq2R|) (GO G190) + G191 (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 90)))))) + +(DEFUN |POLYCAT-;reducedSystem;MM;20| (|m| $) + (PROG (#0=#:G1530 |r| #1=#:G1531 |b| #2=#:G1532 |bj| #3=#:G1533 |d| + |mm| |l|) + (RETURN + (SEQ (LETT |l| (SPADCALL |m| (QREFELT $ 93)) + |POLYCAT-;reducedSystem;MM;20|) + (LETT |b| + (SPADCALL + (SPADCALL + (PROGN + (LETT #0# NIL + |POLYCAT-;reducedSystem;MM;20|) + (SEQ (LETT |r| NIL + |POLYCAT-;reducedSystem;MM;20|) + (LETT #1# |l| + |POLYCAT-;reducedSystem;MM;20|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |r| (CAR #1#) + |POLYCAT-;reducedSystem;MM;20|) + NIL)) + (GO G191))) + (SEQ (EXIT + (LETT #0# + (CONS + (|POLYCAT-;allMonoms| |r| $) + #0#) + |POLYCAT-;reducedSystem;MM;20|))) + (LETT #1# (CDR #1#) + |POLYCAT-;reducedSystem;MM;20|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 80)) + (QREFELT $ 81)) + |POLYCAT-;reducedSystem;MM;20|) + (LETT |d| + (PROGN + (LETT #2# NIL |POLYCAT-;reducedSystem;MM;20|) + (SEQ (LETT |bj| NIL |POLYCAT-;reducedSystem;MM;20|) + (LETT #3# |b| |POLYCAT-;reducedSystem;MM;20|) G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |w| (CAR #2#) |POLYCAT-;factor;SF;26|) - NIL)) + (COND + ((OR (ATOM #3#) + (PROGN + (LETT |bj| (CAR #3#) + |POLYCAT-;reducedSystem;MM;20|) + NIL)) (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS - (VECTOR - (QVELT |w| 0) - (SPADCALL (QVELT |w| 1) (QREFELT |$| 40)) - (QVELT |w| 2)) - #1#) - |POLYCAT-;factor;SF;26|))) - (LETT #2# (CDR #2#) |POLYCAT-;factor;SF;26|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 130))))) - ((QUOTE T) - (SEQ - (LETT |up| - (SPADCALL |p| (QCDR |v|) (QREFELT |$| 47)) - |POLYCAT-;factor;SF;26|) - (LETT |ansSUP| - (SPADCALL |up| (QREFELT |$| 114)) - |POLYCAT-;factor;SF;26|) - (EXIT - (SPADCALL - (SPADCALL - (SPADCALL |ansSUP| (QREFELT |$| 131)) - (QCDR |v|) - (QREFELT |$| 132)) - (PROGN - (LETT #3# NIL |POLYCAT-;factor;SF;26|) - (SEQ - (LETT |ww| NIL |POLYCAT-;factor;SF;26|) - (LETT #4# - (SPADCALL |ansSUP| (QREFELT |$| 135)) - |POLYCAT-;factor;SF;26|) + (SEQ (EXIT (LETT #2# + (CONS + (SPADCALL |bj| (QREFELT $ 60)) + #2#) + |POLYCAT-;reducedSystem;MM;20|))) + (LETT #3# (CDR #3#) + |POLYCAT-;reducedSystem;MM;20|) + (GO G190) G191 (EXIT (NREVERSE0 #2#)))) + |POLYCAT-;reducedSystem;MM;20|) + (LETT |mm| (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $) + |POLYCAT-;reducedSystem;MM;20|) + (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |l|) (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |mm| + (SPADCALL |mm| + (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| + $) + (QREFELT $ 94)) + |POLYCAT-;reducedSystem;MM;20|) + (EXIT (LETT |l| (CDR |l|) + |POLYCAT-;reducedSystem;MM;20|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |mm|))))) + +(DEFUN |POLYCAT-;reducedSystem;MVR;21| (|m| |v| $) + (PROG (#0=#:G1544 |s| #1=#:G1545 |b| #2=#:G1546 |bj| #3=#:G1547 |d| + |n| |mm| |w| |l| |r|) + (RETURN + (SEQ (LETT |l| (SPADCALL |m| (QREFELT $ 93)) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |r| (SPADCALL |v| (QREFELT $ 98)) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |b| + (SPADCALL + (SPADCALL (|POLYCAT-;allMonoms| |r| $) + (SPADCALL + (PROGN + (LETT #0# NIL + |POLYCAT-;reducedSystem;MVR;21|) + (SEQ (LETT |s| NIL + |POLYCAT-;reducedSystem;MVR;21|) + (LETT #1# |l| + |POLYCAT-;reducedSystem;MVR;21|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |s| (CAR #1#) + |POLYCAT-;reducedSystem;MVR;21|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #0# + (CONS + (|POLYCAT-;allMonoms| |s| $) + #0#) + |POLYCAT-;reducedSystem;MVR;21|))) + (LETT #1# (CDR #1#) + |POLYCAT-;reducedSystem;MVR;21|) + (GO G190) G191 + (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 80)) + (QREFELT $ 99)) + (QREFELT $ 81)) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |d| + (PROGN + (LETT #2# NIL |POLYCAT-;reducedSystem;MVR;21|) + (SEQ (LETT |bj| NIL |POLYCAT-;reducedSystem;MVR;21|) + (LETT #3# |b| |POLYCAT-;reducedSystem;MVR;21|) G190 (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |ww| (CAR #4#) |POLYCAT-;factor;SF;26|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #3# - (CONS - (VECTOR - (QVELT |ww| 0) - (SPADCALL - (QVELT |ww| 1) - (QCDR |v|) - (QREFELT |$| 132)) - (QVELT |ww| 2)) - #3#) - |POLYCAT-;factor;SF;26|))) - (LETT #4# (CDR #4#) |POLYCAT-;factor;SF;26|) - (GO G190) - G191 - (EXIT (NREVERSE0 #3#)))) - (QREFELT |$| 130))))))))))) - -(DEFUN |POLYCAT-;conditionP;MU;27| (|mat| |$|) - (PROG (|ll| #1=#:G102087 |z| #2=#:G102088 |ch| |l| #3=#:G102079 - #4=#:G102086 #5=#:G102047 #6=#:G102045 #7=#:G102046 #8=#:G102080 - |vars| |degs| #9=#:G102084 |d| #10=#:G102085 |nd| #11=#:G102074 - #12=#:G102054 |deg1| |redmons| #13=#:G102081 |v| #14=#:G102083 |u| - #15=#:G102082 |llR| |monslist| |ans| #16=#:G102075 #17=#:G102076 - |mons| #18=#:G102077 |m| #19=#:G102078 |i| #20=#:G102070 - #21=#:G102068 #22=#:G102069) - (RETURN - (SEQ - (EXIT - (SEQ - (LETT |ll| - (SPADCALL (SPADCALL |mat| (QREFELT |$| 137)) (QREFELT |$| 92)) - |POLYCAT-;conditionP;MU;27|) - (LETT |llR| - (PROGN (LETT #1# NIL |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |z| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #2# (|SPADfirst| |ll|) |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |z| (CAR #2#) |POLYCAT-;conditionP;MU;27|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# (CONS NIL #1#) |POLYCAT-;conditionP;MU;27|))) - (LETT #2# (CDR #2#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - |POLYCAT-;conditionP;MU;27|) - (LETT |monslist| NIL |POLYCAT-;conditionP;MU;27|) - (LETT |ch| - (SPADCALL (QREFELT |$| 138)) - |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |l| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #3# |ll| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #3#) - (PROGN - (LETT |l| (CAR #3#) |POLYCAT-;conditionP;MU;27|) - NIL)) - (GO G191))) - (SEQ - (LETT |mons| - (PROGN - (LETT #7# NIL |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |u| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #4# |l| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #4#) - (PROGN - (LETT |u| (CAR #4#) |POLYCAT-;conditionP;MU;27|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (PROGN - (LETT #5# - (SPADCALL |u| (QREFELT |$| 77)) - |POLYCAT-;conditionP;MU;27|) - (COND - (#7# - (LETT #6# - (SPADCALL #6# #5# (QREFELT |$| 139)) - |POLYCAT-;conditionP;MU;27|)) - ((QUOTE T) - (PROGN - (LETT #6# #5# |POLYCAT-;conditionP;MU;27|) - (LETT #7# - (QUOTE T) - |POLYCAT-;conditionP;MU;27|))))))) - (LETT #4# (CDR #4#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT NIL)) - (COND - (#7# #6#) - ((QUOTE T) (|IdentityError| (QUOTE |setUnion|))))) - |POLYCAT-;conditionP;MU;27|) - (LETT |redmons| NIL |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |m| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #8# |mons| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #8#) - (PROGN - (LETT |m| (CAR #8#) |POLYCAT-;conditionP;MU;27|) - NIL)) - (GO G191))) - (SEQ - (LETT |vars| - (SPADCALL |m| (QREFELT |$| 31)) - |POLYCAT-;conditionP;MU;27|) - (LETT |degs| - (SPADCALL |m| |vars| (QREFELT |$| 140)) - |POLYCAT-;conditionP;MU;27|) - (LETT |deg1| - (PROGN - (LETT #9# NIL |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |d| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #10# |degs| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #10#) - (PROGN - (LETT |d| - (CAR #10#) - |POLYCAT-;conditionP;MU;27|) + ((OR (ATOM #3#) + (PROGN + (LETT |bj| (CAR #3#) + |POLYCAT-;reducedSystem;MVR;21|) NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #9# - (CONS - (SEQ - (LETT |nd| - (SPADCALL |d| |ch| (QREFELT |$| 142)) - |POLYCAT-;conditionP;MU;27|) - (EXIT - (COND - ((QEQCAR |nd| 1) - (PROGN - (LETT #11# - (CONS 1 "failed") - |POLYCAT-;conditionP;MU;27|) - (GO #11#))) - ((QUOTE T) - (PROG1 - (LETT #12# - (QCDR |nd|) - |POLYCAT-;conditionP;MU;27|) - (|check-subtype| - (|>=| #12# 0) - (QUOTE (|NonNegativeInteger|)) - #12#)))))) - #9#) - |POLYCAT-;conditionP;MU;27|))) - (LETT #10# (CDR #10#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT (NREVERSE0 #9#)))) - |POLYCAT-;conditionP;MU;27|) - (LETT |redmons| - (CONS - (SPADCALL - (|spadConstant| |$| 33) - |vars| - |deg1| - (QREFELT |$| 54)) - |redmons|) - |POLYCAT-;conditionP;MU;27|) - (EXIT - (LETT |llR| - (PROGN - (LETT #13# NIL |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |v| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #14# |llR| |POLYCAT-;conditionP;MU;27|) - (LETT |u| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #15# |l| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #15#) - (PROGN - (LETT |u| - (CAR #15#) + (GO G191))) + (SEQ (EXIT (LETT #2# + (CONS + (SPADCALL |bj| (QREFELT $ 60)) + #2#) + |POLYCAT-;reducedSystem;MVR;21|))) + (LETT #3# (CDR #3#) + |POLYCAT-;reducedSystem;MVR;21|) + (GO G190) G191 (EXIT (NREVERSE0 #2#)))) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |n| (LENGTH |d|) |POLYCAT-;reducedSystem;MVR;21|) + (LETT |mm| (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |w| (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| $) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|) + (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |l|) (QREFELT $ 25))) + (GO G191))) + (SEQ (LETT |mm| + (SPADCALL |mm| + (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| + $) + (QREFELT $ 94)) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |w| + (SPADCALL |w| + (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| + |n| $) + (QREFELT $ 100)) + |POLYCAT-;reducedSystem;MVR;21|) + (LETT |l| (CDR |l|) + |POLYCAT-;reducedSystem;MVR;21|) + (EXIT (LETT |r| (CDR |r|) + |POLYCAT-;reducedSystem;MVR;21|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (CONS |mm| |w|)))))) + +(DEFUN |POLYCAT-;gcdPolynomial;3Sup;22| (|pp| |qq| $) + (SPADCALL |pp| |qq| (QREFELT $ 105))) + +(DEFUN |POLYCAT-;solveLinearPolynomialEquation;LSupU;23| (|lpp| |pp| $) + (SPADCALL |lpp| |pp| (QREFELT $ 110))) + +(DEFUN |POLYCAT-;factorPolynomial;SupF;24| (|pp| $) + (SPADCALL |pp| (QREFELT $ 115))) + +(DEFUN |POLYCAT-;factorSquareFreePolynomial;SupF;25| (|pp| $) + (SPADCALL |pp| (QREFELT $ 118))) + +(DEFUN |POLYCAT-;factor;SF;26| (|p| $) + (PROG (|v| |ansR| #0=#:G1589 |w| #1=#:G1590 |up| |ansSUP| #2=#:G1591 + |ww| #3=#:G1592) + (RETURN + (SEQ (LETT |v| (SPADCALL |p| (QREFELT $ 43)) + |POLYCAT-;factor;SF;26|) + (EXIT (COND + ((QEQCAR |v| 1) + (SEQ (LETT |ansR| + (SPADCALL (SPADCALL |p| (QREFELT $ 39)) + (QREFELT $ 121)) + |POLYCAT-;factor;SF;26|) + (EXIT (SPADCALL + (SPADCALL + (SPADCALL |ansR| (QREFELT $ 123)) + (QREFELT $ 41)) + (PROGN + (LETT #0# NIL + |POLYCAT-;factor;SF;26|) + (SEQ + (LETT |w| NIL + |POLYCAT-;factor;SF;26|) + (LETT #1# + (SPADCALL |ansR| + (QREFELT $ 127)) + |POLYCAT-;factor;SF;26|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |w| (CAR #1#) + |POLYCAT-;factor;SF;26|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #0# + (CONS + (VECTOR (QVELT |w| 0) + (SPADCALL (QVELT |w| 1) + (QREFELT $ 41)) + (QVELT |w| 2)) + #0#) + |POLYCAT-;factor;SF;26|))) + (LETT #1# (CDR #1#) + |POLYCAT-;factor;SF;26|) + (GO G190) G191 + (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 131))))) + ('T + (SEQ (LETT |up| + (SPADCALL |p| (QCDR |v|) (QREFELT $ 48)) + |POLYCAT-;factor;SF;26|) + (LETT |ansSUP| (SPADCALL |up| (QREFELT $ 115)) + |POLYCAT-;factor;SF;26|) + (EXIT (SPADCALL + (SPADCALL + (SPADCALL |ansSUP| (QREFELT $ 132)) + (QCDR |v|) (QREFELT $ 133)) + (PROGN + (LETT #2# NIL + |POLYCAT-;factor;SF;26|) + (SEQ + (LETT |ww| NIL + |POLYCAT-;factor;SF;26|) + (LETT #3# + (SPADCALL |ansSUP| + (QREFELT $ 136)) + |POLYCAT-;factor;SF;26|) + G190 + (COND + ((OR (ATOM #3#) + (PROGN + (LETT |ww| (CAR #3#) + |POLYCAT-;factor;SF;26|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #2# + (CONS + (VECTOR (QVELT |ww| 0) + (SPADCALL (QVELT |ww| 1) + (QCDR |v|) (QREFELT $ 133)) + (QVELT |ww| 2)) + #2#) + |POLYCAT-;factor;SF;26|))) + (LETT #3# (CDR #3#) + |POLYCAT-;factor;SF;26|) + (GO G190) G191 + (EXIT (NREVERSE0 #2#)))) + (QREFELT $ 131))))))))))) + +(DEFUN |POLYCAT-;conditionP;MU;27| (|mat| $) + (PROG (|ll| #0=#:G1627 |z| #1=#:G1628 |ch| |l| #2=#:G1629 #3=#:G1630 + #4=#:G1599 #5=#:G1597 #6=#:G1598 #7=#:G1631 |vars| |degs| + #8=#:G1632 |d| #9=#:G1633 |nd| #10=#:G1626 #11=#:G1606 + |deg1| |redmons| #12=#:G1634 |v| #13=#:G1636 |u| + #14=#:G1635 |llR| |monslist| |ans| #15=#:G1637 + #16=#:G1638 |mons| #17=#:G1639 |m| #18=#:G1640 |i| + #19=#:G1622 #20=#:G1620 #21=#:G1621) + (RETURN + (SEQ (EXIT (SEQ (LETT |ll| + (SPADCALL (SPADCALL |mat| (QREFELT $ 138)) + (QREFELT $ 93)) + |POLYCAT-;conditionP;MU;27|) + (LETT |llR| + (PROGN + (LETT #0# NIL |POLYCAT-;conditionP;MU;27|) - NIL) - (ATOM #14#) - (PROGN - (LETT |v| - (CAR #14#) + (SEQ (LETT |z| NIL |POLYCAT-;conditionP;MU;27|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #13# - (CONS - (CONS - (SPADCALL - (SPADCALL - |u| - |vars| - |degs| - (QREFELT |$| 52)) - (QREFELT |$| 143)) - |v|) - #13#) - |POLYCAT-;conditionP;MU;27|))) - (LETT #15# - (PROG1 - (CDR #15#) - (LETT #14# - (CDR #14#) - |POLYCAT-;conditionP;MU;27|)) - |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT (NREVERSE0 #13#)))) - |POLYCAT-;conditionP;MU;27|))) - (LETT #8# (CDR #8#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT NIL)) - (EXIT - (LETT |monslist| - (CONS |redmons| |monslist|) - |POLYCAT-;conditionP;MU;27|))) - (LETT #3# (CDR #3#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT NIL)) - (LETT |ans| - (SPADCALL - (SPADCALL - (SPADCALL |llR| (QREFELT |$| 89)) - (QREFELT |$| 144)) - (QREFELT |$| 146)) - |POLYCAT-;conditionP;MU;27|) - (EXIT - (COND - ((QEQCAR |ans| 1) (CONS 1 "failed")) - ((QUOTE T) - (SEQ - (LETT |i| 0 |POLYCAT-;conditionP;MU;27|) - (EXIT - (CONS - 0 - (PRIMVEC2ARR - (PROGN - (LETT #16# - (GETREFV (SIZE |monslist|)) - |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT #17# 0 |POLYCAT-;conditionP;MU;27|) - (LETT |mons| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #18# - |monslist| - |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #18#) - (PROGN - (LETT |mons| - (CAR #18#) - |POLYCAT-;conditionP;MU;27|) + (LETT #1# (|SPADfirst| |ll|) + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |z| (CAR #1#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #0# (CONS NIL #0#) + |POLYCAT-;conditionP;MU;27|))) + (LETT #1# (CDR #1#) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 + (EXIT (NREVERSE0 #0#)))) + |POLYCAT-;conditionP;MU;27|) + (LETT |monslist| NIL |POLYCAT-;conditionP;MU;27|) + (LETT |ch| (SPADCALL (QREFELT $ 139)) + |POLYCAT-;conditionP;MU;27|) + (SEQ (LETT |l| NIL |POLYCAT-;conditionP;MU;27|) + (LETT #2# |ll| |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #2#) + (PROGN + (LETT |l| (CAR #2#) + |POLYCAT-;conditionP;MU;27|) NIL)) - (GO G191))) - (SEQ - (EXIT - (SETELT - #16# - #17# - (PROGN - (LETT #22# - NIL - |POLYCAT-;conditionP;MU;27|) - (SEQ - (LETT |m| - NIL + (GO G191))) + (SEQ (LETT |mons| + (PROGN + (LETT #6# NIL + |POLYCAT-;conditionP;MU;27|) + (SEQ + (LETT |u| NIL |POLYCAT-;conditionP;MU;27|) - (LETT #19# - |mons| + (LETT #3# |l| |POLYCAT-;conditionP;MU;27|) - G190 - (COND - ((OR - (ATOM #19#) - (PROGN - (LETT |m| - (CAR #19#) + G190 + (COND + ((OR (ATOM #3#) + (PROGN + (LETT |u| (CAR #3#) |POLYCAT-;conditionP;MU;27|) NIL)) - (GO G191))) - (SEQ - (EXIT - (PROGN - (LETT #20# - (SPADCALL |m| - (SPADCALL - (SPADCALL - (QCDR |ans|) - (LETT |i| - (|+| |i| 1) - |POLYCAT-;conditionP;MU;27|) - (QREFELT |$| 147)) - (QREFELT |$| 40)) - (QREFELT |$| 148)) - |POLYCAT-;conditionP;MU;27|) - (COND - (#22# - (LETT #21# - (SPADCALL #21# #20# - (QREFELT |$| 149)) - |POLYCAT-;conditionP;MU;27|)) - ((QUOTE T) - (PROGN - (LETT #21# #20# + (GO G191))) + (SEQ + (EXIT + (PROGN + (LETT #4# + (SPADCALL |u| + (QREFELT $ 78)) + |POLYCAT-;conditionP;MU;27|) + (COND + (#6# + (LETT #5# + (SPADCALL #5# #4# + (QREFELT $ 140)) + |POLYCAT-;conditionP;MU;27|)) + ('T + (PROGN + (LETT #5# #4# |POLYCAT-;conditionP;MU;27|) - (LETT #22# (QUOTE T) - |POLYCAT-;conditionP;MU;27|))))))) - (LETT #19# (CDR #19#) + (LETT #6# 'T + |POLYCAT-;conditionP;MU;27|))))))) + (LETT #3# (CDR #3#) |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT NIL)) - (COND - (#22# #21#) - ((QUOTE T) - (|spadConstant| |$| 21))))))) - (LETT #18# - (PROG1 - (CDR #18#) - (LETT #17# - (QSADD1 #17#) - |POLYCAT-;conditionP;MU;27|)) - |POLYCAT-;conditionP;MU;27|) - (GO G190) - G191 - (EXIT NIL)) - #16#)))))))))) - #11# - (EXIT #11#))))) - -(DEFUN |POLYCAT-;charthRoot;SU;28| (|p| |$|) - (PROG (|vars| |ans| |ch|) - (RETURN - (SEQ - (LETT |vars| - (SPADCALL |p| (QREFELT |$| 31)) |POLYCAT-;charthRoot;SU;28|) - (EXIT - (COND - ((NULL |vars|) - (SEQ - (LETT |ans| - (SPADCALL - (SPADCALL |p| (QREFELT |$| 143)) - (QREFELT |$| 151)) - |POLYCAT-;charthRoot;SU;28|) - (EXIT - (COND - ((QEQCAR |ans| 1) - (CONS 1 "failed")) - ((QUOTE T) - (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT |$| 40)))))))) - ((QUOTE T) - (SEQ - (LETT |ch| - (SPADCALL (QREFELT |$| 138)) - |POLYCAT-;charthRoot;SU;28|) - (EXIT (|POLYCAT-;charthRootlv| |p| |vars| |ch| |$|)))))))))) - -(DEFUN |POLYCAT-;charthRootlv| (|p| |vars| |ch| |$|) - (PROG (|v| |dd| |cp| |d| #1=#:G102109 |ans| |ansx| #2=#:G102116) - (RETURN - (SEQ - (EXIT - (COND - ((NULL |vars|) - (SEQ - (LETT |ans| - (SPADCALL (SPADCALL |p| (QREFELT |$| 143)) (QREFELT |$| 151)) - |POLYCAT-;charthRootlv|) - (EXIT - (COND - ((QEQCAR |ans| 1) (CONS 1 "failed")) - ((QUOTE T) - (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT |$| 40)))))))) - ((QUOTE T) - (SEQ - (LETT |v| (|SPADfirst| |vars|) |POLYCAT-;charthRootlv|) - (LETT |vars| (CDR |vars|) |POLYCAT-;charthRootlv|) - (LETT |d| - (SPADCALL |p| |v| (QREFELT |$| 36)) - |POLYCAT-;charthRootlv|) - (LETT |ans| (|spadConstant| |$| 21) |POLYCAT-;charthRootlv|) - (SEQ G190 - (COND ((NULL (|<| 0 |d|)) (GO G191))) - (SEQ - (LETT |dd| - (SPADCALL |d| |ch| (QREFELT |$| 142)) - |POLYCAT-;charthRootlv|) - (EXIT - (COND - ((QEQCAR |dd| 1) - (PROGN - (LETT #2# - (CONS 1 "failed") - |POLYCAT-;charthRootlv|) - (GO #2#))) - ((QUOTE T) - (SEQ - (LETT |cp| - (SPADCALL |p| |v| |d| (QREFELT |$| 154)) - |POLYCAT-;charthRootlv|) - (LETT |p| - (SPADCALL |p| - (SPADCALL |cp| |v| |d| (QREFELT |$| 37)) - (QREFELT |$| 155)) - |POLYCAT-;charthRootlv|) - (LETT |ansx| - (|POLYCAT-;charthRootlv| |cp| |vars| |ch| |$|) - |POLYCAT-;charthRootlv|) - (EXIT - (COND - ((QEQCAR |ansx| 1) - (PROGN - (LETT #2# - (CONS 1 "failed") - |POLYCAT-;charthRootlv|) - (GO #2#))) - ((QUOTE T) - (SEQ - (LETT |d| - (SPADCALL |p| |v| (QREFELT |$| 36)) - |POLYCAT-;charthRootlv|) - (EXIT - (LETT |ans| - (SPADCALL |ans| - (SPADCALL - (QCDR |ansx|) - |v| - (PROG1 - (LETT #1# - (QCDR |dd|) - |POLYCAT-;charthRootlv|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - (QREFELT |$| 37)) - (QREFELT |$| 149)) - |POLYCAT-;charthRootlv|))))))))))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (LETT |ansx| - (|POLYCAT-;charthRootlv| |p| |vars| |ch| |$|) - |POLYCAT-;charthRootlv|) - (EXIT - (COND - ((QEQCAR |ansx| 1) - (PROGN - (LETT #2# (CONS 1 "failed") |POLYCAT-;charthRootlv|) - (GO #2#))) - ((QUOTE T) - (PROGN - (LETT #2# - (CONS - 0 - (SPADCALL |ans| (QCDR |ansx|) (QREFELT |$| 149))) - |POLYCAT-;charthRootlv|) - (GO #2#))))))))) - #2# - (EXIT #2#))))) - -(DEFUN |POLYCAT-;monicDivide;2SVarSetR;30| (|p1| |p2| |mvar| |$|) - (PROG (|result|) - (RETURN - (SEQ - (LETT |result| - (SPADCALL - (SPADCALL |p1| |mvar| (QREFELT |$| 47)) - (SPADCALL |p2| |mvar| (QREFELT |$| 47)) - (QREFELT |$| 157)) - |POLYCAT-;monicDivide;2SVarSetR;30|) - (EXIT - (CONS - (SPADCALL (QCAR |result|) |mvar| (QREFELT |$| 132)) - (SPADCALL (QCDR |result|) |mvar| (QREFELT |$| 132)))))))) - -(DEFUN |POLYCAT-;squareFree;SF;31| (|p| |$|) - (SPADCALL |p| (QREFELT |$| 160))) - -(DEFUN |POLYCAT-;squareFree;SF;32| (|p| |$|) - (SPADCALL |p| (QREFELT |$| 163))) - -(DEFUN |POLYCAT-;squareFree;SF;33| (|p| |$|) - (SPADCALL |p| (QREFELT |$| 163))) - -(DEFUN |POLYCAT-;squareFreePart;2S;34| (|p| |$|) - (PROG (|s| |f| #1=#:G102132 #2=#:G102130 #3=#:G102128 #4=#:G102129) - (RETURN - (SEQ - (SPADCALL - (SPADCALL - (LETT |s| - (SPADCALL |p| (QREFELT |$| 164)) - |POLYCAT-;squareFreePart;2S;34|) - (QREFELT |$| 165)) - (PROGN - (LETT #4# NIL |POLYCAT-;squareFreePart;2S;34|) - (SEQ - (LETT |f| NIL |POLYCAT-;squareFreePart;2S;34|) - (LETT #1# - (SPADCALL |s| (QREFELT |$| 168)) - |POLYCAT-;squareFreePart;2S;34|) - G190 - (COND - ((OR - (ATOM #1#) - (PROGN - (LETT |f| (CAR #1#) |POLYCAT-;squareFreePart;2S;34|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (PROGN - (LETT #2# (QCAR |f|) |POLYCAT-;squareFreePart;2S;34|) - (COND - (#4# - (LETT #3# - (SPADCALL #3# #2# (QREFELT |$| 148)) - |POLYCAT-;squareFreePart;2S;34|)) - ((QUOTE T) - (PROGN - (LETT #3# #2# |POLYCAT-;squareFreePart;2S;34|) - (LETT #4# - (QUOTE T) - |POLYCAT-;squareFreePart;2S;34|))))))) - (LETT #1# (CDR #1#) |POLYCAT-;squareFreePart;2S;34|) - (GO G190) - G191 - (EXIT NIL)) - (COND - (#4# #3#) - ((QUOTE T) (|spadConstant| |$| 33)))) - (QREFELT |$| 148)))))) - -(DEFUN |POLYCAT-;content;SVarSetS;35| (|p| |v| |$|) - (SPADCALL (SPADCALL |p| |v| (QREFELT |$| 47)) (QREFELT |$| 170))) - -(DEFUN |POLYCAT-;primitivePart;2S;36| (|p| |$|) - (PROG (#1=#:G102135) - (RETURN - (QVELT - (SPADCALL - (PROG2 - (LETT #1# - (SPADCALL |p| (SPADCALL |p| (QREFELT |$| 172)) (QREFELT |$| 173)) - |POLYCAT-;primitivePart;2S;36|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#)) - (QREFELT |$| 175)) - 1)))) - -(DEFUN |POLYCAT-;primitivePart;SVarSetS;37| (|p| |v| |$|) - (PROG (#1=#:G102141) - (RETURN - (QVELT - (SPADCALL - (PROG2 - (LETT #1# - (SPADCALL |p| - (SPADCALL |p| |v| (QREFELT |$| 177)) - (QREFELT |$| 178)) - |POLYCAT-;primitivePart;SVarSetS;37|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#)) - (QREFELT |$| 175)) 1)))) - -(DEFUN |POLYCAT-;<;2SB;38| (|p| |q| |$|) - (PROG (|dp| |dq|) - (RETURN - (SEQ - (LETT |dp| (SPADCALL |p| (QREFELT |$| 59)) |POLYCAT-;<;2SB;38|) - (LETT |dq| (SPADCALL |q| (QREFELT |$| 59)) |POLYCAT-;<;2SB;38|) - (EXIT - (COND - ((SPADCALL |dp| |dq| (QREFELT |$| 180)) - (SPADCALL - (|spadConstant| |$| 22) - (SPADCALL |q| (QREFELT |$| 38)) - (QREFELT |$| 181))) - ((SPADCALL |dq| |dp| (QREFELT |$| 180)) - (SPADCALL - (SPADCALL |p| (QREFELT |$| 38)) - (|spadConstant| |$| 22) - (QREFELT |$| 181))) - ((QUOTE T) - (SPADCALL - (SPADCALL - (SPADCALL |p| |q| (QREFELT |$| 155)) - (QREFELT |$| 38)) - (|spadConstant| |$| 22) - (QREFELT |$| 181))))))))) - -(DEFUN |POLYCAT-;patternMatch;SP2Pmr;39| (|p| |pat| |l| |$|) - (SPADCALL |p| |pat| |l| (QREFELT |$| 186))) - -(DEFUN |POLYCAT-;patternMatch;SP2Pmr;40| (|p| |pat| |l| |$|) - (SPADCALL |p| |pat| |l| (QREFELT |$| 192))) - -(DEFUN |POLYCAT-;convert;SP;41| (|x| |$|) - (SPADCALL (ELT |$| 195) (ELT |$| 196) |x| (QREFELT |$| 200))) - -(DEFUN |POLYCAT-;convert;SP;42| (|x| |$|) - (SPADCALL (ELT |$| 202) (ELT |$| 203) |x| (QREFELT |$| 207))) - -(DEFUN |POLYCAT-;convert;SIf;43| (|p| |$|) - (SPADCALL (ELT |$| 210) (ELT |$| 211) |p| (QREFELT |$| 215))) - -(DEFUN |PolynomialCategory&| (|#1| |#2| |#3| |#4|) - (PROG (|DV$1| |DV$2| |DV$3| |DV$4| |dv$| |$| |pv$|) - (RETURN - (PROGN - (LETT |DV$1| (|devaluate| |#1|) . #1=(|PolynomialCategory&|)) - (LETT |DV$2| (|devaluate| |#2|) . #1#) - (LETT |DV$3| (|devaluate| |#3|) . #1#) - (LETT |DV$4| (|devaluate| |#4|) . #1#) - (LETT |dv$| - (LIST - (QUOTE |PolynomialCategory&|) |DV$1| |DV$2| |DV$3| |DV$4|) . #1#) - (LETT |$| (GETREFV 225) . #1#) - (QSETREFV |$| 0 |dv$|) - (QSETREFV |$| 3 - (LETT |pv$| - (|buildPredVector| 0 0 - (LIST - (|HasCategory| |#2| - (QUOTE (|PolynomialFactorizationExplicit|))) - (|HasAttribute| |#2| (QUOTE |canonicalUnitNormal|)) - (|HasCategory| |#2| (QUOTE (|GcdDomain|))) - (|HasCategory| |#2| (QUOTE (|CommutativeRing|))) - (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Float|)))) - (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Float|)))) - (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Integer|)))) - (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Integer|)))) - (|HasCategory| |#4| - (QUOTE (|ConvertibleTo| (|Pattern| (|Float|))))) - (|HasCategory| |#2| - (QUOTE (|ConvertibleTo| (|Pattern| (|Float|))))) - (|HasCategory| |#4| - (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|))))) - (|HasCategory| |#2| - (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|))))) - (|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|InputForm|)))) - (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|InputForm|)))) - (|HasCategory| |#2| (QUOTE (|OrderedSet|))))) . #1#)) - (|stuffDomainSlots| |$|) - (QSETREFV |$| 6 |#1|) - (QSETREFV |$| 7 |#2|) - (QSETREFV |$| 8 |#3|) - (QSETREFV |$| 9 |#4|) - (COND + (GO G190) G191 (EXIT NIL)) + (COND + (#6# #5#) + ('T + (|IdentityError| + '|setUnion|)))) + |POLYCAT-;conditionP;MU;27|) + (LETT |redmons| NIL + |POLYCAT-;conditionP;MU;27|) + (SEQ (LETT |m| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #7# |mons| + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #7#) + (PROGN + (LETT |m| (CAR #7#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (LETT |vars| + (SPADCALL |m| (QREFELT $ 32)) + |POLYCAT-;conditionP;MU;27|) + (LETT |degs| + (SPADCALL |m| |vars| + (QREFELT $ 141)) + |POLYCAT-;conditionP;MU;27|) + (LETT |deg1| + (PROGN + (LETT #8# NIL + |POLYCAT-;conditionP;MU;27|) + (SEQ + (LETT |d| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #9# |degs| + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #9#) + (PROGN + (LETT |d| (CAR #9#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #8# + (CONS + (SEQ + (LETT |nd| + (SPADCALL |d| |ch| + (QREFELT $ 143)) + |POLYCAT-;conditionP;MU;27|) + (EXIT + (COND + ((QEQCAR |nd| 1) + (PROGN + (LETT #10# + (CONS 1 "failed") + |POLYCAT-;conditionP;MU;27|) + (GO #10#))) + ('T + (PROG1 + (LETT #11# + (QCDR |nd|) + |POLYCAT-;conditionP;MU;27|) + (|check-subtype| + (>= #11# 0) + '(|NonNegativeInteger|) + #11#)))))) + #8#) + |POLYCAT-;conditionP;MU;27|))) + (LETT #9# (CDR #9#) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 + (EXIT (NREVERSE0 #8#)))) + |POLYCAT-;conditionP;MU;27|) + (LETT |redmons| + (CONS + (SPADCALL (|spadConstant| $ 34) + |vars| |deg1| (QREFELT $ 55)) + |redmons|) + |POLYCAT-;conditionP;MU;27|) + (EXIT + (LETT |llR| + (PROGN + (LETT #12# NIL + |POLYCAT-;conditionP;MU;27|) + (SEQ + (LETT |v| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #13# |llR| + |POLYCAT-;conditionP;MU;27|) + (LETT |u| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #14# |l| + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #14#) + (PROGN + (LETT |u| (CAR #14#) + |POLYCAT-;conditionP;MU;27|) + NIL) + (ATOM #13#) + (PROGN + (LETT |v| (CAR #13#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #12# + (CONS + (CONS + (SPADCALL + (SPADCALL |u| |vars| + |degs| + (QREFELT $ 53)) + (QREFELT $ 144)) + |v|) + #12#) + |POLYCAT-;conditionP;MU;27|))) + (LETT #14# + (PROG1 (CDR #14#) + (LETT #13# (CDR #13#) + |POLYCAT-;conditionP;MU;27|)) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 + (EXIT (NREVERSE0 #12#)))) + |POLYCAT-;conditionP;MU;27|))) + (LETT #7# (CDR #7#) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 (EXIT NIL)) + (EXIT (LETT |monslist| + (CONS |redmons| |monslist|) + |POLYCAT-;conditionP;MU;27|))) + (LETT #2# (CDR #2#) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 (EXIT NIL)) + (LETT |ans| + (SPADCALL + (SPADCALL + (SPADCALL |llR| (QREFELT $ 90)) + (QREFELT $ 145)) + (QREFELT $ 147)) + |POLYCAT-;conditionP;MU;27|) + (EXIT (COND + ((QEQCAR |ans| 1) (CONS 1 "failed")) + ('T + (SEQ (LETT |i| 0 + |POLYCAT-;conditionP;MU;27|) + (EXIT + (CONS 0 + (PRIMVEC2ARR + (PROGN + (LETT #15# + (GETREFV (SIZE |monslist|)) + |POLYCAT-;conditionP;MU;27|) + (SEQ + (LETT #16# 0 + |POLYCAT-;conditionP;MU;27|) + (LETT |mons| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #17# |monslist| + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #17#) + (PROGN + (LETT |mons| (CAR #17#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (SETELT #15# #16# + (PROGN + (LETT #21# NIL + |POLYCAT-;conditionP;MU;27|) + (SEQ + (LETT |m| NIL + |POLYCAT-;conditionP;MU;27|) + (LETT #18# |mons| + |POLYCAT-;conditionP;MU;27|) + G190 + (COND + ((OR (ATOM #18#) + (PROGN + (LETT |m| + (CAR #18#) + |POLYCAT-;conditionP;MU;27|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (PROGN + (LETT #19# + (SPADCALL |m| + (SPADCALL + (SPADCALL + (QCDR |ans|) + (LETT |i| + (+ |i| 1) + |POLYCAT-;conditionP;MU;27|) + (QREFELT $ 148)) + (QREFELT $ 41)) + (QREFELT $ 149)) + |POLYCAT-;conditionP;MU;27|) + (COND + (#21# + (LETT #20# + (SPADCALL #20# + #19# + (QREFELT $ + 150)) + |POLYCAT-;conditionP;MU;27|)) + ('T + (PROGN + (LETT #20# + #19# + |POLYCAT-;conditionP;MU;27|) + (LETT #21# 'T + |POLYCAT-;conditionP;MU;27|))))))) + (LETT #18# (CDR #18#) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 + (EXIT NIL)) + (COND + (#21# #20#) + ('T + (|spadConstant| $ 21))))))) + (LETT #17# + (PROG1 (CDR #17#) + (LETT #16# (QSADD1 #16#) + |POLYCAT-;conditionP;MU;27|)) + |POLYCAT-;conditionP;MU;27|) + (GO G190) G191 (EXIT NIL)) + #15#)))))))))) + #10# (EXIT #10#))))) + +(DEFUN |POLYCAT-;charthRoot;SU;28| (|p| $) + (PROG (|vars| |ans| |ch|) + (RETURN + (SEQ (LETT |vars| (SPADCALL |p| (QREFELT $ 32)) + |POLYCAT-;charthRoot;SU;28|) + (EXIT (COND + ((NULL |vars|) + (SEQ (LETT |ans| + (SPADCALL (SPADCALL |p| (QREFELT $ 144)) + (QREFELT $ 152)) + |POLYCAT-;charthRoot;SU;28|) + (EXIT (COND + ((QEQCAR |ans| 1) (CONS 1 "failed")) + ('T + (CONS 0 + (SPADCALL (QCDR |ans|) + (QREFELT $ 41)))))))) + ('T + (SEQ (LETT |ch| (SPADCALL (QREFELT $ 139)) + |POLYCAT-;charthRoot;SU;28|) + (EXIT (|POLYCAT-;charthRootlv| |p| |vars| |ch| + $)))))))))) + +(DEFUN |POLYCAT-;charthRootlv| (|p| |vars| |ch| $) + (PROG (|v| |dd| |cp| |d| #0=#:G1661 |ans| |ansx| #1=#:G1668) + (RETURN + (SEQ (EXIT (COND + ((NULL |vars|) + (SEQ (LETT |ans| + (SPADCALL (SPADCALL |p| (QREFELT $ 144)) + (QREFELT $ 152)) + |POLYCAT-;charthRootlv|) + (EXIT (COND + ((QEQCAR |ans| 1) (CONS 1 "failed")) + ('T + (CONS 0 + (SPADCALL (QCDR |ans|) + (QREFELT $ 41)))))))) + ('T + (SEQ (LETT |v| (|SPADfirst| |vars|) + |POLYCAT-;charthRootlv|) + (LETT |vars| (CDR |vars|) + |POLYCAT-;charthRootlv|) + (LETT |d| (SPADCALL |p| |v| (QREFELT $ 37)) + |POLYCAT-;charthRootlv|) + (LETT |ans| (|spadConstant| $ 21) + |POLYCAT-;charthRootlv|) + (SEQ G190 (COND ((NULL (< 0 |d|)) (GO G191))) + (SEQ (LETT |dd| + (SPADCALL |d| |ch| (QREFELT $ 143)) + |POLYCAT-;charthRootlv|) + (EXIT + (COND + ((QEQCAR |dd| 1) + (PROGN + (LETT #1# (CONS 1 "failed") + |POLYCAT-;charthRootlv|) + (GO #1#))) + ('T + (SEQ + (LETT |cp| + (SPADCALL |p| |v| |d| + (QREFELT $ 155)) + |POLYCAT-;charthRootlv|) + (LETT |p| + (SPADCALL |p| + (SPADCALL |cp| |v| |d| + (QREFELT $ 38)) + (QREFELT $ 156)) + |POLYCAT-;charthRootlv|) + (LETT |ansx| + (|POLYCAT-;charthRootlv| |cp| + |vars| |ch| $) + |POLYCAT-;charthRootlv|) + (EXIT + (COND + ((QEQCAR |ansx| 1) + (PROGN + (LETT #1# + (CONS 1 "failed") + |POLYCAT-;charthRootlv|) + (GO #1#))) + ('T + (SEQ + (LETT |d| + (SPADCALL |p| |v| + (QREFELT $ 37)) + |POLYCAT-;charthRootlv|) + (EXIT + (LETT |ans| + (SPADCALL |ans| + (SPADCALL (QCDR |ansx|) + |v| + (PROG1 + (LETT #0# (QCDR |dd|) + |POLYCAT-;charthRootlv|) + (|check-subtype| + (>= #0# 0) + '(|NonNegativeInteger|) + #0#)) + (QREFELT $ 38)) + (QREFELT $ 150)) + |POLYCAT-;charthRootlv|))))))))))) + NIL (GO G190) G191 (EXIT NIL)) + (LETT |ansx| + (|POLYCAT-;charthRootlv| |p| |vars| |ch| + $) + |POLYCAT-;charthRootlv|) + (EXIT (COND + ((QEQCAR |ansx| 1) + (PROGN + (LETT #1# (CONS 1 "failed") + |POLYCAT-;charthRootlv|) + (GO #1#))) + ('T + (PROGN + (LETT #1# + (CONS 0 + (SPADCALL |ans| (QCDR |ansx|) + (QREFELT $ 150))) + |POLYCAT-;charthRootlv|) + (GO #1#))))))))) + #1# (EXIT #1#))))) + +(DEFUN |POLYCAT-;monicDivide;2SVarSetR;30| (|p1| |p2| |mvar| $) + (PROG (|result|) + (RETURN + (SEQ (LETT |result| + (SPADCALL (SPADCALL |p1| |mvar| (QREFELT $ 48)) + (SPADCALL |p2| |mvar| (QREFELT $ 48)) + (QREFELT $ 158)) + |POLYCAT-;monicDivide;2SVarSetR;30|) + (EXIT (CONS (SPADCALL (QCAR |result|) |mvar| + (QREFELT $ 133)) + (SPADCALL (QCDR |result|) |mvar| + (QREFELT $ 133)))))))) + +(DEFUN |POLYCAT-;squareFree;SF;31| (|p| $) + (SPADCALL |p| (QREFELT $ 161))) + +(DEFUN |POLYCAT-;squareFree;SF;32| (|p| $) + (SPADCALL |p| (QREFELT $ 164))) + +(DEFUN |POLYCAT-;squareFree;SF;33| (|p| $) + (SPADCALL |p| (QREFELT $ 164))) + +(DEFUN |POLYCAT-;squareFreePart;2S;34| (|p| $) + (PROG (|s| |f| #0=#:G1684 #1=#:G1682 #2=#:G1680 #3=#:G1681) + (RETURN + (SEQ (SPADCALL + (SPADCALL + (LETT |s| (SPADCALL |p| (QREFELT $ 165)) + |POLYCAT-;squareFreePart;2S;34|) + (QREFELT $ 166)) + (PROGN + (LETT #3# NIL |POLYCAT-;squareFreePart;2S;34|) + (SEQ (LETT |f| NIL |POLYCAT-;squareFreePart;2S;34|) + (LETT #0# (SPADCALL |s| (QREFELT $ 169)) + |POLYCAT-;squareFreePart;2S;34|) + G190 + (COND + ((OR (ATOM #0#) + (PROGN + (LETT |f| (CAR #0#) + |POLYCAT-;squareFreePart;2S;34|) + NIL)) + (GO G191))) + (SEQ (EXIT (PROGN + (LETT #1# (QCAR |f|) + |POLYCAT-;squareFreePart;2S;34|) + (COND + (#3# + (LETT #2# + (SPADCALL #2# #1# + (QREFELT $ 149)) + |POLYCAT-;squareFreePart;2S;34|)) + ('T + (PROGN + (LETT #2# #1# + |POLYCAT-;squareFreePart;2S;34|) + (LETT #3# 'T + |POLYCAT-;squareFreePart;2S;34|))))))) + (LETT #0# (CDR #0#) + |POLYCAT-;squareFreePart;2S;34|) + (GO G190) G191 (EXIT NIL)) + (COND (#3# #2#) ('T (|spadConstant| $ 34)))) + (QREFELT $ 149)))))) + +(DEFUN |POLYCAT-;content;SVarSetS;35| (|p| |v| $) + (SPADCALL (SPADCALL |p| |v| (QREFELT $ 48)) (QREFELT $ 171))) + +(DEFUN |POLYCAT-;primitivePart;2S;36| (|p| $) + (PROG (#0=#:G1687) + (RETURN + (QVELT (SPADCALL + (PROG2 (LETT #0# + (SPADCALL |p| + (SPADCALL |p| (QREFELT $ 173)) + (QREFELT $ 174)) + |POLYCAT-;primitivePart;2S;36|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#)) + (QREFELT $ 176)) + 1)))) + +(DEFUN |POLYCAT-;primitivePart;SVarSetS;37| (|p| |v| $) + (PROG (#0=#:G1693) + (RETURN + (QVELT (SPADCALL + (PROG2 (LETT #0# + (SPADCALL |p| + (SPADCALL |p| |v| (QREFELT $ 178)) + (QREFELT $ 179)) + |POLYCAT-;primitivePart;SVarSetS;37|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#)) + (QREFELT $ 176)) + 1)))) + +(DEFUN |POLYCAT-;<;2SB;38| (|p| |q| $) + (PROG (|dp| |dq|) + (RETURN + (SEQ (LETT |dp| (SPADCALL |p| (QREFELT $ 60)) + |POLYCAT-;<;2SB;38|) + (LETT |dq| (SPADCALL |q| (QREFELT $ 60)) + |POLYCAT-;<;2SB;38|) + (EXIT (COND + ((SPADCALL |dp| |dq| (QREFELT $ 181)) + (SPADCALL (|spadConstant| $ 22) + (SPADCALL |q| (QREFELT $ 39)) (QREFELT $ 182))) + ((SPADCALL |dq| |dp| (QREFELT $ 181)) + (SPADCALL (SPADCALL |p| (QREFELT $ 39)) + (|spadConstant| $ 22) (QREFELT $ 182))) + ('T + (SPADCALL + (SPADCALL (SPADCALL |p| |q| (QREFELT $ 156)) + (QREFELT $ 39)) + (|spadConstant| $ 22) (QREFELT $ 182))))))))) + +(DEFUN |POLYCAT-;patternMatch;SP2Pmr;39| (|p| |pat| |l| $) + (SPADCALL |p| |pat| |l| (QREFELT $ 187))) + +(DEFUN |POLYCAT-;patternMatch;SP2Pmr;40| (|p| |pat| |l| $) + (SPADCALL |p| |pat| |l| (QREFELT $ 193))) + +(DEFUN |POLYCAT-;convert;SP;41| (|x| $) + (SPADCALL (ELT $ 196) (ELT $ 197) |x| (QREFELT $ 201))) + +(DEFUN |POLYCAT-;convert;SP;42| (|x| $) + (SPADCALL (ELT $ 203) (ELT $ 204) |x| (QREFELT $ 208))) + +(DEFUN |POLYCAT-;convert;SIf;43| (|p| $) + (SPADCALL (ELT $ 211) (ELT $ 212) |p| (QREFELT $ 216))) + +(DEFUN |PolynomialCategory&| (|#1| |#2| |#3| |#4|) + (PROG (|dv$1| |dv$2| |dv$3| |dv$4| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) . #0=(|PolynomialCategory&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$3| (|devaluate| |#3|) . #0#) + (LETT |dv$4| (|devaluate| |#4|) . #0#) + (LETT |dv$| + (LIST '|PolynomialCategory&| |dv$1| |dv$2| |dv$3| |dv$4|) . #0#) + (LETT $ (GETREFV 226) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#2| + '(|PolynomialFactorizationExplicit|)) + (|HasAttribute| |#2| + '|canonicalUnitNormal|) + (|HasCategory| |#2| '(|GcdDomain|)) + (|HasCategory| |#2| '(|CommutativeRing|)) + (|HasCategory| |#4| + '(|PatternMatchable| (|Float|))) + (|HasCategory| |#2| + '(|PatternMatchable| (|Float|))) + (|HasCategory| |#4| + '(|PatternMatchable| (|Integer|))) + (|HasCategory| |#2| + '(|PatternMatchable| (|Integer|))) + (|HasCategory| |#4| + '(|ConvertibleTo| + (|Pattern| (|Float|)))) + (|HasCategory| |#2| + '(|ConvertibleTo| + (|Pattern| (|Float|)))) + (|HasCategory| |#4| + '(|ConvertibleTo| + (|Pattern| (|Integer|)))) + (|HasCategory| |#2| + '(|ConvertibleTo| + (|Pattern| (|Integer|)))) + (|HasCategory| |#4| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#2| + '(|ConvertibleTo| (|InputForm|))) + (|HasCategory| |#2| '(|OrderedSet|)))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (QSETREFV $ 8 |#3|) + (QSETREFV $ 9 |#4|) + (COND ((|testBitVector| |pv$| 4) - (PROGN - (QSETREFV |$| 74 - (CONS - (|dispatchFunction| |POLYCAT-;resultant;2SVarSetS;15|) - |$|)) - (QSETREFV |$| 76 - (CONS - (|dispatchFunction| |POLYCAT-;discriminant;SVarSetS;16|) - |$|))))) - (COND - ((|HasCategory| |#2| (QUOTE (|IntegralDomain|))) - (PROGN - (QSETREFV |$| 95 - (CONS (|dispatchFunction| |POLYCAT-;reducedSystem;MM;20|) |$|)) - (QSETREFV |$| 102 - (CONS - (|dispatchFunction| |POLYCAT-;reducedSystem;MVR;21|) - |$|))))) - (COND + (PROGN + (QSETREFV $ 75 + (CONS (|dispatchFunction| + |POLYCAT-;resultant;2SVarSetS;15|) + $)) + (QSETREFV $ 77 + (CONS (|dispatchFunction| + |POLYCAT-;discriminant;SVarSetS;16|) + $))))) + (COND + ((|HasCategory| |#2| '(|IntegralDomain|)) + (PROGN + (QSETREFV $ 96 + (CONS (|dispatchFunction| + |POLYCAT-;reducedSystem;MM;20|) + $)) + (QSETREFV $ 103 + (CONS (|dispatchFunction| + |POLYCAT-;reducedSystem;MVR;21|) + $))))) + (COND ((|testBitVector| |pv$| 1) - (PROGN - (QSETREFV |$| 105 - (CONS - (|dispatchFunction| |POLYCAT-;gcdPolynomial;3Sup;22|) - |$|)) - (QSETREFV |$| 112 - (CONS - (|dispatchFunction| - |POLYCAT-;solveLinearPolynomialEquation;LSupU;23|) - |$|)) - (QSETREFV |$| 116 - (CONS - (|dispatchFunction| |POLYCAT-;factorPolynomial;SupF;24|) - |$|)) - (QSETREFV |$| 118 - (CONS - (|dispatchFunction| - |POLYCAT-;factorSquareFreePolynomial;SupF;25|) - |$|)) - (QSETREFV |$| 136 - (CONS - (|dispatchFunction| |POLYCAT-;factor;SF;26|) |$|)) - (COND - ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|))) - (PROGN - (QSETREFV |$| 150 - (CONS - (|dispatchFunction| |POLYCAT-;conditionP;MU;27|) - |$|)))))))) - (COND - ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|))) - (PROGN - (QSETREFV |$| 152 - (CONS - (|dispatchFunction| |POLYCAT-;charthRoot;SU;28|) - |$|))))) - (COND + (PROGN + (QSETREFV $ 106 + (CONS (|dispatchFunction| + |POLYCAT-;gcdPolynomial;3Sup;22|) + $)) + (QSETREFV $ 113 + (CONS (|dispatchFunction| + |POLYCAT-;solveLinearPolynomialEquation;LSupU;23|) + $)) + (QSETREFV $ 117 + (CONS (|dispatchFunction| + |POLYCAT-;factorPolynomial;SupF;24|) + $)) + (QSETREFV $ 119 + (CONS (|dispatchFunction| + |POLYCAT-;factorSquareFreePolynomial;SupF;25|) + $)) + (QSETREFV $ 137 + (CONS (|dispatchFunction| |POLYCAT-;factor;SF;26|) $)) + (COND + ((|HasCategory| |#2| '(|CharacteristicNonZero|)) + (PROGN + (QSETREFV $ 151 + (CONS (|dispatchFunction| + |POLYCAT-;conditionP;MU;27|) + $)))))))) + (COND + ((|HasCategory| |#2| '(|CharacteristicNonZero|)) + (PROGN + (QSETREFV $ 153 + (CONS (|dispatchFunction| |POLYCAT-;charthRoot;SU;28|) + $))))) + (COND ((|testBitVector| |pv$| 3) - (PROGN - (COND - ((|HasCategory| |#2| (QUOTE (|EuclideanDomain|))) - (COND - ((|HasCategory| |#2| (QUOTE (|CharacteristicZero|))) - (QSETREFV |$| 161 - (CONS - (|dispatchFunction| |POLYCAT-;squareFree;SF;31|) - |$|))) - ((QUOTE T) - (QSETREFV |$| 161 - (CONS - (|dispatchFunction| |POLYCAT-;squareFree;SF;32|) - |$|))))) - ((QUOTE T) - (QSETREFV |$| 161 - (CONS - (|dispatchFunction| |POLYCAT-;squareFree;SF;33|) |$|)))) - (QSETREFV |$| 169 - (CONS - (|dispatchFunction| |POLYCAT-;squareFreePart;2S;34|) |$|)) - (QSETREFV |$| 171 - (CONS (|dispatchFunction| |POLYCAT-;content;SVarSetS;35|) |$|)) - (QSETREFV |$| 176 - (CONS (|dispatchFunction| |POLYCAT-;primitivePart;2S;36|) |$|)) - (QSETREFV |$| 179 - (CONS - (|dispatchFunction| |POLYCAT-;primitivePart;SVarSetS;37|) |$|))))) - (COND + (PROGN + (COND + ((|HasCategory| |#2| '(|EuclideanDomain|)) + (COND + ((|HasCategory| |#2| '(|CharacteristicZero|)) + (QSETREFV $ 162 + (CONS (|dispatchFunction| + |POLYCAT-;squareFree;SF;31|) + $))) + ('T + (QSETREFV $ 162 + (CONS (|dispatchFunction| + |POLYCAT-;squareFree;SF;32|) + $))))) + ('T + (QSETREFV $ 162 + (CONS (|dispatchFunction| + |POLYCAT-;squareFree;SF;33|) + $)))) + (QSETREFV $ 170 + (CONS (|dispatchFunction| + |POLYCAT-;squareFreePart;2S;34|) + $)) + (QSETREFV $ 172 + (CONS (|dispatchFunction| + |POLYCAT-;content;SVarSetS;35|) + $)) + (QSETREFV $ 177 + (CONS (|dispatchFunction| + |POLYCAT-;primitivePart;2S;36|) + $)) + (QSETREFV $ 180 + (CONS (|dispatchFunction| + |POLYCAT-;primitivePart;SVarSetS;37|) + $))))) + (COND ((|testBitVector| |pv$| 15) - (PROGN - (QSETREFV |$| 182 - (CONS (|dispatchFunction| |POLYCAT-;<;2SB;38|) |$|)) - (COND - ((|testBitVector| |pv$| 8) - (COND - ((|testBitVector| |pv$| 7) - (QSETREFV |$| 188 - (CONS - (|dispatchFunction| - |POLYCAT-;patternMatch;SP2Pmr;39|) - |$|)))))) - (COND - ((|testBitVector| |pv$| 6) - (COND - ((|testBitVector| |pv$| 5) - (QSETREFV |$| 194 - (CONS - (|dispatchFunction| - |POLYCAT-;patternMatch;SP2Pmr;40|) - |$|))))))))) - (COND - ((|testBitVector| |pv$| 12) - (COND - ((|testBitVector| |pv$| 11) - (QSETREFV |$| 201 - (CONS (|dispatchFunction| |POLYCAT-;convert;SP;41|) |$|)))))) - (COND - ((|testBitVector| |pv$| 10) - (COND - ((|testBitVector| |pv$| 9) - (QSETREFV |$| 208 - (CONS (|dispatchFunction| |POLYCAT-;convert;SP;42|) |$|)))))) - (COND - ((|testBitVector| |pv$| 14) - (COND - ((|testBitVector| |pv$| 13) - (QSETREFV |$| 216 - (CONS - (|dispatchFunction| |POLYCAT-;convert;SIf;43|) - |$|)))))) - |$|)))) - -(MAKEPROP - (QUOTE |PolynomialCategory&|) - (QUOTE |infovec|) - (LIST - (QUOTE - #(NIL NIL NIL NIL NIL NIL - (|local| |#1|) - (|local| |#2|) - (|local| |#3|) - (|local| |#4|) - (|Equation| 6) - (0 . |lhs|) - (|Union| 9 (QUOTE "failed")) - (5 . |retractIfCan|) - (10 . |retract|) - (15 . |rhs|) - (|List| 9) - (|List| |$|) - (20 . |eval|) - (|List| 220) - |POLYCAT-;eval;SLS;1| - (27 . |Zero|) - (31 . |Zero|) - (|Boolean|) - (35 . |=|) - (41 . |leadingMonomial|) - (46 . |reductum|) - |POLYCAT-;monomials;SL;2| - (51 . |monomials|) - (|Union| 17 (QUOTE "failed")) - |POLYCAT-;isPlus;SU;3| - (56 . |variables|) - (61 . |monomial?|) - (66 . |One|) - (70 . |One|) - (|NonNegativeInteger|) - (74 . |degree|) - (80 . |monomial|) - (87 . |leadingCoefficient|) - (92 . |one?|) - (97 . |coerce|) - |POLYCAT-;isTimes;SU;4| - (102 . |mainVariable|) - (|Record| (|:| |var| 9) (|:| |exponent| 35)) - (|Union| 43 (QUOTE "failed")) - |POLYCAT-;isExpt;SU;5| - (|SparseUnivariatePolynomial| |$|) - (107 . |univariate|) - (|SparseUnivariatePolynomial| 6) - (113 . |coefficient|) - |POLYCAT-;coefficient;SVarSetNniS;6| - (|List| 35) - (119 . |coefficient|) - |POLYCAT-;coefficient;SLLS;7| - (126 . |monomial|) - |POLYCAT-;monomial;SLLS;8| - (133 . |coerce|) - |POLYCAT-;retract;SVarSet;9| - |POLYCAT-;retractIfCan;SU;10| - (138 . |degree|) - (143 . |monomial|) - |POLYCAT-;primitiveMonomials;SL;12| - (149 . |ground?|) - (154 . |Zero|) - (158 . |=|) - (164 . |degree|) - (169 . |leadingCoefficient|) - (174 . |totalDegree|) - (179 . |reductum|) - |POLYCAT-;totalDegree;SNni;13| - (184 . |member?|) - (190 . |totalDegree|) - |POLYCAT-;totalDegree;SLNni;14| - (196 . |resultant|) - (202 . |resultant|) - (209 . |discriminant|) - (214 . |discriminant|) - (220 . |primitiveMonomials|) - (|List| 6) - (225 . |concat|) - (230 . |removeDuplicates!|) - (|Vector| 7) - (235 . |new|) - (|Integer|) - (241 . |minIndex|) - (246 . |coefficient|) - (252 . |qsetelt!|) - (|List| 219) - (|Matrix| 7) - (259 . |matrix|) - (|List| 78) - (|Matrix| 6) - (264 . |listOfLists|) - (269 . |vertConcat|) - (|Matrix| |$|) - (275 . |reducedSystem|) - (|Vector| 6) - (280 . |entries|) - (285 . |concat|) - (291 . |concat|) - (|Record| (|:| |mat| 88) (|:| |vec| 81)) - (|Vector| |$|) - (297 . |reducedSystem|) - (|GeneralPolynomialGcdPackage| 8 9 7 6) - (303 . |gcdPolynomial|) - (309 . |gcdPolynomial|) - (|Union| 107 (QUOTE "failed")) - (|List| 48) - (|PolynomialFactorizationByRecursion| 7 8 9 6) - (315 . |solveLinearPolynomialEquationByRecursion|) - (|Union| 111 (QUOTE "failed")) - (|List| 46) - (321 . |solveLinearPolynomialEquation|) - (|Factored| 48) - (327 . |factorByRecursion|) - (|Factored| 46) - (332 . |factorPolynomial|) - (337 . |factorSquareFreeByRecursion|) - (342 . |factorSquareFreePolynomial|) - (|Factored| |$|) - (347 . |factor|) - (|Factored| 7) - (352 . |unit|) - (|Union| (QUOTE "nil") (QUOTE "sqfr") (QUOTE "irred") (QUOTE "prime")) - (|Record| (|:| |flg| 123) (|:| |fctr| 7) (|:| |xpnt| 83)) - (|List| 124) - (357 . |factorList|) - (|Record| (|:| |flg| 123) (|:| |fctr| 6) (|:| |xpnt| 83)) - (|List| 127) - (|Factored| 6) - (362 . |makeFR|) - (368 . |unit|) - (373 . |multivariate|) - (|Record| (|:| |flg| 123) (|:| |fctr| 48) (|:| |xpnt| 83)) - (|List| 133) - (379 . |factorList|) - (384 . |factor|) - (389 . |transpose|) - (394 . |characteristic|) - (398 . |setUnion|) - (404 . |degree|) - (|Union| |$| (QUOTE "failed")) - (410 . |exquo|) - (416 . |ground|) - (421 . |transpose|) - (|Union| 101 (QUOTE "failed")) - (426 . |conditionP|) - (431 . |elt|) - (437 . |*|) - (443 . |+|) - (449 . |conditionP|) - (454 . |charthRoot|) - (459 . |charthRoot|) - (464 . |Zero|) - (468 . |coefficient|) - (475 . |-|) - (|Record| (|:| |quotient| |$|) (|:| |remainder| |$|)) - (481 . |monicDivide|) - |POLYCAT-;monicDivide;2SVarSetR;30| - (|MultivariateSquareFree| 8 9 7 6) - (487 . |squareFree|) - (492 . |squareFree|) - (|PolynomialSquareFree| 9 8 7 6) - (497 . |squareFree|) - (502 . |squareFree|) - (507 . |unit|) - (|Record| (|:| |factor| 6) (|:| |exponent| 83)) - (|List| 166) - (512 . |factors|) - (517 . |squareFreePart|) - (522 . |content|) - (527 . |content|) - (533 . |content|) - (538 . |exquo|) - (|Record| (|:| |unit| |$|) (|:| |canonical| |$|) (|:| |associate| |$|)) - (544 . |unitNormal|) - (549 . |primitivePart|) - (554 . |content|) - (560 . |exquo|) - (566 . |primitivePart|) - (572 . |<|) - (578 . |<|) - (584 . |<|) - (|PatternMatchResult| 83 6) - (|Pattern| 83) - (|PatternMatchPolynomialCategory| 83 8 9 7 6) - (590 . |patternMatch|) - (|PatternMatchResult| 83 |$|) - (597 . |patternMatch|) - (|PatternMatchResult| (|Float|) 6) - (|Pattern| (|Float|)) - (|PatternMatchPolynomialCategory| (|Float|) 8 9 7 6) - (604 . |patternMatch|) - (|PatternMatchResult| (|Float|) |$|) - (611 . |patternMatch|) - (618 . |convert|) - (623 . |convert|) - (|Mapping| 184 9) - (|Mapping| 184 7) - (|PolynomialCategoryLifting| 8 9 7 6 184) - (628 . |map|) - (635 . |convert|) - (640 . |convert|) - (645 . |convert|) - (|Mapping| 190 9) - (|Mapping| 190 7) - (|PolynomialCategoryLifting| 8 9 7 6 190) - (650 . |map|) - (657 . |convert|) - (|InputForm|) - (662 . |convert|) - (667 . |convert|) - (|Mapping| 209 9) - (|Mapping| 209 7) - (|PolynomialCategoryLifting| 8 9 7 6 209) - (672 . |map|) - (679 . |convert|) - (|Record| (|:| |mat| 218) (|:| |vec| (|Vector| 83))) - (|Matrix| 83) - (|List| 7) - (|Equation| |$|) - (|Union| 83 (QUOTE "failed")) - (|Union| 223 (QUOTE "failed")) - (|Fraction| 83) - (|Union| 7 (QUOTE "failed")))) - (QUOTE - #(|totalDegree| 684 |squareFreePart| 695 |squareFree| 700 - |solveLinearPolynomialEquation| 705 |retractIfCan| 711 |retract| 716 - |resultant| 721 |reducedSystem| 728 |primitivePart| 739 - |primitiveMonomials| 750 |patternMatch| 755 |monomials| 769 - |monomial| 774 |monicDivide| 781 |isTimes| 788 |isPlus| 793 - |isExpt| 798 |gcdPolynomial| 803 |factorSquareFreePolynomial| 809 - |factorPolynomial| 814 |factor| 819 |eval| 824 |discriminant| 830 - |convert| 836 |content| 851 |conditionP| 857 |coefficient| 862 - |charthRoot| 876 |<| 881)) - (QUOTE NIL) - (CONS - (|makeByteWordVec2| 1 (QUOTE NIL)) - (CONS - (QUOTE #()) - (CONS - (QUOTE #()) - (|makeByteWordVec2| 216 - (QUOTE - (1 10 6 0 11 1 6 12 0 13 1 6 9 0 14 1 10 6 0 15 3 6 0 0 16 - 17 18 0 6 0 21 0 7 0 22 2 6 23 0 0 24 1 6 0 0 25 1 6 0 0 - 26 1 6 17 0 28 1 6 16 0 31 1 6 23 0 32 0 6 0 33 0 7 0 34 2 - 6 35 0 9 36 3 6 0 0 9 35 37 1 6 7 0 38 1 7 23 0 39 1 6 0 7 - 40 1 6 12 0 42 2 6 46 0 9 47 2 48 6 0 35 49 3 6 0 0 16 51 - 52 3 6 0 0 16 51 54 1 6 0 9 56 1 6 8 0 59 2 6 0 7 8 60 1 6 - 23 0 62 0 48 0 63 2 48 23 0 0 64 1 48 35 0 65 1 48 6 0 66 - 1 6 35 0 67 1 48 0 0 68 2 16 23 9 0 70 2 6 35 0 16 71 2 48 - 6 0 0 73 3 0 0 0 0 9 74 1 48 6 0 75 2 0 0 0 9 76 1 6 17 0 - 77 1 78 0 17 79 1 78 0 0 80 2 81 0 35 7 82 1 81 83 0 84 2 - 6 7 0 8 85 3 81 7 0 83 7 86 1 88 0 87 89 1 91 90 0 92 2 88 - 0 0 0 93 1 0 88 94 95 1 96 78 0 97 2 78 0 0 0 98 2 81 0 0 - 0 99 2 0 100 94 101 102 2 103 48 48 48 104 2 0 46 46 46 - 105 2 108 106 107 48 109 2 0 110 111 46 112 1 108 113 48 - 114 1 0 115 46 116 1 108 113 48 117 1 0 115 46 118 1 7 119 - 0 120 1 121 7 0 122 1 121 125 0 126 2 129 0 6 128 130 1 113 - 48 0 131 2 6 0 46 9 132 1 113 134 0 135 1 0 119 0 136 1 91 - 0 0 137 0 6 35 138 2 78 0 0 0 139 2 6 51 0 16 140 2 83 141 - 0 0 142 1 6 7 0 143 1 88 0 0 144 1 7 145 94 146 2 81 7 0 - 83 147 2 6 0 0 0 148 2 6 0 0 0 149 1 0 145 94 150 1 7 141 - 0 151 1 0 141 0 152 0 8 0 153 3 6 0 0 9 35 154 2 6 0 0 0 - 155 2 48 156 0 0 157 1 159 129 6 160 1 0 119 0 161 1 162 - 129 6 163 1 6 119 0 164 1 129 6 0 165 1 129 167 0 168 1 0 - 0 0 169 1 48 6 0 170 2 0 0 0 9 171 1 6 7 0 172 2 6 141 0 7 - 173 1 6 174 0 175 1 0 0 0 176 2 6 0 0 9 177 2 6 141 0 0 - 178 2 0 0 0 9 179 2 8 23 0 0 180 2 7 23 0 0 181 2 0 23 0 0 - 182 3 185 183 6 184 183 186 3 0 187 0 184 187 188 3 191 189 - 6 190 189 192 3 0 193 0 190 193 194 1 9 184 0 195 1 7 184 - 0 196 3 199 184 197 198 6 200 1 0 184 0 201 1 9 190 0 202 - 1 7 190 0 203 3 206 190 204 205 6 207 1 0 190 0 208 1 9 - 209 0 210 1 7 209 0 211 3 214 209 212 213 6 215 1 0 209 0 - 216 2 0 35 0 16 72 1 0 35 0 69 1 0 0 0 169 1 0 119 0 161 2 - 0 110 111 46 112 1 0 12 0 58 1 0 9 0 57 3 0 0 0 0 9 74 1 0 - 88 94 95 2 0 100 94 101 102 2 0 0 0 9 179 1 0 0 0 176 1 0 - 17 0 61 3 0 187 0 184 187 188 3 0 193 0 190 193 194 1 0 17 - 0 27 3 0 0 0 16 51 55 3 0 156 0 0 9 158 1 0 29 0 41 1 0 29 - 0 30 1 0 44 0 45 2 0 46 46 46 105 1 0 115 46 118 1 0 115 - 46 116 1 0 119 0 136 2 0 0 0 19 20 2 0 0 0 9 76 1 0 209 0 - 216 1 0 184 0 201 1 0 190 0 208 2 0 0 0 9 171 1 0 145 94 - 150 3 0 0 0 16 51 53 3 0 0 0 9 35 50 1 0 141 0 152 2 0 - 23 0 0 182)))))) - (QUOTE |lookupComplete|))) - + (PROGN + (QSETREFV $ 183 + (CONS (|dispatchFunction| |POLYCAT-;<;2SB;38|) $)) + (COND + ((|testBitVector| |pv$| 8) + (COND + ((|testBitVector| |pv$| 7) + (QSETREFV $ 189 + (CONS (|dispatchFunction| + |POLYCAT-;patternMatch;SP2Pmr;39|) + $)))))) + (COND + ((|testBitVector| |pv$| 6) + (COND + ((|testBitVector| |pv$| 5) + (QSETREFV $ 195 + (CONS (|dispatchFunction| + |POLYCAT-;patternMatch;SP2Pmr;40|) + $))))))))) + (COND + ((|testBitVector| |pv$| 12) + (COND + ((|testBitVector| |pv$| 11) + (QSETREFV $ 202 + (CONS (|dispatchFunction| |POLYCAT-;convert;SP;41|) + $)))))) + (COND + ((|testBitVector| |pv$| 10) + (COND + ((|testBitVector| |pv$| 9) + (QSETREFV $ 209 + (CONS (|dispatchFunction| |POLYCAT-;convert;SP;42|) + $)))))) + (COND + ((|testBitVector| |pv$| 14) + (COND + ((|testBitVector| |pv$| 13) + (QSETREFV $ 217 + (CONS (|dispatchFunction| |POLYCAT-;convert;SIf;43|) + $)))))) + $)))) + +(MAKEPROP '|PolynomialCategory&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|local| |#3|) (|local| |#4|) (|Equation| 6) (0 . |lhs|) + (|Union| 9 '"failed") (5 . |retractIfCan|) + (10 . |retract|) (15 . |rhs|) (|List| 9) (|List| $) + (20 . |eval|) (|List| 221) |POLYCAT-;eval;SLS;1| + (27 . |Zero|) (31 . |Zero|) (|Boolean|) (35 . =) + (41 . |not|) (46 . |leadingMonomial|) (51 . |reductum|) + |POLYCAT-;monomials;SL;2| (56 . |monomials|) + (|Union| 17 '"failed") |POLYCAT-;isPlus;SU;3| + (61 . |variables|) (66 . |monomial?|) (71 . |One|) + (75 . |One|) (|NonNegativeInteger|) (79 . |degree|) + (85 . |monomial|) (92 . |leadingCoefficient|) (97 . =) + (103 . |coerce|) |POLYCAT-;isTimes;SU;4| + (108 . |mainVariable|) + (|Record| (|:| |var| 9) (|:| |exponent| 36)) + (|Union| 44 '"failed") |POLYCAT-;isExpt;SU;5| + (|SparseUnivariatePolynomial| $) (113 . |univariate|) + (|SparseUnivariatePolynomial| 6) (119 . |coefficient|) + |POLYCAT-;coefficient;SVarSetNniS;6| (|List| 36) + (125 . |coefficient|) |POLYCAT-;coefficient;SLLS;7| + (132 . |monomial|) |POLYCAT-;monomial;SLLS;8| + (139 . |coerce|) |POLYCAT-;retract;SVarSet;9| + |POLYCAT-;retractIfCan;SU;10| (144 . |degree|) + (149 . |monomial|) |POLYCAT-;primitiveMonomials;SL;12| + (155 . |ground?|) (160 . |Zero|) (164 . =) + (170 . |degree|) (175 . |leadingCoefficient|) + (180 . |totalDegree|) (185 . |reductum|) + |POLYCAT-;totalDegree;SNni;13| (190 . |member?|) + (196 . |totalDegree|) |POLYCAT-;totalDegree;SLNni;14| + (202 . |resultant|) (208 . |resultant|) + (215 . |discriminant|) (220 . |discriminant|) + (226 . |primitiveMonomials|) (|List| 6) (231 . |concat|) + (236 . |removeDuplicates!|) (|Vector| 7) (241 . |new|) + (|Integer|) (247 . |minIndex|) (252 . |coefficient|) + (258 . |qsetelt!|) (|List| 220) (|Matrix| 7) + (265 . |matrix|) (|List| 79) (|Matrix| 6) + (270 . |listOfLists|) (275 . |vertConcat|) (|Matrix| $) + (281 . |reducedSystem|) (|Vector| 6) (286 . |entries|) + (291 . |concat|) (297 . |concat|) + (|Record| (|:| |mat| 89) (|:| |vec| 82)) (|Vector| $) + (303 . |reducedSystem|) + (|GeneralPolynomialGcdPackage| 8 9 7 6) + (309 . |gcdPolynomial|) (315 . |gcdPolynomial|) + (|Union| 108 '"failed") (|List| 49) + (|PolynomialFactorizationByRecursion| 7 8 9 6) + (321 . |solveLinearPolynomialEquationByRecursion|) + (|Union| 112 '"failed") (|List| 47) + (327 . |solveLinearPolynomialEquation|) (|Factored| 49) + (333 . |factorByRecursion|) (|Factored| 47) + (338 . |factorPolynomial|) + (343 . |factorSquareFreeByRecursion|) + (348 . |factorSquareFreePolynomial|) (|Factored| $) + (353 . |factor|) (|Factored| 7) (358 . |unit|) + (|Union| '"nil" '"sqfr" '"irred" '"prime") + (|Record| (|:| |flg| 124) (|:| |fctr| 7) (|:| |xpnt| 84)) + (|List| 125) (363 . |factorList|) + (|Record| (|:| |flg| 124) (|:| |fctr| 6) (|:| |xpnt| 84)) + (|List| 128) (|Factored| 6) (368 . |makeFR|) + (374 . |unit|) (379 . |multivariate|) + (|Record| (|:| |flg| 124) (|:| |fctr| 49) (|:| |xpnt| 84)) + (|List| 134) (385 . |factorList|) (390 . |factor|) + (395 . |transpose|) (400 . |characteristic|) + (404 . |setUnion|) (410 . |degree|) (|Union| $ '"failed") + (416 . |exquo|) (422 . |ground|) (427 . |transpose|) + (|Union| 102 '"failed") (432 . |conditionP|) (437 . |elt|) + (443 . *) (449 . +) (455 . |conditionP|) + (460 . |charthRoot|) (465 . |charthRoot|) (470 . |Zero|) + (474 . |coefficient|) (481 . -) + (|Record| (|:| |quotient| $) (|:| |remainder| $)) + (487 . |monicDivide|) |POLYCAT-;monicDivide;2SVarSetR;30| + (|MultivariateSquareFree| 8 9 7 6) (493 . |squareFree|) + (498 . |squareFree|) (|PolynomialSquareFree| 9 8 7 6) + (503 . |squareFree|) (508 . |squareFree|) (513 . |unit|) + (|Record| (|:| |factor| 6) (|:| |exponent| 84)) + (|List| 167) (518 . |factors|) (523 . |squareFreePart|) + (528 . |content|) (533 . |content|) (539 . |content|) + (544 . |exquo|) + (|Record| (|:| |unit| $) (|:| |canonical| $) + (|:| |associate| $)) + (550 . |unitNormal|) (555 . |primitivePart|) + (560 . |content|) (566 . |exquo|) (572 . |primitivePart|) + (578 . <) (584 . <) (590 . <) (|PatternMatchResult| 84 6) + (|Pattern| 84) + (|PatternMatchPolynomialCategory| 84 8 9 7 6) + (596 . |patternMatch|) (|PatternMatchResult| 84 $) + (603 . |patternMatch|) (|PatternMatchResult| (|Float|) 6) + (|Pattern| (|Float|)) + (|PatternMatchPolynomialCategory| (|Float|) 8 9 7 6) + (610 . |patternMatch|) (|PatternMatchResult| (|Float|) $) + (617 . |patternMatch|) (624 . |convert|) (629 . |convert|) + (|Mapping| 185 9) (|Mapping| 185 7) + (|PolynomialCategoryLifting| 8 9 7 6 185) (634 . |map|) + (641 . |convert|) (646 . |convert|) (651 . |convert|) + (|Mapping| 191 9) (|Mapping| 191 7) + (|PolynomialCategoryLifting| 8 9 7 6 191) (656 . |map|) + (663 . |convert|) (|InputForm|) (668 . |convert|) + (673 . |convert|) (|Mapping| 210 9) (|Mapping| 210 7) + (|PolynomialCategoryLifting| 8 9 7 6 210) (678 . |map|) + (685 . |convert|) + (|Record| (|:| |mat| 219) (|:| |vec| (|Vector| 84))) + (|Matrix| 84) (|List| 7) (|Equation| $) + (|Union| 84 '"failed") (|Union| 224 '"failed") + (|Fraction| 84) (|Union| 7 '"failed")) + '#(|totalDegree| 690 |squareFreePart| 701 |squareFree| 706 + |solveLinearPolynomialEquation| 711 |retractIfCan| 717 + |retract| 722 |resultant| 727 |reducedSystem| 734 + |primitivePart| 745 |primitiveMonomials| 756 + |patternMatch| 761 |monomials| 775 |monomial| 780 + |monicDivide| 787 |isTimes| 794 |isPlus| 799 |isExpt| 804 + |gcdPolynomial| 809 |factorSquareFreePolynomial| 815 + |factorPolynomial| 820 |factor| 825 |eval| 830 + |discriminant| 836 |convert| 842 |content| 857 + |conditionP| 863 |coefficient| 868 |charthRoot| 882 < 887) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 217 + '(1 10 6 0 11 1 6 12 0 13 1 6 9 0 14 1 + 10 6 0 15 3 6 0 0 16 17 18 0 6 0 21 0 + 7 0 22 2 6 23 0 0 24 1 23 0 0 25 1 6 + 0 0 26 1 6 0 0 27 1 6 17 0 29 1 6 16 + 0 32 1 6 23 0 33 0 6 0 34 0 7 0 35 2 + 6 36 0 9 37 3 6 0 0 9 36 38 1 6 7 0 + 39 2 7 23 0 0 40 1 6 0 7 41 1 6 12 0 + 43 2 6 47 0 9 48 2 49 6 0 36 50 3 6 0 + 0 16 52 53 3 6 0 0 16 52 55 1 6 0 9 + 57 1 6 8 0 60 2 6 0 7 8 61 1 6 23 0 + 63 0 49 0 64 2 49 23 0 0 65 1 49 36 0 + 66 1 49 6 0 67 1 6 36 0 68 1 49 0 0 + 69 2 16 23 9 0 71 2 6 36 0 16 72 2 49 + 6 0 0 74 3 0 0 0 0 9 75 1 49 6 0 76 2 + 0 0 0 9 77 1 6 17 0 78 1 79 0 17 80 1 + 79 0 0 81 2 82 0 36 7 83 1 82 84 0 85 + 2 6 7 0 8 86 3 82 7 0 84 7 87 1 89 0 + 88 90 1 92 91 0 93 2 89 0 0 0 94 1 0 + 89 95 96 1 97 79 0 98 2 79 0 0 0 99 2 + 82 0 0 0 100 2 0 101 95 102 103 2 104 + 49 49 49 105 2 0 47 47 47 106 2 109 + 107 108 49 110 2 0 111 112 47 113 1 + 109 114 49 115 1 0 116 47 117 1 109 + 114 49 118 1 0 116 47 119 1 7 120 0 + 121 1 122 7 0 123 1 122 126 0 127 2 + 130 0 6 129 131 1 114 49 0 132 2 6 0 + 47 9 133 1 114 135 0 136 1 0 120 0 + 137 1 92 0 0 138 0 6 36 139 2 79 0 0 + 0 140 2 6 52 0 16 141 2 84 142 0 0 + 143 1 6 7 0 144 1 89 0 0 145 1 7 146 + 95 147 2 82 7 0 84 148 2 6 0 0 0 149 + 2 6 0 0 0 150 1 0 146 95 151 1 7 142 + 0 152 1 0 142 0 153 0 8 0 154 3 6 0 0 + 9 36 155 2 6 0 0 0 156 2 49 157 0 0 + 158 1 160 130 6 161 1 0 120 0 162 1 + 163 130 6 164 1 6 120 0 165 1 130 6 0 + 166 1 130 168 0 169 1 0 0 0 170 1 49 + 6 0 171 2 0 0 0 9 172 1 6 7 0 173 2 6 + 142 0 7 174 1 6 175 0 176 1 0 0 0 177 + 2 6 0 0 9 178 2 6 142 0 0 179 2 0 0 0 + 9 180 2 8 23 0 0 181 2 7 23 0 0 182 2 + 0 23 0 0 183 3 186 184 6 185 184 187 + 3 0 188 0 185 188 189 3 192 190 6 191 + 190 193 3 0 194 0 191 194 195 1 9 185 + 0 196 1 7 185 0 197 3 200 185 198 199 + 6 201 1 0 185 0 202 1 9 191 0 203 1 7 + 191 0 204 3 207 191 205 206 6 208 1 0 + 191 0 209 1 9 210 0 211 1 7 210 0 212 + 3 215 210 213 214 6 216 1 0 210 0 217 + 2 0 36 0 16 73 1 0 36 0 70 1 0 0 0 + 170 1 0 120 0 162 2 0 111 112 47 113 + 1 0 12 0 59 1 0 9 0 58 3 0 0 0 0 9 75 + 1 0 89 95 96 2 0 101 95 102 103 2 0 0 + 0 9 180 1 0 0 0 177 1 0 17 0 62 3 0 + 188 0 185 188 189 3 0 194 0 191 194 + 195 1 0 17 0 28 3 0 0 0 16 52 56 3 0 + 157 0 0 9 159 1 0 30 0 42 1 0 30 0 31 + 1 0 45 0 46 2 0 47 47 47 106 1 0 116 + 47 119 1 0 116 47 117 1 0 120 0 137 2 + 0 0 0 19 20 2 0 0 0 9 77 1 0 210 0 + 217 1 0 185 0 202 1 0 191 0 209 2 0 0 + 0 9 172 1 0 146 95 151 3 0 0 0 16 52 + 54 3 0 0 0 9 36 51 1 0 142 0 153 2 0 + 23 0 0 183))))) + '|lookupComplete|)) @ \section{package POLYLIFT PolynomialCategoryLifting} <<package POLYLIFT PolynomialCategoryLifting>>= @@ -3126,145 +2979,163 @@ Note that this code is not included in the generated catdef.spad file. <<UPOLYC.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |UnivariatePolynomialCategory;CAT| (QUOTE NIL)) - -(SETQ |UnivariatePolynomialCategory;AL| (QUOTE NIL)) - -(DEFUN |UnivariatePolynomialCategory| (#1=#:G103214) - (LET (#2=#:G103215) - (COND - ((SETQ #2# (|assoc| (|devaluate| #1#) |UnivariatePolynomialCategory;AL|)) - (CDR #2#)) - (T - (SETQ |UnivariatePolynomialCategory;AL| - (|cons5| - (CONS - (|devaluate| #1#) - (SETQ #2# (|UnivariatePolynomialCategory;| #1#))) - |UnivariatePolynomialCategory;AL|)) - #2#)))) - -(DEFUN |UnivariatePolynomialCategory;| (|t#1|) - (PROG (#1=#:G103213) - (RETURN - (PROG1 - (LETT #1# - (|sublisV| - (PAIR (QUOTE (|t#1|)) (LIST (|devaluate| |t#1|))) - (|sublisV| - (PAIR - (QUOTE (#2=#:G103211 #3=#:G103212)) - (LIST - (QUOTE (|NonNegativeInteger|)) - (QUOTE (|SingletonAsOrderedSet|)))) - (COND - (|UnivariatePolynomialCategory;CAT|) - ((QUOTE T) - (LETT |UnivariatePolynomialCategory;CAT| - (|Join| - (|PolynomialCategory| - (QUOTE |t#1|) (QUOTE #2#) (QUOTE #3#)) - (|Eltable| (QUOTE |t#1|) (QUOTE |t#1|)) - (|Eltable| (QUOTE |$|) (QUOTE |$|)) - (|DifferentialRing|) - (|DifferentialExtension| (QUOTE |t#1|)) - (|mkCategory| - (QUOTE |domain|) - (QUOTE ( - ((|vectorise| - ((|Vector| |t#1|) |$| (|NonNegativeInteger|))) T) - ((|makeSUP| - ((|SparseUnivariatePolynomial| |t#1|) |$|)) T) - ((|unmakeSUP| - (|$| (|SparseUnivariatePolynomial| |t#1|))) T) - ((|multiplyExponents| - (|$| |$| (|NonNegativeInteger|))) T) - ((|divideExponents| - ((|Union| |$| "failed") - |$| - (|NonNegativeInteger|))) T) - ((|monicDivide| - ((|Record| - (|:| |quotient| |$|) - (|:| |remainder| |$|)) - |$| - |$|)) T) - ((|karatsubaDivide| - ((|Record| - (|:| |quotient| |$|) - (|:| |remainder| |$|)) - |$| - (|NonNegativeInteger|))) T) - ((|shiftRight| (|$| |$| (|NonNegativeInteger|))) T) - ((|shiftLeft| (|$| |$| (|NonNegativeInteger|))) T) - ((|pseudoRemainder| (|$| |$| |$|)) T) - ((|differentiate| - (|$| |$| (|Mapping| |t#1| |t#1|) |$|)) T) - ((|discriminant| (|t#1| |$|)) - (|has| |t#1| (|CommutativeRing|))) - ((|resultant| (|t#1| |$| |$|)) - (|has| |t#1| (|CommutativeRing|))) - ((|elt| - ((|Fraction| |$|) - (|Fraction| |$|) - (|Fraction| |$|))) - (|has| |t#1| (|IntegralDomain|))) - ((|order| ((|NonNegativeInteger|) |$| |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|subResultantGcd| (|$| |$| |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|composite| ((|Union| |$| "failed") |$| |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|composite| - ((|Union| (|Fraction| |$|) "failed") - (|Fraction| |$|) - |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|pseudoQuotient| (|$| |$| |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|pseudoDivide| - ((|Record| - (|:| |coef| |t#1|) - (|:| |quotient| |$|) - (|:| |remainder| |$|)) - |$| - |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|separate| - ((|Record| - (|:| |primePart| |$|) - (|:| |commonPart| |$|)) - |$| - |$|)) - (|has| |t#1| (|GcdDomain|))) - ((|elt| (|t#1| (|Fraction| |$|) |t#1|)) - (|has| |t#1| (|Field|))) - ((|integrate| (|$| |$|)) - (|has| |t#1| - (|Algebra| (|Fraction| (|Integer|))))))) - (QUOTE ( - ((|StepThrough|) (|has| |t#1| (|StepThrough|))) - ((|Eltable| - (|Fraction| |$|) - (|Fraction| |$|)) - (|has| |t#1| (|IntegralDomain|))) - ((|EuclideanDomain|) (|has| |t#1| (|Field|))) - (|additiveValuation| (|has| |t#1| (|Field|))))) - (QUOTE ( - (|Fraction| |$|) - (|NonNegativeInteger|) - (|SparseUnivariatePolynomial| |t#1|) - (|Vector| |t#1|))) - NIL)) - . #4=(|UnivariatePolynomialCategory|)))))) - . #4#) - (SETELT #1# 0 - (LIST - (QUOTE |UnivariatePolynomialCategory|) - (|devaluate| |t#1|))))))) - +(/VERSIONCHECK 2) + +(DEFPARAMETER |UnivariatePolynomialCategory;CAT| 'NIL) + +(DEFPARAMETER |UnivariatePolynomialCategory;AL| 'NIL) + +(DEFUN |UnivariatePolynomialCategory| (#0=#:G1424) + (LET (#1=#:G1425) + (COND + ((SETQ #1# + (|assoc| (|devaluate| #0#) + |UnivariatePolynomialCategory;AL|)) + (CDR #1#)) + (T (SETQ |UnivariatePolynomialCategory;AL| + (|cons5| (CONS (|devaluate| #0#) + (SETQ #1# + (|UnivariatePolynomialCategory;| + #0#))) + |UnivariatePolynomialCategory;AL|)) + #1#)))) + +(DEFUN |UnivariatePolynomialCategory;| (|t#1|) + (PROG (#0=#:G1423) + (RETURN + (PROG1 (LETT #0# + (|sublisV| + (PAIR '(|t#1|) (LIST (|devaluate| |t#1|))) + (|sublisV| + (PAIR '(#1=#:G1421 #2=#:G1422) + (LIST '(|NonNegativeInteger|) + '(|SingletonAsOrderedSet|))) + (COND + (|UnivariatePolynomialCategory;CAT|) + ('T + (LETT |UnivariatePolynomialCategory;CAT| + (|Join| + (|PolynomialCategory| '|t#1| '#1# + '#2#) + (|Eltable| '|t#1| '|t#1|) + (|Eltable| '$ '$) + (|DifferentialRing|) + (|DifferentialExtension| '|t#1|) + (|mkCategory| '|domain| + '(((|vectorise| + ((|Vector| |t#1|) $ + (|NonNegativeInteger|))) + T) + ((|makeSUP| + ((|SparseUnivariatePolynomial| + |t#1|) + $)) + T) + ((|unmakeSUP| + ($ + (|SparseUnivariatePolynomial| + |t#1|))) + T) + ((|multiplyExponents| + ($ $ (|NonNegativeInteger|))) + T) + ((|divideExponents| + ((|Union| $ "failed") $ + (|NonNegativeInteger|))) + T) + ((|monicDivide| + ((|Record| (|:| |quotient| $) + (|:| |remainder| $)) + $ $)) + T) + ((|karatsubaDivide| + ((|Record| (|:| |quotient| $) + (|:| |remainder| $)) + $ (|NonNegativeInteger|))) + T) + ((|shiftRight| + ($ $ (|NonNegativeInteger|))) + T) + ((|shiftLeft| + ($ $ (|NonNegativeInteger|))) + T) + ((|pseudoRemainder| ($ $ $)) T) + ((|differentiate| + ($ $ (|Mapping| |t#1| |t#1|) + $)) + T) + ((|discriminant| (|t#1| $)) + (|has| |t#1| + (|CommutativeRing|))) + ((|resultant| (|t#1| $ $)) + (|has| |t#1| + (|CommutativeRing|))) + ((|elt| + ((|Fraction| $) + (|Fraction| $) + (|Fraction| $))) + (|has| |t#1| + (|IntegralDomain|))) + ((|order| + ((|NonNegativeInteger|) $ $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|subResultantGcd| ($ $ $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|composite| + ((|Union| $ "failed") $ $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|composite| + ((|Union| (|Fraction| $) + "failed") + (|Fraction| $) $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|pseudoQuotient| ($ $ $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|pseudoDivide| + ((|Record| (|:| |coef| |t#1|) + (|:| |quotient| $) + (|:| |remainder| $)) + $ $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|separate| + ((|Record| + (|:| |primePart| $) + (|:| |commonPart| $)) + $ $)) + (|has| |t#1| (|GcdDomain|))) + ((|elt| + (|t#1| (|Fraction| $) |t#1|)) + (|has| |t#1| (|Field|))) + ((|integrate| ($ $)) + (|has| |t#1| + (|Algebra| + (|Fraction| (|Integer|)))))) + '(((|StepThrough|) + (|has| |t#1| (|StepThrough|))) + ((|Eltable| (|Fraction| $) + (|Fraction| $)) + (|has| |t#1| + (|IntegralDomain|))) + ((|EuclideanDomain|) + (|has| |t#1| (|Field|))) + (|additiveValuation| + (|has| |t#1| (|Field|)))) + '((|Fraction| $) + (|NonNegativeInteger|) + (|SparseUnivariatePolynomial| + |t#1|) + (|Vector| |t#1|)) + NIL)) + . #3=(|UnivariatePolynomialCategory|)))))) . #3#) + (SETELT #0# 0 + (LIST '|UnivariatePolynomialCategory| + (|devaluate| |t#1|))))))) @ \section{UPOLYC-.lsp BOOTSTRAP} {\bf UPOLYC-} depends on {\bf UPOLYC}. We need to break this cycle to build @@ -3277,1377 +3148,1151 @@ Note that this code is not included in the generated catdef.spad file. <<UPOLYC-.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) +(/VERSIONCHECK 2) -(DEFUN |UPOLYC-;variables;SL;1| (|p| |$|) - (COND - ((OR - (SPADCALL |p| (QREFELT |$| 9)) - (ZEROP (SPADCALL |p| (QREFELT |$| 11)))) +(DEFUN |UPOLYC-;variables;SL;1| (|p| $) + (COND + ((OR (SPADCALL |p| (QREFELT $ 9)) + (ZEROP (SPADCALL |p| (QREFELT $ 11)))) NIL) - ((QUOTE T) (LIST (SPADCALL (QREFELT |$| 13)))))) + ('T (LIST (SPADCALL (QREFELT $ 13)))))) -(DEFUN |UPOLYC-;degree;SSaosNni;2| (|p| |v| |$|) - (SPADCALL |p| (QREFELT |$| 11))) +(DEFUN |UPOLYC-;degree;SSaosNni;2| (|p| |v| $) + (SPADCALL |p| (QREFELT $ 11))) -(DEFUN |UPOLYC-;totalDegree;SLNni;3| (|p| |lv| |$|) - (COND ((NULL |lv|) 0) ((QUOTE T) (SPADCALL |p| (QREFELT |$| 17))))) +(DEFUN |UPOLYC-;totalDegree;SLNni;3| (|p| |lv| $) + (COND ((NULL |lv|) 0) ('T (SPADCALL |p| (QREFELT $ 17))))) -(DEFUN |UPOLYC-;degree;SLL;4| (|p| |lv| |$|) - (COND ((NULL |lv|) NIL) ((QUOTE T) (LIST (SPADCALL |p| (QREFELT |$| 11)))))) +(DEFUN |UPOLYC-;degree;SLL;4| (|p| |lv| $) + (COND ((NULL |lv|) NIL) ('T (LIST (SPADCALL |p| (QREFELT $ 11)))))) -(DEFUN |UPOLYC-;eval;SLLS;5| (|p| |lv| |lq| |$|) - (COND +(DEFUN |UPOLYC-;eval;SLLS;5| (|p| |lv| |lq| $) + (COND ((NULL |lv|) |p|) - ((NULL (NULL (CDR |lv|))) - (|error| "can only eval a univariate polynomial once")) - ((QUOTE T) - (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |lq|) (QREFELT |$| 21))))) + ((NULL (NULL (CDR |lv|))) + (|error| "can only eval a univariate polynomial once")) + ('T + (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |lq|) + (QREFELT $ 21))))) -(DEFUN |UPOLYC-;eval;SSaos2S;6| (|p| |v| |q| |$|) - (SPADCALL |p| |q| (QREFELT |$| 24))) +(DEFUN |UPOLYC-;eval;SSaos2S;6| (|p| |v| |q| $) + (SPADCALL |p| |q| (QREFELT $ 24))) -(DEFUN |UPOLYC-;eval;SLLS;7| (|p| |lv| |lr| |$|) - (COND +(DEFUN |UPOLYC-;eval;SLLS;7| (|p| |lv| |lr| $) + (COND ((NULL |lv|) |p|) - ((NULL (NULL (CDR |lv|))) - (|error| "can only eval a univariate polynomial once")) - ((QUOTE T) - (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |lr|) (QREFELT |$| 26))))) + ((NULL (NULL (CDR |lv|))) + (|error| "can only eval a univariate polynomial once")) + ('T + (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |lr|) + (QREFELT $ 26))))) -(DEFUN |UPOLYC-;eval;SSaosRS;8| (|p| |v| |r| |$|) - (SPADCALL (SPADCALL |p| |r| (QREFELT |$| 29)) (QREFELT |$| 30))) +(DEFUN |UPOLYC-;eval;SSaosRS;8| (|p| |v| |r| $) + (SPADCALL (SPADCALL |p| |r| (QREFELT $ 29)) (QREFELT $ 30))) -(DEFUN |UPOLYC-;eval;SLS;9| (|p| |le| |$|) - (COND +(DEFUN |UPOLYC-;eval;SLS;9| (|p| |le| $) + (COND ((NULL |le|) |p|) - ((NULL (NULL (CDR |le|))) - (|error| "can only eval a univariate polynomial once")) - ((QUOTE T) - (COND - ((QEQCAR - (SPADCALL - (SPADCALL (|SPADfirst| |le|) (QREFELT |$| 33)) - (QREFELT |$| 35)) - 1) - |p|) - ((QUOTE T) - (SPADCALL |p| - (SPADCALL (|SPADfirst| |le|) (QREFELT |$| 36)) - (QREFELT |$| 24))))))) - -(DEFUN |UPOLYC-;mainVariable;SU;10| (|p| |$|) - (COND - ((ZEROP (SPADCALL |p| (QREFELT |$| 11))) (CONS 1 "failed")) - ((QUOTE T) (CONS 0 (SPADCALL (QREFELT |$| 13)))))) - -(DEFUN |UPOLYC-;minimumDegree;SSaosNni;11| (|p| |v| |$|) - (SPADCALL |p| (QREFELT |$| 40))) - -(DEFUN |UPOLYC-;minimumDegree;SLL;12| (|p| |lv| |$|) - (COND ((NULL |lv|) NIL) ((QUOTE T) (LIST (SPADCALL |p| (QREFELT |$| 40)))))) - -(DEFUN |UPOLYC-;monomial;SSaosNniS;13| (|p| |v| |n| |$|) - (SPADCALL - (CONS (FUNCTION |UPOLYC-;monomial;SSaosNniS;13!0|) (VECTOR |$| |n|)) - |p| - (QREFELT |$| 45))) - -(DEFUN |UPOLYC-;monomial;SSaosNniS;13!0| (|#1| |$$|) - (SPADCALL |#1| (QREFELT |$$| 1) (QREFELT (QREFELT |$$| 0) 43))) - -(DEFUN |UPOLYC-;coerce;SaosS;14| (|v| |$|) - (SPADCALL (|spadConstant| |$| 48) 1 (QREFELT |$| 49))) - -(DEFUN |UPOLYC-;makeSUP;SSup;15| (|p| |$|) - (COND - ((SPADCALL |p| (QREFELT |$| 9)) (|spadConstant| |$| 52)) - ((QUOTE T) - (SPADCALL - (SPADCALL - (SPADCALL |p| (QREFELT |$| 53)) - (SPADCALL |p| (QREFELT |$| 11)) - (QREFELT |$| 54)) - (SPADCALL - (SPADCALL |p| (QREFELT |$| 55)) - (QREFELT |$| 56)) - (QREFELT |$| 57))))) - -(DEFUN |UPOLYC-;unmakeSUP;SupS;16| (|sp| |$|) - (COND - ((SPADCALL |sp| (QREFELT |$| 59)) (|spadConstant| |$| 60)) - ((QUOTE T) - (SPADCALL - (SPADCALL - (SPADCALL |sp| (QREFELT |$| 61)) - (SPADCALL |sp| (QREFELT |$| 62)) - (QREFELT |$| 49)) - (SPADCALL (SPADCALL |sp| (QREFELT |$| 63)) (QREFELT |$| 64)) - (QREFELT |$| 65))))) - -(DEFUN |UPOLYC-;karatsubaDivide;SNniR;17| (|p| |n| |$|) - (SPADCALL |p| - (SPADCALL (|spadConstant| |$| 48) |n| (QREFELT |$| 49)) - (QREFELT |$| 68))) - -(DEFUN |UPOLYC-;shiftRight;SNniS;18| (|p| |n| |$|) - (QCAR - (SPADCALL |p| - (SPADCALL (|spadConstant| |$| 48) |n| (QREFELT |$| 49)) - (QREFELT |$| 68)))) - -(DEFUN |UPOLYC-;shiftLeft;SNniS;19| (|p| |n| |$|) - (SPADCALL |p| - (SPADCALL (|spadConstant| |$| 48) |n| (QREFELT |$| 49)) (QREFELT |$| 71))) - -(DEFUN |UPOLYC-;solveLinearPolynomialEquation;LSupU;20| (|lpp| |pp| |$|) - (SPADCALL |lpp| |pp| (QREFELT |$| 77))) - -(DEFUN |UPOLYC-;factorPolynomial;SupF;21| (|pp| |$|) - (SPADCALL |pp| (QREFELT |$| 83))) - -(DEFUN |UPOLYC-;factorSquareFreePolynomial;SupF;22| (|pp| |$|) - (SPADCALL |pp| (QREFELT |$| 86))) - -(DEFUN |UPOLYC-;factor;SF;23| (|p| |$|) - (PROG (|ansR| #1=#:G103310 |w| #2=#:G103311) - (RETURN - (SEQ - (COND - ((ZEROP (SPADCALL |p| (QREFELT |$| 11))) - (SEQ - (LETT |ansR| - (SPADCALL - (SPADCALL |p| (QREFELT |$| 53)) - (QREFELT |$| 89)) - |UPOLYC-;factor;SF;23|) - (EXIT - (SPADCALL - (SPADCALL - (SPADCALL |ansR| (QREFELT |$| 91)) - (QREFELT |$| 30)) - (PROGN - (LETT #1# NIL |UPOLYC-;factor;SF;23|) - (SEQ - (LETT |w| NIL |UPOLYC-;factor;SF;23|) - (LETT #2# - (SPADCALL |ansR| (QREFELT |$| 95)) - |UPOLYC-;factor;SF;23|) - G190 - (COND - ((OR - (ATOM #2#) - (PROGN - (LETT |w| (CAR #2#) |UPOLYC-;factor;SF;23|) - NIL)) - (GO G191))) - (SEQ - (EXIT - (LETT #1# - (CONS - (VECTOR - (QVELT |w| 0) - (SPADCALL (QVELT |w| 1) (QREFELT |$| 30)) - (QVELT |w| 2)) - #1#) - |UPOLYC-;factor;SF;23|))) - (LETT #2# (CDR #2#) |UPOLYC-;factor;SF;23|) - (GO G190) - G191 - (EXIT (NREVERSE0 #1#)))) - (QREFELT |$| 99))))) - ((QUOTE T) - (SPADCALL - (ELT |$| 64) - (SPADCALL (SPADCALL |p| (QREFELT |$| 56)) (QREFELT |$| 100)) - (QREFELT |$| 104)))))))) - -(DEFUN |UPOLYC-;vectorise;SNniV;24| (|p| |n| |$|) - (PROG (|v| |m| |i| #1=#:G103316 #2=#:G103312) - (RETURN - (SEQ - (LETT |m| - (SPADCALL - (LETT |v| - (SPADCALL |n| (|spadConstant| |$| 106) (QREFELT |$| 108)) - |UPOLYC-;vectorise;SNniV;24|) - (QREFELT |$| 110)) - |UPOLYC-;vectorise;SNniV;24|) - (SEQ - (LETT |i| - (SPADCALL |v| (QREFELT |$| 110)) - |UPOLYC-;vectorise;SNniV;24|) - (LETT #1# (QVSIZE |v|) |UPOLYC-;vectorise;SNniV;24|) - G190 - (COND ((|>| |i| #1#) (GO G191))) - (SEQ - (EXIT - (SPADCALL |v| |i| - (SPADCALL |p| - (PROG1 - (LETT #2# (|-| |i| |m|) |UPOLYC-;vectorise;SNniV;24|) - (|check-subtype| - (|>=| #2# 0) - (QUOTE (|NonNegativeInteger|)) - #2#)) - (QREFELT |$| 111)) - (QREFELT |$| 112)))) - (LETT |i| (|+| |i| 1) |UPOLYC-;vectorise;SNniV;24|) - (GO G190) - G191 - (EXIT NIL)) - (EXIT |v|))))) - -(DEFUN |UPOLYC-;retract;SR;25| (|p| |$|) - (COND - ((SPADCALL |p| (QREFELT |$| 9)) (|spadConstant| |$| 106)) - ((ZEROP (SPADCALL |p| (QREFELT |$| 11))) (SPADCALL |p| (QREFELT |$| 53))) - ((QUOTE T) (|error| "Polynomial is not of degree 0")))) - -(DEFUN |UPOLYC-;retractIfCan;SU;26| (|p| |$|) - (COND - ((SPADCALL |p| (QREFELT |$| 9)) (CONS 0 (|spadConstant| |$| 106))) - ((ZEROP (SPADCALL |p| (QREFELT |$| 11))) - (CONS 0 (SPADCALL |p| (QREFELT |$| 53)))) - ((QUOTE T) (CONS 1 "failed")))) - -(DEFUN |UPOLYC-;init;S;27| (|$|) - (SPADCALL (|spadConstant| |$| 117) (QREFELT |$| 30))) - -(DEFUN |UPOLYC-;nextItemInner| (|n| |$|) - (PROG (|nn| |n1| |n2| #1=#:G103337 |n3|) - (RETURN - (SEQ - (COND - ((SPADCALL |n| (QREFELT |$| 9)) - (CONS - 0 - (SPADCALL - (PROG2 - (LETT #1# - (SPADCALL (|spadConstant| |$| 106) (QREFELT |$| 120)) - |UPOLYC-;nextItemInner|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 7) #1#)) - (QREFELT |$| 30)))) - ((ZEROP (SPADCALL |n| (QREFELT |$| 11))) - (SEQ - (LETT |nn| - (SPADCALL (SPADCALL |n| (QREFELT |$| 53)) (QREFELT |$| 120)) - |UPOLYC-;nextItemInner|) - (EXIT - (COND - ((QEQCAR |nn| 1) (CONS 1 "failed")) - ((QUOTE T) - (CONS 0 (SPADCALL (QCDR |nn|) (QREFELT |$| 30)))))))) - ((QUOTE T) - (SEQ - (LETT |n1| - (SPADCALL |n| (QREFELT |$| 55)) - |UPOLYC-;nextItemInner|) - (LETT |n2| - (|UPOLYC-;nextItemInner| |n1| |$|) - |UPOLYC-;nextItemInner|) - (EXIT - (COND - ((QEQCAR |n2| 0) - (CONS - 0 - (SPADCALL - (SPADCALL - (SPADCALL |n| (QREFELT |$| 53)) - (SPADCALL |n| (QREFELT |$| 11)) - (QREFELT |$| 49)) - (QCDR |n2|) - (QREFELT |$| 65)))) - ((|<| - (|+| 1 (SPADCALL |n1| (QREFELT |$| 11))) - (SPADCALL |n| (QREFELT |$| 11))) - (CONS - 0 - (SPADCALL - (SPADCALL - (SPADCALL |n| (QREFELT |$| 53)) - (SPADCALL |n| (QREFELT |$| 11)) - (QREFELT |$| 49)) - (SPADCALL - (PROG2 - (LETT #1# - (SPADCALL - (|spadConstant| |$| 117) - (QREFELT |$| 120)) - |UPOLYC-;nextItemInner|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 7) #1#)) - (|+| 1 (SPADCALL |n1| (QREFELT |$| 11))) - (QREFELT |$| 49)) - (QREFELT |$| 65)))) - ((QUOTE T) - (SEQ - (LETT |n3| - (SPADCALL - (SPADCALL |n| (QREFELT |$| 53)) - (QREFELT |$| 120)) - |UPOLYC-;nextItemInner|) - (EXIT - (COND - ((QEQCAR |n3| 1) (CONS 1 "failed")) - ((QUOTE T) - (CONS - 0 - (SPADCALL - (QCDR |n3|) - (SPADCALL |n| (QREFELT |$| 11)) - (QREFELT |$| 49))))))))))))))))) - -(DEFUN |UPOLYC-;nextItem;SU;29| (|n| |$|) - (PROG (|n1| #1=#:G103350) - (RETURN - (SEQ - (LETT |n1| (|UPOLYC-;nextItemInner| |n| |$|) |UPOLYC-;nextItem;SU;29|) - (EXIT - (COND - ((QEQCAR |n1| 1) - (CONS - 0 - (SPADCALL - (PROG2 - (LETT #1# - (SPADCALL (|spadConstant| |$| 117) (QREFELT |$| 120)) - |UPOLYC-;nextItem;SU;29|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 7) #1#)) - (|+| 1 (SPADCALL |n| (QREFELT |$| 11))) - (QREFELT |$| 49)))) - ((QUOTE T) |n1|))))))) - -(DEFUN |UPOLYC-;content;SSaosS;30| (|p| |v| |$|) - (SPADCALL (SPADCALL |p| (QREFELT |$| 123)) (QREFELT |$| 30))) - -(DEFUN |UPOLYC-;primeFactor| (|p| |q| |$|) - (PROG (#1=#:G103356 |p1|) - (RETURN - (SEQ - (LETT |p1| - (PROG2 - (LETT #1# - (SPADCALL |p| - (SPADCALL |p| |q| (QREFELT |$| 125)) - (QREFELT |$| 126)) - |UPOLYC-;primeFactor|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#)) - |UPOLYC-;primeFactor|) - (EXIT - (COND - ((SPADCALL |p1| |p| (QREFELT |$| 127)) |p|) - ((QUOTE T) (|UPOLYC-;primeFactor| |p1| |q| |$|)))))))) - -(DEFUN |UPOLYC-;separate;2SR;32| (|p| |q| |$|) - (PROG (|a| #1=#:G103362) - (RETURN - (SEQ - (LETT |a| - (|UPOLYC-;primeFactor| |p| |q| |$|) - |UPOLYC-;separate;2SR;32|) - (EXIT - (CONS - |a| - (PROG2 - (LETT #1# - (SPADCALL |p| |a| (QREFELT |$| 126)) - |UPOLYC-;separate;2SR;32|) - (QCDR #1#) - (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#)))))))) - -(DEFUN |UPOLYC-;differentiate;SM2S;33| (|x| |deriv| |x'| |$|) - (PROG (|dg| |lc| #1=#:G103367 |d|) - (RETURN - (SEQ - (LETT |d| (|spadConstant| |$| 60) |UPOLYC-;differentiate;SM2S;33|) - (SEQ G190 - (COND - ((NULL - (|<| 0 - (LETT |dg| - (SPADCALL |x| (QREFELT |$| 11)) - |UPOLYC-;differentiate;SM2S;33|))) - (GO G191))) - (SEQ - (LETT |lc| - (SPADCALL |x| (QREFELT |$| 53)) - |UPOLYC-;differentiate;SM2S;33|) - (LETT |d| - (SPADCALL - (SPADCALL |d| - (SPADCALL |x'| - (SPADCALL - (SPADCALL |dg| |lc| (QREFELT |$| 131)) - (PROG1 - (LETT #1# (|-| |dg| 1) |UPOLYC-;differentiate;SM2S;33|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - (QREFELT |$| 49)) - (QREFELT |$| 71)) - (QREFELT |$| 65)) - (SPADCALL - (SPADCALL |lc| |deriv|) - |dg| - (QREFELT |$| 49)) - (QREFELT |$| 65)) - |UPOLYC-;differentiate;SM2S;33|) - (EXIT - (LETT |x| - (SPADCALL |x| (QREFELT |$| 55)) - |UPOLYC-;differentiate;SM2S;33|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT - (SPADCALL |d| - (SPADCALL - (SPADCALL - (SPADCALL |x| (QREFELT |$| 53)) - |deriv|) - (QREFELT |$| 30)) - (QREFELT |$| 65))))))) - -(DEFUN |UPOLYC-;ncdiff| (|n| |x'| |$|) - (PROG (#1=#:G103385 |n1|) - (RETURN - (COND - ((ZEROP |n|) (|spadConstant| |$| 60)) - ((ZEROP - (LETT |n1| - (PROG1 - (LETT #1# (|-| |n| 1) |UPOLYC-;ncdiff|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - |UPOLYC-;ncdiff|)) - |x'|) - ((QUOTE T) - (SPADCALL - (SPADCALL |x'| - (SPADCALL (|spadConstant| |$| 48) |n1| (QREFELT |$| 49)) - (QREFELT |$| 71)) - (SPADCALL - (SPADCALL (|spadConstant| |$| 48) 1 (QREFELT |$| 49)) - (|UPOLYC-;ncdiff| |n1| |x'| |$|) - (QREFELT |$| 71)) - (QREFELT |$| 65))))))) - -(DEFUN |UPOLYC-;differentiate;SM2S;35| (|x| |deriv| |x'| |$|) - (PROG (|dg| |lc| |d|) - (RETURN - (SEQ - (LETT |d| (|spadConstant| |$| 60) |UPOLYC-;differentiate;SM2S;35|) - (SEQ G190 - (COND - ((NULL - (|<| 0 - (LETT |dg| - (SPADCALL |x| (QREFELT |$| 11)) - |UPOLYC-;differentiate;SM2S;35|))) - (GO G191))) - (SEQ - (LETT |lc| - (SPADCALL |x| (QREFELT |$| 53)) - |UPOLYC-;differentiate;SM2S;35|) - (LETT |d| - (SPADCALL - (SPADCALL |d| - (SPADCALL - (SPADCALL |lc| |deriv|) - |dg| - (QREFELT |$| 49)) - (QREFELT |$| 65)) - (SPADCALL |lc| - (|UPOLYC-;ncdiff| |dg| |x'| |$|) - (QREFELT |$| 134)) - (QREFELT |$| 65)) - |UPOLYC-;differentiate;SM2S;35|) - (EXIT - (LETT |x| - (SPADCALL |x| (QREFELT |$| 55)) - |UPOLYC-;differentiate;SM2S;35|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT - (SPADCALL |d| - (SPADCALL - (SPADCALL (SPADCALL |x| (QREFELT |$| 53)) |deriv|) - (QREFELT |$| 30)) - (QREFELT |$| 65))))))) - -(DEFUN |UPOLYC-;differentiate;SMS;36| (|x| |deriv| |$|) - (SPADCALL |x| |deriv| (|spadConstant| |$| 47) (QREFELT |$| 135))) - -(DEFUN |UPOLYC-;differentiate;2S;37| (|x| |$|) - (PROG (|dg| #1=#:G103394 |d|) - (RETURN - (SEQ - (LETT |d| (|spadConstant| |$| 60) |UPOLYC-;differentiate;2S;37|) - (SEQ G190 - (COND - ((NULL - (|<| 0 - (LETT |dg| - (SPADCALL |x| (QREFELT |$| 11)) - |UPOLYC-;differentiate;2S;37|))) - (GO G191))) - (SEQ - (LETT |d| - (SPADCALL |d| - (SPADCALL - (SPADCALL |dg| - (SPADCALL |x| (QREFELT |$| 53)) (QREFELT |$| 131)) - (PROG1 - (LETT #1# (|-| |dg| 1) |UPOLYC-;differentiate;2S;37|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - (QREFELT |$| 49)) - (QREFELT |$| 65)) - |UPOLYC-;differentiate;2S;37|) - (EXIT - (LETT |x| - (SPADCALL |x| (QREFELT |$| 55)) - |UPOLYC-;differentiate;2S;37|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT |d|))))) - -(DEFUN |UPOLYC-;differentiate;SSaosS;38| (|x| |v| |$|) - (SPADCALL |x| (QREFELT |$| 138))) - -(DEFUN |UPOLYC-;elt;3F;39| (|g| |f| |$|) - (SPADCALL - (SPADCALL - (SPADCALL |g| (QREFELT |$| 141)) - |f| - (QREFELT |$| 143)) - (SPADCALL (SPADCALL |g| (QREFELT |$| 144)) |f| (QREFELT |$| 143)) - (QREFELT |$| 145))) - -(DEFUN |UPOLYC-;pseudoQuotient;3S;40| (|p| |q| |$|) - (PROG (|n| #1=#:G103440 #2=#:G103442) - (RETURN - (SEQ - (LETT |n| - (|+| - (|-| - (SPADCALL |p| (QREFELT |$| 11)) - (SPADCALL |q| (QREFELT |$| 11))) 1) - |UPOLYC-;pseudoQuotient;3S;40|) - (EXIT - (COND - ((|<| |n| 1) (|spadConstant| |$| 60)) - ((QUOTE T) - (PROG2 - (LETT #2# - (SPADCALL - (SPADCALL - (SPADCALL - (SPADCALL - (SPADCALL |q| (QREFELT |$| 53)) - (PROG1 - (LETT #1# |n| |UPOLYC-;pseudoQuotient;3S;40|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - (QREFELT |$| 147)) - |p| - (QREFELT |$| 134)) - (SPADCALL |p| |q| (QREFELT |$| 148)) - (QREFELT |$| 149)) - |q| - (QREFELT |$| 126)) - |UPOLYC-;pseudoQuotient;3S;40|) - (QCDR #2#) - (|check-union| (QEQCAR #2# 0) (QREFELT |$| 6) #2#))))))))) - -(DEFUN |UPOLYC-;pseudoDivide;2SR;41| (|p| |q| |$|) - (PROG (|n| |prem| #1=#:G103448 |lc| #2=#:G103450) - (RETURN - (SEQ - (LETT |n| - (|+| - (|-| - (SPADCALL |p| (QREFELT |$| 11)) - (SPADCALL |q| (QREFELT |$| 11))) 1) - |UPOLYC-;pseudoDivide;2SR;41|) - (EXIT - (COND - ((|<| |n| 1) - (VECTOR (|spadConstant| |$| 48) (|spadConstant| |$| 60) |p|)) - ((QUOTE T) - (SEQ - (LETT |prem| - (SPADCALL |p| |q| (QREFELT |$| 148)) - |UPOLYC-;pseudoDivide;2SR;41|) - (LETT |lc| - (SPADCALL - (SPADCALL |q| (QREFELT |$| 53)) - (PROG1 - (LETT #1# |n| |UPOLYC-;pseudoDivide;2SR;41|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) #1#)) - (QREFELT |$| 147)) - |UPOLYC-;pseudoDivide;2SR;41|) - (EXIT - (VECTOR |lc| - (PROG2 - (LETT #2# - (SPADCALL - (SPADCALL - (SPADCALL |lc| |p| (QREFELT |$| 134)) - |prem| - (QREFELT |$| 149)) - |q| - (QREFELT |$| 126)) - |UPOLYC-;pseudoDivide;2SR;41|) - (QCDR #2#) - (|check-union| (QEQCAR #2# 0) (QREFELT |$| 6) #2#)) - |prem|)))))))))) - -(DEFUN |UPOLYC-;composite;FSU;42| (|f| |q| |$|) - (PROG (|n| |d|) - (RETURN - (SEQ - (LETT |n| - (SPADCALL (SPADCALL |f| (QREFELT |$| 141)) |q| (QREFELT |$| 153)) - |UPOLYC-;composite;FSU;42|) - (EXIT - (COND - ((QEQCAR |n| 1) (CONS 1 "failed")) - ((QUOTE T) - (SEQ - (LETT |d| - (SPADCALL - (SPADCALL |f| (QREFELT |$| 144)) |q| (QREFELT |$| 153)) - |UPOLYC-;composite;FSU;42|) - (EXIT - (COND - ((QEQCAR |d| 1) (CONS 1 "failed")) - ((QUOTE T) - (CONS - 0 - (SPADCALL - (QCDR |n|) - (QCDR |d|) - (QREFELT |$| 154)))))))))))))) - -(DEFUN |UPOLYC-;composite;2SU;43| (|p| |q| |$|) - (PROG (|cqr| |v| |u| |w| #1=#:G103476) - (RETURN - (SEQ - (COND - ((SPADCALL |p| (QREFELT |$| 157)) (CONS 0 |p|)) - ((QUOTE T) - (SEQ - (EXIT - (SEQ - (LETT |cqr| - (SPADCALL |p| |q| (QREFELT |$| 158)) - |UPOLYC-;composite;2SU;43|) - (COND - ((SPADCALL (QVELT |cqr| 2) (QREFELT |$| 157)) - (SEQ - (LETT |v| - (SPADCALL - (QVELT |cqr| 2) - (QVELT |cqr| 0) - (QREFELT |$| 159)) - |UPOLYC-;composite;2SU;43|) - (EXIT - (COND - ((QEQCAR |v| 0) - (SEQ - (LETT |u| - (SPADCALL - (QVELT |cqr| 1) - |q| - (QREFELT |$| 153)) - |UPOLYC-;composite;2SU;43|) - (EXIT - (COND - ((QEQCAR |u| 0) - (SEQ - (LETT |w| - (SPADCALL - (QCDR |u|) - (QVELT |cqr| 0) - (QREFELT |$| 159)) - |UPOLYC-;composite;2SU;43|) - (EXIT - (COND - ((QEQCAR |w| 0) - (PROGN - (LETT #1# - (CONS - 0 - (SPADCALL - (QCDR |v|) - (SPADCALL - (SPADCALL - (|spadConstant| |$| 48) - 1 - (QREFELT |$| 49)) - (QCDR |w|) - (QREFELT |$| 71)) - (QREFELT |$| 65))) - |UPOLYC-;composite;2SU;43|) - (GO #1#)))))))))))))))) - (EXIT (CONS 1 "failed")))) - #1# - (EXIT #1#)))))))) - -(DEFUN |UPOLYC-;elt;S2F;44| (|p| |f| |$|) - (PROG (|n| #1=#:G103483 |ans|) - (RETURN - (SEQ - (COND - ((SPADCALL |p| (QREFELT |$| 9)) (|spadConstant| |$| 161)) - ((QUOTE T) - (SEQ - (LETT |ans| - (SPADCALL - (SPADCALL (SPADCALL |p| (QREFELT |$| 53)) (QREFELT |$| 30)) - (QREFELT |$| 162)) - |UPOLYC-;elt;S2F;44|) - (LETT |n| (SPADCALL |p| (QREFELT |$| 11)) |UPOLYC-;elt;S2F;44|) - (SEQ G190 - (COND - ((NULL - (COND - ((SPADCALL - (LETT |p| - (SPADCALL |p| (QREFELT |$| 55)) - |UPOLYC-;elt;S2F;44|) - (QREFELT |$| 9)) - (QUOTE NIL)) - ((QUOTE T) (QUOTE T)))) + ((NULL (NULL (CDR |le|))) + (|error| "can only eval a univariate polynomial once")) + ('T + (COND + ((QEQCAR (SPADCALL (SPADCALL (|SPADfirst| |le|) (QREFELT $ 33)) + (QREFELT $ 35)) + 1) + |p|) + ('T + (SPADCALL |p| (SPADCALL (|SPADfirst| |le|) (QREFELT $ 36)) + (QREFELT $ 24))))))) + +(DEFUN |UPOLYC-;mainVariable;SU;10| (|p| $) + (COND + ((ZEROP (SPADCALL |p| (QREFELT $ 11))) (CONS 1 "failed")) + ('T (CONS 0 (SPADCALL (QREFELT $ 13)))))) + +(DEFUN |UPOLYC-;minimumDegree;SSaosNni;11| (|p| |v| $) + (SPADCALL |p| (QREFELT $ 40))) + +(DEFUN |UPOLYC-;minimumDegree;SLL;12| (|p| |lv| $) + (COND ((NULL |lv|) NIL) ('T (LIST (SPADCALL |p| (QREFELT $ 40)))))) + +(DEFUN |UPOLYC-;monomial;SSaosNniS;13| (|p| |v| |n| $) + (SPADCALL (CONS #'|UPOLYC-;monomial;SSaosNniS;13!0| (VECTOR $ |n|)) + |p| (QREFELT $ 45))) + +(DEFUN |UPOLYC-;monomial;SSaosNniS;13!0| (|#1| $$) + (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 43))) + +(DEFUN |UPOLYC-;coerce;SaosS;14| (|v| $) + (SPADCALL (|spadConstant| $ 48) 1 (QREFELT $ 49))) + +(DEFUN |UPOLYC-;makeSUP;SSup;15| (|p| $) + (COND + ((SPADCALL |p| (QREFELT $ 9)) (|spadConstant| $ 52)) + ('T + (SPADCALL + (SPADCALL (SPADCALL |p| (QREFELT $ 53)) + (SPADCALL |p| (QREFELT $ 11)) (QREFELT $ 54)) + (SPADCALL (SPADCALL |p| (QREFELT $ 55)) (QREFELT $ 56)) + (QREFELT $ 57))))) + +(DEFUN |UPOLYC-;unmakeSUP;SupS;16| (|sp| $) + (COND + ((SPADCALL |sp| (QREFELT $ 59)) (|spadConstant| $ 60)) + ('T + (SPADCALL + (SPADCALL (SPADCALL |sp| (QREFELT $ 61)) + (SPADCALL |sp| (QREFELT $ 62)) (QREFELT $ 49)) + (SPADCALL (SPADCALL |sp| (QREFELT $ 63)) (QREFELT $ 64)) + (QREFELT $ 65))))) + +(DEFUN |UPOLYC-;karatsubaDivide;SNniR;17| (|p| |n| $) + (SPADCALL |p| (SPADCALL (|spadConstant| $ 48) |n| (QREFELT $ 49)) + (QREFELT $ 68))) + +(DEFUN |UPOLYC-;shiftRight;SNniS;18| (|p| |n| $) + (QCAR (SPADCALL |p| + (SPADCALL (|spadConstant| $ 48) |n| (QREFELT $ 49)) + (QREFELT $ 68)))) + +(DEFUN |UPOLYC-;shiftLeft;SNniS;19| (|p| |n| $) + (SPADCALL |p| (SPADCALL (|spadConstant| $ 48) |n| (QREFELT $ 49)) + (QREFELT $ 71))) + +(DEFUN |UPOLYC-;solveLinearPolynomialEquation;LSupU;20| (|lpp| |pp| $) + (SPADCALL |lpp| |pp| (QREFELT $ 77))) + +(DEFUN |UPOLYC-;factorPolynomial;SupF;21| (|pp| $) + (SPADCALL |pp| (QREFELT $ 83))) + +(DEFUN |UPOLYC-;factorSquareFreePolynomial;SupF;22| (|pp| $) + (SPADCALL |pp| (QREFELT $ 86))) + +(DEFUN |UPOLYC-;factor;SF;23| (|p| $) + (PROG (|ansR| #0=#:G1509 |w| #1=#:G1510) + (RETURN + (SEQ (COND + ((ZEROP (SPADCALL |p| (QREFELT $ 11))) + (SEQ (LETT |ansR| + (SPADCALL (SPADCALL |p| (QREFELT $ 53)) + (QREFELT $ 89)) + |UPOLYC-;factor;SF;23|) + (EXIT (SPADCALL + (SPADCALL (SPADCALL |ansR| (QREFELT $ 91)) + (QREFELT $ 30)) + (PROGN + (LETT #0# NIL |UPOLYC-;factor;SF;23|) + (SEQ (LETT |w| NIL + |UPOLYC-;factor;SF;23|) + (LETT #1# + (SPADCALL |ansR| (QREFELT $ 95)) + |UPOLYC-;factor;SF;23|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |w| (CAR #1#) + |UPOLYC-;factor;SF;23|) + NIL)) + (GO G191))) + (SEQ + (EXIT + (LETT #0# + (CONS + (VECTOR (QVELT |w| 0) + (SPADCALL (QVELT |w| 1) + (QREFELT $ 30)) + (QVELT |w| 2)) + #0#) + |UPOLYC-;factor;SF;23|))) + (LETT #1# (CDR #1#) + |UPOLYC-;factor;SF;23|) + (GO G190) G191 + (EXIT (NREVERSE0 #0#)))) + (QREFELT $ 99))))) + ('T + (SPADCALL (ELT $ 64) + (SPADCALL (SPADCALL |p| (QREFELT $ 56)) + (QREFELT $ 100)) + (QREFELT $ 104)))))))) + +(DEFUN |UPOLYC-;vectorise;SNniV;24| (|p| |n| $) + (PROG (|v| |m| |i| #0=#:G1515 #1=#:G1511) + (RETURN + (SEQ (LETT |m| + (SPADCALL + (LETT |v| + (SPADCALL |n| (|spadConstant| $ 106) + (QREFELT $ 108)) + |UPOLYC-;vectorise;SNniV;24|) + (QREFELT $ 110)) + |UPOLYC-;vectorise;SNniV;24|) + (SEQ (LETT |i| (SPADCALL |v| (QREFELT $ 110)) + |UPOLYC-;vectorise;SNniV;24|) + (LETT #0# (QVSIZE |v|) |UPOLYC-;vectorise;SNniV;24|) + G190 (COND ((> |i| #0#) (GO G191))) + (SEQ (EXIT (SPADCALL |v| |i| + (SPADCALL |p| + (PROG1 + (LETT #1# (- |i| |m|) + |UPOLYC-;vectorise;SNniV;24|) + (|check-subtype| (>= #1# 0) + '(|NonNegativeInteger|) + #1#)) + (QREFELT $ 111)) + (QREFELT $ 112)))) + (LETT |i| (+ |i| 1) |UPOLYC-;vectorise;SNniV;24|) + (GO G190) G191 (EXIT NIL)) + (EXIT |v|))))) + +(DEFUN |UPOLYC-;retract;SR;25| (|p| $) + (COND + ((SPADCALL |p| (QREFELT $ 9)) (|spadConstant| $ 106)) + ((ZEROP (SPADCALL |p| (QREFELT $ 11))) + (SPADCALL |p| (QREFELT $ 53))) + ('T (|error| "Polynomial is not of degree 0")))) + +(DEFUN |UPOLYC-;retractIfCan;SU;26| (|p| $) + (COND + ((SPADCALL |p| (QREFELT $ 9)) (CONS 0 (|spadConstant| $ 106))) + ((ZEROP (SPADCALL |p| (QREFELT $ 11))) + (CONS 0 (SPADCALL |p| (QREFELT $ 53)))) + ('T (CONS 1 "failed")))) + +(DEFUN |UPOLYC-;init;S;27| ($) + (SPADCALL (|spadConstant| $ 117) (QREFELT $ 30))) + +(DEFUN |UPOLYC-;nextItemInner| (|n| $) + (PROG (|nn| |n1| |n2| #0=#:G1536 |n3|) + (RETURN + (SEQ (COND + ((SPADCALL |n| (QREFELT $ 9)) + (CONS 0 + (SPADCALL + (PROG2 (LETT #0# + (SPADCALL (|spadConstant| $ 106) + (QREFELT $ 120)) + |UPOLYC-;nextItemInner|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 7) + #0#)) + (QREFELT $ 30)))) + ((ZEROP (SPADCALL |n| (QREFELT $ 11))) + (SEQ (LETT |nn| + (SPADCALL (SPADCALL |n| (QREFELT $ 53)) + (QREFELT $ 120)) + |UPOLYC-;nextItemInner|) + (EXIT (COND + ((QEQCAR |nn| 1) (CONS 1 "failed")) + ('T + (CONS 0 + (SPADCALL (QCDR |nn|) (QREFELT $ 30)))))))) + ('T + (SEQ (LETT |n1| (SPADCALL |n| (QREFELT $ 55)) + |UPOLYC-;nextItemInner|) + (LETT |n2| (|UPOLYC-;nextItemInner| |n1| $) + |UPOLYC-;nextItemInner|) + (EXIT (COND + ((QEQCAR |n2| 0) + (CONS 0 + (SPADCALL + (SPADCALL + (SPADCALL |n| (QREFELT $ 53)) + (SPADCALL |n| (QREFELT $ 11)) + (QREFELT $ 49)) + (QCDR |n2|) (QREFELT $ 65)))) + ((< (+ 1 (SPADCALL |n1| (QREFELT $ 11))) + (SPADCALL |n| (QREFELT $ 11))) + (CONS 0 + (SPADCALL + (SPADCALL + (SPADCALL |n| (QREFELT $ 53)) + (SPADCALL |n| (QREFELT $ 11)) + (QREFELT $ 49)) + (SPADCALL + (PROG2 + (LETT #0# + (SPADCALL + (|spadConstant| $ 117) + (QREFELT $ 120)) + |UPOLYC-;nextItemInner|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 7) #0#)) + (+ 1 + (SPADCALL |n1| (QREFELT $ 11))) + (QREFELT $ 49)) + (QREFELT $ 65)))) + ('T + (SEQ (LETT |n3| + (SPADCALL + (SPADCALL |n| (QREFELT $ 53)) + (QREFELT $ 120)) + |UPOLYC-;nextItemInner|) + (EXIT (COND + ((QEQCAR |n3| 1) + (CONS 1 "failed")) + ('T + (CONS 0 + (SPADCALL (QCDR |n3|) + (SPADCALL |n| + (QREFELT $ 11)) + (QREFELT $ 49))))))))))))))))) + +(DEFUN |UPOLYC-;nextItem;SU;29| (|n| $) + (PROG (|n1| #0=#:G1549) + (RETURN + (SEQ (LETT |n1| (|UPOLYC-;nextItemInner| |n| $) + |UPOLYC-;nextItem;SU;29|) + (EXIT (COND + ((QEQCAR |n1| 1) + (CONS 0 + (SPADCALL + (PROG2 (LETT #0# + (SPADCALL (|spadConstant| $ 117) + (QREFELT $ 120)) + |UPOLYC-;nextItem;SU;29|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 7) #0#)) + (+ 1 (SPADCALL |n| (QREFELT $ 11))) + (QREFELT $ 49)))) + ('T |n1|))))))) + +(DEFUN |UPOLYC-;content;SSaosS;30| (|p| |v| $) + (SPADCALL (SPADCALL |p| (QREFELT $ 123)) (QREFELT $ 30))) + +(DEFUN |UPOLYC-;primeFactor| (|p| |q| $) + (PROG (#0=#:G1555 |p1|) + (RETURN + (SEQ (LETT |p1| + (PROG2 (LETT #0# + (SPADCALL |p| + (SPADCALL |p| |q| + (QREFELT $ 125)) + (QREFELT $ 126)) + |UPOLYC-;primeFactor|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#)) + |UPOLYC-;primeFactor|) + (EXIT (COND + ((SPADCALL |p1| |p| (QREFELT $ 127)) |p|) + ('T (|UPOLYC-;primeFactor| |p1| |q| $)))))))) + +(DEFUN |UPOLYC-;separate;2SR;32| (|p| |q| $) + (PROG (|a| #0=#:G1561) + (RETURN + (SEQ (LETT |a| (|UPOLYC-;primeFactor| |p| |q| $) + |UPOLYC-;separate;2SR;32|) + (EXIT (CONS |a| + (PROG2 (LETT #0# + (SPADCALL |p| |a| (QREFELT $ 126)) + |UPOLYC-;separate;2SR;32|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) + #0#)))))))) + +(DEFUN |UPOLYC-;differentiate;SM2S;33| (|x| |deriv| |x'| $) + (PROG (|dg| |lc| #0=#:G1566 |d|) + (RETURN + (SEQ (LETT |d| (|spadConstant| $ 60) + |UPOLYC-;differentiate;SM2S;33|) + (SEQ G190 + (COND + ((NULL (< 0 + (LETT |dg| (SPADCALL |x| (QREFELT $ 11)) + |UPOLYC-;differentiate;SM2S;33|))) (GO G191))) - (SEQ - (EXIT - (LETT |ans| - (SPADCALL - (SPADCALL |ans| - (SPADCALL |f| - (PROG1 - (LETT #1# - (|-| |n| - (LETT |n| - (SPADCALL |p| (QREFELT |$| 11)) - |UPOLYC-;elt;S2F;44|)) - |UPOLYC-;elt;S2F;44|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - (QREFELT |$| 163)) - (QREFELT |$| 164)) - (SPADCALL - (SPADCALL - (SPADCALL |p| (QREFELT |$| 53)) - (QREFELT |$| 30)) - (QREFELT |$| 162)) - (QREFELT |$| 165)) - |UPOLYC-;elt;S2F;44|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT - (COND - ((ZEROP |n|) |ans|) - ((QUOTE T) - (SPADCALL |ans| - (SPADCALL |f| |n| (QREFELT |$| 166)) - (QREFELT |$| 164)))))))))))) - -(DEFUN |UPOLYC-;order;2SNni;45| (|p| |q| |$|) - (PROG (|u| #1=#:G103497 |ans|) - (RETURN - (SEQ - (EXIT - (COND - ((SPADCALL |p| (QREFELT |$| 9)) - (|error| "order: arguments must be nonzero")) - ((|<| (SPADCALL |q| (QREFELT |$| 11)) 1) - (|error| "order: place must be non-trivial")) - ((QUOTE T) - (SEQ - (LETT |ans| 0 |UPOLYC-;order;2SNni;45|) - (EXIT - (SEQ G190 - NIL - (SEQ - (LETT |u| - (SPADCALL |p| |q| (QREFELT |$| 126)) - |UPOLYC-;order;2SNni;45|) - (EXIT - (COND - ((QEQCAR |u| 1) - (PROGN - (LETT #1# |ans| |UPOLYC-;order;2SNni;45|) - (GO #1#))) - ((QUOTE T) - (SEQ - (LETT |p| (QCDR |u|) |UPOLYC-;order;2SNni;45|) - (EXIT - (LETT - |ans| - (|+| |ans| 1) - |UPOLYC-;order;2SNni;45|))))))) - NIL - (GO G190) - G191 - (EXIT NIL))))))) - #1# - (EXIT #1#))))) - -(DEFUN |UPOLYC-;squareFree;SF;46| (|p| |$|) - (SPADCALL |p| (QREFELT |$| 170))) - -(DEFUN |UPOLYC-;squareFreePart;2S;47| (|p| |$|) - (SPADCALL |p| (QREFELT |$| 172))) - -(DEFUN |UPOLYC-;gcdPolynomial;3Sup;48| (|pp| |qq| |$|) - (COND - ((SPADCALL |pp| (QREFELT |$| 174)) (SPADCALL |qq| (QREFELT |$| 175))) - ((SPADCALL |qq| (QREFELT |$| 174)) (SPADCALL |pp| (QREFELT |$| 175))) - ((QUOTE T) - (SPADCALL - (SPADCALL - (SPADCALL - (SPADCALL |pp| (QREFELT |$| 176)) - (SPADCALL |qq| (QREFELT |$| 176)) (QREFELT |$| 125)) - (SPADCALL - (SPADCALL - (SPADCALL |pp| (QREFELT |$| 177)) - (SPADCALL |qq| (QREFELT |$| 177)) (QREFELT |$| 178)) - (QREFELT |$| 177)) - (QREFELT |$| 179)) - (QREFELT |$| 175))))) - -(DEFUN |UPOLYC-;squareFreePolynomial;SupF;49| (|pp| |$|) - (SPADCALL |pp| (QREFELT |$| 182))) - -(DEFUN |UPOLYC-;elt;F2R;50| (|f| |r| |$|) - (SPADCALL - (SPADCALL - (SPADCALL |f| (QREFELT |$| 141)) - |r| - (QREFELT |$| 29)) - (SPADCALL (SPADCALL |f| (QREFELT |$| 144)) |r| (QREFELT |$| 29)) - (QREFELT |$| 184))) - -(DEFUN |UPOLYC-;euclideanSize;SNni;51| (|x| |$|) - (COND - ((SPADCALL |x| (QREFELT |$| 9)) - (|error| "euclideanSize called on 0 in Univariate Polynomial")) - ((QUOTE T) (SPADCALL |x| (QREFELT |$| 11))))) - -(DEFUN |UPOLYC-;divide;2SR;52| (|x| |y| |$|) - (PROG (|lc| |f| #1=#:G103510 |n| |quot|) - (RETURN - (SEQ - (COND - ((SPADCALL |y| (QREFELT |$| 9)) - (|error| "division by 0 in Univariate Polynomials")) - ((QUOTE T) - (SEQ - (LETT |quot| (|spadConstant| |$| 60) |UPOLYC-;divide;2SR;52|) - (LETT |lc| - (SPADCALL (SPADCALL |y| (QREFELT |$| 53)) (QREFELT |$| 187)) - |UPOLYC-;divide;2SR;52|) - (SEQ G190 - (COND - ((NULL - (COND - ((OR - (SPADCALL |x| (QREFELT |$| 9)) - (|<| - (SPADCALL |x| (QREFELT |$| 11)) - (SPADCALL |y| (QREFELT |$| 11)))) - (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) - (GO G191))) - (SEQ - (LETT |f| - (SPADCALL |lc| - (SPADCALL |x| (QREFELT |$| 53)) - (QREFELT |$| 188)) - |UPOLYC-;divide;2SR;52|) - (LETT |n| - (PROG1 - (LETT #1# - (|-| - (SPADCALL |x| (QREFELT |$| 11)) - (SPADCALL |y| (QREFELT |$| 11))) + (SEQ (LETT |lc| (SPADCALL |x| (QREFELT $ 53)) + |UPOLYC-;differentiate;SM2S;33|) + (LETT |d| + (SPADCALL + (SPADCALL |d| + (SPADCALL |x'| + (SPADCALL + (SPADCALL |dg| |lc| + (QREFELT $ 131)) + (PROG1 + (LETT #0# (- |dg| 1) + |UPOLYC-;differentiate;SM2S;33|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 49)) + (QREFELT $ 71)) + (QREFELT $ 65)) + (SPADCALL (SPADCALL |lc| |deriv|) |dg| + (QREFELT $ 49)) + (QREFELT $ 65)) + |UPOLYC-;differentiate;SM2S;33|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 55)) + |UPOLYC-;differentiate;SM2S;33|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |d| + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 53)) + |deriv|) + (QREFELT $ 30)) + (QREFELT $ 65))))))) + +(DEFUN |UPOLYC-;ncdiff| (|n| |x'| $) + (PROG (#0=#:G1584 |n1|) + (RETURN + (COND + ((ZEROP |n|) (|spadConstant| $ 60)) + ((ZEROP (LETT |n1| + (PROG1 (LETT #0# (- |n| 1) |UPOLYC-;ncdiff|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + |UPOLYC-;ncdiff|)) + |x'|) + ('T + (SPADCALL + (SPADCALL |x'| + (SPADCALL (|spadConstant| $ 48) |n1| (QREFELT $ 49)) + (QREFELT $ 71)) + (SPADCALL + (SPADCALL (|spadConstant| $ 48) 1 (QREFELT $ 49)) + (|UPOLYC-;ncdiff| |n1| |x'| $) (QREFELT $ 71)) + (QREFELT $ 65))))))) + +(DEFUN |UPOLYC-;differentiate;SM2S;35| (|x| |deriv| |x'| $) + (PROG (|dg| |lc| |d|) + (RETURN + (SEQ (LETT |d| (|spadConstant| $ 60) + |UPOLYC-;differentiate;SM2S;35|) + (SEQ G190 + (COND + ((NULL (< 0 + (LETT |dg| (SPADCALL |x| (QREFELT $ 11)) + |UPOLYC-;differentiate;SM2S;35|))) + (GO G191))) + (SEQ (LETT |lc| (SPADCALL |x| (QREFELT $ 53)) + |UPOLYC-;differentiate;SM2S;35|) + (LETT |d| + (SPADCALL + (SPADCALL |d| + (SPADCALL (SPADCALL |lc| |deriv|) + |dg| (QREFELT $ 49)) + (QREFELT $ 65)) + (SPADCALL |lc| + (|UPOLYC-;ncdiff| |dg| |x'| $) + (QREFELT $ 134)) + (QREFELT $ 65)) + |UPOLYC-;differentiate;SM2S;35|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 55)) + |UPOLYC-;differentiate;SM2S;35|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |d| + (SPADCALL + (SPADCALL (SPADCALL |x| (QREFELT $ 53)) + |deriv|) + (QREFELT $ 30)) + (QREFELT $ 65))))))) + +(DEFUN |UPOLYC-;differentiate;SMS;36| (|x| |deriv| $) + (SPADCALL |x| |deriv| (|spadConstant| $ 47) (QREFELT $ 135))) + +(DEFUN |UPOLYC-;differentiate;2S;37| (|x| $) + (PROG (|dg| #0=#:G1593 |d|) + (RETURN + (SEQ (LETT |d| (|spadConstant| $ 60) + |UPOLYC-;differentiate;2S;37|) + (SEQ G190 + (COND + ((NULL (< 0 + (LETT |dg| (SPADCALL |x| (QREFELT $ 11)) + |UPOLYC-;differentiate;2S;37|))) + (GO G191))) + (SEQ (LETT |d| + (SPADCALL |d| + (SPADCALL + (SPADCALL |dg| + (SPADCALL |x| (QREFELT $ 53)) + (QREFELT $ 131)) + (PROG1 + (LETT #0# (- |dg| 1) + |UPOLYC-;differentiate;2S;37|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 49)) + (QREFELT $ 65)) + |UPOLYC-;differentiate;2S;37|) + (EXIT (LETT |x| (SPADCALL |x| (QREFELT $ 55)) + |UPOLYC-;differentiate;2S;37|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |d|))))) + +(DEFUN |UPOLYC-;differentiate;SSaosS;38| (|x| |v| $) + (SPADCALL |x| (QREFELT $ 138))) + +(DEFUN |UPOLYC-;elt;3F;39| (|g| |f| $) + (SPADCALL + (SPADCALL (SPADCALL |g| (QREFELT $ 141)) |f| (QREFELT $ 143)) + (SPADCALL (SPADCALL |g| (QREFELT $ 144)) |f| (QREFELT $ 143)) + (QREFELT $ 145))) + +(DEFUN |UPOLYC-;pseudoQuotient;3S;40| (|p| |q| $) + (PROG (|n| #0=#:G1639 #1=#:G1641) + (RETURN + (SEQ (LETT |n| + (+ (- (SPADCALL |p| (QREFELT $ 11)) + (SPADCALL |q| (QREFELT $ 11))) + 1) + |UPOLYC-;pseudoQuotient;3S;40|) + (EXIT (COND + ((< |n| 1) (|spadConstant| $ 60)) + ('T + (PROG2 (LETT #1# + (SPADCALL + (SPADCALL + (SPADCALL + (SPADCALL + (SPADCALL |q| (QREFELT $ 53)) + (PROG1 + (LETT #0# |n| + |UPOLYC-;pseudoQuotient;3S;40|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 147)) + |p| (QREFELT $ 134)) + (SPADCALL |p| |q| + (QREFELT $ 148)) + (QREFELT $ 149)) + |q| (QREFELT $ 126)) + |UPOLYC-;pseudoQuotient;3S;40|) + (QCDR #1#) + (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#))))))))) + +(DEFUN |UPOLYC-;pseudoDivide;2SR;41| (|p| |q| $) + (PROG (|n| |prem| #0=#:G1647 |lc| #1=#:G1649) + (RETURN + (SEQ (LETT |n| + (+ (- (SPADCALL |p| (QREFELT $ 11)) + (SPADCALL |q| (QREFELT $ 11))) + 1) + |UPOLYC-;pseudoDivide;2SR;41|) + (EXIT (COND + ((< |n| 1) + (VECTOR (|spadConstant| $ 48) (|spadConstant| $ 60) + |p|)) + ('T + (SEQ (LETT |prem| + (SPADCALL |p| |q| (QREFELT $ 148)) + |UPOLYC-;pseudoDivide;2SR;41|) + (LETT |lc| + (SPADCALL (SPADCALL |q| (QREFELT $ 53)) + (PROG1 + (LETT #0# |n| + |UPOLYC-;pseudoDivide;2SR;41|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 147)) + |UPOLYC-;pseudoDivide;2SR;41|) + (EXIT (VECTOR |lc| + (PROG2 + (LETT #1# + (SPADCALL + (SPADCALL + (SPADCALL |lc| |p| + (QREFELT $ 134)) + |prem| (QREFELT $ 149)) + |q| (QREFELT $ 126)) + |UPOLYC-;pseudoDivide;2SR;41|) + (QCDR #1#) + (|check-union| (QEQCAR #1# 0) + (QREFELT $ 6) #1#)) + |prem|)))))))))) + +(DEFUN |UPOLYC-;composite;FSU;42| (|f| |q| $) + (PROG (|n| |d|) + (RETURN + (SEQ (LETT |n| + (SPADCALL (SPADCALL |f| (QREFELT $ 141)) |q| + (QREFELT $ 153)) + |UPOLYC-;composite;FSU;42|) + (EXIT (COND + ((QEQCAR |n| 1) (CONS 1 "failed")) + ('T + (SEQ (LETT |d| + (SPADCALL (SPADCALL |f| (QREFELT $ 144)) + |q| (QREFELT $ 153)) + |UPOLYC-;composite;FSU;42|) + (EXIT (COND + ((QEQCAR |d| 1) (CONS 1 "failed")) + ('T + (CONS 0 + (SPADCALL (QCDR |n|) (QCDR |d|) + (QREFELT $ 154)))))))))))))) + +(DEFUN |UPOLYC-;composite;2SU;43| (|p| |q| $) + (PROG (|cqr| |v| |u| |w| #0=#:G1675) + (RETURN + (SEQ (COND + ((SPADCALL |p| (QREFELT $ 157)) (CONS 0 |p|)) + ('T + (SEQ (EXIT (SEQ (LETT |cqr| + (SPADCALL |p| |q| (QREFELT $ 158)) + |UPOLYC-;composite;2SU;43|) + (COND + ((SPADCALL (QVELT |cqr| 2) + (QREFELT $ 157)) + (SEQ (LETT |v| + (SPADCALL (QVELT |cqr| 2) + (QVELT |cqr| 0) + (QREFELT $ 159)) + |UPOLYC-;composite;2SU;43|) + (EXIT + (COND + ((QEQCAR |v| 0) + (SEQ + (LETT |u| + (SPADCALL (QVELT |cqr| 1) + |q| (QREFELT $ 153)) + |UPOLYC-;composite;2SU;43|) + (EXIT + (COND + ((QEQCAR |u| 0) + (SEQ + (LETT |w| + (SPADCALL (QCDR |u|) + (QVELT |cqr| 0) + (QREFELT $ 159)) + |UPOLYC-;composite;2SU;43|) + (EXIT + (COND + ((QEQCAR |w| 0) + (PROGN + (LETT #0# + (CONS 0 + (SPADCALL + (QCDR |v|) + (SPADCALL + (SPADCALL + (|spadConstant| + $ 48) + 1 + (QREFELT $ + 49)) + (QCDR |w|) + (QREFELT $ + 71)) + (QREFELT $ 65))) + |UPOLYC-;composite;2SU;43|) + (GO #0#)))))))))))))))) + (EXIT (CONS 1 "failed")))) + #0# (EXIT #0#)))))))) + +(DEFUN |UPOLYC-;elt;S2F;44| (|p| |f| $) + (PROG (|n| #0=#:G1681 |ans|) + (RETURN + (SEQ (COND + ((SPADCALL |p| (QREFELT $ 9)) (|spadConstant| $ 161)) + ('T + (SEQ (LETT |ans| + (SPADCALL + (SPADCALL (SPADCALL |p| (QREFELT $ 53)) + (QREFELT $ 30)) + (QREFELT $ 162)) + |UPOLYC-;elt;S2F;44|) + (LETT |n| (SPADCALL |p| (QREFELT $ 11)) + |UPOLYC-;elt;S2F;44|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL + (LETT |p| + (SPADCALL |p| (QREFELT $ 55)) + |UPOLYC-;elt;S2F;44|) + (QREFELT $ 9)) + (QREFELT $ 163))) + (GO G191))) + (SEQ (EXIT (LETT |ans| + (SPADCALL + (SPADCALL |ans| + (SPADCALL |f| + (PROG1 + (LETT #0# + (- |n| + (LETT |n| + (SPADCALL |p| + (QREFELT $ 11)) + |UPOLYC-;elt;S2F;44|)) + |UPOLYC-;elt;S2F;44|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + (QREFELT $ 164)) + (QREFELT $ 165)) + (SPADCALL + (SPADCALL + (SPADCALL |p| (QREFELT $ 53)) + (QREFELT $ 30)) + (QREFELT $ 162)) + (QREFELT $ 166)) + |UPOLYC-;elt;S2F;44|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((ZEROP |n|) |ans|) + ('T + (SPADCALL |ans| + (SPADCALL |f| |n| (QREFELT $ 167)) + (QREFELT $ 165)))))))))))) + +(DEFUN |UPOLYC-;order;2SNni;45| (|p| |q| $) + (PROG (|u| #0=#:G1695 |ans|) + (RETURN + (SEQ (EXIT (COND + ((SPADCALL |p| (QREFELT $ 9)) + (|error| "order: arguments must be nonzero")) + ((< (SPADCALL |q| (QREFELT $ 11)) 1) + (|error| "order: place must be non-trivial")) + ('T + (SEQ (LETT |ans| 0 |UPOLYC-;order;2SNni;45|) + (EXIT (SEQ G190 NIL + (SEQ + (LETT |u| + (SPADCALL |p| |q| + (QREFELT $ 126)) + |UPOLYC-;order;2SNni;45|) + (EXIT + (COND + ((QEQCAR |u| 1) + (PROGN + (LETT #0# |ans| + |UPOLYC-;order;2SNni;45|) + (GO #0#))) + ('T + (SEQ + (LETT |p| (QCDR |u|) + |UPOLYC-;order;2SNni;45|) + (EXIT + (LETT |ans| (+ |ans| 1) + |UPOLYC-;order;2SNni;45|))))))) + NIL (GO G190) G191 (EXIT NIL))))))) + #0# (EXIT #0#))))) + +(DEFUN |UPOLYC-;squareFree;SF;46| (|p| $) + (SPADCALL |p| (QREFELT $ 171))) + +(DEFUN |UPOLYC-;squareFreePart;2S;47| (|p| $) + (SPADCALL |p| (QREFELT $ 173))) + +(DEFUN |UPOLYC-;gcdPolynomial;3Sup;48| (|pp| |qq| $) + (COND + ((SPADCALL |pp| (QREFELT $ 175)) (SPADCALL |qq| (QREFELT $ 176))) + ((SPADCALL |qq| (QREFELT $ 175)) (SPADCALL |pp| (QREFELT $ 176))) + ('T + (SPADCALL + (SPADCALL + (SPADCALL (SPADCALL |pp| (QREFELT $ 177)) + (SPADCALL |qq| (QREFELT $ 177)) (QREFELT $ 125)) + (SPADCALL + (SPADCALL (SPADCALL |pp| (QREFELT $ 178)) + (SPADCALL |qq| (QREFELT $ 178)) (QREFELT $ 179)) + (QREFELT $ 178)) + (QREFELT $ 180)) + (QREFELT $ 176))))) + +(DEFUN |UPOLYC-;squareFreePolynomial;SupF;49| (|pp| $) + (SPADCALL |pp| (QREFELT $ 183))) + +(DEFUN |UPOLYC-;elt;F2R;50| (|f| |r| $) + (SPADCALL (SPADCALL (SPADCALL |f| (QREFELT $ 141)) |r| + (QREFELT $ 29)) + (SPADCALL (SPADCALL |f| (QREFELT $ 144)) |r| + (QREFELT $ 29)) + (QREFELT $ 185))) + +(DEFUN |UPOLYC-;euclideanSize;SNni;51| (|x| $) + (COND + ((SPADCALL |x| (QREFELT $ 9)) + (|error| "euclideanSize called on 0 in Univariate Polynomial")) + ('T (SPADCALL |x| (QREFELT $ 11))))) + +(DEFUN |UPOLYC-;divide;2SR;52| (|x| |y| $) + (PROG (|lc| |f| #0=#:G1707 |n| |quot|) + (RETURN + (SEQ (COND + ((SPADCALL |y| (QREFELT $ 9)) + (|error| "division by 0 in Univariate Polynomials")) + ('T + (SEQ (LETT |quot| (|spadConstant| $ 60) + |UPOLYC-;divide;2SR;52|) + (LETT |lc| + (SPADCALL (SPADCALL |y| (QREFELT $ 53)) + (QREFELT $ 188)) |UPOLYC-;divide;2SR;52|) - (|check-subtype| - (|>=| #1# 0) - (QUOTE (|NonNegativeInteger|)) - #1#)) - |UPOLYC-;divide;2SR;52|) - (LETT |quot| - (SPADCALL |quot| - (SPADCALL |f| |n| (QREFELT |$| 49)) - (QREFELT |$| 65)) - |UPOLYC-;divide;2SR;52|) - (EXIT - (LETT |x| - (SPADCALL |x| - (SPADCALL - (SPADCALL |f| |n| (QREFELT |$| 49)) - |y| - (QREFELT |$| 71)) - (QREFELT |$| 149)) - |UPOLYC-;divide;2SR;52|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT (CONS |quot| |x|))))))))) - -(DEFUN |UPOLYC-;integrate;2S;53| (|p| |$|) - (PROG (|l| |d| |ans|) - (RETURN - (SEQ - (LETT |ans| (|spadConstant| |$| 60) |UPOLYC-;integrate;2S;53|) - (SEQ G190 - (COND - ((NULL - (COND - ((SPADCALL |p| (|spadConstant| |$| 60) (QREFELT |$| 127)) - (QUOTE NIL)) - ((QUOTE T) (QUOTE T)))) (GO G191))) - (SEQ - (LETT |l| - (SPADCALL |p| (QREFELT |$| 53)) - |UPOLYC-;integrate;2S;53|) - (LETT |d| - (|+| 1 (SPADCALL |p| (QREFELT |$| 11))) - |UPOLYC-;integrate;2S;53|) - (LETT |ans| - (SPADCALL |ans| - (SPADCALL - (SPADCALL (SPADCALL |d| (QREFELT |$| 191)) (QREFELT |$| 192)) - (SPADCALL |l| |d| (QREFELT |$| 49)) (QREFELT |$| 193)) - (QREFELT |$| 65)) - |UPOLYC-;integrate;2S;53|) - (EXIT - (LETT |p| - (SPADCALL |p| (QREFELT |$| 55)) - |UPOLYC-;integrate;2S;53|))) - NIL - (GO G190) - G191 - (EXIT NIL)) - (EXIT |ans|))))) - -(DEFUN |UnivariatePolynomialCategory&| (|#1| |#2|) - (PROG (|DV$1| |DV$2| |dv$| |$| |pv$|) - (RETURN - (PROGN - (LETT |DV$1| (|devaluate| |#1|) . #1=(|UnivariatePolynomialCategory&|)) - (LETT |DV$2| (|devaluate| |#2|) . #1#) - (LETT |dv$| - (LIST (QUOTE |UnivariatePolynomialCategory&|) |DV$1| |DV$2|) . #1#) - (LETT |$| (GETREFV 201) . #1#) - (QSETREFV |$| 0 |dv$|) - (QSETREFV |$| 3 - (LETT |pv$| - (|buildPredVector| 0 0 - (LIST - (|HasCategory| |#2| - (QUOTE (|Algebra| (|Fraction| (|Integer|))))) - (|HasCategory| |#2| (QUOTE (|Field|))) - (|HasCategory| |#2| (QUOTE (|GcdDomain|))) - (|HasCategory| |#2| (QUOTE (|IntegralDomain|))) - (|HasCategory| |#2| (QUOTE (|CommutativeRing|))) - (|HasCategory| |#2| (QUOTE (|StepThrough|))))) . #1#)) - (|stuffDomainSlots| |$|) - (QSETREFV |$| 6 |#1|) - (QSETREFV |$| 7 |#2|) - (COND - ((|HasCategory| |#2| (QUOTE (|PolynomialFactorizationExplicit|))) - (PROGN - (QSETREFV |$| 81 - (CONS - (|dispatchFunction| - |UPOLYC-;solveLinearPolynomialEquation;LSupU;20|) - |$|)) - (QSETREFV |$| 85 - (CONS - (|dispatchFunction| |UPOLYC-;factorPolynomial;SupF;21|) - |$|)) - (QSETREFV |$| 87 - (CONS - (|dispatchFunction| - |UPOLYC-;factorSquareFreePolynomial;SupF;22|) - |$|)) - (QSETREFV |$| 105 - (CONS (|dispatchFunction| |UPOLYC-;factor;SF;23|) |$|))))) - (COND + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |x| (QREFELT $ 9)) 'NIL) + ('T + (SPADCALL + (< (SPADCALL |x| (QREFELT $ 11)) + (SPADCALL |y| (QREFELT $ 11))) + (QREFELT $ 163))))) + (GO G191))) + (SEQ (LETT |f| + (SPADCALL |lc| + (SPADCALL |x| (QREFELT $ 53)) + (QREFELT $ 189)) + |UPOLYC-;divide;2SR;52|) + (LETT |n| + (PROG1 + (LETT #0# + (- (SPADCALL |x| (QREFELT $ 11)) + (SPADCALL |y| (QREFELT $ 11))) + |UPOLYC-;divide;2SR;52|) + (|check-subtype| (>= #0# 0) + '(|NonNegativeInteger|) #0#)) + |UPOLYC-;divide;2SR;52|) + (LETT |quot| + (SPADCALL |quot| + (SPADCALL |f| |n| (QREFELT $ 49)) + (QREFELT $ 65)) + |UPOLYC-;divide;2SR;52|) + (EXIT (LETT |x| + (SPADCALL |x| + (SPADCALL + (SPADCALL |f| |n| (QREFELT $ 49)) + |y| (QREFELT $ 71)) + (QREFELT $ 149)) + |UPOLYC-;divide;2SR;52|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (CONS |quot| |x|))))))))) + +(DEFUN |UPOLYC-;integrate;2S;53| (|p| $) + (PROG (|l| |d| |ans|) + (RETURN + (SEQ (LETT |ans| (|spadConstant| $ 60) |UPOLYC-;integrate;2S;53|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (SPADCALL |p| (|spadConstant| $ 60) + (QREFELT $ 127)) + (QREFELT $ 163))) + (GO G191))) + (SEQ (LETT |l| (SPADCALL |p| (QREFELT $ 53)) + |UPOLYC-;integrate;2S;53|) + (LETT |d| (+ 1 (SPADCALL |p| (QREFELT $ 11))) + |UPOLYC-;integrate;2S;53|) + (LETT |ans| + (SPADCALL |ans| + (SPADCALL + (SPADCALL + (SPADCALL |d| (QREFELT $ 192)) + (QREFELT $ 193)) + (SPADCALL |l| |d| (QREFELT $ 49)) + (QREFELT $ 194)) + (QREFELT $ 65)) + |UPOLYC-;integrate;2S;53|) + (EXIT (LETT |p| (SPADCALL |p| (QREFELT $ 55)) + |UPOLYC-;integrate;2S;53|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |ans|))))) + +(DEFUN |UnivariatePolynomialCategory&| (|#1| |#2|) + (PROG (|dv$1| |dv$2| |dv$| $ |pv$|) + (RETURN + (PROGN + (LETT |dv$1| (|devaluate| |#1|) + . #0=(|UnivariatePolynomialCategory&|)) + (LETT |dv$2| (|devaluate| |#2|) . #0#) + (LETT |dv$| + (LIST '|UnivariatePolynomialCategory&| |dv$1| |dv$2|) . #0#) + (LETT $ (GETREFV 202) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#2| + '(|Algebra| (|Fraction| (|Integer|)))) + (|HasCategory| |#2| '(|Field|)) + (|HasCategory| |#2| '(|GcdDomain|)) + (|HasCategory| |#2| '(|IntegralDomain|)) + (|HasCategory| |#2| '(|CommutativeRing|)) + (|HasCategory| |#2| '(|StepThrough|)))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (COND + ((|HasCategory| |#2| '(|PolynomialFactorizationExplicit|)) + (PROGN + (QSETREFV $ 81 + (CONS (|dispatchFunction| + |UPOLYC-;solveLinearPolynomialEquation;LSupU;20|) + $)) + (QSETREFV $ 85 + (CONS (|dispatchFunction| + |UPOLYC-;factorPolynomial;SupF;21|) + $)) + (QSETREFV $ 87 + (CONS (|dispatchFunction| + |UPOLYC-;factorSquareFreePolynomial;SupF;22|) + $)) + (QSETREFV $ 105 + (CONS (|dispatchFunction| |UPOLYC-;factor;SF;23|) $))))) + (COND ((|testBitVector| |pv$| 6) - (PROGN - (QSETREFV |$| 118 - (CONS (|dispatchFunction| |UPOLYC-;init;S;27|) |$|)) - NIL - (QSETREFV |$| 122 - (CONS (|dispatchFunction| |UPOLYC-;nextItem;SU;29|) |$|))))) - (COND + (PROGN + (QSETREFV $ 118 + (CONS (|dispatchFunction| |UPOLYC-;init;S;27|) $)) + NIL + (QSETREFV $ 122 + (CONS (|dispatchFunction| |UPOLYC-;nextItem;SU;29|) $))))) + (COND ((|testBitVector| |pv$| 3) - (PROGN - (QSETREFV |$| 124 - (CONS (|dispatchFunction| |UPOLYC-;content;SSaosS;30|) |$|)) - NIL - (QSETREFV |$| 129 - (CONS (|dispatchFunction| |UPOLYC-;separate;2SR;32|) |$|))))) - (COND + (PROGN + (QSETREFV $ 124 + (CONS (|dispatchFunction| |UPOLYC-;content;SSaosS;30|) + $)) + NIL + (QSETREFV $ 129 + (CONS (|dispatchFunction| |UPOLYC-;separate;2SR;32|) + $))))) + (COND ((|testBitVector| |pv$| 5) - (QSETREFV |$| 133 - (CONS - (|dispatchFunction| |UPOLYC-;differentiate;SM2S;33|) - |$|))) - ((QUOTE T) - (PROGN - (QSETREFV |$| 133 - (CONS - (|dispatchFunction| |UPOLYC-;differentiate;SM2S;35|) - |$|))))) - (COND + (QSETREFV $ 133 + (CONS (|dispatchFunction| + |UPOLYC-;differentiate;SM2S;33|) + $))) + ('T + (PROGN + (QSETREFV $ 133 + (CONS (|dispatchFunction| + |UPOLYC-;differentiate;SM2S;35|) + $))))) + (COND ((|testBitVector| |pv$| 4) - (PROGN - (QSETREFV |$| 146 - (CONS (|dispatchFunction| |UPOLYC-;elt;3F;39|) |$|)) - (QSETREFV |$| 150 - (CONS (|dispatchFunction| |UPOLYC-;pseudoQuotient;3S;40|) |$|)) - (QSETREFV |$| 152 - (CONS (|dispatchFunction| |UPOLYC-;pseudoDivide;2SR;41|) |$|)) - (QSETREFV |$| 156 - (CONS (|dispatchFunction| |UPOLYC-;composite;FSU;42|) |$|)) - (QSETREFV |$| 160 - (CONS (|dispatchFunction| |UPOLYC-;composite;2SU;43|) |$|)) - (QSETREFV |$| 167 - (CONS (|dispatchFunction| |UPOLYC-;elt;S2F;44|) |$|)) - (QSETREFV |$| 168 - (CONS (|dispatchFunction| |UPOLYC-;order;2SNni;45|) |$|))))) - (COND + (PROGN + (QSETREFV $ 146 + (CONS (|dispatchFunction| |UPOLYC-;elt;3F;39|) $)) + (QSETREFV $ 150 + (CONS (|dispatchFunction| + |UPOLYC-;pseudoQuotient;3S;40|) + $)) + (QSETREFV $ 152 + (CONS (|dispatchFunction| + |UPOLYC-;pseudoDivide;2SR;41|) + $)) + (QSETREFV $ 156 + (CONS (|dispatchFunction| |UPOLYC-;composite;FSU;42|) + $)) + (QSETREFV $ 160 + (CONS (|dispatchFunction| |UPOLYC-;composite;2SU;43|) + $)) + (QSETREFV $ 168 + (CONS (|dispatchFunction| |UPOLYC-;elt;S2F;44|) $)) + (QSETREFV $ 169 + (CONS (|dispatchFunction| |UPOLYC-;order;2SNni;45|) $))))) + (COND ((|testBitVector| |pv$| 3) - (PROGN - (QSETREFV |$| 171 - (CONS (|dispatchFunction| |UPOLYC-;squareFree;SF;46|) |$|)) - (QSETREFV |$| 173 - (CONS - (|dispatchFunction| |UPOLYC-;squareFreePart;2S;47|) - |$|))))) - (COND - ((|HasCategory| |#2| (QUOTE (|PolynomialFactorizationExplicit|))) - (PROGN - (QSETREFV |$| 180 - (CONS - (|dispatchFunction| |UPOLYC-;gcdPolynomial;3Sup;48|) - |$|)) - (QSETREFV |$| 183 - (CONS - (|dispatchFunction| |UPOLYC-;squareFreePolynomial;SupF;49|) - |$|))))) - (COND + (PROGN + (QSETREFV $ 172 + (CONS (|dispatchFunction| |UPOLYC-;squareFree;SF;46|) + $)) + (QSETREFV $ 174 + (CONS (|dispatchFunction| + |UPOLYC-;squareFreePart;2S;47|) + $))))) + (COND + ((|HasCategory| |#2| '(|PolynomialFactorizationExplicit|)) + (PROGN + (QSETREFV $ 181 + (CONS (|dispatchFunction| + |UPOLYC-;gcdPolynomial;3Sup;48|) + $)) + (QSETREFV $ 184 + (CONS (|dispatchFunction| + |UPOLYC-;squareFreePolynomial;SupF;49|) + $))))) + (COND ((|testBitVector| |pv$| 2) - (PROGN - (QSETREFV |$| 185 - (CONS (|dispatchFunction| |UPOLYC-;elt;F2R;50|) |$|)) - (QSETREFV |$| 186 - (CONS - (|dispatchFunction| |UPOLYC-;euclideanSize;SNni;51|) - |$|)) - (QSETREFV |$| 189 - (CONS (|dispatchFunction| |UPOLYC-;divide;2SR;52|) |$|))))) - (COND + (PROGN + (QSETREFV $ 186 + (CONS (|dispatchFunction| |UPOLYC-;elt;F2R;50|) $)) + (QSETREFV $ 187 + (CONS (|dispatchFunction| + |UPOLYC-;euclideanSize;SNni;51|) + $)) + (QSETREFV $ 190 + (CONS (|dispatchFunction| |UPOLYC-;divide;2SR;52|) $))))) + (COND ((|testBitVector| |pv$| 1) - (QSETREFV |$| 194 - (CONS - (|dispatchFunction| |UPOLYC-;integrate;2S;53|) - |$|)))) |$|)))) - -(MAKEPROP - (QUOTE |UnivariatePolynomialCategory&|) - (QUOTE |infovec|) - (LIST - (QUOTE - #(NIL NIL NIL NIL NIL NIL - (|local| |#1|) - (|local| |#2|) - (|Boolean|) - (0 . |zero?|) - (|NonNegativeInteger|) - (5 . |degree|) - (|SingletonAsOrderedSet|) - (10 . |create|) - (|List| 12) - |UPOLYC-;variables;SL;1| - |UPOLYC-;degree;SSaosNni;2| - (14 . |totalDegree|) - |UPOLYC-;totalDegree;SLNni;3| - (|List| 10) - |UPOLYC-;degree;SLL;4| - (19 . |eval|) - (|List| |$|) - |UPOLYC-;eval;SLLS;5| - (26 . |elt|) - |UPOLYC-;eval;SSaos2S;6| - (32 . |eval|) - (|List| 7) - |UPOLYC-;eval;SLLS;7| - (39 . |elt|) - (45 . |coerce|) - |UPOLYC-;eval;SSaosRS;8| - (|Equation| 6) - (50 . |lhs|) - (|Union| 12 (QUOTE "failed")) - (55 . |mainVariable|) - (60 . |rhs|) - (|List| 197) - |UPOLYC-;eval;SLS;9| - |UPOLYC-;mainVariable;SU;10| - (65 . |minimumDegree|) - |UPOLYC-;minimumDegree;SSaosNni;11| - |UPOLYC-;minimumDegree;SLL;12| - (70 . |+|) - (|Mapping| 10 10) - (76 . |mapExponents|) - |UPOLYC-;monomial;SSaosNniS;13| - (82 . |One|) - (86 . |One|) - (90 . |monomial|) - |UPOLYC-;coerce;SaosS;14| - (|SparseUnivariatePolynomial| 7) - (96 . |Zero|) - (100 . |leadingCoefficient|) - (105 . |monomial|) - (111 . |reductum|) - (116 . |makeSUP|) - (121 . |+|) - |UPOLYC-;makeSUP;SSup;15| - (127 . |zero?|) - (132 . |Zero|) - (136 . |leadingCoefficient|) - (141 . |degree|) - (146 . |reductum|) - (151 . |unmakeSUP|) - (156 . |+|) - |UPOLYC-;unmakeSUP;SupS;16| - (|Record| (|:| |quotient| |$|) (|:| |remainder| |$|)) - (162 . |monicDivide|) - |UPOLYC-;karatsubaDivide;SNniR;17| - |UPOLYC-;shiftRight;SNniS;18| - (168 . |*|) - |UPOLYC-;shiftLeft;SNniS;19| - (|Union| 74 (QUOTE "failed")) - (|List| 75) - (|SparseUnivariatePolynomial| 6) - (|PolynomialFactorizationByRecursionUnivariate| 7 6) - (174 . |solveLinearPolynomialEquationByRecursion|) - (|Union| 79 (QUOTE "failed")) - (|List| 80) - (|SparseUnivariatePolynomial| |$|) - (180 . |solveLinearPolynomialEquation|) - (|Factored| 75) - (186 . |factorByRecursion|) - (|Factored| 80) - (191 . |factorPolynomial|) - (196 . |factorSquareFreeByRecursion|) - (201 . |factorSquareFreePolynomial|) - (|Factored| |$|) - (206 . |factor|) - (|Factored| 7) - (211 . |unit|) - (|Union| (QUOTE "nil") (QUOTE "sqfr") (QUOTE "irred") (QUOTE "prime")) - (|Record| (|:| |flg| 92) (|:| |fctr| 7) (|:| |xpnt| 109)) - (|List| 93) - (216 . |factorList|) - (|Record| (|:| |flg| 92) (|:| |fctr| 6) (|:| |xpnt| 109)) - (|List| 96) - (|Factored| 6) - (221 . |makeFR|) - (227 . |factorPolynomial|) - (|Mapping| 6 51) - (|Factored| 51) - (|FactoredFunctions2| 51 6) - (232 . |map|) - (238 . |factor|) - (243 . |Zero|) - (|Vector| 7) - (247 . |new|) - (|Integer|) - (253 . |minIndex|) - (258 . |coefficient|) - (264 . |qsetelt!|) - |UPOLYC-;vectorise;SNniV;24| - |UPOLYC-;retract;SR;25| - (|Union| 7 (QUOTE "failed")) - |UPOLYC-;retractIfCan;SU;26| - (271 . |init|) - (275 . |init|) - (|Union| |$| (QUOTE "failed")) - (279 . |nextItem|) - (284 . |One|) - (288 . |nextItem|) - (293 . |content|) - (298 . |content|) - (304 . |gcd|) - (310 . |exquo|) - (316 . |=|) - (|Record| (|:| |primePart| |$|) (|:| |commonPart| |$|)) - (322 . |separate|) - (328 . |Zero|) - (332 . |*|) - (|Mapping| 7 7) - (338 . |differentiate|) - (345 . |*|) - (351 . |differentiate|) - |UPOLYC-;differentiate;SMS;36| - |UPOLYC-;differentiate;2S;37| - (358 . |differentiate|) - |UPOLYC-;differentiate;SSaosS;38| - (|Fraction| 6) - (363 . |numer|) - (|Fraction| |$|) - (368 . |elt|) - (374 . |denom|) - (379 . |/|) - (385 . |elt|) - (391 . |**|) - (397 . |pseudoRemainder|) - (403 . |-|) - (409 . |pseudoQuotient|) - (|Record| (|:| |coef| 7) (|:| |quotient| |$|) (|:| |remainder| |$|)) - (415 . |pseudoDivide|) - (421 . |composite|) - (427 . |/|) - (|Union| 142 (QUOTE "failed")) - (433 . |composite|) - (439 . |ground?|) - (444 . |pseudoDivide|) - (450 . |exquo|) - (456 . |composite|) - (462 . |Zero|) - (466 . |coerce|) - (471 . |**|) - (477 . |*|) - (483 . |+|) - (489 . |**|) - (495 . |elt|) - (501 . |order|) - (|UnivariatePolynomialSquareFree| 7 6) - (507 . |squareFree|) - (512 . |squareFree|) - (517 . |squareFreePart|) - (522 . |squareFreePart|) - (527 . |zero?|) - (532 . |unitCanonical|) - (537 . |content|) - (542 . |primitivePart|) - (547 . |subResultantGcd|) - (553 . |*|) - (559 . |gcdPolynomial|) - (|UnivariatePolynomialSquareFree| 6 75) - (565 . |squareFree|) - (570 . |squareFreePolynomial|) - (575 . |/|) - (581 . |elt|) - (587 . |euclideanSize|) - (592 . |inv|) - (597 . |*|) - (603 . |divide|) - (|Fraction| 109) - (609 . |coerce|) - (614 . |inv|) - (619 . |*|) - (625 . |integrate|) - (|Symbol|) - (|List| 195) - (|Equation| |$|) - (|Union| 109 (QUOTE "failed")) - (|Union| 190 (QUOTE "failed")) - (|OutputForm|))) - (QUOTE - #(|vectorise| 630 |variables| 636 |unmakeSUP| 641 |totalDegree| 646 - |squareFreePolynomial| 652 |squareFreePart| 657 |squareFree| 662 - |solveLinearPolynomialEquation| 667 |shiftRight| 673 |shiftLeft| 679 - |separate| 685 |retractIfCan| 691 |retract| 696 |pseudoQuotient| 701 - |pseudoDivide| 707 |order| 713 |nextItem| 719 |monomial| 724 - |minimumDegree| 731 |makeSUP| 743 |mainVariable| 748 - |karatsubaDivide| 753 |integrate| 759 |init| 764 |gcdPolynomial| 768 - |factorSquareFreePolynomial| 774 |factorPolynomial| 779 |factor| 784 - |eval| 789 |euclideanSize| 823 |elt| 828 |divide| 846 - |differentiate| 852 |degree| 876 |content| 888 |composite| 894 - |coerce| 906)) - (QUOTE NIL) - (CONS - (|makeByteWordVec2| 1 (QUOTE NIL)) - (CONS - (QUOTE #()) - (CONS - (QUOTE #()) - (|makeByteWordVec2| 194 - (QUOTE - (1 6 8 0 9 1 6 10 0 11 0 12 0 13 1 6 10 0 17 3 6 0 0 12 0 21 2 - 6 0 0 0 24 3 6 0 0 12 7 26 2 6 7 0 7 29 1 6 0 7 30 1 32 6 0 33 - 1 6 34 0 35 1 32 6 0 36 1 6 10 0 40 2 10 0 0 0 43 2 6 0 44 0 - 45 0 6 0 47 0 7 0 48 2 6 0 7 10 49 0 51 0 52 1 6 7 0 53 2 51 - 0 7 10 54 1 6 0 0 55 1 6 51 0 56 2 51 0 0 0 57 1 51 8 0 59 0 - 6 0 60 1 51 7 0 61 1 51 10 0 62 1 51 0 0 63 1 6 0 51 64 2 6 0 - 0 0 65 2 6 67 0 0 68 2 6 0 0 0 71 2 76 73 74 75 77 2 0 78 79 - 80 81 1 76 82 75 83 1 0 84 80 85 1 76 82 75 86 1 0 84 80 87 1 - 7 88 0 89 1 90 7 0 91 1 90 94 0 95 2 98 0 6 97 99 1 7 84 80 - 100 2 103 98 101 102 104 1 0 88 0 105 0 7 0 106 2 107 0 10 7 - 108 1 107 109 0 110 2 6 7 0 10 111 3 107 7 0 109 7 112 0 7 0 - 117 0 0 0 118 1 7 119 0 120 0 75 0 121 1 0 119 0 122 1 6 7 0 - 123 2 0 0 0 12 124 2 6 0 0 0 125 2 6 119 0 0 126 2 6 8 0 0 127 - 2 0 128 0 0 129 0 75 0 130 2 7 0 10 0 131 3 0 0 0 132 0 133 2 - 6 0 7 0 134 3 6 0 0 132 0 135 1 6 0 0 138 1 140 6 0 141 2 6 - 142 0 142 143 1 140 6 0 144 2 140 0 0 0 145 2 0 142 142 142 - 146 2 7 0 0 10 147 2 6 0 0 0 148 2 6 0 0 0 149 2 0 0 0 0 150 - 2 0 151 0 0 152 2 6 119 0 0 153 2 140 0 6 6 154 2 0 155 142 0 - 156 1 6 8 0 157 2 6 151 0 0 158 2 6 119 0 7 159 2 0 119 0 0 - 160 0 140 0 161 1 140 0 6 162 2 140 0 0 109 163 2 140 0 0 0 - 164 2 140 0 0 0 165 2 140 0 0 10 166 2 0 142 0 142 167 2 0 10 - 0 0 168 1 169 98 6 170 1 0 88 0 171 1 169 6 6 172 1 0 0 0 173 - 1 75 8 0 174 1 75 0 0 175 1 75 6 0 176 1 75 0 0 177 2 75 0 0 - 0 178 2 75 0 6 0 179 2 0 80 80 80 180 1 181 82 75 182 1 0 84 - 80 183 2 7 0 0 0 184 2 0 7 142 7 185 1 0 10 0 186 1 7 0 0 187 - 2 7 0 0 0 188 2 0 67 0 0 189 1 190 0 109 191 1 190 0 0 192 2 - 6 0 190 0 193 1 0 0 0 194 2 0 107 0 10 113 1 0 14 0 15 1 0 0 - 51 66 2 0 10 0 14 18 1 0 84 80 183 1 0 0 0 173 1 0 88 0 171 2 - 0 78 79 80 81 2 0 0 0 10 70 2 0 0 0 10 72 2 0 128 0 0 129 1 0 - 115 0 116 1 0 7 0 114 2 0 0 0 0 150 2 0 151 0 0 152 2 0 10 0 - 0 168 1 0 119 0 122 3 0 0 0 12 10 46 2 0 19 0 14 42 2 0 10 0 - 12 41 1 0 51 0 58 1 0 34 0 39 2 0 67 0 10 69 1 0 0 0 194 0 0 - 0 118 2 0 80 80 80 180 1 0 84 80 87 1 0 84 80 85 1 0 88 0 105 - 3 0 0 0 12 0 25 3 0 0 0 14 22 23 3 0 0 0 14 27 28 3 0 0 0 12 - 7 31 2 0 0 0 37 38 1 0 10 0 186 2 0 142 0 142 167 2 0 7 142 7 - 185 2 0 142 142 142 146 2 0 67 0 0 189 3 0 0 0 132 0 133 2 0 - 0 0 132 136 1 0 0 0 137 2 0 0 0 12 139 2 0 10 0 12 16 2 0 19 - 0 14 20 2 0 0 0 12 124 2 0 119 0 0 160 2 0 155 142 0 156 1 0 - 0 12 50)))))) - (QUOTE |lookupComplete|))) - + (QSETREFV $ 195 + (CONS (|dispatchFunction| |UPOLYC-;integrate;2S;53|) $)))) + $)))) + +(MAKEPROP '|UnivariatePolynomialCategory&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|Boolean|) (0 . |zero?|) (|NonNegativeInteger|) + (5 . |degree|) (|SingletonAsOrderedSet|) (10 . |create|) + (|List| 12) |UPOLYC-;variables;SL;1| + |UPOLYC-;degree;SSaosNni;2| (14 . |totalDegree|) + |UPOLYC-;totalDegree;SLNni;3| (|List| 10) + |UPOLYC-;degree;SLL;4| (19 . |eval|) (|List| $) + |UPOLYC-;eval;SLLS;5| (26 . |elt|) + |UPOLYC-;eval;SSaos2S;6| (32 . |eval|) (|List| 7) + |UPOLYC-;eval;SLLS;7| (39 . |elt|) (45 . |coerce|) + |UPOLYC-;eval;SSaosRS;8| (|Equation| 6) (50 . |lhs|) + (|Union| 12 '"failed") (55 . |mainVariable|) (60 . |rhs|) + (|List| 198) |UPOLYC-;eval;SLS;9| + |UPOLYC-;mainVariable;SU;10| (65 . |minimumDegree|) + |UPOLYC-;minimumDegree;SSaosNni;11| + |UPOLYC-;minimumDegree;SLL;12| (70 . +) (|Mapping| 10 10) + (76 . |mapExponents|) |UPOLYC-;monomial;SSaosNniS;13| + (82 . |One|) (86 . |One|) (90 . |monomial|) + |UPOLYC-;coerce;SaosS;14| (|SparseUnivariatePolynomial| 7) + (96 . |Zero|) (100 . |leadingCoefficient|) + (105 . |monomial|) (111 . |reductum|) (116 . |makeSUP|) + (121 . +) |UPOLYC-;makeSUP;SSup;15| (127 . |zero?|) + (132 . |Zero|) (136 . |leadingCoefficient|) + (141 . |degree|) (146 . |reductum|) (151 . |unmakeSUP|) + (156 . +) |UPOLYC-;unmakeSUP;SupS;16| + (|Record| (|:| |quotient| $) (|:| |remainder| $)) + (162 . |monicDivide|) |UPOLYC-;karatsubaDivide;SNniR;17| + |UPOLYC-;shiftRight;SNniS;18| (168 . *) + |UPOLYC-;shiftLeft;SNniS;19| (|Union| 74 '"failed") + (|List| 75) (|SparseUnivariatePolynomial| 6) + (|PolynomialFactorizationByRecursionUnivariate| 7 6) + (174 . |solveLinearPolynomialEquationByRecursion|) + (|Union| 79 '"failed") (|List| 80) + (|SparseUnivariatePolynomial| $) + (180 . |solveLinearPolynomialEquation|) (|Factored| 75) + (186 . |factorByRecursion|) (|Factored| 80) + (191 . |factorPolynomial|) + (196 . |factorSquareFreeByRecursion|) + (201 . |factorSquareFreePolynomial|) (|Factored| $) + (206 . |factor|) (|Factored| 7) (211 . |unit|) + (|Union| '"nil" '"sqfr" '"irred" '"prime") + (|Record| (|:| |flg| 92) (|:| |fctr| 7) (|:| |xpnt| 109)) + (|List| 93) (216 . |factorList|) + (|Record| (|:| |flg| 92) (|:| |fctr| 6) (|:| |xpnt| 109)) + (|List| 96) (|Factored| 6) (221 . |makeFR|) + (227 . |factorPolynomial|) (|Mapping| 6 51) + (|Factored| 51) (|FactoredFunctions2| 51 6) (232 . |map|) + (238 . |factor|) (243 . |Zero|) (|Vector| 7) (247 . |new|) + (|Integer|) (253 . |minIndex|) (258 . |coefficient|) + (264 . |qsetelt!|) |UPOLYC-;vectorise;SNniV;24| + |UPOLYC-;retract;SR;25| (|Union| 7 '"failed") + |UPOLYC-;retractIfCan;SU;26| (271 . |init|) (275 . |init|) + (|Union| $ '"failed") (279 . |nextItem|) (284 . |One|) + (288 . |nextItem|) (293 . |content|) (298 . |content|) + (304 . |gcd|) (310 . |exquo|) (316 . =) + (|Record| (|:| |primePart| $) (|:| |commonPart| $)) + (322 . |separate|) (328 . |Zero|) (332 . *) + (|Mapping| 7 7) (338 . |differentiate|) (345 . *) + (351 . |differentiate|) |UPOLYC-;differentiate;SMS;36| + |UPOLYC-;differentiate;2S;37| (358 . |differentiate|) + |UPOLYC-;differentiate;SSaosS;38| (|Fraction| 6) + (363 . |numer|) (|Fraction| $) (368 . |elt|) + (374 . |denom|) (379 . /) (385 . |elt|) (391 . **) + (397 . |pseudoRemainder|) (403 . -) + (409 . |pseudoQuotient|) + (|Record| (|:| |coef| 7) (|:| |quotient| $) + (|:| |remainder| $)) + (415 . |pseudoDivide|) (421 . |composite|) (427 . /) + (|Union| 142 '"failed") (433 . |composite|) + (439 . |ground?|) (444 . |pseudoDivide|) (450 . |exquo|) + (456 . |composite|) (462 . |Zero|) (466 . |coerce|) + (471 . |not|) (476 . **) (482 . *) (488 . +) (494 . **) + (500 . |elt|) (506 . |order|) + (|UnivariatePolynomialSquareFree| 7 6) + (512 . |squareFree|) (517 . |squareFree|) + (522 . |squareFreePart|) (527 . |squareFreePart|) + (532 . |zero?|) (537 . |unitCanonical|) (542 . |content|) + (547 . |primitivePart|) (552 . |subResultantGcd|) + (558 . *) (564 . |gcdPolynomial|) + (|UnivariatePolynomialSquareFree| 6 75) + (570 . |squareFree|) (575 . |squareFreePolynomial|) + (580 . /) (586 . |elt|) (592 . |euclideanSize|) + (597 . |inv|) (602 . *) (608 . |divide|) (|Fraction| 109) + (614 . |coerce|) (619 . |inv|) (624 . *) + (630 . |integrate|) (|Symbol|) (|List| 196) (|Equation| $) + (|Union| 109 '"failed") (|Union| 191 '"failed") + (|OutputForm|)) + '#(|vectorise| 635 |variables| 641 |unmakeSUP| 646 + |totalDegree| 651 |squareFreePolynomial| 657 + |squareFreePart| 662 |squareFree| 667 + |solveLinearPolynomialEquation| 672 |shiftRight| 678 + |shiftLeft| 684 |separate| 690 |retractIfCan| 696 + |retract| 701 |pseudoQuotient| 706 |pseudoDivide| 712 + |order| 718 |nextItem| 724 |monomial| 729 |minimumDegree| + 736 |makeSUP| 748 |mainVariable| 753 |karatsubaDivide| 758 + |integrate| 764 |init| 769 |gcdPolynomial| 773 + |factorSquareFreePolynomial| 779 |factorPolynomial| 784 + |factor| 789 |eval| 794 |euclideanSize| 828 |elt| 833 + |divide| 851 |differentiate| 857 |degree| 881 |content| + 893 |composite| 899 |coerce| 911) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 195 + '(1 6 8 0 9 1 6 10 0 11 0 12 0 13 1 6 + 10 0 17 3 6 0 0 12 0 21 2 6 0 0 0 24 + 3 6 0 0 12 7 26 2 6 7 0 7 29 1 6 0 7 + 30 1 32 6 0 33 1 6 34 0 35 1 32 6 0 + 36 1 6 10 0 40 2 10 0 0 0 43 2 6 0 44 + 0 45 0 6 0 47 0 7 0 48 2 6 0 7 10 49 + 0 51 0 52 1 6 7 0 53 2 51 0 7 10 54 1 + 6 0 0 55 1 6 51 0 56 2 51 0 0 0 57 1 + 51 8 0 59 0 6 0 60 1 51 7 0 61 1 51 + 10 0 62 1 51 0 0 63 1 6 0 51 64 2 6 0 + 0 0 65 2 6 67 0 0 68 2 6 0 0 0 71 2 + 76 73 74 75 77 2 0 78 79 80 81 1 76 + 82 75 83 1 0 84 80 85 1 76 82 75 86 1 + 0 84 80 87 1 7 88 0 89 1 90 7 0 91 1 + 90 94 0 95 2 98 0 6 97 99 1 7 84 80 + 100 2 103 98 101 102 104 1 0 88 0 105 + 0 7 0 106 2 107 0 10 7 108 1 107 109 + 0 110 2 6 7 0 10 111 3 107 7 0 109 7 + 112 0 7 0 117 0 0 0 118 1 7 119 0 120 + 0 75 0 121 1 0 119 0 122 1 6 7 0 123 + 2 0 0 0 12 124 2 6 0 0 0 125 2 6 119 + 0 0 126 2 6 8 0 0 127 2 0 128 0 0 129 + 0 75 0 130 2 7 0 10 0 131 3 0 0 0 132 + 0 133 2 6 0 7 0 134 3 6 0 0 132 0 135 + 1 6 0 0 138 1 140 6 0 141 2 6 142 0 + 142 143 1 140 6 0 144 2 140 0 0 0 145 + 2 0 142 142 142 146 2 7 0 0 10 147 2 + 6 0 0 0 148 2 6 0 0 0 149 2 0 0 0 0 + 150 2 0 151 0 0 152 2 6 119 0 0 153 2 + 140 0 6 6 154 2 0 155 142 0 156 1 6 8 + 0 157 2 6 151 0 0 158 2 6 119 0 7 159 + 2 0 119 0 0 160 0 140 0 161 1 140 0 6 + 162 1 8 0 0 163 2 140 0 0 109 164 2 + 140 0 0 0 165 2 140 0 0 0 166 2 140 0 + 0 10 167 2 0 142 0 142 168 2 0 10 0 0 + 169 1 170 98 6 171 1 0 88 0 172 1 170 + 6 6 173 1 0 0 0 174 1 75 8 0 175 1 75 + 0 0 176 1 75 6 0 177 1 75 0 0 178 2 + 75 0 0 0 179 2 75 0 6 0 180 2 0 80 80 + 80 181 1 182 82 75 183 1 0 84 80 184 + 2 7 0 0 0 185 2 0 7 142 7 186 1 0 10 + 0 187 1 7 0 0 188 2 7 0 0 0 189 2 0 + 67 0 0 190 1 191 0 109 192 1 191 0 0 + 193 2 6 0 191 0 194 1 0 0 0 195 2 0 + 107 0 10 113 1 0 14 0 15 1 0 0 51 66 + 2 0 10 0 14 18 1 0 84 80 184 1 0 0 0 + 174 1 0 88 0 172 2 0 78 79 80 81 2 0 + 0 0 10 70 2 0 0 0 10 72 2 0 128 0 0 + 129 1 0 115 0 116 1 0 7 0 114 2 0 0 0 + 0 150 2 0 151 0 0 152 2 0 10 0 0 169 + 1 0 119 0 122 3 0 0 0 12 10 46 2 0 19 + 0 14 42 2 0 10 0 12 41 1 0 51 0 58 1 + 0 34 0 39 2 0 67 0 10 69 1 0 0 0 195 + 0 0 0 118 2 0 80 80 80 181 1 0 84 80 + 87 1 0 84 80 85 1 0 88 0 105 3 0 0 0 + 12 0 25 3 0 0 0 14 22 23 3 0 0 0 14 + 27 28 3 0 0 0 12 7 31 2 0 0 0 37 38 1 + 0 10 0 187 2 0 142 0 142 168 2 0 7 + 142 7 186 2 0 142 142 142 146 2 0 67 + 0 0 190 3 0 0 0 132 0 133 2 0 0 0 132 + 136 1 0 0 0 137 2 0 0 0 12 139 2 0 10 + 0 12 16 2 0 19 0 14 20 2 0 0 0 12 124 + 2 0 119 0 0 160 2 0 155 142 0 156 1 0 + 0 12 50))))) + '|lookupComplete|)) @ \section{package UPOLYC2 UnivariatePolynomialCategoryFunctions2} <<package UPOLYC2 UnivariatePolynomialCategoryFunctions2>>= diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet index 28327621..224452fc 100644 --- a/src/algebra/triset.spad.pamphlet +++ b/src/algebra/triset.spad.pamphlet @@ -495,15 +495,205 @@ Note that this code is not included in the generated catdef.spad file. <<TSETCAT.lsp BOOTSTRAP>>= -(|/VERSIONCHECK| 2) - -(SETQ |TriangularSetCategory;CAT| (QUOTE NIL)) - -(SETQ |TriangularSetCategory;AL| (QUOTE NIL)) - -(DEFUN |TriangularSetCategory| (|&REST| #1=#:G82394 |&AUX| #2=#:G82392) (DSETQ #2# #1#) (LET (#3=#:G82393) (COND ((SETQ #3# (|assoc| (|devaluateList| #2#) |TriangularSetCategory;AL|)) (CDR #3#)) (T (SETQ |TriangularSetCategory;AL| (|cons5| (CONS (|devaluateList| #2#) (SETQ #3# (APPLY (FUNCTION |TriangularSetCategory;|) #2#))) |TriangularSetCategory;AL|)) #3#)))) - -(DEFUN |TriangularSetCategory;| (|t#1| |t#2| |t#3| |t#4|) (PROG (#1=#:G82391) (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|))) (COND (|TriangularSetCategory;CAT|) ((QUOTE T) (LETT |TriangularSetCategory;CAT| (|Join| (|PolynomialSetCategory| (QUOTE |t#1|) (QUOTE |t#2|) (QUOTE |t#3|) (QUOTE |t#4|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|infRittWu?| ((|Boolean|) |$| |$|)) T) ((|basicSet| ((|Union| (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed") (|List| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|basicSet| ((|Union| (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed") (|List| |t#4|) (|Mapping| (|Boolean|) |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|initials| ((|List| |t#4|) |$|)) T) ((|degree| ((|NonNegativeInteger|) |$|)) T) ((|quasiComponent| ((|Record| (|:| |close| (|List| |t#4|)) (|:| |open| (|List| |t#4|))) |$|)) T) ((|normalized?| ((|Boolean|) |t#4| |$|)) T) ((|normalized?| ((|Boolean|) |$|)) T) ((|reduced?| ((|Boolean|) |t#4| |$| (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|stronglyReduced?| ((|Boolean|) |t#4| |$|)) T) ((|headReduced?| ((|Boolean|) |t#4| |$|)) T) ((|initiallyReduced?| ((|Boolean|) |t#4| |$|)) T) ((|autoReduced?| ((|Boolean|) |$| (|Mapping| (|Boolean|) |t#4| (|List| |t#4|)))) T) ((|stronglyReduced?| ((|Boolean|) |$|)) T) ((|headReduced?| ((|Boolean|) |$|)) T) ((|initiallyReduced?| ((|Boolean|) |$|)) T) ((|reduce| (|t#4| |t#4| |$| (|Mapping| |t#4| |t#4| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|rewriteSetWithReduction| ((|List| |t#4|) (|List| |t#4|) |$| (|Mapping| |t#4| |t#4| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|stronglyReduce| (|t#4| |t#4| |$|)) T) ((|headReduce| (|t#4| |t#4| |$|)) T) ((|initiallyReduce| (|t#4| |t#4| |$|)) T) ((|removeZero| (|t#4| |t#4| |$|)) T) ((|collectQuasiMonic| (|$| |$|)) T) ((|reduceByQuasiMonic| (|t#4| |t#4| |$|)) T) ((|zeroSetSplit| ((|List| |$|) (|List| |t#4|))) T) ((|zeroSetSplitIntoTriangularSystems| ((|List| (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|)))) (|List| |t#4|))) T) ((|first| ((|Union| |t#4| "failed") |$|)) T) ((|last| ((|Union| |t#4| "failed") |$|)) T) ((|rest| ((|Union| |$| "failed") |$|)) T) ((|algebraicVariables| ((|List| |t#3|) |$|)) T) ((|algebraic?| ((|Boolean|) |t#3| |$|)) T) ((|select| ((|Union| |t#4| "failed") |$| |t#3|)) T) ((|extendIfCan| ((|Union| |$| "failed") |$| |t#4|)) T) ((|extend| (|$| |$| |t#4|)) T) ((|coHeight| ((|NonNegativeInteger|) |$|)) (|has| |t#3| (|Finite|))))) (QUOTE ((|finiteAggregate| T) (|shallowlyMutable| T))) (QUOTE ((|NonNegativeInteger|) (|Boolean|) (|List| |t#3|) (|List| (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|)))) (|List| |t#4|) (|List| |$|))) NIL)) . #2=(|TriangularSetCategory|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |TriangularSetCategory|) (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|) (|devaluate| |t#4|))))))) +(/VERSIONCHECK 2) + +(DEFPARAMETER |TriangularSetCategory;CAT| 'NIL) + +(DEFPARAMETER |TriangularSetCategory;AL| 'NIL) + +(DEFUN |TriangularSetCategory| (&REST #0=#:G1439 &AUX #1=#:G1437) + (DSETQ #1# #0#) + (LET (#2=#:G1438) + (COND + ((SETQ #2# + (|assoc| (|devaluateList| #1#) |TriangularSetCategory;AL|)) + (CDR #2#)) + (T (SETQ |TriangularSetCategory;AL| + (|cons5| (CONS (|devaluateList| #1#) + (SETQ #2# + (APPLY #'|TriangularSetCategory;| + #1#))) + |TriangularSetCategory;AL|)) + #2#)))) + +(DEFUN |TriangularSetCategory;| (|t#1| |t#2| |t#3| |t#4|) + (PROG (#0=#:G1436) + (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|))) + (COND + (|TriangularSetCategory;CAT|) + ('T + (LETT |TriangularSetCategory;CAT| + (|Join| (|PolynomialSetCategory| '|t#1| + '|t#2| '|t#3| '|t#4|) + (|mkCategory| '|domain| + '(((|infRittWu?| + ((|Boolean|) $ $)) + T) + ((|basicSet| + ((|Union| + (|Record| (|:| |bas| $) + (|:| |top| + (|List| |t#4|))) + "failed") + (|List| |t#4|) + (|Mapping| (|Boolean|) + |t#4| |t#4|))) + T) + ((|basicSet| + ((|Union| + (|Record| (|:| |bas| $) + (|:| |top| + (|List| |t#4|))) + "failed") + (|List| |t#4|) + (|Mapping| (|Boolean|) + |t#4|) + (|Mapping| (|Boolean|) + |t#4| |t#4|))) + T) + ((|initials| + ((|List| |t#4|) $)) + T) + ((|degree| + ((|NonNegativeInteger|) $)) + T) + ((|quasiComponent| + ((|Record| + (|:| |close| + (|List| |t#4|)) + (|:| |open| + (|List| |t#4|))) + $)) + T) + ((|normalized?| + ((|Boolean|) |t#4| $)) + T) + ((|normalized?| + ((|Boolean|) $)) + T) + ((|reduced?| + ((|Boolean|) |t#4| $ + (|Mapping| (|Boolean|) + |t#4| |t#4|))) + T) + ((|stronglyReduced?| + ((|Boolean|) |t#4| $)) + T) + ((|headReduced?| + ((|Boolean|) |t#4| $)) + T) + ((|initiallyReduced?| + ((|Boolean|) |t#4| $)) + T) + ((|autoReduced?| + ((|Boolean|) $ + (|Mapping| (|Boolean|) + |t#4| (|List| |t#4|)))) + T) + ((|stronglyReduced?| + ((|Boolean|) $)) + T) + ((|headReduced?| + ((|Boolean|) $)) + T) + ((|initiallyReduced?| + ((|Boolean|) $)) + T) + ((|reduce| + (|t#4| |t#4| $ + (|Mapping| |t#4| |t#4| + |t#4|) + (|Mapping| (|Boolean|) + |t#4| |t#4|))) + T) + ((|rewriteSetWithReduction| + ((|List| |t#4|) + (|List| |t#4|) $ + (|Mapping| |t#4| |t#4| + |t#4|) + (|Mapping| (|Boolean|) + |t#4| |t#4|))) + T) + ((|stronglyReduce| + (|t#4| |t#4| $)) + T) + ((|headReduce| + (|t#4| |t#4| $)) + T) + ((|initiallyReduce| + (|t#4| |t#4| $)) + T) + ((|removeZero| + (|t#4| |t#4| $)) + T) + ((|collectQuasiMonic| ($ $)) + T) + ((|reduceByQuasiMonic| + (|t#4| |t#4| $)) + T) + ((|zeroSetSplit| + ((|List| $) + (|List| |t#4|))) + T) + ((|zeroSetSplitIntoTriangularSystems| + ((|List| + (|Record| + (|:| |close| $) + (|:| |open| + (|List| |t#4|)))) + (|List| |t#4|))) + T) + ((|first| + ((|Union| |t#4| "failed") + $)) + T) + ((|last| + ((|Union| |t#4| "failed") + $)) + T) + ((|rest| + ((|Union| $ "failed") $)) + T) + ((|algebraicVariables| + ((|List| |t#3|) $)) + T) + ((|algebraic?| + ((|Boolean|) |t#3| $)) + T) + ((|select| + ((|Union| |t#4| "failed") + $ |t#3|)) + T) + ((|extendIfCan| + ((|Union| $ "failed") $ + |t#4|)) + T) + ((|extend| ($ $ |t#4|)) T) + ((|coHeight| + ((|NonNegativeInteger|) $)) + (|has| |t#3| (|Finite|)))) + '((|finiteAggregate| T) + (|shallowlyMutable| T)) + '((|NonNegativeInteger|) + (|Boolean|) (|List| |t#3|) + (|List| + (|Record| (|:| |close| $) + (|:| |open| + (|List| |t#4|)))) + (|List| |t#4|) (|List| $)) + NIL)) + . #1=(|TriangularSetCategory|))))) . #1#) + (SETELT #0# 0 + (LIST '|TriangularSetCategory| (|devaluate| |t#1|) + (|devaluate| |t#2|) (|devaluate| |t#3|) + (|devaluate| |t#4|))))))) @ \section{TSETCAT-.lsp BOOTSTRAP} {\bf TSETCAT-} depends on a chain of files. @@ -516,6 +706,980 @@ This is eventually forcibly replaced by a recompiled version. Note that this code is not included in the generated catdef.spad file. <<TSETCAT-.lsp BOOTSTRAP>>= + +(/VERSIONCHECK 2) + +(DEFUN |TSETCAT-;=;2SB;1| (|ts| |us| $) + (PROG (#0=#:G1444 #1=#:G1450) + (RETURN + (COND + ((SPADCALL |ts| (QREFELT $ 12)) (SPADCALL |us| (QREFELT $ 12))) + ((OR (SPADCALL |us| (QREFELT $ 12)) + (NULL (SPADCALL + (PROG2 (LETT #0# (SPADCALL |ts| (QREFELT $ 14)) + |TSETCAT-;=;2SB;1|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 10) + #0#)) + (PROG2 (LETT #0# (SPADCALL |us| (QREFELT $ 14)) + |TSETCAT-;=;2SB;1|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 10) + #0#)) + (QREFELT $ 15)))) + 'NIL) + ('T + (SPADCALL + (PROG2 (LETT #1# (SPADCALL |ts| (QREFELT $ 17)) + |TSETCAT-;=;2SB;1|) + (QCDR #1#) + (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#)) + (PROG2 (LETT #1# (SPADCALL |us| (QREFELT $ 17)) + |TSETCAT-;=;2SB;1|) + (QCDR #1#) + (|check-union| (QEQCAR #1# 0) (QREFELT $ 6) #1#)) + (QREFELT $ 18))))))) + +(DEFUN |TSETCAT-;infRittWu?;2SB;2| (|ts| |us| $) + (PROG (|p| #0=#:G1457 |q| |v|) + (RETURN + (SEQ (COND + ((SPADCALL |us| (QREFELT $ 12)) + (SPADCALL (SPADCALL |ts| (QREFELT $ 12)) (QREFELT $ 20))) + ((SPADCALL |ts| (QREFELT $ 12)) 'NIL) + ('T + (SEQ (LETT |p| + (PROG2 (LETT #0# + (SPADCALL |ts| (QREFELT $ 21)) + |TSETCAT-;infRittWu?;2SB;2|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 10) + #0#)) + |TSETCAT-;infRittWu?;2SB;2|) + (LETT |q| + (PROG2 (LETT #0# + (SPADCALL |us| (QREFELT $ 21)) + |TSETCAT-;infRittWu?;2SB;2|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 10) + #0#)) + |TSETCAT-;infRittWu?;2SB;2|) + (EXIT (COND + ((SPADCALL |p| |q| (QREFELT $ 22)) 'T) + ((SPADCALL |p| |q| (QREFELT $ 23)) 'NIL) + ('T + (SEQ (LETT |v| + (SPADCALL |p| (QREFELT $ 24)) + |TSETCAT-;infRittWu?;2SB;2|) + (EXIT (SPADCALL + (SPADCALL |ts| |v| + (QREFELT $ 25)) + (SPADCALL |us| |v| + (QREFELT $ 25)) + (QREFELT $ 26)))))))))))))) + +(DEFUN |TSETCAT-;reduced?;PSMB;3| (|p| |ts| |redOp?| $) + (PROG (|lp|) + (RETURN + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;reduced?;PSMB;3|) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp|) 'NIL) + ('T + (SPADCALL |p| (|SPADfirst| |lp|) |redOp?|)))) + (GO G191))) + (SEQ (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;reduced?;PSMB;3|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (NULL |lp|)))))) + +(DEFUN |TSETCAT-;basicSet;LMU;4| (|ps| |redOp?| $) + (PROG (|b| |bs| |p| |ts|) + (RETURN + (SEQ (LETT |ps| (SPADCALL (ELT $ 32) |ps| (QREFELT $ 34)) + |TSETCAT-;basicSet;LMU;4|) + (EXIT (COND + ((SPADCALL (ELT $ 35) |ps| (QREFELT $ 36)) + (CONS 1 "failed")) + ('T + (SEQ (LETT |ps| + (SPADCALL (ELT $ 22) |ps| + (QREFELT $ 37)) + |TSETCAT-;basicSet;LMU;4|) + (LETT |bs| (SPADCALL (QREFELT $ 38)) + |TSETCAT-;basicSet;LMU;4|) + (LETT |ts| NIL |TSETCAT-;basicSet;LMU;4|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |ps|) + (QREFELT $ 20))) + (GO G191))) + (SEQ (LETT |b| (|SPADfirst| |ps|) + |TSETCAT-;basicSet;LMU;4|) + (LETT |bs| + (SPADCALL |bs| |b| (QREFELT $ 39)) + |TSETCAT-;basicSet;LMU;4|) + (LETT |ps| (CDR |ps|) + |TSETCAT-;basicSet;LMU;4|) + (EXIT + (SEQ G190 + (COND + ((NULL + (COND + ((NULL |ps|) 'NIL) + ('T + (SPADCALL + (SPADCALL + (LETT |p| + (|SPADfirst| |ps|) + |TSETCAT-;basicSet;LMU;4|) + |bs| |redOp?| + (QREFELT $ 40)) + (QREFELT $ 20))))) + (GO G191))) + (SEQ + (LETT |ts| (CONS |p| |ts|) + |TSETCAT-;basicSet;LMU;4|) + (EXIT + (LETT |ps| (CDR |ps|) + |TSETCAT-;basicSet;LMU;4|))) + NIL (GO G190) G191 (EXIT NIL)))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (CONS 0 (CONS |bs| |ts|))))))))))) + +(DEFUN |TSETCAT-;basicSet;LMMU;5| (|ps| |pred?| |redOp?| $) + (PROG (|bps| |b| |bs| |p| |gps| |ts|) + (RETURN + (SEQ (LETT |ps| (SPADCALL (ELT $ 32) |ps| (QREFELT $ 34)) + |TSETCAT-;basicSet;LMMU;5|) + (EXIT (COND + ((SPADCALL (ELT $ 35) |ps| (QREFELT $ 36)) + (CONS 1 "failed")) + ('T + (SEQ (LETT |gps| NIL |TSETCAT-;basicSet;LMMU;5|) + (LETT |bps| NIL |TSETCAT-;basicSet;LMMU;5|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |ps|) + (QREFELT $ 20))) + (GO G191))) + (SEQ (LETT |p| (|SPADfirst| |ps|) + |TSETCAT-;basicSet;LMMU;5|) + (LETT |ps| (CDR |ps|) + |TSETCAT-;basicSet;LMMU;5|) + (EXIT + (COND + ((SPADCALL |p| |pred?|) + (LETT |gps| (CONS |p| |gps|) + |TSETCAT-;basicSet;LMMU;5|)) + ('T + (LETT |bps| (CONS |p| |bps|) + |TSETCAT-;basicSet;LMMU;5|))))) + NIL (GO G190) G191 (EXIT NIL)) + (LETT |gps| + (SPADCALL (ELT $ 22) |gps| + (QREFELT $ 37)) + |TSETCAT-;basicSet;LMMU;5|) + (LETT |bs| (SPADCALL (QREFELT $ 38)) + |TSETCAT-;basicSet;LMMU;5|) + (LETT |ts| NIL |TSETCAT-;basicSet;LMMU;5|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |gps|) + (QREFELT $ 20))) + (GO G191))) + (SEQ (LETT |b| (|SPADfirst| |gps|) + |TSETCAT-;basicSet;LMMU;5|) + (LETT |bs| + (SPADCALL |bs| |b| (QREFELT $ 39)) + |TSETCAT-;basicSet;LMMU;5|) + (LETT |gps| (CDR |gps|) + |TSETCAT-;basicSet;LMMU;5|) + (EXIT + (SEQ G190 + (COND + ((NULL + (COND + ((NULL |gps|) 'NIL) + ('T + (SPADCALL + (SPADCALL + (LETT |p| + (|SPADfirst| |gps|) + |TSETCAT-;basicSet;LMMU;5|) + |bs| |redOp?| + (QREFELT $ 40)) + (QREFELT $ 20))))) + (GO G191))) + (SEQ + (LETT |ts| (CONS |p| |ts|) + |TSETCAT-;basicSet;LMMU;5|) + (EXIT + (LETT |gps| (CDR |gps|) + |TSETCAT-;basicSet;LMMU;5|))) + NIL (GO G190) G191 (EXIT NIL)))) + NIL (GO G190) G191 (EXIT NIL)) + (LETT |ts| + (SPADCALL (ELT $ 22) + (SPADCALL |ts| |bps| (QREFELT $ 44)) + (QREFELT $ 37)) + |TSETCAT-;basicSet;LMMU;5|) + (EXIT (CONS 0 (CONS |bs| |ts|))))))))))) + +(DEFUN |TSETCAT-;initials;SL;6| (|ts| $) + (PROG (|p| |ip| |lip| |lp|) + (RETURN + (SEQ (LETT |lip| NIL |TSETCAT-;initials;SL;6|) + (EXIT (COND + ((SPADCALL |ts| (QREFELT $ 12)) |lip|) + ('T + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;initials;SL;6|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |lp|) + (QREFELT $ 20))) + (GO G191))) + (SEQ (LETT |p| (|SPADfirst| |lp|) + |TSETCAT-;initials;SL;6|) + (COND + ((NULL + (SPADCALL + (LETT |ip| + (SPADCALL |p| (QREFELT $ 46)) + |TSETCAT-;initials;SL;6|) + (QREFELT $ 35))) + (LETT |lip| + (CONS + (SPADCALL |ip| (QREFELT $ 47)) + |lip|) + |TSETCAT-;initials;SL;6|))) + (EXIT + (LETT |lp| (CDR |lp|) + |TSETCAT-;initials;SL;6|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |lip| (QREFELT $ 48))))))))))) + +(DEFUN |TSETCAT-;degree;SNni;7| (|ts| $) + (PROG (|lp| |d|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 12)) 0) + ('T + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;degree;SNni;7|) + (LETT |d| + (SPADCALL (|SPADfirst| |lp|) (QREFELT $ 51)) + |TSETCAT-;degree;SNni;7|) + (SEQ G190 + (COND + ((NULL (SPADCALL + (NULL + (LETT |lp| (CDR |lp|) + |TSETCAT-;degree;SNni;7|)) + (QREFELT $ 20))) + (GO G191))) + (SEQ (EXIT (LETT |d| + (* |d| + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 51))) + |TSETCAT-;degree;SNni;7|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |d|)))))))) + +(DEFUN |TSETCAT-;quasiComponent;SR;8| (|ts| $) + (CONS (SPADCALL |ts| (QREFELT $ 29)) (SPADCALL |ts| (QREFELT $ 53)))) + +(DEFUN |TSETCAT-;normalized?;PSB;9| (|p| |ts| $) + (SPADCALL |p| (SPADCALL |ts| (QREFELT $ 29)) (QREFELT $ 57))) + +(DEFUN |TSETCAT-;stronglyReduced?;PSB;10| (|p| |ts| $) + (SPADCALL |p| (SPADCALL |ts| (QREFELT $ 29)) (QREFELT $ 59))) + +(DEFUN |TSETCAT-;headReduced?;PSB;11| (|p| |ts| $) + (SPADCALL (SPADCALL |p| (QREFELT $ 61)) |ts| (QREFELT $ 62))) + +(DEFUN |TSETCAT-;initiallyReduced?;PSB;12| (|p| |ts| $) + (PROG (|lp| |red|) + (RETURN + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;initiallyReduced?;PSB;12|) + (LETT |red| 'T |TSETCAT-;initiallyReduced?;PSB;12|) + (SEQ G190 + (COND + ((NULL (COND + ((OR (NULL |lp|) + (SPADCALL |p| (QREFELT $ 35))) + 'NIL) + ('T |red|))) + (GO G191))) + (SEQ (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp|) 'NIL) + ('T + (SPADCALL + (SPADCALL |p| (QREFELT $ 24)) + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 24)) + (QREFELT $ 64))))) + (GO G191))) + (SEQ (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;initiallyReduced?;PSB;12|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((NULL (NULL |lp|)) + (COND + ((SPADCALL + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 24)) + (SPADCALL |p| (QREFELT $ 24)) + (QREFELT $ 65)) + (COND + ((SPADCALL |p| (|SPADfirst| |lp|) + (QREFELT $ 66)) + (SEQ + (LETT |lp| (CDR |lp|) + |TSETCAT-;initiallyReduced?;PSB;12|) + (EXIT + (LETT |p| + (SPADCALL |p| (QREFELT $ 46)) + |TSETCAT-;initiallyReduced?;PSB;12|)))) + ('T + (LETT |red| 'NIL + |TSETCAT-;initiallyReduced?;PSB;12|)))) + ('T + (LETT |p| + (SPADCALL |p| (QREFELT $ 46)) + |TSETCAT-;initiallyReduced?;PSB;12|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |red|))))) + +(DEFUN |TSETCAT-;reduce;PSMMP;13| (|p| |ts| |redOp| |redOp?| $) + (PROG (|ts0| #0=#:G1532 |reductor| #1=#:G1535) + (RETURN + (SEQ (COND + ((OR (SPADCALL |ts| (QREFELT $ 12)) + (SPADCALL |p| (QREFELT $ 35))) + |p|) + ('T + (SEQ (LETT |ts0| |ts| |TSETCAT-;reduce;PSMMP;13|) + (SEQ G190 + (COND + ((NULL (COND + ((SPADCALL |ts| (QREFELT $ 12)) + 'NIL) + ('T + (SPADCALL + (SPADCALL |p| (QREFELT $ 35)) + (QREFELT $ 20))))) + (GO G191))) + (SEQ (LETT |reductor| + (PROG2 + (LETT #0# + (SPADCALL |ts| (QREFELT $ 14)) + |TSETCAT-;reduce;PSMMP;13|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 10) #0#)) + |TSETCAT-;reduce;PSMMP;13|) + (LETT |ts| + (PROG2 + (LETT #1# + (SPADCALL |ts| (QREFELT $ 17)) + |TSETCAT-;reduce;PSMMP;13|) + (QCDR #1#) + (|check-union| (QEQCAR #1# 0) + (QREFELT $ 6) #1#)) + |TSETCAT-;reduce;PSMMP;13|) + (EXIT (COND + ((NULL + (SPADCALL |p| |reductor| + |redOp?|)) + (SEQ + (LETT |p| + (SPADCALL |p| |reductor| + |redOp|) + |TSETCAT-;reduce;PSMMP;13|) + (EXIT + (LETT |ts| |ts0| + |TSETCAT-;reduce;PSMMP;13|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT |p|)))))))) + +(DEFUN |TSETCAT-;rewriteSetWithReduction;LSMML;14| + (|lp| |ts| |redOp| |redOp?| $) + (PROG (|p| |rs|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 70)) |lp|) + ('T + (SEQ (LETT |lp| (SPADCALL (ELT $ 32) |lp| (QREFELT $ 34)) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (EXIT (COND + ((NULL |lp|) |lp|) + ((SPADCALL (ELT $ 35) |lp| (QREFELT $ 36)) + (LIST (|spadConstant| $ 71))) + ('T + (SEQ (LETT |rs| NIL + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (SEQ G190 + (COND + ((NULL + (SPADCALL (NULL |lp|) + (QREFELT $ 20))) + (GO G191))) + (SEQ + (LETT |p| (|SPADfirst| |lp|) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (LETT |lp| (CDR |lp|) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (LETT |p| + (SPADCALL + (SPADCALL |p| |ts| |redOp| + |redOp?| (QREFELT $ 72)) + (QREFELT $ 47)) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (EXIT + (COND + ((NULL + (SPADCALL |p| + (QREFELT $ 32))) + (COND + ((SPADCALL |p| + (QREFELT $ 35)) + (SEQ + (LETT |lp| NIL + |TSETCAT-;rewriteSetWithReduction;LSMML;14|) + (EXIT + (LETT |rs| + (LIST + (|spadConstant| $ 71)) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|)))) + ('T + (LETT |rs| + (CONS |p| |rs|) + |TSETCAT-;rewriteSetWithReduction;LSMML;14|))))))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |rs| (QREFELT $ 48)))))))))))))) + +(DEFUN |TSETCAT-;stronglyReduce;PSP;15| (|p| |ts| $) + (SPADCALL |p| |ts| (ELT $ 74) (ELT $ 66) (QREFELT $ 72))) + +(DEFUN |TSETCAT-;headReduce;PSP;16| (|p| |ts| $) + (SPADCALL |p| |ts| (ELT $ 76) (ELT $ 77) (QREFELT $ 72))) + +(DEFUN |TSETCAT-;initiallyReduce;PSP;17| (|p| |ts| $) + (SPADCALL |p| |ts| (ELT $ 79) (ELT $ 80) (QREFELT $ 72))) + +(DEFUN |TSETCAT-;removeZero;PSP;18| (|p| |ts| $) + (PROG (|v| |tsv-| #0=#:G1558 #1=#:G1567 |q|) + (RETURN + (SEQ (EXIT (COND + ((OR (SPADCALL |p| (QREFELT $ 35)) + (SPADCALL |ts| (QREFELT $ 12))) + |p|) + ('T + (SEQ (LETT |v| (SPADCALL |p| (QREFELT $ 24)) + |TSETCAT-;removeZero;PSP;18|) + (LETT |tsv-| + (SPADCALL |ts| |v| (QREFELT $ 82)) + |TSETCAT-;removeZero;PSP;18|) + (COND + ((SPADCALL |v| |ts| (QREFELT $ 83)) + (SEQ (LETT |q| + (SPADCALL |p| + (PROG2 + (LETT #0# + (SPADCALL |ts| |v| + (QREFELT $ 84)) + |TSETCAT-;removeZero;PSP;18|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) + (QREFELT $ 10) #0#)) + (QREFELT $ 74)) + |TSETCAT-;removeZero;PSP;18|) + (EXIT (COND + ((SPADCALL |q| (QREFELT $ 32)) + (PROGN + (LETT #1# |q| + |TSETCAT-;removeZero;PSP;18|) + (GO #1#))) + ((SPADCALL + (SPADCALL |q| |tsv-| + (QREFELT $ 85)) + (QREFELT $ 32)) + (PROGN + (LETT #1# + (|spadConstant| $ 86) + |TSETCAT-;removeZero;PSP;18|) + (GO #1#)))))))) + (EXIT (COND + ((SPADCALL |tsv-| (QREFELT $ 12)) |p|) + ('T + (SEQ (LETT |q| (|spadConstant| $ 86) + |TSETCAT-;removeZero;PSP;18|) + (SEQ G190 + (COND + ((NULL + (SPADCALL + (SPADCALL |p| |v| + (QREFELT $ 87)) + (QREFELT $ 89))) + (GO G191))) + (SEQ + (LETT |q| + (SPADCALL + (SPADCALL + (SPADCALL + (SPADCALL |p| + (QREFELT $ 46)) + |tsv-| (QREFELT $ 85)) + (SPADCALL |p| + (QREFELT $ 90)) + (QREFELT $ 91)) + |q| (QREFELT $ 92)) + |TSETCAT-;removeZero;PSP;18|) + (EXIT + (LETT |p| + (SPADCALL |p| + (QREFELT $ 93)) + |TSETCAT-;removeZero;PSP;18|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT + (SPADCALL |q| + (SPADCALL |p| |tsv-| + (QREFELT $ 85)) + (QREFELT $ 92))))))))))) + #1# (EXIT #1#))))) + +(DEFUN |TSETCAT-;reduceByQuasiMonic;PSP;19| (|p| |ts| $) + (COND + ((OR (SPADCALL |p| (QREFELT $ 35)) (SPADCALL |ts| (QREFELT $ 12))) + |p|) + ('T + (QVELT (SPADCALL |p| (SPADCALL |ts| (QREFELT $ 95)) + (QREFELT $ 97)) + 1)))) + +(DEFUN |TSETCAT-;autoReduced?;SMB;20| (|ts| |redOp?| $) + (PROG (|p| |lp|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 12)) 'T) + ('T + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;autoReduced?;SMB;20|) + (LETT |p| (|SPADfirst| |lp|) + |TSETCAT-;autoReduced?;SMB;20|) + (LETT |lp| (CDR |lp|) + |TSETCAT-;autoReduced?;SMB;20|) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp|) 'NIL) + ('T (SPADCALL |p| |lp| |redOp?|)))) + (GO G191))) + (SEQ (LETT |p| (|SPADfirst| |lp|) + |TSETCAT-;autoReduced?;SMB;20|) + (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;autoReduced?;SMB;20|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (NULL |lp|))))))))) + +(DEFUN |TSETCAT-;stronglyReduced?;SB;21| (|ts| $) + (SPADCALL |ts| (ELT $ 59) (QREFELT $ 101))) + +(DEFUN |TSETCAT-;normalized?;SB;22| (|ts| $) + (SPADCALL |ts| (ELT $ 57) (QREFELT $ 101))) + +(DEFUN |TSETCAT-;headReduced?;SB;23| (|ts| $) + (SPADCALL |ts| (ELT $ 104) (QREFELT $ 101))) + +(DEFUN |TSETCAT-;initiallyReduced?;SB;24| (|ts| $) + (SPADCALL |ts| (ELT $ 106) (QREFELT $ 101))) + +(DEFUN |TSETCAT-;mvar;SV;25| (|ts| $) + (PROG (#0=#:G1586) + (RETURN + (COND + ((SPADCALL |ts| (QREFELT $ 12)) + (|error| "Error from TSETCAT in mvar : #1 is empty")) + ('T + (SPADCALL + (PROG2 (LETT #0# (SPADCALL |ts| (QREFELT $ 14)) + |TSETCAT-;mvar;SV;25|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (QREFELT $ 10) #0#)) + (QREFELT $ 24))))))) + +(DEFUN |TSETCAT-;first;SU;26| (|ts| $) + (PROG (|lp|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 12)) (CONS 1 "failed")) + ('T + (SEQ (LETT |lp| + (SPADCALL (ELT $ 23) + (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;first;SU;26|) + (EXIT (CONS 0 (|SPADfirst| |lp|)))))))))) + +(DEFUN |TSETCAT-;last;SU;27| (|ts| $) + (PROG (|lp|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 12)) (CONS 1 "failed")) + ('T + (SEQ (LETT |lp| + (SPADCALL (ELT $ 22) + (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;last;SU;27|) + (EXIT (CONS 0 (|SPADfirst| |lp|)))))))))) + +(DEFUN |TSETCAT-;rest;SU;28| (|ts| $) + (PROG (|lp|) + (RETURN + (SEQ (COND + ((SPADCALL |ts| (QREFELT $ 12)) (CONS 1 "failed")) + ('T + (SEQ (LETT |lp| + (SPADCALL (ELT $ 23) + (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;rest;SU;28|) + (EXIT (CONS 0 (SPADCALL (CDR |lp|) (QREFELT $ 111))))))))))) + +(DEFUN |TSETCAT-;coerce;SL;29| (|ts| $) + (SPADCALL (ELT $ 23) (SPADCALL |ts| (QREFELT $ 29)) (QREFELT $ 37))) + +(DEFUN |TSETCAT-;algebraicVariables;SL;30| (|ts| $) + (PROG (#0=#:G1611 |p| #1=#:G1612) + (RETURN + (SEQ (PROGN + (LETT #0# NIL |TSETCAT-;algebraicVariables;SL;30|) + (SEQ (LETT |p| NIL |TSETCAT-;algebraicVariables;SL;30|) + (LETT #1# (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;algebraicVariables;SL;30|) + G190 + (COND + ((OR (ATOM #1#) + (PROGN + (LETT |p| (CAR #1#) + |TSETCAT-;algebraicVariables;SL;30|) + NIL)) + (GO G191))) + (SEQ (EXIT (LETT #0# + (CONS (SPADCALL |p| (QREFELT $ 24)) + #0#) + |TSETCAT-;algebraicVariables;SL;30|))) + (LETT #1# (CDR #1#) + |TSETCAT-;algebraicVariables;SL;30|) + (GO G190) G191 (EXIT (NREVERSE0 #0#)))))))) + +(DEFUN |TSETCAT-;algebraic?;VSB;31| (|v| |ts| $) + (SPADCALL |v| (SPADCALL |ts| (QREFELT $ 116)) (QREFELT $ 117))) + +(DEFUN |TSETCAT-;select;SVU;32| (|ts| |v| $) + (PROG (|lp|) + (RETURN + (SEQ (LETT |lp| + (SPADCALL (ELT $ 23) (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;select;SVU;32|) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp|) 'NIL) + ('T + (SPADCALL + (SPADCALL |v| + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 24)) + (QREFELT $ 65)) + (QREFELT $ 20))))) + (GO G191))) + (SEQ (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;select;SVU;32|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (COND + ((NULL |lp|) (CONS 1 "failed")) + ('T (CONS 0 (|SPADfirst| |lp|))))))))) + +(DEFUN |TSETCAT-;collectQuasiMonic;2S;33| (|ts| $) + (PROG (|newlp| |lp|) + (RETURN + (SEQ (LETT |lp| (SPADCALL |ts| (QREFELT $ 29)) + |TSETCAT-;collectQuasiMonic;2S;33|) + (LETT |newlp| NIL |TSETCAT-;collectQuasiMonic;2S;33|) + (SEQ G190 + (COND + ((NULL (SPADCALL (NULL |lp|) (QREFELT $ 20))) + (GO G191))) + (SEQ (COND + ((SPADCALL + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 46)) + (QREFELT $ 35)) + (LETT |newlp| (CONS (|SPADfirst| |lp|) |newlp|) + |TSETCAT-;collectQuasiMonic;2S;33|))) + (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;collectQuasiMonic;2S;33|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |newlp| (QREFELT $ 111))))))) + +(DEFUN |TSETCAT-;collectUnder;SVS;34| (|ts| |v| $) + (PROG (|lp|) + (RETURN + (SEQ (LETT |lp| + (SPADCALL (ELT $ 23) (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;collectUnder;SVS;34|) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp|) 'NIL) + ('T + (SPADCALL + (SPADCALL + (SPADCALL (|SPADfirst| |lp|) + (QREFELT $ 24)) + |v| (QREFELT $ 64)) + (QREFELT $ 20))))) + (GO G191))) + (SEQ (EXIT (LETT |lp| (CDR |lp|) + |TSETCAT-;collectUnder;SVS;34|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL |lp| (QREFELT $ 111))))))) + +(DEFUN |TSETCAT-;collectUpper;SVS;35| (|ts| |v| $) + (PROG (|lp2| |lp1|) + (RETURN + (SEQ (LETT |lp1| + (SPADCALL (ELT $ 23) (SPADCALL |ts| (QREFELT $ 29)) + (QREFELT $ 37)) + |TSETCAT-;collectUpper;SVS;35|) + (LETT |lp2| NIL |TSETCAT-;collectUpper;SVS;35|) + (SEQ G190 + (COND + ((NULL (COND + ((NULL |lp1|) 'NIL) + ('T + (SPADCALL |v| + (SPADCALL (|SPADfirst| |lp1|) + (QREFELT $ 24)) + (QREFELT $ 64))))) + (GO G191))) + (SEQ (LETT |lp2| (CONS (|SPADfirst| |lp1|) |lp2|) + |TSETCAT-;collectUpper;SVS;35|) + (EXIT (LETT |lp1| (CDR |lp1|) + |TSETCAT-;collectUpper;SVS;35|))) + NIL (GO G190) G191 (EXIT NIL)) + (EXIT (SPADCALL (REVERSE |lp2|) (QREFELT $ 111))))))) + +(DEFUN |TSETCAT-;construct;LS;36| (|lp| $) + (PROG (|rif|) + (RETURN + (SEQ (LETT |rif| (SPADCALL |lp| (QREFELT $ 123)) + |TSETCAT-;construct;LS;36|) + (EXIT (COND + ((QEQCAR |rif| 0) (QCDR |rif|)) + ('T + (|error| "in construct : LP -> $ from TSETCAT : bad arg")))))))) + +(DEFUN |TSETCAT-;retractIfCan;LU;37| (|lp| $) + (PROG (|rif|) + (RETURN + (SEQ (COND + ((NULL |lp|) (CONS 0 (SPADCALL (QREFELT $ 38)))) + ('T + (SEQ (LETT |lp| (SPADCALL (ELT $ 23) |lp| (QREFELT $ 37)) + |TSETCAT-;retractIfCan;LU;37|) + (LETT |rif| (SPADCALL (CDR |lp|) (QREFELT $ 123)) + |TSETCAT-;retractIfCan;LU;37|) + (EXIT (COND + ((QEQCAR |rif| 0) + (SPADCALL (QCDR |rif|) (|SPADfirst| |lp|) + (QREFELT $ 125))) + ('T + (|error| "in retractIfCan : LP -> ... from TSETCAT : bad arg"))))))))))) + +(DEFUN |TSETCAT-;extend;SPS;38| (|ts| |p| $) + (PROG (|eif|) + (RETURN + (SEQ (LETT |eif| (SPADCALL |ts| |p| (QREFELT $ 125)) + |TSETCAT-;extend;SPS;38|) + (EXIT (COND + ((QEQCAR |eif| 0) (QCDR |eif|)) + ('T + (|error| "in extend : ($,P) -> $ from TSETCAT : bad ars")))))))) + +(DEFUN |TSETCAT-;coHeight;SNni;39| (|ts| $) + (PROG (|n| |m| #0=#:G1652) + (RETURN + (SEQ (LETT |n| (SPADCALL (QREFELT $ 128)) + |TSETCAT-;coHeight;SNni;39|) + (LETT |m| (LENGTH (SPADCALL |ts| (QREFELT $ 29))) + |TSETCAT-;coHeight;SNni;39|) + (EXIT (PROG2 (LETT #0# (SPADCALL |n| |m| (QREFELT $ 129)) + |TSETCAT-;coHeight;SNni;39|) + (QCDR #0#) + (|check-union| (QEQCAR #0# 0) (|NonNegativeInteger|) + #0#))))))) + +(DEFUN |TriangularSetCategory&| (|#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=(|TriangularSetCategory&|)) + (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 '|TriangularSetCategory&| |dv$1| |dv$2| |dv$3| + |dv$4| |dv$5|) . #0#) + (LETT $ (GETREFV 132) . #0#) + (QSETREFV $ 0 |dv$|) + (QSETREFV $ 3 + (LETT |pv$| + (|buildPredVector| 0 0 + (LIST (|HasCategory| |#4| '(|Finite|)))) . #0#)) + (|stuffDomainSlots| $) + (QSETREFV $ 6 |#1|) + (QSETREFV $ 7 |#2|) + (QSETREFV $ 8 |#3|) + (QSETREFV $ 9 |#4|) + (QSETREFV $ 10 |#5|) + (COND + ((|testBitVector| |pv$| 1) + (QSETREFV $ 130 + (CONS (|dispatchFunction| |TSETCAT-;coHeight;SNni;39|) + $)))) + $)))) + +(MAKEPROP '|TriangularSetCategory&| '|infovec| + (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) + (|local| |#3|) (|local| |#4|) (|local| |#5|) (|Boolean|) + (0 . |empty?|) (|Union| 10 '"failed") (5 . |first|) + (10 . =) (|Union| $ '"failed") (16 . |rest|) (21 . =) + |TSETCAT-;=;2SB;1| (27 . |not|) (32 . |last|) + (37 . |infRittWu?|) (43 . |supRittWu?|) (49 . |mvar|) + (54 . |collectUpper|) (60 . |infRittWu?|) + |TSETCAT-;infRittWu?;2SB;2| (|List| 10) (66 . |members|) + (|Mapping| 11 10 10) |TSETCAT-;reduced?;PSMB;3| + (71 . |zero?|) (|Mapping| 11 10) (76 . |remove|) + (82 . |ground?|) (87 . |any?|) (93 . |sort|) + (99 . |empty|) (103 . |extend|) (109 . |reduced?|) + (|Record| (|:| |bas| $) (|:| |top| 28)) + (|Union| 41 '"failed") |TSETCAT-;basicSet;LMU;4| + (116 . |concat|) |TSETCAT-;basicSet;LMMU;5| (122 . |init|) + (127 . |primPartElseUnitCanonical|) + (132 . |removeDuplicates|) |TSETCAT-;initials;SL;6| + (|NonNegativeInteger|) (137 . |mdeg|) + |TSETCAT-;degree;SNni;7| (142 . |initials|) + (|Record| (|:| |close| 28) (|:| |open| 28)) + |TSETCAT-;quasiComponent;SR;8| (|List| $) + (147 . |normalized?|) |TSETCAT-;normalized?;PSB;9| + (153 . |reduced?|) |TSETCAT-;stronglyReduced?;PSB;10| + (159 . |head|) (164 . |stronglyReduced?|) + |TSETCAT-;headReduced?;PSB;11| (170 . <) (176 . =) + (182 . |reduced?|) |TSETCAT-;initiallyReduced?;PSB;12| + (|Mapping| 10 10 10) |TSETCAT-;reduce;PSMMP;13| + (188 . |trivialIdeal?|) (193 . |One|) (197 . |reduce|) + |TSETCAT-;rewriteSetWithReduction;LSMML;14| + (205 . |lazyPrem|) |TSETCAT-;stronglyReduce;PSP;15| + (211 . |headReduce|) (217 . |headReduced?|) + |TSETCAT-;headReduce;PSP;16| (223 . |initiallyReduce|) + (229 . |initiallyReduced?|) + |TSETCAT-;initiallyReduce;PSP;17| (235 . |collectUnder|) + (241 . |algebraic?|) (247 . |select|) (253 . |removeZero|) + (259 . |Zero|) (263 . |degree|) (|Integer|) + (269 . |positive?|) (274 . |mainMonomial|) (279 . *) + (285 . +) (291 . |tail|) |TSETCAT-;removeZero;PSP;18| + (296 . |collectQuasiMonic|) + (|Record| (|:| |rnum| 7) (|:| |polnum| 10) (|:| |den| 7)) + (301 . |remainder|) |TSETCAT-;reduceByQuasiMonic;PSP;19| + (|Mapping| 11 10 28) |TSETCAT-;autoReduced?;SMB;20| + (307 . |autoReduced?|) |TSETCAT-;stronglyReduced?;SB;21| + |TSETCAT-;normalized?;SB;22| (313 . |headReduced?|) + |TSETCAT-;headReduced?;SB;23| (319 . |initiallyReduced?|) + |TSETCAT-;initiallyReduced?;SB;24| |TSETCAT-;mvar;SV;25| + |TSETCAT-;first;SU;26| |TSETCAT-;last;SU;27| + (325 . |construct|) |TSETCAT-;rest;SU;28| + |TSETCAT-;coerce;SL;29| (|List| 9) + |TSETCAT-;algebraicVariables;SL;30| + (330 . |algebraicVariables|) (335 . |member?|) + |TSETCAT-;algebraic?;VSB;31| |TSETCAT-;select;SVU;32| + |TSETCAT-;collectQuasiMonic;2S;33| + |TSETCAT-;collectUnder;SVS;34| + |TSETCAT-;collectUpper;SVS;35| (341 . |retractIfCan|) + |TSETCAT-;construct;LS;36| (346 . |extendIfCan|) + |TSETCAT-;retractIfCan;LU;37| |TSETCAT-;extend;SPS;38| + (352 . |size|) (356 . |subtractIfCan|) (362 . |coHeight|) + (|OutputForm|)) + '#(|stronglyReduced?| 367 |stronglyReduce| 378 |select| 384 + |rewriteSetWithReduction| 390 |retractIfCan| 398 |rest| + 403 |removeZero| 408 |reduced?| 414 |reduceByQuasiMonic| + 421 |reduce| 427 |quasiComponent| 435 |normalized?| 440 + |mvar| 451 |last| 456 |initials| 461 |initiallyReduced?| + 466 |initiallyReduce| 477 |infRittWu?| 483 |headReduced?| + 489 |headReduce| 500 |first| 506 |extend| 511 |degree| 517 + |construct| 522 |collectUpper| 527 |collectUnder| 533 + |collectQuasiMonic| 539 |coerce| 544 |coHeight| 549 + |basicSet| 554 |autoReduced?| 567 |algebraicVariables| 573 + |algebraic?| 578 = 584) + 'NIL + (CONS (|makeByteWordVec2| 1 'NIL) + (CONS '#() + (CONS '#() + (|makeByteWordVec2| 130 + '(1 6 11 0 12 1 6 13 0 14 2 10 11 0 0 + 15 1 6 16 0 17 2 6 11 0 0 18 1 11 0 0 + 20 1 6 13 0 21 2 10 11 0 0 22 2 10 11 + 0 0 23 1 10 9 0 24 2 6 0 0 9 25 2 6 + 11 0 0 26 1 6 28 0 29 1 10 11 0 32 2 + 28 0 33 0 34 1 10 11 0 35 2 28 11 33 + 0 36 2 28 0 30 0 37 0 6 0 38 2 6 0 0 + 10 39 3 6 11 10 0 30 40 2 28 0 0 0 44 + 1 10 0 0 46 1 10 0 0 47 1 28 0 0 48 1 + 10 50 0 51 1 6 28 0 53 2 10 11 0 56 + 57 2 10 11 0 56 59 1 10 0 0 61 2 6 11 + 10 0 62 2 9 11 0 0 64 2 9 11 0 0 65 2 + 10 11 0 0 66 1 6 11 0 70 0 10 0 71 4 + 6 10 10 0 68 30 72 2 10 0 0 0 74 2 10 + 0 0 0 76 2 10 11 0 0 77 2 10 0 0 0 79 + 2 10 11 0 0 80 2 6 0 0 9 82 2 6 11 9 + 0 83 2 6 13 0 9 84 2 6 10 10 0 85 0 + 10 0 86 2 10 50 0 9 87 1 88 11 0 89 1 + 10 0 0 90 2 10 0 0 0 91 2 10 0 0 0 92 + 1 10 0 0 93 1 6 0 0 95 2 6 96 10 0 97 + 2 6 11 0 99 101 2 10 11 0 56 104 2 10 + 11 0 56 106 1 6 0 28 111 1 6 114 0 + 116 2 114 11 9 0 117 1 6 16 28 123 2 + 6 16 0 10 125 0 9 50 128 2 50 16 0 0 + 129 1 0 50 0 130 1 0 11 0 102 2 0 11 + 10 0 60 2 0 10 10 0 75 2 0 13 0 9 119 + 4 0 28 28 0 68 30 73 1 0 16 28 126 1 + 0 16 0 112 2 0 10 10 0 94 3 0 11 10 0 + 30 31 2 0 10 10 0 98 4 0 10 10 0 68 + 30 69 1 0 54 0 55 1 0 11 0 103 2 0 11 + 10 0 58 1 0 9 0 108 1 0 13 0 110 1 0 + 28 0 49 1 0 11 0 107 2 0 11 10 0 67 2 + 0 10 10 0 81 2 0 11 0 0 27 1 0 11 0 + 105 2 0 11 10 0 63 2 0 10 10 0 78 1 0 + 13 0 109 2 0 0 0 10 127 1 0 50 0 52 1 + 0 0 28 124 2 0 0 0 9 122 2 0 0 0 9 + 121 1 0 0 0 120 1 0 28 0 113 1 0 50 0 + 130 3 0 42 28 33 30 45 2 0 42 28 30 + 43 2 0 11 0 99 100 1 0 114 0 115 2 0 + 11 9 0 118 2 0 11 0 0 19))))) + '|lookupComplete|)) @ \section{domain GTSET GeneralTriangularSet} <<domain GTSET GeneralTriangularSet>>= |