
(/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 (ELT $ 17) |u| (QREFELT $ 19))) 

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

(DEFUN |VECTCAT-;*;I2S;4!0| (|x| $$)
  (PROG (|n| $)
    (LETT |n| (QREFELT $$ 1) . #1=(|VECTCAT-;*;I2S;4|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |n| |x| (QREFELT $ 22)))))) 

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

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

(DEFUN |VECTCAT-;*;SRS;6!0| (|x| $$)
  (PROG (|r| $)
    (LETT |r| (QREFELT $$ 1) . #1=(|VECTCAT-;*;SRS;6|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |x| |r| (QREFELT $ 27)))))) 

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

(DEFUN |VECTCAT-;*;R2S;7!0| (|x| $$)
  (PROG (|r| $)
    (LETT |r| (QREFELT $$ 1) . #1=(|VECTCAT-;*;R2S;7|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |r| |x| (QREFELT $ 27)))))) 

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

(DEFUN |VECTCAT-;outerProduct;2SM;9| (|u| |v| $)
  (PROG (#1=#:G10522 |i| #2=#:G10521 #3=#:G10520 |j| #4=#:G10519)
    (RETURN
     (SEQ
      (SPADCALL
       (PROGN
        (LETT #4# NIL . #5=(|VECTCAT-;outerProduct;2SM;9|))
        (SEQ (LETT |j| (SPADCALL |v| (QREFELT $ 30)) . #5#)
             (LETT #3# (SPADCALL |v| (QREFELT $ 31)) . #5#) G190
             (COND ((> |j| #3#) #6=(GO G191)))
             (SEQ
              (EXIT
               (LETT #4#
                     (CONS
                      (PROGN
                       (LETT #2# NIL . #5#)
                       (SEQ (LETT |i| (SPADCALL |u| (QREFELT $ 30)) . #5#)
                            (LETT #1# (SPADCALL |u| (QREFELT $ 31)) . #5#) G190
                            (COND ((> |i| #1#) #6#))
                            (SEQ
                             (EXIT
                              (LETT #2#
                                    (CONS
                                     (SPADCALL
                                      (SPADCALL |u| |i| (QREFELT $ 32))
                                      (SPADCALL |v| |j| (QREFELT $ 32))
                                      (QREFELT $ 27))
                                     #2#)
                                    . #5#)))
                            (LETT |i| (+ |i| 1) . #5#) #7=(GO G190) G191
                            (EXIT (NREVERSE0 #2#))))
                      #4#)
                     . #5#)))
             (LETT |j| (+ |j| 1) . #5#) #7# G191 (EXIT (NREVERSE0 #4#))))
       (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| #1="Vectors must be of length 3")))))
    ('T (EXIT (|error| #1#))))
   (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 (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|VectorCategory&|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|VectorCategory&| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 47) . #1#)
      (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|))))
                      . #1#))
      (|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|)) 
