
(/VERSIONCHECK 2) 

(DEFUN |CHVAR;eval;UPUP2FUPUP;1| (|p| |x| |y| $)
  (SPADCALL
      (SPADCALL (CONS #'|CHVAR;eval;UPUP2FUPUP;1!0| (VECTOR $ |x|)) |p|
          (QREFELT $ 12))
      (SPADCALL |y| 1 (QREFELT $ 17)) (QREFELT $ 18))) 

(DEFUN |CHVAR;eval;UPUP2FUPUP;1!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 10))) 

(DEFUN |CHVAR;good?| (|a| |p| |q| $)
  (COND
    ((OR (SPADCALL (SPADCALL |p| |a| (QREFELT $ 20))
             (|spadConstant| $ 21) (QREFELT $ 23))
         (SPADCALL (SPADCALL |q| |a| (QREFELT $ 20))
             (|spadConstant| $ 21) (QREFELT $ 23)))
     'NIL)
    ('T 'T))) 

(DEFUN |CHVAR;algPoly| (|p| $)
  (PROG (|a| |d| |c| |q|)
    (RETURN
      (SEQ (COND
             ((SPADCALL
                  (LETT |a|
                        (SPADCALL
                            (SPADCALL
                                (LETT |q| (SPADCALL |p| (QREFELT $ 25))
                                      . #0=(|CHVAR;algPoly|))
                                (QREFELT $ 26))
                            (QREFELT $ 27)) . #0#)
                  (QREFELT $ 28))
              (|CHVAR;RPrim| (|spadConstant| $ 14) |a| |q| $))
             ('T
              (SEQ (LETT |c|
                         (LETT |d| (SPADCALL |a| (QREFELT $ 29)) . #0#) . #0#)
                   (LETT |q|
                         (SPADCALL
                             (SPADCALL |q|
                                 (SPADCALL
                                     (SPADCALL
                                      (SPADCALL |d| (QREFELT $ 30))
                                      (QREFELT $ 31))
                                     1 (QREFELT $ 17))
                                 (QREFELT $ 18))
                             (QREFELT $ 25)) . #0#)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((SPADCALL
                                     (LETT |a|
                                      (SPADCALL
                                       (SPADCALL |q| (QREFELT $ 26))
                                       (QREFELT $ 27)) . #0#)
                                     (QREFELT $ 28))
                                    'NIL)
                                   ('T 'T)))
                           (GO G191)))
                        (SEQ (LETT |c|
                                   (SPADCALL |c|
                                    (LETT |d|
                                     (SPADCALL |a| |d| (QREFELT $ 32)) . #0#)
                                    (QREFELT $ 33)) . #0#)
                             (EXIT (LETT |q|
                                    (SPADCALL
                                     (SPADCALL |q|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL |d| (QREFELT $ 30))
                                        (QREFELT $ 31))
                                       1 (QREFELT $ 17))
                                      (QREFELT $ 18))
                                     (QREFELT $ 25)) . #0#)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT (|CHVAR;RPrim| |c| |a| |q| $))))))))) 

(DEFUN |CHVAR;RPrim| (|c| |a| |q| $)
  (COND
    ((SPADCALL |a| (|spadConstant| $ 14) (QREFELT $ 34))
     (CONS (SPADCALL |c| (QREFELT $ 30)) |q|))
    ('T
     (CONS (SPADCALL (SPADCALL |a| |c| (QREFELT $ 33)) (QREFELT $ 30))
           (SPADCALL
               (SPADCALL |q|
                   (SPADCALL
                       (SPADCALL (SPADCALL |a| (QREFELT $ 30))
                           (QREFELT $ 31))
                       1 (QREFELT $ 17))
                   (QREFELT $ 18))
               (QREFELT $ 25)))))) 

(DEFUN |CHVAR;chvar;2UPUPR;5| (|f| |modulus| $)
  (PROG (|r1| |r1inv| |f1| |a| |x| |r2| |r2c| |t|)
    (RETURN
      (SEQ (LETT |r1| (SPADCALL |modulus| (QREFELT $ 36))
                 . #0=(|CHVAR;chvar;2UPUPR;5|))
           (LETT |f1|
                 (SPADCALL |f|
                     (SPADCALL
                         (LETT |r1inv|
                               (SPADCALL (QCAR |r1|) (QREFELT $ 31)) . #0#)
                         1 (QREFELT $ 17))
                     (QREFELT $ 18)) . #0#)
           (EXIT (COND
                   ((|CHVAR;infIntegral?| |f1| (QCDR |r1|) $)
                    (VECTOR |f1| (QCDR |r1|)
                            (SPADCALL
                                (SPADCALL (|spadConstant| $ 13) 1
                                    (QREFELT $ 37))
                                (QREFELT $ 30))
                            |r1inv|
                            (SPADCALL
                                (SPADCALL (QCAR |r1|) (QREFELT $ 27))
                                (QREFELT $ 38))))
                   ('T
                    (SEQ (LETT |x|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (LETT |a|
                                      (SPADCALL |f1| (QCDR |r1|)
                                       (QREFELT $ 39)) . #0#)
                                     (QREFELT $ 40))
                                    (QREFELT $ 30))
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL (|spadConstant| $ 13) 1
                                      (QREFELT $ 37))
                                     (QREFELT $ 30))
                                    (QREFELT $ 31))
                                   (QREFELT $ 41)) . #0#)
                         (LETT |r2c|
                               (SPADCALL
                                   (QCAR
                                    (LETT |r2|
                                     (SPADCALL
                                      (SPADCALL
                                       (CONS #'|CHVAR;chvar;2UPUPR;5!0|
                                        (VECTOR $ |x|))
                                       (QCDR |r1|) (QREFELT $ 12))
                                      (QREFELT $ 36)) . #0#))
                                   (QREFELT $ 27)) . #0#)
                         (LETT |t|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL (|spadConstant| $ 13) 1
                                      (QREFELT $ 37))
                                     (SPADCALL |a| (QREFELT $ 40))
                                     (QREFELT $ 42))
                                    (QREFELT $ 30))
                                   (QREFELT $ 31)) . #0#)
                         (EXIT (VECTOR (SPADCALL
                                        (SPADCALL
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL
                                            (|spadConstant| $ 13) 2
                                            (QREFELT $ 37))
                                           (QREFELT $ 30))
                                          (QREFELT $ 31))
                                         (SPADCALL |f1| |x|
                                          (SPADCALL (QCAR |r2|)
                                           (QREFELT $ 31))
                                          (QREFELT $ 19))
                                         (QREFELT $ 43))
                                        (QREFELT $ 44))
                                       (QCDR |r2|) |t|
                                       (SPADCALL (QCAR |r1|)
                                        (SPADCALL |r2c| |t|
                                         (QREFELT $ 45))
                                        (QREFELT $ 46))
                                       (SPADCALL |r2c| (QREFELT $ 38)))))))))))) 

(DEFUN |CHVAR;chvar;2UPUPR;5!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 10))) 

(DEFUN |CHVAR;infIntegral?| (|p| |modulus| $)
  (PROG (|r| |ninv| |degy| |c| |degp|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |modulus| (QREFELT $ 51))
                 . #0=(|CHVAR;infIntegral?|))
           (EXIT (COND
                   ((QEQCAR |r| 1) 'NIL)
                   (#1='T
                    (SEQ (LETT |ninv|
                               (SPADCALL (SPADCALL (QCDR (QCDR |r|))
                                          (QREFELT $ 54))
                                         (QREFELT $ 55)) . #0#)
                         (LETT |degy|
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL (QCAR (QCDR |r|))
                                     (QREFELT $ 27))
                                    (QREFELT $ 38))
                                   |ninv| (QREFELT $ 56)) . #0#)
                         (LETT |degp| (|spadConstant| $ 57) . #0#)
                         (SEQ G190
                              (COND
                                ((NULL (COND
                                         ((SPADCALL |p|
                                           (|spadConstant| $ 59)
                                           (QREFELT $ 60))
                                          'NIL)
                                         ('T 'T)))
                                 (GO G191)))
                              (SEQ (LETT |c|
                                    (SPADCALL |p| (QREFELT $ 26)) . #0#)
                                   (LETT |degp|
                                    (SPADCALL |degp|
                                     (SPADCALL
                                      (SPADCALL
                                       (-
                                        (+ 2
                                         (SPADCALL
                                          (SPADCALL |c| (QREFELT $ 61))
                                          (QREFELT $ 38)))
                                        (SPADCALL
                                         (SPADCALL |c| (QREFELT $ 62))
                                         (QREFELT $ 38)))
                                       (QREFELT $ 54))
                                      (SPADCALL
                                       (SPADCALL |p| (QREFELT $ 63))
                                       |degy| (QREFELT $ 56))
                                      (QREFELT $ 64))
                                     (QREFELT $ 65)) . #0#)
                                   (EXIT
                                    (LETT |p|
                                     (SPADCALL |p| (QREFELT $ 66)) . #0#)))
                              NIL (GO G190) G191 (EXIT NIL))
                         (EXIT (COND
                                 ((SPADCALL |ninv| |degp|
                                      (QREFELT $ 67))
                                  'NIL)
                                 (#1# 'T))))))))))) 

(DEFUN |CHVAR;mkIntegral;UPUPR;7| (|p| $)
  (PROG (|r| |rp|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |p| (QREFELT $ 51))
                 . #0=(|CHVAR;mkIntegral;UPUPR;7|))
           (EXIT (COND
                   ((QEQCAR |r| 1) (|CHVAR;algPoly| |p| $))
                   ('T
                    (SEQ (LETT |rp|
                               (SPADCALL (QCAR (QCDR |r|))
                                   (QCDR (QCDR |r|)) (QREFELT $ 69)) . #0#)
                         (EXIT (CONS (QVELT |rp| 1)
                                     (SPADCALL
                                      (SPADCALL (|spadConstant| $ 70)
                                       (QVELT |rp| 0) (QREFELT $ 17))
                                      (SPADCALL
                                       (SPADCALL (QVELT |rp| 2)
                                        (QREFELT $ 30))
                                       (QREFELT $ 71))
                                      (QREFELT $ 72)))))))))))) 

(DEFUN |CHVAR;goodPoint;2UPUPF;8| (|p| |modulus| $)
  (PROG (|r| |q| |d| |i| |a| #0=#:G1878 #1=#:G1874)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |q|
                            (SEQ (LETT |r|
                                       (SPADCALL |modulus|
                                        (QREFELT $ 51))
                                       . #2=(|CHVAR;goodPoint;2UPUPF;8|))
                                 (EXIT (COND
                                         ((QEQCAR |r| 1)
                                          (SPADCALL
                                           (SPADCALL |modulus|
                                            (SPADCALL |modulus|
                                             (QREFELT $ 73))
                                            (QREFELT $ 74))
                                           (QREFELT $ 27)))
                                         ('T
                                          (SPADCALL (QCAR (QCDR |r|))
                                           (QREFELT $ 27)))))) . #2#)
                      (LETT |d| (SPADCALL |p| (QREFELT $ 75)) . #2#)
                      (EXIT (SEQ (LETT |i| 0 . #2#) G190 NIL
                                 (SEQ (EXIT
                                       (COND
                                         ((|CHVAR;good?|
                                           (LETT |a|
                                            (SPADCALL |i|
                                             (QREFELT $ 76)) . #2#)
                                           |q| |d| $)
                                          (PROGN
                                            (LETT #0# |a| . #2#)
                                            (GO #0#)))
                                         ('T
                                          (SEQ
                                           (EXIT
                                            (COND
                                              ((|CHVAR;good?|
                                                (SPADCALL |a|
                                                 (QREFELT $ 77))
                                                |q| |d| $)
                                               (PROGN
                                                 (LETT #1#
                                                  (PROGN
                                                    (LETT #0#
                                                     (SPADCALL |a|
                                                      (QREFELT $ 77)) . #2#)
                                                    (GO #0#)) . #2#)
                                                 (GO #1#)))))
                                           #1# (EXIT #1#))))))
                                 (LETT |i| (QSADD1 |i|) . #2#)
                                 (GO G190) G191 (EXIT NIL)))))
           #0# (EXIT #0#))))) 

(DEFUN |CHVAR;radPoly;UPUPU;9| (|p| $)
  (PROG (|r|)
    (RETURN
      (SEQ (LETT |r|
                 (SPADCALL (SPADCALL |p| (QREFELT $ 66))
                     (QREFELT $ 79))
                 |CHVAR;radPoly;UPUPU;9|)
           (EXIT (COND
                   ((QEQCAR |r| 1) (CONS 1 "failed"))
                   ('T
                    (CONS 0
                          (CONS (SPADCALL (QCDR |r|) (QREFELT $ 80))
                                (SPADCALL |p| (QREFELT $ 63))))))))))) 

(DEFUN |CHVAR;rootPoly;FNniR;10| (|g| |m| $)
  (PROG (|d| #0=#:G1893 |pr| #1=#:G1815 #2=#:G1902 #3=#:G1898
             #4=#:G1896 #5=#:G1897)
    (RETURN
      (SEQ (COND
             ((SPADCALL |g| (QREFELT $ 81))
              (|error| "Should not happen"))
             ('T
              (SEQ (LETT |pr|
                         (SPADCALL
                             (SPADCALL
                                 (SPADCALL
                                     (SPADCALL |g| (QREFELT $ 61))
                                     (SPADCALL
                                      (LETT |d|
                                       (SPADCALL |g| (QREFELT $ 62))
                                       . #6=(|CHVAR;rootPoly;FNniR;10|))
                                      (PROG1 (LETT #0# (- |m| 1) . #6#)
                                        (|check-subtype| (>= #0# 0)
                                         '(|NonNegativeInteger|) #0#))
                                      (QREFELT $ 82))
                                     (QREFELT $ 33))
                                 (QREFELT $ 84))
                             |m| (QREFELT $ 88)) . #6#)
                   (EXIT (VECTOR (QVELT |pr| 0)
                                 (SPADCALL |d| (QVELT |pr| 1)
                                     (QREFELT $ 89))
                                 (PROGN
                                   (LETT #5# NIL . #6#)
                                   (SEQ (LETT #1# NIL . #6#)
                                    (LETT #2# (QVELT |pr| 2) . #6#)
                                    G190
                                    (COND
                                      ((OR (ATOM #2#)
                                        (PROGN
                                          (LETT #1# (CAR #2#) . #6#)
                                          NIL))
                                       (GO G191)))
                                    (SEQ
                                     (EXIT
                                      (PROGN
                                        (LETT #3# #1# . #6#)
                                        (COND
                                          (#5#
                                           (LETT #4#
                                            (SPADCALL #4# #3#
                                             (QREFELT $ 33)) . #6#))
                                          ('T
                                           (PROGN
                                             (LETT #4# #3# . #6#)
                                             (LETT #5# 'T . #6#)))))))
                                    (LETT #2# (CDR #2#) . #6#)
                                    (GO G190) G191 (EXIT NIL))
                                   (COND
                                     (#5# #4#)
                                     ('T (|spadConstant| $ 14))))))))))))) 

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

(DEFUN |ChangeOfVariable;| (|#1| |#2| |#3|)
  (PROG (DV$1 DV$2 DV$3 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|ChangeOfVariable|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT |dv$| (LIST '|ChangeOfVariable| DV$1 DV$2 DV$3) . #0#)
        (LETT $ (GETREFV 90) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|ChangeOfVariable|
            (LIST DV$1 DV$2 DV$3) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        $)))) 

(MAKEPROP '|ChangeOfVariable| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|Fraction| $) (0 . |elt|)
             (|Mapping| 15 15) (6 . |map|) (12 . |One|) (16 . |One|)
             (|Fraction| 7) (|NonNegativeInteger|) (20 . |monomial|)
             (26 . |elt|) |CHVAR;eval;UPUP2FUPUP;1| (32 . |elt|)
             (38 . |Zero|) (|Boolean|) (42 . =)
             (|UnivariatePolynomialCommonDenominator| 7 15 8)
             (48 . |clearDenominator|) (53 . |leadingCoefficient|)
             (58 . |retract|) (63 . |ground?|) (68 . |squareFreePart|)
             (73 . |coerce|) (78 . |inv|) (83 . |gcd|) (89 . *)
             (95 . =) (|Record| (|:| |coef| 15) (|:| |poly| 8))
             |CHVAR;mkIntegral;UPUPR;7| (101 . |monomial|)
             (107 . |degree|) |CHVAR;goodPoint;2UPUPF;8|
             (112 . |coerce|) (117 . +) (123 . -) (129 . *) (135 . -)
             (140 . |elt|) (146 . *)
             (|Record| (|:| |func| 8) (|:| |poly| 8) (|:| |c1| 15)
                 (|:| |c2| 15) (|:| |deg| 16))
             |CHVAR;chvar;2UPUPR;5|
             (|Record| (|:| |radicand| 15) (|:| |deg| 16))
             (|Union| 49 '"failed") |CHVAR;radPoly;UPUPU;9| (|Integer|)
             (|Fraction| 52) (152 . |coerce|) (157 . |inv|) (162 . *)
             (168 . |Zero|) (172 . |Zero|) (176 . |Zero|) (180 . =)
             (186 . |numer|) (191 . |denom|) (196 . |degree|) (201 . +)
             (207 . |max|) (213 . |reductum|) (218 . <)
             (|Record| (|:| |exponent| 16) (|:| |coef| 15)
                 (|:| |radicand| 7))
             |CHVAR;rootPoly;FNniR;10| (224 . |One|) (228 . |coerce|)
             (233 . -) (239 . |differentiate|) (244 . |resultant|)
             (250 . |commonDenominator|) (255 . |coerce|) (260 . -)
             (|Union| 15 '"failed") (265 . |retractIfCan|) (270 . -)
             (275 . |zero?|) (280 . **) (|Factored| $)
             (286 . |squareFree|)
             (|Record| (|:| |exponent| 16) (|:| |coef| 7)
                 (|:| |radicand| (|List| 7)))
             (|Factored| 7) (|FactoredFunctions| 7) (291 . |nthRoot|)
             (297 . /))
          '#(|rootPoly| 303 |radPoly| 309 |mkIntegral| 314 |goodPoint|
             319 |eval| 325 |chvar| 332)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 89
                                '(2 7 9 9 9 10 2 8 0 11 0 12 0 6 0 13 0
                                  7 0 14 2 8 0 15 16 17 2 8 0 0 0 18 2
                                  7 6 0 6 20 0 6 0 21 2 6 22 0 0 23 1
                                  24 8 8 25 1 8 15 0 26 1 15 7 0 27 1 7
                                  22 0 28 1 7 0 0 29 1 15 0 7 30 1 15 0
                                  0 31 2 7 0 0 0 32 2 7 0 0 0 33 2 7 22
                                  0 0 34 2 7 0 6 16 37 1 7 16 0 38 1 7
                                  0 6 40 2 15 0 0 0 41 2 7 0 0 0 42 2 8
                                  0 15 0 43 1 8 0 0 44 2 7 9 0 9 45 2
                                  15 0 0 0 46 1 53 0 52 54 1 53 0 0 55
                                  2 53 0 52 0 56 0 53 0 57 0 7 0 58 0 8
                                  0 59 2 8 22 0 0 60 1 15 7 0 61 1 15 7
                                  0 62 1 8 16 0 63 2 53 0 0 0 64 2 53 0
                                  0 0 65 1 8 0 0 66 2 53 22 0 0 67 0 15
                                  0 70 1 8 0 15 71 2 8 0 0 0 72 1 8 0 0
                                  73 2 8 15 0 0 74 1 24 7 8 75 1 6 0 52
                                  76 1 6 0 0 77 1 8 78 0 79 1 15 0 0 80
                                  1 15 22 0 81 2 7 0 0 16 82 1 7 83 0
                                  84 2 87 85 86 16 88 2 15 0 7 7 89 2 0
                                  68 15 16 69 1 0 50 8 51 1 0 35 8 36 2
                                  0 6 8 8 39 3 0 8 8 15 15 19 2 0 47 8
                                  8 48)))))
          '|lookupComplete|)) 
