
(/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=#:G678 |j| #2=#:G679 |r| #3=#:G676 |i| #4=#:G677 |ll| |ans|
         #5=#:G670 #6=#:G675)
    (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| (SPADCALL |ans| (QREFELT $ 18)) . #7#)
              (LETT #3# (SPADCALL |ans| (QREFELT $ 19)) . #7#) G190
              (COND
               ((OR (> |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| (SPADCALL |ans| (QREFELT $ 20)) . #7#)
                     (LETT #1# (SPADCALL |ans| (QREFELT $ 21)) . #7#) G190
                     (COND
                      ((OR (> |j| #1#) (ATOM #2#)
                           (PROGN (LETT |r| (CAR #2#) . #7#) NIL))
                       #8#))
                     (SEQ (EXIT (SPADCALL |ans| |i| |j| |r| (QREFELT $ 22))))
                     (LETT |j| (PROG1 (+ |j| 1) (LETT #2# (CDR #2#) . #7#))
                           . #7#)
                     #9# G191 (EXIT NIL))))
              (LETT |i| (PROG1 (+ |i| 1) (LETT #4# (CDR #4#) . #7#)) . #7#) #9#
              G191 (EXIT NIL))
         (EXIT |ans|)))))))) 

(DEFUN |RMATRIX;row;$IDp;4| (|x| |i| $)
  (SPADCALL (SPADCALL |x| |i| (QREFELT $ 26)) (QREFELT $ 28))) 

(DEFUN |RMATRIX;column;$IDp;5| (|x| |j| $)
  (SPADCALL (SPADCALL |x| |j| (QREFELT $ 30)) (QREFELT $ 32))) 

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

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

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

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

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

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

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

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

(DEFUN |RMATRIX;convert;$If;14| (|x| $)
  (SPADCALL
   (LIST (SPADCALL '|rectangularMatrix| (QREFELT $ 56))
         (SPADCALL (SPADCALL |x| (QREFELT $ 35)) (QREFELT $ 57)))
   (QREFELT $ 59))) 

(DEFUN |RectangularMatrix| (&REST #1=#:G709)
  (PROG ()
    (RETURN
     (PROG (#2=#:G710)
       (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=#:G708 |pv$| #2=#:G707 $ |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 72) . #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|
                                                               '(|SetCategory|))
                                                (|HasCategory| |#3|
                                                               (LIST
                                                                '|Evalable|
                                                                (|devaluate|
                                                                 |#3|))))
                                               (OR
                                                (AND #2#
                                                     (|HasCategory| |#3|
                                                                    (LIST
                                                                     '|Evalable|
                                                                     (|devaluate|
                                                                      |#3|))))
                                                (AND
                                                 (|HasCategory| |#3|
                                                                '(|Field|))
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|))))
                                                (AND
                                                 (|HasCategory| |#3|
                                                                '(|Finite|))
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|))))
                                                (AND
                                                 (|HasCategory| |#3|
                                                                '(|SetCategory|))
                                                 (|HasCategory| |#3|
                                                                (LIST
                                                                 '|Evalable|
                                                                 (|devaluate|
                                                                  |#3|)))))))
                      . #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 #1# (|HasCategory| |#3| '(|SetCategory|))
           (|augmentPredVector| $ 4096))
      (QSETREFV $ 12 (SPADCALL |#1| |#2| (|spadConstant| $ 9) (QREFELT $ 11)))
      (COND
       ((|testBitVector| |pv$| 5)
        (PROGN
         (QSETREFV $ 40
                   (CONS (|dispatchFunction| |RMATRIX;rowEchelon;2$;8|) $))
         (QSETREFV $ 44
                   (CONS (|dispatchFunction| |RMATRIX;columnSpace;$L;9|) $)))))
      (COND
       ((|testBitVector| |pv$| 6)
        (PROGN
         (QSETREFV $ 46 (CONS (|dispatchFunction| |RMATRIX;rank;$Nni;10|) $))
         (QSETREFV $ 48
                   (CONS (|dispatchFunction| |RMATRIX;nullity;$Nni;11|) $))
         (QSETREFV $ 50
                   (CONS (|dispatchFunction| |RMATRIX;nullSpace;$L;12|) $)))))
      (COND
       ((|testBitVector| |pv$| 3)
        (QSETREFV $ 53
                  (CONS (|dispatchFunction| |RMATRIX;dimension;Cn;13|) $))))
      (COND
       ((|testBitVector| |pv$| 2)
        (QSETREFV $ 60
                  (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 . |minRowIndex|) (21 . |maxRowIndex|) (26 . |minColIndex|)
              (31 . |maxColIndex|) (36 . |qsetelt!|) (|List| 64)
              |RMATRIX;matrix;L$;3| (|Vector| 8) (44 . |row|)
              (|DirectProduct| 7 8) (50 . |directProduct|) |RMATRIX;row;$IDp;4|
              (55 . |column|) (|DirectProduct| 6 8) (61 . |directProduct|)
              |RMATRIX;column;$IDp;5| (66 . |copy|) |RMATRIX;coerce;$M;6|
              (71 . |nrows|) (76 . |ncols|) |RMATRIX;rectangularMatrix;M$;7|
              (81 . |rowEchelon|) (86 . |rowEchelon|) (|List| 25)
              (91 . |columnSpace|) (|List| 31) (96 . |columnSpace|)
              (101 . |rank|) (106 . |rank|) (111 . |nullity|) (116 . |nullity|)
              (121 . |nullSpace|) (126 . |nullSpace|) (|CardinalNumber|)
              (131 . |coerce|) (136 . |dimension|) (|Symbol|) (|InputForm|)
              (140 . |convert|) (145 . |convert|) (|List| $) (150 . |convert|)
              (155 . |convert|) (|Boolean|) (|List| 63) (|Equation| 8)
              (|List| 8) (|Mapping| 61 8) (|Mapping| 8 8) (|PositiveInteger|)
              (|Union| $ '"failed") (|Mapping| 8 8 8) (|SingleInteger|)
              (|String|))
           '#(~= 160 |zero?| 166 |symmetric?| 171 |subtractIfCan| 176 |square?|
              182 |size?| 187 |size| 193 |sample| 197 |rowEchelon| 201 |row|
              206 |rectangularMatrix| 212 |rank| 217 |random| 222 |qelt| 226
              |parts| 233 |nullity| 238 |nullSpace| 243 |nrows| 248 |ncols| 253
              |more?| 258 |minRowIndex| 264 |minColIndex| 269 |members| 274
              |member?| 279 |maxRowIndex| 285 |maxColIndex| 290 |matrix| 295
              |map!| 300 |map| 306 |lookup| 319 |listOfLists| 324 |less?| 329
              |latex| 335 |index| 340 |hash| 345 |exquo| 350 |every?| 356
              |eval| 362 |eq?| 388 |enumerate| 394 |empty?| 398 |empty| 403
              |elt| 407 |dimension| 422 |diagonal?| 426 |count| 431 |copy| 443
              |convert| 448 |columnSpace| 453 |column| 458 |coerce| 464 |any?|
              474 |antisymmetric?| 480 |Zero| 485 = 489 / 495 - 501 + 512 * 518
              |#| 548)
           '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| 55))
              (|makeByteWordVec2| 71
                                  '(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 1 5 17 0 20 1 5 17 0 21 4
                                    5 8 0 17 17 8 22 2 5 25 0 17 26 1 27 0 25
                                    28 2 5 25 0 17 30 1 31 0 25 32 1 5 0 0 34 1
                                    5 10 0 36 1 5 10 0 37 1 5 0 0 39 1 0 0 0 40
                                    1 5 41 0 42 1 0 43 0 44 1 5 10 0 45 1 0 10
                                    0 46 1 5 10 0 47 1 0 10 0 48 1 5 41 0 49 1
                                    0 43 0 50 1 51 0 10 52 0 0 51 53 1 55 0 54
                                    56 1 5 55 0 57 1 55 0 58 59 1 0 55 0 60 2 0
                                    61 0 0 1 1 0 61 0 1 1 0 61 0 1 2 0 68 0 0 1
                                    1 0 61 0 1 2 0 61 0 10 1 0 1 10 1 0 0 0 1 1
                                    5 0 0 40 2 0 27 0 17 29 1 0 0 5 38 1 6 10 0
                                    46 0 1 0 1 3 0 8 0 17 17 1 1 12 64 0 1 1 6
                                    10 0 48 1 6 43 0 50 1 0 10 0 1 1 0 10 0 1 2
                                    0 61 0 10 1 1 0 17 0 1 1 0 17 0 1 1 12 64 0
                                    1 2 13 61 8 0 1 1 0 17 0 1 1 0 17 0 1 1 0 0
                                    23 24 2 11 0 66 0 1 3 0 0 69 0 0 1 2 0 0 66
                                    0 1 1 1 67 0 1 1 0 23 0 1 2 0 61 0 10 1 1 0
                                    71 0 1 1 1 0 67 1 1 0 70 0 1 2 6 68 0 8 1 2
                                    12 61 65 0 1 2 9 0 0 62 1 3 9 0 0 8 8 1 2 9
                                    0 0 63 1 3 9 0 0 64 64 1 2 0 61 0 0 1 0 1
                                    58 1 1 0 61 0 1 0 0 0 1 4 0 8 0 17 17 8 1 3
                                    0 8 0 17 17 1 0 3 51 53 1 0 61 0 1 2 13 10
                                    8 0 1 2 12 10 65 0 1 1 0 0 0 1 1 2 55 0 60
                                    1 5 43 0 44 2 0 31 0 17 33 1 0 5 0 35 1 0
                                    14 0 16 2 12 61 65 0 1 1 0 61 0 1 0 0 0 13
                                    2 0 61 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 67 0 1 1 12 10
                                    0 1)))))
           '|lookupComplete|)) 
