
(/VERSIONCHECK 2) 

(DEFUN |INTHERAL;HermiteIntegrate;RMR;1| (|f| |derivation| $)
  (PROG (|iden| |inum| #1=#:G1811 #2=#:G2076 |i| #3=#:G2075 #4=#:G2074
         |ratform| #5=#:G2063 |sol| |p| |j| |nn| |sys| |u'| |u| #6=#:G2061 |v|
         #7=#:G2073 |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| (- 1 (SPADCALL |inum| (QREFELT $ 38))) . #8#)
                (SEQ G190 (COND ((NULL (< 1 |j|)) #9#))
                     (SEQ (LETT |j| (- |j| 1) . #8#)
                          (LETT |p|
                                (SPADCALL (SPADCALL |j| |u'| (QREFELT $ 39))
                                          (QREFELT $ 40))
                                . #8#)
                          (LETT |sol|
                                (|INTHERAL;localsolve|
                                 (SPADCALL |sys|
                                           (SPADCALL |n| |p| (QREFELT $ 41))
                                           (QREFELT $ 42))
                                 |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 $ 43))
                                          (QREFELT $ 44))
                                . #8#)
                          (EXIT
                           (LETT |inum|
                                 (PROGN
                                  (LETT #4#
                                        (GETREFV
                                         (QSADD1
                                          (- #10=(QVSIZE |inum|)
                                             #11=(SPADCALL |inum|
                                                           (QREFELT $ 38)))))
                                        . #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
                                                               (QAREF1O |inum|
                                                                        |i| 1)
                                                               (SPADCALL |p|
                                                                         (QAREF1O
                                                                          |sol|
                                                                          |i|
                                                                          1)
                                                                         (QREFELT
                                                                          $
                                                                          23))
                                                               (QREFELT $ 45))
                                                              (SPADCALL
                                                               (SPADCALL |sys|
                                                                         (- |i|
                                                                            |nn|)
                                                                         (QREFELT
                                                                          $
                                                                          46))
                                                               |sol|
                                                               (QREFELT $ 47))
                                                              (QREFELT $ 45))
                                                             |v|
                                                             (QREFELT $ 21))
                                                            . #8#)
                                                      (QCDR #1#)
                                                    (|check-union|
                                                     (QEQCAR #1# 0)
                                                     (QREFELT $ 7) #1#))
                                                  (SPADCALL |u|
                                                            (SPADCALL
                                                             (QAREF1O |sol| |i|
                                                                      1)
                                                             |derivation|)
                                                            (QREFELT $ 23))
                                                  (QREFELT $ 45)))))
                                       (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 $ 43)))))))) 

(DEFUN |INTHERAL;localsolve| (|mat| |vec| |modulus| $)
  (PROG (#1=#:G2101 |bc| #2=#:G2105 |i| |sol| #3=#:G2102 #4=#:G2103 |j|
         #5=#:G2104 |k| |ans|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |ans| (MAKEARR1 (QVSIZE |mat|) (|spadConstant| $ 50))
              . #6=(|INTHERAL;localsolve|))
        (EXIT
         (COND
          ((SPADCALL |mat| (QREFELT $ 52))
           (SEQ
            (SEQ (LETT |k| 1 . #6#)
                 (LETT #5# (SPADCALL |mat| (QREFELT $ 54)) . #6#)
                 (LETT |j| 1 . #6#)
                 (LETT #4# (SPADCALL |mat| (QREFELT $ 53)) . #6#)
                 (LETT |i| (SPADCALL |ans| (QREFELT $ 38)) . #6#)
                 (LETT #3# (QVSIZE |ans|) . #6#) G190
                 (COND
                  ((OR (> |i| #3#) (QSGREATERP |j| #4#) (QSGREATERP |k| #5#))
                   #7=(GO G191)))
                 (SEQ
                  (LETT |bc|
                        (SPADCALL (QAREF2O |mat| |j| |k| 1 1) |modulus|
                                  (QAREF1O |vec| |i| 1) (QREFELT $ 57))
                        . #6#)
                  (EXIT
                   (COND
                    ((QEQCAR |bc| 1)
                     (PROGN
                      (LETT #1# (MAKEARR1 0 (|spadConstant| $ 50)) . #6#)
                      (GO #1#)))
                    ('T (QSETAREF1O |ans| |i| (QCAR (QCDR |bc|)) 1)))))
                 (LETT |i|
                       (PROG1 (+ |i| 1)
                         (LETT |j|
                               (PROG1 (QSADD1 |j|)
                                 (LETT |k| (QSADD1 |k|) . #6#))
                               . #6#))
                       . #6#)
                 #8=(GO G190) G191 (EXIT NIL))
            (EXIT |ans|)))
          (#9='T
           (SEQ
            (LETT |sol|
                  (SPADCALL (SPADCALL (ELT $ 60) |mat| (QREFELT $ 64))
                            (SPADCALL (ELT $ 60) |vec| (QREFELT $ 67))
                            (QREFELT $ 70))
                  . #6#)
            (EXIT
             (COND ((QEQCAR |sol| 1) (MAKEARR1 0 (|spadConstant| $ 50)))
                   (#9#
                    (SEQ
                     (SEQ (LETT |i| (SPADCALL |ans| (QREFELT $ 38)) . #6#)
                          (LETT #2# (QVSIZE |ans|) . #6#) G190
                          (COND ((> |i| #2#) #7#))
                          (SEQ
                           (LETT |bc|
                                 (SPADCALL
                                  (SPADCALL (QAREF1O (QCDR |sol|) |i| 1)
                                            (QREFELT $ 71))
                                  |modulus| (|spadConstant| $ 33)
                                  (QREFELT $ 57))
                                 . #6#)
                           (EXIT
                            (COND
                             ((QEQCAR |bc| 1)
                              (PROGN
                               (LETT #1# (MAKEARR1 0 (|spadConstant| $ 50))
                                     . #6#)
                               (GO #1#)))
                             ('T
                              (QSETAREF1O |ans| |i|
                                          (SPADCALL
                                           (SPADCALL
                                            (SPADCALL
                                             (QAREF1O (QCDR |sol|) |i| 1)
                                             (QREFELT $ 72))
                                            (QCAR (QCDR |bc|)) (QREFELT $ 23))
                                           |modulus| (QREFELT $ 73))
                                          1)))))
                          (LETT |i| (+ |i| 1) . #6#) #8# G191 (EXIT NIL))
                     (EXIT |ans|)))))))))))
      #1# (EXIT #1#))))) 

(DEFUN |AlgebraicHermiteIntegration| (&REST #1=#:G2106)
  (PROG ()
    (RETURN
     (PROG (#2=#:G2107)
       (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 74) . #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 . |minIndex|) (82 . *) (88 . -) (93 . |scalarMatrix|)
              (99 . +) (105 . |integralRepresents|) (111 . +) (117 . -)
              (123 . |row|) (129 . |dot|)
              (|Record| (|:| |answer| 9) (|:| |logpart| 9))
              |INTHERAL;HermiteIntegrate;RMR;1| (135 . |Zero|) (|Boolean|)
              (139 . |diagonal?|) (144 . |maxRowIndex|) (149 . |maxColIndex|)
              (|Record| (|:| |coef1| $) (|:| |coef2| $)) (|Union| 55 '"failed")
              (154 . |extendedEuclidean|) (161 . |Zero|) (|Fraction| 7)
              (165 . |coerce|) (|Matrix| 59) (|Mapping| 59 7)
              (|MatrixCategoryFunctions2| 7 24 24 16 59 65 65 61) (170 . |map|)
              (|Vector| 59) (|VectorFunctions2| 7 59) (176 . |map|)
              (|Union| 65 '"failed") (|LinearSystemMatrixPackage| 59 65 65 61)
              (182 . |particularSolution|) (188 . |denom|) (193 . |numer|)
              (198 . |rem|))
           '#(|HermiteIntegrate| 204) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 73
                                                 '(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 24 37 0 38 2 7
                                                   0 37 0 39 1 7 0 0 40 2 16 0
                                                   34 7 41 2 16 0 0 0 42 2 9 0
                                                   24 7 43 2 9 0 0 0 44 2 7 0 0
                                                   0 45 2 16 24 0 37 46 2 24 7
                                                   0 0 47 0 7 0 50 1 16 51 0 52
                                                   1 16 37 0 53 1 16 37 0 54 3
                                                   7 56 0 0 0 57 0 6 0 58 1 59
                                                   0 7 60 2 63 61 62 16 64 2 66
                                                   65 62 24 67 2 69 68 61 65 70
                                                   1 59 7 0 71 1 59 7 0 72 2 7
                                                   0 0 0 73 2 0 48 9 14 49)))))
           '|lookupComplete|)) 
