
(/VERSIONCHECK 2) 

(DEFPARAMETER |FreeModuleCat;CAT| 'NIL) 

(DEFPARAMETER |FreeModuleCat;AL| 'NIL) 

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

(DEFUN |FreeModuleCat;| (|t#1| |t#2|)
  (PROG (#0=#:G1816)
    (RETURN
      (PROG1 (LETT #0#
                   (|sublisV|
                       (PAIR '(|t#1| |t#2|)
                             (LIST (|devaluate| |t#1|)
                                   (|devaluate| |t#2|)))
                       (COND
                         (|FreeModuleCat;CAT|)
                         ('T
                          (LETT |FreeModuleCat;CAT|
                                (|Join| (|BiModule| '|t#1| '|t#1|)
                                        (|RetractableTo| '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((* ($ |t#1| |t#2|)) T)
                                           ((|coefficient|
                                             (|t#1| $ |t#2|))
                                            T)
                                           ((|map|
                                             ($ (|Mapping| |t#1| |t#1|)
                                              $))
                                            T)
                                           ((|monom| ($ |t#2| |t#1|))
                                            T)
                                           ((|monomial?|
                                             ((|Boolean|) $))
                                            T)
                                           ((|ListOfTerms|
                                             ((|List|
                                               (|Record|
                                                (|:| |k| |t#2|)
                                                (|:| |c| |t#1|)))
                                              $))
                                            T)
                                           ((|coefficients|
                                             ((|List| |t#1|) $))
                                            T)
                                           ((|monomials|
                                             ((|List| $) $))
                                            T)
                                           ((|numberOfMonomials|
                                             ((|NonNegativeInteger|) $))
                                            T)
                                           ((|leadingMonomial|
                                             (|t#2| $))
                                            T)
                                           ((|leadingCoefficient|
                                             (|t#1| $))
                                            T)
                                           ((|leadingTerm|
                                             ((|Record| (|:| |k| |t#2|)
                                               (|:| |c| |t#1|))
                                              $))
                                            T)
                                           ((|reductum| ($ $)) T))
                                         '(((|Module| |t#1|)
                                            (|has| |t#1|
                                             (|CommutativeRing|))))
                                         '((|NonNegativeInteger|)
                                           (|List| $) (|List| |t#1|)
                                           (|List|
                                            (|Record| (|:| |k| |t#2|)
                                             (|:| |c| |t#1|)))
                                           (|Boolean|))
                                         NIL))
                                . #1=(|FreeModuleCat|))))) . #1#)
        (SETELT #0# 0
                (LIST '|FreeModuleCat| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
