
(/VERSIONCHECK 2) 

(DEFUN |VECTCAT-;+;3S;1| (|u| |v| $)
  (PROG (|n|)
    (RETURN
      (COND
        ((NULL (EQL (LETT |n| (SPADCALL |u| (QREFELT $ 9))
                          |VECTCAT-;+;3S;1|)
                    (SPADCALL |v| (QREFELT $ 9))))
         (|error| "Vectors must be of the same length"))
        ('T (SPADCALL (ELT $ 10) |u| |v| (QREFELT $ 12))))))) 

(DEFUN |VECTCAT-;zero;NniS;2| (|n| $)
  (SPADCALL |n| (|spadConstant| $ 14) (QREFELT $ 15))) 

(DEFUN |VECTCAT-;-;2S;3| (|u| $)
  (SPADCALL (CONS #'|VECTCAT-;-;2S;3!0| $) |u| (QREFELT $ 19))) 

(DEFUN |VECTCAT-;-;2S;3!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 17))) 

(DEFUN |VECTCAT-;*;I2S;4| (|n| |u| $)
  (SPADCALL (CONS #'|VECTCAT-;*;I2S;4!0| (VECTOR $ |n|)) |u|
      (QREFELT $ 19))) 

(DEFUN |VECTCAT-;*;I2S;4!0| (|#1| $$)
  (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 22))) 

(DEFUN |VECTCAT-;-;3S;5| (|u| |v| $)
  (SPADCALL |u| (SPADCALL |v| (QREFELT $ 24)) (QREFELT $ 25))) 

(DEFUN |VECTCAT-;*;SRS;6| (|u| |r| $)
  (SPADCALL (CONS #'|VECTCAT-;*;SRS;6!0| (VECTOR $ |r|)) |u|
      (QREFELT $ 19))) 

(DEFUN |VECTCAT-;*;SRS;6!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 27))) 

(DEFUN |VECTCAT-;*;R2S;7| (|r| |u| $)
  (SPADCALL (CONS #'|VECTCAT-;*;R2S;7!0| (VECTOR $ |r|)) |u|
      (QREFELT $ 19))) 

(DEFUN |VECTCAT-;*;R2S;7!0| (|#1| $$)
  (SPADCALL (QREFELT $$ 1) |#1| (QREFELT (QREFELT $$ 0) 27))) 

(DEFUN |VECTCAT-;dot;2SR;8| (|u| |v| $)
  (PROG (|i| #0=#:G1839 #1=#:G1836 #2=#:G1834 #3=#:G1835)
    (RETURN
      (SEQ (COND
             ((NULL (EQL (SPADCALL |u| (QREFELT $ 9))
                         (SPADCALL |v| (QREFELT $ 9))))
              (|error| "Vectors must be of the same length"))
             ('T
              (PROGN
                (LETT #3# NIL . #4=(|VECTCAT-;dot;2SR;8|))
                (SEQ (LETT |i| (SPADCALL |u| (QREFELT $ 30)) . #4#)
                     (LETT #0# (SPADCALL |u| (QREFELT $ 31)) . #4#)
                     G190 (COND ((> |i| #0#) (GO G191)))
                     (SEQ (EXIT (PROGN
                                  (LETT #1#
                                        (SPADCALL
                                         (SPADCALL |u| |i|
                                          (QREFELT $ 32))
                                         (SPADCALL |v| |i|
                                          (QREFELT $ 32))
                                         (QREFELT $ 27)) . #4#)
                                  (COND
                                    (#3#
                                     (LETT #2#
                                      (SPADCALL #2# #1# (QREFELT $ 10)) . #4#))
                                    ('T
                                     (PROGN
                                       (LETT #2# #1# . #4#)
                                       (LETT #3# 'T . #4#)))))))
                     (LETT |i| (+ |i| 1) . #4#) (GO G190) G191
                     (EXIT NIL))
                (COND (#3# #2#) ('T (|spadConstant| $ 14)))))))))) 

(DEFUN |VECTCAT-;outerProduct;2SM;9| (|u| |v| $)
  (PROG (#0=#:G1843 |j| #1=#:G1844 #2=#:G1845 |i| #3=#:G1846)
    (RETURN
      (SEQ (SPADCALL
               (PROGN
                 (LETT #0# NIL . #4=(|VECTCAT-;outerProduct;2SM;9|))
                 (SEQ (LETT |j| (SPADCALL |v| (QREFELT $ 30)) . #4#)
                      (LETT #1# (SPADCALL |v| (QREFELT $ 31)) . #4#)
                      G190 (COND ((> |j| #1#) #5=(GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (PROGN
                                          (LETT #2# NIL . #4#)
                                          (SEQ
                                           (LETT |i|
                                            (SPADCALL |u|
                                             (QREFELT $ 30)) . #4#)
                                           (LETT #3#
                                            (SPADCALL |u|
                                             (QREFELT $ 31)) . #4#)
                                           G190
                                           (COND ((> |i| #3#) #5#))
                                           (SEQ
                                            (EXIT
                                             (LETT #2#
                                              (CONS
                                               (SPADCALL
                                                (SPADCALL |u| |i|
                                                 (QREFELT $ 32))
                                                (SPADCALL |v| |j|
                                                 (QREFELT $ 32))
                                                (QREFELT $ 27))
                                               #2#) . #4#)))
                                           (LETT |i| (+ |i| 1) . #4#)
                                           #6=(GO G190) G191
                                           (EXIT (NREVERSE0 #2#))))
                                        #0#) . #4#)))
                      (LETT |j| (+ |j| 1) . #4#) #6# G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 36)))))) 

(DEFUN |VECTCAT-;cross;3S;10| (|u| |v| $)
  (SEQ (COND
         ((EQL (SPADCALL |u| (QREFELT $ 9)) 3)
          (COND
            ((NULL (EQL (SPADCALL |v| (QREFELT $ 9)) 3))
             (EXIT (|error| "Vectors must be of length 3")))))
         ('T (EXIT (|error| "Vectors must be of length 3"))))
       (EXIT (SPADCALL
                 (LIST (SPADCALL
                           (SPADCALL (SPADCALL |u| 2 (QREFELT $ 32))
                               (SPADCALL |v| 3 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (SPADCALL (SPADCALL |u| 3 (QREFELT $ 32))
                               (SPADCALL |v| 2 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (QREFELT $ 38))
                       (SPADCALL
                           (SPADCALL (SPADCALL |u| 3 (QREFELT $ 32))
                               (SPADCALL |v| 1 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (SPADCALL (SPADCALL |u| 1 (QREFELT $ 32))
                               (SPADCALL |v| 3 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (QREFELT $ 38))
                       (SPADCALL
                           (SPADCALL (SPADCALL |u| 1 (QREFELT $ 32))
                               (SPADCALL |v| 2 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (SPADCALL (SPADCALL |u| 2 (QREFELT $ 32))
                               (SPADCALL |v| 1 (QREFELT $ 32))
                               (QREFELT $ 27))
                           (QREFELT $ 38)))
                 (QREFELT $ 41))))) 

(DEFUN |VECTCAT-;length;SR;11| (|p| $)
  (SPADCALL (SPADCALL |p| |p| (QREFELT $ 43)) (QREFELT $ 44))) 

(DEFUN |VECTCAT-;magnitude;SR;12| (|p| $)
  (SPADCALL (SPADCALL |p| |p| (QREFELT $ 43)) (QREFELT $ 44))) 

(DEFUN |VectorCategory&| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|VectorCategory&|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$| (LIST '|VectorCategory&| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 47) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#2| '(|RadicalCategory|))
                            (|HasCategory| |#2| '(|Ring|))
                            (|HasCategory| |#2| '(|Monoid|))
                            (|HasCategory| |#2| '(|AbelianGroup|))
                            (|HasCategory| |#2| '(|AbelianMonoid|))
                            (|HasCategory| |#2| '(|AbelianSemiGroup|)))) . #0#))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (COND
          ((|testBitVector| |pv$| 6)
           (QSETREFV $ 13
               (CONS (|dispatchFunction| |VECTCAT-;+;3S;1|) $))))
        (COND
          ((|testBitVector| |pv$| 5)
           (QSETREFV $ 16
               (CONS (|dispatchFunction| |VECTCAT-;zero;NniS;2|) $))))
        (COND
          ((|testBitVector| |pv$| 4)
           (PROGN
             (QSETREFV $ 20
                 (CONS (|dispatchFunction| |VECTCAT-;-;2S;3|) $))
             (QSETREFV $ 23
                 (CONS (|dispatchFunction| |VECTCAT-;*;I2S;4|) $))
             (QSETREFV $ 26
                 (CONS (|dispatchFunction| |VECTCAT-;-;3S;5|) $)))))
        (COND
          ((|testBitVector| |pv$| 3)
           (PROGN
             (QSETREFV $ 28
                 (CONS (|dispatchFunction| |VECTCAT-;*;SRS;6|) $))
             (QSETREFV $ 29
                 (CONS (|dispatchFunction| |VECTCAT-;*;R2S;7|) $)))))
        (COND
          ((|testBitVector| |pv$| 2)
           (PROGN
             (QSETREFV $ 33
                 (CONS (|dispatchFunction| |VECTCAT-;dot;2SR;8|) $))
             (QSETREFV $ 37
                 (CONS (|dispatchFunction|
                           |VECTCAT-;outerProduct;2SM;9|)
                       $))
             (QSETREFV $ 42
                 (CONS (|dispatchFunction| |VECTCAT-;cross;3S;10|) $)))))
        (COND
          ((|testBitVector| |pv$| 1)
           (COND
             ((|testBitVector| |pv$| 2)
              (PROGN
                (QSETREFV $ 45
                    (CONS (|dispatchFunction| |VECTCAT-;length;SR;11|)
                          $))
                (QSETREFV $ 46
                    (CONS (|dispatchFunction|
                              |VECTCAT-;magnitude;SR;12|)
                          $)))))))
        $)))) 

(MAKEPROP '|VectorCategory&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|NonNegativeInteger|) (0 . |#|) (5 . +) (|Mapping| 7 7 7)
             (11 . |map|) (18 . +) (24 . |Zero|) (28 . |new|)
             (34 . |zero|) (39 . -) (|Mapping| 7 7) (44 . |map|)
             (50 . -) (|Integer|) (55 . *) (61 . *) (67 . -) (72 . +)
             (78 . -) (84 . *) (90 . *) (96 . *) (102 . |minIndex|)
             (107 . |maxIndex|) (112 . |qelt|) (118 . |dot|)
             (|List| 40) (|Matrix| 7) (124 . |matrix|)
             (129 . |outerProduct|) (135 . -) (141 . |One|) (|List| 7)
             (145 . |construct|) (150 . |cross|) (156 . |dot|)
             (162 . |sqrt|) (167 . |length|) (172 . |magnitude|))
          '#(|zero| 177 |outerProduct| 182 |magnitude| 188 |length| 193
             |dot| 198 |cross| 204 - 210 + 221 * 227)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 46
                                '(1 6 8 0 9 2 7 0 0 0 10 3 6 0 11 0 0
                                  12 2 0 0 0 0 13 0 7 0 14 2 6 0 8 7 15
                                  1 0 0 8 16 1 7 0 0 17 2 6 0 18 0 19 1
                                  0 0 0 20 2 7 0 21 0 22 2 0 0 21 0 23
                                  1 6 0 0 24 2 6 0 0 0 25 2 0 0 0 0 26
                                  2 7 0 0 0 27 2 0 0 0 7 28 2 0 0 7 0
                                  29 1 6 21 0 30 1 6 21 0 31 2 6 7 0 21
                                  32 2 0 7 0 0 33 1 35 0 34 36 2 0 35 0
                                  0 37 2 7 0 0 0 38 0 7 0 39 1 6 0 40
                                  41 2 0 0 0 0 42 2 6 7 0 0 43 1 7 0 0
                                  44 1 0 7 0 45 1 0 7 0 46 1 0 0 8 16 2
                                  0 35 0 0 37 1 0 7 0 46 1 0 7 0 45 2 0
                                  7 0 0 33 2 0 0 0 0 42 2 0 0 0 0 26 1
                                  0 0 0 20 2 0 0 0 0 13 2 0 0 0 7 28 2
                                  0 0 7 0 29 2 0 0 21 0 23)))))
          '|lookupComplete|)) 
