
(/VERSIONCHECK 2) 

(DEFUN |PRODUCT;coerce;$Of;1| (|x| $)
  (SPADCALL
      (LIST (SPADCALL (QCAR |x|) (QREFELT $ 10))
            (SPADCALL (QCDR |x|) (QREFELT $ 11)))
      (QREFELT $ 13))) 

(DEFUN |PRODUCT;=;2$B;2| (|x| |y| $)
  (COND
    ((SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 16))
     (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 17)))
    ('T 'NIL))) 

(PUT '|PRODUCT;makeprod;AB$;3| '|SPADreplace| 'CONS) 

(DEFUN |PRODUCT;makeprod;AB$;3| (|a| |b| $) (CONS |a| |b|)) 

(PUT '|PRODUCT;selectfirst;$A;4| '|SPADreplace| 'QCAR) 

(DEFUN |PRODUCT;selectfirst;$A;4| (|x| $) (QCAR |x|)) 

(PUT '|PRODUCT;selectsecond;$B;5| '|SPADreplace| 'QCDR) 

(DEFUN |PRODUCT;selectsecond;$B;5| (|x| $) (QCDR |x|)) 

(DEFUN |PRODUCT;One;$;6| ($)
  (CONS (|spadConstant| $ 22) (|spadConstant| $ 23))) 

(DEFUN |PRODUCT;*;3$;7| (|x| |y| $)
  (CONS (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 25))
        (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 26)))) 

(DEFUN |PRODUCT;**;$Nni$;8| (|x| |p| $)
  (CONS (SPADCALL (QCAR |x|) |p| (QREFELT $ 29))
        (SPADCALL (QCDR |x|) |p| (QREFELT $ 30)))) 

(DEFUN |PRODUCT;size;Nni;9| ($)
  (* (SPADCALL (QREFELT $ 32)) (SPADCALL (QREFELT $ 33)))) 

(DEFUN |PRODUCT;index;Pi$;10| (|n| $)
  (PROG (#0=#:G1831 #1=#:G1832)
    (RETURN
      (CONS (SPADCALL
                (PROG1 (LETT #0#
                             (+ (QUOTIENT2 (- |n| 1)
                                    (SPADCALL (QREFELT $ 33)))
                                1)
                             . #2=(|PRODUCT;index;Pi$;10|))
                  (|check-subtype| (> #0# 0) '(|PositiveInteger|) #0#))
                (QREFELT $ 36))
            (SPADCALL
                (PROG1 (LETT #1#
                             (+ (REMAINDER2 (- |n| 1)
                                    (SPADCALL (QREFELT $ 33)))
                                1) . #2#)
                  (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))
                (QREFELT $ 37)))))) 

(DEFUN |PRODUCT;random;$;11| ($)
  (CONS (SPADCALL (QREFELT $ 39)) (SPADCALL (QREFELT $ 40)))) 

(DEFUN |PRODUCT;lookup;$Pi;12| (|x| $)
  (PROG (#0=#:G1836)
    (RETURN
      (PROG1 (LETT #0#
                   (+ (* (- (SPADCALL (QCAR |x|) (QREFELT $ 42)) 1)
                         (SPADCALL (QREFELT $ 33)))
                      (SPADCALL (QCDR |x|) (QREFELT $ 43)))
                   |PRODUCT;lookup;$Pi;12|)
        (|check-subtype| (> #0# 0) '(|PositiveInteger|) #0#))))) 

(DEFUN |PRODUCT;hash;$Si;13| (|x| $)
  (|hashCombine| (SPADCALL (QCAR |x|) (QREFELT $ 46))
      (SPADCALL (QCDR |x|) (QREFELT $ 47)))) 

(DEFUN |PRODUCT;inv;2$;14| (|x| $)
  (CONS (SPADCALL (QCAR |x|) (QREFELT $ 49))
        (SPADCALL (QCDR |x|) (QREFELT $ 50)))) 

(DEFUN |PRODUCT;Zero;$;15| ($)
  (CONS (|spadConstant| $ 52) (|spadConstant| $ 53))) 

(DEFUN |PRODUCT;+;3$;16| (|x| |y| $)
  (CONS (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 55))
        (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 56)))) 

(DEFUN |PRODUCT;*;Nni2$;17| (|c| |x| $)
  (CONS (SPADCALL |c| (QCAR |x|) (QREFELT $ 58))
        (SPADCALL |c| (QCDR |x|) (QREFELT $ 59)))) 

(DEFUN |PRODUCT;subtractIfCan;2$U;18| (|x| |y| $)
  (PROG (|na| |nb|)
    (RETURN
      (SEQ (LETT |na| (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 62))
                 . #0=(|PRODUCT;subtractIfCan;2$U;18|))
           (EXIT (COND
                   ((QEQCAR |na| 1) (CONS 1 "failed"))
                   (#1='T
                    (SEQ (LETT |nb|
                               (SPADCALL (QCDR |x|) (QCDR |y|)
                                   (QREFELT $ 63)) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |nb| 1) (CONS 1 "failed"))
                                 (#1#
                                  (CONS 0
                                        (CONS (QCDR |na|) (QCDR |nb|)))))))))))))) 

(DEFUN |PRODUCT;-;2$;19| (|x| $)
  (CONS (SPADCALL (QCAR |x|) (QREFELT $ 65))
        (SPADCALL (QCDR |x|) (QREFELT $ 66)))) 

(DEFUN |PRODUCT;-;3$;20| (|x| |y| $)
  (CONS (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 68))
        (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 69)))) 

(DEFUN |PRODUCT;*;I2$;21| (|d| |x| $)
  (CONS (SPADCALL |d| (QCAR |x|) (QREFELT $ 72))
        (SPADCALL |d| (QCDR |x|) (QREFELT $ 73)))) 

(DEFUN |PRODUCT;sup;3$;22| (|x| |y| $)
  (CONS (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 75))
        (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 76)))) 

(DEFUN |PRODUCT;<;2$B;23| (|x| |y| $)
  (PROG (|xa| |ya| |xb| |yb|)
    (RETURN
      (SEQ (LETT |xa| (QCAR |x|) . #0=(|PRODUCT;<;2$B;23|))
           (LETT |ya| (QCAR |y|) . #0#)
           (EXIT (COND
                   ((SPADCALL |xa| |ya| (QREFELT $ 78)) 'T)
                   (#1='T
                    (SEQ (LETT |xb| (QCDR |x|) . #0#)
                         (LETT |yb| (QCDR |y|) . #0#)
                         (EXIT (COND
                                 ((SPADCALL |xa| |ya| (QREFELT $ 16))
                                  (SPADCALL |xb| |yb| (QREFELT $ 79)))
                                 (#1# 'NIL))))))))))) 

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

(DEFUN |Product;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ #0=#:G1869 #1=#:G1868 #2=#:G1867 |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #3=(|Product|))
        (LETT DV$2 (|devaluate| |#2|) . #3#)
        (LETT |dv$| (LIST '|Product| DV$1 DV$2) . #3#)
        (LETT $ (GETREFV 82) . #3#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (AND (|HasCategory| |#1|
                                     '(|OrderedAbelianMonoidSup|))
                                 (|HasCategory| |#2|
                                     '(|OrderedAbelianMonoidSup|)))
                            (AND (|HasCategory| |#1| '(|AbelianGroup|))
                                 (|HasCategory| |#2| '(|AbelianGroup|)))
                            (AND (|HasCategory| |#1| '(|Group|))
                                 (|HasCategory| |#2| '(|Group|)))
                            (AND (|HasCategory| |#1| '(|Finite|))
                                 (|HasCategory| |#2| '(|Finite|)))
                            (LETT #0#
                                  (AND (|HasCategory| |#1| '(|Monoid|))
                                       (|HasCategory| |#2| '(|Monoid|))) . #3#)
                            (OR (AND (|HasCategory| |#1| '(|Group|))
                                     (|HasCategory| |#2| '(|Group|)))
                                #0#)
                            (AND (|HasCategory| |#1|
                                     '(|AbelianMonoid|))
                                 (|HasCategory| |#2|
                                     '(|AbelianMonoid|)))
                            (LETT #1#
                                  (AND (|HasCategory| |#1|
                                        '(|CancellationAbelianMonoid|))
                                       (|HasCategory| |#2|
                                        '(|CancellationAbelianMonoid|))) . #3#)
                            (OR (AND (|HasCategory| |#1|
                                      '(|AbelianGroup|))
                                     (|HasCategory| |#2|
                                      '(|AbelianGroup|)))
                                #1#
                                (AND (|HasCategory| |#1|
                                      '(|OrderedAbelianMonoidSup|))
                                     (|HasCategory| |#2|
                                      '(|OrderedAbelianMonoidSup|))))
                            (OR (AND (|HasCategory| |#1|
                                      '(|AbelianGroup|))
                                     (|HasCategory| |#2|
                                      '(|AbelianGroup|)))
                                (AND (|HasCategory| |#1|
                                      '(|AbelianMonoid|))
                                     (|HasCategory| |#2|
                                      '(|AbelianMonoid|)))
                                #1#
                                (AND (|HasCategory| |#1|
                                      '(|OrderedAbelianMonoidSup|))
                                     (|HasCategory| |#2|
                                      '(|OrderedAbelianMonoidSup|))))
                            (OR (AND (|HasCategory| |#1|
                                      '(|AbelianGroup|))
                                     (|HasCategory| |#2|
                                      '(|AbelianGroup|)))
                                (AND (|HasCategory| |#1|
                                      '(|AbelianMonoid|))
                                     (|HasCategory| |#2|
                                      '(|AbelianMonoid|)))
                                #1#
                                (AND (|HasCategory| |#1| '(|Group|))
                                     (|HasCategory| |#2| '(|Group|)))
                                #0#
                                (AND (|HasCategory| |#1|
                                      '(|OrderedAbelianMonoidSup|))
                                     (|HasCategory| |#2|
                                      '(|OrderedAbelianMonoidSup|))))
                            (LETT #2#
                                  (AND (|HasCategory| |#1|
                                        '(|OrderedSet|))
                                       (|HasCategory| |#2|
                                        '(|OrderedSet|))) . #3#)
                            (OR (AND (|HasCategory| |#1|
                                      '(|OrderedAbelianMonoidSup|))
                                     (|HasCategory| |#2|
                                      '(|OrderedAbelianMonoidSup|)))
                                #2#))) . #3#))
        (|haddProp| |$ConstructorCache| '|Product| (LIST DV$1 DV$2)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 (|Record| (|:| |acomp| |#1|) (|:| |bcomp| |#2|)))
        (COND
          ((|HasCategory| |#1| '(|Monoid|))
           (COND
             ((|HasCategory| |#2| '(|Monoid|))
              (PROGN
                (QSETREFV $ 24
                    (CONS IDENTITY
                          (FUNCALL (|dispatchFunction|
                                    |PRODUCT;One;$;6|)
                                   $)))
                (QSETREFV $ 27
                    (CONS (|dispatchFunction| |PRODUCT;*;3$;7|) $))
                (QSETREFV $ 31
                    (CONS (|dispatchFunction| |PRODUCT;**;$Nni$;8|) $)))))))
        (COND
          ((|HasCategory| |#1| '(|Finite|))
           (COND
             ((|HasCategory| |#2| '(|Finite|))
              (PROGN
                (QSETREFV $ 34
                    (CONS (|dispatchFunction| |PRODUCT;size;Nni;9|) $))
                (QSETREFV $ 38
                    (CONS (|dispatchFunction| |PRODUCT;index;Pi$;10|)
                          $))
                (QSETREFV $ 41
                    (CONS (|dispatchFunction| |PRODUCT;random;$;11|) $))
                (QSETREFV $ 44
                    (CONS (|dispatchFunction| |PRODUCT;lookup;$Pi;12|)
                          $))
                (QSETREFV $ 48
                    (CONS (|dispatchFunction| |PRODUCT;hash;$Si;13|) $)))))))
        (COND
          ((|HasCategory| |#1| '(|Group|))
           (COND
             ((|HasCategory| |#2| '(|Group|))
              (QSETREFV $ 51
                  (CONS (|dispatchFunction| |PRODUCT;inv;2$;14|) $))))))
        (COND
          ((|HasCategory| |#1| '(|AbelianMonoid|))
           (COND
             ((|HasCategory| |#2| '(|AbelianMonoid|))
              (PROGN
                (QSETREFV $ 54
                    (CONS IDENTITY
                          (FUNCALL (|dispatchFunction|
                                    |PRODUCT;Zero;$;15|)
                                   $)))
                (QSETREFV $ 57
                    (CONS (|dispatchFunction| |PRODUCT;+;3$;16|) $))
                (QSETREFV $ 60
                    (CONS (|dispatchFunction| |PRODUCT;*;Nni2$;17|) $)))))))
        (COND
          ((|HasCategory| |#1| '(|CancellationAbelianMonoid|))
           (COND
             ((|HasCategory| |#2| '(|CancellationAbelianMonoid|))
              (QSETREFV $ 64
                  (CONS (|dispatchFunction|
                            |PRODUCT;subtractIfCan;2$U;18|)
                        $))))))
        (COND
          ((|HasCategory| |#1| '(|AbelianGroup|))
           (COND
             ((|HasCategory| |#2| '(|AbelianGroup|))
              (PROGN
                (QSETREFV $ 67
                    (CONS (|dispatchFunction| |PRODUCT;-;2$;19|) $))
                (QSETREFV $ 70
                    (CONS (|dispatchFunction| |PRODUCT;-;3$;20|) $))
                (QSETREFV $ 74
                    (CONS (|dispatchFunction| |PRODUCT;*;I2$;21|) $)))))))
        (COND
          ((|HasCategory| |#1| '(|OrderedAbelianMonoidSup|))
           (COND
             ((|HasCategory| |#2| '(|OrderedAbelianMonoidSup|))
              (QSETREFV $ 77
                  (CONS (|dispatchFunction| |PRODUCT;sup;3$;22|) $))))))
        (COND
          ((|HasCategory| |#1| '(|OrderedSet|))
           (COND
             ((|HasCategory| |#2| '(|OrderedSet|))
              (QSETREFV $ 80
                  (CONS (|dispatchFunction| |PRODUCT;<;2$B;23|) $))))))
        $)))) 

(MAKEPROP '|Product| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             '|Rep| (|OutputForm|) (0 . |coerce|) (5 . |coerce|)
             (|List| $) (10 . |paren|) |PRODUCT;coerce;$Of;1|
             (|Boolean|) (15 . =) (21 . =) |PRODUCT;=;2$B;2|
             |PRODUCT;makeprod;AB$;3| |PRODUCT;selectfirst;$A;4|
             |PRODUCT;selectsecond;$B;5| (27 . |One|) (31 . |One|)
             (35 . |One|) (39 . *) (45 . *) (51 . *)
             (|NonNegativeInteger|) (57 . **) (63 . **) (69 . **)
             (75 . |size|) (79 . |size|) (83 . |size|)
             (|PositiveInteger|) (87 . |index|) (92 . |index|)
             (97 . |index|) (102 . |random|) (106 . |random|)
             (110 . |random|) (114 . |lookup|) (119 . |lookup|)
             (124 . |lookup|) (|SingleInteger|) (129 . |hash|)
             (134 . |hash|) (139 . |hash|) (144 . |inv|) (149 . |inv|)
             (154 . |inv|) (159 . |Zero|) (163 . |Zero|) (167 . |Zero|)
             (171 . +) (177 . +) (183 . +) (189 . *) (195 . *)
             (201 . *) (|Union| $ '"failed") (207 . |subtractIfCan|)
             (213 . |subtractIfCan|) (219 . |subtractIfCan|) (225 . -)
             (230 . -) (235 . -) (240 . -) (246 . -) (252 . -)
             (|Integer|) (258 . *) (264 . *) (270 . *) (276 . |sup|)
             (282 . |sup|) (288 . |sup|) (294 . <) (300 . <) (306 . <)
             (|String|))
          '#(~= 312 |zero?| 318 |sup| 323 |subtractIfCan| 329 |size|
             335 |selectsecond| 339 |selectfirst| 344 |sample| 349
             |recip| 353 |random| 358 |one?| 362 |min| 367 |max| 373
             |makeprod| 379 |lookup| 385 |latex| 390 |inv| 395 |index|
             400 |hash| 405 |enumerate| 410 |conjugate| 414
             |commutator| 420 |coerce| 426 ^ 431 |Zero| 449 |One| 453
             >= 457 > 463 = 469 <= 475 < 481 / 487 - 493 + 504 ** 510 *
             528)
          'NIL
          (CONS (|makeByteWordVec2| 13
                    '(1 1 2 1 9 3 1 10 6 13 10 6 4 0 0 0 3))
                (CONS '#(NIL NIL |AbelianGroup&| NIL NIL |Group&| NIL
                         |AbelianMonoid&| |Monoid&| |OrderedSet&|
                         |AbelianSemiGroup&| |SemiGroup&| |Finite&|
                         |SetCategory&| |BasicType&| NIL NIL)
                      (CONS '#((|OrderedAbelianMonoidSup|)
                               (|OrderedCancellationAbelianMonoid|)
                               (|AbelianGroup|)
                               (|OrderedAbelianMonoid|)
                               (|CancellationAbelianMonoid|) (|Group|)
                               (|OrderedAbelianSemiGroup|)
                               (|AbelianMonoid|) (|Monoid|)
                               (|OrderedSet|) (|AbelianSemiGroup|)
                               (|SemiGroup|) (|Finite|) (|SetCategory|)
                               (|BasicType|) (|CoercibleTo| 9)
                               (|unitsKnown|))
                            (|makeByteWordVec2| 81
                                '(1 6 9 0 10 1 7 9 0 11 1 9 0 12 13 2 6
                                  15 0 0 16 2 7 15 0 0 17 0 6 0 22 0 7
                                  0 23 0 0 0 24 2 6 0 0 0 25 2 7 0 0 0
                                  26 2 0 0 0 0 27 2 6 0 0 28 29 2 7 0 0
                                  28 30 2 0 0 0 28 31 0 6 28 32 0 7 28
                                  33 0 0 28 34 1 6 0 35 36 1 7 0 35 37
                                  1 0 0 35 38 0 6 0 39 0 7 0 40 0 0 0
                                  41 1 6 35 0 42 1 7 35 0 43 1 0 35 0
                                  44 1 6 45 0 46 1 7 45 0 47 1 0 45 0
                                  48 1 6 0 0 49 1 7 0 0 50 1 0 0 0 51 0
                                  6 0 52 0 7 0 53 0 0 0 54 2 6 0 0 0 55
                                  2 7 0 0 0 56 2 0 0 0 0 57 2 6 0 28 0
                                  58 2 7 0 28 0 59 2 0 0 28 0 60 2 6 61
                                  0 0 62 2 7 61 0 0 63 2 0 61 0 0 64 1
                                  6 0 0 65 1 7 0 0 66 1 0 0 0 67 2 6 0
                                  0 0 68 2 7 0 0 0 69 2 0 0 0 0 70 2 6
                                  0 71 0 72 2 7 0 71 0 73 2 0 0 71 0 74
                                  2 6 0 0 0 75 2 7 0 0 0 76 2 0 0 0 0
                                  77 2 6 15 0 0 78 2 7 15 0 0 79 2 0 15
                                  0 0 80 2 0 15 0 0 1 1 10 15 0 1 2 1 0
                                  0 0 77 2 9 61 0 0 64 0 4 28 34 1 0 7
                                  0 21 1 0 6 0 20 0 11 0 1 1 6 61 0 1 0
                                  4 0 41 1 6 15 0 1 2 13 0 0 0 1 2 13 0
                                  0 0 1 2 0 0 6 7 19 1 4 35 0 44 1 0 81
                                  0 1 1 3 0 0 51 1 4 0 35 38 1 0 45 0
                                  48 0 4 12 1 2 3 0 0 0 1 2 3 0 0 0 1 1
                                  0 9 0 14 2 3 0 0 71 1 2 6 0 0 35 1 2
                                  6 0 0 28 1 0 10 0 54 0 6 0 24 2 13 15
                                  0 0 1 2 13 15 0 0 1 2 0 15 0 0 18 2
                                  13 15 0 0 1 2 13 15 0 0 80 2 3 0 0 0
                                  1 1 2 0 0 67 2 2 0 0 0 70 2 10 0 0 0
                                  57 2 3 0 0 71 1 2 6 0 0 35 1 2 6 0 0
                                  28 31 2 2 0 71 0 74 2 10 0 35 0 1 2
                                  10 0 28 0 60 2 6 0 0 0 27)))))
          '|lookupComplete|)) 
