
(/VERSIONCHECK 2) 

(DEFPARAMETER |MatrixCategory;CAT| 'NIL) 

(DEFPARAMETER |MatrixCategory;AL| 'NIL) 

(DEFUN |MatrixCategory| (&REST #1=#:G11715)
  (LET (#2=#:G11716)
    (COND
     ((SETQ #2# (|assoc| #3=(|devaluateList| #1#) |MatrixCategory;AL|))
      (CDR #2#))
     (T
      (SETQ |MatrixCategory;AL|
              (|cons5| (CONS #3# (SETQ #2# (APPLY #'|MatrixCategory;| #1#)))
                       |MatrixCategory;AL|))
      #2#)))) 

(DEFUN |MatrixCategory;| (|t#1| |t#2| |t#3|)
  (PROG (#1=#:G11714)
    (RETURN
     (PROG1
         (LETT #1#
               (|sublisV|
                (PAIR '(|t#1| |t#2| |t#3|)
                      (LIST (|devaluate| |t#1|) (|devaluate| |t#2|)
                            (|devaluate| |t#3|)))
                (COND (|MatrixCategory;CAT|)
                      ('T
                       (LETT |MatrixCategory;CAT|
                             (|Join|
                              (|TwoDimensionalArrayCategory| '|t#1| '|t#2|
                                                             '|t#3|)
                              (|shallowlyMutable|) (|finiteAggregate|)
                              (|mkCategory| '|domain|
                                            '(((|square?| ((|Boolean|) $)) T)
                                              ((|diagonal?| ((|Boolean|) $)) T)
                                              ((|symmetric?| ((|Boolean|) $))
                                               T)
                                              ((|antisymmetric?|
                                                ((|Boolean|) $))
                                               T)
                                              ((|zero|
                                                ($ (|NonNegativeInteger|)
                                                 (|NonNegativeInteger|)))
                                               T)
                                              ((|matrix|
                                                ($ (|List| (|List| |t#1|))))
                                               T)
                                              ((|scalarMatrix|
                                                ($ (|NonNegativeInteger|)
                                                 |t#1|))
                                               T)
                                              ((|diagonalMatrix|
                                                ($ (|List| |t#1|)))
                                               T)
                                              ((|diagonalMatrix|
                                                ($ (|List| $)))
                                               T)
                                              ((|coerce| ($ |t#3|)) T)
                                              ((|transpose| ($ |t#2|)) T)
                                              ((|transpose| ($ $)) T)
                                              ((|squareTop| ($ $)) T)
                                              ((|horizConcat| ($ $ $)) T)
                                              ((|vertConcat| ($ $ $)) T)
                                              ((|listOfLists|
                                                ((|List| (|List| |t#1|)) $))
                                               T)
                                              ((|elt|
                                                ($ $ (|List| (|Integer|))
                                                 (|List| (|Integer|))))
                                               T)
                                              ((|setelt|
                                                ($ $ (|List| (|Integer|))
                                                 (|List| (|Integer|)) $))
                                               T)
                                              ((|swapRows!|
                                                ($ $ (|Integer|) (|Integer|)))
                                               T)
                                              ((|swapColumns!|
                                                ($ $ (|Integer|) (|Integer|)))
                                               T)
                                              ((|subMatrix|
                                                ($ $ (|Integer|) (|Integer|)
                                                 (|Integer|) (|Integer|)))
                                               T)
                                              ((|setsubMatrix!|
                                                ($ $ (|Integer|) (|Integer|)
                                                 $))
                                               T)
                                              ((+ ($ $ $)) T) ((- ($ $ $)) T)
                                              ((- ($ $)) T) ((* ($ $ $)) T)
                                              ((* ($ |t#1| $)) T)
                                              ((* ($ $ |t#1|)) T)
                                              ((* ($ (|Integer|) $)) T)
                                              ((* (|t#3| $ |t#3|)) T)
                                              ((* (|t#2| |t#2| $)) T)
                                              ((^ ($ $ (|NonNegativeInteger|)))
                                               T)
                                              ((|exquo|
                                                ((|Union| $ "failed") $ |t#1|))
                                               (|has| |t#1|
                                                      (|IntegralDomain|)))
                                              ((/ ($ $ |t#1|))
                                               (|has| |t#1| (|Field|)))
                                              ((|rowEchelon| ($ $))
                                               (|has| |t#1|
                                                      (|EuclideanDomain|)))
                                              ((|columnSpace|
                                                ((|List| |t#3|) $))
                                               (|has| |t#1|
                                                      (|EuclideanDomain|)))
                                              ((|rank|
                                                ((|NonNegativeInteger|) $))
                                               (|has| |t#1|
                                                      (|IntegralDomain|)))
                                              ((|nullity|
                                                ((|NonNegativeInteger|) $))
                                               (|has| |t#1|
                                                      (|IntegralDomain|)))
                                              ((|nullSpace| ((|List| |t#3|) $))
                                               (|has| |t#1|
                                                      (|IntegralDomain|)))
                                              ((|determinant| (|t#1| $))
                                               (|has| |t#1|
                                                      (|CommutativeRing|)))
                                              ((|minordet| (|t#1| $))
                                               (|has| |t#1|
                                                      (|CommutativeRing|)))
                                              ((|Pfaffian| (|t#1| $))
                                               (|has| |t#1|
                                                      (|CommutativeRing|)))
                                              ((|inverse|
                                                ((|Union| $ "failed") $))
                                               (|has| |t#1| (|Field|)))
                                              ((^ ($ $ (|Integer|)))
                                               (|has| |t#1| (|Field|))))
                                            NIL
                                            '((|Integer|) (|List| |t#3|)
                                              (|NonNegativeInteger|)
                                              (|List| (|Integer|))
                                              (|List| (|List| |t#1|))
                                              (|List| $) (|List| |t#1|)
                                              (|Boolean|))
                                            NIL))
                             . #2=(|MatrixCategory|)))))
               . #2#)
       (SETELT #1# 0
               (LIST '|MatrixCategory| (|devaluate| |t#1|) (|devaluate| |t#2|)
                     (|devaluate| |t#3|))))))) 
