
(/VERSIONCHECK 2) 

(DEFPARAMETER |FreeAbelianMonoidCategory;CAT| 'NIL) 

(DEFPARAMETER |FreeAbelianMonoidCategory;AL| 'NIL) 

(DEFUN |FreeAbelianMonoidCategory| (&REST #0=#:G1816)
  (LET (#1=#:G1817)
    (COND
      ((SETQ #1#
             (|assoc| #2=(|devaluateList| #0#)
                      |FreeAbelianMonoidCategory;AL|))
       (CDR #1#))
      (T (SETQ |FreeAbelianMonoidCategory;AL|
               (|cons5| (CONS #2#
                              (SETQ #1#
                                    (APPLY
                                     #'|FreeAbelianMonoidCategory;|
                                     #0#)))
                        |FreeAbelianMonoidCategory;AL|))
         #1#)))) 

(DEFUN |FreeAbelianMonoidCategory;| (|t#1| |t#2|)
  (PROG (#0=#:G1815)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (COND
                         (|FreeAbelianMonoidCategory;CAT|)
                         ('T
                          (LETT |FreeAbelianMonoidCategory;CAT|
                                (|Join| (|CancellationAbelianMonoid|)
                                        (|RetractableTo| '|t#1|)
                                        (|mkCategory| '|domain|
                                         '(((+ ($ |t#1| $)) T)
                                           ((* ($ |t#2| |t#1|)) T)
                                           ((|size|
                                             ((|NonNegativeInteger|) $))
                                            T)
                                           ((|terms|
                                             ((|List|
                                               (|Record|
                                                (|:| |gen| |t#1|)
                                                (|:| |exp| |t#2|)))
                                              $))
                                            T)
                                           ((|nthCoef|
                                             (|t#2| $ (|Integer|)))
                                            T)
                                           ((|nthFactor|
                                             (|t#1| $ (|Integer|)))
                                            T)
                                           ((|coefficient|
                                             (|t#2| |t#1| $))
                                            T)
                                           ((|mapCoef|
                                             ($ (|Mapping| |t#2| |t#2|)
                                              $))
                                            T)
                                           ((|mapGen|
                                             ($ (|Mapping| |t#1| |t#1|)
                                              $))
                                            T)
                                           ((|highCommonTerms| ($ $ $))
                                            (|has| |t#2|
                                             (|OrderedAbelianMonoid|))))
                                         NIL
                                         '((|Integer|)
                                           (|List|
                                            (|Record| (|:| |gen| |t#1|)
                                             (|:| |exp| |t#2|)))
                                           (|NonNegativeInteger|))
                                         NIL))
                                . #1=(|FreeAbelianMonoidCategory|))))) . #1#)
        (SETELT #0# 0
                (LIST '|FreeAbelianMonoidCategory| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
