
(/VERSIONCHECK 2) 

(DEFUN |MATCAT-;square?;SB;1| (|x| $)
  (EQL (SPADCALL |x| (QREFELT $ 11)) (SPADCALL |x| (QREFELT $ 12)))) 

(DEFUN |MATCAT-;diagonal?;SB;2| (|x| $)
  (PROG (|i| #0=#:G1884 |j| #1=#:G1885 #2=#:G1883 #3=#:G1880)
    (RETURN
      (SEQ (EXIT (COND
                   ((NULL (SPADCALL |x| (QREFELT $ 15))) 'NIL)
                   ('T
                    (SEQ (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17))
                                    . #4=(|MATCAT-;diagonal?;SB;2|))
                              (LETT #0#
                                    (SPADCALL |x| (QREFELT $ 18)) . #4#)
                              G190 (COND ((> |i| #0#) #5=(GO G191)))
                              (SEQ (EXIT
                                    (SEQ
                                     (LETT |j|
                                      (SPADCALL |x| (QREFELT $ 19)) . #4#)
                                     (LETT #1#
                                      (SPADCALL |x| (QREFELT $ 20)) . #4#)
                                     G190 (COND ((> |j| #1#) #5#))
                                     (SEQ
                                      (EXIT
                                       (COND
                                         ((COND
                                            ((EQL
                                              (- |j|
                                               (SPADCALL |x|
                                                (QREFELT $ 19)))
                                              (- |i|
                                               (SPADCALL |x|
                                                (QREFELT $ 17))))
                                             'NIL)
                                            ('T 'T))
                                          (COND
                                            ((NULL
                                              (SPADCALL
                                               (SPADCALL |x| |i| |j|
                                                (QREFELT $ 21))
                                               (QREFELT $ 22)))
                                             (PROGN
                                               (LETT #3#
                                                (PROGN
                                                  (LETT #2# 'NIL . #4#)
                                                  (GO #2#)) . #4#)
                                               (GO #3#))))))))
                                     (LETT |j| (+ |j| 1) . #4#)
                                     #6=(GO G190) G191 (EXIT NIL)))
                                   #3# (EXIT #3#))
                              (LETT |i| (+ |i| 1) . #4#) #6# G191
                              (EXIT NIL))
                         (EXIT 'T)))))
           #2# (EXIT #2#))))) 

(DEFUN |MATCAT-;symmetric?;SB;3| (|x| $)
  (PROG (|nRows| |mr| |mc| |i| #0=#:G1892 |j| #1=#:G1893 #2=#:G1891
                 #3=#:G1888)
    (RETURN
      (SEQ (EXIT (COND
                   ((NULL (EQL (LETT |nRows|
                                     (SPADCALL |x| (QREFELT $ 11))
                                     . #4=(|MATCAT-;symmetric?;SB;3|))
                               (SPADCALL |x| (QREFELT $ 12))))
                    'NIL)
                   ('T
                    (SEQ (LETT |mr|
                               (SPADCALL |x| (QREFELT $ 17)) . #4#)
                         (LETT |mc|
                               (SPADCALL |x| (QREFELT $ 19)) . #4#)
                         (SEQ (LETT |i| 0 . #4#)
                              (LETT #0# (- |nRows| 1) . #4#) G190
                              (COND
                                ((QSGREATERP |i| #0#) #5=(GO G191)))
                              (SEQ (EXIT
                                    (SEQ (LETT |j| (+ |i| 1) . #4#)
                                     (LETT #1# (- |nRows| 1) . #4#)
                                     G190 (COND ((> |j| #1#) #5#))
                                     (SEQ
                                      (EXIT
                                       (COND
                                         ((NULL
                                           (SPADCALL
                                            (SPADCALL |x| (+ |mr| |i|)
                                             (+ |mc| |j|)
                                             (QREFELT $ 21))
                                            (SPADCALL |x| (+ |mr| |j|)
                                             (+ |mc| |i|)
                                             (QREFELT $ 21))
                                            (QREFELT $ 25)))
                                          (PROGN
                                            (LETT #3#
                                             (PROGN
                                               (LETT #2# 'NIL . #4#)
                                               (GO #2#)) . #4#)
                                            (GO #3#))))))
                                     (LETT |j| (+ |j| 1) . #4#)
                                     #6=(GO G190) G191 (EXIT NIL)))
                                   #3# (EXIT #3#))
                              (LETT |i| (QSADD1 |i|) . #4#) #6# G191
                              (EXIT NIL))
                         (EXIT 'T)))))
           #2# (EXIT #2#))))) 

(DEFUN |MATCAT-;antisymmetric?;SB;4| (|x| $)
  (PROG (|nRows| |mr| |mc| |i| #0=#:G1900 |j| #1=#:G1901 #2=#:G1899
                 #3=#:G1896)
    (RETURN
      (SEQ (EXIT (COND
                   ((NULL (EQL (LETT |nRows|
                                     (SPADCALL |x| (QREFELT $ 11))
                                     . #4=(|MATCAT-;antisymmetric?;SB;4|))
                               (SPADCALL |x| (QREFELT $ 12))))
                    'NIL)
                   ('T
                    (SEQ (LETT |mr|
                               (SPADCALL |x| (QREFELT $ 17)) . #4#)
                         (LETT |mc|
                               (SPADCALL |x| (QREFELT $ 19)) . #4#)
                         (SEQ (LETT |i| 0 . #4#)
                              (LETT #0# (- |nRows| 1) . #4#) G190
                              (COND
                                ((QSGREATERP |i| #0#) #5=(GO G191)))
                              (SEQ (EXIT
                                    (SEQ (LETT |j| |i| . #4#)
                                     (LETT #1# (- |nRows| 1) . #4#)
                                     G190 (COND ((> |j| #1#) #5#))
                                     (SEQ
                                      (EXIT
                                       (COND
                                         ((NULL
                                           (SPADCALL
                                            (SPADCALL |x| (+ |mr| |i|)
                                             (+ |mc| |j|)
                                             (QREFELT $ 21))
                                            (SPADCALL
                                             (SPADCALL |x| (+ |mr| |j|)
                                              (+ |mc| |i|)
                                              (QREFELT $ 21))
                                             (QREFELT $ 27))
                                            (QREFELT $ 25)))
                                          (PROGN
                                            (LETT #3#
                                             (PROGN
                                               (LETT #2# 'NIL . #4#)
                                               (GO #2#)) . #4#)
                                            (GO #3#))))))
                                     (LETT |j| (+ |j| 1) . #4#)
                                     #6=(GO G190) G191 (EXIT NIL)))
                                   #3# (EXIT #3#))
                              (LETT |i| (QSADD1 |i|) . #4#) #6# G191
                              (EXIT NIL))
                         (EXIT 'T)))))
           #2# (EXIT #2#))))) 

(DEFUN |MATCAT-;zero;2NniS;5| (|rows| |cols| $)
  (SPADCALL |rows| |cols| (|spadConstant| $ 29) (QREFELT $ 30))) 

(DEFUN |MATCAT-;matrix;LS;6| (|l| $)
  (PROG (|cols| #0=#:G1911 |rows| |ans| |ll| #1=#:G1913 |i| #2=#:G1912
                |r| #3=#:G1915 |j| #4=#:G1914)
    (RETURN
      (SEQ (COND
             ((NULL |l|)
              (SPADCALL 0 0 (|spadConstant| $ 29) (QREFELT $ 30)))
             (#5='T
              (SEQ (LETT |rows| 1 . #6=(|MATCAT-;matrix;LS;6|))
                   (LETT |cols| (LENGTH (|SPADfirst| |l|)) . #6#)
                   (EXIT (COND
                           ((EQL |cols| 0)
                            (|error| "matrices with zero columns are not supported"))
                           (#5#
                            (SEQ (SEQ (LETT |ll| NIL . #6#)
                                      (LETT #0# (CDR |l|) . #6#) G190
                                      (COND
                                        ((OR (ATOM #0#)
                                          (PROGN
                                            (LETT |ll| (CAR #0#) . #6#)
                                            NIL))
                                         #7=(GO G191)))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((NULL
                                            (EQL |cols| (LENGTH |ll|)))
                                           (|error|
                                            "matrix: rows of different lengths"))
                                          ('T
                                           (LETT |rows|
                                            (+ |rows| 1) . #6#)))))
                                      (LETT #0# (CDR #0#) . #6#)
                                      #8=(GO G190) G191 (EXIT NIL))
                                 (LETT |ans|
                                       (SPADCALL |rows| |cols|
                                        (|spadConstant| $ 29)
                                        (QREFELT $ 30)) . #6#)
                                 (SEQ (LETT |ll| NIL . #6#)
                                      (LETT #1# |l| . #6#)
                                      (LETT |i|
                                       (SPADCALL |ans| (QREFELT $ 17)) . #6#)
                                      (LETT #2#
                                       (SPADCALL |ans| (QREFELT $ 18)) . #6#)
                                      G190
                                      (COND
                                        ((OR (> |i| #2#) (ATOM #1#)
                                          (PROGN
                                            (LETT |ll| (CAR #1#) . #6#)
                                            NIL))
                                         #7#))
                                      (SEQ
                                       (EXIT
                                        (SEQ (LETT |r| NIL . #6#)
                                         (LETT #3# |ll| . #6#)
                                         (LETT |j|
                                          (SPADCALL |ans|
                                           (QREFELT $ 19)) . #6#)
                                         (LETT #4#
                                          (SPADCALL |ans|
                                           (QREFELT $ 20)) . #6#)
                                         G190
                                         (COND
                                           ((OR (> |j| #4#) (ATOM #3#)
                                             (PROGN
                                               (LETT |r|
                                                (CAR #3#) . #6#)
                                               NIL))
                                            #7#))
                                         (SEQ
                                          (EXIT
                                           (SPADCALL |ans| |i| |j| |r|
                                            (QREFELT $ 32))))
                                         (LETT |j|
                                          (PROG1 (+ |j| 1)
                                            (LETT #3# (CDR #3#) . #6#)) . #6#)
                                         #8# G191 (EXIT NIL))))
                                      (LETT |i|
                                       (PROG1 (+ |i| 1)
                                         (LETT #1# (CDR #1#) . #6#)) . #6#)
                                      #8# G191 (EXIT NIL))
                                 (EXIT |ans|)))))))))))) 

(DEFUN |MATCAT-;scalarMatrix;NniRS;7| (|n| |r| $)
  (PROG (|ans| |j| #0=#:G1920 |i| #1=#:G1919)
    (RETURN
      (SEQ (LETT |ans| (SPADCALL |n| |n| (QREFELT $ 35))
                 . #2=(|MATCAT-;scalarMatrix;NniRS;7|))
           (SEQ (LETT |j| (SPADCALL |ans| (QREFELT $ 19)) . #2#)
                (LETT #0# (SPADCALL |ans| (QREFELT $ 20)) . #2#)
                (LETT |i| (SPADCALL |ans| (QREFELT $ 17)) . #2#)
                (LETT #1# (SPADCALL |ans| (QREFELT $ 18)) . #2#) G190
                (COND ((OR (> |i| #1#) (> |j| #0#)) (GO G191)))
                (SEQ (EXIT (SPADCALL |ans| |i| |j| |r| (QREFELT $ 32))))
                (LETT |i|
                      (PROG1 (+ |i| 1) (LETT |j| (+ |j| 1) . #2#)) . #2#)
                (GO G190) G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;diagonalMatrix;LS;8| (|l| $)
  (PROG (|n| |ans| |r| #0=#:G1926 |j| #1=#:G1925 |i| #2=#:G1924)
    (RETURN
      (SEQ (LETT |n| (LENGTH |l|) . #3=(|MATCAT-;diagonalMatrix;LS;8|))
           (LETT |ans| (SPADCALL |n| |n| (QREFELT $ 35)) . #3#)
           (SEQ (LETT |r| NIL . #3#) (LETT #0# |l| . #3#)
                (LETT |j| (SPADCALL |ans| (QREFELT $ 19)) . #3#)
                (LETT #1# (SPADCALL |ans| (QREFELT $ 20)) . #3#)
                (LETT |i| (SPADCALL |ans| (QREFELT $ 17)) . #3#)
                (LETT #2# (SPADCALL |ans| (QREFELT $ 18)) . #3#) G190
                (COND
                  ((OR (> |i| #2#) (> |j| #1#) (ATOM #0#)
                       (PROGN (LETT |r| (CAR #0#) . #3#) NIL))
                   (GO G191)))
                (SEQ (EXIT (SPADCALL |ans| |i| |j| |r| (QREFELT $ 32))))
                (LETT |i|
                      (PROG1 (+ |i| 1)
                        (LETT |j|
                              (PROG1 (+ |j| 1)
                                (LETT #0# (CDR #0#) . #3#)) . #3#)) . #3#)
                (GO G190) G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;diagonalMatrix;LS;9| (|list| $)
  (PROG (#0=#:G1935 |rows| |cols| |ans| |mat| #1=#:G1936 |hiR| |hiC|
            |k| #2=#:G1937 |i| |l| #3=#:G1938 |j| |loR| |loC|)
    (RETURN
      (SEQ (LETT |rows| 0 . #4=(|MATCAT-;diagonalMatrix;LS;9|))
           (LETT |cols| 0 . #4#)
           (SEQ (LETT |mat| NIL . #4#) (LETT #0# |list| . #4#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |mat| (CAR #0#) . #4#) NIL))
                   #5=(GO G191)))
                (SEQ (LETT |rows|
                           (+ |rows| (SPADCALL |mat| (QREFELT $ 11))) . #4#)
                     (EXIT (LETT |cols|
                                 (+ |cols|
                                    (SPADCALL |mat| (QREFELT $ 12))) . #4#)))
                (LETT #0# (CDR #0#) . #4#) #6=(GO G190) G191
                (EXIT NIL))
           (LETT |ans| (SPADCALL |rows| |cols| (QREFELT $ 35)) . #4#)
           (LETT |loR| (SPADCALL |ans| (QREFELT $ 17)) . #4#)
           (LETT |loC| (SPADCALL |ans| (QREFELT $ 19)) . #4#)
           (SEQ (LETT |mat| NIL . #4#) (LETT #1# |list| . #4#) G190
                (COND
                  ((OR (ATOM #1#)
                       (PROGN (LETT |mat| (CAR #1#) . #4#) NIL))
                   #5#))
                (SEQ (LETT |hiR|
                           (- (+ |loR| (SPADCALL |mat| (QREFELT $ 11)))
                              1) . #4#)
                     (LETT |hiC|
                           (- (+ |loC| (SPADCALL |mat| (QREFELT $ 11)))
                              1) . #4#)
                     (SEQ (LETT |k|
                                (SPADCALL |mat| (QREFELT $ 17)) . #4#)
                          (LETT #2#
                                (SPADCALL |mat| (QREFELT $ 18)) . #4#)
                          (LETT |i| |loR| . #4#) G190
                          (COND ((OR (> |i| |hiR|) (> |k| #2#)) #5#))
                          (SEQ (EXIT (SEQ
                                      (LETT |l|
                                       (SPADCALL |mat| (QREFELT $ 19)) . #4#)
                                      (LETT #3#
                                       (SPADCALL |mat| (QREFELT $ 20)) . #4#)
                                      (LETT |j| |loC| . #4#) G190
                                      (COND
                                        ((OR (> |j| |hiC|) (> |l| #3#))
                                         #5#))
                                      (SEQ
                                       (EXIT
                                        (SPADCALL |ans| |i| |j|
                                         (SPADCALL |mat| |k| |l|
                                          (QREFELT $ 21))
                                         (QREFELT $ 32))))
                                      (LETT |j|
                                       (PROG1 (+ |j| 1)
                                         (LETT |l| (+ |l| 1) . #4#)) . #4#)
                                      #6# G191 (EXIT NIL))))
                          (LETT |i|
                                (PROG1 (+ |i| 1)
                                  (LETT |k| (+ |k| 1) . #4#)) . #4#)
                          #6# G191 (EXIT NIL))
                     (LETT |loR| (+ |hiR| 1) . #4#)
                     (EXIT (LETT |loC| (+ |hiC| 1) . #4#)))
                (LETT #1# (CDR #1#) . #4#) #6# G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;coerce;ColS;10| (|v| $)
  (PROG (|x| |one| |k| #0=#:G1943 |i| #1=#:G1942)
    (RETURN
      (SEQ (LETT |x|
                 (SPADCALL (SPADCALL |v| (QREFELT $ 41)) 1
                     (|spadConstant| $ 29) (QREFELT $ 30))
                 . #2=(|MATCAT-;coerce;ColS;10|))
           (LETT |one| (SPADCALL |x| (QREFELT $ 19)) . #2#)
           (SEQ (LETT |k| (SPADCALL |v| (QREFELT $ 42)) . #2#)
                (LETT #0# (SPADCALL |v| (QREFELT $ 43)) . #2#)
                (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #2#)
                (LETT #1# (SPADCALL |x| (QREFELT $ 18)) . #2#) G190
                (COND ((OR (> |i| #1#) (> |k| #0#)) (GO G191)))
                (SEQ (EXIT (SPADCALL |x| |i| |one|
                               (SPADCALL |v| |k| (QREFELT $ 44))
                               (QREFELT $ 32))))
                (LETT |i|
                      (PROG1 (+ |i| 1) (LETT |k| (+ |k| 1) . #2#)) . #2#)
                (GO G190) G191 (EXIT NIL))
           (EXIT |x|))))) 

(DEFUN |MATCAT-;transpose;RowS;11| (|v| $)
  (PROG (|x| |one| |k| #0=#:G1948 |j| #1=#:G1947)
    (RETURN
      (SEQ (LETT |x|
                 (SPADCALL 1 (SPADCALL |v| (QREFELT $ 46))
                     (|spadConstant| $ 29) (QREFELT $ 30))
                 . #2=(|MATCAT-;transpose;RowS;11|))
           (LETT |one| (SPADCALL |x| (QREFELT $ 17)) . #2#)
           (SEQ (LETT |k| (SPADCALL |v| (QREFELT $ 47)) . #2#)
                (LETT #0# (SPADCALL |v| (QREFELT $ 48)) . #2#)
                (LETT |j| (SPADCALL |x| (QREFELT $ 19)) . #2#)
                (LETT #1# (SPADCALL |x| (QREFELT $ 20)) . #2#) G190
                (COND ((OR (> |j| #1#) (> |k| #0#)) (GO G191)))
                (SEQ (EXIT (SPADCALL |x| |one| |j|
                               (SPADCALL |v| |k| (QREFELT $ 49))
                               (QREFELT $ 32))))
                (LETT |j|
                      (PROG1 (+ |j| 1) (LETT |k| (+ |k| 1) . #2#)) . #2#)
                (GO G190) G191 (EXIT NIL))
           (EXIT |x|))))) 

(DEFUN |MATCAT-;transpose;2S;12| (|x| $)
  (PROG (|ans| |i| #0=#:G1953 |j| #1=#:G1954)
    (RETURN
      (SEQ (LETT |ans|
                 (SPADCALL (SPADCALL |x| (QREFELT $ 12))
                     (SPADCALL |x| (QREFELT $ 11))
                     (|spadConstant| $ 29) (QREFELT $ 30))
                 . #2=(|MATCAT-;transpose;2S;12|))
           (SEQ (LETT |i| (SPADCALL |ans| (QREFELT $ 17)) . #2#)
                (LETT #0# (SPADCALL |ans| (QREFELT $ 18)) . #2#) G190
                (COND ((> |i| #0#) #3=(GO G191)))
                (SEQ (EXIT (SEQ (LETT |j|
                                      (SPADCALL |ans| (QREFELT $ 19)) . #2#)
                                (LETT #1#
                                      (SPADCALL |ans| (QREFELT $ 20)) . #2#)
                                G190 (COND ((> |j| #1#) #3#))
                                (SEQ (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL |x| |j| |i|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                (LETT |j| (+ |j| 1) . #2#) #4=(GO G190)
                                G191 (EXIT NIL))))
                (LETT |i| (+ |i| 1) . #2#) #4# G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;squareTop;2S;13| (|x| $)
  (PROG (|cols| |ans| |i| #0=#:G1960 |j| #1=#:G1961)
    (RETURN
      (SEQ (COND
             ((< (SPADCALL |x| (QREFELT $ 11))
                 (LETT |cols| (SPADCALL |x| (QREFELT $ 12))
                       . #2=(|MATCAT-;squareTop;2S;13|)))
              (|error| "squareTop: number of columns exceeds number of rows"))
             ('T
              (SEQ (LETT |ans|
                         (SPADCALL |cols| |cols| (|spadConstant| $ 29)
                             (QREFELT $ 30)) . #2#)
                   (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #2#)
                        (LETT #0#
                              (- (+ (SPADCALL |x| (QREFELT $ 17))
                                    |cols|)
                                 1) . #2#)
                        G190 (COND ((> |i| #0#) #3=(GO G191)))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |x| (QREFELT $ 19)) . #2#)
                                    (LETT #1#
                                     (SPADCALL |x| (QREFELT $ 20)) . #2#)
                                    G190 (COND ((> |j| #1#) #3#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL |x| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #2#)
                                    #4=(GO G190) G191 (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #2#) #4# G191 (EXIT NIL))
                   (EXIT |ans|)))))))) 

(DEFUN |MATCAT-;horizConcat;3S;14| (|x| |y| $)
  (PROG (|rows| |cols| |ans| #0=#:G1969 #1=#:G1970 |i| #2=#:G1971 |j|
                #3=#:G1972)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (LETT |rows| (SPADCALL |x| (QREFELT $ 11))
                               . #4=(|MATCAT-;horizConcat;3S;14|))
                         (SPADCALL |y| (QREFELT $ 11))))
              (|error| "HConcat: matrices must have same number of rows"))
             ('T
              (SEQ (LETT |ans|
                         (SPADCALL |rows|
                             (+ (LETT |cols|
                                      (SPADCALL |x| (QREFELT $ 12)) . #4#)
                                (SPADCALL |y| (QREFELT $ 12)))
                             (|spadConstant| $ 29) (QREFELT $ 30)) . #4#)
                   (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #4#)
                        (LETT #0# (SPADCALL |x| (QREFELT $ 18)) . #4#)
                        G190 (COND ((> |i| #0#) #5=(GO G191)))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |x| (QREFELT $ 19)) . #4#)
                                    (LETT #1#
                                     (SPADCALL |x| (QREFELT $ 20)) . #4#)
                                    G190 (COND ((> |j| #1#) #5#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL |x| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #4#)
                                    #6=(GO G190) G191 (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
                   (SEQ (LETT |i| (SPADCALL |y| (QREFELT $ 17)) . #4#)
                        (LETT #2# (SPADCALL |y| (QREFELT $ 18)) . #4#)
                        G190 (COND ((> |i| #2#) #5#))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |y| (QREFELT $ 19)) . #4#)
                                    (LETT #3#
                                     (SPADCALL |y| (QREFELT $ 20)) . #4#)
                                    G190 (COND ((> |j| #3#) #5#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| |i|
                                       (+ |j| |cols|)
                                       (SPADCALL |y| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #4#) #6# G191
                                    (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
                   (EXIT |ans|)))))))) 

(DEFUN |MATCAT-;vertConcat;3S;15| (|x| |y| $)
  (PROG (|cols| |rows| |ans| #0=#:G1980 #1=#:G1981 |i| #2=#:G1982 |j|
                #3=#:G1983)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (LETT |cols| (SPADCALL |x| (QREFELT $ 12))
                               . #4=(|MATCAT-;vertConcat;3S;15|))
                         (SPADCALL |y| (QREFELT $ 12))))
              (|error| "HConcat: matrices must have same number of columns"))
             ('T
              (SEQ (LETT |ans|
                         (SPADCALL
                             (+ (LETT |rows|
                                      (SPADCALL |x| (QREFELT $ 11)) . #4#)
                                (SPADCALL |y| (QREFELT $ 11)))
                             |cols| (|spadConstant| $ 29)
                             (QREFELT $ 30)) . #4#)
                   (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #4#)
                        (LETT #0# (SPADCALL |x| (QREFELT $ 18)) . #4#)
                        G190 (COND ((> |i| #0#) #5=(GO G191)))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |x| (QREFELT $ 19)) . #4#)
                                    (LETT #1#
                                     (SPADCALL |x| (QREFELT $ 20)) . #4#)
                                    G190 (COND ((> |j| #1#) #5#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL |x| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #4#)
                                    #6=(GO G190) G191 (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
                   (SEQ (LETT |i| (SPADCALL |y| (QREFELT $ 17)) . #4#)
                        (LETT #2# (SPADCALL |y| (QREFELT $ 18)) . #4#)
                        G190 (COND ((> |i| #2#) #5#))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |y| (QREFELT $ 19)) . #4#)
                                    (LETT #3#
                                     (SPADCALL |y| (QREFELT $ 20)) . #4#)
                                    G190 (COND ((> |j| #3#) #5#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| (+ |i| |rows|)
                                       |j|
                                       (SPADCALL |y| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #4#) #6# G191
                                    (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
                   (EXIT |ans|)))))))) 

(DEFUN |MATCAT-;listOfLists;SL;16| (|x| $)
  (PROG (|i| #0=#:G1989 |j| #1=#:G1990 |l| |ll|)
    (RETURN
      (SEQ (LETT |ll| NIL . #2=(|MATCAT-;listOfLists;SL;16|))
           (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 18)) . #2#)
                (LETT #0# (SPADCALL |x| (QREFELT $ 17)) . #2#) G190
                (COND ((< |i| #0#) #3=(GO G191)))
                (SEQ (LETT |l| NIL . #2#)
                     (SEQ (LETT |j|
                                (SPADCALL |x| (QREFELT $ 20)) . #2#)
                          (LETT #1#
                                (SPADCALL |x| (QREFELT $ 19)) . #2#)
                          G190 (COND ((< |j| #1#) #3#))
                          (SEQ (EXIT (LETT |l|
                                      (CONS
                                       (SPADCALL |x| |i| |j|
                                        (QREFELT $ 21))
                                       |l|) . #2#)))
                          (LETT |j| (+ |j| -1) . #2#) #4=(GO G190) G191
                          (EXIT NIL))
                     (EXIT (LETT |ll| (CONS |l| |ll|) . #2#)))
                (LETT |i| (+ |i| -1) . #2#) #4# G191 (EXIT NIL))
           (EXIT |ll|))))) 

(DEFUN |MATCAT-;swapRows!;S2IS;17| (|x| |i1| |i2| $)
  (PROG (|j| #0=#:G2000 |r|)
    (RETURN
      (SEQ (COND
             ((OR (< |i1| (SPADCALL |x| (QREFELT $ 17)))
                  (OR (< (SPADCALL |x| (QREFELT $ 18)) |i1|)
                      (OR (< |i2| (SPADCALL |x| (QREFELT $ 17)))
                          (< (SPADCALL |x| (QREFELT $ 18)) |i2|))))
              (|error| "swapRows!: index out of range"))
             ('T
              (COND
                ((EQL |i1| |i2|) |x|)
                ('T
                 (SEQ (SEQ (LETT |j| (SPADCALL |x| (QREFELT $ 19))
                                 . #1=(|MATCAT-;swapRows!;S2IS;17|))
                           (LETT #0#
                                 (SPADCALL |x| (QREFELT $ 20)) . #1#)
                           G190 (COND ((> |j| #0#) (GO G191)))
                           (SEQ (LETT |r|
                                      (SPADCALL |x| |i1| |j|
                                       (QREFELT $ 21)) . #1#)
                                (SPADCALL |x| |i1| |j|
                                    (SPADCALL |x| |i2| |j|
                                     (QREFELT $ 21))
                                    (QREFELT $ 32))
                                (EXIT (SPADCALL |x| |i2| |j| |r|
                                       (QREFELT $ 32))))
                           (LETT |j| (+ |j| 1) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT |x|)))))))))) 

(DEFUN |MATCAT-;swapColumns!;S2IS;18| (|x| |j1| |j2| $)
  (PROG (|i| #0=#:G2010 |r|)
    (RETURN
      (SEQ (COND
             ((OR (< |j1| (SPADCALL |x| (QREFELT $ 19)))
                  (OR (< (SPADCALL |x| (QREFELT $ 20)) |j1|)
                      (OR (< |j2| (SPADCALL |x| (QREFELT $ 19)))
                          (< (SPADCALL |x| (QREFELT $ 20)) |j2|))))
              (|error| "swapColumns!: index out of range"))
             ('T
              (COND
                ((EQL |j1| |j2|) |x|)
                ('T
                 (SEQ (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17))
                                 . #1=(|MATCAT-;swapColumns!;S2IS;18|))
                           (LETT #0#
                                 (SPADCALL |x| (QREFELT $ 18)) . #1#)
                           G190 (COND ((> |i| #0#) (GO G191)))
                           (SEQ (LETT |r|
                                      (SPADCALL |x| |i| |j1|
                                       (QREFELT $ 21)) . #1#)
                                (SPADCALL |x| |i| |j1|
                                    (SPADCALL |x| |i| |j2|
                                     (QREFELT $ 21))
                                    (QREFELT $ 32))
                                (EXIT (SPADCALL |x| |i| |j2| |r|
                                       (QREFELT $ 32))))
                           (LETT |i| (+ |i| 1) . #1#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT |x|)))))))))) 

(DEFUN |MATCAT-;elt;S2LS;19| (|x| |rowList| |colList| $)
  (PROG (#0=#:G2021 #1=#:G2013 #2=#:G2022 #3=#:G2016 |y| |i| #4=#:G2024
            |ei| #5=#:G2023 |j| #6=#:G2026 |ej| #7=#:G2025)
    (RETURN
      (SEQ (SEQ (EXIT (SEQ (LETT |ei| NIL . #8=(|MATCAT-;elt;S2LS;19|))
                           (LETT #0# |rowList| . #8#) G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |ei| (CAR #0#) . #8#)
                                    NIL))
                              #9=(GO G191)))
                           (SEQ (EXIT (COND
                                        ((OR
                                          (< |ei|
                                           (SPADCALL |x|
                                            (QREFELT $ 17)))
                                          (<
                                           (SPADCALL |x|
                                            (QREFELT $ 18))
                                           |ei|))
                                         (PROGN
                                           (LETT #1#
                                            (|error|
                                             "elt: index out of range") . #8#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #8#) #10=(GO G190)
                           G191 (EXIT NIL)))
                #1# (EXIT #1#))
           (SEQ (EXIT (SEQ (LETT |ej| NIL . #8#)
                           (LETT #2# |colList| . #8#) G190
                           (COND
                             ((OR (ATOM #2#)
                                  (PROGN
                                    (LETT |ej| (CAR #2#) . #8#)
                                    NIL))
                              #9#))
                           (SEQ (EXIT (COND
                                        ((OR
                                          (< |ej|
                                           (SPADCALL |x|
                                            (QREFELT $ 19)))
                                          (<
                                           (SPADCALL |x|
                                            (QREFELT $ 20))
                                           |ej|))
                                         (PROGN
                                           (LETT #3#
                                            (|error|
                                             "elt: index out of range") . #8#)
                                           (GO #3#))))))
                           (LETT #2# (CDR #2#) . #8#) #10# G191
                           (EXIT NIL)))
                #3# (EXIT #3#))
           (LETT |y|
                 (SPADCALL (LENGTH |rowList|) (LENGTH |colList|)
                     (|spadConstant| $ 29) (QREFELT $ 30)) . #8#)
           (SEQ (LETT |i| (SPADCALL |y| (QREFELT $ 17)) . #8#)
                (LETT #4# (SPADCALL |y| (QREFELT $ 18)) . #8#)
                (LETT |ei| NIL . #8#) (LETT #5# |rowList| . #8#) G190
                (COND
                  ((OR (ATOM #5#)
                       (PROGN (LETT |ei| (CAR #5#) . #8#) NIL)
                       (> |i| #4#))
                   #9#))
                (SEQ (EXIT (SEQ (LETT |j|
                                      (SPADCALL |y| (QREFELT $ 19)) . #8#)
                                (LETT #6#
                                      (SPADCALL |y| (QREFELT $ 20)) . #8#)
                                (LETT |ej| NIL . #8#)
                                (LETT #7# |colList| . #8#) G190
                                (COND
                                  ((OR (ATOM #7#)
                                    (PROGN
                                      (LETT |ej| (CAR #7#) . #8#)
                                      NIL)
                                    (> |j| #6#))
                                   #9#))
                                (SEQ (EXIT
                                      (SPADCALL |y| |i| |j|
                                       (SPADCALL |x| |ei| |ej|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                (LETT #7#
                                      (PROG1 (CDR #7#)
                                        (LETT |j| (+ |j| 1) . #8#)) . #8#)
                                #10# G191 (EXIT NIL))))
                (LETT #5#
                      (PROG1 (CDR #5#) (LETT |i| (+ |i| 1) . #8#)) . #8#)
                #10# G191 (EXIT NIL))
           (EXIT |y|))))) 

(DEFUN |MATCAT-;setelt;S2L2S;20| (|x| |rowList| |colList| |y| $)
  (PROG (#0=#:G2039 #1=#:G2029 #2=#:G2040 #3=#:G2032 |i| #4=#:G2042
            |ei| #5=#:G2041 |j| #6=#:G2044 |ej| #7=#:G2043)
    (RETURN
      (SEQ (SEQ (EXIT (SEQ (LETT |ei| NIL
                                 . #8=(|MATCAT-;setelt;S2L2S;20|))
                           (LETT #0# |rowList| . #8#) G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |ei| (CAR #0#) . #8#)
                                    NIL))
                              #9=(GO G191)))
                           (SEQ (EXIT (COND
                                        ((OR
                                          (< |ei|
                                           (SPADCALL |x|
                                            (QREFELT $ 17)))
                                          (<
                                           (SPADCALL |x|
                                            (QREFELT $ 18))
                                           |ei|))
                                         (PROGN
                                           (LETT #1#
                                            (|error|
                                             "setelt: index out of range") . #8#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #8#) #10=(GO G190)
                           G191 (EXIT NIL)))
                #1# (EXIT #1#))
           (SEQ (EXIT (SEQ (LETT |ej| NIL . #8#)
                           (LETT #2# |colList| . #8#) G190
                           (COND
                             ((OR (ATOM #2#)
                                  (PROGN
                                    (LETT |ej| (CAR #2#) . #8#)
                                    NIL))
                              #9#))
                           (SEQ (EXIT (COND
                                        ((OR
                                          (< |ej|
                                           (SPADCALL |x|
                                            (QREFELT $ 19)))
                                          (<
                                           (SPADCALL |x|
                                            (QREFELT $ 20))
                                           |ej|))
                                         (PROGN
                                           (LETT #3#
                                            (|error|
                                             "setelt: index out of range") . #8#)
                                           (GO #3#))))))
                           (LETT #2# (CDR #2#) . #8#) #10# G191
                           (EXIT NIL)))
                #3# (EXIT #3#))
           (COND
             ((EQL (LENGTH |rowList|) (SPADCALL |y| (QREFELT $ 11)))
              (COND
                ((NULL (EQL (LENGTH |colList|)
                            (SPADCALL |y| (QREFELT $ 12))))
                 (EXIT (|error| "setelt: matrix has bad dimensions")))))
             ('T (EXIT (|error| "setelt: matrix has bad dimensions"))))
           (SEQ (LETT |i| (SPADCALL |y| (QREFELT $ 17)) . #8#)
                (LETT #4# (SPADCALL |y| (QREFELT $ 18)) . #8#)
                (LETT |ei| NIL . #8#) (LETT #5# |rowList| . #8#) G190
                (COND
                  ((OR (ATOM #5#)
                       (PROGN (LETT |ei| (CAR #5#) . #8#) NIL)
                       (> |i| #4#))
                   #9#))
                (SEQ (EXIT (SEQ (LETT |j|
                                      (SPADCALL |y| (QREFELT $ 19)) . #8#)
                                (LETT #6#
                                      (SPADCALL |y| (QREFELT $ 20)) . #8#)
                                (LETT |ej| NIL . #8#)
                                (LETT #7# |colList| . #8#) G190
                                (COND
                                  ((OR (ATOM #7#)
                                    (PROGN
                                      (LETT |ej| (CAR #7#) . #8#)
                                      NIL)
                                    (> |j| #6#))
                                   #9#))
                                (SEQ (EXIT
                                      (SPADCALL |x| |ei| |ej|
                                       (SPADCALL |y| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                (LETT #7#
                                      (PROG1 (CDR #7#)
                                        (LETT |j| (+ |j| 1) . #8#)) . #8#)
                                #10# G191 (EXIT NIL))))
                (LETT #5#
                      (PROG1 (CDR #5#) (LETT |i| (+ |i| 1) . #8#)) . #8#)
                #10# G191 (EXIT NIL))
           (EXIT |y|))))) 

(DEFUN |MATCAT-;subMatrix;S4IS;21| (|x| |i1| |i2| |j1| |j2| $)
  (PROG (|rows| |cols| |y| |k| |i| #0=#:G2053 |l| |j| #1=#:G2054)
    (RETURN
      (SEQ (COND
             ((< |i2| |i1|) (|error| "subMatrix: bad row indices"))
             ((< |j2| |j1|) (|error| "subMatrix: bad column indices"))
             ('T
              (COND
                ((OR (< |i1| (SPADCALL |x| (QREFELT $ 17)))
                     (< (SPADCALL |x| (QREFELT $ 18)) |i2|))
                 (|error| "subMatrix: index out of range"))
                ((OR (< |j1| (SPADCALL |x| (QREFELT $ 19)))
                     (< (SPADCALL |x| (QREFELT $ 20)) |j2|))
                 (|error| "subMatrix: index out of range"))
                ('T
                 (SEQ (LETT |rows| (+ (- |i2| |i1|) 1)
                            . #2=(|MATCAT-;subMatrix;S4IS;21|))
                      (LETT |cols| (+ (- |j2| |j1|) 1) . #2#)
                      (LETT |y|
                            (SPADCALL |rows| |cols|
                                (|spadConstant| $ 29) (QREFELT $ 30)) . #2#)
                      (SEQ (LETT |k| |i1| . #2#)
                           (LETT |i|
                                 (SPADCALL |y| (QREFELT $ 17)) . #2#)
                           (LETT #0#
                                 (SPADCALL |y| (QREFELT $ 18)) . #2#)
                           G190
                           (COND
                             ((OR (> |i| #0#) (> |k| |i2|))
                              #3=(GO G191)))
                           (SEQ (EXIT (SEQ (LETT |l| |j1| . #2#)
                                       (LETT |j|
                                        (SPADCALL |y| (QREFELT $ 19)) . #2#)
                                       (LETT #1#
                                        (SPADCALL |y| (QREFELT $ 20)) . #2#)
                                       G190
                                       (COND
                                         ((OR (> |j| #1#) (> |l| |j2|))
                                          #3#))
                                       (SEQ
                                        (EXIT
                                         (SPADCALL |y| |i| |j|
                                          (SPADCALL |x| |k| |l|
                                           (QREFELT $ 21))
                                          (QREFELT $ 32))))
                                       (LETT |j|
                                        (PROG1 (+ |j| 1)
                                          (LETT |l| (+ |l| 1) . #2#)) . #2#)
                                       #4=(GO G190) G191 (EXIT NIL))))
                           (LETT |i|
                                 (PROG1 (+ |i| 1)
                                   (LETT |k| (+ |k| 1) . #2#)) . #2#)
                           #4# G191 (EXIT NIL))
                      (EXIT |y|)))))))))) 

(DEFUN |MATCAT-;setsubMatrix!;S2I2S;22| (|x| |i1| |j1| |y| $)
  (PROG (|i2| |j2| |k| |i| #0=#:G2063 |l| |j| #1=#:G2064)
    (RETURN
      (SEQ (LETT |i2| (- (+ |i1| (SPADCALL |y| (QREFELT $ 11))) 1)
                 . #2=(|MATCAT-;setsubMatrix!;S2I2S;22|))
           (LETT |j2|
                 (- (+ |j1| (SPADCALL |y| (QREFELT $ 12))) 1) . #2#)
           (COND
             ((OR (< |i1| (SPADCALL |x| (QREFELT $ 17)))
                  (< (SPADCALL |x| (QREFELT $ 18)) |i2|))
              (EXIT (|error| "setsubMatrix!: inserted matrix too big, use subMatrix to restrict it"))))
           (COND
             ((OR (< |j1| (SPADCALL |x| (QREFELT $ 19)))
                  (< (SPADCALL |x| (QREFELT $ 20)) |j2|))
              (EXIT (|error| "setsubMatrix!: inserted matrix too big, use subMatrix to restrict it"))))
           (SEQ (LETT |k| |i1| . #2#)
                (LETT |i| (SPADCALL |y| (QREFELT $ 17)) . #2#)
                (LETT #0# (SPADCALL |y| (QREFELT $ 18)) . #2#) G190
                (COND ((OR (> |i| #0#) (> |k| |i2|)) #3=(GO G191)))
                (SEQ (EXIT (SEQ (LETT |l| |j1| . #2#)
                                (LETT |j|
                                      (SPADCALL |y| (QREFELT $ 19)) . #2#)
                                (LETT #1#
                                      (SPADCALL |y| (QREFELT $ 20)) . #2#)
                                G190
                                (COND
                                  ((OR (> |j| #1#) (> |l| |j2|)) #3#))
                                (SEQ (EXIT
                                      (SPADCALL |x| |k| |l|
                                       (SPADCALL |y| |i| |j|
                                        (QREFELT $ 21))
                                       (QREFELT $ 32))))
                                (LETT |j|
                                      (PROG1 (+ |j| 1)
                                        (LETT |l| (+ |l| 1) . #2#)) . #2#)
                                #4=(GO G190) G191 (EXIT NIL))))
                (LETT |i|
                      (PROG1 (+ |i| 1) (LETT |k| (+ |k| 1) . #2#)) . #2#)
                #4# G191 (EXIT NIL))
           (EXIT |x|))))) 

(DEFUN |MATCAT-;+;3S;23| (|x| |y| $)
  (PROG (|r| |c| |ans| |i| #0=#:G2071 |j| #1=#:G2072)
    (RETURN
      (SEQ (COND
             ((EQL (LETT |r| (SPADCALL |x| (QREFELT $ 11))
                         . #2=(|MATCAT-;+;3S;23|))
                   (SPADCALL |y| (QREFELT $ 11)))
              (COND
                ((NULL (EQL (LETT |c|
                                  (SPADCALL |x| (QREFELT $ 12)) . #2#)
                            (SPADCALL |y| (QREFELT $ 12))))
                 (EXIT (|error| "can't add matrices of different dimensions")))))
             ('T
              (EXIT (|error| "can't add matrices of different dimensions"))))
           (LETT |ans|
                 (SPADCALL |r| |c| (|spadConstant| $ 29)
                     (QREFELT $ 30)) . #2#)
           (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #2#)
                (LETT #0# (SPADCALL |x| (QREFELT $ 18)) . #2#) G190
                (COND ((> |i| #0#) #3=(GO G191)))
                (SEQ (EXIT (SEQ (LETT |j|
                                      (SPADCALL |x| (QREFELT $ 19)) . #2#)
                                (LETT #1#
                                      (SPADCALL |x| (QREFELT $ 20)) . #2#)
                                G190 (COND ((> |j| #1#) #3#))
                                (SEQ (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL
                                        (SPADCALL |x| |i| |j|
                                         (QREFELT $ 21))
                                        (SPADCALL |y| |i| |j|
                                         (QREFELT $ 21))
                                        (QREFELT $ 63))
                                       (QREFELT $ 32))))
                                (LETT |j| (+ |j| 1) . #2#) #4=(GO G190)
                                G191 (EXIT NIL))))
                (LETT |i| (+ |i| 1) . #2#) #4# G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;-;3S;24| (|x| |y| $)
  (PROG (|r| |c| |ans| |i| #0=#:G2079 |j| #1=#:G2080)
    (RETURN
      (SEQ (COND
             ((EQL (LETT |r| (SPADCALL |x| (QREFELT $ 11))
                         . #2=(|MATCAT-;-;3S;24|))
                   (SPADCALL |y| (QREFELT $ 11)))
              (COND
                ((NULL (EQL (LETT |c|
                                  (SPADCALL |x| (QREFELT $ 12)) . #2#)
                            (SPADCALL |y| (QREFELT $ 12))))
                 (EXIT (|error| "can't subtract matrices of different dimensions")))))
             ('T
              (EXIT (|error| "can't subtract matrices of different dimensions"))))
           (LETT |ans|
                 (SPADCALL |r| |c| (|spadConstant| $ 29)
                     (QREFELT $ 30)) . #2#)
           (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #2#)
                (LETT #0# (SPADCALL |x| (QREFELT $ 18)) . #2#) G190
                (COND ((> |i| #0#) #3=(GO G191)))
                (SEQ (EXIT (SEQ (LETT |j|
                                      (SPADCALL |x| (QREFELT $ 19)) . #2#)
                                (LETT #1#
                                      (SPADCALL |x| (QREFELT $ 20)) . #2#)
                                G190 (COND ((> |j| #1#) #3#))
                                (SEQ (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL
                                        (SPADCALL |x| |i| |j|
                                         (QREFELT $ 21))
                                        (SPADCALL |y| |i| |j|
                                         (QREFELT $ 21))
                                        (QREFELT $ 65))
                                       (QREFELT $ 32))))
                                (LETT |j| (+ |j| 1) . #2#) #4=(GO G190)
                                G191 (EXIT NIL))))
                (LETT |i| (+ |i| 1) . #2#) #4# G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |MATCAT-;-;2S;25| (|x| $)
  (SPADCALL (CONS #'|MATCAT-;-;2S;25!0| $) |x| (QREFELT $ 68))) 

(DEFUN |MATCAT-;-;2S;25!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 27))) 

(DEFUN |MATCAT-;*;R2S;26| (|a| |x| $)
  (SPADCALL (CONS #'|MATCAT-;*;R2S;26!0| (VECTOR $ |a|)) |x|
      (QREFELT $ 68))) 

(DEFUN |MATCAT-;*;R2S;26!0| (|#1| $$)
  (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 70))) 

(DEFUN |MATCAT-;*;SRS;27| (|x| |a| $)
  (SPADCALL (CONS #'|MATCAT-;*;SRS;27!0| (VECTOR $ |a|)) |x|
      (QREFELT $ 68))) 

(DEFUN |MATCAT-;*;SRS;27!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 70))) 

(DEFUN |MATCAT-;*;I2S;28| (|m| |x| $)
  (SPADCALL (CONS #'|MATCAT-;*;I2S;28!0| (VECTOR $ |m|)) |x|
      (QREFELT $ 68))) 

(DEFUN |MATCAT-;*;I2S;28!0| (|#1| $$)
  (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 73))) 

(DEFUN |MATCAT-;*;3S;29| (|x| |y| $)
  (PROG (|ans| |i| #0=#:G2094 |j| #1=#:G2095 |l| #2=#:G2097 |k|
               #3=#:G2096 |sum| |entry|)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (SPADCALL |x| (QREFELT $ 12))
                         (SPADCALL |y| (QREFELT $ 11))))
              (|error| "can't multiply matrices of incompatible dimensions"))
             ('T
              (SEQ (LETT |ans|
                         (SPADCALL (SPADCALL |x| (QREFELT $ 11))
                             (SPADCALL |y| (QREFELT $ 12))
                             (|spadConstant| $ 29) (QREFELT $ 30))
                         . #4=(|MATCAT-;*;3S;29|))
                   (SEQ (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #4#)
                        (LETT #0# (SPADCALL |x| (QREFELT $ 18)) . #4#)
                        G190 (COND ((> |i| #0#) #5=(GO G191)))
                        (SEQ (EXIT (SEQ
                                    (LETT |j|
                                     (SPADCALL |y| (QREFELT $ 19)) . #4#)
                                    (LETT #1#
                                     (SPADCALL |y| (QREFELT $ 20)) . #4#)
                                    G190 (COND ((> |j| #1#) #5#))
                                    (SEQ
                                     (LETT |entry|
                                      (SEQ
                                       (LETT |sum|
                                        (|spadConstant| $ 29) . #4#)
                                       (SEQ
                                        (LETT |l|
                                         (SPADCALL |x| (QREFELT $ 19)) . #4#)
                                        (LETT #2#
                                         (SPADCALL |x| (QREFELT $ 20)) . #4#)
                                        (LETT |k|
                                         (SPADCALL |y| (QREFELT $ 17)) . #4#)
                                        (LETT #3#
                                         (SPADCALL |y| (QREFELT $ 18)) . #4#)
                                        G190
                                        (COND
                                          ((OR (> |k| #3#) (> |l| #2#))
                                           #5#))
                                        (SEQ
                                         (EXIT
                                          (LETT |sum|
                                           (SPADCALL |sum|
                                            (SPADCALL
                                             (SPADCALL |x| |i| |l|
                                              (QREFELT $ 21))
                                             (SPADCALL |y| |k| |j|
                                              (QREFELT $ 21))
                                             (QREFELT $ 70))
                                            (QREFELT $ 63)) . #4#)))
                                        (LETT |k|
                                         (PROG1 (+ |k| 1)
                                           (LETT |l| (+ |l| 1) . #4#)) . #4#)
                                        #6=(GO G190) G191 (EXIT NIL))
                                       (EXIT |sum|)) . #4#)
                                     (EXIT
                                      (SPADCALL |ans| |i| |j| |entry|
                                       (QREFELT $ 32))))
                                    (LETT |j| (+ |j| 1) . #4#) #6# G191
                                    (EXIT NIL))))
                        (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
                   (EXIT |ans|)))))))) 

(DEFUN |MATCAT-;positivePower| (|x| |n| $)
  (PROG (|y|)
    (RETURN
      (SEQ (COND
             ((EQL |n| 1) |x|)
             ((ODDP |n|)
              (SPADCALL |x| (|MATCAT-;positivePower| |x| (- |n| 1) $)
                  (QREFELT $ 76)))
             ('T
              (SEQ (LETT |y|
                         (|MATCAT-;positivePower| |x| (QUOTIENT2 |n| 2)
                             $)
                         |MATCAT-;positivePower|)
                   (EXIT (SPADCALL |y| |y| (QREFELT $ 76)))))))))) 

(DEFUN |MATCAT-;**;SNniS;31| (|x| |n| $)
  (PROG (|nn|)
    (RETURN
      (COND
        ((NULL (EQL (LETT |nn| (SPADCALL |x| (QREFELT $ 11))
                          |MATCAT-;**;SNniS;31|)
                    (SPADCALL |x| (QREFELT $ 12))))
         (|error| "**: matrix must be square"))
        ('T
         (COND
           ((ZEROP |n|)
            (SPADCALL |nn| (|spadConstant| $ 24) (QREFELT $ 77)))
           ('T (|MATCAT-;positivePower| |x| |n| $)))))))) 

(DEFUN |MATCAT-;*;S2Col;32| (|x| |v| $)
  (PROG (|w| |k| #0=#:G2111 |i| #1=#:G2110 |l| #2=#:G2113 |j|
             #3=#:G2112 |sum|)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (SPADCALL |x| (QREFELT $ 12))
                         (SPADCALL |v| (QREFELT $ 41))))
              (|error| "can't multiply matrix A and vector v if #cols A ^= #v"))
             ('T
              (SEQ (LETT |w|
                         (SPADCALL (SPADCALL |x| (QREFELT $ 11))
                             (|spadConstant| $ 29) (QREFELT $ 79))
                         . #4=(|MATCAT-;*;S2Col;32|))
                   (SEQ (LETT |k| (SPADCALL |w| (QREFELT $ 42)) . #4#)
                        (LETT #0# (SPADCALL |w| (QREFELT $ 43)) . #4#)
                        (LETT |i| (SPADCALL |x| (QREFELT $ 17)) . #4#)
                        (LETT #1# (SPADCALL |x| (QREFELT $ 18)) . #4#)
                        G190
                        (COND
                          ((OR (> |i| #1#) (> |k| #0#)) #5=(GO G191)))
                        (SEQ (EXIT (SPADCALL |w| |k|
                                    (SEQ
                                     (LETT |sum|
                                      (|spadConstant| $ 29) . #4#)
                                     (SEQ
                                      (LETT |l|
                                       (SPADCALL |v| (QREFELT $ 42)) . #4#)
                                      (LETT #2#
                                       (SPADCALL |v| (QREFELT $ 43)) . #4#)
                                      (LETT |j|
                                       (SPADCALL |x| (QREFELT $ 19)) . #4#)
                                      (LETT #3#
                                       (SPADCALL |x| (QREFELT $ 20)) . #4#)
                                      G190
                                      (COND
                                        ((OR (> |j| #3#) (> |l| #2#))
                                         #5#))
                                      (SEQ
                                       (EXIT
                                        (LETT |sum|
                                         (SPADCALL |sum|
                                          (SPADCALL
                                           (SPADCALL |x| |i| |j|
                                            (QREFELT $ 21))
                                           (SPADCALL |v| |l|
                                            (QREFELT $ 80))
                                           (QREFELT $ 70))
                                          (QREFELT $ 63)) . #4#)))
                                      (LETT |j|
                                       (PROG1 (+ |j| 1)
                                         (LETT |l| (+ |l| 1) . #4#)) . #4#)
                                      #6=(GO G190) G191 (EXIT NIL))
                                     (EXIT |sum|))
                                    (QREFELT $ 81))))
                        (LETT |i|
                              (PROG1 (+ |i| 1)
                                (LETT |k| (+ |k| 1) . #4#)) . #4#)
                        #6# G191 (EXIT NIL))
                   (EXIT |w|)))))))) 

(DEFUN |MATCAT-;*;RowSRow;33| (|v| |x| $)
  (PROG (|w| |k| #0=#:G2121 |j| #1=#:G2120 |l| #2=#:G2123 |i|
             #3=#:G2122 |sum|)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (SPADCALL |x| (QREFELT $ 11))
                         (SPADCALL |v| (QREFELT $ 46))))
              (|error| "can't multiply vector v and matrix A if #rows A ^= #v"))
             ('T
              (SEQ (LETT |w|
                         (SPADCALL (SPADCALL |x| (QREFELT $ 12))
                             (|spadConstant| $ 29) (QREFELT $ 83))
                         . #4=(|MATCAT-;*;RowSRow;33|))
                   (SEQ (LETT |k| (SPADCALL |w| (QREFELT $ 47)) . #4#)
                        (LETT #0# (SPADCALL |w| (QREFELT $ 48)) . #4#)
                        (LETT |j| (SPADCALL |x| (QREFELT $ 19)) . #4#)
                        (LETT #1# (SPADCALL |x| (QREFELT $ 20)) . #4#)
                        G190
                        (COND
                          ((OR (> |j| #1#) (> |k| #0#)) #5=(GO G191)))
                        (SEQ (EXIT (SPADCALL |w| |k|
                                    (SEQ
                                     (LETT |sum|
                                      (|spadConstant| $ 29) . #4#)
                                     (SEQ
                                      (LETT |l|
                                       (SPADCALL |v| (QREFELT $ 47)) . #4#)
                                      (LETT #2#
                                       (SPADCALL |v| (QREFELT $ 48)) . #4#)
                                      (LETT |i|
                                       (SPADCALL |x| (QREFELT $ 17)) . #4#)
                                      (LETT #3#
                                       (SPADCALL |x| (QREFELT $ 18)) . #4#)
                                      G190
                                      (COND
                                        ((OR (> |i| #3#) (> |l| #2#))
                                         #5#))
                                      (SEQ
                                       (EXIT
                                        (LETT |sum|
                                         (SPADCALL |sum|
                                          (SPADCALL
                                           (SPADCALL |x| |i| |j|
                                            (QREFELT $ 21))
                                           (SPADCALL |v| |l|
                                            (QREFELT $ 84))
                                           (QREFELT $ 70))
                                          (QREFELT $ 63)) . #4#)))
                                      (LETT |i|
                                       (PROG1 (+ |i| 1)
                                         (LETT |l| (+ |l| 1) . #4#)) . #4#)
                                      #6=(GO G190) G191 (EXIT NIL))
                                     (EXIT |sum|))
                                    (QREFELT $ 85))))
                        (LETT |j|
                              (PROG1 (+ |j| 1)
                                (LETT |k| (+ |k| 1) . #4#)) . #4#)
                        #6# G191 (EXIT NIL))
                   (EXIT |w|)))))))) 

(DEFUN |MATCAT-;columnSpace;SL;34| (M $)
  (PROG (M2 |n| |m| |k| |basis| |indRow|)
    (RETURN
      (SEQ (LETT M2 (SPADCALL M (QREFELT $ 87))
                 . #0=(|MATCAT-;columnSpace;SL;34|))
           (LETT |basis| NIL . #0#)
           (LETT |n| (SPADCALL M (QREFELT $ 12)) . #0#)
           (LETT |m| (SPADCALL M (QREFELT $ 11)) . #0#)
           (LETT |indRow| 1 . #0#)
           (SEQ (LETT |k| 1 . #0#) G190
                (COND
                  ((OR (QSGREATERP |k| |n|)
                       (NULL (COND ((< |m| |indRow|) 'NIL) ('T 'T))))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((NULL (SPADCALL
                                     (SPADCALL M2 |indRow| |k|
                                      (QREFELT $ 88))
                                     (QREFELT $ 22)))
                              (SEQ (LETT |basis|
                                    (CONS
                                     (SPADCALL M |k| (QREFELT $ 89))
                                     |basis|) . #0#)
                                   (EXIT
                                    (LETT |indRow|
                                     (+ |indRow| 1) . #0#)))))))
                (LETT |k| (QSADD1 |k|) . #0#) (GO G190) G191
                (EXIT NIL))
           (EXIT (NREVERSE |basis|)))))) 

(DEFUN |MATCAT-;B0| (|n| $)
  (PROG (#0=#:G2138 |i| #1=#:G2139 |j|)
    (RETURN
      (SEQ (SPADCALL
               (PROGN
                 (LETT #0# NIL . #2=(|MATCAT-;B0|))
                 (SEQ (LETT |i| 1 . #2#) G190
                      (COND ((QSGREATERP |i| |n|) #3=(GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (PROGN
                                          (LETT #1# NIL . #2#)
                                          (SEQ (LETT |j| 1 . #2#) G190
                                           (COND
                                             ((QSGREATERP |j| |n|) #3#))
                                           (SEQ
                                            (EXIT
                                             (LETT #1#
                                              (CONS
                                               (COND
                                                 ((EQL |i| (+ |j| 1))
                                                  (COND
                                                    ((ODDP |j|)
                                                     (SPADCALL
                                                      (|spadConstant| $
                                                       24)
                                                      (QREFELT $ 27)))
                                                    ((EQL |i|
                                                      (- |j| 1))
                                                     (COND
                                                       ((ODDP |i|)
                                                        (|spadConstant|
                                                         $ 24))
                                                       ('T
                                                        (|spadConstant|
                                                         $ 29))))
                                                    ('T
                                                     (|spadConstant| $
                                                      29))))
                                                 ((EQL |i| (- |j| 1))
                                                  (COND
                                                    ((ODDP |i|)
                                                     (|spadConstant| $
                                                      24))
                                                    ('T
                                                     (|spadConstant| $
                                                      29))))
                                                 ('T
                                                  (|spadConstant| $ 29)))
                                               #1#) . #2#)))
                                           (LETT |j|
                                            (QSADD1 |j|) . #2#)
                                           #4=(GO G190) G191
                                           (EXIT (NREVERSE0 #1#))))
                                        #0#) . #2#)))
                      (LETT |i| (QSADD1 |i|) . #2#) #4# G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 92)))))) 

(DEFUN |MATCAT-;PfChar| (A $)
  (PROG (|n| M |r| |s| |p| |d| #0=#:G2140 B C |g| |j| #1=#:G2150 |i|
             |c| |k| #2=#:G2152 |e| #3=#:G2151 |res|)
    (RETURN
      (SEQ (LETT |n| (SPADCALL A (QREFELT $ 11))
                 . #4=(|MATCAT-;PfChar|))
           (EXIT (COND
                   ((EQL |n| 2)
                    (SPADCALL
                        (SPADCALL (|spadConstant| $ 24) 2
                            (QREFELT $ 94))
                        (SPADCALL (SPADCALL A 1 2 (QREFELT $ 21))
                            (QREFELT $ 96))
                        (QREFELT $ 97)))
                   ('T
                    (SEQ (LETT M
                               (SPADCALL A 3 |n| 3 |n| (QREFELT $ 98)) . #4#)
                         (LETT |r|
                               (SPADCALL A 1 1 3 |n| (QREFELT $ 98)) . #4#)
                         (LETT |s|
                               (SPADCALL A 3 |n| 2 2 (QREFELT $ 98)) . #4#)
                         (LETT |p| (|MATCAT-;PfChar| M $) . #4#)
                         (LETT |d| (SPADCALL |p| (QREFELT $ 99)) . #4#)
                         (LETT B
                               (|MATCAT-;B0|
                                   (PROG1 (LETT #0# (- |n| 2) . #4#)
                                     (|check-subtype| (> #0# 0)
                                      '(|PositiveInteger|) #0#))
                                   $) . #4#)
                         (LETT C (SPADCALL |r| B (QREFELT $ 76)) . #4#)
                         (LETT |g|
                               (LIST (SPADCALL
                                      (SPADCALL C |s| (QREFELT $ 76)) 1
                                      1 (QREFELT $ 21))
                                     (SPADCALL A 1 2 (QREFELT $ 21))
                                     (|spadConstant| $ 24)) . #4#)
                         (COND
                           ((NULL (< |d| 4))
                            (SEQ (LETT B
                                       (SPADCALL M B (QREFELT $ 76)) . #4#)
                                 (EXIT (SEQ (LETT |i| 4 . #4#) G190
                                        (COND
                                          ((> |i| |d|) #5=(GO G191)))
                                        (SEQ
                                         (LETT C
                                          (SPADCALL C B (QREFELT $ 76)) . #4#)
                                         (EXIT
                                          (LETT |g|
                                           (CONS
                                            (SPADCALL
                                             (SPADCALL C |s|
                                              (QREFELT $ 76))
                                             1 1 (QREFELT $ 21))
                                            |g|) . #4#)))
                                        (LETT |i| (+ |i| 2) . #4#)
                                        #6=(GO G190) G191 (EXIT NIL))))))
                         (LETT |g| (NREVERSE |g|) . #4#)
                         (LETT |res| (|spadConstant| $ 100) . #4#)
                         (SEQ (LETT |j| 2 . #4#)
                              (LETT #1# (+ |d| 2) . #4#)
                              (LETT |i| 0 . #4#) G190
                              (COND
                                ((OR (> |i| |d|) (QSGREATERP |j| #1#))
                                 #5#))
                              (SEQ (LETT |c|
                                    (SPADCALL |p| |i| (QREFELT $ 101)) . #4#)
                                   (EXIT
                                    (SEQ (LETT |k| 2 . #4#)
                                     (LETT #2# (- |d|) . #4#)
                                     (LETT |e| NIL . #4#)
                                     (LETT #3#
                                      (SPADCALL |g| |j|
                                       (QREFELT $ 102)) . #4#)
                                     G190
                                     (COND
                                       ((OR (ATOM #3#)
                                         (PROGN
                                           (LETT |e| (CAR #3#) . #4#)
                                           NIL)
                                         (< |k| #2#))
                                        #5#))
                                     (SEQ
                                      (EXIT
                                       (LETT |res|
                                        (SPADCALL |res|
                                         (SPADCALL
                                          (SPADCALL |c| |e|
                                           (QREFELT $ 70))
                                          (+ |k| |i|) (QREFELT $ 94))
                                         (QREFELT $ 97)) . #4#)))
                                     (LETT #3#
                                      (PROG1 (CDR #3#)
                                        (LETT |k| (+ |k| -2) . #4#)) . #4#)
                                     #6# G191 (EXIT NIL))))
                              (LETT |i|
                                    (PROG1 (+ |i| 2)
                                      (LETT |j| (QSADD1 |j|) . #4#)) . #4#)
                              #6# G191 (EXIT NIL))
                         (EXIT |res|))))))))) 

(DEFUN |MATCAT-;Pfaffian;SR;37| (A $)
  (COND
    ((SPADCALL A (QREFELT $ 103))
     (COND
       ((ODDP (SPADCALL A (QREFELT $ 11))) (|spadConstant| $ 29))
       ('T
        (SPADCALL (|MATCAT-;PfChar| A $) (|spadConstant| $ 29)
            (QREFELT $ 104)))))
    ('T
     (|error| "Pfaffian: only defined for antisymmetric square matrices!")))) 

(DEFUN |MATCAT-;exquo;SRU;38| (|x| |a| $)
  (PROG (|ans| |i| #0=#:G2171 |j| #1=#:G2172 |r| #2=#:G2170 |entry|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |ans|
                            (SPADCALL (SPADCALL |x| (QREFELT $ 11))
                                (SPADCALL |x| (QREFELT $ 12))
                                (|spadConstant| $ 29) (QREFELT $ 30))
                            . #3=(|MATCAT-;exquo;SRU;38|))
                      (SEQ (LETT |i|
                                 (SPADCALL |x| (QREFELT $ 17)) . #3#)
                           (LETT #0#
                                 (SPADCALL |x| (QREFELT $ 18)) . #3#)
                           G190 (COND ((> |i| #0#) #4=(GO G191)))
                           (SEQ (EXIT (SEQ
                                       (LETT |j|
                                        (SPADCALL |x| (QREFELT $ 19)) . #3#)
                                       (LETT #1#
                                        (SPADCALL |x| (QREFELT $ 20)) . #3#)
                                       G190 (COND ((> |j| #1#) #4#))
                                       (SEQ
                                        (LETT |entry|
                                         (SEQ
                                          (LETT |r|
                                           (SPADCALL
                                            (SPADCALL |x| |i| |j|
                                             (QREFELT $ 21))
                                            |a| (QREFELT $ 107)) . #3#)
                                          (EXIT
                                           (COND
                                             ((QEQCAR |r| 1)
                                              (PROGN
                                                (LETT #2#
                                                 (CONS 1 "failed") . #3#)
                                                (GO #2#)))
                                             ('T (QCDR |r|))))) . #3#)
                                        (EXIT
                                         (SPADCALL |ans| |i| |j|
                                          |entry| (QREFELT $ 32))))
                                       (LETT |j| (+ |j| 1) . #3#)
                                       #5=(GO G190) G191 (EXIT NIL))))
                           (LETT |i| (+ |i| 1) . #3#) #5# G191
                           (EXIT NIL))
                      (EXIT (CONS 0 |ans|))))
           #2# (EXIT #2#))))) 

(DEFUN |MATCAT-;/;SRS;39| (|x| |r| $)
  (SPADCALL (CONS #'|MATCAT-;/;SRS;39!0| (VECTOR $ |r|)) |x|
      (QREFELT $ 68))) 

(DEFUN |MATCAT-;/;SRS;39!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 109))) 

(DEFUN |MATCAT-;**;SIS;40| (|x| |n| $)
  (PROG (|nn| |xInv|)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (LETT |nn| (SPADCALL |x| (QREFELT $ 11))
                               . #0=(|MATCAT-;**;SIS;40|))
                         (SPADCALL |x| (QREFELT $ 12))))
              (|error| "**: matrix must be square"))
             ('T
              (COND
                ((ZEROP |n|)
                 (SPADCALL |nn| (|spadConstant| $ 24) (QREFELT $ 77)))
                ((SPADCALL |n| (QREFELT $ 111))
                 (|MATCAT-;positivePower| |x| |n| $))
                ('T
                 (SEQ (LETT |xInv|
                            (SPADCALL |x| (QREFELT $ 112)) . #0#)
                      (EXIT (COND
                              ((QEQCAR |xInv| 1)
                               (|error| "**: matrix must be invertible"))
                              ('T
                               (|MATCAT-;positivePower| (QCDR |xInv|)
                                   (- |n|) $))))))))))))) 

(DEFUN |MatrixCategory&| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|MatrixCategory&|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|MatrixCategory&| DV$1 DV$2 DV$3 DV$4) . #0#)
        (LETT $ (GETREFV 115) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#2| '(|CommutativeRing|))
                            (|HasCategory| |#2| '(|EuclideanDomain|))
                            (|HasCategory| |#2| '(|Field|))
                            (|HasCategory| |#2| '(|IntegralDomain|)))) . #0#))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (QSETREFV $ 9 |#4|)
        (COND
          ((|HasCategory| |#4| '(|shallowlyMutable|))
           (QSETREFV $ 82
               (CONS (|dispatchFunction| |MATCAT-;*;S2Col;32|) $))))
        (COND
          ((|HasCategory| |#3| '(|shallowlyMutable|))
           (QSETREFV $ 86
               (CONS (|dispatchFunction| |MATCAT-;*;RowSRow;33|) $))))
        (COND
          ((|testBitVector| |pv$| 2)
           (QSETREFV $ 91
               (CONS (|dispatchFunction| |MATCAT-;columnSpace;SL;34|)
                     $))))
        (COND
          ((|testBitVector| |pv$| 1)
           (PROGN
             (QSETREFV $ 105
                 (CONS (|dispatchFunction| |MATCAT-;Pfaffian;SR;37|) $)))))
        (COND
          ((|testBitVector| |pv$| 4)
           (QSETREFV $ 108
               (CONS (|dispatchFunction| |MATCAT-;exquo;SRU;38|) $))))
        (COND
          ((|testBitVector| |pv$| 3)
           (PROGN
             (QSETREFV $ 110
                 (CONS (|dispatchFunction| |MATCAT-;/;SRS;39|) $))
             (QSETREFV $ 113
                 (CONS (|dispatchFunction| |MATCAT-;**;SIS;40|) $)))))
        $)))) 

(MAKEPROP '|MatrixCategory&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|NonNegativeInteger|)
             (0 . |nrows|) (5 . |ncols|) (|Boolean|)
             |MATCAT-;square?;SB;1| (10 . |square?|) (|Integer|)
             (15 . |minRowIndex|) (20 . |maxRowIndex|)
             (25 . |minColIndex|) (30 . |maxColIndex|) (35 . |qelt|)
             (42 . |zero?|) |MATCAT-;diagonal?;SB;2| (47 . |One|)
             (51 . =) |MATCAT-;symmetric?;SB;3| (57 . -)
             |MATCAT-;antisymmetric?;SB;4| (62 . |Zero|) (66 . |new|)
             |MATCAT-;zero;2NniS;5| (73 . |qsetelt!|) (|List| 37)
             |MATCAT-;matrix;LS;6| (81 . |zero|)
             |MATCAT-;scalarMatrix;NniRS;7| (|List| 7)
             |MATCAT-;diagonalMatrix;LS;8| (|List| $)
             |MATCAT-;diagonalMatrix;LS;9| (87 . |#|) (92 . |minIndex|)
             (97 . |maxIndex|) (102 . |qelt|) |MATCAT-;coerce;ColS;10|
             (108 . |#|) (113 . |minIndex|) (118 . |maxIndex|)
             (123 . |qelt|) |MATCAT-;transpose;RowS;11|
             |MATCAT-;transpose;2S;12| |MATCAT-;squareTop;2S;13|
             |MATCAT-;horizConcat;3S;14| |MATCAT-;vertConcat;3S;15|
             |MATCAT-;listOfLists;SL;16| |MATCAT-;swapRows!;S2IS;17|
             |MATCAT-;swapColumns!;S2IS;18| (|List| 16)
             |MATCAT-;elt;S2LS;19| |MATCAT-;setelt;S2L2S;20|
             |MATCAT-;subMatrix;S4IS;21|
             |MATCAT-;setsubMatrix!;S2I2S;22| (129 . +)
             |MATCAT-;+;3S;23| (135 . -) |MATCAT-;-;3S;24|
             (|Mapping| 7 7) (141 . |map|) |MATCAT-;-;2S;25| (147 . *)
             |MATCAT-;*;R2S;26| |MATCAT-;*;SRS;27| (153 . *)
             |MATCAT-;*;I2S;28| |MATCAT-;*;3S;29| (159 . *)
             (165 . |scalarMatrix|) |MATCAT-;**;SNniS;31| (171 . |new|)
             (177 . |elt|) (183 . |setelt|) (190 . *) (196 . |new|)
             (202 . |elt|) (208 . |setelt|) (215 . *)
             (221 . |rowEchelon|) (226 . |elt|) (233 . |column|)
             (|List| 9) (239 . |columnSpace|) (244 . |matrix|)
             (|SparseUnivariatePolynomial| 7) (249 . |monomial|)
             (255 . |One|) (259 . |coerce|) (264 . +)
             (270 . |subMatrix|) (279 . |degree|) (284 . |Zero|)
             (288 . |coefficient|) (294 . |first|)
             (300 . |antisymmetric?|) (305 . |elt|) (311 . |Pfaffian|)
             (|Union| $ '"failed") (316 . |exquo|) (322 . |exquo|)
             (328 . /) (334 . /) (340 . |positive?|) (345 . |inverse|)
             (350 . **) (|OutputForm|))
          '#(|zero| 356 |vertConcat| 362 |transpose| 368 |symmetric?|
             378 |swapRows!| 383 |swapColumns!| 390 |subMatrix| 397
             |squareTop| 406 |square?| 411 |setsubMatrix!| 416 |setelt|
             424 |scalarMatrix| 432 |matrix| 438 |listOfLists| 443
             |horizConcat| 448 |exquo| 454 |elt| 460 |diagonalMatrix|
             467 |diagonal?| 477 |columnSpace| 482 |coerce| 487
             |antisymmetric?| 492 |Pfaffian| 497 / 502 - 508 + 519 **
             525 * 537)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 113
                                '(1 6 10 0 11 1 6 10 0 12 1 6 13 0 15 1
                                  6 16 0 17 1 6 16 0 18 1 6 16 0 19 1 6
                                  16 0 20 3 6 7 0 16 16 21 1 7 13 0 22
                                  0 7 0 24 2 7 13 0 0 25 1 7 0 0 27 0 7
                                  0 29 3 6 0 10 10 7 30 4 6 7 0 16 16 7
                                  32 2 6 0 10 10 35 1 9 10 0 41 1 9 16
                                  0 42 1 9 16 0 43 2 9 7 0 16 44 1 8 10
                                  0 46 1 8 16 0 47 1 8 16 0 48 2 8 7 0
                                  16 49 2 7 0 0 0 63 2 7 0 0 0 65 2 6 0
                                  67 0 68 2 7 0 0 0 70 2 7 0 16 0 73 2
                                  6 0 0 0 76 2 6 0 10 7 77 2 9 0 10 7
                                  79 2 9 7 0 16 80 3 9 7 0 16 7 81 2 0
                                  9 0 9 82 2 8 0 10 7 83 2 8 7 0 16 84
                                  3 8 7 0 16 7 85 2 0 8 8 0 86 1 6 0 0
                                  87 3 6 7 0 16 16 88 2 6 9 0 16 89 1 0
                                  90 0 91 1 6 0 33 92 2 93 0 7 10 94 0
                                  93 0 95 1 93 0 7 96 2 93 0 0 0 97 5 6
                                  0 0 16 16 16 16 98 1 93 10 0 99 0 93
                                  0 100 2 93 7 0 10 101 2 37 0 0 10 102
                                  1 6 13 0 103 2 93 7 0 7 104 1 0 7 0
                                  105 2 7 106 0 0 107 2 0 106 0 7 108 2
                                  7 0 0 0 109 2 0 0 0 7 110 1 16 13 0
                                  111 1 6 106 0 112 2 0 0 0 16 113 2 0
                                  0 10 10 31 2 0 0 0 0 54 1 0 0 8 50 1
                                  0 0 0 51 1 0 13 0 26 3 0 0 0 16 16 56
                                  3 0 0 0 16 16 57 5 0 0 0 16 16 16 16
                                  61 1 0 0 0 52 1 0 13 0 14 4 0 0 0 16
                                  16 0 62 4 0 0 0 58 58 0 60 2 0 0 10 7
                                  36 1 0 0 33 34 1 0 33 0 55 2 0 0 0 0
                                  53 2 0 106 0 7 108 3 0 0 0 58 58 59 1
                                  0 0 37 38 1 0 0 39 40 1 0 13 0 23 1 0
                                  90 0 91 1 0 0 9 45 1 0 13 0 28 1 0 7
                                  0 105 2 0 0 0 7 110 1 0 0 0 69 2 0 0
                                  0 0 66 2 0 0 0 0 64 2 0 0 0 16 113 2
                                  0 0 0 10 78 2 0 8 8 0 86 2 0 9 0 9 82
                                  2 0 0 0 7 72 2 0 0 16 0 74 2 0 0 0 0
                                  75 2 0 0 7 0 71)))))
          '|lookupComplete|)) 
