
(/VERSIONCHECK 2) 

(DEFUN |RMATRIX;Zero;$;1| ($) (QREFELT $ 12)) 

(DEFUN |RMATRIX;coerce;$Of;2| (|x| $) (SPADCALL |x| (QREFELT $ 15))) 

(DEFUN |RMATRIX;matrix;L$;3| (|l| $)
  (PROG (#1=#:G1820 |j| #2=#:G1821 |r| #3=#:G1818 |i| #4=#:G1819 |ll| |ans|
         #5=#:G1811 #6=#:G1817)
    (RETURN
     (SEQ
      (COND
       ((NULL (EQL (LENGTH |l|) (QREFELT $ 6)))
        (|error| "matrix: wrong number of rows"))
       ('T
        (SEQ
         (SEQ
          (EXIT
           (SEQ (LETT |ll| NIL . #7=(|RMATRIX;matrix;L$;3|))
                (LETT #6# |l| . #7#) G190
                (COND
                 ((OR (ATOM #6#) (PROGN (LETT |ll| (CAR #6#) . #7#) NIL))
                  #8=(GO G191)))
                (SEQ
                 (EXIT
                  (COND
                   ((NULL (EQL (LENGTH |ll|) (QREFELT $ 7)))
                    (PROGN
                     (LETT #5# (|error| "matrix: wrong number of columns")
                           . #7#)
                     (GO #5#))))))
                (LETT #6# (CDR #6#) . #7#) #9=(GO G190) G191 (EXIT NIL)))
          #5# (EXIT #5#))
         (LETT |ans|
               (SPADCALL (QREFELT $ 6) (QREFELT $ 7) (|spadConstant| $ 9)
                         (QREFELT $ 11))
               . #7#)
         (SEQ (LETT |ll| NIL . #7#) (LETT #4# |l| . #7#) (LETT |i| 1 . #7#)
              (LETT #3# (SPADCALL |ans| (QREFELT $ 18)) . #7#) G190
              (COND
               ((OR (QSGREATERP |i| #3#) (ATOM #4#)
                    (PROGN (LETT |ll| (CAR #4#) . #7#) NIL))
                #8#))
              (SEQ
               (EXIT
                (SEQ (LETT |r| NIL . #7#) (LETT #2# |ll| . #7#)
                     (LETT |j| 1 . #7#)
                     (LETT #1# (SPADCALL |ans| (QREFELT $ 19)) . #7#) G190
                     (COND
                      ((OR (QSGREATERP |j| #1#) (ATOM #2#)
                           (PROGN (LETT |r| (CAR #2#) . #7#) NIL))
                       #8#))
                     (SEQ (EXIT (QSETAREF2O |ans| |i| |j| |r| 1 1)))
                     (LETT |j| (PROG1 (QSADD1 |j|) (LETT #2# (CDR #2#) . #7#))
                           . #7#)
                     #9# G191 (EXIT NIL))))
              (LETT |i| (PROG1 (QSADD1 |i|) (LETT #4# (CDR #4#) . #7#)) . #7#)
              #9# G191 (EXIT NIL))
         (EXIT |ans|)))))))) 

(DEFUN |RMATRIX;row;$IDp;4| (|x| |i| $)
  (SPADCALL (SPADCALL |x| |i| (QREFELT $ 23)) (QREFELT $ 25))) 

(DEFUN |RMATRIX;column;$IDp;5| (|x| |j| $)
  (SPADCALL (SPADCALL |x| |j| (QREFELT $ 27)) (QREFELT $ 29))) 

(DEFUN |RMATRIX;coerce;$M;6| (|x| $) (SPADCALL |x| (QREFELT $ 31))) 

(DEFUN |RMATRIX;rectangularMatrix;M$;7| (|x| $)
  (SEQ
   (COND
    ((EQL (QVSIZE |x|) (QREFELT $ 6))
     (COND
      ((NULL (EQL (SPADCALL |x| (QREFELT $ 33)) (QREFELT $ 7)))
       (EXIT (|error| #1="rectangularMatrix: matrix of bad dimensions")))))
    ('T (EXIT (|error| #1#))))
   (EXIT (SPADCALL |x| (QREFELT $ 31))))) 

(DEFUN |RMATRIX;rowEchelon;2$;8| (|x| $) (SPADCALL |x| (QREFELT $ 35))) 

(DEFUN |RMATRIX;columnSpace;$L;9| (|x| $)
  (PROG (#1=#:G1833 |c| #2=#:G1832)
    (RETURN
     (SEQ
      (PROGN
       (LETT #2# NIL . #3=(|RMATRIX;columnSpace;$L;9|))
       (SEQ (LETT |c| NIL . #3#) (LETT #1# (SPADCALL |x| (QREFELT $ 38)) . #3#)
            G190
            (COND
             ((OR (ATOM #1#) (PROGN (LETT |c| (CAR #1#) . #3#) NIL))
              (GO G191)))
            (SEQ
             (EXIT (LETT #2# (CONS (SPADCALL |c| (QREFELT $ 29)) #2#) . #3#)))
            (LETT #1# (CDR #1#) . #3#) (GO G190) G191
            (EXIT (NREVERSE0 #2#)))))))) 

(DEFUN |RMATRIX;rank;$Nni;10| (|x| $) (SPADCALL |x| (QREFELT $ 41))) 

(DEFUN |RMATRIX;nullity;$Nni;11| (|x| $) (SPADCALL |x| (QREFELT $ 43))) 

(DEFUN |RMATRIX;nullSpace;$L;12| (|x| $)
  (PROG (#1=#:G1839 |c| #2=#:G1838)
    (RETURN
     (SEQ
      (PROGN
       (LETT #2# NIL . #3=(|RMATRIX;nullSpace;$L;12|))
       (SEQ (LETT |c| NIL . #3#) (LETT #1# (SPADCALL |x| (QREFELT $ 45)) . #3#)
            G190
            (COND
             ((OR (ATOM #1#) (PROGN (LETT |c| (CAR #1#) . #3#) NIL))
              (GO G191)))
            (SEQ
             (EXIT (LETT #2# (CONS (SPADCALL |c| (QREFELT $ 29)) #2#) . #3#)))
            (LETT #1# (CDR #1#) . #3#) (GO G190) G191
            (EXIT (NREVERSE0 #2#)))))))) 

(DEFUN |RMATRIX;dimension;Cn;13| ($)
  (SPADCALL (* (QREFELT $ 6) (QREFELT $ 7)) (QREFELT $ 48))) 

(DEFUN |RMATRIX;convert;$If;14| (|x| $)
  (SPADCALL
   (LIST (SPADCALL '|rectangularMatrix| (QREFELT $ 52))
         (SPADCALL (SPADCALL |x| (QREFELT $ 32)) (QREFELT $ 53)))
   (QREFELT $ 55))) 

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

(DEFUN |RectangularMatrix;| (|#1| |#2| |#3|)
  (PROG (#1=#:G1850 |pv$| #2=#:G1849 $ |dv$| DV$3 DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #3=(|RectangularMatrix|))
      (LETT DV$2 (|devaluate| |#2|) . #3#)
      (LETT DV$3 (|devaluate| |#3|) . #3#)
      (LETT |dv$| (LIST '|RectangularMatrix| DV$1 DV$2 DV$3) . #3#)
      (LETT $ (GETREFV 68) . #3#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST (|HasCategory| |#3| '(|Finite|))
                                               (|HasCategory| |#3|
                                                              '(|ConvertibleTo|
                                                                (|InputForm|)))
                                               (|HasCategory| |#3| '(|Field|))
                                               (|HasCategory| |#3|
                                                              '(|SetCategory|))
                                               (|HasCategory| |#3|
                                                              '(|EuclideanDomain|))
                                               (|HasCategory| |#3|
                                                              '(|IntegralDomain|))
                                               (LETT #2#
                                                     (|HasCategory| |#3|
                                                                    '(|CommutativeRing|))
                                                     . #3#)
                                               (OR #2#
                                                   (|HasCategory| |#3|
                                                                  '(|Field|)))
                                               (AND
                                                (|HasCategory| |#3|
                                                               (LIST
                                                                '|Evalable|
                                                                (|devaluate|
                                                                 |#3|)))
                                                (|HasCategory| |#3|
                                                               '(|SetCategory|)))
                                               (OR
                                                (AND
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|)))
                                                 #2#)
                                                (AND
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|)))
                                                 (|HasCategory| |#3|
                                                                '(|Field|)))
                                                (AND
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|)))
                                                 (|HasCategory| |#3|
                                                                '(|Finite|)))
                                                (AND
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|)))
                                                 (|HasCategory| |#3|
                                                                '(|SetCategory|))))))
                      . #3#))
      (|haddProp| |$ConstructorCache| '|RectangularMatrix|
                  (LIST DV$1 DV$2 DV$3) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 8 |#3|)
      (AND (|HasCategory| $ '(|shallowlyMutable|))
           (|augmentPredVector| $ 1024))
      (AND (LETT #1# (|HasCategory| $ '(|finiteAggregate|)) . #3#)
           (|augmentPredVector| $ 2048))
      (AND (|HasCategory| |#3| '(|SetCategory|)) #1#
           (|augmentPredVector| $ 4096))
      (QSETREFV $ 12 (SPADCALL |#1| |#2| (|spadConstant| $ 9) (QREFELT $ 11)))
      (COND
       ((|testBitVector| |pv$| 5)
        (PROGN
         (QSETREFV $ 36
                   (CONS (|dispatchFunction| |RMATRIX;rowEchelon;2$;8|) $))
         (QSETREFV $ 40
                   (CONS (|dispatchFunction| |RMATRIX;columnSpace;$L;9|) $)))))
      (COND
       ((|testBitVector| |pv$| 6)
        (PROGN
         (QSETREFV $ 42 (CONS (|dispatchFunction| |RMATRIX;rank;$Nni;10|) $))
         (QSETREFV $ 44
                   (CONS (|dispatchFunction| |RMATRIX;nullity;$Nni;11|) $))
         (QSETREFV $ 46
                   (CONS (|dispatchFunction| |RMATRIX;nullSpace;$L;12|) $)))))
      (COND
       ((|testBitVector| |pv$| 3)
        (QSETREFV $ 49
                  (CONS (|dispatchFunction| |RMATRIX;dimension;Cn;13|) $))))
      (COND
       ((|testBitVector| |pv$| 2)
        (QSETREFV $ 56
                  (CONS (|dispatchFunction| |RMATRIX;convert;$If;14|) $))))
      $)))) 

(MAKEPROP '|RectangularMatrix| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|Matrix| 8) (|local| |#1|) (|local| |#2|)
              (|local| |#3|) (0 . |Zero|) (|NonNegativeInteger|) (4 . |new|)
              'ZERO
              (CONS IDENTITY
                    (FUNCALL (|dispatchFunction| |RMATRIX;Zero;$;1|) $))
              (|OutputForm|) (11 . |coerce|) |RMATRIX;coerce;$Of;2| (|Integer|)
              (16 . |maxRowIndex|) (21 . |maxColIndex|) (|List| 60)
              |RMATRIX;matrix;L$;3| (|Vector| 8) (26 . |row|)
              (|DirectProduct| 7 8) (32 . |directProduct|) |RMATRIX;row;$IDp;4|
              (37 . |column|) (|DirectProduct| 6 8) (43 . |directProduct|)
              |RMATRIX;column;$IDp;5| (48 . |copy|) |RMATRIX;coerce;$M;6|
              (53 . |ncols|) |RMATRIX;rectangularMatrix;M$;7|
              (58 . |rowEchelon|) (63 . |rowEchelon|) (|List| 22)
              (68 . |columnSpace|) (|List| 28) (73 . |columnSpace|)
              (78 . |rank|) (83 . |rank|) (88 . |nullity|) (93 . |nullity|)
              (98 . |nullSpace|) (103 . |nullSpace|) (|CardinalNumber|)
              (108 . |coerce|) (113 . |dimension|) (|Symbol|) (|InputForm|)
              (117 . |convert|) (122 . |convert|) (|List| $) (127 . |convert|)
              (132 . |convert|) (|Boolean|) (|List| 59) (|Equation| 8)
              (|List| 8) (|Mapping| 57 8) (|Mapping| 8 8) (|PositiveInteger|)
              (|Union| $ '"failed") (|Mapping| 8 8 8) (|SingleInteger|)
              (|String|))
           '#(~= 137 |zero?| 143 |symmetric?| 148 |subtractIfCan| 153 |square?|
              159 |size?| 164 |size| 170 |sample| 174 |rowEchelon| 178 |row|
              183 |rectangularMatrix| 189 |rank| 194 |random| 199 |qelt| 203
              |parts| 210 |nullity| 215 |nullSpace| 220 |nrows| 225 |ncols| 230
              |more?| 235 |minRowIndex| 241 |minColIndex| 246 |members| 251
              |member?| 256 |maxRowIndex| 262 |maxColIndex| 267 |matrix| 272
              |map!| 277 |map| 283 |lookup| 296 |listOfLists| 301 |less?| 306
              |latex| 312 |index| 317 |hash| 322 |exquo| 327 |every?| 333
              |eval| 339 |eq?| 365 |enumerate| 371 |empty?| 375 |empty| 380
              |elt| 384 |dimension| 399 |diagonal?| 403 |count| 408 |copy| 420
              |convert| 425 |columnSpace| 430 |column| 435 |coerce| 441 |any?|
              451 |antisymmetric?| 457 |Zero| 462 = 466 / 472 - 478 + 489 * 495
              |#| 525)
           'NIL
           (CONS
            (|makeByteWordVec2| 10
                                '(0 3 8 0 0 0 0 0 0 0 0 1 0 0 10 0 0 0 0 0 10
                                  2))
            (CONS
             '#(|RectangularMatrixCategory&| |VectorSpace&| |Module&| NIL NIL
                NIL |AbelianGroup&| NIL |AbelianMonoid&|
                |HomogeneousAggregate&| |AbelianSemiGroup&| |Finite&|
                |Aggregate&| |SetCategory&| |Evalable&| NIL NIL NIL
                |BasicType&| NIL |InnerEvalable&| NIL)
             (CONS
              '#((|RectangularMatrixCategory| 6 7 8 (|DirectProduct| 7 8)
                                              (|DirectProduct| 6 8))
                 (|VectorSpace| 8) (|Module| 8) (|BiModule| 8 8)
                 (|LeftModule| 8) (|RightModule| 8) (|AbelianGroup|)
                 (|CancellationAbelianMonoid|) (|AbelianMonoid|)
                 (|HomogeneousAggregate| 8) (|AbelianSemiGroup|) (|Finite|)
                 (|Aggregate|) (|SetCategory|) (|Evalable| 8)
                 (|CoercibleTo| (|Matrix| 8)) (|finiteAggregate|) (|Type|)
                 (|BasicType|) (|CoercibleTo| 14) (|InnerEvalable| 8 8)
                 (|ConvertibleTo| 51))
              (|makeByteWordVec2| 67
                                  '(0 8 0 9 3 5 0 10 10 8 11 1 5 14 0 15 1 5 17
                                    0 18 1 5 17 0 19 2 5 22 0 17 23 1 24 0 22
                                    25 2 5 22 0 17 27 1 28 0 22 29 1 5 0 0 31 1
                                    5 10 0 33 1 5 0 0 35 1 0 0 0 36 1 5 37 0 38
                                    1 0 39 0 40 1 5 10 0 41 1 0 10 0 42 1 5 10
                                    0 43 1 0 10 0 44 1 5 37 0 45 1 0 39 0 46 1
                                    47 0 10 48 0 0 47 49 1 51 0 50 52 1 5 51 0
                                    53 1 51 0 54 55 1 0 51 0 56 2 0 57 0 0 1 1
                                    0 57 0 1 1 0 57 0 1 2 0 64 0 0 1 1 0 57 0 1
                                    2 0 57 0 10 1 0 1 10 1 0 0 0 1 1 5 0 0 36 2
                                    0 24 0 17 26 1 0 0 5 34 1 6 10 0 42 0 1 0 1
                                    3 0 8 0 17 17 1 1 12 60 0 1 1 6 10 0 44 1 6
                                    39 0 46 1 0 10 0 1 1 0 10 0 1 2 0 57 0 10 1
                                    1 0 17 0 1 1 0 17 0 1 1 12 60 0 1 2 13 57 8
                                    0 1 1 0 17 0 1 1 0 17 0 1 1 0 0 20 21 2 11
                                    0 62 0 1 3 0 0 65 0 0 1 2 0 0 62 0 1 1 1 63
                                    0 1 1 0 20 0 1 2 0 57 0 10 1 1 0 67 0 1 1 1
                                    0 63 1 1 0 66 0 1 2 6 64 0 8 1 2 12 57 61 0
                                    1 2 9 0 0 58 1 3 9 0 0 8 8 1 2 9 0 0 59 1 3
                                    9 0 0 60 60 1 2 0 57 0 0 1 0 1 54 1 1 0 57
                                    0 1 0 0 0 1 4 0 8 0 17 17 8 1 3 0 8 0 17 17
                                    1 0 3 47 49 1 0 57 0 1 2 13 10 8 0 1 2 12
                                    10 61 0 1 1 0 0 0 1 1 2 51 0 56 1 5 39 0 40
                                    2 0 28 0 17 30 1 0 5 0 32 1 0 14 0 16 2 12
                                    57 61 0 1 1 0 57 0 1 0 0 0 13 2 0 57 0 0 1
                                    2 3 0 0 8 1 1 0 0 0 1 2 0 0 0 0 1 2 0 0 0 0
                                    1 2 0 0 0 8 1 2 0 0 17 0 1 2 0 0 8 0 1 2 0
                                    0 10 0 1 2 0 0 63 0 1 1 12 10 0 1)))))
           '|lookupComplete|)) 
