
(/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 (#0=#:G1829 #1=#:G1824 |ans| |ll| #2=#:G1831 |i| #3=#:G1830 |r|
            #4=#:G1833 |j| #5=#:G1832)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (LENGTH |l|) (QREFELT $ 6)))
              (|error| "matrix: wrong number of rows"))
             ('T
              (SEQ (SEQ (EXIT (SEQ (LETT |ll| NIL
                                    . #6=(|RMATRIX;matrix;L$;3|))
                                   (LETT #0# |l| . #6#) G190
                                   (COND
                                     ((OR (ATOM #0#)
                                       (PROGN
                                         (LETT |ll| (CAR #0#) . #6#)
                                         NIL))
                                      #7=(GO G191)))
                                   (SEQ
                                    (EXIT
                                     (COND
                                       ((NULL
                                         (EQL (LENGTH |ll|)
                                          (QREFELT $ 7)))
                                        (PROGN
                                          (LETT #1#
                                           (|error|
                                            "matrix: wrong number of columns") . #6#)
                                          (GO #1#))))))
                                   (LETT #0# (CDR #0#) . #6#)
                                   #8=(GO G190) G191 (EXIT NIL)))
                        #1# (EXIT #1#))
                   (LETT |ans|
                         (SPADCALL (QREFELT $ 6) (QREFELT $ 7)
                             (|spadConstant| $ 9) (QREFELT $ 11)) . #6#)
                   (SEQ (LETT |ll| NIL . #6#) (LETT #2# |l| . #6#)
                        (LETT |i|
                              (SPADCALL |ans| (QREFELT $ 18)) . #6#)
                        (LETT #3#
                              (SPADCALL |ans| (QREFELT $ 19)) . #6#)
                        G190
                        (COND
                          ((OR (> |i| #3#) (ATOM #2#)
                               (PROGN (LETT |ll| (CAR #2#) . #6#) NIL))
                           #7#))
                        (SEQ (EXIT (SEQ (LETT |r| NIL . #6#)
                                    (LETT #4# |ll| . #6#)
                                    (LETT |j|
                                     (SPADCALL |ans| (QREFELT $ 20)) . #6#)
                                    (LETT #5#
                                     (SPADCALL |ans| (QREFELT $ 21)) . #6#)
                                    G190
                                    (COND
                                      ((OR (> |j| #5#) (ATOM #4#)
                                        (PROGN
                                          (LETT |r| (CAR #4#) . #6#)
                                          NIL))
                                       #7#))
                                    (SEQ
                                     (EXIT
                                      (SPADCALL |ans| |i| |j| |r|
                                       (QREFELT $ 22))))
                                    (LETT |j|
                                     (PROG1 (+ |j| 1)
                                       (LETT #4# (CDR #4#) . #6#)) . #6#)
                                    #8# G191 (EXIT NIL))))
                        (LETT |i|
                              (PROG1 (+ |i| 1)
                                (LETT #2# (CDR #2#) . #6#)) . #6#)
                        #8# 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| "rectangularMatrix: matrix of bad dimensions")))))
         ('T
          (EXIT (|error| "rectangularMatrix: matrix of bad dimensions"))))
       (EXIT (SPADCALL |x| (QREFELT $ 34))))) 

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

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

(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 (#0=#:G1850 |c| #1=#:G1851)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL . #2=(|RMATRIX;nullSpace;$L;12|))
             (SEQ (LETT |c| NIL . #2#)
                  (LETT #1# (SPADCALL |x| (QREFELT $ 49)) . #2#) G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN (LETT |c| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS (SPADCALL |c| (QREFELT $ 32))
                                    #0#) . #2#)))
                  (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                  (EXIT (NREVERSE0 #0#)))))))) 

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

(DEFUN |RMATRIX;convert;$If;14| (|x| $)
  (SPADCALL
      (LIST (SPADCALL (SPADCALL "rectangularMatrix" (QREFELT $ 56))
                (QREFELT $ 58))
            (SPADCALL (SPADCALL |x| (QREFELT $ 35)) (QREFELT $ 59)))
      (QREFELT $ 61))) 

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

(DEFUN |RectangularMatrix;| (|#1| |#2| |#3|)
  (PROG (DV$1 DV$2 DV$3 |dv$| $ #0=#:G1861 |pv$| #1=#:G1862)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #2=(|RectangularMatrix|))
        (LETT DV$2 (|devaluate| |#2|) . #2#)
        (LETT DV$3 (|devaluate| |#3|) . #2#)
        (LETT |dv$| (LIST '|RectangularMatrix| DV$1 DV$2 DV$3) . #2#)
        (LETT $ (GETREFV 73) . #2#)
        (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 #0#
                                  (|HasCategory| |#3|
                                      '(|CommutativeRing|)) . #2#)
                            (OR #0# (|HasCategory| |#3| '(|Field|)))
                            (AND (|HasCategory| |#3| '(|SetCategory|))
                                 (|HasCategory| |#3|
                                     (LIST '|Evalable|
                                      (|devaluate| |#3|))))
                            (OR (AND #0#
                                     (|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|))))))) . #2#))
        (|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|)) . #2#)
             (|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 $ 62
               (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| 66) |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|)
             (|String|) (|Symbol|) (140 . |coerce|) (|InputForm|)
             (145 . |convert|) (150 . |convert|) (|List| $)
             (155 . |convert|) (160 . |convert|) (|Boolean|)
             (|List| 65) (|Equation| 8) (|List| 8) (|Mapping| 63 8)
             (|Mapping| 8 8) (|PositiveInteger|) (|Union| $ '"failed")
             (|Mapping| 8 8 8) (|SingleInteger|))
          '#(~= 165 |zero?| 171 |symmetric?| 176 |subtractIfCan| 181
             |square?| 187 |size?| 192 |size| 198 |sample| 202
             |rowEchelon| 206 |row| 211 |rectangularMatrix| 217 |rank|
             222 |random| 227 |qelt| 231 |parts| 238 |nullity| 243
             |nullSpace| 248 |nrows| 253 |ncols| 258 |more?| 263
             |minRowIndex| 269 |minColIndex| 274 |members| 279
             |member?| 284 |maxRowIndex| 290 |maxColIndex| 295 |matrix|
             300 |map!| 305 |map| 311 |lookup| 324 |listOfLists| 329
             |less?| 334 |latex| 340 |index| 345 |hash| 350 |exquo| 355
             |every?| 361 |eval| 367 |eq?| 393 |enumerate| 399 |empty?|
             403 |empty| 408 |elt| 412 |dimension| 427 |diagonal?| 431
             |count| 436 |copy| 448 |convert| 453 |columnSpace| 458
             |column| 463 |coerce| 469 |any?| 479 |antisymmetric?| 485
             |Zero| 490 = 494 / 500 - 506 + 517 * 523 |#| 553)
          '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| 57))
                            (|makeByteWordVec2| 72
                                '(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 57 0 55 58 1 5 57 0 59
                                  1 57 0 60 61 1 0 57 0 62 2 0 63 0 0 1
                                  1 0 63 0 1 1 0 63 0 1 2 0 70 0 0 1 1
                                  0 63 0 1 2 0 63 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 66 0 1 1 6 10 0 48 1 6 43 0 50
                                  1 0 10 0 1 1 0 10 0 1 2 0 63 0 10 1 1
                                  0 17 0 1 1 0 17 0 1 1 12 66 0 1 2 13
                                  63 8 0 1 1 0 17 0 1 1 0 17 0 1 1 0 0
                                  23 24 2 11 0 68 0 1 3 0 0 71 0 0 1 2
                                  0 0 68 0 1 1 1 69 0 1 1 0 23 0 1 2 0
                                  63 0 10 1 1 0 54 0 1 1 1 0 69 1 1 0
                                  72 0 1 2 6 70 0 8 1 2 12 63 67 0 1 2
                                  9 0 0 64 1 3 9 0 0 8 8 1 2 9 0 0 65 1
                                  3 9 0 0 66 66 1 2 0 63 0 0 1 0 1 60 1
                                  1 0 63 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 63 0 1
                                  2 13 10 8 0 1 2 12 10 67 0 1 1 0 0 0
                                  1 1 2 57 0 62 1 5 43 0 44 2 0 31 0 17
                                  33 1 0 5 0 35 1 0 14 0 16 2 12 63 67
                                  0 1 1 0 63 0 1 0 0 0 13 2 0 63 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 69 0 1 1
                                  12 10 0 1)))))
          '|lookupComplete|)) 
