
(/VERSIONCHECK 2) 

(DEFPARAMETER |SquareMatrixCategory;CAT| 'NIL) 

(DEFPARAMETER |SquareMatrixCategory;AL| 'NIL) 

(DEFUN |SquareMatrixCategory| (&REST #0=#:G1825)
  (LET (#1=#:G1826)
    (COND
      ((SETQ #1#
             (|assoc| #2=(|devaluateList| #0#)
                      |SquareMatrixCategory;AL|))
       (CDR #1#))
      (T (SETQ |SquareMatrixCategory;AL|
               (|cons5| (CONS #2#
                              (SETQ #1#
                                    (APPLY #'|SquareMatrixCategory;|
                                     #0#)))
                        |SquareMatrixCategory;AL|))
         #1#)))) 

(DEFUN |SquareMatrixCategory;| (|t#1| |t#2| |t#3| |t#4|)
  (PROG (#0=#:G1824)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2| |t#3| |t#4|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)
                                   (|devaluate| |t#3|)
                                   (|devaluate| |t#4|)))
                       (COND
                         (|SquareMatrixCategory;CAT|)
                         ('T
                          (LETT |SquareMatrixCategory;CAT|
                                (|Join| (|DifferentialExtension|
                                         '|t#2|)
                                        (|BiModule| '|t#2| '|t#2|)
                                        (|RectangularMatrixCategory|
                                         |t#1| |t#1| '|t#2| '|t#3|
                                         '|t#4|)
                                        (|FullyRetractableTo| '|t#2|)
                                        (|FullyLinearlyExplicitRingOver|
                                         '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((|scalarMatrix| ($ |t#2|))
                                            T)
                                           ((|diagonalMatrix|
                                             ($ (|List| |t#2|)))
                                            T)
                                           ((|diagonal| (|t#3| $)) T)
                                           ((|trace| (|t#2| $)) T)
                                           ((|diagonalProduct|
                                             (|t#2| $))
                                            T)
                                           ((* (|t#4| $ |t#4|)) T)
                                           ((* (|t#3| |t#3| $)) T)
                                           ((|determinant| (|t#2| $))
                                            (|has| |t#2|
                                             (|CommutativeRing|)))
                                           ((|minordet| (|t#2| $))
                                            (|has| |t#2|
                                             (|CommutativeRing|)))
                                           ((|Pfaffian| (|t#2| $))
                                            (|has| |t#2|
                                             (|CommutativeRing|)))
                                           ((|inverse|
                                             ((|Union| $ "failed") $))
                                            (|has| |t#2| (|Field|)))
                                           ((** ($ $ (|Integer|)))
                                            (|has| |t#2| (|Field|))))
                                         '(((|Module| |t#2|)
                                            (|has| |t#2|
                                             (|CommutativeRing|)))
                                           ((|Algebra| |t#2|)
                                            (|has| |t#2|
                                             (|CommutativeRing|))))
                                         '((|Integer|) (|List| |t#2|))
                                         NIL))
                                . #1=(|SquareMatrixCategory|))))) . #1#)
        (SETELT #0# 0
                (LIST '|SquareMatrixCategory| (|devaluate| |t#1|)
                      (|devaluate| |t#2|) (|devaluate| |t#3|)
                      (|devaluate| |t#4|))))))) 
