
(/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 (#1=#:G678 #2=#:G677)
    (RETURN
     (CONS
      (SPADCALL
       (PROG1
           (LETT #2# (+ (QUOTIENT2 (- |n| 1) (SPADCALL (QREFELT $ 33))) 1)
                 . #3=(|PRODUCT;index;Pi$;10|))
         (|check-subtype| (> #2# 0) '(|PositiveInteger|) #2#))
       (QREFELT $ 36))
      (SPADCALL
       (PROG1
           (LETT #1# (+ (REMAINDER2 (- |n| 1) (SPADCALL (QREFELT $ 33))) 1)
                 . #3#)
         (|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 (#1=#:G682)
    (RETURN
     (PROG1
         (LETT #1#
               (+
                (* (- (SPADCALL (QCAR |x|) (QREFELT $ 42)) 1)
                   (SPADCALL (QREFELT $ 33)))
                (SPADCALL (QCDR |x|) (QREFELT $ 43)))
               |PRODUCT;lookup;$Pi;12|)
       (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))))) 

(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 (|nb| |na|)
    (RETURN
     (SEQ
      (LETT |na| (SPADCALL (QCAR |x|) (QCAR |y|) (QREFELT $ 62))
            . #1=(|PRODUCT;subtractIfCan;2$U;18|))
      (EXIT
       (COND ((QEQCAR |na| 1) (CONS 1 "failed"))
             (#2='T
              (SEQ
               (LETT |nb| (SPADCALL (QCDR |x|) (QCDR |y|) (QREFELT $ 63))
                     . #1#)
               (EXIT
                (COND ((QEQCAR |nb| 1) (CONS 1 "failed"))
                      (#2# (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 (|yb| |xb| |ya| |xa|)
    (RETURN
     (SEQ (LETT |xa| (QCAR |x|) . #1=(|PRODUCT;<;2$B;23|))
          (LETT |ya| (QCAR |y|) . #1#)
          (EXIT
           (COND ((SPADCALL |xa| |ya| (QREFELT $ 78)) 'T)
                 (#2='T
                  (SEQ (LETT |xb| (QCDR |x|) . #1#)
                       (LETT |yb| (QCDR |y|) . #1#)
                       (EXIT
                        (COND
                         ((SPADCALL |xa| |ya| (QREFELT $ 16))
                          (SPADCALL |xb| |yb| (QREFELT $ 79)))
                         (#2# 'NIL))))))))))) 

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

(DEFUN |Product;| (|#1| |#2|)
  (PROG (|pv$| #1=#:G713 #2=#:G714 #3=#:G715 $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #4=(|Product|))
      (LETT DV$2 (|devaluate| |#2|) . #4#)
      (LETT |dv$| (LIST '|Product| DV$1 DV$2) . #4#)
      (LETT $ (GETREFV 82) . #4#)
      (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 #3#
                                                (AND
                                                 (|HasCategory| |#1|
                                                                '(|Monoid|))
                                                 (|HasCategory| |#2|
                                                                '(|Monoid|)))
                                                . #4#)
                                          (OR
                                           (AND (|HasCategory| |#1| '(|Group|))
                                                (|HasCategory| |#2|
                                                               '(|Group|)))
                                           #3#)
                                          (AND
                                           (|HasCategory| |#1|
                                                          '(|AbelianMonoid|))
                                           (|HasCategory| |#2|
                                                          '(|AbelianMonoid|)))
                                          (LETT #2#
                                                (AND
                                                 (|HasCategory| |#1|
                                                                '(|CancellationAbelianMonoid|))
                                                 (|HasCategory| |#2|
                                                                '(|CancellationAbelianMonoid|)))
                                                . #4#)
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|AbelianGroup|))
                                            (|HasCategory| |#2|
                                                           '(|AbelianGroup|)))
                                           #2#
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|OrderedAbelianMonoidSup|))
                                            (|HasCategory| |#2|
                                                           '(|OrderedAbelianMonoidSup|))))
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|AbelianGroup|))
                                            (|HasCategory| |#2|
                                                           '(|AbelianGroup|)))
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|AbelianMonoid|))
                                            (|HasCategory| |#2|
                                                           '(|AbelianMonoid|)))
                                           #2#
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|OrderedAbelianMonoidSup|))
                                            (|HasCategory| |#2|
                                                           '(|OrderedAbelianMonoidSup|))))
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|AbelianGroup|))
                                            (|HasCategory| |#2|
                                                           '(|AbelianGroup|)))
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|AbelianMonoid|))
                                            (|HasCategory| |#2|
                                                           '(|AbelianMonoid|)))
                                           #2#
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|OrderedAbelianMonoidSup|))
                                            (|HasCategory| |#2|
                                                           '(|OrderedAbelianMonoidSup|)))
                                           (AND (|HasCategory| |#1| '(|Group|))
                                                (|HasCategory| |#2|
                                                               '(|Group|)))
                                           #3#)
                                          (LETT #1#
                                                (AND
                                                 (|HasCategory| |#1|
                                                                '(|OrderedSet|))
                                                 (|HasCategory| |#2|
                                                                '(|OrderedSet|)))
                                                . #4#)
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           '(|OrderedAbelianMonoidSup|))
                                            (|HasCategory| |#2|
                                                           '(|OrderedAbelianMonoidSup|)))
                                           #1#)))
                      . #4#))
      (|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 |smaller?| 335
              |size| 341 |selectsecond| 345 |selectfirst| 350 |sample| 355
              |recip| 359 |random| 364 |one?| 368 |min| 373 |max| 379
              |makeprod| 385 |lookup| 391 |latex| 396 |inv| 401 |index| 406
              |hash| 411 |enumerate| 416 |conjugate| 420 |commutator| 426
              |coerce| 432 ^ 437 |Zero| 455 |One| 459 >= 463 > 469 = 475 <= 481
              < 487 / 493 - 499 + 510 * 516)
           'NIL
           (CONS
            (|makeByteWordVec2| 13 '(1 1 1 2 1 9 3 13 10 6 13 10 6 4 0 0 0 3))
            (CONS
             '#(NIL NIL NIL |AbelianGroup&| NIL NIL |Group&| |OrderedSet&|
                |AbelianMonoid&| |Monoid&| NIL |AbelianSemiGroup&| |SemiGroup&|
                |Finite&| |SetCategory&| |BasicType&| NIL NIL)
             (CONS
              '#((|OrderedAbelianMonoidSup|)
                 (|OrderedCancellationAbelianMonoid|) (|OrderedAbelianMonoid|)
                 (|AbelianGroup|) (|OrderedAbelianSemiGroup|)
                 (|CancellationAbelianMonoid|) (|Group|) (|OrderedSet|)
                 (|AbelianMonoid|) (|Monoid|) (|Comparable|)
                 (|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 2 13 15 0 0 1 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 31 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 2 0
                                    71 0 74 2 10 0 35 0 1 2 10 0 28 0 60 2 6 0
                                    0 0 27)))))
           '|lookupComplete|)) 
