
(/VERSIONCHECK 2) 

(DEFUN |ASSOCEQ;makeMatrix| (|v| |n| $)
  (PROG (#1=#:G668 |i| #2=#:G667)
    (RETURN
     (SEQ
      (SPADCALL
       (PROGN
        (LETT #2# NIL . #3=(|ASSOCEQ;makeMatrix|))
        (SEQ (LETT |i| 1 . #3#) (LETT #1# (QVSIZE |v|) . #3#) G190
             (COND ((QSGREATERP |i| #1#) (GO G191)))
             (SEQ
              (EXIT
               (LETT #2#
                     (CONS
                      (SPADCALL
                       (SPADCALL (SPADCALL |v| |i| (QREFELT $ 13)) |n|
                                 (QREFELT $ 15))
                       (QREFELT $ 17))
                      #2#)
                     . #3#)))
             (LETT |i| (QSADD1 |i|) . #3#) (GO G190) G191
             (EXIT (NREVERSE0 #2#))))
       (QREFELT $ 19)))))) 

(DEFUN |ASSOCEQ;associatedSystem;LPiR;2| (|op| |m| $)
  (PROG (|u| #1=#:G688 #2=#:G686 |j| #3=#:G679 |k| |wi| |eq| |i| |a| #4=#:G676
         #5=#:G700 #6=#:G699 |an| |m1| #7=#:G671 M |ww| |s| |w| S |n|
         #8=#:G670)
    (RETURN
     (SEQ
      (LETT S
            (|SetOfMIntegersInOneToN| |m|
                                      (LETT |n|
                                            (PROG1
                                                (LETT #8#
                                                      (SPADCALL |op|
                                                                (QREFELT $ 21))
                                                      . #9=(|ASSOCEQ;associatedSystem;LPiR;2|))
                                              (|check-subtype| (> #8# 0)
                                                               '(|PositiveInteger|)
                                                               #8#))
                                            . #9#))
            . #9#)
      (LETT |w|
            (SPADCALL
             (|compiledLookupCheck| '|enumerate| (LIST (LIST '|List| '$)) S))
            . #9#)
      (LETT |s|
            (SPADCALL
             (|compiledLookupCheck| '|size| (LIST (LIST '|NonNegativeInteger|))
                                    S))
            . #9#)
      (LETT |ww| (SPADCALL |s| NIL (QREFELT $ 24)) . #9#)
      (LETT M (SPADCALL |s| |s| (|spadConstant| $ 25) (QREFELT $ 27)) . #9#)
      (LETT |m1|
            (PROG1 (LETT #7# (- |m| 1) . #9#)
              (|check-subtype| (> #7# 0) '(|PositiveInteger|) #7#))
            . #9#)
      (LETT |an| (SPADCALL |op| (QREFELT $ 29)) . #9#)
      (LETT |a|
            (PROGN
             (LETT #6# (GETREFV |n|) . #9#)
             (SEQ (LETT |j| 0 . #9#) (LETT #5# (- |n| 1) . #9#) G190
                  (COND ((QSGREATERP |j| #5#) #10=(GO G191)))
                  (SEQ
                   (EXIT
                    (SETELT #6# |j|
                            (SPADCALL
                             (PROG2
                                 (LETT #4#
                                       (SPADCALL
                                        (SPADCALL |op| |j| (QREFELT $ 31)) |an|
                                        (QREFELT $ 33))
                                       . #9#)
                                 (QCDR #4#)
                               (|check-union| (QEQCAR #4# 0) (QREFELT $ 6)
                                              #4#))
                             (QREFELT $ 34)))))
                  (LETT |j| (QSADD1 |j|) . #9#) #11=(GO G190) G191 (EXIT NIL))
             #6#)
            . #9#)
      (SEQ (LETT |i| 1 . #9#) G190 (COND ((QSGREATERP |i| |s|) #10#))
           (SEQ
            (LETT |eq| (SPADCALL |s| (|spadConstant| $ 25) (QREFELT $ 35))
                  . #9#)
            (LETT |wi|
                  (SPADCALL |w| |i|
                            (|compiledLookupCheck| '|elt|
                                                   (LIST (|devaluate| S) '$
                                                         (LIST '|Integer|))
                                                   (|List| S)))
                  . #9#)
            (SPADCALL |ww| |i|
                      (SPADCALL |wi|
                                (|compiledLookupCheck| '|elements|
                                                       (LIST
                                                        (LIST '|List|
                                                              (LIST
                                                               '|PositiveInteger|))
                                                        '$)
                                                       S))
                      (QREFELT $ 36))
            (SEQ (LETT |k| 1 . #9#) G190 (COND ((QSGREATERP |k| |m1|) #10#))
                 (SEQ
                  (LETT |u|
                        (SPADCALL |wi|
                                  (PROG1 (LETT #3# |k| . #9#)
                                    (|check-subtype| (> #3# 0)
                                                     '(|PositiveInteger|) #3#))
                                  (|compiledLookupCheck| '|incrementKthElement|
                                                         (LIST
                                                          (LIST '|Union| '$
                                                                '#12="failed")
                                                          '$
                                                          (LIST
                                                           '|PositiveInteger|))
                                                         S))
                        . #9#)
                  (EXIT
                   (COND
                    ((QEQCAR |u| 0)
                     (SPADCALL |eq|
                               (SPADCALL (QCDR |u|)
                                         (|compiledLookupCheck| '|lookup|
                                                                (LIST
                                                                 (LIST
                                                                  '|PositiveInteger|)
                                                                 '$)
                                                                S))
                               (|spadConstant| $ 28) (QREFELT $ 37))))))
                 (LETT |k| (QSADD1 |k|) . #9#) #11# G191 (EXIT NIL))
            (COND
             ((SPADCALL |n| |wi|
                        (|compiledLookupCheck| '|member?|
                                               (LIST (LIST '|Boolean|)
                                                     (LIST '|PositiveInteger|)
                                                     '$)
                                               S))
              (SEQ (LETT |j| 1 . #9#) G190 (COND ((QSGREATERP |j| |n|) #10#))
                   (SEQ
                    (EXIT
                     (COND
                      ((COND
                        ((SPADCALL (SPADCALL |a| |j| (QREFELT $ 38))
                                   (|spadConstant| $ 25) (QREFELT $ 40))
                         'NIL)
                        ('T 'T))
                       (SEQ
                        (LETT |u|
                              (SPADCALL |wi| |m|
                                        (PROG1 (LETT #2# |j| . #9#)
                                          (|check-subtype| (> #2# 0)
                                                           '(|PositiveInteger|)
                                                           #2#))
                                        (|compiledLookupCheck|
                                         '|replaceKthElement|
                                         (LIST (LIST '|Union| '$ '"failed") '$
                                               (LIST '|PositiveInteger|)
                                               (LIST '|PositiveInteger|))
                                         S))
                              . #9#)
                        (EXIT
                         (COND
                          ((QEQCAR |u| 0)
                           (SPADCALL |eq|
                                     (SPADCALL (QCDR |u|)
                                               (|compiledLookupCheck| '|lookup|
                                                                      (LIST
                                                                       (LIST
                                                                        '|PositiveInteger|)
                                                                       '$)
                                                                      S))
                                     (COND
                                      ((ODDP
                                        (SPADCALL |wi| |m|
                                                  (PROG1 (LETT #1# |j| . #9#)
                                                    (|check-subtype| (> #1# 0)
                                                                     '(|PositiveInteger|)
                                                                     #1#))
                                                  (|compiledLookupCheck|
                                                   '|delta|
                                                   (LIST
                                                    (LIST
                                                     '|NonNegativeInteger|)
                                                    '$
                                                    (LIST '|PositiveInteger|)
                                                    (LIST '|PositiveInteger|))
                                                   S)))
                                       (SPADCALL
                                        (SPADCALL |a| |j| (QREFELT $ 38))
                                        (QREFELT $ 34)))
                                      ('T (SPADCALL |a| |j| (QREFELT $ 38))))
                                     (QREFELT $ 37))))))))))
                   (LETT |j| (QSADD1 |j|) . #9#) #11# G191 (EXIT NIL)))
             ('T
              (SEQ
               (LETT |u|
                     (SPADCALL |wi| |m|
                               (|compiledLookupCheck| '|incrementKthElement|
                                                      (LIST
                                                       (LIST '|Union| '$ '#12#)
                                                       '$
                                                       (LIST
                                                        '|PositiveInteger|))
                                                      S))
                     . #9#)
               (EXIT
                (COND
                 ((QEQCAR |u| 0)
                  (SPADCALL |eq|
                            (SPADCALL (QCDR |u|)
                                      (|compiledLookupCheck| '|lookup|
                                                             (LIST
                                                              (LIST
                                                               '|PositiveInteger|)
                                                              '$)
                                                             S))
                            (|spadConstant| $ 28) (QREFELT $ 37))))))))
            (EXIT (SPADCALL M |i| |eq| (QREFELT $ 41))))
           (LETT |i| (QSADD1 |i|) . #9#) #11# G191 (EXIT NIL))
      (EXIT (CONS M |ww|)))))) 

(DEFUN |ASSOCEQ;uncouplingMatrices;MV;3| (|m| $)
  (PROG (|i| #1=#:G707 #2=#:G706 |mi| |v| |n|)
    (RETURN
     (SEQ
      (LETT |n| (SPADCALL |m| (QREFELT $ 45))
            . #3=(|ASSOCEQ;uncouplingMatrices;MV;3|))
      (LETT |v| (SPADCALL |n| (SPADCALL 1 0 (QREFELT $ 46)) (QREFELT $ 47))
            . #3#)
      (SPADCALL |v| 1 (LETT |mi| |m| . #3#) (QREFELT $ 48))
      (SEQ (LETT |i| 2 . #3#) G190 (COND ((QSGREATERP |i| |n|) #4=(GO G191)))
           (SEQ
            (EXIT
             (SPADCALL |v| |i|
                       (LETT |mi|
                             (SPADCALL
                              (SPADCALL
                               (CONS #'|ASSOCEQ;uncouplingMatrices;MV;3!0|
                                     (VECTOR $ (QREFELT $ 9)))
                               |mi| (QREFELT $ 51))
                              (SPADCALL |mi| |m| (QREFELT $ 52))
                              (QREFELT $ 53))
                             . #3#)
                       (QREFELT $ 48))))
           (LETT |i| (QSADD1 |i|) . #3#) #5=(GO G190) G191 (EXIT NIL))
      (EXIT
       (PROGN
        (LETT #2# (GETREFV |n|) . #3#)
        (SEQ (LETT #1# 0 . #3#) (LETT |i| 1 . #3#) G190
             (COND ((QSGREATERP |i| |n|) #4#))
             (SEQ (EXIT (SETELT #2# #1# (|ASSOCEQ;makeMatrix| |v| |i| $))))
             (LETT |i| (PROG1 (QSADD1 |i|) (LETT #1# (QSADD1 #1#) . #3#))
                   . #3#)
             #5# G191 (EXIT NIL))
        #2#)))))) 

(DEFUN |ASSOCEQ;uncouplingMatrices;MV;3!0| (|z1| $$)
  (PROG (|diff| $)
    (LETT |diff| (QREFELT $$ 1) . #1=(|ASSOCEQ;uncouplingMatrices;MV;3|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |diff| |z1| (QREFELT $ 49)))))) 

(DEFUN |ASSOCEQ;makeeq| (|v| |m| |i| |n| $)
  (PROG (|j| #1=#:G713 #2=#:G712)
    (RETURN
     (SEQ
      (VECTOR (SPADCALL |v| |i| (QREFELT $ 55))
              (SPADCALL (|ASSOCEQ;makeop| (SPADCALL |m| |i| (QREFELT $ 15)) $)
                        (|spadConstant| $ 30) (QREFELT $ 56))
              (PROGN
               (LETT #2# NIL . #3=(|ASSOCEQ;makeeq|))
               (SEQ (LETT |j| 1 . #3#) G190
                    (COND ((QSGREATERP |j| |n|) #4=(GO G191)))
                    (SEQ
                     (EXIT
                      (COND
                       ((COND ((EQL |j| |i|) 'NIL) (#5='T 'T))
                        (LETT #2# (CONS (SPADCALL |v| |j| (QREFELT $ 55)) #2#)
                              . #3#)))))
                    (LETT |j| (QSADD1 |j|) . #3#) #6=(GO G190) G191
                    (EXIT (NREVERSE0 #2#))))
              (PROGN
               (LETT #1# NIL . #3#)
               (SEQ (LETT |j| 1 . #3#) G190 (COND ((QSGREATERP |j| |n|) #4#))
                    (SEQ
                     (EXIT
                      (COND
                       ((COND ((EQL |j| |i|) 'NIL) (#5# 'T))
                        (LETT #1#
                              (CONS
                               (|ASSOCEQ;makeop|
                                (SPADCALL |m| |j| (QREFELT $ 15)) $)
                               #1#)
                              . #3#)))))
                    (LETT |j| (QSADD1 |j|) . #3#) #6# G191
                    (EXIT (NREVERSE0 #1#))))))))) 

(DEFUN |ASSOCEQ;associatedEquations;LPiR;5| (|op| |m| $)
  (PROG (|i| |ww| |s| |w| S #1=#:G721 |v| |u|)
    (RETURN
     (SEQ
      (LETT |u| (SPADCALL |op| |m| (QREFELT $ 59))
            . #2=(|ASSOCEQ;associatedEquations;LPiR;5|))
      (EXIT
       (COND ((QEQCAR |u| 1) (|ASSOCEQ;computeIt| |op| |m| 1 $))
             (#3='T
              (SEQ (LETT |v| (SPADCALL (QCDR |u|) (QREFELT $ 60)) . #2#)
                   (EXIT
                    (COND ((QEQCAR |v| 1) (|ASSOCEQ;computeIt| |op| |m| 2 $))
                          (#3#
                           (SEQ
                            (LETT S
                                  (|SetOfMIntegersInOneToN| |m|
                                                            (PROG1
                                                                (LETT #1#
                                                                      (SPADCALL
                                                                       |op|
                                                                       (QREFELT
                                                                        $ 21))
                                                                      . #2#)
                                                              (|check-subtype|
                                                               (> #1# 0)
                                                               '(|PositiveInteger|)
                                                               #1#)))
                                  . #2#)
                            (LETT |w|
                                  (SPADCALL
                                   (|compiledLookupCheck| '|enumerate|
                                                          (LIST
                                                           (LIST '|List| '$))
                                                          S))
                                  . #2#)
                            (LETT |s|
                                  (SPADCALL
                                   (|compiledLookupCheck| '|size|
                                                          (LIST
                                                           (LIST
                                                            '|NonNegativeInteger|))
                                                          S))
                                  . #2#)
                            (LETT |ww| (SPADCALL |s| NIL (QREFELT $ 24)) . #2#)
                            (SEQ (LETT |i| 1 . #2#) G190
                                 (COND ((QSGREATERP |i| |s|) (GO G191)))
                                 (SEQ
                                  (EXIT
                                   (SPADCALL |ww| |i|
                                             (SPADCALL
                                              (SPADCALL |w| |i|
                                                        (|compiledLookupCheck|
                                                         '|elt|
                                                         (LIST (|devaluate| S)
                                                               '$
                                                               (LIST
                                                                '|Integer|))
                                                         (|List| S)))
                                              (|compiledLookupCheck|
                                               '|elements|
                                               (LIST
                                                (LIST '|List|
                                                      (LIST
                                                       '|PositiveInteger|))
                                                '$)
                                               S))
                                             (QREFELT $ 36))))
                                 (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191
                                 (EXIT NIL))
                            (EXIT
                             (|ASSOCEQ;makeeq| |ww| (QCDR |v|) 1 |s|
                              $)))))))))))))) 

(DEFUN |ASSOCEQ;computeIt| (|op| |m| |k| $)
  (PROG (#1=#:G734 #2=#:G736 |u| |i| |n| |a| |rec|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |rec| (SPADCALL |op| |m| (QREFELT $ 44))
              . #3=(|ASSOCEQ;computeIt|))
        (LETT |a| (SPADCALL (QCAR |rec|) (QREFELT $ 54)) . #3#)
        (LETT |n| (QVSIZE |a|) . #3#)
        (SEQ
         (EXIT
          (SEQ (LETT |i| |k| . #3#) G190 (COND ((> |i| |n|) (GO G191)))
               (SEQ
                (LETT |u|
                      (SPADCALL (SPADCALL |a| |i| (QREFELT $ 13))
                                (QREFELT $ 60))
                      . #3#)
                (EXIT
                 (COND
                  ((QEQCAR |u| 0)
                   (PROGN
                    (LETT #1#
                          (PROGN
                           (LETT #2#
                                 (|ASSOCEQ;makeeq| (QCDR |rec|) (QCDR |u|) |i|
                                  |n| $)
                                 . #3#)
                           (GO #2#))
                          . #3#)
                    (GO #1#))))))
               (LETT |i| (+ |i| 1) . #3#) (GO G190) G191 (EXIT NIL)))
         #1# (EXIT #1#))
        (EXIT (|error| "associatedEquations: full degenerate case"))))
      #2# (EXIT #2#))))) 

(DEFUN |ASSOCEQ;makeop| (|v| $)
  (PROG (|op| #1=#:G740 |i|)
    (RETURN
     (SEQ (LETT |op| (|spadConstant| $ 26) . #2=(|ASSOCEQ;makeop|))
          (SEQ (LETT |i| 1 . #2#) (LETT #1# (QVSIZE |v|) . #2#) G190
               (COND ((QSGREATERP |i| #1#) (GO G191)))
               (SEQ
                (EXIT
                 (LETT |op|
                       (SPADCALL |op|
                                 (SPADCALL (SPADCALL |v| |i| (QREFELT $ 38))
                                           |i| (QREFELT $ 63))
                                 (QREFELT $ 64))
                       . #2#)))
               (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |op|))))) 

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

(DEFUN |AssociatedEquations;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|AssociatedEquations|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|AssociatedEquations| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 65) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#1| '(|Field|))))
                      . #1#))
      (|haddProp| |$ConstructorCache| '|AssociatedEquations| (LIST DV$1 DV$2)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 9 (SPADCALL (QREFELT $ 8)))
      (COND
       ((|testBitVector| |pv$| 1)
        (PROGN
         (QSETREFV $ 62
                   (CONS
                    (|dispatchFunction| |ASSOCEQ;associatedEquations;LPiR;5|)
                    $)))))
      $)))) 

(MAKEPROP '|AssociatedEquations| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (0 . D)
              '|diff| (|Matrix| 6) (|Integer|) (|Vector| 10) (4 . |elt|)
              (|Vector| 6) (10 . |row|) (|List| 6) (16 . |parts|) (|List| 16)
              (21 . |matrix|) (|NonNegativeInteger|) (26 . |degree|)
              (|List| 43) (|Vector| 22) (31 . |new|) (37 . |Zero|)
              (41 . |Zero|) (45 . |new|) (52 . |One|)
              (56 . |leadingCoefficient|) (61 . |One|) (65 . |coefficient|)
              (|Union| $ '"failed") (71 . |exquo|) (77 . -) (82 . |new|)
              (88 . |setelt|) (95 . |setelt|) (102 . |elt|) (|Boolean|)
              (108 . =) (114 . |setRow!|)
              (|Record| (|:| |mat| 10) (|:| |vec| 23)) (|PositiveInteger|)
              |ASSOCEQ;associatedSystem;LPiR;2| (121 . |nrows|) (126 . |zero|)
              (132 . |new|) (138 . |setelt|) (145 . |elt|) (|Mapping| 6 6)
              (151 . |map|) (157 . *) (163 . +)
              |ASSOCEQ;uncouplingMatrices;MV;3| (169 . |elt|) (175 . -)
              (|Union| 10 '"failed") (|PrecomputedAssociatedEquations| 6 7)
              (181 . |firstUncouplingMatrix|) (187 . |inverse|)
              (|Record| (|:| |minor| 22) (|:| |eq| 7)
                        (|:| |minors| (|List| 22)) (|:| |ops| (|List| 7)))
              (192 . |associatedEquations|) (198 . |monomial|) (204 . +))
           '#(|uncouplingMatrices| 210 |associatedSystem| 215
              |associatedEquations| 221)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 64
                                                 '(0 7 0 8 2 12 10 0 11 13 2 10
                                                   14 0 11 15 1 14 16 0 17 1 10
                                                   0 18 19 1 7 20 0 21 2 23 0
                                                   20 22 24 0 6 0 25 0 7 0 26 3
                                                   10 0 20 20 6 27 0 6 0 28 1 7
                                                   6 0 29 0 7 0 30 2 7 6 0 20
                                                   31 2 6 32 0 0 33 1 6 0 0 34
                                                   2 14 0 20 6 35 3 23 22 0 11
                                                   22 36 3 14 6 0 11 6 37 2 14
                                                   6 0 11 38 2 6 39 0 0 40 3 10
                                                   0 0 11 14 41 1 10 20 0 45 2
                                                   10 0 20 20 46 2 12 0 20 10
                                                   47 3 12 10 0 11 10 48 2 7 6
                                                   0 6 49 2 10 0 50 0 51 2 10 0
                                                   0 0 52 2 10 0 0 0 53 2 23 22
                                                   0 11 55 2 7 0 0 0 56 2 58 57
                                                   7 43 59 1 10 32 0 60 2 0 61
                                                   7 43 62 2 7 0 6 20 63 2 7 0
                                                   0 0 64 1 0 12 10 54 2 0 42 7
                                                   43 44 2 1 61 7 43 62)))))
           '|lookupComplete|)) 
