
(/VERSIONCHECK 2) 

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

(DEFUN |INTHERAL;localsolve| (|mat| |vec| |modulus| $)
  (PROG (|ans| |k| #0=#:G2108 |j| #1=#:G2107 #2=#:G2106 |sol| |i|
               #3=#:G2109 |bc| #4=#:G2105)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |ans|
                            (SPADCALL (SPADCALL |mat| (QREFELT $ 53))
                                (|spadConstant| $ 54) (QREFELT $ 55))
                            . #5=(|INTHERAL;localsolve|))
                      (EXIT (COND
                              ((SPADCALL |mat| (QREFELT $ 57))
                               (SEQ (SEQ
                                     (LETT |k|
                                      (SPADCALL |mat| (QREFELT $ 59)) . #5#)
                                     (LETT #0#
                                      (SPADCALL |mat| (QREFELT $ 60)) . #5#)
                                     (LETT |j|
                                      (SPADCALL |mat| (QREFELT $ 39)) . #5#)
                                     (LETT #1#
                                      (SPADCALL |mat| (QREFELT $ 58)) . #5#)
                                     (LETT |i|
                                      (SPADCALL |ans| (QREFELT $ 40)) . #5#)
                                     (LETT #2# (QVSIZE |ans|) . #5#)
                                     G190
                                     (COND
                                       ((OR (> |i| #2#) (> |j| #1#)
                                         (> |k| #0#))
                                        #6=(GO G191)))
                                     (SEQ
                                      (LETT |bc|
                                       (SPADCALL
                                        (SPADCALL |mat| |j| |k|
                                         (QREFELT $ 61))
                                        |modulus|
                                        (SPADCALL |vec| |i|
                                         (QREFELT $ 47))
                                        (QREFELT $ 64)) . #5#)
                                      (EXIT
                                       (COND
                                         ((QEQCAR |bc| 1)
                                          (PROGN
                                            (LETT #4#
                                             (SPADCALL 0
                                              (|spadConstant| $ 54)
                                              (QREFELT $ 55)) . #5#)
                                            (GO #4#)))
                                         ('T
                                          (SPADCALL |ans| |i|
                                           (QCAR (QCDR |bc|))
                                           (QREFELT $ 66))))))
                                     (LETT |i|
                                      (PROG1 (+ |i| 1)
                                        (LETT |j|
                                         (PROG1 (+ |j| 1)
                                           (LETT |k| (+ |k| 1) . #5#)) . #5#)) . #5#)
                                     #7=(GO G190) G191 (EXIT NIL))
                                    (EXIT |ans|)))
                              ('T
                               (SEQ (LETT |sol|
                                     (SPADCALL
                                      (SPADCALL
                                       (CONS #'|INTHERAL;localsolve!0|
                                        $)
                                       |mat| (QREFELT $ 72))
                                      (SPADCALL
                                       (CONS #'|INTHERAL;localsolve!1|
                                        $)
                                       |vec| (QREFELT $ 75))
                                      (QREFELT $ 78)) . #5#)
                                    (EXIT
                                     (COND
                                       ((QEQCAR |sol| 1)
                                        (SPADCALL 0
                                         (|spadConstant| $ 54)
                                         (QREFELT $ 55)))
                                       ('T
                                        (SEQ
                                         (SEQ
                                          (LETT |i|
                                           (SPADCALL |ans|
                                            (QREFELT $ 40)) . #5#)
                                          (LETT #3#
                                           (QVSIZE |ans|) . #5#)
                                          G190 (COND ((> |i| #3#) #6#))
                                          (SEQ
                                           (LETT |bc|
                                            (SPADCALL
                                             (SPADCALL
                                              (SPADCALL (QCDR |sol|)
                                               |i| (QREFELT $ 79))
                                              (QREFELT $ 80))
                                             |modulus|
                                             (|spadConstant| $ 33)
                                             (QREFELT $ 64)) . #5#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |bc| 1)
                                               (PROGN
                                                 (LETT #4#
                                                  (SPADCALL 0
                                                   (|spadConstant| $
                                                    54)
                                                   (QREFELT $ 55)) . #5#)
                                                 (GO #4#)))
                                              ('T
                                               (SPADCALL |ans| |i|
                                                (SPADCALL
                                                 (SPADCALL
                                                  (SPADCALL
                                                   (SPADCALL
                                                    (QCDR |sol|) |i|
                                                    (QREFELT $ 79))
                                                   (QREFELT $ 81))
                                                  (QCAR (QCDR |bc|))
                                                  (QREFELT $ 23))
                                                 |modulus|
                                                 (QREFELT $ 82))
                                                (QREFELT $ 66))))))
                                          (LETT |i| (+ |i| 1) . #5#)
                                          #7# G191 (EXIT NIL))
                                         (EXIT |ans|)))))))))))
           #4# (EXIT #4#))))) 

(DEFUN |INTHERAL;localsolve!1| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 68))) 

(DEFUN |INTHERAL;localsolve!0| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 68))) 

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

(DEFUN |AlgebraicHermiteIntegration;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|AlgebraicHermiteIntegration|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|AlgebraicHermiteIntegration| DV$1 DV$2 DV$3 DV$4) . #0#)
        (LETT $ (GETREFV 83) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|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| 38))
             (|List| 28) (|Factored| 7) (52 . |factors|) (57 . |One|)
             (61 . |One|) (65 . |One|) (|NonNegativeInteger|) (69 . **)
             (75 . *) (|Integer|) (81 . |minRowIndex|)
             (86 . |minIndex|) (91 . *) (97 . -) (102 . |scalarMatrix|)
             (108 . +) (114 . |integralRepresents|) (120 . +)
             (126 . |qelt|) (132 . -) (138 . |row|) (144 . |dot|)
             (|Record| (|:| |answer| 9) (|:| |logpart| 9))
             |INTHERAL;HermiteIntegrate;RMR;1| (150 . |nrows|)
             (155 . |Zero|) (159 . |new|) (|Boolean|)
             (165 . |diagonal?|) (170 . |maxRowIndex|)
             (175 . |minColIndex|) (180 . |maxColIndex|) (185 . |qelt|)
             (|Record| (|:| |coef1| $) (|:| |coef2| $))
             (|Union| 62 '"failed") (192 . |extendedEuclidean|)
             (199 . |Zero|) (203 . |qsetelt!|) (|Fraction| 7)
             (210 . |coerce|) (|Matrix| 67) (|Mapping| 67 7)
             (|MatrixCategoryFunctions2| 7 24 24 16 67 73 73 69)
             (215 . |map|) (|Vector| 67) (|VectorFunctions2| 7 67)
             (221 . |map|) (|Union| 73 '"failed")
             (|LinearSystemMatrixPackage| 67 73 73 69)
             (227 . |particularSolution|) (233 . |qelt|)
             (239 . |denom|) (244 . |numer|) (249 . |rem|))
          '#(|HermiteIntegrate| 255) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 82
                                '(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 0 8 0 34 2 7 0 0 35 36 2 16 0 7 0
                                  37 1 16 38 0 39 1 24 38 0 40 2 7 0 38
                                  0 41 1 7 0 0 42 2 16 0 35 7 43 2 16 0
                                  0 0 44 2 9 0 24 7 45 2 9 0 0 0 46 2
                                  24 7 0 38 47 2 7 0 0 0 48 2 16 24 0
                                  38 49 2 24 7 0 0 50 1 16 35 0 53 0 7
                                  0 54 2 24 0 35 7 55 1 16 56 0 57 1 16
                                  38 0 58 1 16 38 0 59 1 16 38 0 60 3
                                  16 7 0 38 38 61 3 7 63 0 0 0 64 0 6 0
                                  65 3 24 7 0 38 7 66 1 67 0 7 68 2 71
                                  69 70 16 72 2 74 73 70 24 75 2 77 76
                                  69 73 78 2 73 67 0 38 79 1 67 7 0 80
                                  1 67 7 0 81 2 7 0 0 0 82 2 0 51 9 14
                                  52)))))
          '|lookupComplete|)) 
