
(/VERSIONCHECK 2) 

(DEFPARAMETER |FiniteAbelianMonoidRing;CAT| 'NIL) 

(DEFPARAMETER |FiniteAbelianMonoidRing;AL| 'NIL) 

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

(DEFUN |FiniteAbelianMonoidRing;| (|t#1| |t#2|)
  (PROG (#0=#:G1825)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (COND
                         (|FiniteAbelianMonoidRing;CAT|)
                         ('T
                          (LETT |FiniteAbelianMonoidRing;CAT|
                                (|Join| (|AbelianMonoidRing| '|t#1|
                                         '|t#2|)
                                        (|FullyRetractableTo| '|t#1|)
                                        (|mkCategory| '|domain|
                                         '(((|ground?| ((|Boolean|) $))
                                            T)
                                           ((|ground| (|t#1| $)) T)
                                           ((|coefficients|
                                             ((|List| |t#1|) $))
                                            T)
                                           ((|numberOfMonomials|
                                             ((|NonNegativeInteger|) $))
                                            T)
                                           ((|minimumDegree| (|t#2| $))
                                            T)
                                           ((|mapExponents|
                                             ($ (|Mapping| |t#2| |t#2|)
                                              $))
                                            T)
                                           ((|pomopo!|
                                             ($ $ |t#1| |t#2| $))
                                            T)
                                           ((|binomThmExpt|
                                             ($ $ $
                                              (|NonNegativeInteger|)))
                                            (|has| |t#1|
                                             (|CommutativeRing|)))
                                           ((|exquo|
                                             ((|Union| $ "failed") $
                                              |t#1|))
                                            (|has| |t#1|
                                             (|IntegralDomain|)))
                                           ((|content| (|t#1| $))
                                            (|has| |t#1| (|GcdDomain|)))
                                           ((|primitivePart| ($ $))
                                            (|has| |t#1| (|GcdDomain|))))
                                         NIL
                                         '((|NonNegativeInteger|)
                                           (|List| |t#1|) (|Boolean|))
                                         NIL))
                                . #1=(|FiniteAbelianMonoidRing|))))) . #1#)
        (SETELT #0# 0
                (LIST '|FiniteAbelianMonoidRing| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
