
(/VERSIONCHECK 2) 

(DEFPARAMETER |PowerSeriesCategory;CAT| 'NIL) 

(DEFPARAMETER |PowerSeriesCategory;AL| 'NIL) 

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

(DEFUN |PowerSeriesCategory;| (|t#1| |t#2| |t#3|)
  (PROG (#0=#:G1821)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2| |t#3|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)
                                   (|devaluate| |t#3|)))
                       (COND
                         (|PowerSeriesCategory;CAT|)
                         ('T
                          (LETT |PowerSeriesCategory;CAT|
                                (|Join| (|AbelianMonoidRing| '|t#1|
                                         '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((|monomial|
                                             ($ $ |t#3| |t#2|))
                                            T)
                                           ((|monomial|
                                             ($ $ (|List| |t#3|)
                                              (|List| |t#2|)))
                                            T)
                                           ((|leadingMonomial| ($ $))
                                            T)
                                           ((|leadingCoefficient|
                                             (|t#1| $))
                                            T)
                                           ((|degree| (|t#2| $)) T)
                                           ((|variables|
                                             ((|List| |t#3|) $))
                                            T)
                                           ((|pole?| ((|Boolean|) $))
                                            T)
                                           ((|complete| ($ $)) T))
                                         NIL
                                         '((|Boolean|) (|List| |t#3|)
                                           (|List| |t#2|))
                                         NIL))
                                . #1=(|PowerSeriesCategory|))))) . #1#)
        (SETELT #0# 0
                (LIST '|PowerSeriesCategory| (|devaluate| |t#1|)
                      (|devaluate| |t#2|) (|devaluate| |t#3|))))))) 
