
(/VERSIONCHECK 2) 

(DEFUN |INTHERAL;HermiteIntegrate;RMR;1| (|f| |derivation| $)
  (PROG (|iden| |inum| #1=#:G674 #2=#:G927 |i| #3=#:G926 #4=#:G925 |ratform|
         #5=#:G915 |sol| |p| |j| |nn| |sys| |u'| |u| #6=#:G913 |v| #7=#:G924
         |trm| |coef| |e| |cform| |m| |mat| |n|)
    (RETURN
     (SEQ
      (LETT |ratform| (|spadConstant| $ 10)
            . #8=(|INTHERAL;HermiteIntegrate;RMR;1|))
      (LETT |n| (SPADCALL (QREFELT $ 12)) . #8#)
      (LETT |m|
            (SPADCALL
             (QCAR (LETT |mat| (SPADCALL |derivation| (QREFELT $ 15)) . #8#))
             (QREFELT $ 17))
            . #8#)
      (LETT |inum| (QCAR (LETT |cform| (SPADCALL |f| (QREFELT $ 19)) . #8#))
            . #8#)
      (COND
       ((QEQCAR
         (SPADCALL (LETT |iden| (QCDR |cform|) . #8#)
                   (LETT |e| (QCDR |mat|) . #8#) (QREFELT $ 21))
         1)
        (SEQ
         (LETT |iden|
               (SPADCALL
                (LETT |coef|
                      (PROG2
                          (LETT #1#
                                (SPADCALL |e|
                                          (SPADCALL |e| |iden| (QREFELT $ 22))
                                          (QREFELT $ 21))
                                . #8#)
                          (QCDR #1#)
                        (|check-union| (QEQCAR #1# 0) (QREFELT $ 7) #1#))
                      . #8#)
                |iden| (QREFELT $ 23))
               . #8#)
         (EXIT (LETT |inum| (SPADCALL |coef| |inum| (QREFELT $ 25)) . #8#)))))
      (SEQ (LETT |trm| NIL . #8#)
           (LETT #7# (SPADCALL (SPADCALL |iden| (QREFELT $ 27)) (QREFELT $ 31))
                 . #8#)
           G190
           (COND
            ((OR (ATOM #7#) (PROGN (LETT |trm| (CAR #7#) . #8#) NIL))
             #9=(GO G191)))
           (SEQ
            (EXIT
             (COND
              ((< 1 (LETT |j| (QCDR |trm|) . #8#))
               (SEQ
                (LETT |u'|
                      (SPADCALL
                       (LETT |u|
                             (PROG2
                                 (LETT #1#
                                       (SPADCALL |iden|
                                                 (SPADCALL
                                                  (LETT |v| (QCAR |trm|) . #8#)
                                                  (PROG1 (LETT #6# |j| . #8#)
                                                    (|check-subtype| (>= #6# 0)
                                                                     '(|NonNegativeInteger|)
                                                                     #6#))
                                                  (QREFELT $ 35))
                                                 (QREFELT $ 21))
                                       . #8#)
                                 (QCDR #1#)
                               (|check-union| (QEQCAR #1# 0) (QREFELT $ 7)
                                              #1#))
                             . #8#)
                       (SPADCALL |v| |derivation|) (QREFELT $ 23))
                      . #8#)
                (LETT |sys|
                      (SPADCALL
                       (PROG2
                           (LETT #1#
                                 (SPADCALL (SPADCALL |u| |v| (QREFELT $ 23))
                                           |e| (QREFELT $ 21))
                                 . #8#)
                           (QCDR #1#)
                         (|check-union| (QEQCAR #1# 0) (QREFELT $ 7) #1#))
                       |m| (QREFELT $ 36))
                      . #8#)
                (LETT |nn|
                      (- (SPADCALL |sys| (QREFELT $ 38))
                         (SPADCALL |inum| (QREFELT $ 39)))
                      . #8#)
                (SEQ G190 (COND ((NULL (< 1 |j|)) #9#))
                     (SEQ (LETT |j| (- |j| 1) . #8#)
                          (LETT |p|
                                (SPADCALL (SPADCALL |j| |u'| (QREFELT $ 40))
                                          (QREFELT $ 41))
                                . #8#)
                          (LETT |sol|
                                (|INTHERAL;localsolve|
                                 (SPADCALL |sys|
                                           (SPADCALL |n| |p| (QREFELT $ 42))
                                           (QREFELT $ 43))
                                 |inum| |v| $)
                                . #8#)
                          (LETT |ratform|
                                (SPADCALL |ratform|
                                          (SPADCALL |sol|
                                                    (SPADCALL |v|
                                                              (PROG1
                                                                  (LETT #5# |j|
                                                                        . #8#)
                                                                (|check-subtype|
                                                                 (>= #5# 0)
                                                                 '(|NonNegativeInteger|)
                                                                 #5#))
                                                              (QREFELT $ 35))
                                                    (QREFELT $ 44))
                                          (QREFELT $ 45))
                                . #8#)
                          (EXIT
                           (LETT |inum|
                                 (PROGN
                                  (LETT #4#
                                        (GETREFV
                                         (QSADD1
                                          (- #10=(QVSIZE |inum|)
                                             #11=(SPADCALL |inum|
                                                           (QREFELT $ 39)))))
                                        . #8#)
                                  (SEQ (LETT #3# 0 . #8#) (LETT |i| #11# . #8#)
                                       (LETT #2# #10# . #8#) G190
                                       (COND ((> |i| #2#) #9#))
                                       (SEQ
                                        (EXIT
                                         (SETELT #4# #3#
                                                 (SPADCALL
                                                  (PROG2
                                                      (LETT #1#
                                                            (SPADCALL
                                                             (SPADCALL
                                                              (SPADCALL
                                                               (SPADCALL |inum|
                                                                         |i|
                                                                         (QREFELT
                                                                          $
                                                                          46))
                                                               (SPADCALL |p|
                                                                         (SPADCALL
                                                                          |sol|
                                                                          |i|
                                                                          (QREFELT
                                                                           $
                                                                           46))
                                                                         (QREFELT
                                                                          $
                                                                          23))
                                                               (QREFELT $ 47))
                                                              (SPADCALL
                                                               (SPADCALL |sys|
                                                                         (- |i|
                                                                            |nn|)
                                                                         (QREFELT
                                                                          $
                                                                          48))
                                                               |sol|
                                                               (QREFELT $ 49))
                                                              (QREFELT $ 47))
                                                             |v|
                                                             (QREFELT $ 21))
                                                            . #8#)
                                                      (QCDR #1#)
                                                    (|check-union|
                                                     (QEQCAR #1# 0)
                                                     (QREFELT $ 7) #1#))
                                                  (SPADCALL |u|
                                                            (SPADCALL
                                                             (SPADCALL |sol|
                                                                       |i|
                                                                       (QREFELT
                                                                        $ 46))
                                                             |derivation|)
                                                            (QREFELT $ 23))
                                                  (QREFELT $ 47)))))
                                       (LETT |i|
                                             (PROG1 (+ |i| 1)
                                               (LETT #3# (QSADD1 #3#) . #8#))
                                             . #8#)
                                       #12=(GO G190) G191 (EXIT NIL))
                                  #4#)
                                 . #8#)))
                     NIL #12# G191 (EXIT NIL))
                (EXIT
                 (LETT |iden| (SPADCALL |u| |v| (QREFELT $ 23)) . #8#)))))))
           (LETT #7# (CDR #7#) . #8#) #12# G191 (EXIT NIL))
      (EXIT (CONS |ratform| (SPADCALL |inum| |iden| (QREFELT $ 44)))))))) 

(DEFUN |INTHERAL;localsolve| (|mat| |vec| |modulus| $)
  (PROG (#1=#:G951 |bc| #2=#:G955 |i| |sol| #3=#:G952 #4=#:G953 |j| #5=#:G954
         |k| |ans|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |ans|
              (SPADCALL (SPADCALL |mat| (QREFELT $ 52)) (|spadConstant| $ 53)
                        (QREFELT $ 54))
              . #6=(|INTHERAL;localsolve|))
        (EXIT
         (COND
          ((SPADCALL |mat| (QREFELT $ 56))
           (SEQ
            (SEQ (LETT |k| (SPADCALL |mat| (QREFELT $ 58)) . #6#)
                 (LETT #5# (SPADCALL |mat| (QREFELT $ 59)) . #6#)
                 (LETT |j| (SPADCALL |mat| (QREFELT $ 38)) . #6#)
                 (LETT #4# (SPADCALL |mat| (QREFELT $ 57)) . #6#)
                 (LETT |i| (SPADCALL |ans| (QREFELT $ 39)) . #6#)
                 (LETT #3# (QVSIZE |ans|) . #6#) G190
                 (COND ((OR (> |i| #3#) (> |j| #4#) (> |k| #5#)) #7=(GO G191)))
                 (SEQ
                  (LETT |bc|
                        (SPADCALL (SPADCALL |mat| |j| |k| (QREFELT $ 60))
                                  |modulus| (SPADCALL |vec| |i| (QREFELT $ 46))
                                  (QREFELT $ 63))
                        . #6#)
                  (EXIT
                   (COND
                    ((QEQCAR |bc| 1)
                     (PROGN
                      (LETT #1#
                            (SPADCALL 0 (|spadConstant| $ 53) (QREFELT $ 54))
                            . #6#)
                      (GO #1#)))
                    ('T
                     (SPADCALL |ans| |i| (QCAR (QCDR |bc|)) (QREFELT $ 65))))))
                 (LETT |i|
                       (PROG1 (+ |i| 1)
                         (LETT |j| (PROG1 (+ |j| 1) (LETT |k| (+ |k| 1) . #6#))
                               . #6#))
                       . #6#)
                 #8=(GO G190) G191 (EXIT NIL))
            (EXIT |ans|)))
          (#9='T
           (SEQ
            (LETT |sol|
                  (SPADCALL (SPADCALL (ELT $ 67) |mat| (QREFELT $ 71))
                            (SPADCALL (ELT $ 67) |vec| (QREFELT $ 74))
                            (QREFELT $ 77))
                  . #6#)
            (EXIT
             (COND
              ((QEQCAR |sol| 1)
               (SPADCALL 0 (|spadConstant| $ 53) (QREFELT $ 54)))
              (#9#
               (SEQ
                (SEQ (LETT |i| (SPADCALL |ans| (QREFELT $ 39)) . #6#)
                     (LETT #2# (QVSIZE |ans|) . #6#) G190
                     (COND ((> |i| #2#) #7#))
                     (SEQ
                      (LETT |bc|
                            (SPADCALL
                             (SPADCALL
                              (SPADCALL (QCDR |sol|) |i| (QREFELT $ 78))
                              (QREFELT $ 79))
                             |modulus| (|spadConstant| $ 33) (QREFELT $ 63))
                            . #6#)
                      (EXIT
                       (COND
                        ((QEQCAR |bc| 1)
                         (PROGN
                          (LETT #1#
                                (SPADCALL 0 (|spadConstant| $ 53)
                                          (QREFELT $ 54))
                                . #6#)
                          (GO #1#)))
                        ('T
                         (SPADCALL |ans| |i|
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL
                                      (SPADCALL (QCDR |sol|) |i|
                                                (QREFELT $ 78))
                                      (QREFELT $ 80))
                                     (QCAR (QCDR |bc|)) (QREFELT $ 23))
                                    |modulus| (QREFELT $ 81))
                                   (QREFELT $ 65))))))
                     (LETT |i| (+ |i| 1) . #6#) #8# G191 (EXIT NIL))
                (EXIT |ans|)))))))))))
      #1# (EXIT #1#))))) 

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

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

(MAKEPROP '|AlgebraicHermiteIntegration| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|local| |#3|) (|local| |#4|) (0 . |Zero|) (|PositiveInteger|)
              (4 . |rank|) (|Record| (|:| |num| 16) (|:| |den| 7))
              (|Mapping| 7 7) (8 . |integralDerivationMatrix|) (|Matrix| 7)
              (13 . |transpose|) (|Record| (|:| |num| 24) (|:| |den| 7))
              (18 . |integralCoordinates|) (|Union| $ '"failed") (23 . |exquo|)
              (29 . |gcd|) (35 . *) (|Vector| 7) (41 . *) (|Factored| $)
              (47 . |squareFree|)
              (|Record| (|:| |factor| 7) (|:| |exponent| 37)) (|List| 28)
              (|Factored| 7) (52 . |factors|) (57 . |One|) (61 . |One|)
              (|NonNegativeInteger|) (65 . ^) (71 . *) (|Integer|)
              (77 . |minRowIndex|) (82 . |minIndex|) (87 . *) (93 . -)
              (98 . |scalarMatrix|) (104 . +) (110 . |integralRepresents|)
              (116 . +) (122 . |qelt|) (128 . -) (134 . |row|) (140 . |dot|)
              (|Record| (|:| |answer| 9) (|:| |logpart| 9))
              |INTHERAL;HermiteIntegrate;RMR;1| (146 . |nrows|) (151 . |Zero|)
              (155 . |new|) (|Boolean|) (161 . |diagonal?|)
              (166 . |maxRowIndex|) (171 . |minColIndex|) (176 . |maxColIndex|)
              (181 . |qelt|) (|Record| (|:| |coef1| $) (|:| |coef2| $))
              (|Union| 61 '"failed") (188 . |extendedEuclidean|) (195 . |Zero|)
              (199 . |qsetelt!|) (|Fraction| 7) (206 . |coerce|) (|Matrix| 66)
              (|Mapping| 66 7)
              (|MatrixCategoryFunctions2| 7 24 24 16 66 72 72 68) (211 . |map|)
              (|Vector| 66) (|VectorFunctions2| 7 66) (217 . |map|)
              (|Union| 72 '"failed") (|LinearSystemMatrixPackage| 66 72 72 68)
              (223 . |particularSolution|) (229 . |qelt|) (235 . |denom|)
              (240 . |numer|) (245 . |rem|))
           '#(|HermiteIntegrate| 251) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 81
                                                 '(0 9 0 10 0 9 11 12 1 9 13 14
                                                   15 1 16 0 0 17 1 9 18 0 19 2
                                                   7 20 0 0 21 2 7 0 0 0 22 2 7
                                                   0 0 0 23 2 24 0 7 0 25 1 7
                                                   26 0 27 1 30 29 0 31 0 6 0
                                                   32 0 7 0 33 2 7 0 0 34 35 2
                                                   16 0 7 0 36 1 16 37 0 38 1
                                                   24 37 0 39 2 7 0 37 0 40 1 7
                                                   0 0 41 2 16 0 34 7 42 2 16 0
                                                   0 0 43 2 9 0 24 7 44 2 9 0 0
                                                   0 45 2 24 7 0 37 46 2 7 0 0
                                                   0 47 2 16 24 0 37 48 2 24 7
                                                   0 0 49 1 16 34 0 52 0 7 0 53
                                                   2 24 0 34 7 54 1 16 55 0 56
                                                   1 16 37 0 57 1 16 37 0 58 1
                                                   16 37 0 59 3 16 7 0 37 37 60
                                                   3 7 62 0 0 0 63 0 6 0 64 3
                                                   24 7 0 37 7 65 1 66 0 7 67 2
                                                   70 68 69 16 71 2 73 72 69 24
                                                   74 2 76 75 68 72 77 2 72 66
                                                   0 37 78 1 66 7 0 79 1 66 7 0
                                                   80 2 7 0 0 0 81 2 0 50 9 14
                                                   51)))))
           '|lookupComplete|)) 
