
(/VERSIONCHECK 2) 

(DEFPARAMETER |FreeLieAlgebra;CAT| 'NIL) 

(DEFPARAMETER |FreeLieAlgebra;AL| 'NIL) 

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

(DEFUN |FreeLieAlgebra;| (|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
                         (|FreeLieAlgebra;CAT|)
                         ('T
                          (LETT |FreeLieAlgebra;CAT|
                                (|Join| (|LieAlgebra| '|t#2|)
                                        (|mkCategory| '|domain|
                                         '(((|coef|
                                             (|t#2|
                                              (|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              $))
                                            T)
                                           ((|coerce| ($ |t#1|)) T)
                                           ((|coerce|
                                             ((|XDistributedPolynomial|
                                               |t#1| |t#2|)
                                              $))
                                            T)
                                           ((|coerce|
                                             ((|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              $))
                                            T)
                                           ((|degree|
                                             ((|NonNegativeInteger|) $))
                                            T)
                                           ((|lquo|
                                             ((|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              (|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              $))
                                            T)
                                           ((|rquo|
                                             ((|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              (|XRecursivePolynomial|
                                               |t#1| |t#2|)
                                              $))
                                            T)
                                           ((|LiePoly|
                                             ($ (|LyndonWord| |t#1|)))
                                            T)
                                           ((|mirror| ($ $)) T)
                                           ((|trunc|
                                             ($ $
                                              (|NonNegativeInteger|)))
                                            T)
                                           ((|varList|
                                             ((|List| |t#1|) $))
                                            T)
                                           ((|eval| ($ $ |t#1| $)) T)
                                           ((|eval|
                                             ($ $ (|List| |t#1|)
                                              (|List| $)))
                                            T))
                                         NIL
                                         '((|List| |t#1|) (|List| $)
                                           (|NonNegativeInteger|)
                                           (|LyndonWord| |t#1|)
                                           (|XRecursivePolynomial|
                                            |t#1| |t#2|)
                                           (|XDistributedPolynomial|
                                            |t#1| |t#2|))
                                         NIL))
                                . #1=(|FreeLieAlgebra|))))) . #1#)
        (SETELT #0# 0
                (LIST '|FreeLieAlgebra| (|devaluate| |t#1|)
                      (|devaluate| |t#2|))))))) 
