This is GradedLieAlgebras.info, produced by Macaulay2, version 1.21

GradedLieAlgebras -- a package for doing computations in graded Lie algebras
****************************************************************************

Description
===========

This package provides routines for doing computations in graded Lie algebras.

The package relies on algorithmic theory on graded Lie algebras developed by
Clas Löfwall and Jan-Erik Roos in A Nonnilpotent 1-2-Presented Graded Hopf
Algebra Whose Hilbert Series Converges in the Unit Circle, Adv. Math. 130
(1997), no. 2, 161–200.

See

  * First Lie algebra tutorial
  * Second Lie algebra tutorial
  * Differential Lie algebra tutorial
  * Homomorphisms and derivations
  * Quotient Lie algebras and subspaces
  * Minimal models, Ext-algebras and Koszul duals
  * Holonomy Lie algebras and symmetries

for some illustrations of ways to use this package.

Caveat
======

Computations with squares in characteristic 2 is not supported in the current
version.

Authors
=======

  * Clas Löfwall <clas.lofwall@gmail.com>
  * Samuel Lundqvist <samuel@math.su.se>

Certification a gold star
=========================

Version 3.0 of this package was accepted for publication in volume 11 (see
https://msp.org/jsag/2021/11-1/ ) of The Journal of Software for Algebra and
Geometry (see http://j-sag.org/ ) on 28 August 2020, in the article Software
for doing computations in graded Lie algebras (see
https://msp.org/jsag/2021/11-1/p02.xhtml ). That version can be obtained from
the journal (see  ) or from the Macaulay2 source code repository (see
http://github.com/Macaulay2/M2/blob/f0a30a45ffbd70f81cc7b5dece281162b4919fdf/M2
/Macaulay2/packages/GradedLieAlgebras.m2 ).

Version
=======

This documentation describes version 3.0 of GradedLieAlgebras.

Source code
===========

The source code from which this documentation is derived is in the file
GradedLieAlgebras.m2 (see common/share/Macaulay2/GradedLieAlgebras.m2 ). The
auxiliary files accompanying it are in the directory GradedLieAlgebras/ (see
common/share/Macaulay2/GradedLieAlgebras/ ).

Exports
=======

  * Types
      * ExtAlgebra -- the class of all Ext-algebras
      * ExtElement -- the class of all Ext-algebra elements
      * FGLieIdeal -- the class of all finitely generated
        Lie ideals
      * FGLieSubAlgebra -- the class of all finitely
        generated Lie subalgebras
      * LieAlgebra -- the class of all Lie algebras
      * LieAlgebraMap -- the class of all Lie algebra
        homomorphisms
      * LieDerivation -- the class of all Lie algebra
        derivations
      * LieElement -- the class of all Lie algebra elements
      * LieIdeal -- the class of all Lie ideals
      * LieSubAlgebra -- the class of all Lie subalgebras
      * LieSubSpace -- the class of all Lie subspaces
      * VectorSpace -- the class of all vector spaces
  * Functions and commands
      * boundaries -- make the subalgebra of boundaries
      * center -- make the ideal of central elements
      * computedDegree -- get the degree to which the
        computations have been performed
      * cycles -- make the subalgebra of cycles
      * differential -- make the derivation defined by the
        differential
      * differentialLieAlgebra -- make a
        differential Lie algebra
      * dims -- compute the dimensions of a Lie algebra,
        Ext-algebra or vector space
      * extAlgebra -- compute the Ext-algebra of a Lie
        algebra
      * firstDegree -- get the degree of an element
      * holonomy -- compute the holonomy Lie algebra
        associated to an arrangement or matroid
      * holonomyLocal -- compute the Lie algebra for a
        local subalgebra of the holonomy Lie algebra
      * indexForm -- get a Lie element in the polynomial ring
        representation
      * innerDerivation -- make the derivation defined
        by right Lie multiplication by a Lie element
      * koszulDual -- compute the Lie algebra whose
        enveloping algebra is the Koszul dual of a quadratic algebra
      * lieAlgebra -- make a free Lie algebra
      * lieDerivation -- make a graded derivation
      * lieHomology -- make the homology as a vector space
      * lieIdeal -- make a Lie ideal
      * lieSubAlgebra -- make a Lie subalgebra
      * lieSubSpace -- make a Lie subspace
      * listMultiply -- multiplication of lists
      * minimalModel -- compute the minimal model
      * normalForm -- compute the normal form of a
        LieElement
      * sign -- get the sign of a homogeneous element
      * weight -- get the weight of a homogeneous element
      * zeroDerivation -- make a derivation from the
        zero map
      * zeroIdeal -- make the zero ideal
      * zeroMap -- make the zero map
  * Methods
      * - ExtElement -- unary negation
      * - LieAlgebraMap -- unary negation
      * - LieDerivation -- unary negation
      * - LieElement -- unary negation
      * ambient(LieAlgebra) -- get the ambient
        Lie algebra
      * annihilator(FGLieSubAlgebra),
        -- make the annihilator Lie subalgebra
      * basis(List,ExtAlgebra) -- compute
        a basis
      * basis(List,LieAlgebra) -- compute
        a basis
      * basis(List,VectorSpace), --
        compute a basis
      * basis(ZZ,ExtAlgebra) -- compute a
        basis
      * basis(ZZ,LieAlgebra) -- compute a
        basis
      * basis(ZZ,VectorSpace) -- compute a
        basis
      * basis(ZZ,ZZ,ExtAlgebra), --
        compute a basis
      * basis(ZZ,ZZ,LieAlgebra), --
        compute a basis
      * basis(ZZ,ZZ,VectorSpace), --
        compute a basis
      * "boundaries(LieAlgebra)" -- see boundaries, -- make
        the subalgebra of boundaries
      * "center(LieAlgebra)" -- see center, -- make the ideal of
        central elements
      * coefficients(LieElement) -- get
        the coefficients and monomials of a Lie element
      * "computedDegree(ExtAlgebra)" -- see computedDegree,
        -- get the degree to which the computations have been
        performed
      * "computedDegree(LieAlgebra)" -- see computedDegree,
        -- get the degree to which the computations have been
        performed
      * "cycles(LieAlgebra)" -- see cycles, -- make the
        subalgebra of cycles
      * decompose(LieAlgebra) -- compute the
        ideal associated to an arrangement or matroid
      * degreeLength(LieAlgebra) -- get
        the length of the weight of a generator
      * "describe(ExtAlgebra)" -- see describe(LieAlgebra),
        -- real description
      * describe(LieAlgebra) -- real
        description
      * "describe(LieAlgebraMap)" -- see describe(LieAlgebra),
        -- real description
      * "describe(LieDerivation)" -- see describe(LieAlgebra),
        -- real description
      * "describe(VectorSpace)" -- see describe(LieAlgebra),
        -- real description
      * diff(LieAlgebra) -- get the differential
        of the generators
      * "differentialLieAlgebra(List)" -- see differentialLieAlgebra,
        -- make a differential Lie algebra
      * dim(List,ExtAlgebra) -- compute the
        dimension
      * dim(List,LieAlgebra) -- compute the
        dimension
      * dim(List,VectorSpace) -- compute
        the dimension
      * dim(ZZ,ExtAlgebra) -- compute the
        dimension
      * dim(ZZ,LieAlgebra) -- compute the
        dimension
      * dim(ZZ,VectorSpace) -- compute the
        dimension
      * dim(ZZ,ZZ,ExtAlgebra) -- compute
        the dimension
      * dim(ZZ,ZZ,LieAlgebra) -- compute
        the dimension
      * dim(ZZ,ZZ,VectorSpace), --
        compute the dimension
      * "dims(ZZ,ExtAlgebra)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * "dims(ZZ,LieAlgebra)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * "dims(ZZ,VectorSpace)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * "dims(ZZ,ZZ,ExtAlgebra)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * "dims(ZZ,ZZ,LieAlgebra)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * "dims(ZZ,ZZ,VectorSpace)" -- see dims, -- compute the
        dimensions of a Lie algebra, Ext-algebra or vector space
      * euler(LieAlgebra) -- compute the Euler
        derivation
      * eulers(ZZ,LieAlgebra) -- compute
        the list of Euler characteristics
      * "extAlgebra(ZZ,LieAlgebra)" -- see extAlgebra, --
        compute the Ext-algebra of a Lie algebra
      * ExtElement + ExtElement -- addition of
        Ext-algebra elements
      * ExtElement - ExtElement -- subtraction
        of Ext-algebra elements
      * ExtElement ExtElement -- multiplication
        of Ext-algebra elements
      * "firstDegree(ExtElement)" -- see firstDegree, -- get
        the degree of an element
      * "firstDegree(LieDerivation)" -- see firstDegree, --
        get the degree of an element
      * "firstDegree(LieElement)" -- see firstDegree, -- get
        the degree of an element
      * generators(ExtAlgebra) -- get the
        generators
      * generators(LieAlgebra) -- get the
        generators
      * generators(LieSubSpace) -- get the
        generators
      * "holonomy(List)" -- see holonomy, -- compute the
        holonomy Lie algebra associated to an arrangement or matroid
      * "holonomy(List,List)" -- see holonomy, -- compute the
        holonomy Lie algebra associated to an arrangement or matroid
      * "holonomyLocal(ZZ,LieAlgebra)" -- see holonomyLocal,
        -- compute the Lie algebra for a local subalgebra of the
        holonomy Lie algebra
      * ideal(LieAlgebra) -- get the relations in
        a Lie algebra
      * image(LieAlgebraMap) -- make the image
        of a Lie algebra map
      * image(LieAlgebraMap,LieSubSpace)
        -- make the image of a Lie
        subspace under a Lie algebra map
      * image(LieDerivation) -- make the image
        of a Lie derivation
      * image(LieDerivation,LieSubSpace)
        -- make the image of a Lie
        subspace under a Lie derivation
      * "indexForm(LieElement)" -- see indexForm, -- get a Lie
        element in the polynomial ring representation
      * "innerDerivation(LieElement)" -- see innerDerivation,
        -- make the derivation defined by right Lie
        multiplication by a Lie element
      * inverse(LieAlgebraMap,LieSubSpace)
        -- make the inverse image of
        a Lie subspace under a Lie algebra map
      * inverse(LieDerivation,LieSubSpace)
        -- make the inverse image of
        a Lie subspace under a Lie derivation
      * isIsomorphism(LieAlgebraMap),
        -- whether a Lie map is an isomorphism
      * isSurjective(LieAlgebraMap), --
        whether a Lie map is surjective
      * isWellDefined(ZZ,LieAlgebraMap)
        -- whether a Lie map is well
        defined
      * isWellDefined(ZZ,LieDerivation)
        -- whether a Lie derivation is
        well defined
      * kernel(LieAlgebraMap) -- make the
        kernel of a map
      * kernel(LieDerivation) -- make the
        kernel of a map
      * "koszulDual(PolynomialRing)" -- see koszulDual, --
        compute the Lie algebra whose enveloping algebra is the Koszul dual of
        a quadratic algebra
      * "koszulDual(QuotientRing)" -- see koszulDual, --
        compute the Lie algebra whose enveloping algebra is the Koszul dual of
        a quadratic algebra
      * "lieAlgebra(List)" -- see lieAlgebra, -- make a free
        Lie algebra
      * LieAlgebra * LieAlgebra -- free
        product of Lie algebras
      * LieAlgebra ++ LieAlgebra -- direct sum
        of Lie algebras
      * LieAlgebra / LieAlgebraMap -- make a
        quotient Lie algebra
      * LieAlgebra / LieIdeal -- make a quotient
        Lie algebra
      * LieAlgebra / List -- make a quotient Lie
        algebra
      * LieAlgebra == LieAlgebra -- whether
        two Lie algebras are defined in the same way
      * LieAlgebraMap * LieAlgebraMap,
        -- composition of homomorphisms
      * LieAlgebraMap * LieDerivation,
        -- composition of a homomorphism and a derivation
      * LieAlgebraMap + LieAlgebraMap, --
        addition of Lie homomorphisms
      * LieAlgebraMap - LieAlgebraMap, --
        subtraction of Lie homomorphisms
      * LieAlgebraMap == LieAlgebraMap,
        -- whether two Lie algebra homomorphisms are defined in the same way
      * LieAlgebraMap @ LieElement -- formal
        application of a Lie map to a Lie element
      * LieAlgebraMap \ List -- apply a Lie
        homomorphism to every element in a list
      * LieAlgebraMap \\ List -- formal
        application of a Lie map to every element in a list
      * LieAlgebraMap LieElement -- apply a
        Lie homomorphism
      * "lieDerivation(LieAlgebraMap,List)" -- see lieDerivation,
        -- make a graded derivation
      * "lieDerivation(List)" -- see lieDerivation, --
        make a graded derivation
      * LieDerivation * LieAlgebraMap,
        -- composition of a derivation and a homomorphism
      * LieDerivation + LieDerivation, --
        addition of Lie derivations
      * LieDerivation - LieDerivation, --
        subtraction of Lie derivations
      * LieDerivation @ LieElement -- formal
        application of a derivation to a Lie element
      * LieDerivation \ List -- apply a derivation
        to every element in a list
      * LieDerivation \\ List -- formal
        application of a derivation to every element in a list
      * LieDerivation LieDerivation -- Lie
        multiplication of ordinary derivations
      * LieDerivation LieElement -- apply a
        derivation
      * LieElement + LieElement -- addition of
        Lie elements
      * LieElement ++ LieElement -- formal
        addition of Lie elements
      * LieElement - LieElement -- subtraction
        of Lie elements
      * LieElement / LieElement -- formal
        subtraction of Lie elements
      * LieElement @ LieElement -- formal
        multiplication of Lie elements
      * LieElement LieElement -- multiplication
        of Lie elements
      * "lieHomology(LieAlgebra)" -- see lieHomology, --
        make the homology as a vector space
      * "lieIdeal(LieSubSpace)" -- see lieIdeal, -- make a Lie
        ideal
      * "lieIdeal(List)" -- see lieIdeal, -- make a Lie ideal
      * "lieSubAlgebra(List)" -- see lieSubAlgebra, --
        make a Lie subalgebra
      * "lieSubSpace(List)" -- see lieSubSpace, -- make a
        Lie subspace
      * LieSubSpace + LieSubSpace -- make the
        sum of two Lie subspaces
      * LieSubSpace @ LieSubSpace -- make the
        intersection of two Lie subspaces
      * map(LieAlgebra) -- get the map of a minimal
        model
      * map(LieAlgebra,LieAlgebra), --
        make a natural Lie algebra homomorphism
      * map(LieAlgebra,LieAlgebra,List)
        -- make a Lie algebra
        homomorphism
      * map(LieDerivation) -- get the map in the
        definition of a Lie derivation
      * member(LieElement,LieSubSpace)
        -- whether a Lie element belongs
        to a Lie subspace
      * "minimalModel(ZZ,LieAlgebra)" -- see minimalModel,
        -- compute the minimal model
      * minimalPresentation(ZZ,LieAlgebra)
        -- compute a minimal
        presentation
      * monomials(LieElement) -- get the
        monomials of a Lie element
      * "normalForm(LieElement)" -- see normalForm, --
        compute the normal form of a LieElement
      * Number @ LieElement -- formal
        multiplication of a number and a Lie element
      * Number ExtElement -- multiplication of a
        number and an Ext-algebra element
      * Number LieAlgebraMap -- multiplication of
        a number and a homomorphism
      * Number LieDerivation -- multiplication of
        a number and a derivation
      * Number LieElement -- multiplication of a
        number and a Lie element
      * numgens(LieAlgebra) -- get the number
        of generators
      * quotient(LieIdeal,FGLieSubAlgebra)
        -- make the quotient of a Lie
        ideal by a finitely generated Lie subalgebra
      * "random(List,LieAlgebra)" -- see random(ZZ,LieAlgebra),
        -- get a random element of a Lie algebra
      * random(ZZ,LieAlgebra) -- get a
        random element of a Lie algebra
      * "random(ZZ,ZZ,LieAlgebra)" -- see random(ZZ,LieAlgebra),
        -- get a random element of a Lie algebra
      * RingElement @ LieElement -- formal
        multiplication of a ring element and a Lie element
      * RingElement ExtElement -- multiplication
        of a field element and a Ext-algebra element
      * RingElement LieAlgebraMap, --
        multiplication of a field element and a homomorphism
      * RingElement LieDerivation, --
        multiplication of a field element and a derivation
      * RingElement LieElement -- multiplication
        of a field element and a Lie element
      * ScriptedFunctor _ LieAlgebra, --
        get the identity homomorphism
      * "sign(ExtElement)" -- see sign, -- get the sign of a
        homogeneous element
      * "sign(LieDerivation)" -- see sign, -- get the sign of a
        homogeneous element
      * "sign(LieElement)" -- see sign, -- get the sign of a
        homogeneous element
      * source(LieAlgebraMap) -- get the
        source of a map
      * source(LieDerivation) -- get the
        source of a map
      * "standardForm(List,LieAlgebra)" -- see
        standardForm(RingElement,LieAlgebra),
        -- get a Lie element in
        standard form
      * standardForm(RingElement,LieAlgebra)
        -- get a Lie element in
        standard form
      * target(LieAlgebraMap) -- get the
        target of a map
      * target(LieDerivation) -- get the
        target of a map
      * trace(ZZ,LieSubSpace,LieAlgebraMap)
        -- compute the trace of a
        Lie algebra map acting on a Lie subspace
      * use(LieAlgebra) -- set the generators
      * "weight(ExtElement)" -- see weight, -- get the weight of
        a homogeneous element
      * "weight(LieDerivation)" -- see weight, -- get the weight
        of a homogeneous element
      * "weight(LieElement)" -- see weight, -- get the weight of
        a homogeneous element
      * "zeroDerivation(LieAlgebra)" -- see zeroDerivation,
        -- make a derivation from the zero map
      * "zeroIdeal(LieAlgebra)" -- see zeroIdeal, -- make the
        zero ideal
      * "zeroMap(LieAlgebra,LieAlgebra)" -- see zeroMap, -- make
        the zero map
      * ZZ _ ExtAlgebra -- get the zero element
      * ZZ _ LieAlgebra -- get the zero element
  * Symbols
      * Field -- name for an optional argument for lieAlgebra and
        holonomy
      * LastWeightHomological -- name for an
        optional argument for lieAlgebra
      * lieRing -- get the internal ring for representation of
        Lie elements
      * mbRing -- a polynomial ring representation of the Lie
        algebra used for output
      * Signs -- name for an optional argument for lieAlgebra

For the programmer
==================

The object GradedLieAlgebras, is a package (Macaulay2Doc).

- ExtElement -- unary negation
******************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = - x
  * Inputs:
      * x, an instance of the type ExtElement, $x$ is of
        type $E$, where $E$ is of type ExtAlgebra
  * Outputs:
      * u, an instance of the type ExtElement, $u$ is of
        type $E$, the negation of $x$

Description
===========

The symbol - is used as notation for the Ext-algebra negation.

+------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : E = extAlgebra(3,L)            |
|                                    |
|o2 = E                              |
|                                    |
|o2 : ExtAlgebra                     |
+------------------------------------+
|i3 : -(2 ext_3-ext_4)               |
|                                    |
|o3 =  - 2ext_3 + ext_4              |
|                                    |
|o3 : E                              |
+------------------------------------+

See also
========

  * ExtAlgebra -- the class of all Ext-algebras

Ways to use this method:
========================

  * - ExtElement -- unary negation

- LieAlgebraMap -- unary negation
*********************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = - f
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * u, an instance of the type LieAlgebraMap,

Description
===========

The symbol - is used as notation for the negation of Lie homomorphisms.

+------------------------+
|i1 : M = lieAlgebra{a,b}|
|                        |
|o1 = M                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : L = lieAlgebra{a,b}|
|                        |
|o2 = L                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(L,M)       |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : describe(-f)       |
|                        |
|o4 = a =>  - a          |
|     b =>  - b          |
|     source => M        |
|     target => L        |
+------------------------+

Ways to use this method:
========================

  * - LieAlgebraMap -- unary negation

- LieDerivation -- unary negation
*********************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = - d
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * u, an instance of the type LieDerivation,

Description
===========

The symbol - is used as notation for the negation of Lie derivations.

+-----------------------------------+
|i1 : L = lieAlgebra{a,b}           |
|                                   |
|o1 = L                             |
|                                   |
|o1 : LieAlgebra                    |
+-----------------------------------+
|i2 : d = lieDerivation{a a b,b b a}|
|                                   |
|o2 = d                             |
|                                   |
|o2 : LieDerivation                 |
+-----------------------------------+
|i3 : describe(-d)                  |
|                                   |
|o3 = a => (a b a)                  |
|     b =>  - (b b a)               |
|     map => id_L                   |
|     sign => 0                     |
|     weight => {2, 0}              |
|     source => L                   |
|     target => L                   |
+-----------------------------------+

Ways to use this method:
========================

  * - LieDerivation -- unary negation

- LieElement -- unary negation
******************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = - x
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
  * Outputs:
      * u, an instance of the type LieElement, $u$ is of
        type $L$, the negation of $x$

Description
===========

The symbol - is used as notation for the Lie negation.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : - 2 b b b a        |
|                        |
|o2 =  - 2 (b b b a)     |
|                        |
|o2 : L                  |
+------------------------+

Ways to use this method:
========================

  * - LieElement -- unary negation

ambient(LieAlgebra) -- get the ambient Lie algebra
**************************************************

Synopsis
========

  * Function: ambient (Macaulay2Doc),
  * Usage:
        M = ambient L
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * M, an instance of the type LieAlgebra, a Lie algebra
        of which $L$ is a quotient

Description
===========

Relations in $L$ are elements in ambient(L). When a quotient Lie algebra Q=L/I
is constructed, where $I$ is a list, then the elements in $I$ must be of type
$L$, but the program converts the relations so that they have type ambient(L)
instead. This may be seen by looking at ideal(Q). If $I$ is of type LieIdeal,
then the value of the expression ambient(Q) is L, and the value of the
expression ideal(Q) is I.

+--------------------------+
|i1 : M = lieAlgebra{a,b,c}|
|                          |
|o1 = M                    |
|                          |
|o1 : LieAlgebra           |
+--------------------------+
|i2 : L = M/{a b}          |
|                          |
|o2 = L                    |
|                          |
|o2 : LieAlgebra           |
+--------------------------+
|i3 : a c                  |
|                          |
|o3 =  - (c a)             |
|                          |
|o3 : L                    |
+--------------------------+
|i4 : Q = L/{a c}          |
|                          |
|o4 = Q                    |
|                          |
|o4 : LieAlgebra           |
+--------------------------+
|i5 : ideal(Q)             |
|                          |
|o5 = { - (b a),  - (c a)} |
|                          |
|o5 : List                 |
+--------------------------+
|i6 : class\oo             |
|                          |
|o6 = {M, M}               |
|                          |
|o6 : List                 |
+--------------------------+
|i7 : f=map(Q,L)           |
|                          |
|o7 = f                    |
|                          |
|o7 : LieAlgebraMap        |
+--------------------------+
|i8 : I = kernel f         |
|                          |
|o8 = I                    |
|                          |
|o8 : LieIdeal             |
+--------------------------+
|i9 : R = L/I              |
|                          |
|o9 = R                    |
|                          |
|o9 : LieAlgebra           |
+--------------------------+
|i10 : ambient R           |
|                          |
|o10 = L                   |
|                          |
|o10 : LieAlgebra          |
+--------------------------+
|i11 : ideal R             |
|                          |
|o11 = I                   |
|                          |
|o11 : LieIdeal            |
+--------------------------+

Ways to use this method:
========================

  * ambient(LieAlgebra) -- get the ambient Lie
    algebra

annihilator(FGLieSubAlgebra) -- make the annihilator Lie subalgebra
*******************************************************************

Synopsis
========

  * Function: annihilator (Saturation),
  * Usage:
        A=annihilator(S)
  * Inputs:
      * S, an instance of the type FGLieSubAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Strategy (Saturation), => ..., default value null,
        null
  * Outputs:
      * A, an instance of the type LieSubAlgebra, the Lie
        subalgebra of L=S#lieAlgebra consisting of the set $A$ of elements $x$
        in $L$ such that $x y=0$ for all $y$ in $S$.

Description
===========

The optional input given above is not relevant for Lie algebras.

+----------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a a c+b a c,c c a}|
|                                              |
|o1 = L                                        |
|                                              |
|o1 : LieAlgebra                               |
+----------------------------------------------+
|i2 : S=lieSubAlgebra({a c})                   |
|                                              |
|o2 = S                                        |
|                                              |
|o2 : FGLieSubAlgebra                          |
+----------------------------------------------+
|i3 : A=annihilator(S)                         |
|                                              |
|o3 = A                                        |
|                                              |
|o3 : LieSubAlgebra                            |
+----------------------------------------------+
|i4 : dims(1,4,A)                              |
|                                              |
|o4 = {2, 2, 2, 3}                             |
|                                              |
|o4 : List                                     |
+----------------------------------------------+
|i5 : basis(3,A)                               |
|                                              |
|o5 = {(b c a) + (b c b) - (c b a), (c c b)}   |
|                                              |
|o5 : List                                     |
+----------------------------------------------+

See also
========

  * quotient(LieIdeal,FGLieSubAlgebra)
    -- make the quotient of a Lie
    ideal by a finitely generated Lie subalgebra

Ways to use this method:
========================

  * annihilator(FGLieSubAlgebra), --
    make the annihilator Lie subalgebra

basis(List,ExtAlgebra) -- compute a basis
*****************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(s,E)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * E, an instance of the type ExtAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $E$ of
        multi-degree $s$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : basis({4,4},E)                                      |
|                                                         |
|o6 = {ext_3}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(List,ExtAlgebra) -- compute a
    basis

basis(List,LieAlgebra) -- compute a basis
*****************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(s,L)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * L, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $L$ of
        multi-degree $s$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : basis({7,4},Q)                                      |
|                                                         |
|o5 = {(a c c)}                                           |
|                                                         |
|o5 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(List,LieAlgebra) -- compute a
    basis

basis(List,VectorSpace) -- compute a basis
******************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(s,V)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * V, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $V$ of
        multi-degree $s$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : basis({5,3},H)                                      |
|                                                         |
|o6 = {(b c)}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : basis({5,3},Z)                                      |
|                                                         |
|o8 = {(b c)}                                             |
|                                                         |
|o8 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis

Ways to use this method:
========================

  * basis(List,VectorSpace) -- compute a
    basis

basis(ZZ,ExtAlgebra) -- compute a basis
***************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,E)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * E, an instance of the type ExtAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $E$ of
        first degree $m$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : basis(4,E)                                          |
|                                                         |
|o6 = {ext_3}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,ExtAlgebra) -- compute a basis

basis(ZZ,LieAlgebra) -- compute a basis
***************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,L)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $L$ of
        first degree $m$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+-----------------------------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},                    |
|           Signs=>{1,1,1},LastWeightHomological=>true)                       |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})                                |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                                               |
|                                                                             |
|o3 = J                                                                       |
|                                                                             |
|o3 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i4 : Q=D/J                                                                   |
|                                                                             |
|o4 = Q                                                                       |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : basis(7,Q)                                                              |
|                                                                             |
|o5 = {(a a a a a b), (a a a a c), (a a b c), (a c c), (b a a a b), (b a a c)}|
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,LieAlgebra) -- compute a basis

basis(ZZ,VectorSpace) -- compute a basis
****************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,V)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * V, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $V$ of
        first degree $m$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : basis(5,H)                                          |
|                                                         |
|o6 = {(b c)}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : basis(3,Z)                                          |
|                                                         |
|o8 = {(a b)}                                             |
|                                                         |
|o8 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,VectorSpace) -- compute a
    basis

basis(ZZ,ZZ,ExtAlgebra) -- compute a basis
******************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,n,E)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * E, an instance of the type ExtAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $E$ of
        first degree $m$ and homological degree $n$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : basis(4,4,E)                                        |
|                                                         |
|o6 = {ext_3}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis

basis(ZZ,ZZ,LieAlgebra) -- compute a basis
******************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,n,L)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $L$ of
        first degree $m$ and homological degree $n$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : basis(7,4,Q)                                        |
|                                                         |
|o5 = {(a c c)}                                           |
|                                                         |
|o5 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis

basis(ZZ,ZZ,VectorSpace) -- compute a basis
*******************************************

Synopsis
========

  * Function: basis (Macaulay2Doc),
  * Usage:
        b=basis(m,n,V)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * V, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * Limit (Macaulay2Doc), => ..., default value infinity, null
      * SourceRing (Macaulay2Doc), => ..., default value null, null
      * Strategy (Macaulay2Doc), => ..., default value null, null
      * Truncate (Macaulay2Doc), => ..., default value false, null
      * Variables (Macaulay2Doc), => ..., default value null, null
  * Outputs:
      * b, a list (Macaulay2Doc), a basis for the part of $V$ of
        first degree $m$ and homological degree $n$.

Description
===========

The optional inputs given above are not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : basis(5,3,H)                                        |
|                                                         |
|o6 = {(b c)}                                             |
|                                                         |
|o6 : List                                                |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : basis(5,3,Z)                                        |
|                                                         |
|o8 = {(b c)}                                             |
|                                                         |
|o8 : List                                                |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(List,VectorSpace) -- compute a
    basis

Ways to use this method:
========================

  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis

boundaries -- make the subalgebra of boundaries
***********************************************

Synopsis
========

  * Usage:
        B=boundaries(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * B, an instance of the type LieSubAlgebra, the
        image of the differential

Description
===========

+------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>{1,0},Weights=>{{2,0},{2,1}},|
|         LastWeightHomological=>true,Field=>ZZ/3)           |
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : L=differentialLieAlgebra{0_L,a}                        |
|                                                            |
|o2 = L                                                      |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : B=boundaries L                                         |
|                                                            |
|o3 = B                                                      |
|                                                            |
|o3 : LieSubAlgebra                                          |
+------------------------------------------------------------+
|i4 : dims(10,B)                                             |
|                                                            |
|o4 = | 0 1 0 1 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 1 0 1 |                                |
|     | 0 0 0 0 0 0 0 1 0 1 |                                |
|     | 0 0 0 0 0 0 0 0 0 1 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|                                                            |
|              10        10                                  |
|o4 : Matrix ZZ   <--- ZZ                                    |
+------------------------------------------------------------+

See also
========

  * cycles -- make the subalgebra of cycles
  * lieHomology -- make the homology as a vector space

Ways to use boundaries :
========================

  * "boundaries(LieAlgebra)"

For the programmer
==================

The object boundaries, is a method function (Macaulay2Doc).

center -- make the ideal of central elements
********************************************

Synopsis
========

  * Usage:
        c=center(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * c, an instance of the type LieIdeal, the ideal of
        central elements

Description
===========

+--------------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,a c,c b c,b b c b}|
|                                                  |
|o1 = L                                            |
|                                                  |
|o1 : LieAlgebra                                   |
+--------------------------------------------------+
|i2 : C = center L                                 |
|                                                  |
|o2 = C                                            |
|                                                  |
|o2 : LieIdeal                                     |
+--------------------------------------------------+
|i3 : dims(1,5,C)                                  |
|                                                  |
|o3 = {1, 0, 1, 0, 0}                              |
|                                                  |
|o3 : List                                         |
+--------------------------------------------------+
|i4 : basis(3,C)                                   |
|                                                  |
|o4 = {(b c b)}                                    |
|                                                  |
|o4 : List                                         |
+--------------------------------------------------+

See also
========

  * annihilator(FGLieSubAlgebra), --
    make the annihilator Lie subalgebra
  * quotient(LieIdeal,FGLieSubAlgebra)
    -- make the quotient of a Lie
    ideal by a finitely generated Lie subalgebra

Ways to use center :
====================

  * "center(LieAlgebra)"

For the programmer
==================

The object center, is a method function (Macaulay2Doc).

coefficients(LieElement) -- get the coefficients and monomials of a Lie element
*******************************************************************************

Synopsis
========

  * Function: coefficients (Macaulay2Doc),
  * Usage:
        c = coefficients(x)
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
  * Optional inputs (Macaulay2Doc),:
      * Monomials (Macaulay2Doc), => ..., default value
        null, null
      * Variables (Macaulay2Doc), => ..., default value
        null, null
  * Outputs:
      * c, a list (Macaulay2Doc), the lists of coefficients and
        monomials in $x$

Description
===========

The optional inputs given above are not relevant for Lie algebras. A Lie
element $x$ has a normal form in a Lie algebra $L$, which is a linear
combination of basis elements in a certain order; coefficients(x) gives the
lists of coefficients and monomials in this representation. If the Lie element
has been obtained using the "formal" operators, then coefficients(x) gives the
coefficients and monomials for all the iterated Lie products used in the
expression.

+----------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}                    |
|                                              |
|o1 = L                                        |
|                                              |
|o1 : LieAlgebra                               |
+----------------------------------------------+
|i2 : x = a b c - 3 c b a +(1/3) b a c         |
|                                              |
|o2 =  - (4/3)(b c a) - 2 (c b a)              |
|                                              |
|o2 : L                                        |
+----------------------------------------------+
|i3 : coefficients x                           |
|                                              |
|         4                                    |
|o3 = {{- -, -2}, {(b c a), (c b a)}}          |
|         3                                    |
|                                              |
|o3 : List                                     |
+----------------------------------------------+
|i4 : y = a@b@c/3@c@b@a++(1/3)@b@a@c           |
|                                              |
|o4 = (a b c) - 3 (c b a) + (1/3)(b a c)       |
|                                              |
|o4 : L                                        |
+----------------------------------------------+
|i5 : coefficients y                           |
|                                              |
|              1                               |
|o5 = {{1, -3, -}, {(a b c), (c b a), (b a c)}}|
|              3                               |
|                                              |
|o5 : List                                     |
+----------------------------------------------+

See also
========

  * monomials(LieElement) -- get the
    monomials of a Lie element
  * indexForm -- get a Lie element in the polynomial ring
    representation
  * LieElement @ LieElement -- formal
    multiplication of Lie elements

Ways to use this method:
========================

  * coefficients(LieElement) -- get the
    coefficients and monomials of a Lie element

computedDegree -- get the degree to which the computations have been performed
******************************************************************************

Description
===========

 The computed degree of a Lie algebra (or Ext-algebra) $L$ is $d$ when the
computation of $L$ has been performed up to degree $d$.

Synopsis
========

  * Usage:
        n=computedDegree(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * n, an integer (Macaulay2Doc), the degree of computation of L

Synopsis
========

  * Usage:
        n=computedDegree(E)
  * Inputs:
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * n, an integer (Macaulay2Doc), the degree of computation of E
+---------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{1,2,3})|
|                                             |
|o1 = L                                       |
|                                             |
|o1 : LieAlgebra                              |
+---------------------------------------------+
|i2 : dims(1,3,L)                             |
|                                             |
|o2 = {1, 1, 2}                               |
|                                             |
|o2 : List                                    |
+---------------------------------------------+
|i3 : computedDegree L                        |
|                                             |
|o3 = 3                                       |
+---------------------------------------------+
|i4 : firstDegree(c a b+a b c)                |
|                                             |
|o4 = 6                                       |
+---------------------------------------------+
|i5 : computedDegree L                        |
|                                             |
|o5 = 6                                       |
+---------------------------------------------+

Ways to use computedDegree :
============================

  * "computedDegree(ExtAlgebra)"
  * "computedDegree(LieAlgebra)"

For the programmer
==================

The object computedDegree, is a method function (Macaulay2Doc).

cycles -- make the subalgebra of cycles
***************************************

Synopsis
========

  * Usage:
        C=cycles(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * C, an instance of the type LieSubAlgebra, the
        kernel of the differential

Description
===========

+------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>{1,0},Weights=>{{2,0},{2,1}},|
|        Field=>ZZ/3,LastWeightHomological=>true)            |
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : D=differentialLieAlgebra({0_L,a})                      |
|                                                            |
|o2 = D                                                      |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : C=cycles D                                             |
|                                                            |
|o3 = C                                                      |
|                                                            |
|o3 : LieSubAlgebra                                          |
+------------------------------------------------------------+
|i4 : dims(10,C)                                             |
|                                                            |
|o4 = | 0 1 0 1 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 1 0 1 0 1 |                                |
|     | 0 0 0 0 0 1 0 1 0 1 |                                |
|     | 0 0 0 0 0 0 0 0 0 1 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|                                                            |
|              10        10                                  |
|o4 : Matrix ZZ   <--- ZZ                                    |
+------------------------------------------------------------+

See also
========

  * boundaries -- make the subalgebra of boundaries
  * lieHomology -- make the homology as a vector space

Ways to use cycles :
====================

  * "cycles(LieAlgebra)"

For the programmer
==================

The object cycles, is a method function (Macaulay2Doc).

decompose(LieAlgebra) -- compute the ideal associated to an arrangement or matroid
**********************************************************************************

Synopsis
========

  * Function: decompose (Macaulay2Doc),
  * Usage:
        I = decompose(L)
  * Inputs:
      * L, an instance of the type LieAlgebra, the holonomy
        Lie algebra
  * Outputs:
      * I, an instance of the type LieIdeal,

Description
===========

This gives the kernel of the Lie homomorphism from [$L,L$] to the direct sum of
[$L_i,L_i$], where $L_i$ is the Lie subalgebra generated by the $i$th subset in
the input for the holonomy Lie algebra $L$; see holonomyLocal.
The ideal is generated by the basis elements in degree 3 of the
form (x y z), where not all x,y,z belong to the same $L_i$. The ideal is zero
if and only if $L$ decomposes into the direct sum of the local Lie subalgebras
$L_i$ in degrees $\ge \ 2$.

+--------------------------------------------------------------+
|i1 : L=holonomy({{a0,a1,a2},{a0,a3,a4},{a1,a3,a5},{a2,a4,a5}})|
|                                                              |
|o1 = L                                                        |
|                                                              |
|o1 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i2 : I=decompose L                                            |
|                                                              |
|o2 = I                                                        |
|                                                              |
|o2 : FGLieIdeal                                               |
+--------------------------------------------------------------+
|i3 : dims(1,4,I)                                              |
|                                                              |
|o3 = {0, 0, 2, 9}                                             |
|                                                              |
|o3 : List                                                     |
+--------------------------------------------------------------+
|i4 : basis(3,I)                                               |
|                                                              |
|o4 = {(a5 a4 a3), (a4 a5 a3)}                                 |
|                                                              |
|o4 : List                                                     |
+--------------------------------------------------------------+

See also
========

  * holonomy -- compute the holonomy Lie algebra associated to
    an arrangement or matroid
  * holonomyLocal -- compute the Lie algebra for a local
    subalgebra of the holonomy Lie algebra
  * Holonomy Lie algebras and symmetries

Ways to use this method:
========================

  * decompose(LieAlgebra) -- compute the
    ideal associated to an arrangement or matroid

degreeLength(LieAlgebra) -- get the length of the weight of a generator
***********************************************************************

Synopsis
========

  * Function: degreeLength (Macaulay2Doc),
  * Usage:
        n=degreeLength(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * n, an integer (Macaulay2Doc), the length of an arbitrary
        weight

Description
===========

Observe that the weights of the generators in a Lie algebra will have an extra
component 0 if the option LastWeightHomological is false.

+---------------------------------------------------------------------------+
|i1 : L=lieAlgebra{a,b}                                                     |
|                                                                           |
|o1 = L                                                                     |
|                                                                           |
|o1 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i2 : M=lieAlgebra({a,b},Weights=>{{1,0},{2,1}},LastWeightHomological=>true)|
|                                                                           |
|o2 = M                                                                     |
|                                                                           |
|o2 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i3 : degreeLength L                                                        |
|                                                                           |
|o3 = 2                                                                     |
+---------------------------------------------------------------------------+
|i4 : weight\gens L                                                         |
|                                                                           |
|o4 = {{1, 0}, {1, 0}}                                                      |
|                                                                           |
|o4 : List                                                                  |
+---------------------------------------------------------------------------+
|i5 : degreeLength M                                                        |
|                                                                           |
|o5 = 2                                                                     |
+---------------------------------------------------------------------------+

See also
========

  * firstDegree(LieElement) -- get the degree of an element
  * weight -- get the weight of a homogeneous element

Ways to use this method:
========================

  * degreeLength(LieAlgebra) -- get the
    length of the weight of a generator

describe(LieAlgebra) -- real description
****************************************

Synopsis
========

  * Function: describe (Macaulay2Doc),

Description
===========

The function displays a list of relevant information about the object in
question.

Synopsis
========

  * Usage:
        describe(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,

Synopsis
========

  * Usage:
        describe(E)
  * Inputs:
      * E, an instance of the type ExtAlgebra,

Synopsis
========

  * Usage:
        describe(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,

Synopsis
========

  * Usage:
        describe(d)
  * Inputs:
      * d, an instance of the type LieDerivation,

Synopsis
========

  * Usage:
        describe(V)
  * Inputs:
      * V, an instance of the type VectorSpace, an instance
        of type  VectorSpace
+-----------------------------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},                    |
|                 Signs=>{1,1,1},LastWeightHomological=>true)                 |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})                                |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : I=lieIdeal{b b+4 a c}                                                   |
|                                                                             |
|o3 = I                                                                       |
|                                                                             |
|o3 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i4 : Q=D/I                                                                   |
|                                                                             |
|o4 = Q                                                                       |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : describe Q                                                              |
|                                                                             |
|o5 = generators => {a, b, c}                                                 |
|     Weights => {{1, 0}, {2, 1}, {3, 2}}                                     |
|     Signs => {1, 1, 1}                                                      |
|     ideal => { - (a a a), (b b) + 4 (a c), (a a b) + (a a b) - (b a a) - 4  |
|     ambient => L                                                            |
|     diff => {0, (a a), (a b)}                                               |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|(a a b), (a a b) + (a a b) - (b a a) - 4 (a a b), (a a a a) + (a a a a) - (a |
|-----------------------------------------------------------------------------|
|a a a) - (a a a a) - 4 (a a a a)}                                            |
+-----------------------------------------------------------------------------+
|i6 : describe I                                                              |
|                                                                             |
|o6 = generators => {(b b) + 4 (a c), (a a b) + (a a b) - (b a a) - 4 (a a b)}|
|     lieAlgebra => D                                                         |
+-----------------------------------------------------------------------------+
|i7 : describe map(Q,D)                                                       |
|                                                                             |
|o7 = a => a                                                                  |
|     b => b                                                                  |
|     c => c                                                                  |
|     source => D                                                             |
|     target => Q                                                             |
+-----------------------------------------------------------------------------+
|i8 : describe differential D                                                 |
|                                                                             |
|o8 = a => 0                                                                  |
|     b => (a a)                                                              |
|     c => (a b)                                                              |
|     map => id_D                                                             |
|     sign => 1                                                               |
|     weight => {0, -1}                                                       |
|     source => D                                                             |
|     target => D                                                             |
+-----------------------------------------------------------------------------+
|i9 : describe extAlgebra(5,Q)                                                |
|                                                                             |
|o9 = generators => {ext_0, ext_1, ext_2, ext_3}                              |
|     Weights => {{1, 1}, {2, 2}, {3, 3}, {4, 4}}                             |
|     Signs => {0, 0, 0, 0}                                                   |
|     lieAlgebra => Q                                                         |
|     Field => QQ                                                             |
|     computedDegree => 5                                                     |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * "describe(ExtAlgebra)"
  * describe(LieAlgebra) -- real description
  * "describe(LieAlgebraMap)"
  * "describe(LieDerivation)"
  * "describe(VectorSpace)"

diff(LieAlgebra) -- get the differential of the generators
**********************************************************

Synopsis
========

  * Function: diff (Macaulay2Doc),
  * Usage:
        x=diff(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * x, a list (Macaulay2Doc), the list of the differential of
        the generators

Description
===========

+-----------------------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>1,Weights=>{{1,0},{2,1}},LastWeightHomological|
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
|-----------------------------------------------------------------------------|
|=>true)                                                                      |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_L,a a}                                       |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : diff D                                                                  |
|                                                                             |
|o3 = {0, (a a)}                                                              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : describe D                                                              |
|                                                                             |
|o4 = generators => {a, b}                                                    |
|     Weights => {{1, 0}, {2, 1}}                                             |
|     Signs => {1, 1}                                                         |
|     ideal => {}                                                             |
|     ambient => L                                                            |
|     diff => {0, (a a)}                                                      |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * differentialLieAlgebra -- make a
    differential Lie algebra
  * describe(LieAlgebra) -- real description

Ways to use this method:
========================

  * diff(LieAlgebra) -- get the differential of
    the generators

differential -- make the derivation defined by the differential
***************************************************************

Synopsis
========

  * Usage:
        d=differential(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an instance of the type LieDerivation, the
        derivation defined by the differential

Description
===========

If the current Lie algebra has no differential, then 0 is returned.

+------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>{1,0},Weights=>{{2,0},{2,1}},|
|         LastWeightHomological=>true)                       |
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : L=differentialLieAlgebra{0_L,a}                        |
|                                                            |
|o2 = L                                                      |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : d=differential(L)                                      |
|                                                            |
|o3 = d                                                      |
|                                                            |
|o3 : LieDerivation                                          |
+------------------------------------------------------------+
|i4 : d b b a                                                |
|                                                            |
|o4 = (3/2)(b a a)                                           |
|                                                            |
|o4 : L                                                      |
+------------------------------------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * lieDerivation -- make a graded derivation

For the programmer
==================

The object differential, is a function closure (Macaulay2Doc).

Differential Lie algebra tutorial
*********************************

A differential Lie algebra is defined by first using the constructor
lieAlgebra, with the option
lieAlgebra(...,LastWeightHomological=>...),
set to true to
define a free Lie algebra $F$. Hereby, the last weight is the homological
degree, and it must be non-negative and less than the first degree. Next define
the differential Lie algebra $D$ using differentialLieAlgebra,
with input the list of differentials of the generators
with values in $F$. The differential should preserve all weights except the
homological degree, which is lowered by 1, and it also changes the sign. All
this is checked to be true when differentialLieAlgebra,
is executed. The value zero for a generator is given as
$0_F$, which has any weight and sign (see however weight, and
sign). The program adds (non-normalized) relations to the Lie
algebra to get the square of the differential to be 0.

+------------------------------------------------------------+
|i1 : F1 = lieAlgebra({a,b,c},Weights => {{1,0},{2,1},{3,2}},|
|          Signs => {1,1,1},LastWeightHomological => true)   |
|                                                            |
|o1 = F1                                                     |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : D1=differentialLieAlgebra{0_F1,a a,a b}                |
|                                                            |
|o2 = D1                                                     |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : describe D1                                            |
|                                                            |
|o3 = generators => {a, b, c}                                |
|     Weights => {{1, 0}, {2, 1}, {3, 2}}                    |
|     Signs => {1, 1, 1}                                     |
|     ideal => { - (a a a)}                                  |
|     ambient => F1                                          |
|     diff => {0, (a a), (a b)}                              |
|     Field => QQ                                            |
|     computedDegree => 0                                    |
+------------------------------------------------------------+
|i4 : F2 = lieAlgebra({a,b,c2,c3,c4},Signs => {0,0,1,0,1},   |
|          Weights => {{1,0},{1,0},{2,1},{3,2},{5,3}},       |
|          LastWeightHomological => true)                    |
|                                                            |
|o4 = F2                                                     |
|                                                            |
|o4 : LieAlgebra                                             |
+------------------------------------------------------------+
|i5 : D2=differentialLieAlgebra{0_F2,0_F2,a b,a c2,a b c3}   |
|                                                            |
|o5 = D2                                                     |
|                                                            |
|o5 : LieAlgebra                                             |
+------------------------------------------------------------+
|i6 : describe D2                                            |
|                                                            |
|o6 = generators => {a, b, c2, c3, c4}                       |
|     Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}, {5, 3}}    |
|     Signs => {0, 0, 1, 0, 1}                               |
|     ideal => { - (a b a), (a b a c2)}                      |
|     ambient => F2                                          |
|     diff => {0, 0,  - (b a), (a c2), (a b c3)}             |
|     Field => QQ                                            |
|     computedDegree => 0                                    |
+------------------------------------------------------------+

There is a unique extension to a derivation $d$ on the free Lie algebra $F$
given the values of $d$ on the generators. This map induces a derivation with
square zero on the differential Lie algebra $D$ (which might have some
relations). The differential is obtained using differential,
applied to $D$. The value of the differential $d$ applied to an
arbitrary Lie element $x$ in $D$ is obtained as $d(x)$.

+-----------------------------------+
|i7 :                               |
|     d2 = differential D2          |
|                                   |
|o7 = d2                            |
|                                   |
|o7 : LieDerivation                 |
+-----------------------------------+
|i8 : x = a c3 + b c3 + (1/2) c2 c2 |
|                                   |
|o8 = (1/2)(c2 c2) + (a c3) + (b c3)|
|                                   |
|o8 : D2                            |
+-----------------------------------+
|i9 : d2 x                          |
|                                   |
|o9 = (a a c2) + (a b c2)           |
|                                   |
|o9 : D2                            |
+-----------------------------------+

It is possible to define quotients of a differential Lie algebra in the same
way as for ordinary Lie algebras. The program adds (non-normalized) relations
to obtain that the ideal is invariant under the differential.

+----------------------------------------------------------------------+
|i10 : F3 = lieAlgebra({a,b,c},Signs => 1,                             |
|             Weights => {{1,0},{1,0},{2,1}},                          |
|             LastWeightHomological => true)                           |
|                                                                      |
|o10 = F3                                                              |
|                                                                      |
|o10 : LieAlgebra                                                      |
+----------------------------------------------------------------------+
|i11 : D3 = differentialLieAlgebra{0_F3,0_F3,a b}                      |
|                                                                      |
|o11 = D3                                                              |
|                                                                      |
|o11 : LieAlgebra                                                      |
+----------------------------------------------------------------------+
|i12 : L3 = D3/{b c,c c}                                               |
|                                                                      |
|o12 = L3                                                              |
|                                                                      |
|o12 : LieAlgebra                                                      |
+----------------------------------------------------------------------+
|i13 : describe L3                                                     |
|                                                                      |
|o13 = generators => {a, b, c}                                         |
|      Weights => {{1, 0}, {1, 0}, {2, 1}}                             |
|      Signs => {1, 1, 1}                                              |
|      ideal => {(b c), (c c),  - (b b a), (b a c) + (a b c) - (c b a)}|
|      ambient => F3                                                   |
|      diff => {0, 0, (b a)}                                           |
|      Field => QQ                                                     |
|      computedDegree => 0                                             |
+----------------------------------------------------------------------+

The homology as a vector space can be obtained using lieHomology.
Bases and dimensions in different degrees are obtained using
basis(ZZ,ZZ,VectorSpace), and
dims(ZZ,VectorSpace). The output of the latter is a matrix consisting of
dimensions of the vector space for different first degrees and last degrees.
The basis elements for the homology are represented as cycles in the Lie
algebra. The set of boundaries and the set of cycles are subalgebras of the Lie
algebra, and they are obtained using boundaries, and
cycles, and bases and dimensions of them are obtained in the same way
as for homology.

+-------------------------+
|i14 : use D3             |
+-------------------------+
|i15 : L4 = D3/{a a,b b}  |
|                         |
|o15 = L4                 |
|                         |
|o15 : LieAlgebra         |
+-------------------------+
|i16 : H4 = lieHomology L4|
|                         |
|o16 = H4                 |
|                         |
|o16 : VectorSpace        |
+-------------------------+
|i17 : B4 = boundaries L4 |
|                         |
|o17 = B4                 |
|                         |
|o17 : LieSubAlgebra      |
+-------------------------+
|i18 : C4 = cycles L4     |
|                         |
|o18 = C4                 |
|                         |
|o18 : LieSubAlgebra      |
+-------------------------+
|i19 : dims(5,H4)         |
|                         |
|o19 = | 2 0 0 0 0 |      |
|      | 0 0 2 1 0 |      |
|      | 0 0 0 0 0 |      |
|      | 0 0 0 0 0 |      |
|      | 0 0 0 0 0 |      |
|                         |
|               5        5|
|o19 : Matrix ZZ  <--- ZZ |
+-------------------------+
|i20 : basis(4,1,H4)      |
|                         |
|o20 = {(b a c)}          |
|                         |
|o20 : List               |
+-------------------------+
|i21 : basis(4,1,B4)      |
|                         |
|o21 = {(a b c) + (b a c)}|
|                         |
|o21 : List               |
+-------------------------+

It follows from the result above that a basis for the cycles of weight (4,1) is
\{b a c, a b c\}.

+------------------------+
|i22 : basis(4,1,C4)     |
|                        |
|o22 = {(b a c), (a b c)}|
|                        |
|o22 : List              |
+------------------------+

The product of a cycle and a boundary is a boundary:

+------------------------------------------------------+
|i23 : (b a c) (b a c + (a b c))                       |
|                                                      |
|o23 =  - (c b a b a c) + (a b c b a c) + (b a c b a c)|
|                                                      |
|o23 : L4                                              |
+------------------------------------------------------+
|i24 : member(oo,B4)                                   |
|                                                      |
|o24 = true                                            |
+------------------------------------------------------+

In weight (3,1) there are two independent cycles and no boundaries:

+--------------------+
|i25 : basis(3,1,H4) |
|                    |
|o25 = {(b c), (a c)}|
|                    |
|o25 : List          |
+--------------------+
|i26 : basis(3,1,B4) |
|                    |
|o26 = {}            |
|                    |
|o26 : List          |
+--------------------+

In weight (5,1) all elements are boundaries, so the homology is 0, which is
seen in the table above. In weight (5,2) there are no cycles.

+--------------------------------------+
|i27 : basis(5,1,B4)                   |
|                                      |
|o27 = {(b a b c), (a b a c)}          |
|                                      |
|o27 : List                            |
+--------------------------------------+
|i28 : basis(5,1,L4)                   |
|                                      |
|o28 = {(a b a c), (b a b c)}          |
|                                      |
|o28 : List                            |
+--------------------------------------+
|i29 : d4 = differential L4            |
|                                      |
|o29 = d4                              |
|                                      |
|o29 : LieDerivation                   |
+--------------------------------------+
|i30 : b52 = basis(5,2,L4)             |
|                                      |
|o30 = {(a c c), (b c c)}              |
|                                      |
|o30 : List                            |
+--------------------------------------+
|i31 : d4\b52                          |
|                                      |
|o31 = { - 2 (a b a c),  - 2 (b a b c)}|
|                                      |
|o31 : List                            |
+--------------------------------------+
|i32 : basis(5,2,C4)                   |
|                                      |
|o32 = {}                              |
|                                      |
|o32 : List                            |
+--------------------------------------+

See also
========

  * First Lie algebra tutorial
  * Second Lie algebra tutorial
  * Holonomy Lie algebras and symmetries
  * Minimal models, Ext-algebras and Koszul duals

differentialLieAlgebra -- make a differential Lie algebra
*********************************************************

Synopsis
========

  * Usage:
        L=differentialLieAlgebra(defs)
  * Inputs:
      * defs, a list (Macaulay2Doc), of Lie elements in a free Lie
        algebra
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

The input should be a list of Lie elements in a free Lie algebra $F$ and this
list consists of the differentials of the generators, where $0_F$ is used for
the zero element. The option LastWeightHomological,
for $F$ must have the value true.  The program adds
relations to the Lie algebra to get the square of the differential to be 0. Use
ideal(LieAlgebra), to get these non-normalized
relations or describe(LieAlgebra), to just look
at them.

+------------------------------------------------------------------+
|i1 : F1=lieAlgebra({a,b,c,r3,r4,r42},                             |
|        Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},         |
|        Signs=>{0,0,0,1,1,0},LastWeightHomological=>true)         |
|                                                                  |
|o1 = F1                                                           |
|                                                                  |
|o1 : LieAlgebra                                                   |
+------------------------------------------------------------------+
|i2 : D1=differentialLieAlgebra{0_F1,0_F1,0_F1,a c,a a c,r4 - a r3}|
|                                                                  |
|o2 = D1                                                           |
|                                                                  |
|o2 : LieAlgebra                                                   |
+------------------------------------------------------------------+
|i3 : ideal D1                                                     |
|                                                                  |
|o3 = {(a a c) - (a a c)}                                          |
|                                                                  |
|o3 : List                                                         |
+------------------------------------------------------------------+
|i4 : F2=lieAlgebra({a,b,c2,c3,c5},Signs=>{0,0,1,0,1},             |
|        Weights=>{{1,0},{1,0},{2,1},{3,2},{5,3}},                 |
|        LastWeightHomological=>true)                              |
|                                                                  |
|o4 = F2                                                           |
|                                                                  |
|o4 : LieAlgebra                                                   |
+------------------------------------------------------------------+
|i5 : D2=differentialLieAlgebra{0_F2,0_F2,a b,a c2,a b c3}         |
|                                                                  |
|o5 = D2                                                           |
|                                                                  |
|o5 : LieAlgebra                                                   |
+------------------------------------------------------------------+
|i6 : describe D2                                                  |
|                                                                  |
|o6 = generators => {a, b, c2, c3, c5}                             |
|     Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}, {5, 3}}          |
|     Signs => {0, 0, 1, 0, 1}                                     |
|     ideal => { - (a b a), (a b a c2)}                            |
|     ambient => F2                                                |
|     diff => {0, 0,  - (b a), (a c2), (a b c3)}                   |
|     Field => QQ                                                  |
|     computedDegree => 0                                          |
+------------------------------------------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * differential -- make the derivation defined by the
    differential

Ways to use differentialLieAlgebra :
====================================

  * "differentialLieAlgebra(List)"

For the programmer
==================

The object differentialLieAlgebra, is a
method function (Macaulay2Doc).

dim(List,ExtAlgebra) -- compute the dimension
*********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(s,E)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $E$ in
        multi-degree $s$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : dim({4,4},E)                                        |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(List,ExtAlgebra) -- compute a
    basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(List,ExtAlgebra) -- compute the
    dimension

dim(List,LieAlgebra) -- compute the dimension
*********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(s,L)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $L$ in
        multi-degree $s$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : dim({7,4},Q)                                        |
|                                                         |
|o5 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(List,LieAlgebra) -- compute a
    basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(List,LieAlgebra) -- compute the
    dimension

dim(List,VectorSpace) -- compute the dimension
**********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(s,V)
  * Inputs:
      * s, a list (Macaulay2Doc), the weight
      * E, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $V$ in
        multi-degree $s$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : dim({5,3},H)                                        |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : dim({5,3},Z)                                        |
|                                                         |
|o8 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(List,VectorSpace) -- compute a
    basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension

Ways to use this method:
========================

  * dim(List,VectorSpace) -- compute the
    dimension

dim(ZZ,ExtAlgebra) -- compute the dimension
*******************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,E)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $E$ in first
        degree $m$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : dim(4,E)                                            |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,ExtAlgebra) -- compute the
    dimension

dim(ZZ,LieAlgebra) -- compute the dimension
*******************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,L)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $L$ in first
        degree $m$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : dim(7,Q)                                            |
|                                                         |
|o5 = 6                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,LieAlgebra) -- compute a basis
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,LieAlgebra) -- compute the
    dimension

dim(ZZ,VectorSpace) -- compute the dimension
********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,V)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * V, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $V$ in first
        degree $m$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : dim(5,H)                                            |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : dim(5,Z)                                            |
|                                                         |
|o8 = 2                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,VectorSpace) -- compute the
    dimension

dim(ZZ,ZZ,ExtAlgebra) -- compute the dimension
**********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,n,E)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $E$ in first
        degree $m$ and homological degree $n$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : E=extAlgebra(5,Q)                                   |
|                                                         |
|o5 = E                                                   |
|                                                         |
|o5 : ExtAlgebra                                          |
+---------------------------------------------------------+
|i6 : dim(4,4,E)                                          |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension

dim(ZZ,ZZ,LieAlgebra) -- compute the dimension
**********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,n,L)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $L$ in first
        degree $m$ and homological degree $n$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : dim(7,4,Q)                                          |
|                                                         |
|o5 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension

dim(ZZ,ZZ,VectorSpace) -- compute the dimension
***********************************************

Synopsis
========

  * Function: dim (Macaulay2Doc),
  * Usage:
        d=dim(m,n,V)
  * Inputs:
      * m, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * V, an instance of the type VectorSpace, an instance
        of type VectorSpace
  * Outputs:
      * d, an integer (Macaulay2Doc), the dimension of $V$ in first
        degree $m$ and homological degree $n$.

Description
===========

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|           Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                           |
|                                                         |
|o3 = J                                                   |
|                                                         |
|o3 : FGLieIdeal                                          |
+---------------------------------------------------------+
|i4 : Q=D/J                                               |
|                                                         |
|o4 = Q                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : H=lieHomology Q                                     |
|                                                         |
|o5 = H                                                   |
|                                                         |
|o5 : VectorSpace                                         |
+---------------------------------------------------------+
|i6 : dim(5,3,H)                                          |
|                                                         |
|o6 = 1                                                   |
+---------------------------------------------------------+
|i7 : Z=cycles Q                                          |
|                                                         |
|o7 = Z                                                   |
|                                                         |
|o7 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i8 : dim(5,3,Z)                                          |
|                                                         |
|o8 = 1                                                   |
+---------------------------------------------------------+

See also
========

  * dims -- compute the dimensions of a Lie algebra, Ext-algebra
    or vector space
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(List,VectorSpace) -- compute the
    dimension

Ways to use this method:
========================

  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension

dims -- compute the dimensions of a Lie algebra, Ext-algebra or vector space
****************************************************************************

Description
===========

Synopsis
========

  * Usage:
        dm=dims(n,L)
  * Inputs:
      * n, an integer (Macaulay2Doc), the maximal degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * dm, a matrix (Macaulay2Doc),  the matrix of dimensions of
        $L$ in first degree $i$ and homological degree $j$, where $i$ ranges
        from $1$ to $n$ and $j$ from 0 to $n-1$

Synopsis
========

  * Usage:
        dm=dims(n,E)
  * Inputs:
      * n, an integer (Macaulay2Doc), the maximal degree
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * dm, a matrix (Macaulay2Doc),  the matrix of dimensions of
        $E$ in first degree $i$ and homological degree $j$, where $i$ ranges
        from $1$ to $n$ and $j$ from 0 to $n-1$

Synopsis
========

  * Usage:
        dm=dims(n,V)
  * Inputs:
      * n, an integer (Macaulay2Doc), the maximal degree
      * V, an instance of the type VectorSpace, an instance
        of type  VectorSpace
  * Outputs:
      * dm, a matrix (Macaulay2Doc),  the matrix of dimensions of
        $V$ in first degree $i$ and homological degree $j$, where $i$ ranges
        from $1$ to $n$ and $j$ from 0 to $n-1$

Synopsis
========

  * Usage:
        dl=dims(n,m,L)
  * Inputs:
      * n, an integer (Macaulay2Doc), the starting degree
      * m, an integer (Macaulay2Doc), the ending degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * dl, a list (Macaulay2Doc),  the dimensions of $L$ in first
        degree $i$, where $i$ ranges from $n$ to $m$

Synopsis
========

  * Usage:
        dl=dims(n,m,E)
  * Inputs:
      * n, an integer (Macaulay2Doc), the starting degree
      * m, an integer (Macaulay2Doc), the ending degree
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * dl, a list (Macaulay2Doc),  the dimensions of $E$ in first
        degree $i$, where $i$ ranges from $n$ to $m$

Synopsis
========

  * Usage:
        dl=dims(n,m,V)
  * Inputs:
      * n, an integer (Macaulay2Doc), the starting degree
      * m, an integer (Macaulay2Doc), the ending degree
      * V, an instance of the type VectorSpace, an instance
        of type  VectorSpace
  * Outputs:
      * dl, a list (Macaulay2Doc),  the dimensions of $V$ in first
        degree $i$, where $i$ ranges from $n$ to $m$
+-------------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},    |
|                  Signs=>{1,1,1},LastWeightHomological=>true)|
|                                                             |
|o1 = L                                                       |
|                                                             |
|o1 : LieAlgebra                                              |
+-------------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})                |
|                                                             |
|o2 = D                                                       |
|                                                             |
|o2 : LieAlgebra                                              |
+-------------------------------------------------------------+
|i3 : J=lieIdeal({b b + 4 a c})                               |
|                                                             |
|o3 = J                                                       |
|                                                             |
|o3 : FGLieIdeal                                              |
+-------------------------------------------------------------+
|i4 : Q=D/J                                                   |
|                                                             |
|o4 = Q                                                       |
|                                                             |
|o4 : LieAlgebra                                              |
+-------------------------------------------------------------+
|i5 : dims(7,Q)                                               |
|                                                             |
|o5 = | 1 1 0 0 0 0 0 |                                       |
|     | 0 1 1 1 1 1 1 |                                       |
|     | 0 0 1 1 1 1 2 |                                       |
|     | 0 0 0 0 1 1 2 |                                       |
|     | 0 0 0 0 0 1 1 |                                       |
|     | 0 0 0 0 0 0 0 |                                       |
|     | 0 0 0 0 0 0 0 |                                       |
|                                                             |
|              7        7                                     |
|o5 : Matrix ZZ  <--- ZZ                                      |
+-------------------------------------------------------------+
|i6 : Z=cycles Q                                              |
|                                                             |
|o6 = Z                                                       |
|                                                             |
|o6 : LieSubAlgebra                                           |
+-------------------------------------------------------------+
|i7 : dims(5,Z)                                               |
|                                                             |
|o7 = | 1 1 0 0 0 |                                           |
|     | 0 0 1 1 1 |                                           |
|     | 0 0 0 0 0 |                                           |
|     | 0 0 0 0 1 |                                           |
|     | 0 0 0 0 0 |                                           |
|                                                             |
|              5        5                                     |
|o7 : Matrix ZZ  <--- ZZ                                      |
+-------------------------------------------------------------+
|i8 : H=lieHomology Q                                         |
|                                                             |
|o8 = H                                                       |
|                                                             |
|o8 : VectorSpace                                             |
+-------------------------------------------------------------+
|i9 : dims(1,5,H)                                             |
|                                                             |
|o9 = {1, 0, 0, 0, 1}                                         |
|                                                             |
|o9 : List                                                    |
+-------------------------------------------------------------+
|i10 : E=extAlgebra(5,Q)                                      |
|                                                             |
|o10 = E                                                      |
|                                                             |
|o10 : ExtAlgebra                                             |
+-------------------------------------------------------------+
|i11 : dims(4,E)                                              |
|                                                             |
|o11 = | 1 0 0 0 |                                            |
|      | 0 1 0 0 |                                            |
|      | 0 0 1 0 |                                            |
|      | 0 0 0 1 |                                            |
|                                                             |
|               4        4                                    |
|o11 : Matrix ZZ  <--- ZZ                                     |
+-------------------------------------------------------------+

See also
========

  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * basis(ZZ,LieAlgebra) -- compute a basis

Ways to use dims :
==================

  * "dims(ZZ,ExtAlgebra)"
  * "dims(ZZ,LieAlgebra)"
  * "dims(ZZ,VectorSpace)"
  * "dims(ZZ,ZZ,ExtAlgebra)"
  * "dims(ZZ,ZZ,LieAlgebra)"
  * "dims(ZZ,ZZ,VectorSpace)"

For the programmer
==================

The object dims, is a method function (Macaulay2Doc).

euler(LieAlgebra) -- compute the Euler derivation
*************************************************

Synopsis
========

  * Function: euler (Macaulay2Doc),
  * Usage:
        d = euler(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an instance of the type LieDerivation,

Description
===========

The Euler derivation is defined as x -> firstDegree(x) x

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|          Signs=>1,LastWeightHomological=>true)          |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : d=euler D                                           |
|                                                         |
|o3 = d                                                   |
|                                                         |
|o3 : LieDerivation                                       |
+---------------------------------------------------------+
|i4 : d a b c                                             |
|                                                         |
|o4 = 6 (a b c)                                           |
|                                                         |
|o4 : D                                                   |
+---------------------------------------------------------+
|i5 : describe d                                          |
|                                                         |
|o5 = a => a                                              |
|     b => 2 b                                            |
|     c => 3 c                                            |
|     map => id_D                                         |
|     sign => 0                                           |
|     weight => {0, 0}                                    |
|     source => D                                         |
|     target => D                                         |
+---------------------------------------------------------+
|i6 : ic=innerDerivation c                                |
|                                                         |
|o6 = ic                                                  |
|                                                         |
|o6 : LieDerivation                                       |
+---------------------------------------------------------+
|i7 : e=d ic                                              |
|                                                         |
|o7 = e                                                   |
|                                                         |
|o7 : LieDerivation                                       |
+---------------------------------------------------------+
|i8 : describe e                                          |
|                                                         |
|o8 = a => 3 (a c)                                        |
|     b => 3 (b c)                                        |
|     c => 3 (c c)                                        |
|     map => id_D                                         |
|     sign => 1                                           |
|     weight => {3, 2}                                    |
|     source => D                                         |
|     target => D                                         |
+---------------------------------------------------------+
|i9 : e===(firstDegree ic) ic                             |
|                                                         |
|o9 = true                                                |
+---------------------------------------------------------+

See also
========

  * lieDerivation -- make a graded derivation
  * innerDerivation -- make the derivation defined by
    right Lie multiplication by a Lie element

Ways to use this method:
========================

  * euler(LieAlgebra) -- compute the Euler
    derivation

eulers(ZZ,LieAlgebra) -- compute the list of Euler characteristics
******************************************************************

Synopsis
========

  * Function: eulers (Macaulay2Doc),
  * Usage:
        l = eulers(n,L)
  * Inputs:
      * n, an integer (Macaulay2Doc), the  maximal degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * l, a list (Macaulay2Doc), the list of Euler characteristics
        from degree $1$ to $n$

Description
===========

For each first degree $d$, where $d$ goes from $1$ to $n$, the alternating sum
of the dimensions of the Lie algebra in homological degree 0 to $d-1$ is
computed. As we know, the same numbers are obtained using the homology of the
Lie algebra instead.

+--------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                          |
|          Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},   |
|          Signs=>{0,0,0,1,1,0},LastWeightHomological=>true)   |
|                                                              |
|o1 = F                                                        |
|                                                              |
|o1 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i2 : L=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}|
|                                                              |
|o2 = L                                                        |
|                                                              |
|o2 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i3 : Q=L/{b c - a c,a b,b r4 - a r4}                          |
|                                                              |
|o3 = Q                                                        |
|                                                              |
|o3 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i4 : dims(5,Q)                                                |
|                                                              |
|o4 = | 2 1 1 1 2 |                                            |
|     | 0 0 1 3 5 |                                            |
|     | 0 0 0 1 2 |                                            |
|     | 0 0 0 0 0 |                                            |
|     | 0 0 0 0 0 |                                            |
|                                                              |
|              5        5                                      |
|o4 : Matrix ZZ  <--- ZZ                                       |
+--------------------------------------------------------------+
|i5 : eulers(5,Q)                                              |
|                                                              |
|o5 = {2, 1, 0, -1, -1}                                        |
|                                                              |
|o5 : List                                                     |
+--------------------------------------------------------------+
|i6 : H=lieHomology Q                                          |
|                                                              |
|o6 = H                                                        |
|                                                              |
|o6 : VectorSpace                                              |
+--------------------------------------------------------------+
|i7 : dims(5,H)                                                |
|                                                              |
|o7 = | 2 1 0 0 0 |                                            |
|     | 0 0 0 1 1 |                                            |
|     | 0 0 0 0 0 |                                            |
|     | 0 0 0 0 0 |                                            |
|     | 0 0 0 0 0 |                                            |
|                                                              |
|              5        5                                      |
|o7 : Matrix ZZ  <--- ZZ                                       |
+--------------------------------------------------------------+

See also
========

  * lieHomology -- make the homology as a vector space

Ways to use this method:
========================

  * eulers(ZZ,LieAlgebra) -- compute the
    list of Euler characteristics

ExtAlgebra -- the class of all Ext-algebras
*******************************************

Description
===========

This type represents the Ext-algebra of a graded differential Lie algebra $L$,
$E=Ext_{UL}(F,F)$, where $F$ is the field of $L$ and $UL$ is the enveloping
algebra of $L$. Each object of type ExtAlgebra is itself a type E, and
homogeneous elements in E belong also to the type ExtElement,
which is the parent of E. The generators of E, see
generators(ExtAlgebra), represents a basis for $E$
as a vector space and correspond to the Lie algebra generators for the minimal
model $M$ of $L$; however, the homological degree of a generator in $E$ is 1
more than the homological degree for the corresponding generator in $M$ (and
also the sign is switched).

+------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a b,b b b a}                    |
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : E = extAlgebra(5,L)                                    |
|                                                            |
|o2 = E                                                      |
|                                                            |
|o2 : ExtAlgebra                                             |
+------------------------------------------------------------+
|i3 : describe E                                             |
|                                                            |
|o3 = generators => {ext_0, ext_1, ext_2, ext_3}             |
|     Weights => {{1, 1}, {1, 1}, {3, 2}, {4, 2}}            |
|     Signs => {1, 1, 0, 0}                                  |
|     lieAlgebra => L                                        |
|     Field => QQ                                            |
|     computedDegree => 5                                    |
+------------------------------------------------------------+
|i4 : parent E                                               |
|                                                            |
|o4 = ExtElement                                             |
|                                                            |
|o4 : Type                                                   |
+------------------------------------------------------------+
|i5 : ext_0 ext_1                                            |
|                                                            |
|o5 = 0                                                      |
|                                                            |
|o5 : E                                                      |
+------------------------------------------------------------+
|i6 : M = minimalModel(5,L)                                  |
|                                                            |
|o6 = M                                                      |
|                                                            |
|o6 : LieAlgebra                                             |
+------------------------------------------------------------+
|i7 : describe M                                             |
|                                                            |
|o7 = generators => {fr , fr , fr , fr }                     |
|                      0    1    2    3                      |
|     Weights => {{1, 0}, {1, 0}, {3, 1}, {4, 1}}            |
|     Signs => {0, 0, 1, 1}                                  |
|     ideal => {}                                            |
|     ambient => LieAlgebra{...10...}                        |
|     diff => {0, 0, (fr_0 fr_1 fr_0), (fr_1 fr_1 fr_1 fr_0)}|
|     Field => QQ                                            |
|     computedDegree => 5                                    |
|     map => fr  => a                                        |
|              0                                             |
|            fr  => b                                        |
|              1                                             |
|            fr  => 0                                        |
|              2                                             |
|            fr  => 0                                        |
|              3                                             |
|            source => M                                     |
|            target => L                                     |
+------------------------------------------------------------+
|i8 : gens E                                                 |
|                                                            |
|o8 = {ext_0, ext_1, ext_2, ext_3}                           |
|                                                            |
|o8 : List                                                   |
+------------------------------------------------------------+

See also
========

  * ExtElement -- the class of all Ext-algebra elements
  * extAlgebra -- compute the Ext-algebra of a Lie algebra
  * minimalModel -- compute the minimal model

Methods that use an object of class ExtAlgebra :
================================================

  * basis(List,ExtAlgebra) -- compute a
    basis
  * basis(ZZ,ExtAlgebra) -- compute a basis
  * basis(ZZ,ZZ,ExtAlgebra) -- compute
    a basis
  * "computedDegree(ExtAlgebra)" -- see computedDegree,
    -- get the degree to which the computations have been performed
  * "describe(ExtAlgebra)" -- see describe(LieAlgebra),
    -- real description
  * dim(List,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ExtAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,ExtAlgebra) -- compute the
    dimension
  * "dims(ZZ,ExtAlgebra)" -- see dims, -- compute the dimensions of
    a Lie algebra, Ext-algebra or vector space
  * "dims(ZZ,ZZ,ExtAlgebra)" -- see dims, -- compute the dimensions
    of a Lie algebra, Ext-algebra or vector space
  * generators(ExtAlgebra) -- get the
    generators
  * ZZ _ ExtAlgebra -- get the zero element

For the programmer
==================

The object ExtAlgebra, is a type (Macaulay2Doc),
with ancestor classes MutableHashTable (Macaulay2Doc), <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

extAlgebra -- compute the Ext-algebra of a Lie algebra
******************************************************

Synopsis
========

  * Usage:
        E=extAlgebra(n,L)
  * Inputs:
      * n, an integer (Macaulay2Doc), the degree of computation
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * E, an instance of the type ExtAlgebra,

Description
===========

The Ext-algebra of the Lie algebra $L$ is $Ext_{UL}(F,F)$, where $F$ is the
field of $L$ and $UL$ is the enveloping algebra of $L$. It is computed using
the minimal model of $L$, see ExtAlgebra. If $R$ is a
quadratic (skew)commutative Koszul algebra, and L is the value of
koszulDual,($R$) then extAlgebra(n,L) represents the ring $R$ up to
degree $n$. A basis for $Ext_{UL}(F,F)$ as a vector space is represented by
generators(ExtAlgebra).  The symbol SPACE is
used as multiplication of elements in the Ext-algebra and for multiplication by
scalars.

+-------------------------------------------------------------------------+
|i1 : F = lieAlgebra({a,b,c},Weights=>{{1,0},{1,0},{2,1}},                |
|            Signs=>{1,1,1},LastWeightHomological=>true)                  |
|                                                                         |
|o1 = F                                                                   |
|                                                                         |
|o1 : LieAlgebra                                                          |
+-------------------------------------------------------------------------+
|i2 : D = differentialLieAlgebra{0_F,0_F,a a + b b}                       |
|                                                                         |
|o2 = D                                                                   |
|                                                                         |
|o2 : LieAlgebra                                                          |
+-------------------------------------------------------------------------+
|i3 : L=D/{a b,a c}                                                       |
|                                                                         |
|o3 = L                                                                   |
|                                                                         |
|o3 : LieAlgebra                                                          |
+-------------------------------------------------------------------------+
|i4 : E=extAlgebra(3,L)                                                   |
|                                                                         |
|o4 = E                                                                   |
|                                                                         |
|o4 : ExtAlgebra                                                          |
+-------------------------------------------------------------------------+
|i5 : describe E                                                          |
|                                                                         |
|o5 = generators => {ext_0, ext_1, ext_2, ext_3, ext_4}                   |
|     Weights => {{1, 1}, {1, 1}, {2, 2}, {2, 2}, {3, 3}}                 |
|     Signs => {0, 0, 0, 0, 0}                                            |
|     lieAlgebra => L                                                     |
|     Field => QQ                                                         |
|     computedDegree => 3                                                 |
+-------------------------------------------------------------------------+
|i6 : (ext_0 - 2 ext_1) ext_2                                             |
|                                                                         |
|o6 =  - 4ext_4                                                           |
|                                                                         |
|o6 : E                                                                   |
+-------------------------------------------------------------------------+
|i7 : R=QQ[a,b,c]/{a*a,b*b,c*c}                                           |
|                                                                         |
|o7 = R                                                                   |
|                                                                         |
|o7 : QuotientRing                                                        |
+-------------------------------------------------------------------------+
|i8 : L=koszulDual(R)                                                     |
|                                                                         |
|o8 = L                                                                   |
|                                                                         |
|o8 : LieAlgebra                                                          |
+-------------------------------------------------------------------------+
|i9 : E=extAlgebra(4,L)                                                   |
|                                                                         |
|o9 = E                                                                   |
|                                                                         |
|o9 : ExtAlgebra                                                          |
+-------------------------------------------------------------------------+
|i10 : describe E                                                         |
|                                                                         |
|o10 = generators => {ext_0, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6}    |
|      Weights => {{1, 1}, {1, 1}, {1, 1}, {2, 2}, {2, 2}, {2, 2}, {3, 3}}|
|      Signs => {0, 0, 0, 0, 0, 0, 0}                                     |
|      lieAlgebra => L                                                    |
|      Field => QQ                                                        |
|      computedDegree => 4                                                |
+-------------------------------------------------------------------------+
|i11 : ext_0 ext_1 ext_2                                                  |
|                                                                         |
|o11 = ext_6                                                              |
|                                                                         |
|o11 : E                                                                  |
+-------------------------------------------------------------------------+

See also
========

  * ExtElement -- the class of all Ext-algebra elements
  * ExtAlgebra -- the class of all Ext-algebras
  * Differential Lie algebra tutorial
  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements
  * koszulDual -- compute the Lie algebra whose enveloping
    algebra is the Koszul dual of a quadratic algebra

Ways to use extAlgebra :
========================

  * "extAlgebra(ZZ,LieAlgebra)"

For the programmer
==================

The object extAlgebra, is a method function (Macaulay2Doc).

ExtElement -- the class of all Ext-algebra elements
***************************************************

Description
===========

This type represents elements in Ext-algebras. Each object of type ExtAlgebra
is itself a type E, and homogeneous elements in E belong also to the type
ExtElement, which is the parent of E. Internally an element of type ExtElement
is of type BasicList consisting of two basic lists, the first is a list of
coefficients and the second is a list of indices for the generators occurring
in the element.

+--------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a b,b b a}|
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : E = extAlgebra(5,L)              |
|                                      |
|o2 = E                                |
|                                      |
|o2 : ExtAlgebra                       |
+--------------------------------------+
|i3 : x = 4 ext_2 - ext_3              |
|                                      |
|o3 = 4ext_2 - ext_3                   |
|                                      |
|o3 : E                                |
+--------------------------------------+
|i4 : x#0                              |
|                                      |
|o4 = BasicList{4, -1}                 |
|                                      |
|o4 : BasicList                        |
+--------------------------------------+
|i5 : x#1                              |
|                                      |
|o5 = BasicList{2, 3}                  |
|                                      |
|o5 : BasicList                        |
+--------------------------------------+

See also
========

  * ExtAlgebra -- the class of all Ext-algebras
  * ExtElement -- the class of all Ext-algebra elements
  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements

Functions and methods returning an object of class ExtElement :
===============================================================

  * ZZ _ ExtAlgebra -- get the zero element

Methods that use an object of class ExtElement :
================================================

  * - ExtElement -- unary negation
  * ExtElement + ExtElement -- addition of
    Ext-algebra elements
  * ExtElement - ExtElement -- subtraction of
    Ext-algebra elements
  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements
  * "firstDegree(ExtElement)" -- see firstDegree, -- get the
    degree of an element
  * Number ExtElement -- multiplication of a number
    and an Ext-algebra element
  * RingElement ExtElement -- multiplication of
    a field element and a Ext-algebra element
  * "sign(ExtElement)" -- see sign, -- get the sign of a
    homogeneous element
  * "weight(ExtElement)" -- see weight, -- get the weight of a
    homogeneous element

For the programmer
==================

The object ExtElement, is a type (Macaulay2Doc),
with ancestor classes BasicList (Macaulay2Doc), < Thing (Macaulay2Doc).

ExtElement + ExtElement -- addition of Ext-algebra elements
***********************************************************

Synopsis
========

  * Operator: + (Macaulay2Doc),
  * Usage:
        u=x + y
  * Inputs:
      * x, an instance of the type ExtElement, $x$ is of
        type $E$, where $E$ is of type ExtAlgebra
      * y, an instance of the type ExtElement, y is of type
        E
  * Outputs:
      * u, an instance of the type ExtElement, $u$ is of
        type $E$, the sum of $x$ and $y$

Description
===========

The symbol + is used as infix notation for the Ext-algebra addition. The
elements $x$ and $y$ must have the same weight and sign.

+------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : E = extAlgebra(3,L)            |
|                                    |
|o2 = E                              |
|                                    |
|o2 : ExtAlgebra                     |
+------------------------------------+
|i3 : basis(2,E)                     |
|                                    |
|o3 = {ext_3, ext_4}                 |
|                                    |
|o3 : List                           |
+------------------------------------+
|i4 : ext_4+2 ext_3                  |
|                                    |
|o4 = 2ext_3 + ext_4                 |
|                                    |
|o4 : E                              |
+------------------------------------+

See also
========

  * ExtAlgebra -- the class of all Ext-algebras

Ways to use this method:
========================

  * ExtElement + ExtElement -- addition of
    Ext-algebra elements

ExtElement - ExtElement -- subtraction of Ext-algebra elements
**************************************************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u=x - y
  * Inputs:
      * x, an instance of the type ExtElement, $x$ is of
        type $E$, where $E$ is of type ExtAlgebra
      * y, an instance of the type ExtElement, $y$ is of
        type $E$
  * Outputs:
      * u, an instance of the type ExtElement, $u$ is of
        type $E$, the difference of $x$ and $y$

Description
===========

The symbol - is used as infix notation for the Ext-algebra subtraction. The
elements $x$ and $y$ must hade the same weight and sign.

+------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : E = extAlgebra(3,L)            |
|                                    |
|o2 = E                              |
|                                    |
|o2 : ExtAlgebra                     |
+------------------------------------+
|i3 : basis(2,E)                     |
|                                    |
|o3 = {ext_3, ext_4}                 |
|                                    |
|o3 : List                           |
+------------------------------------+
|i4 : ext_4-2 ext_3                  |
|                                    |
|o4 =  - 2ext_3 + ext_4              |
|                                    |
|o4 : E                              |
+------------------------------------+

See also
========

  * ExtAlgebra -- the class of all Ext-algebras

Ways to use this method:
========================

  * ExtElement - ExtElement -- subtraction of
    Ext-algebra elements

ExtElement ExtElement -- multiplication of Ext-algebra elements
***************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        u=x y
  * Inputs:
      * x, an instance of the type ExtElement, $x$ is of
        type $E$, where $E$ is of type ExtAlgebra
      * y, an instance of the type ExtElement, $y$ is of
        type $E$
  * Outputs:
      * u, an instance of the type ExtElement, $u$ is of
        type $E$, the Ext-algebra product of $x$ and $y$

Description
===========

SPACE is used as infix notation for the Ext-algebra multiplication, which is
graded commutative.

+------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : E = extAlgebra(3,L)            |
|                                    |
|o2 = E                              |
|                                    |
|o2 : ExtAlgebra                     |
+------------------------------------+
|i3 : (ext_1+2 ext_0) ext_2          |
|                                    |
|o3 =  - ext_3                       |
|                                    |
|o3 : E                              |
+------------------------------------+

See also
========

  * ExtAlgebra -- the class of all Ext-algebras
  * sign -- get the sign of a homogeneous element
  * weight -- get the weight of a homogeneous element

Ways to use this method:
========================

  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements

FGLieIdeal -- the class of all finitely generated Lie ideals
************************************************************

Description
===========

This type represents  finitely generated Lie ideals. It is a subtype of
LieIdeal, but not of FGSubAlgebra.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : S=lieIdeal{a}      |
|                        |
|o2 = S                  |
|                        |
|o2 : FGLieIdeal         |
+------------------------+

See also
========

  * LieIdeal -- the class of all Lie ideals
  * FGLieSubAlgebra -- the class of all finitely
    generated Lie subalgebras

For the programmer
==================

The object FGLieIdeal, is a type (Macaulay2Doc),
with ancestor classes LieIdeal, < LieSubAlgebra
< LieSubSpace < VectorSpace
< HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

FGLieSubAlgebra -- the class of all finitely generated Lie subalgebras
**********************************************************************

Description
===========

This type represents  finitely generated Lie subalgebras, which is a subtype of
LieSubAlgebra.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : S=lieSubAlgebra{a} |
|                        |
|o2 = S                  |
|                        |
|o2 : FGLieSubAlgebra    |
+------------------------+

See also
========

  * LieIdeal -- the class of all Lie ideals
  * LieSubAlgebra -- the class of all Lie subalgebras

Methods that use an object of class FGLieSubAlgebra :
=====================================================

  * annihilator(FGLieSubAlgebra), --
    make the annihilator Lie subalgebra
  * quotient(LieIdeal,FGLieSubAlgebra)
    -- make the quotient of a Lie
    ideal by a finitely generated Lie subalgebra

For the programmer
==================

The object FGLieSubAlgebra, is a type (Macaulay2Doc),
with ancestor classes LieSubAlgebra,
< LieSubSpace < VectorSpace <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

Field -- name for an optional argument for lieAlgebra and holonomy
******************************************************************

Description
===========

This is an option for lieAlgebra, and holonomy,
to define the coefficient field, which is QQ by default.

See also
========

  * lieAlgebra -- make a free Lie algebra
  * holonomy -- compute the holonomy Lie algebra associated to
    an arrangement or matroid
  * Second Lie algebra tutorial

Functions with optional argument named Field :
==============================================

  * holonomy(...,Field=>...),
    -- optional argument for holonomy
  * lieAlgebra(...,Field=>...)
    -- optional argument for
    lieAlgebra

For the programmer
==================

The object Field, is a symbol (Macaulay2Doc).

First Lie algebra tutorial
**************************

In this elementary tutorial, we give a brief introduction on how to use the
package GradedLieAlgebras.

The most common way to construct a Lie algebra is by means of the constructor
lieAlgebra, which produces a free Lie algebra on the
generators given in input.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : dims(1,5,L)        |
|                        |
|o2 = {2, 1, 2, 3, 6}    |
|                        |
|o2 : List               |
+------------------------+

The above list is the dimensions in degrees 1 to 5 of the free Lie algebra on
two generators (of degree 1). To get an explicit basis in a certain degree, use
basis(ZZ,LieAlgebra).

+-----------------------+
|i3 : basis(2,L)        |
|                       |
|o3 = {(b a)}           |
|                       |
|o3 : List              |
+-----------------------+
|i4 : basis(3,L)        |
|                       |
|o4 = {(a b a), (b b a)}|
|                       |
|o4 : List              |
+-----------------------+

The basis elements in degree 3 given above should be interpreted as [$a$, [$b$,
$a$ ]] and [$b$, [$b$, $a$]]. To multiply two Lie elements, use
LieElement LieElement. The operator SPACE is right
associative, so writing ($a$ $a$ $a$ $b$) as input gives the Lie monomial [$a$,
[$a$, [$a$, $b$]]], which in output is written in the same way as input. A
linear combination of Lie monomials is written in the natural way.

+-----------------------------------------------------------------+
|i5 : p = (a b) (a a b + 3 b b a)                                 |
|                                                                 |
|o5 =  - (a b a b a) + 3 (a b b b a) + (b a a b a) - 3 (b b a b a)|
|                                                                 |
|o5 : L                                                           |
+-----------------------------------------------------------------+

The output is a linear combination of the basis elements of degree 5.

+-----------------------------------------------------------------------------+
|i6 : basis(5,L)                                                              |
|                                                                             |
|o6 = {(a a a b a), (b a a b a), (a b a b a), (b b a b a), (a b b b a), (b b b|
|     ------------------------------------------------------------------------|
|     b a)}                                                                   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

The element $p$ in $L$ may be used to define a quotient Lie algebra by the
ideal generated by $p$.

+--------------------+
|i7 : Q = L/{p}      |
|                    |
|o7 = Q              |
|                    |
|o7 : LieAlgebra     |
+--------------------+
|i8 : dims(1,5,Q)    |
|                    |
|o8 = {2, 1, 2, 3, 5}|
|                    |
|o8 : List           |
+--------------------+

As expected, the dimension in degree 5 of $Q$ is 1 less than that of $L$.

When $L$ is a big free Lie algebra it may be better to define the relations in
a "formal" manner. For an example, see Minimal models, Ext-algebras and Koszul duals.

A generator for a Lie algebra may be any variable name including indexed
variables. Also, the same names can be used in different Lie algebras or even
rings. Use use(LieAlgebra), to switch between Lie
algebras.

+-------------------------------+
|i9 : L = lieAlgebra{a,b}       |
|                               |
|o9 = L                         |
|                               |
|o9 : LieAlgebra                |
+-------------------------------+
|i10 : M = lieAlgebra{a,b}/{a b}|
|                               |
|o10 = M                        |
|                               |
|o10 : LieAlgebra               |
+-------------------------------+
|i11 : R = QQ[a,b]              |
|                               |
|o11 = R                        |
|                               |
|o11 : PolynomialRing           |
+-------------------------------+
|i12 : use L                    |
+-------------------------------+
|i13 : a b                      |
|                               |
|o13 =  - (b a)                 |
|                               |
|o13 : L                        |
+-------------------------------+
|i14 : use M                    |
+-------------------------------+
|i15 : a b                      |
|                               |
|o15 = 0                        |
|                               |
|o15 : M                        |
+-------------------------------+
|i16 : use R                    |
|                               |
|o16 = R                        |
|                               |
|o16 : PolynomialRing           |
+-------------------------------+
|i17 : a*b                      |
|                               |
|o17 = a*b                      |
|                               |
|o17 : R                        |
+-------------------------------+

See also
========

  * Second Lie algebra tutorial
  * Differential Lie algebra tutorial
  * Homomorphisms and derivations
  * Quotient Lie algebras and subspaces

firstDegree -- get the degree of an element
*******************************************

Description
===========

 The degree of an element $x$ in a Lie algebra or an Ext-algebra is the first
degree of the homogeneous element $x$. The zero element has degree 0; however,
its degree should be thought of as arbitrary. The degree of a Lie derivation
$d$ is the first degree of $d$ considered as a graded map.

Synopsis
========

  * Usage:
        n=firstDegree(x)
  * Inputs:
      * x, an instance of the type LieElement,
  * Outputs:
      * n, an integer (Macaulay2Doc),  the first degree of $x$

Synopsis
========

  * Usage:
        n=firstDegree(x)
  * Inputs:
      * x, an instance of the type ExtElement,
  * Outputs:
      * n, an integer (Macaulay2Doc),  the first degree of $x$

Synopsis
========

  * Usage:
        n=firstDegree(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * n, an integer (Macaulay2Doc),  the first degree of $d$
+---------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{1,2,3})|
|                                             |
|o1 = L                                       |
|                                             |
|o1 : LieAlgebra                              |
+---------------------------------------------+
|i2 : firstDegree(c a b+a b c)                |
|                                             |
|o2 = 6                                       |
+---------------------------------------------+
|i3 : E = extAlgebra(5,L)                     |
|                                             |
|o3 = E                                       |
|                                             |
|o3 : ExtAlgebra                              |
+---------------------------------------------+
|i4 : apply(gens E,firstDegree)               |
|                                             |
|o4 = {1, 2, 3}                               |
|                                             |
|o4 : List                                    |
+---------------------------------------------+
|i5 : d=lieDerivation({a c b,b b c,c c b})    |
|                                             |
|o5 = d                                       |
|                                             |
|o5 : LieDerivation                           |
+---------------------------------------------+
|i6 : firstDegree d                           |
|                                             |
|o6 = 5                                       |
+---------------------------------------------+

See also
========

  * weight -- get the weight of a homogeneous element

Ways to use firstDegree :
=========================

  * "firstDegree(ExtElement)"
  * "firstDegree(LieDerivation)"
  * "firstDegree(LieElement)"

For the programmer
==================

The object firstDegree, is a method function (Macaulay2Doc).

generators(ExtAlgebra) -- get the generators
********************************************

Synopsis
========

  * Function: generators (Macaulay2Doc),
  * Usage:
        g=generators(E)
  * Inputs:
      * E, an instance of the type ExtAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * g, a list (Macaulay2Doc), a basis for $E$ as a vector space

Description
===========

The optional input given above is not relevant for Lie algebras. Instead of
generators one may use gens. Observe that the output is a basis for the
Ext-algebra as a vector space, and not as an algebra.

+----------------------------------------+
|i1 : F=lieAlgebra{a,b,c}                |
|                                        |
|o1 = F                                  |
|                                        |
|o1 : LieAlgebra                         |
+----------------------------------------+
|i2 : I=lieIdeal{a a b,a a c}            |
|                                        |
|o2 = I                                  |
|                                        |
|o2 : FGLieIdeal                         |
+----------------------------------------+
|i3 : L=F/I                              |
|                                        |
|o3 = L                                  |
|                                        |
|o3 : LieAlgebra                         |
+----------------------------------------+
|i4 : E=extAlgebra(3,L)                  |
|                                        |
|o4 = E                                  |
|                                        |
|o4 : ExtAlgebra                         |
+----------------------------------------+
|i5 : gens E                             |
|                                        |
|o5 = {ext_0, ext_1, ext_2, ext_3, ext_4}|
|                                        |
|o5 : List                               |
+----------------------------------------+

See also
========

  * generators(LieAlgebra) -- get the
    generators
  * generators(LieSubSpace) -- get the
    generators

Ways to use this method:
========================

  * generators(ExtAlgebra) -- get the
    generators

generators(LieAlgebra) -- get the generators
********************************************

Synopsis
========

  * Function: generators (Macaulay2Doc),
  * Usage:
        g=generators(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * g, a list (Macaulay2Doc), a list of generators for $L$ as a
        Lie algebra

Description
===========

The optional input given above is not relevant for Lie algebras. Instead of
generators one may use the abbreviation gens.

+----------------------------+
|i1 : F=lieAlgebra{a,b,c}    |
|                            |
|o1 = F                      |
|                            |
|o1 : LieAlgebra             |
+----------------------------+
|i2 : I=lieIdeal{a a b,a a c}|
|                            |
|o2 = I                      |
|                            |
|o2 : FGLieIdeal             |
+----------------------------+
|i3 : L=F/I                  |
|                            |
|o3 = L                      |
|                            |
|o3 : LieAlgebra             |
+----------------------------+
|i4 : gens L                 |
|                            |
|o4 = {a, b, c}              |
|                            |
|o4 : List                   |
+----------------------------+

See also
========

  * generators(LieSubSpace) -- get the
    generators
  * generators(ExtAlgebra) -- get the
    generators

Ways to use this method:
========================

  * generators(LieAlgebra) -- get the
    generators

generators(LieSubSpace) -- get the generators
*********************************************

Synopsis
========

  * Function: generators (Macaulay2Doc),
  * Usage:
        g=generators(S)
  * Inputs:
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * g, a list (Macaulay2Doc), a list of generators for $S$ as a
        Lie ideal, or as a Lie subalgebra, or as a Lie subspace, or $g$ is
        undefined

Description
===========

The optional input given above is not relevant for Lie algebras. Instead of
generators one may use the abbreviation gens. If $S$ is of type FGLieIdeal,
then the generators of $S$ are the generators of $S$ as an ideal. If $S$ is of
type FGLieSubAlgebra, then the generators of $S$ are the generators of $S$ as a
Lie subalgebra. If $S$ is of type LieSubSpace given by a finite set of
generators, then the generators of $S$ are the generators of $S$ as a Lie
subspace. In all other cases, if $S$ is of type LieSubSpace, then the function
generators applied to  $S$ is not defined.

+------------------------------+
|i1 : F=lieAlgebra{a,b,c}      |
|                              |
|o1 = F                        |
|                              |
|o1 : LieAlgebra               |
+------------------------------+
|i2 : I=lieIdeal{a a b,a a c}  |
|                              |
|o2 = I                        |
|                              |
|o2 : FGLieIdeal               |
+------------------------------+
|i3 : L=F/I                    |
|                              |
|o3 = L                        |
|                              |
|o3 : LieAlgebra               |
+------------------------------+
|i4 : gens I                   |
|                              |
|o4 = { - (a b a),  - (a c a)} |
|                              |
|o4 : List                     |
+------------------------------+
|i5 : J=kernel map(L,F)        |
|                              |
|o5 = J                        |
|                              |
|o5 : LieIdeal                 |
+------------------------------+
|i6 : gens J                   |
|the subspace has no generators|
+------------------------------+

See also
========

  * generators(LieAlgebra) -- get the
    generators
  * generators(ExtAlgebra) -- get the
    generators

Ways to use this method:
========================

  * generators(LieSubSpace) -- get the
    generators

holonomy -- compute the holonomy Lie algebra associated to an arrangement or matroid
************************************************************************************

Synopsis
========

  * Optional inputs (Macaulay2Doc),:
      * Field, => ...,
        default value QQ, optional argument for holonomy

Description
===========

 Two lists in the union of $x$ and $y$ have at most one element in common and
the sets in $x$ are disjoint. All sets in $x$ have length at least 2 and all
sets in $y$ have length at least 3. In the case of a single argument $y$, there
is a unique simple matroid of rank at most 3 such that $y$ is the set of all
2-flats of size at least 3. In some cases this matroid may be realized as the
matroid of a central arrangement of hyperplanes.  The output holonomy(y) is the
holonomy Lie algebra of this matroid (or arrangement).   In the geometric
language, the case with two arguments $x$ and $y$ corresponds to the deconing
process of a central hyperplane arrangement, see Holonomy Lie algebras and symmetries,
yielding an affine
hyperplane arrangement. The set $x$ consists of the maximal sets of parallel
hyperplanes of size at least 2, and $y$ is the set of all maximal sets of
hyperplanes of size at least 3 that intersect in an affine space of codimension
2.  The output holonomy(x,y)is the holonomy Lie algebra of the affine
arrangement, which is the same in degrees at least 2 as holonomy(z) where $z$
is obtained by choosing a new variable and adding it to all sets in $x$ and
then taking the union with $y$.

Synopsis
========

  * Usage:
        L=holonomy(y)
  * Inputs:
      * y, a list (Macaulay2Doc), a list of subsets of the finite
        set $X$
  * Outputs:
      * L, an instance of the type LieAlgebra, the holonomy
        Lie algebra with generators $X$

Synopsis
========

  * Usage:
        L=holonomy(x,y)
  * Inputs:
      * x, a list (Macaulay2Doc), a list of subsets of the finite
        set $X$
      * y, a list (Macaulay2Doc), a list of subsets of the finite
        set $X$
  * Outputs:
      * L, an instance of the type LieAlgebra, the holonomy
        Lie algebra with generators $X$
+-----------------------------------------------------------------------------+
|i1 : L=holonomy({{a0,a1,a2,a3},{a0,a4,a5},{a1,a4,a6}})                       |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : describe L                                                              |
|                                                                             |
|o2 = generators => {a0, a1, a2, a3, a4, a5, a6}                              |
|     Weights => {{1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}     |
|     Signs => {0, 0, 0, 0, 0, 0, 0}                                          |
|     ideal => {(a1 a0) - (a2 a1) - (a3 a1), (a2 a0) + (a2 a1) - (a3 a2), (a3 |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|a0) + (a3 a1) + (a3 a2), (a4 a0) - (a5 a4), (a5 a0) + (a5 a4), (a4 a1) - (a6 |
|-----------------------------------------------------------------------------|
|a4), (a6 a1) + (a6 a4), (a4 a2), (a4 a3), (a5 a1), (a5 a2), (a5 a3), (a6 a0),|
|-----------------------------------------------------------------------------|
|(a6 a2), (a6 a3), (a6 a5)}                                                   |
+-----------------------------------------------------------------------------+
|i3 : dims(1,4,L)                                                             |
|                                                                             |
|o3 = {7, 5, 12, 24}                                                          |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : M=holonomy({{a1,a2,a3},{a4,a5}},{{a1,a4,a6}})                           |
|                                                                             |
|o4 = M                                                                       |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : describe M                                                              |
|                                                                             |
|o5 = generators => {a1, a2, a3, a4, a5, a6}                                  |
|     Weights => {{1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}             |
|     Signs => {0, 0, 0, 0, 0, 0}                                             |
|     ideal => {(a4 a1) - (a6 a4), (a6 a1) + (a6 a4), (a4 a2), (a4 a3), (a5   |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|a1), (a5 a2), (a5 a3), (a6 a2), (a6 a3), (a6 a5)}                            |
+-----------------------------------------------------------------------------+
|i6 : dims(1,4,M)                                                             |
|                                                                             |
|o6 = {6, 5, 12, 24}                                                          |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * holonomyLocal -- compute the Lie algebra for a local
    subalgebra of the holonomy Lie algebra
  * decompose(LieAlgebra) -- compute the
    ideal associated to an arrangement or matroid
  * Holonomy Lie algebras and symmetries

Ways to use holonomy :
======================

  * "holonomy(List)"
  * "holonomy(List,List)"

For the programmer
==================

The object holonomy, is a method function with options (Macaulay2Doc).

Holonomy Lie algebras and symmetries
************************************

The method function holonomy, constructs the holonomy Lie
algebra of a hyperplane arrangement or a matroid given by the set of 2-flats.
The input may be any set of subsets of a finite set $X$, such that all subsets
have at most one element in common and are of length at least 3 (the 2-flats of
size 2 are determined by those). Indeed, for any such set $A$ of subsets there
is a unique simple matroid of rank at most 3 with the given set as the set of
2-flats of size at least 3, and holonomy(A) represents the holonomy Lie algebra
of this matroid.

+-----------------------------------------------------------------------------+
|i1 : L = holonomy({{a1,a2,a3},{a1,a4,a5},{a2,a4,a6}})                        |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : ideal L                                                                 |
|                                                                             |
|o2 = {(a2 a1) - (a3 a2), (a3 a1) + (a3 a2), (a4 a1) - (a5 a4), (a5 a1) + (a5 |
|     ------------------------------------------------------------------------|
|     a4), (a4 a2) - (a6 a4), (a6 a2) + (a6 a4), (a4 a3), (a5 a2), (a5 a3),   |
|     ------------------------------------------------------------------------|
|     (a6 a1), (a6 a3), (a6 a5)}                                              |
|                                                                             |
|o2 : List                                                                    |
+-----------------------------------------------------------------------------+

The sum of the generators is a central element. Hence, by dividing out by this
element and using minimalPresentation(ZZ,LieAlgebra),
one obtains a presentation of a Lie
algebra with one generator less, which is isomorphic to the holonomy Lie
algebra in degrees $\ge\ 2$.

+-----------------------------------------------------------------------------+
|i3 : L0 = L/{a1+a2+a3+a4+a5+a6}                                              |
|                                                                             |
|o3 = L0                                                                      |
|                                                                             |
|o3 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i4 : L0 = minimalPresentation(3,L0)                                          |
|                                                                             |
|o4 = L0                                                                      |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : describe L0                                                             |
|                                                                             |
|o5 = generators => {a2, a3, a4, a5, a6}                                      |
|     Weights => {{1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}                     |
|     Signs => {0, 0, 0, 0, 0}                                                |
|     ideal => {(a6 a5), (a6 a3), (a6 a2) + (a6 a4), (a5 a3), (a5 a2), (a4    |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|a3), (a4 a2) - (a6 a4)}                                                      |
+-----------------------------------------------------------------------------+

It is possible to get this Lie algebra directly by choosing one of the
variables, picking all 2-flats containing that variable, deleting the variable,
putting $A$ equal to the set of deleted 2-flats and $B$ equal to the remaining
2-flats, and finally applying holonomy(A,B).

+--------------------------------------------------+
|i6 : L1 = holonomy({{a2,a3},{a4,a5}},{{a2,a4,a6}})|
|                                                  |
|o6 = L1                                           |
|                                                  |
|o6 : LieAlgebra                                   |
+--------------------------------------------------+
|i7 : L0==L1                                       |
|                                                  |
|o7 = true                                         |
+--------------------------------------------------+

Choosing another generator to delete gives another presentation (which is still
isomorphic to the holonomy Lie algebra in degrees $\ge\ 2$).

+-----------------------------------------------------------------------------+
|i8 : L6 = holonomy({{a2,a4}},{{a1,a2,a3},{a1,a4,a5}})                        |
|                                                                             |
|o8 = L6                                                                      |
|                                                                             |
|o8 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i9 : describe L6                                                             |
|                                                                             |
|o9 = generators => {a2, a4, a1, a3, a5}                                      |
|     Weights => {{1, 0}, {1, 0}, {1, 0}, {1, 0}, {1, 0}}                     |
|     Signs => {0, 0, 0, 0, 0}                                                |
|     ideal => { - (a1 a2) - (a3 a2), (a3 a2) + (a3 a1),  - (a1 a4) - (a5 a4),|
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|(a5 a4) + (a5 a1), (a3 a4), (a5 a2), (a5 a3)}                                |
+-----------------------------------------------------------------------------+
|i10 : dims(1,6,L6)                                                           |
|                                                                             |
|o10 = {5, 3, 6, 9, 18, 27}                                                   |
|                                                                             |
|o10 : List                                                                   |
+-----------------------------------------------------------------------------+
|i11 : dims(1,6,L1)                                                           |
|                                                                             |
|o11 = {5, 3, 6, 9, 18, 27}                                                   |
|                                                                             |
|o11 : List                                                                   |
+-----------------------------------------------------------------------------+
|i12 : dims(1,6,L)                                                            |
|                                                                             |
|o12 = {6, 3, 6, 9, 18, 27}                                                   |
|                                                                             |
|o12 : List                                                                   |
+-----------------------------------------------------------------------------+

The procedure above corresponds to the deconing process of a central hyperplane
arrangement, yielding an affine hyperplane arrangement. The first input set in
holonomy should be all maximal sets of parallel hyperplanes of size at least 2,
and the second input set should be all maximal sets of hyperplanes of size at
least 3 that intersect in an affine space of codimension 2.

A local Lie algebra of a holonomy Lie algebra, see holonomyLocal,
is the Lie subalgebra generated by the generators in one of the
subsets defined in the input. If this set is of size $k$, then the local Lie
algebra is free on $k$ generators if the set belongs to the first input set,
and it is free on $k-1$ generators in degrees $\ge\ 2$, if it belongs to the
second input set (observe that the numbering of the sets begins with 0).

+-----------------------------------------------------+
|i13 :                                                |
|      describe holonomyLocal(1,L1)                   |
|                                                     |
|o13 = generators => {a4, a5}                         |
|      Weights => {{1, 0}, {1, 0}}                    |
|      Signs => {0, 0}                                |
|      ideal => {}                                    |
|      ambient => LieAlgebra{...10...}                |
|      diff => {}                                     |
|      Field => QQ                                    |
|      computedDegree => 0                            |
+-----------------------------------------------------+
|i14 : describe holonomyLocal(2,L1)                   |
|                                                     |
|o14 = generators => {a2, a4, a6}                     |
|      Weights => {{1, 0}, {1, 0}, {1, 0}}            |
|      Signs => {0, 0, 0}                             |
|      ideal => {(a4 a2) - (a6 a4), (a6 a2) + (a6 a4)}|
|      ambient => LieAlgebra{...10...}                |
|      diff => {}                                     |
|      Field => QQ                                    |
|      computedDegree => 0                            |
+-----------------------------------------------------+

The kernel of the natural map, in degrees $\ge\ 2$, from $L$ to the direct sum
of the local Lie algebras, see holonomyLocal, is obtained
by decompose(LieAlgebra). This ideal is
generated by the basis elements in degree 3 of the form (a b c), where not all
of a,b,c belong to the same local Lie algebra.

+----------------------+
|i15 : I1=decompose(L1)|
|                      |
|o15 = I1              |
|                      |
|o15 : FGLieIdeal      |
+----------------------+
|i16 : dim(3,I1)       |
|                      |
|o16 = 0               |
+----------------------+

It follows from the output displayed above that $L1$, in degrees $\ge\ 2$, is
the direct sum of its local Lie algebras: $L1$ is "decomposable".  This is not
true for the "quadrangel", i.e., the graphical arrangement of the complete
graph on four vertices, which is also the braid arrangement of dimension 4.

+-----------------------------------------------------------------+
|i17 : Q = holonomy({{a1,a2,a3},{a1,a4,a5},{a2,a4,a6},{a3,a5,a6}})|
|                                                                 |
|o17 = Q                                                          |
|                                                                 |
|o17 : LieAlgebra                                                 |
+-----------------------------------------------------------------+
|i18 : decompose Q                                                |
|                                                                 |
|o18 = finitely generated ideal of Q                              |
|                                                                 |
|o18 : FGLieIdeal                                                 |
+-----------------------------------------------------------------+
|i19 : basis(3,oo)                                                |
|                                                                 |
|o19 = {(a6 a5 a4), (a5 a6 a4)}                                   |
|                                                                 |
|o19 : List                                                       |
+-----------------------------------------------------------------+
|i20 : Q1 = holonomy({{a2,a3},{a4,a5}},{{a2,a4,a6},{a3,a5,a6}})   |
|                                                                 |
|o20 = Q1                                                         |
|                                                                 |
|o20 : LieAlgebra                                                 |
+-----------------------------------------------------------------+
|i21 : decompose Q1                                               |
|                                                                 |
|o21 = finitely generated ideal of Q1                             |
|                                                                 |
|o21 : FGLieIdeal                                                 |
+-----------------------------------------------------------------+
|i22 : basis(3,oo)                                                |
|                                                                 |
|o22 = {(a6 a5 a4), (a5 a6 a4)}                                   |
|                                                                 |
|o22 : List                                                       |
+-----------------------------------------------------------------+

Here is a way to obtain decompose(LieAlgebra),
(which is not used in the program). The direct sum of the local Lie algebras of
$Q1$ may be obtained as follows

+------------------------------------------------------------------+
|i23 : L0 = holonomyLocal(0,Q1)                                    |
|                                                                  |
|o23 = L0                                                          |
|                                                                  |
|o23 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i24 : L1 = holonomyLocal(1,Q1)                                    |
|                                                                  |
|o24 = L1                                                          |
|                                                                  |
|o24 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i25 : L2 = holonomyLocal(2,Q1)                                    |
|                                                                  |
|o25 = L2                                                          |
|                                                                  |
|o25 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i26 : L3 = holonomyLocal(3,Q1)                                    |
|                                                                  |
|o26 = L3                                                          |
|                                                                  |
|o26 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i27 : M = L0++L1++L2++L3                                          |
|                                                                  |
|o27 = M                                                           |
|                                                                  |
|o27 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i28 : gens M                                                      |
|                                                                  |
|o28 = {pr_0, pr_1, pr_2, pr_3, pr_4, pr_5, pr_6, pr_7, pr_8, pr_9}|
|                                                                  |
|o28 : List                                                        |
+------------------------------------------------------------------+

and the map from $Q1$ to $M$ is given as

+-----------------------------------------------------------------------+
|i29 : f = map(M,Q1,{pr_0+pr_4,pr_1+pr_7,pr_2+pr_5,pr_3+pr_8,pr_6+pr_9})|
|warning: the map might not be well defined,                            |
|         use isWellDefined                                             |
|                                                                       |
|o29 = f                                                                |
|                                                                       |
|o29 : LieAlgebraMap                                                    |
+-----------------------------------------------------------------------+
|i30 : describe f                                                       |
|                                                                       |
|o30 = a2 => pr_0 + pr_4                                                |
|      a3 => pr_1 + pr_7                                                |
|      a4 => pr_2 + pr_5                                                |
|      a5 => pr_3 + pr_8                                                |
|      a6 => pr_6 + pr_9                                                |
|      source => Q1                                                     |
|      target => M                                                      |
+-----------------------------------------------------------------------+

and  the ideal decompose(LieAlgebra), may be
obtained as the kernel of $f$:

+------------------------------+
|i31 : kernel f                |
|                              |
|o31 = ideal of Q1             |
|                              |
|o31 : LieIdeal                |
+------------------------------+
|i32 : basis(3,oo)             |
|                              |
|o32 = {(a6 a5 a4), (a5 a6 a4)}|
|                              |
|o32 : List                    |
+------------------------------+

The symmetric group S_4 operates on the vertices of K_4, and this induces an
action of S_4 on the six edges, which in turn induces an action of S_4 on $Q$
as automorphisms. One such permutation of the edges is (231645) but not
(231564). Using isIsomorphism(LieAlgebraMap),
it is possible to check if a permutation of
the generators, written as a rearrangement of the generators, defines an
automorphism of the Lie algebra.

+--------------------------------------------+
|i33 : use Q                                 |
+--------------------------------------------+
|i34 : f=map(Q,Q,{a2,a3,a1,a6,a4,a5})        |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o34 = f                                     |
|                                            |
|o34 : LieAlgebraMap                         |
+--------------------------------------------+
|i35 : g=map(Q,Q,{a2,a3,a1,a5,a6,a4})        |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o35 = g                                     |
|                                            |
|o35 : LieAlgebraMap                         |
+--------------------------------------------+
|i36 : isIsomorphism f                       |
|                                            |
|o36 = true                                  |
+--------------------------------------------+
|i37 : isIsomorphism g                       |
|                                            |
|o37 = false                                 |
+--------------------------------------------+
|i38 : describe f                            |
|                                            |
|o38 = a1 => a2                              |
|      a2 => a3                              |
|      a3 => a1                              |
|      a4 => a6                              |
|      a5 => a4                              |
|      a6 => a5                              |
|      source => Q                           |
|      target => Q                           |
+--------------------------------------------+

The ideal decompose(Q) is invariant under all automorphisms of $Q$. We may use
trace(ZZ,LieSubSpace,LieAlgebraMap),
and a character table for S_4 to
determine its irreducible representation constituents. There are four conjugacy
classes (except $id$). Representatives for them as permutations of the six
generators are, in cycle presentation, (23)(45), (123)(465), (16)(2354) and
(16)(25) corresponding, in S_4, to one 2-cycle, one 3-cycle, one 4-cycle and a
product of two 2-cycles.

+--------------------------------------------+
|i39 : I=decompose Q                         |
|                                            |
|o39 = I                                     |
|                                            |
|o39 : FGLieIdeal                            |
+--------------------------------------------+
|i40 : use Q                                 |
+--------------------------------------------+
|i41 : f1=map(Q,Q,{a1,a3,a2,a5,a4,a6})       |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o41 = f1                                    |
|                                            |
|o41 : LieAlgebraMap                         |
+--------------------------------------------+
|i42 : f2=map(Q,Q,{a2,a3,a1,a6,a4,a5})       |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o42 = f                                     |
|                                            |
|o42 : LieAlgebraMap                         |
+--------------------------------------------+
|i43 : f3=map(Q,Q,{a6,a3,a5,a2,a4,a1})       |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o43 = f3                                    |
|                                            |
|o43 : LieAlgebraMap                         |
+--------------------------------------------+
|i44 : f4=map(Q,Q,{a6,a5,a3,a4,a2,a1})       |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o44 = f4                                    |
|                                            |
|o44 : LieAlgebraMap                         |
+--------------------------------------------+
|i45 : trace(4,I,f1)                         |
|                                            |
|o45 = -1                                    |
|                                            |
|o45 : QQ                                    |
+--------------------------------------------+
|i46 : trace(4,I,f2)                         |
|                                            |
|o46 = 0                                     |
|                                            |
|o46 : QQ                                    |
+--------------------------------------------+
|i47 : trace(4,I,f3)                         |
|                                            |
|o47 = -1                                    |
|                                            |
|o47 : QQ                                    |
+--------------------------------------------+
|i48 : trace(4,I,f4)                         |
|                                            |
|o48 = 1                                     |
|                                            |
|o48 : QQ                                    |
+--------------------------------------------+

Making calculations with the character table for S_4, we see that $I$ in degree
4 is the sum of the nontrivial irreducible representations.

See also
========

  * First Lie algebra tutorial
  * Second Lie algebra tutorial
  * Differential Lie algebra tutorial

holonomy(...,Field=>...) -- optional argument for holonomy
**********************************************************

Synopsis
========

  * Usage:
        L = holonomy(A,Field => F)
        L = holonomy(A,B,Field => F)
  * Inputs:
      * F, a ring (Macaulay2Doc), the field of coefficients
      * A, a list (Macaulay2Doc),
      * B, a list (Macaulay2Doc),
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

This is an option for holonomy, to define the coefficient
field, which is QQ by default. You may use any "exact" field (not the real
numbers or the complex numbers), such as a prime field or an algebraic
extension, e.g., toField(ZZ/7[x]/ideal\{x^2+1\}) or a fraction field, e.g.,
frac(QQ[x]). Observe that it is necessary to use the function toField when $F$
is defined as an algebraic extension of a prime field.

+---------------------------------------------+
|i1 : F = toField(ZZ/7[x]/ideal{x^2+1})       |
|                                             |
|o1 = F                                       |
|                                             |
|o1 : PolynomialRing                          |
+---------------------------------------------+
|i2 : L = holonomy({{a,d}},{{a,b,c}},Field=>F)|
|                                             |
|o2 = L                                       |
|                                             |
|o2 : LieAlgebra                              |
+---------------------------------------------+
|i3 : (3*x+2) a b + (2*x+3) b a               |
|                                             |
|o3 = (-x+1)(c b)                             |
|                                             |
|o3 : L                                       |
+---------------------------------------------+

Further information
===================

  * Default value: QQ (Macaulay2Doc),
  * Function: holonomy, -- compute the holonomy Lie algebra
    associated to an arrangement or matroid
  * Option key: Field, -- name for an optional argument for
    lieAlgebra and holonomy

See also
========

  * lieAlgebra -- make a free Lie algebra
  * holonomy -- compute the holonomy Lie algebra associated to
    an arrangement or matroid
  * Second Lie algebra tutorial
  * Holonomy Lie algebras and symmetries

Functions with optional argument named Field :
==============================================

  * holonomy(...,Field=>...),
    -- optional argument for holonomy
  * lieAlgebra(...,Field=>...)
    -- optional argument for
    lieAlgebra

holonomyLocal -- compute the Lie algebra for a local subalgebra of the holonomy Lie algebra
*******************************************************************************************

Synopsis
========

  * Usage:
        L = holonomyLocal(i,H)
  * Inputs:
      * i, an integer (Macaulay2Doc), referring to the $i$th set,
        where the sets in the first input of holonomy are counted before the
        sets in the second input
      * H, an instance of the type LieAlgebra, the holonomy
        Lie algebra
  * Outputs:
      * L, an instance of the type LieAlgebra, the Lie
        subalgebra

Description
===========

The generators in the $i$th set (beginning with $i=0$) in the inputs of
holonomy, generate a subalgebra of the holonomy Lie algebra $H$, and
the output of holonomyLocal(i,H) is this Lie subalgebra. If the set is of size
$k$, then the local Lie algebra is free on $k$ generators if the set belongs to
the first input set, and it is free on $k-1$ generators in degrees $\ge 2$ if
it belongs to the second input set.

+----------------------------------------------------------+
|i1 : H=holonomy({{a1,a2},{a3,a4}},{{a1,a3,a5},{a2,a4,a5}})|
|                                                          |
|o1 = H                                                    |
|                                                          |
|o1 : LieAlgebra                                           |
+----------------------------------------------------------+
|i2 : describe holonomyLocal(1,H)                          |
|                                                          |
|o2 = generators => {a3, a4}                               |
|     Weights => {{1, 0}, {1, 0}}                          |
|     Signs => {0, 0}                                      |
|     ideal => {}                                          |
|     ambient => LieAlgebra{...10...}                      |
|     diff => {}                                           |
|     Field => QQ                                          |
|     computedDegree => 0                                  |
+----------------------------------------------------------+
|i3 : describe holonomyLocal(2,H)                          |
|                                                          |
|o3 = generators => {a1, a3, a5}                           |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}                  |
|     Signs => {0, 0, 0}                                   |
|     ideal => {(a3 a1) - (a5 a3), (a5 a1) + (a5 a3)}      |
|     ambient => LieAlgebra{...10...}                      |
|     diff => {}                                           |
|     Field => QQ                                          |
|     computedDegree => 0                                  |
+----------------------------------------------------------+

See also
========

  * holonomy -- compute the holonomy Lie algebra associated to
    an arrangement or matroid
  * decompose(LieAlgebra) -- compute the
    ideal associated to an arrangement or matroid
  * Holonomy Lie algebras and symmetries

Ways to use holonomyLocal :
===========================

  * "holonomyLocal(ZZ,LieAlgebra)"

For the programmer
==================

The object holonomyLocal, is a method function (Macaulay2Doc).

Homomorphisms and derivations
*****************************

A Lie algebra homomorphism $M \ \to\ L$ is defined using
map(LieAlgebra,LieAlgebra,List), by
giving the values in $L$ of the generators of $M$. A homomorphism preserves
weight and sign, and M#Field must be the same as L#Field.

+-------------------------------------------+
|i1 : M = lieAlgebra({x,y},Weights => {2,2})|
|                                           |
|o1 = M                                     |
|                                           |
|o1 : LieAlgebra                            |
+-------------------------------------------+
|i2 : L = lieAlgebra({a,b},Signs => 1)      |
|                                           |
|o2 = L                                     |
|                                           |
|o2 : LieAlgebra                            |
+-------------------------------------------+
|i3 : f1 = map(L,M,{a a,b b})               |
|                                           |
|o3 = f1                                    |
|                                           |
|o3 : LieAlgebraMap                         |
+-------------------------------------------+
|i4 : describe f1                           |
|                                           |
|o4 = x => (a a)                            |
|     y => (b b)                            |
|     source => M                           |
|     target => L                           |
+-------------------------------------------+

Like the situation for ring maps, the meaning of map(L,M) is that a generator
in $M$ is sent to the generator in $L$ with the same name, weight and sign if
there is such a generator, otherwise it is sent to zero.

+-----------------------------------------------+
|i5 : M = lieAlgebra{a,b,c}                     |
|                                               |
|o5 = M                                         |
|                                               |
|o5 : LieAlgebra                                |
+-----------------------------------------------+
|i6 : L = lieAlgebra({a,b,d},Weights => {2,1,1})|
|                                               |
|o6 = L                                         |
|                                               |
|o6 : LieAlgebra                                |
+-----------------------------------------------+
|i7 : f2 = map(L,M)                             |
|                                               |
|o7 = f2                                        |
|                                               |
|o7 : LieAlgebraMap                             |
+-----------------------------------------------+
|i8 : describe f2                               |
|                                               |
|o8 = a => 0                                    |
|     b => b                                    |
|     c => 0                                    |
|     source => M                               |
|     target => L                               |
+-----------------------------------------------+

Another similarity with ring maps is that a map $M \ \to\  L$ need not be well
defined, in the sense that the relations in $M$ need not be sent to zero in
$L$. It may also happen that the map does not commute with the differentials in
$M$ and $L$. All this can be checked up to a certain degree using
isWellDefined(ZZ,LieAlgebraMap). If $M$
is finitely presented, see Quotient Lie algebras and subspaces,
then it is possible to get the information that
the map is well defined and commutes with the differentials for all degrees, if
the first input $n$ in isWellDefined(n,f) is big enough.

+------------------------------------------------------------+
|i9 : F=lieAlgebra({a,b},Weights => {{1,0},{2,1}},Signs => 1,|
|         LastWeightHomological => true)                     |
|                                                            |
|o9 = F                                                      |
|                                                            |
|o9 : LieAlgebra                                             |
+------------------------------------------------------------+
|i10 : D=differentialLieAlgebra{0_F,a a}                     |
|                                                            |
|o10 = D                                                     |
|                                                            |
|o10 : LieAlgebra                                            |
+------------------------------------------------------------+
|i11 : f=map(D,F)                                            |
|warning: the map might not be well defined,                 |
|           use isWellDefined                                |
|                                                            |
|o11 = f                                                     |
|                                                            |
|o11 : LieAlgebraMap                                         |
+------------------------------------------------------------+
|i12 : isWellDefined(2,f)                                    |
|the map is well defined for all degrees                     |
|the map does not commute with the differential              |
|                                                            |
|o12 = false                                                 |
+------------------------------------------------------------+
|i13 : use F                                                 |
+------------------------------------------------------------+
|i14 : Q=F/{a a}                                             |
|                                                            |
|o14 = Q                                                     |
|                                                            |
|o14 : LieAlgebra                                            |
+------------------------------------------------------------+
|i15 : g=map(Q,D)                                            |
|warning: the map might not be well defined,                 |
|           use isWellDefined                                |
|                                                            |
|o15 = g                                                     |
|                                                            |
|o15 : LieAlgebraMap                                         |
+------------------------------------------------------------+
|i16 : isWellDefined(2,g)                                    |
|the map is well defined for all degrees                     |
|the map commutes with the differential for all degrees      |
|                                                            |
|o16 = true                                                  |
+------------------------------------------------------------+

Surjectivity for a Lie algebra map may be tested using
isSurjective(LieAlgebraMap). The input map
might not be well defined. The method function
isIsomorphism(LieAlgebraMap), may be used to
test if a Lie algebra map $f: M \ \to\  L$ is an isomorphism. Here $M$ and $L$
must be equal, but not necessarily identical. Also, $M$ must be finitely
presented. It is tested that the map is well defined, commutes with the
differentials and is surjective. Injectivity follows from this by dimension
reasons. See Holonomy Lie algebras and symmetries,
for applications where the map is a permutation of the
variables.

+---------------------+
|i17 : isSurjective f |
|                     |
|o17 = true           |
+---------------------+
|i18 : use F          |
+---------------------+
|i19 : Q1=F/{a a}     |
|                     |
|o19 = Q1             |
|                     |
|o19 : LieAlgebra     |
+---------------------+
|i20 : Q1===Q         |
|                     |
|o20 = false          |
+---------------------+
|i21 : Q1==Q          |
|                     |
|o21 = true           |
+---------------------+
|i22 : h=map(Q1,Q)    |
|                     |
|o22 = h              |
|                     |
|o22 : LieAlgebraMap  |
+---------------------+
|i23 : isIsomorphism h|
|                     |
|o23 = true           |
+---------------------+

A derivation $d: M \ \to\  L$ is defined using lieDerivation,
by giving a Lie algebra map $f: M \ \to\  L$ and a list of
elements in $L$ that are the values of $d$ on the generators of $M$. One may
use isWellDefined(ZZ,LieDerivation),
to test if a derivation is well defined,
which means that the relations in $M$ are sent to zero (the derivation need not
commute with the differentials).

+--------------------------------------------------------------------+
|i24 : use Q                                                         |
+--------------------------------------------------------------------+
|i25 : d=lieDerivation(g,{a b,b b})                                  |
|                                                                    |
|o25 = d                                                             |
|                                                                    |
|o25 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i26 : isWellDefined(2,d)                                            |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o26 = true                                                          |
+--------------------------------------------------------------------+
|i27 : use D                                                         |
+--------------------------------------------------------------------+
|i28 : f=map(D,F)                                                    |
|warning: the map might not be well defined,                         |
|           use isWellDefined                                        |
|                                                                    |
|o28 = f                                                             |
|                                                                    |
|o28 : LieAlgebraMap                                                 |
+--------------------------------------------------------------------+
|i29 : d=lieDerivation(f,{a b,b b})                                  |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o29 = d                                                             |
|                                                                    |
|o29 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i30 : isWellDefined(2,d)                                            |
|the map defining the                                                |
|            derivation is not well defined                          |
|                                                                    |
|o30 = false                                                         |
+--------------------------------------------------------------------+

Omitting the first input in lieDerivation, gives
derivations $d: L \ \to\  L$ with the identity map on $L$ as the defining map.

The following example shows a way to determine the derivations of a Lie algebra
studied by David Anick, which may be seen as the positive part of the twisted
loop algebra on sl_2. This also explains the periodic behaviour of the Lie
algebra.

+------------------------------------------------------------------+
|i31 : L = lieAlgebra{a,b}/{a a a b,b b b a}                       |
|                                                                  |
|o31 = L                                                           |
|                                                                  |
|o31 : LieAlgebra                                                  |
+------------------------------------------------------------------+
|i32 : dims(1,20,L)                                                |
|                                                                  |
|o32 = {2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1}|
|                                                                  |
|o32 : List                                                        |
+------------------------------------------------------------------+

The space of derivations of degree 0 is 2-dimensional, and contains the Euler
derivation, see euler(LieAlgebra), which is the
identity in degree 1.

+----------------------------+
|i33 : deuler = euler L      |
|                            |
|o33 = deuler                |
|                            |
|o33 : LieDerivation         |
+----------------------------+
|i34 : deuler b a b a b a b a|
|                            |
|o34 = 8 (b a b a b a b a)   |
|                            |
|o34 : L                     |
+----------------------------+

We will now prove that the space of derivations of degree 6 is 2-dimensional.
The space of linear maps from degree 1 to degree 7 is 4-dimensional. Not all of
them define derivations.

+--------------------------------------------------------------------+
|i35 : basis(7,L)                                                    |
|                                                                    |
|o35 = {(a b a b a b a), (b b a b a b a)}                            |
|                                                                    |
|o35 : List                                                          |
+--------------------------------------------------------------------+
|i36 : da61 = lieDerivation{a b a b a b a,0_L}                       |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o36 = da61                                                          |
|                                                                    |
|o36 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i37 : isWellDefined(4,da61)                                         |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o37 = true                                                          |
+--------------------------------------------------------------------+
|i38 : db61 = lieDerivation{0_L,a b a b a b a}                       |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o38 = db61                                                          |
|                                                                    |
|o38 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i39 : isWellDefined(4,db61)                                         |
|                                                                    |
|o39 = false                                                         |
+--------------------------------------------------------------------+
|i40 : da62 = lieDerivation{b b a b a b a,0_L}                       |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o40 = da62                                                          |
|                                                                    |
|o40 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i41 : isWellDefined(4,da62)                                         |
|                                                                    |
|o41 = false                                                         |
+--------------------------------------------------------------------+
|i42 : db62 = lieDerivation{0_L,b b a b a b a}                       |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o42 = db62                                                          |
|                                                                    |
|o42 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i43 : isWellDefined(4,db62)                                         |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o43 = true                                                          |
+--------------------------------------------------------------------+

The output displayed above shows that da61 and db62 are derivations. To
determine whether a linear combination of db61 and da62 is well defined (i.e.,
maps the relations in $L$ to zero), we consider derivations from the free Lie
algebra $M$ on $a,b$ to $L$.

+--------------------------------------------------+
|i44 : M = lieAlgebra{a,b}                         |
|                                                  |
|o44 = M                                           |
|                                                  |
|o44 : LieAlgebra                                  |
+--------------------------------------------------+
|i45 : f = map(L,M)                                |
|                                                  |
|o45 = f                                           |
|                                                  |
|o45 : LieAlgebraMap                               |
+--------------------------------------------------+
|i46 : use L                                       |
+--------------------------------------------------+
|i47 : dMb61 = lieDerivation(f,{0_L,a b a b a b a})|
|                                                  |
|o47 = dMb61                                       |
|                                                  |
|o47 : LieDerivation                               |
+--------------------------------------------------+
|i48 : dMa62 = lieDerivation(f,{b b a b a b a,0_L})|
|                                                  |
|o48 = dMa62                                       |
|                                                  |
|o48 : LieDerivation                               |
+--------------------------------------------------+
|i49 : use M                                       |
+--------------------------------------------------+
|i50 : dMb61 a a a b                               |
|                                                  |
|o50 = 0                                           |
|                                                  |
|o50 : L                                           |
+--------------------------------------------------+
|i51 : dMa62 a a a b                               |
|                                                  |
|o51 = 2 (b a b a b a b a b a)                     |
|                                                  |
|o51 : L                                           |
+--------------------------------------------------+

It follows from the output displayed above that the only linear combination of
dMb61 and dMa62 that is zero on (a a a b) is a multiple of dMb61, but we have
seen that dMb61 is not a derivation on $L$. Hence, the space of derivations of
degree 6 is 2-dimensional. Also, da61 + db62 is the inner derivation
corresponding to right multiplication with the basis element of degree 6, (b a
b a b a). This is seen by using innerDerivation.

+----------------------------------------------+
|i52 : use L                                   |
+----------------------------------------------+
|i53 : da61+db62===innerDerivation(b a b a b a)|
|                                              |
|o53 = true                                    |
+----------------------------------------------+

Since the dimension of the Lie algebra in degree 8 is 1, the dimension of the
space of derivations of degree 7 is at most 2.

+--------------------------------------------------------------------+
|i54 : da7=lieDerivation({b a b a b a b a,0_L})                      |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o54 = da7                                                           |
|                                                                    |
|o54 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i55 : isWellDefined(4,da7)                                          |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o55 = true                                                          |
+--------------------------------------------------------------------+
|i56 : db7=lieDerivation({0_L,b a b a b a b a})                      |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o56 = db7                                                           |
|                                                                    |
|o56 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i57 : isWellDefined(4,db7)                                          |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o57 = true                                                          |
+--------------------------------------------------------------------+
|i58 : da7===innerDerivation(b b a b a b a)                          |
|                                                                    |
|o58 = true                                                          |
+--------------------------------------------------------------------+
|i59 : db7===innerDerivation(a b a b a b a)                          |
|                                                                    |
|o59 = true                                                          |
+--------------------------------------------------------------------+

It follows from the output displayed above that the space of derivations of
degree 7 is also 2-dimensional, but consists only of inner derivations. The
conclusion is that the space of derivations of $L$ of positive degree modulo
the inner derivations is 1-dimensional in all even degrees, and 0 in all odd
degrees. We may also use LieDerivation LieDerivation,
to examine the structure of this quotient Lie algebra.

+--------------------------------------------------------------------+
|i60 : d2 = lieDerivation({a b a,0_L})                               |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o60 = d2                                                            |
|                                                                    |
|o60 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i61 : d4 = lieDerivation({a b a b a,0_L})                           |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o61 = d4                                                            |
|                                                                    |
|o61 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i62 : describe d2 d4                                                |
|                                                                    |
|o62 = a => (a b a b a b a)                                          |
|      b => 0                                                        |
|      map => id_L                                                   |
|      sign => 0                                                     |
|      weight => {6, 0}                                              |
|      source => L                                                   |
|      target => L                                                   |
+--------------------------------------------------------------------+

Define $dn$ ($n\ \ge\ 2$, $n$ even) as the derivation which maps $a$ to (a b a
b ... a) of length $n+1$ and $b$ to 0. It follows from the output displayed
above that [ $d2$, $d4$ ] = $d6$.

+--------------------------------------------------------------------+
|i63 : d6 = lieDerivation({a b a b a b a,0_L})                       |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o63 = da61                                                          |
|                                                                    |
|o63 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i64 : describe d2 d6                                                |
|                                                                    |
|o64 = a => 2 (a b a b a b a b a)                                    |
|      b => 0                                                        |
|      map => id_L                                                   |
|      sign => 0                                                     |
|      weight => {8, 0}                                              |
|      source => L                                                   |
|      target => L                                                   |
+--------------------------------------------------------------------+
|i65 : d16 = lieDerivation({a b a b a b a b a b a b a b a b a,0_L})  |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o65 = d16                                                           |
|                                                                    |
|o65 : LieDerivation                                                 |
+--------------------------------------------------------------------+
|i66 : describe d2 d16                                               |
|                                                                    |
|o66 = a => 7 (a b a b a b a b a b a b a b a b a b a)                |
|      b => 0                                                        |
|      map => id_L                                                   |
|      sign => 0                                                     |
|      weight => {18, 0}                                             |
|      source => L                                                   |
|      target => L                                                   |
+--------------------------------------------------------------------+

It follows from the output displayed above that [ $d2$, $d6$ ] = $2d8$ and [
$d2$, $d16$ ] = $7d18$. In fact, this Lie algebra is the infinite dimensional
filiform Lie algebra, which is the Witt algebra in positive degrees (with a
degree doubling).

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * lieDerivation -- make a graded derivation
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * isWellDefined(ZZ,LieDerivation)
    -- whether a Lie derivation is well
    defined
  * Differential Lie algebra tutorial

ideal(LieAlgebra) -- get the relations in a Lie algebra
*******************************************************

Synopsis
========

  * Function: ideal (Macaulay2Doc),
  * Usage:
        x=ideal(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * x, a list (Macaulay2Doc), $x$ may also be of type LieIdeal

Description
===========

The output is either the list of generators of the ideal or the ideal itself of
type LieIdeal.

+----------------------------------------+
|i1 : L=lieAlgebra{a,b}/{a a a b,b b b a}|
|                                        |
|o1 = L                                  |
|                                        |
|o1 : LieAlgebra                         |
+----------------------------------------+
|i2 : ideal L                            |
|                                        |
|o2 = { - (a a b a), (b b b a)}          |
|                                        |
|o2 : List                               |
+----------------------------------------+
|i3 : describe L                         |
|                                        |
|o3 = generators => {a, b}               |
|     Weights => {{1, 0}, {1, 0}}        |
|     Signs => {0, 0}                    |
|     ideal => { - (a a b a), (b b b a)} |
|     ambient => LieAlgebra{...10...}    |
|     diff => {}                         |
|     Field => QQ                        |
|     computedDegree => 0                |
+----------------------------------------+
|i4 : F=lieAlgebra{a,b}                  |
|                                        |
|o4 = F                                  |
|                                        |
|o4 : LieAlgebra                         |
+----------------------------------------+
|i5 : f=map(L,F)                         |
|                                        |
|o5 = f                                  |
|                                        |
|o5 : LieAlgebraMap                      |
+----------------------------------------+
|i6 : J=kernel f                         |
|                                        |
|o6 = J                                  |
|                                        |
|o6 : LieIdeal                           |
+----------------------------------------+
|i7 : N=F/J                              |
|                                        |
|o7 = N                                  |
|                                        |
|o7 : LieAlgebra                         |
+----------------------------------------+
|i8 : ideal N                            |
|                                        |
|o8 = J                                  |
|                                        |
|o8 : LieIdeal                           |
+----------------------------------------+

See also
========

  * lieIdeal -- make a Lie ideal
  * describe(LieAlgebra) -- real description

Ways to use this method:
========================

  * ideal(LieAlgebra) -- get the relations in a
    Lie algebra

image(LieAlgebraMap) -- make the image of a Lie algebra map
***********************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        I=image(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * I, an instance of the type FGLieSubAlgebra, the
        image of $f$, a finitely generated Lie subalgebra of the target of $f$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                                         |
|       Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},Signs=>{0,0,0,1,1,0},|
|       LastWeightHomological=>true)                                          |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}               |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : I=lieIdeal{b c - a c,a b,b r4 - a r4}                                   |
|                                                                             |
|o3 = I                                                                       |
|                                                                             |
|o3 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i4 : Q=D/I                                                                   |
|                                                                             |
|o4 = Q                                                                       |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : f=map(Q,D)                                                              |
|                                                                             |
|o5 = f                                                                       |
|                                                                             |
|o5 : LieAlgebraMap                                                           |
+-----------------------------------------------------------------------------+
|i6 : T=image(f)                                                              |
|                                                                             |
|o6 = T                                                                       |
|                                                                             |
|o6 : FGLieSubAlgebra                                                         |
+-----------------------------------------------------------------------------+
|i7 : isSurjective f                                                          |
|                                                                             |
|o7 = true                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation
  * image(LieDerivation) -- make the image of
    a Lie derivation
  * kernel(LieAlgebraMap) -- make the kernel
    of a map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * isSurjective(LieAlgebraMap), --
    whether a Lie map is surjective

Ways to use this method:
========================

  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map

image(LieAlgebraMap,LieSubSpace) -- make the image of a Lie subspace under a Lie algebra map
********************************************************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        I=image(f,S)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, a Lie subspace of the source of $f$
  * Outputs:
      * I, an instance of the type LieSubSpace, an instance
        of LieSubSpace, the image $f(S)$, a Lie subspace of the target of $f$

Description
===========

If $S$ is of type FGLieSubAlgebra, then image(f,S) is of type FGLieSubAlgebra.
If $S$ is an instance of LieSubAlgebra, but not of FGLieSubAlgebra, then
image(f,S) is of type LieSubAlgebra. Otherwise, image(f,S) is of type
LieSubSpace.

+-----------------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                                         |
|       Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},Signs=>{0,0,0,1,1,0},|
|       LastWeightHomological=>true)                                          |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}               |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : I=lieIdeal{b c - a c,a b,b r4 - a r4}                                   |
|                                                                             |
|o3 = I                                                                       |
|                                                                             |
|o3 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i4 : S=lieIdeal{a c}                                                         |
|                                                                             |
|o4 = S                                                                       |
|                                                                             |
|o4 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i5 : Q=D/I                                                                   |
|                                                                             |
|o5 = Q                                                                       |
|                                                                             |
|o5 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i6 : f=map(Q,D)                                                              |
|                                                                             |
|o6 = f                                                                       |
|                                                                             |
|o6 : LieAlgebraMap                                                           |
+-----------------------------------------------------------------------------+
|i7 : T=image(f,S)                                                            |
|                                                                             |
|o7 = T                                                                       |
|                                                                             |
|o7 : LieSubAlgebra                                                           |
+-----------------------------------------------------------------------------+
|i8 : basis(5,T)                                                              |
|                                                                             |
|o8 = {(b b b c), (c b c)}                                                    |
|                                                                             |
|o8 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation
  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map
  * image(LieDerivation) -- make the image of
    a Lie derivation
  * kernel(LieAlgebraMap) -- make the kernel
    of a map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map

Ways to use this method:
========================

  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map

image(LieDerivation) -- make the image of a Lie derivation
**********************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        I=image(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * I, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, the image of $d$

Description
===========

If $d$ is a differential on a Lie algebra $L$, then image(d) (which is the same
as the boundaries of $L$) is of type LieSubAlgebra. Otherwise, image(d) is of
type LieSubSpace.

+-----------------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                                         |
|       Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},Signs=>{0,0,0,1,1,0},|
|       LastWeightHomological=>true)                                          |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}               |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : d=differential D                                                        |
|                                                                             |
|o3 = d                                                                       |
|                                                                             |
|o3 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i4 : J=image(d)                                                              |
|                                                                             |
|o4 = J                                                                       |
|                                                                             |
|o4 : LieSubAlgebra                                                           |
+-----------------------------------------------------------------------------+
|i5 : dims(6,J)                                                               |
|                                                                             |
|o5 = | 0 0 1 2 5 11 |                                                        |
|     | 0 0 0 1 2 6  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|                                                                             |
|              6        6                                                     |
|o5 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i6 : dims(6,boundaries D)                                                    |
|                                                                             |
|o6 = | 0 0 1 2 5 11 |                                                        |
|     | 0 0 0 1 2 6  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|     | 0 0 0 0 0 0  |                                                        |
|                                                                             |
|              6        6                                                     |
|o6 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+

See also
========

  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation
  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map
  * kernel(LieDerivation) -- make the kernel
    of a map
  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation
  * boundaries -- make the subalgebra of boundaries

Ways to use this method:
========================

  * image(LieDerivation) -- make the image of
    a Lie derivation

image(LieDerivation,LieSubSpace) -- make the image of a Lie subspace under a Lie derivation
*******************************************************************************************

Synopsis
========

  * Function: image (Macaulay2Doc),
  * Usage:
        I=image(d,S)
  * Inputs:
      * d, an instance of the type LieDerivation,
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, a Lie subspace of the source of $d$
  * Outputs:
      * I, an instance of the type LieSubSpace, an instance
        of LieSubSpace, the image $d(S)$, a Lie subspace of the target of $d$

Description
===========

If $d$ is a differential on a Lie algebra $L$ and $S$ is an ideal in $L$, then
image(d,S) is of type LieSubAlgebra. Otherwise, image(d,S) is of type
LieSubSpace.

+-----------------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                                         |
|       Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},Signs=>{0,0,0,1,1,0},|
|       LastWeightHomological=>true)                                          |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}               |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : S=lieIdeal{a r3}                                                        |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i4 : d=differential D                                                        |
|                                                                             |
|o4 = d                                                                       |
|                                                                             |
|o4 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i5 : T=image(d,S)                                                            |
|                                                                             |
|o5 = T                                                                       |
|                                                                             |
|o5 : LieSubAlgebra                                                           |
+-----------------------------------------------------------------------------+
|i6 : basis(5,T)                                                              |
|                                                                             |
|o6 = {(b a a c), (a a a c)}                                                  |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map
  * image(LieDerivation) -- make the image of
    a Lie derivation
  * kernel(LieDerivation) -- make the kernel
    of a map
  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation

Ways to use this method:
========================

  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation

indexForm -- get a Lie element in the polynomial ring representation
********************************************************************

Synopsis
========

  * Usage:
        r=indexForm(a)
  * Inputs:
      * a, an instance of the type LieElement,
  * Outputs:
      * r, a ring element (Macaulay2Doc), the element in
        L#cache.mbRing corresponding to the input.

Description
===========

The ring L#cache.mbRing, see mbRing, is used to get an output of
Lie elements with indexed basis elements, which sometimes is better to use than
the iterated Lie products of generators, especially in high degrees. Use
indexForm, to get the output in  L#cache.mbRing and
standardForm(RingElement,LieAlgebra),
to get back the standard output.
The ring mbRing, is very large: it has as many generators as the
total dimension of the computed Lie algebra. For this reason, you should give
the ring a name to avoid a large output. When $x$ is a linear polynomial in
L#cache.mbRing, the composition indexForm(standardForm(x) gives back $x$ . When
$x$ is a Lie element in $L$, the composition standardForm(indexForm x) is equal
to $x$ modulo the relations in $L$.

+-------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}                                   |
|                                                             |
|o1 = L                                                       |
|                                                             |
|o1 : LieAlgebra                                              |
+-------------------------------------------------------------+
|i2 : x = (basis(2,L))_0 (basis(3,L))_4                       |
|                                                             |
|o2 =  - (a c b b a) + (b a c b a) - (b c a b a) + (c b a b a)|
|                                                             |
|o2 : L                                                       |
+-------------------------------------------------------------+
|i3 : R = L#cache.mbRing                                      |
|                                                             |
|o3 = R                                                       |
|                                                             |
|o3 : PolynomialRing                                          |
+-------------------------------------------------------------+
|i4 : numgens R                                               |
|                                                             |
|o4 = 80                                                      |
+-------------------------------------------------------------+
|i5 : indexForm x                                             |
|                                                             |
|o5 = mb       - mb       - mb        + mb                    |
|       {5, 5}     {5, 7}     {5, 12}     {5, 15}             |
|                                                             |
|o5 : R                                                       |
+-------------------------------------------------------------+
|i6 : standardForm(oo,L)                                      |
|                                                             |
|o6 =  - (a c b b a) + (b a c b a) - (b c a b a) + (c b a b a)|
|                                                             |
|o6 : L                                                       |
+-------------------------------------------------------------+
|i7 : indexForm a a b c                                       |
|                                                             |
|o7 = - mb       + 2mb       - mb                             |
|         {4, 2}      {4, 5}     {4, 9}                       |
|                                                             |
|o7 : R                                                       |
+-------------------------------------------------------------+
|i8 : standardForm(oo,L)                                      |
|                                                             |
|o8 = 2 (a c b a) - (b a c a) - (c a b a)                     |
|                                                             |
|o8 : L                                                       |
+-------------------------------------------------------------+
|i9 : a a b c===oo                                            |
|                                                             |
|o9 = true                                                    |
+-------------------------------------------------------------+

See also
========

  * mbRing -- a polynomial ring representation of the Lie
    algebra used for output
  * coefficients(LieElement) -- get the
    coefficients and monomials of a Lie element

Ways to use indexForm :
=======================

  * "indexForm(LieElement)"

For the programmer
==================

The object indexForm, is a method function (Macaulay2Doc).

innerDerivation -- make the derivation defined by right Lie multiplication by a Lie element
*******************************************************************************************

Synopsis
========

  * Usage:
        d=innerDerivation(u)
  * Inputs:
      * u, an instance of the type LieElement,
  * Outputs:
      * d, an instance of the type LieDerivation, the
        inner derivation defined by $x$ \ \to\  [$x$,$u$]

Description
===========

+----------------------------+
|i1 : L = lieAlgebra{a,b}    |
|                            |
|o1 = L                      |
|                            |
|o1 : LieAlgebra             |
+----------------------------+
|i2 : d=innerDerivation a a b|
|                            |
|o2 = d                      |
|                            |
|o2 : LieDerivation          |
+----------------------------+
|i3 : describe d             |
|                            |
|o3 = a =>  - (a a b a)      |
|     b =>  - (b a b a)      |
|     map => id_L            |
|     sign => 0              |
|     weight => {3, 0}       |
|     source => L            |
|     target => L            |
+----------------------------+
|i4 : a (a a b)              |
|                            |
|o4 =  - (a a b a)           |
|                            |
|o4 : L                      |
+----------------------------+
|i5 : b (a a b)              |
|                            |
|o5 =  - (b a b a)           |
|                            |
|o5 : L                      |
+----------------------------+

See also
========

  * lieDerivation -- make a graded derivation
  * LieDerivation -- the class of all Lie algebra
    derivations

Ways to use innerDerivation :
=============================

  * "innerDerivation(LieElement)"

For the programmer
==================

The object innerDerivation, is a method function (Macaulay2Doc).

inverse(LieAlgebraMap,LieSubSpace) -- make the inverse image of a Lie subspace under a Lie algebra map
******************************************************************************************************

Synopsis
========

  * Function: inverse (Macaulay2Doc),
  * Usage:
        I=inverse(f,S)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, a Lie subspace of the target of $f$
  * Outputs:
      * I, an instance of the type LieSubSpace, an instance
        of LieSubSpace, a Lie subspace of the source of $f$, the inverse image
        of $S$ under $f$,

Description
===========

If $S$ is an instance of LieIdeal, then $I$ is of type LieIdeal. If $S$ is an
instance of  LieSubAlgebra but not of LieIdeal, then $I$ is of type
LieSubAlgebra. Otherwise, $I$ is of type LieSubSpace.

+--------------------------+
|i1 : F=lieAlgebra{a,b,c}  |
|                          |
|o1 = F                    |
|                          |
|o1 : LieAlgebra           |
+--------------------------+
|i2 : I=lieIdeal{b c - a c}|
|                          |
|o2 = I                    |
|                          |
|o2 : FGLieIdeal           |
+--------------------------+
|i3 : Q=F/I                |
|                          |
|o3 = Q                    |
|                          |
|o3 : LieAlgebra           |
+--------------------------+
|i4 : f=map(Q,F)           |
|                          |
|o4 = f                    |
|                          |
|o4 : LieAlgebraMap        |
+--------------------------+
|i5 : J=lieIdeal{a b}      |
|                          |
|o5 = J                    |
|                          |
|o5 : FGLieIdeal           |
+--------------------------+
|i6 : K=inverse(f,J)       |
|                          |
|o6 = K                    |
|                          |
|o6 : LieIdeal             |
+--------------------------+
|i7 : dims(1,6,F/K)        |
|                          |
|o7 = {3, 1, 2, 3, 6, 9}   |
|                          |
|o7 : List                 |
+--------------------------+
|i8 : dims(1,6,Q/J)        |
|                          |
|o8 = {3, 1, 2, 3, 6, 9}   |
|                          |
|o8 : List                 |
+--------------------------+

See also
========

  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * kernel(LieAlgebraMap) -- make the kernel
    of a map

Ways to use this method:
========================

  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map

inverse(LieDerivation,LieSubSpace) -- make the inverse image of a Lie subspace under a Lie derivation
*****************************************************************************************************

Synopsis
========

  * Function: inverse (Macaulay2Doc),
  * Usage:
        I=inverse(d,S)
  * Inputs:
      * d, an instance of the type LieDerivation,
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, a Lie subspace of the target of $d$
  * Outputs:
      * I, an instance of the type LieSubSpace, a Lie
        subspace of the source of $d$, the inverse image of $S$ under $d$, an
        instance of LieSubSpace

Description
===========

If $S$ is an instance of LieIdeal, then $I$ is of type LieSubAlgebra.
Otherwise, $I$ is of type LieSubSpace.

+--------------------------------------------------------------------+
|i1 : F = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},           |
|         Signs=>{1,1,1},LastWeightHomological=>true)                |
|                                                                    |
|o1 = F                                                              |
|                                                                    |
|o1 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i2 : D = differentialLieAlgebra({0_F,a a,a b})                      |
|                                                                    |
|o2 = D                                                              |
|                                                                    |
|o2 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i3 : d = differential D                                             |
|                                                                    |
|o3 = d                                                              |
|                                                                    |
|o3 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i4 : B = boundaries D                                               |
|                                                                    |
|o4 = B                                                              |
|                                                                    |
|o4 : LieSubAlgebra                                                  |
+--------------------------------------------------------------------+
|i5 : x = (a a b a c) + (a a a b c)                                  |
|                                                                    |
|o5 = (a a b a c) + (a a a b c)                                      |
|                                                                    |
|o5 : D                                                              |
+--------------------------------------------------------------------+
|i6 : member(x,B)                                                    |
|                                                                    |
|o6 = true                                                           |
+--------------------------------------------------------------------+
|i7 : S = inverse(d,lieIdeal{x})                                     |
|                                                                    |
|o7 = S                                                              |
|                                                                    |
|o7 : LieSubAlgebra                                                  |
+--------------------------------------------------------------------+
|i8 : weight x                                                       |
|                                                                    |
|o8 = {8, 3}                                                         |
|                                                                    |
|o8 : List                                                           |
+--------------------------------------------------------------------+
|i9 : basis(8,4,S)                                                   |
|                                                                    |
|o9 = {(a a c c), (b b a c) + (b a b c)}                             |
|                                                                    |
|o9 : List                                                           |
+--------------------------------------------------------------------+
|i10 : d\oo                                                          |
|                                                                    |
|o10 = {2 (a a b a c) + 2 (a a a b c), 2 (a a b a c) + 2 (a a a b c)}|
|                                                                    |
|o10 : List                                                          |
+--------------------------------------------------------------------+

See also
========

  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * kernel(LieAlgebraMap) -- make the kernel
    of a map

Ways to use this method:
========================

  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation

isIsomorphism(LieAlgebraMap) -- whether a Lie map is an isomorphism
*******************************************************************

Synopsis
========

  * Function: isIsomorphism (Macaulay2Doc),
  * Usage:
        b=isIsomorphism(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap, source
        f == target f
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if $f$ is an
        isomorphism, false otherwise

Description
===========

It is checked that $f$ is surjective and well defined (and commutes with the
differential). It follows from this that $f$ is also injective, since the
dimensions of source f and target f are equal in each degree.

+------------------------------------------------------------+
|i1 : L=holonomy{{a0,a1,a2},{a0,a3,a4},{a1,a3,a5},{a2,a4,a5}}|
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : f=map(L,L,{a5,a2,a4,a1,a3,a0})                         |
|warning: the map might not be well defined,                 |
|         use isWellDefined                                  |
|                                                            |
|o2 = f                                                      |
|                                                            |
|o2 : LieAlgebraMap                                          |
+------------------------------------------------------------+
|i3 : isIsomorphism f                                        |
|                                                            |
|o3 = true                                                   |
+------------------------------------------------------------+
|i4 : g=map(L,L,{a5,a0,a1,a2,a3,a4})                         |
|warning: the map might not be well defined,                 |
|         use isWellDefined                                  |
|                                                            |
|o4 = g                                                      |
|                                                            |
|o4 : LieAlgebraMap                                          |
+------------------------------------------------------------+
|i5 : isIsomorphism g                                        |
|                                                            |
|o5 = false                                                  |
+------------------------------------------------------------+

See also
========

  * trace(ZZ,LieSubSpace,LieAlgebraMap)
    -- compute the trace of a Lie
    algebra map acting on a Lie subspace
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * Holonomy Lie algebras and symmetries

Ways to use this method:
========================

  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism

isSurjective(LieAlgebraMap) -- whether a Lie map is surjective
**************************************************************

Synopsis
========

  * Function: isSurjective (Macaulay2Doc),
  * Usage:
        f=isSurjective(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if $f$ is
        surjective, false otherwise

Description
===========

The map may not be well defined. Use isWellDefined(ZZ,LieAlgebraMap),
to test if the map is well defined.

+------------------------------------------------------+
|i1 : F=lieAlgebra{a,b,c}                              |
|                                                      |
|o1 = F                                                |
|                                                      |
|o1 : LieAlgebra                                       |
+------------------------------------------------------+
|i2 : L=F/{a b,a b c}                                  |
|                                                      |
|o2 = L                                                |
|                                                      |
|o2 : LieAlgebra                                       |
+------------------------------------------------------+
|i3 : M=minimalModel(3,L)                              |
|                                                      |
|o3 = M                                                |
|                                                      |
|o3 : LieAlgebra                                       |
+------------------------------------------------------+
|i4 : isSurjective map M                               |
|                                                      |
|o4 = true                                             |
+------------------------------------------------------+
|i5 : f=map(F,L)                                       |
|warning: the map might not be well defined,           |
|           use isWellDefined                          |
|                                                      |
|o5 = f                                                |
|                                                      |
|o5 : LieAlgebraMap                                    |
+------------------------------------------------------+
|i6 : isSurjective f                                   |
|                                                      |
|o6 = true                                             |
+------------------------------------------------------+
|i7 : isWellDefined(3,f)                               |
|the map is not well defined                           |
|the map commutes with the differential for all degrees|
|                                                      |
|o7 = false                                            |
+------------------------------------------------------+
|i8 : g=map(L,F)                                       |
|                                                      |
|o8 = g                                                |
|                                                      |
|o8 : LieAlgebraMap                                    |
+------------------------------------------------------+
|i9 : isSurjective g                                   |
|                                                      |
|o9 = true                                             |
+------------------------------------------------------+

See also
========

  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map

Ways to use this method:
========================

  * isSurjective(LieAlgebraMap), --
    whether a Lie map is surjective

isWellDefined(ZZ,LieAlgebraMap) -- whether a Lie map is well defined
********************************************************************

Synopsis
========

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        b=isWellDefined(n,f)
  * Inputs:
      * n, an integer (Macaulay2Doc), the degree
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if $f$ is well
        defined and commutes with the differentials up to degree $n$, false
        otherwise

Description
===========

It is checked that the map $f: M \ \to\  L$ maps the relations in $M$ to 0 up
to degree $n$ and that $f$ commutes with the differentials in $M$ and $L$. If
$n$ is big enough and ideal(M) is of type List, then it is possible to get that
$f$ maps all relations to 0, which is noted as the message "the map is well
defined for all degrees". This may happen even if the map does not commute with
the differential (see g in the example below).

+---------------------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>1,LastWeightHomological=>true,              |
|         Weights=>{{1,0},{2,1}})                                           |
|                                                                           |
|o1 = L                                                                     |
|                                                                           |
|o1 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i2 : F=lieAlgebra({a,b,c},                                                 |
|         Weights=>{{1,0},{2,1},{5,2}},Signs=>1,LastWeightHomological=>true)|
|                                                                           |
|o2 = F                                                                     |
|                                                                           |
|o2 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i3 : D=differentialLieAlgebra{0_F,a a,a a a b}                             |
|                                                                           |
|o3 = D                                                                     |
|                                                                           |
|o3 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i4 : Q1=D/{a a a a b,a b a b + a c}                                        |
|                                                                           |
|o4 = Q1                                                                    |
|                                                                           |
|o4 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i5 : use F                                                                 |
+---------------------------------------------------------------------------+
|i6 : Q2=F/{a a a a b,a b a b + a c}                                        |
|                                                                           |
|o6 = Q2                                                                    |
|                                                                           |
|o6 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i7 : f=map(D,Q1)                                                           |
|warning: the map might not be well defined,                                |
|           use isWellDefined                                               |
|                                                                           |
|o7 = f                                                                     |
|                                                                           |
|o7 : LieAlgebraMap                                                         |
+---------------------------------------------------------------------------+
|i8 : isWellDefined(6,f)                                                    |
|the map is not well defined                                                |
|the map commutes with the differential for all degrees                     |
|                                                                           |
|o8 = false                                                                 |
+---------------------------------------------------------------------------+
|i9 : g=map(Q1,Q2)                                                          |
|warning: the map might not be well defined,                                |
|           use isWellDefined                                               |
|                                                                           |
|o9 = g                                                                     |
|                                                                           |
|o9 : LieAlgebraMap                                                         |
+---------------------------------------------------------------------------+
|i10 : isWellDefined(6,g)                                                   |
|the map is well defined for all degrees                                    |
|the map does not commute with the differential                             |
|                                                                           |
|o10 = false                                                                |
+---------------------------------------------------------------------------+
|i11 : h=map(Q1,D)                                                          |
|                                                                           |
|o11 = h                                                                    |
|                                                                           |
|o11 : LieAlgebraMap                                                        |
+---------------------------------------------------------------------------+
|i12 : isWellDefined(6,h)                                                   |
|the map is well defined for all degrees                                    |
|the map commutes with the differential for all degrees                     |
|                                                                           |
|o12 = true                                                                 |
+---------------------------------------------------------------------------+

See also
========

  * isWellDefined(ZZ,LieDerivation)
    -- whether a Lie derivation is well
    defined
  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism
  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * Homomorphisms and derivations

Ways to use this method:
========================

  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined

isWellDefined(ZZ,LieDerivation) -- whether a Lie derivation is well defined
***************************************************************************

Synopsis
========

  * Function: isWellDefined (Macaulay2Doc),
  * Usage:
        b=isWellDefined(n,d)
  * Inputs:
      * n, an integer (Macaulay2Doc), the degree
      * d, an instance of the type LieDerivation,
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if $d$ is well
        defined up to degree $n$, false otherwise

Description
===========

It is checked that the derivation $(d,f): M \ \to\  L$ maps the ideal of
relations in $M$ to 0 up to degree $n$. More precisely, if $M=F/I$ where $F$ is
free, and $p$ is the projection $F$ \ \to\  $M$, then the derivation
$(d*p,f*p): F \ \to\  L$ maps $I$ to 0 in degrees $\le\ n$. If $n$ is big
enough and $I$ is a list, then it is possible to get the information "the
derivation is well defined for all degrees".

+--------------------------------------------------------------------+
|i1 : F=lieAlgebra{a,b}                                              |
|                                                                    |
|o1 = F                                                              |
|                                                                    |
|o1 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i2 : L=F/{a a a b,b b b a}                                          |
|                                                                    |
|o2 = L                                                              |
|                                                                    |
|o2 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i3 : e=euler L                                                      |
|                                                                    |
|o3 = e                                                              |
|                                                                    |
|o3 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i4 : isWellDefined(4,e)                                             |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o4 = true                                                           |
+--------------------------------------------------------------------+
|i5 : d4=lieDerivation{0_L,a b a b a}                                |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o5 = d4                                                             |
|                                                                    |
|o5 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i6 : isWellDefined(4,d4)                                            |
|                                                                    |
|o6 = false                                                          |
+--------------------------------------------------------------------+
|i7 : d5=lieDerivation{0_L,b a b a b a}                              |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o7 = d5                                                             |
|                                                                    |
|o7 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i8 : isWellDefined(4,d5)                                            |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o8 = true                                                           |
+--------------------------------------------------------------------+
|i9 : di=innerDerivation(a b a b a)                                  |
|                                                                    |
|o9 = d5                                                             |
|                                                                    |
|o9 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i10 : isWellDefined(4,di)                                           |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o10 = true                                                          |
+--------------------------------------------------------------------+
|i11 : di===d5                                                       |
|                                                                    |
|o11 = true                                                          |
+--------------------------------------------------------------------+

See also
========

  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * lieDerivation -- make a graded derivation
  * Homomorphisms and derivations

Ways to use this method:
========================

  * isWellDefined(ZZ,LieDerivation)
    -- whether a Lie derivation is well
    defined

kernel(LieAlgebraMap) -- make the kernel of a map
*************************************************

Synopsis
========

  * Function: kernel (Macaulay2Doc),
  * Usage:
        I=kernel(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Optional inputs (Macaulay2Doc),:
      * SubringLimit (Macaulay2Doc),
        => ..., default value infinity, null
  * Outputs:
      * I, an instance of the type LieIdeal, the kernel of $f$

Description
===========

The optional input given above is not relevant for Lie algebras.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|            Signs=>{1,1,1},LastWeightHomological=>true)  |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : Q=D/{b b+4 a c}                                     |
|                                                         |
|o3 = Q                                                   |
|                                                         |
|o3 : LieAlgebra                                          |
+---------------------------------------------------------+
|i4 : R=Q/{a b b}                                         |
|                                                         |
|o4 = R                                                   |
|                                                         |
|o4 : LieAlgebra                                          |
+---------------------------------------------------------+
|i5 : f=map(R,Q)                                          |
|                                                         |
|o5 = f                                                   |
|                                                         |
|o5 : LieAlgebraMap                                       |
+---------------------------------------------------------+
|i6 : I=kernel f                                          |
|                                                         |
|o6 = I                                                   |
|                                                         |
|o6 : LieIdeal                                            |
+---------------------------------------------------------+
|i7 : basis(6,I)                                          |
|                                                         |
|o7 = {(a a a a b), (a a a c)}                            |
|                                                         |
|o7 : List                                                |
+---------------------------------------------------------+

See also
========

  * kernel(LieDerivation) -- make the kernel
    of a map
  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map

Ways to use this method:
========================

  * kernel(LieAlgebraMap) -- make the kernel
    of a map

kernel(LieDerivation) -- make the kernel of a map
*************************************************

Synopsis
========

  * Function: kernel (Macaulay2Doc),
  * Usage:
        I=kernel(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Optional inputs (Macaulay2Doc),:
      * SubringLimit (Macaulay2Doc),
        => ..., default value infinity, null
  * Outputs:
      * I, an instance of the type LieSubSpace, an instance
        of LieSubSpace, the kernel of $d$

Description
===========

The optional input given above is not relevant for Lie algebras. If $d$
commutes with the differentials in the source and target of $d$, then the
output is of type LieSubAlgebra. Otherwise, the output is of type LieSubSpace.

+---------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},|
|            Signs=>{1,1,1},LastWeightHomological=>true)  |
|                                                         |
|o1 = L                                                   |
|                                                         |
|o1 : LieAlgebra                                          |
+---------------------------------------------------------+
|i2 : D= differentialLieAlgebra({0_L,a a,a b})            |
|                                                         |
|o2 = D                                                   |
|                                                         |
|o2 : LieAlgebra                                          |
+---------------------------------------------------------+
|i3 : Q=D/{b b+4 a c}                                     |
|                                                         |
|o3 = Q                                                   |
|                                                         |
|o3 : LieAlgebra                                          |
+---------------------------------------------------------+
|i4 : d=differential Q                                    |
|                                                         |
|o4 = d                                                   |
|                                                         |
|o4 : LieDerivation                                       |
+---------------------------------------------------------+
|i5 : Z=kernel d                                          |
|                                                         |
|o5 = Z                                                   |
|                                                         |
|o5 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i6 : C=cycles Q                                          |
|                                                         |
|o6 = C                                                   |
|                                                         |
|o6 : LieSubAlgebra                                       |
+---------------------------------------------------------+
|i7 : dims(8,Z)                                           |
|                                                         |
|o7 = | 1 1 0 0 0 0 0 0 |                                 |
|     | 0 0 1 1 1 1 1 1 |                                 |
|     | 0 0 0 0 0 0 1 2 |                                 |
|     | 0 0 0 0 1 1 1 1 |                                 |
|     | 0 0 0 0 0 0 0 1 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|                                                         |
|              8        8                                 |
|o7 : Matrix ZZ  <--- ZZ                                  |
+---------------------------------------------------------+
|i8 : dims(8,C)                                           |
|                                                         |
|o8 = | 1 1 0 0 0 0 0 0 |                                 |
|     | 0 0 1 1 1 1 1 1 |                                 |
|     | 0 0 0 0 0 0 1 2 |                                 |
|     | 0 0 0 0 1 1 1 1 |                                 |
|     | 0 0 0 0 0 0 0 1 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|     | 0 0 0 0 0 0 0 0 |                                 |
|                                                         |
|              8        8                                 |
|o8 : Matrix ZZ  <--- ZZ                                  |
+---------------------------------------------------------+

See also
========

  * kernel(LieAlgebraMap) -- make the kernel
    of a map
  * image(LieDerivation) -- make the image of
    a Lie derivation
  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation

Ways to use this method:
========================

  * kernel(LieDerivation) -- make the kernel
    of a map

koszulDual -- compute the Lie algebra whose enveloping algebra is the Koszul dual of a quadratic algebra
********************************************************************************************************

Synopsis
========

  * Usage:
        L = koszulDual(Q)
  * Inputs:
      * Q, a quotient ring (Macaulay2Doc), the input type
        may also be PolynomialRing (Macaulay2Doc),
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

The input $Q$ is a quotient of a polynomial algebra by a quadratic ideal (which
might be 0). Some of the variables may be declared as SkewCommutative.
Moreover, the variables may have multi-degrees where the first degree is equal
to $1$. The quadratic ideal must be homogeneous with respect to the
multi-degree and the "skew-degree". The output is the Lie algebra whose
enveloping algebra is the Koszul dual of $Q$.

+-------------------------------------------------+
|i1 : R1=QQ[x,y,z, SkewCommutative=>{y,z}]        |
|                                                 |
|o1 = R1                                          |
|                                                 |
|o1 : PolynomialRing, 2 skew commutative variables|
+-------------------------------------------------+
|i2 : I1={x^2,y*z}                                |
|                                                 |
|       2                                         |
|o2 = {x , y*z}                                   |
|                                                 |
|o2 : List                                        |
+-------------------------------------------------+
|i3 : L1=koszulDual(R1/ideal I1)                  |
|                                                 |
|o3 = L1                                          |
|                                                 |
|o3 : LieAlgebra                                  |
+-------------------------------------------------+
|i4 : describe L1                                 |
|                                                 |
|o4 = generators => {ko , ko , ko }               |
|                      0    1    2                |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}         |
|     Signs => {1, 0, 0}                          |
|     ideal => { - (ko_1 ko_0),  - (ko_2 ko_0)}   |
|     ambient => LieAlgebra{...10...}             |
|     diff => {}                                  |
|     Field => QQ                                 |
|     computedDegree => 0                         |
+-------------------------------------------------+
|i5 : E1=extAlgebra(3,L1)                         |
|                                                 |
|o5 = E1                                          |
|                                                 |
|o5 : ExtAlgebra                                  |
+-------------------------------------------------+
|i6 : dims(3,E1)                                  |
|                                                 |
|o6 = | 3 0 0 |                                   |
|     | 0 2 0 |                                   |
|     | 0 0 0 |                                   |
|                                                 |
|              3        3                         |
|o6 : Matrix ZZ  <--- ZZ                          |
+-------------------------------------------------+

Here is an example of a non-Koszul algebra. The table for the Ext-algebra has a
non-zero occurrence off the diagonal.

+-----------------------------------------------------------------------------+
|i7 : R2=QQ[x,y,z, SkewCommutative=>{},Degrees=>{{1,1},{1,2},{1,3}}]          |
|                                                                             |
|o7 = R2                                                                      |
|                                                                             |
|o7 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i8 : I2=ideal{y^2+x*z,x*y,z^2}                                               |
|                                                                             |
|             2              2                                                |
|o8 = ideal (y  + x*z, x*y, z )                                               |
|                                                                             |
|o8 : Ideal of R2                                                             |
+-----------------------------------------------------------------------------+
|i9 : L2=koszulDual(R2/I2)                                                    |
|                                                                             |
|o9 = L2                                                                      |
|                                                                             |
|o9 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i10 : describe L2                                                            |
|                                                                             |
|o10 = generators => {ko , ko , ko }                                          |
|                       0    1    2                                           |
|      Weights => {{1, 1, 0}, {1, 2, 0}, {1, 3, 0}}                           |
|      Signs => {1, 1, 1}                                                     |
|      ideal => { - (1/2)(ko_0 ko_0), (1/2)(ko_1 ko_1) - (ko_2 ko_0),  - (ko_2|
|      ambient => LieAlgebra{...10...}                                        |
|      diff => {}                                                             |
|      Field => QQ                                                            |
|      computedDegree => 0                                                    |
|-----------------------------------------------------------------------------|
|ko_1)}                                                                       |
+-----------------------------------------------------------------------------+
|i11 : E2=extAlgebra(4,L2)                                                    |
|                                                                             |
|o11 = E2                                                                     |
|                                                                             |
|o11 : ExtAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i12 : dims(4,E2)                                                             |
|                                                                             |
|o12 = | 3 0 0 0 |                                                            |
|      | 0 3 0 0 |                                                            |
|      | 0 0 1 1 |                                                            |
|      | 0 0 0 1 |                                                            |
|                                                                             |
|               4        4                                                    |
|o12 : Matrix ZZ  <--- ZZ                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * minimalModel -- compute the minimal model
  * extAlgebra -- compute the Ext-algebra of a Lie algebra

Ways to use koszulDual :
========================

  * "koszulDual(PolynomialRing)"
  * "koszulDual(QuotientRing)"

For the programmer
==================

The object koszulDual, is a method function (Macaulay2Doc).

LastWeightHomological -- name for an optional argument for lieAlgebra
*********************************************************************

Description
===========

This is an option to tell lieAlgebra, to consider the last
weight of a generator as the homological degree.

See also
========

  * lieAlgebra -- make a free Lie algebra
  * differentialLieAlgebra -- make a
    differential Lie algebra
  * weight -- get the weight of a homogeneous element
  * Differential Lie algebra tutorial

Functions with optional argument named LastWeightHomological :
==============================================================

  * lieAlgebra(...,LastWeightHomological=>...)
    -- optional
    argument for lieAlgebra

For the programmer
==================

The object LastWeightHomological, is a
symbol (Macaulay2Doc).

LieAlgebra -- the class of all Lie algebras
*******************************************

Description
===========

This type represents graded Lie algebras. More precisely, the Lie algebras
under consideration are graded over ${\mathbb Z}^{+}\times {\mathbb Z}^n\times
{\mathbb Z}/2{\mathbb Z}$, where the first component is called the
degree (Macaulay2Doc), and the last component is called the sign,
which is 0 or 1 and have effect on the axioms, see below. The list of
components of the grading except the sign is called the weight,
and the last component of the weight is called the homological degree. If no
differential is defined, then the homological degree will be zero for all
elements. Each object of type LieAlgebra is also a type L, and elements in L
belong also to the type LieElement, which is the parent of
L. Lie multiplication is given by LieElement LieElement.

The axioms for Lie algebras depend on the signs of the generators, which are
specified by lieAlgebra(...,Signs=>...).
The sign of a homogeneous
element can be obtained by the function sign. In the axioms below
the sign of an element $a$ is written sign($a$).

Anticommutativity: [$a$, $b$] =  -(-1)^{sign($a$) * sign($b$)} [$b$, $a$]

Jacobi identity: [$a$, [$b$, $c$]] = [[$a$, $b$], $c$] + (-1)^{sign($a$) *
sign($b$)} [$b$, [$a$, $c$]]

Also, in characteristic 2 and 3, there are in addition the following axioms:

Characteristic 2: [$a$, $a$] = 0

Characteristic 3: [$a$, [$a$, $a$]] = 0

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : a                  |
|                        |
|o2 = a                  |
|                        |
|o2 : L                  |
+------------------------+
|i3 : class L            |
|                        |
|o3 = LieAlgebra         |
|                        |
|o3 : Type               |
+------------------------+
|i4 : parent L           |
|                        |
|o4 = LieElement         |
|                        |
|o4 : Type               |
+------------------------+
|i5 : a b                |
|                        |
|o5 =  - (b a)           |
|                        |
|o5 : L                  |
+------------------------+
|i6 : weight oo          |
|                        |
|o6 = {2, 0}             |
|                        |
|o6 : List               |
+------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * LieElement -- the class of all Lie algebra elements
  * LieElement LieElement -- multiplication of
    Lie elements
  * LieAlgebra / List -- make a quotient Lie algebra
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra
  * First Lie algebra tutorial

Functions and methods returning an object of class LieAlgebra :
===============================================================

  * differentialLieAlgebra -- make a
    differential Lie algebra
  * "holonomy(List,List)" -- see holonomy, -- compute the
    holonomy Lie algebra associated to an arrangement or matroid
  * koszulDual -- compute the Lie algebra whose enveloping
    algebra is the Koszul dual of a quadratic algebra
  * lieAlgebra -- make a free Lie algebra
  * minimalModel -- compute the minimal model

Methods that use an object of class LieAlgebra :
================================================

  * ambient(LieAlgebra) -- get the ambient Lie
    algebra
  * basis(List,LieAlgebra) -- compute a
    basis
  * basis(ZZ,LieAlgebra) -- compute a basis
  * basis(ZZ,ZZ,LieAlgebra) -- compute
    a basis
  * "boundaries(LieAlgebra)" -- see boundaries, -- make the
    subalgebra of boundaries
  * "center(LieAlgebra)" -- see center, -- make the ideal of
    central elements
  * "computedDegree(LieAlgebra)" -- see computedDegree,
    -- get the degree to which the computations have been performed
  * "cycles(LieAlgebra)" -- see cycles, -- make the subalgebra of
    cycles
  * decompose(LieAlgebra) -- compute the
    ideal associated to an arrangement or matroid
  * degreeLength(LieAlgebra) -- get the
    length of the weight of a generator
  * describe(LieAlgebra) -- real description
  * diff(LieAlgebra) -- get the differential of
    the generators
  * dim(List,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,LieAlgebra) -- compute the
    dimension
  * dim(ZZ,ZZ,LieAlgebra) -- compute the
    dimension
  * "dims(ZZ,LieAlgebra)" -- see dims, -- compute the dimensions of
    a Lie algebra, Ext-algebra or vector space
  * "dims(ZZ,ZZ,LieAlgebra)" -- see dims, -- compute the dimensions
    of a Lie algebra, Ext-algebra or vector space
  * euler(LieAlgebra) -- compute the Euler
    derivation
  * eulers(ZZ,LieAlgebra) -- compute the
    list of Euler characteristics
  * "extAlgebra(ZZ,LieAlgebra)" -- see extAlgebra, -- compute
    the Ext-algebra of a Lie algebra
  * generators(LieAlgebra) -- get the
    generators
  * "holonomyLocal(ZZ,LieAlgebra)" -- see holonomyLocal,
    -- compute the Lie algebra for a local subalgebra of the holonomy Lie
    algebra
  * ideal(LieAlgebra) -- get the relations in a
    Lie algebra
  * LieAlgebra * LieAlgebra -- free product
    of Lie algebras
  * LieAlgebra ++ LieAlgebra -- direct sum of
    Lie algebras
  * LieAlgebra / LieAlgebraMap -- make a
    quotient Lie algebra
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra
  * LieAlgebra / List -- make a quotient Lie algebra
  * LieAlgebra == LieAlgebra -- whether two
    Lie algebras are defined in the same way
  * "lieHomology(LieAlgebra)" -- see lieHomology, -- make
    the homology as a vector space
  * map(LieAlgebra) -- get the map of a minimal
    model
  * map(LieAlgebra,LieAlgebra) -- make
    a natural Lie algebra homomorphism
  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * "minimalModel(ZZ,LieAlgebra)" -- see minimalModel, --
    compute the minimal model
  * minimalPresentation(ZZ,LieAlgebra)
    -- compute a minimal presentation
  * numgens(LieAlgebra) -- get the number of
    generators
  * "random(List,LieAlgebra)" -- see random(ZZ,LieAlgebra),
    -- get a random element of a Lie algebra
  * random(ZZ,LieAlgebra) -- get a random
    element of a Lie algebra
  * "random(ZZ,ZZ,LieAlgebra)" -- see random(ZZ,LieAlgebra),
    -- get a random element of a Lie algebra
  * ScriptedFunctor _ LieAlgebra -- get
    the identity homomorphism
  * "standardForm(List,LieAlgebra)" -- see
    standardForm(RingElement,LieAlgebra),
    -- get a Lie element in
    standard form
  * standardForm(RingElement,LieAlgebra)
    -- get a Lie element in
    standard form
  * use(LieAlgebra) -- set the generators
  * "zeroDerivation(LieAlgebra)" -- see zeroDerivation,
    -- make a derivation from the zero map
  * "zeroIdeal(LieAlgebra)" -- see zeroIdeal, -- make the zero
    ideal
  * "zeroMap(LieAlgebra,LieAlgebra)" -- see zeroMap, -- make the
    zero map
  * ZZ _ LieAlgebra -- get the zero element

For the programmer
==================

The object LieAlgebra, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc), < Thing (Macaulay2Doc).

lieAlgebra -- make a free Lie algebra
*************************************

Synopsis
========

  * Usage:
        L=lieAlgebra(liegens)
  * Inputs:
      * liegens, a list (Macaulay2Doc), of elements of class
        Symbol or IndexedVariable
  * Optional inputs (Macaulay2Doc),:
      * Field, => ...,
        default value QQ, optional argument for lieAlgebra
      * LastWeightHomological,
        => ...,
        default value false, optional argument for lieAlgebra
      * Signs, => ...,
        default value 0, optional argument for lieAlgebra
      * Weights, => ...,
        default value 1, optional argument for lieAlgebra
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

A generator may be of class Symbol or IndexedVariable. The same name for a
generator can be used in several Lie algebras and also as name for a variable
in a polynomial ring. If a symbol $a$ has been used as name for some output,
then you must write a = symbol a to be able to use the symbol as a generator
instead. Relations are introduced by the operator /, see LieAlgebra / List.
It is also possible to define a Lie algebra modulo an
ideal. See LieAlgebra / LieIdeal. A differential
Lie algebra is defined by giving the value of the differential on the
generators, see differentialLieAlgebra. If
relations are introduced as a list, then the program adds relations to make the
ideal of relations invariant under the differential. These non-normalized
relations are obtained using ideal(LieAlgebra),
and can also be seen using describe(LieAlgebra),
see L2 below. The zero Lie algebra (over QQ) is
defined as lieAlgebra\{\}.

+----------------------------------------------------------+
|i1 : F1 = lieAlgebra{a,b}                                 |
|                                                          |
|o1 = F1                                                   |
|                                                          |
|o1 : LieAlgebra                                           |
+----------------------------------------------------------+
|i2 : L1=F1/{a a b - b b a, a a a a b}                     |
|                                                          |
|o2 = L1                                                   |
|                                                          |
|o2 : LieAlgebra                                           |
+----------------------------------------------------------+
|i3 : dims(1,6,L1)                                         |
|                                                          |
|o3 = {2, 1, 1, 1, 1, 0}                                   |
|                                                          |
|o3 : List                                                 |
+----------------------------------------------------------+
|i4 : describe L1                                          |
|                                                          |
|o4 = generators => {a, b}                                 |
|     Weights => {{1, 0}, {1, 0}}                          |
|     Signs => {0, 0}                                      |
|     ideal => { - (a b a) - (b b a),  - (a a a b a)}      |
|     ambient => F1                                        |
|     diff => {}                                           |
|     Field => QQ                                          |
|     computedDegree => 6                                  |
+----------------------------------------------------------+
|i5 : F2 = lieAlgebra({a,b,c},Weights=>{{1,0},{1,0},{2,1}},|
|            Signs=>{1,1,1},LastWeightHomological=>true)   |
|                                                          |
|o5 = F2                                                   |
|                                                          |
|o5 : LieAlgebra                                           |
+----------------------------------------------------------+
|i6 : D2 = differentialLieAlgebra{0_F2,0_F2,a a + b b}     |
|                                                          |
|o6 = D2                                                   |
|                                                          |
|o6 : LieAlgebra                                           |
+----------------------------------------------------------+
|i7 : L2=D2/{a b,a c}                                      |
|                                                          |
|o7 = L2                                                   |
|                                                          |
|o7 : LieAlgebra                                           |
+----------------------------------------------------------+
|i8 : describe L2                                          |
|                                                          |
|o8 = generators => {a, b, c}                              |
|     Weights => {{1, 0}, {1, 0}, {2, 1}}                  |
|     Signs => {1, 1, 1}                                   |
|     ideal => {(b a), (a c),  - (a a a) - (a b b)}        |
|     ambient => F2                                        |
|     diff => {0, 0, (a a) + (b b)}                        |
|     Field => QQ                                          |
|     computedDegree => 0                                  |
+----------------------------------------------------------+
|i9 : dims(5,L2)                                           |
|                                                          |
|o9 = | 2 2 0 0 0 |                                        |
|     | 0 1 1 1 1 |                                        |
|     | 0 0 0 1 1 |                                        |
|     | 0 0 0 0 0 |                                        |
|     | 0 0 0 0 0 |                                        |
|                                                          |
|              5        5                                  |
|o9 : Matrix ZZ  <--- ZZ                                   |
+----------------------------------------------------------+
|i10 : describe lieAlgebra{}                               |
|                                                          |
|o10 = generators => {}                                    |
|      Weights => {}                                       |
|      Signs => {}                                         |
|      ideal => {}                                         |
|      ambient => LieAlgebra{...10...}                     |
|      diff => {}                                          |
|      Field => QQ                                         |
|      computedDegree => 0                                 |
+----------------------------------------------------------+

See also
========

  * LieElement -- the class of all Lie algebra elements
  * First Lie algebra tutorial
  * Second Lie algebra tutorial
  * Differential Lie algebra tutorial
  * LieAlgebra / List -- make a quotient Lie algebra
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra
  * differentialLieAlgebra -- make a
    differential Lie algebra

Ways to use lieAlgebra :
========================

  * "lieAlgebra(List)"

For the programmer
==================

The object lieAlgebra, is a method function with options (Macaulay2Doc).

LieAlgebra * LieAlgebra -- free product of Lie algebras
*******************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        M = L1*L2
  * Inputs:
      * L1, an instance of the type LieAlgebra,
      * L2, an instance of the type LieAlgebra,
  * Outputs:
      * M, an instance of the type LieAlgebra, the free
        product of $L1$ and $L2$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : F1 = lieAlgebra({a,b},Signs=>{0,1},Weights=>{{2,0},{2,1}},              |
|         LastWeightHomological=>true)                                        |
|                                                                             |
|o1 = F1                                                                      |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : L1 = differentialLieAlgebra{0_F1,a}                                     |
|                                                                             |
|o2 = L1                                                                      |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : F2 = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},                   |
|         Signs=>{1,1,1},LastWeightHomological=>true)                         |
|                                                                             |
|o3 = F2                                                                      |
|                                                                             |
|o3 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i4 : L2 = differentialLieAlgebra{0_F2,a a,a b}/{b b+4 a c}                   |
|                                                                             |
|o4 = L2                                                                      |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : M = L1*L2                                                               |
|                                                                             |
|o5 = M                                                                       |
|                                                                             |
|o5 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i6 : describe(M)                                                             |
|                                                                             |
|o6 = generators => {pr , pr , pr , pr , pr }                                 |
|                      0    1    2    3    4                                  |
|     Weights => {{2, 0}, {2, 1}, {1, 0}, {2, 1}, {3, 2}}                     |
|     Signs => {0, 1, 1, 1, 1}                                                |
|     ideal => { - (pr_2 pr_2 pr_2), (pr_3 pr_3) + 4 (pr_2 pr_4), (pr_2 pr_2  |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {0, pr_0, 0, (pr_2 pr_2), (pr_2 pr_3)}                          |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|pr_3) + (pr_2 pr_2 pr_3) - (pr_3 pr_2 pr_2) - 4 (pr_2 pr_2 pr_3)}            |
+-----------------------------------------------------------------------------+
|i7 : normalForm\ideal(M)                                                     |
|                                                                             |
|o7 = {0, (pr_3 pr_3) + 4 (pr_2 pr_4), 0}                                     |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : d = differential M                                                      |
|                                                                             |
|o8 = d                                                                       |
|                                                                             |
|o8 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i9 : d (pr_1 pr_3)                                                           |
|                                                                             |
|o9 =  - (pr_3 pr_0) + 2 (pr_2 pr_2 pr_1)                                     |
|                                                                             |
|o9 : M                                                                       |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * LieAlgebra * LieAlgebra -- free product
    of Lie algebras

LieAlgebra ++ LieAlgebra -- direct sum of Lie algebras
******************************************************

Synopsis
========

  * Operator: ++ (Macaulay2Doc),
  * Usage:
        S = L++M
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * M, an instance of the type LieAlgebra,
  * Outputs:
      * S, an instance of the type LieAlgebra, the direct
        sum of $L$ and $M$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : F1 = lieAlgebra({a,b},Signs=>{0,1},Weights=>{{2,0},{2,1}},              |
|          LastWeightHomological=>true)                                       |
|                                                                             |
|o1 = F1                                                                      |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : L1 = differentialLieAlgebra{0_F1,a}                                     |
|                                                                             |
|o2 = L1                                                                      |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : F2 = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},                   |
|         Signs=>{1,1,1},LastWeightHomological=>true)                         |
|                                                                             |
|o3 = F2                                                                      |
|                                                                             |
|o3 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i4 : L2 = differentialLieAlgebra{0_F2,a a,a b}/{b b+4 a c}                   |
|                                                                             |
|o4 = L2                                                                      |
|                                                                             |
|o4 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : T=L1++L2                                                                |
|                                                                             |
|o5 = T                                                                       |
|                                                                             |
|o5 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i6 : describe(T)                                                             |
|                                                                             |
|o6 = generators => {pr , pr , pr , pr , pr }                                 |
|                      0    1    2    3    4                                  |
|     Weights => {{2, 0}, {2, 1}, {1, 0}, {2, 1}, {3, 2}}                     |
|     Signs => {0, 1, 1, 1, 1}                                                |
|     ideal => { - (pr_2 pr_2 pr_2), (pr_3 pr_3) + 4 (pr_2 pr_4), (pr_2 pr_2  |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {0, pr_0, 0, (pr_2 pr_2), (pr_2 pr_3)}                          |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|pr_3) + (pr_2 pr_2 pr_3) - (pr_3 pr_2 pr_2) - 4 (pr_2 pr_2 pr_3), (pr_0      |
|-----------------------------------------------------------------------------|
|pr_2), (pr_0 pr_3), (pr_0 pr_4), (pr_1 pr_2), (pr_1 pr_3), (pr_1 pr_4)}      |
+-----------------------------------------------------------------------------+
|i7 : normalForm\ideal(T)                                                     |
|                                                                             |
|o7 = {0, (pr_3 pr_3) + 4 (pr_2 pr_4), 0,  - (pr_2 pr_0),  - (pr_3 pr_0),     |
|     ------------------------------------------------------------------------|
|     (pr_0 pr_4), (pr_2 pr_1), (pr_3 pr_1), (pr_1 pr_4)}                     |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * LieAlgebra ++ LieAlgebra -- direct sum of
    Lie algebras

LieAlgebra / LieAlgebraMap -- make a quotient Lie algebra
*********************************************************

Synopsis
========

  * Operator: / (Macaulay2Doc),
  * Usage:
        Q=L/f
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * f, an instance of the type LieAlgebraMap, a map
        with target $L$
  * Outputs:
      * Q, an instance of the type LieAlgebra, the quotient
        of $L$ by the ideal generated by the image of the map $f$

Description
===========

This is the same as $L$ modulo the set of values of $f$ applied to the
generators of the source of $f$.

+----------------------------------------+
|i1 : M = lieAlgebra{a,b,c}              |
|                                        |
|o1 = M                                  |
|                                        |
|o1 : LieAlgebra                         |
+----------------------------------------+
|i2 : L = M/{a b}                        |
|                                        |
|o2 = L                                  |
|                                        |
|o2 : LieAlgebra                         |
+----------------------------------------+
|i3 : N = lieAlgebra({d}, Weights=>{2})  |
|                                        |
|o3 = N                                  |
|                                        |
|o3 : LieAlgebra                         |
+----------------------------------------+
|i4 : f = map(L,N,{a c})                 |
|                                        |
|o4 = f                                  |
|                                        |
|o4 : LieAlgebraMap                      |
+----------------------------------------+
|i5 : Q = L/f                            |
|                                        |
|o5 = Q                                  |
|                                        |
|o5 : LieAlgebra                         |
+----------------------------------------+
|i6 : describe Q                         |
|                                        |
|o6 = generators => {a, b, c}            |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}|
|     Signs => {0, 0, 0}                 |
|     ideal => { - (b a),  - (c a)}      |
|     ambient => M                       |
|     diff => {}                         |
|     Field => QQ                        |
|     computedDegree => 0                |
+----------------------------------------+

See also
========

  * LieAlgebra / List -- make a quotient Lie algebra
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra

Ways to use this method:
========================

  * LieAlgebra / LieAlgebraMap -- make a
    quotient Lie algebra

LieAlgebra / LieIdeal -- make a quotient Lie algebra
****************************************************

Synopsis
========

  * Operator: / (Macaulay2Doc),
  * Usage:
        Q=L/I
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * I, an instance of the type LieIdeal, an ideal of $L$
  * Outputs:
      * Q, an instance of the type LieAlgebra, the quotient
        of $L$ by the ideal $I$

Description
===========

Any object of type LieAlgebra is a finitely presented (differential) Lie
algebra modulo an ideal, which is an object of type LieIdeal (and which might
be zero). If the input Lie algebra $L$ is finitely presented, then the output
Lie algebra $Q$ is simply presented as a quotient of $L$ by the input ideal
$I$. (Observe that each time L/I is executed, a new different copy of L/I is
produced.)

+--------------------------------------------+
|i1 : F = lieAlgebra{a,b,c}                  |
|                                            |
|o1 = F                                      |
|                                            |
|o1 : LieAlgebra                             |
+--------------------------------------------+
|i2 : L = F/{a b}                            |
|                                            |
|o2 = L                                      |
|                                            |
|o2 : LieAlgebra                             |
+--------------------------------------------+
|i3 : f=map(L,L,{0_L,b,c})                   |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o3 = f                                      |
|                                            |
|o3 : LieAlgebraMap                          |
+--------------------------------------------+
|i4 : I=kernel f                             |
|                                            |
|o4 = I                                      |
|                                            |
|o4 : LieIdeal                               |
+--------------------------------------------+
|i5 : Q = L/I                                |
|                                            |
|o5 = Q                                      |
|                                            |
|o5 : LieAlgebra                             |
+--------------------------------------------+
|i6 : describe Q                             |
|                                            |
|o6 = generators => {a, b, c}                |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}    |
|     Signs => {0, 0, 0}                     |
|     ideal => I                             |
|     ambient => L                           |
|     diff => {}                             |
|     Field => QQ                            |
|     computedDegree => 0                    |
+--------------------------------------------+
|i7 : Q===L/I                                |
|                                            |
|o7 = false                                  |
+--------------------------------------------+
|i8 : Q==L/I                                 |
|                                            |
|o8 = true                                   |
+--------------------------------------------+

If the input Lie algebra $L$ is given as a finitely presented Lie algebra $M$
modulo an ideal $J$ that is not (known to be) finitely generated (e.g., the
kernel of a homomorphism ), then the output Lie algebra $Q$ is presented as $M$
modulo the ideal that is the inverse image of the natural map from $M$ to $L$
applied to the input ideal $I$.

+--------------------------------------------+
|i9 : F = lieAlgebra{a,b,c}                  |
|                                            |
|o9 = F                                      |
|                                            |
|o9 : LieAlgebra                             |
+--------------------------------------------+
|i10 : M = F/{a b}                           |
|                                            |
|o10 = M                                     |
|                                            |
|o10 : LieAlgebra                            |
+--------------------------------------------+
|i11 : f=map(M,M,{0_M,b,c})                  |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o11 = f                                     |
|                                            |
|o11 : LieAlgebraMap                         |
+--------------------------------------------+
|i12 : J=kernel f                            |
|                                            |
|o12 = J                                     |
|                                            |
|o12 : LieIdeal                              |
+--------------------------------------------+
|i13 : L = M/J                               |
|                                            |
|o13 = L                                     |
|                                            |
|o13 : LieAlgebra                            |
+--------------------------------------------+
|i14 : X=lieAlgebra{x}                       |
|                                            |
|o14 = X                                     |
|                                            |
|o14 : LieAlgebra                            |
+--------------------------------------------+
|i15 : g=map(X,L,{0_X,x,x})                  |
|warning: the map might not be well defined, |
|         use isWellDefined                  |
|                                            |
|o15 = g                                     |
|                                            |
|o15 : LieAlgebraMap                         |
+--------------------------------------------+
|i16 : I=kernel g                            |
|                                            |
|o16 = I                                     |
|                                            |
|o16 : LieIdeal                              |
+--------------------------------------------+
|i17 : Q=L/I                                 |
|                                            |
|o17 = Q                                     |
|                                            |
|o17 : LieAlgebra                            |
+--------------------------------------------+
|i18 : ambient Q===M                         |
|                                            |
|o18 = true                                  |
+--------------------------------------------+
|i19 : ideal(Q)===inverse(map(L,M),I)        |
|                                            |
|o19 = true                                  |
+--------------------------------------------+

See also
========

  * LieAlgebra / LieAlgebraMap -- make a
    quotient Lie algebra
  * LieAlgebra / List -- make a quotient Lie algebra
  * differentialLieAlgebra -- make a
    differential Lie algebra
  * lieIdeal -- make a Lie ideal
  * kernel(LieAlgebraMap) -- make the kernel
    of a map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * Quotient Lie algebras and subspaces

Ways to use this method:
========================

  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra

LieAlgebra / List -- make a quotient Lie algebra
************************************************

Synopsis
========

  * Operator: / (Macaulay2Doc),
  * Usage:
        Q=L/x
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * x, a list (Macaulay2Doc), a list of elements of type L
  * Outputs:
      * Q, an instance of the type LieAlgebra, the quotient
        of $L$ by the ideal generated by the list $x$

Description
===========

Consider first the case where $L$ has zero differential, and where $L$ is
finitely presented as a quotient of a free Lie algebra $F$. In this case, the
output $Q$ is also finitely presented as a quotient of $F$.

+----------------------------------------+
|i1 : F = lieAlgebra{a,b,c}              |
|                                        |
|o1 = F                                  |
|                                        |
|o1 : LieAlgebra                         |
+----------------------------------------+
|i2 : L = F/{a b}                        |
|                                        |
|o2 = L                                  |
|                                        |
|o2 : LieAlgebra                         |
+----------------------------------------+
|i3 : Q = L/{a c}                        |
|                                        |
|o3 = Q                                  |
|                                        |
|o3 : LieAlgebra                         |
+----------------------------------------+
|i4 : describe Q                         |
|                                        |
|o4 = generators => {a, b, c}            |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}|
|     Signs => {0, 0, 0}                 |
|     ideal => { - (b a),  - (c a)}      |
|     ambient => F                       |
|     diff => {}                         |
|     Field => QQ                        |
|     computedDegree => 0                |
+----------------------------------------+
|i5 : class\Q#ideal                      |
|                                        |
|o5 = {F, F}                             |
|                                        |
|o5 : List                               |
+----------------------------------------+
|i6 : F/Q#ideal==Q                       |
|                                        |
|o6 = true                               |
+----------------------------------------+

In case $L$ has a non-zero differential, the program adds relations depending
on the fact that the ideal should be invariant under the differential. These
extra (non-normalized) relations may be looked upon using
describe(LieAlgebra). Observe that $D$ is not free
in this example, see differentialLieAlgebra.

+--------------------------------------------------------------------+
|i7 : F = lieAlgebra({a,b,c2,c3},Weights=>{{1,0},{1,0},{2,1},{3,2}}, |
|          Signs=>{1,1,1,1},LastWeightHomological=>true)             |
|                                                                    |
|o7 = F                                                              |
|                                                                    |
|o7 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i8 : D = differentialLieAlgebra{0_F,0_F,a a,b c2}                   |
|                                                                    |
|o8 = D                                                              |
|                                                                    |
|o8 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i9 : L = D/{a c2}                                                   |
|                                                                    |
|o9 = L                                                              |
|                                                                    |
|o9 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i10 : Q = L/{b c3}                                                  |
|                                                                    |
|o10 = Q                                                             |
|                                                                    |
|o10 : LieAlgebra                                                    |
+--------------------------------------------------------------------+
|i11 : describe D                                                    |
|                                                                    |
|o11 = generators => {a, b, c2, c3}                                  |
|      Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}}                   |
|      Signs => {1, 1, 1, 1}                                         |
|      ideal => { - (b a a)}                                         |
|      ambient => F                                                  |
|      diff => {0, 0, (a a), (b c2)}                                 |
|      Field => QQ                                                   |
|      computedDegree => 3                                           |
+--------------------------------------------------------------------+
|i12 : describe Q                                                    |
|                                                                    |
|o12 = generators => {a, b, c2, c3}                                  |
|      Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}}                   |
|      Signs => {1, 1, 1, 1}                                         |
|      ideal => { - (b a a), (a c2),  - (a a a), (b c3),  - (b b c2)}|
|      ambient => F                                                  |
|      diff => {0, 0, (a a), (b c2)}                                 |
|      Field => QQ                                                   |
|      computedDegree => 0                                           |
+--------------------------------------------------------------------+
|i13 : class\ideal(Q)                                                |
|                                                                    |
|o13 = {F, F, F, F, F}                                               |
|                                                                    |
|o13 : List                                                          |
+--------------------------------------------------------------------+
|i14 : class\diff(Q)                                                 |
|                                                                    |
|o14 = {F, F, F, F}                                                  |
|                                                                    |
|o14 : List                                                          |
+--------------------------------------------------------------------+

If the input Lie algebra $L$ is given as a finitely presented Lie algebra $M$
modulo an ideal $J$ that is not (known to be) finitely generated (e.g., the
kernel of a homomorphism ), then the output Lie algebra $Q$ is presented as a
quotient of a finitely presented Lie algebra $N$ by an ideal $I$, where $N$ is
given as $M$ modulo a lifting of the input list $x$ to $M$, and $I$ is the
image of the natural map from $M$ to $N$ applied to $J$, see
image(LieAlgebraMap,LieSubSpace).

+----------------------------------------------------+
|i15 : F = lieAlgebra{a,b,c}                         |
|                                                    |
|o15 = F                                             |
|                                                    |
|o15 : LieAlgebra                                    |
+----------------------------------------------------+
|i16 : M = F/{a b}                                   |
|                                                    |
|o16 = M                                             |
|                                                    |
|o16 : LieAlgebra                                    |
+----------------------------------------------------+
|i17 : f=map(M,M,{0_M,b,c})                          |
|warning: the map might not be well defined,         |
|         use isWellDefined                          |
|                                                    |
|o17 = f                                             |
|                                                    |
|o17 : LieAlgebraMap                                 |
+----------------------------------------------------+
|i18 : J=kernel f                                    |
|                                                    |
|o18 = J                                             |
|                                                    |
|o18 : LieIdeal                                      |
+----------------------------------------------------+
|i19 : L = M/J                                       |
|                                                    |
|o19 = L                                             |
|                                                    |
|o19 : LieAlgebra                                    |
+----------------------------------------------------+
|i20 : Q=L/{b c}                                     |
|                                                    |
|o20 = Q                                             |
|                                                    |
|o20 : LieAlgebra                                    |
+----------------------------------------------------+
|i21 : N=ambient Q                                   |
|                                                    |
|o21 = N                                             |
|                                                    |
|o21 : LieAlgebra                                    |
+----------------------------------------------------+
|i22 : describe Q                                    |
|                                                    |
|o22 = generators => {a, b, c}                       |
|      Weights => {{1, 0}, {1, 0}, {1, 0}}           |
|      Signs => {0, 0, 0}                            |
|      ideal => ideal of N                           |
|      ambient => N                                  |
|      diff => {}                                    |
|      Field => QQ                                   |
|      computedDegree => 0                           |
+----------------------------------------------------+
|i23 : use M                                         |
+----------------------------------------------------+
|i24 : N==M/{b c}                                    |
|                                                    |
|o24 = true                                          |
+----------------------------------------------------+
|i25 : ideal(Q)===new LieIdeal from image(map(N,M),J)|
|                                                    |
|o25 = true                                          |
+----------------------------------------------------+

See also
========

  * LieAlgebra / LieAlgebraMap -- make a
    quotient Lie algebra
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra
  * differentialLieAlgebra -- make a
    differential Lie algebra
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * zeroIdeal -- make the zero ideal
  * Quotient Lie algebras and subspaces

Ways to use this method:
========================

  * LieAlgebra / List -- make a quotient Lie algebra

LieAlgebra == LieAlgebra -- whether two Lie algebras are defined in the same way
********************************************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        L==M
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * M, an instance of the type LieAlgebra,
  * Outputs:
      * b, a Boolean value (Macaulay2Doc),

Description
===========

Two objects L and M of type LieAlgebra satisfies L==M if they have the same
generators, weights, signs, field, defining ideal, and differential.

+------------------------+
|i1 : F = lieAlgebra{a,b}|
|                        |
|o1 = F                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : I = lieIdeal{a a b}|
|                        |
|o2 = I                  |
|                        |
|o2 : FGLieIdeal         |
+------------------------+
|i3 : L=F/{a a b}        |
|                        |
|o3 = L                  |
|                        |
|o3 : LieAlgebra         |
+------------------------+
|i4 : M=F/I              |
|                        |
|o4 = M                  |
|                        |
|o4 : LieAlgebra         |
+------------------------+
|i5 : L==M               |
|                        |
|o5 = true               |
+------------------------+
|i6 : L===M              |
|                        |
|o6 = false              |
+------------------------+

See also
========

  * LieAlgebra -- the class of all Lie algebras

Ways to use this method:
========================

  * LieAlgebra == LieAlgebra -- whether two
    Lie algebras are defined in the same way

lieAlgebra(...,Field=>...) -- optional argument for lieAlgebra
**************************************************************

Synopsis
========

  * Usage:
        L = lieAlgebra(gen,Field => F)
  * Inputs:
      * gen, a list (Macaulay2Doc),
      * F, a ring (Macaulay2Doc), the field of coefficients
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

This is an option for lieAlgebra, and holonomy,
to define the coefficient field, which is QQ by default. You may use
any "exact" field (not the real numbers or the complex numbers), such as a
prime field or an algebraic extension, e.g., toField(ZZ/7[x]/ideal\{x^2+1\}) or
a fraction field, e.g., frac(QQ[x]). Observe that it is necessary to use the
function toField when $F$ is defined as an algebraic extension of a prime
field.

+--------------------------------------+
|i1 : F = toField(ZZ/7[x]/ideal{x^2+1})|
|                                      |
|o1 = F                                |
|                                      |
|o1 : PolynomialRing                   |
+--------------------------------------+
|i2 : L = lieAlgebra({a,b},Field=>F)   |
|                                      |
|o2 = L                                |
|                                      |
|o2 : LieAlgebra                       |
+--------------------------------------+
|i3 : (3*x+2) a b + (2*x+3) b a        |
|                                      |
|o3 = (-x+1)(b a)                      |
|                                      |
|o3 : L                                |
+--------------------------------------+

Further information
===================

  * Default value: QQ (Macaulay2Doc),
  * Function: lieAlgebra, -- make a free Lie algebra
  * Option key: Field, -- name for an optional argument for
    lieAlgebra and holonomy

See also
========

  * lieAlgebra -- make a free Lie algebra
  * holonomy -- compute the holonomy Lie algebra associated to
    an arrangement or matroid
  * Second Lie algebra tutorial

Functions with optional argument named Field :
==============================================

  * holonomy(...,Field=>...),
    -- optional argument for holonomy
  * lieAlgebra(...,Field=>...)
    -- optional argument for
    lieAlgebra

lieAlgebra(...,LastWeightHomological=>...) -- optional argument for lieAlgebra
******************************************************************************

Synopsis
========

  * Usage:
        L = lieAlgebra(gen,LastWeightHomological => true)
  * Inputs:
      * gen, a list (Macaulay2Doc),
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

This is an option, which tells lieAlgebra, to consider the
last weight of a generator as the homological degree, if the option is given
the value true. Default value is false.

+------------------------------------------------------+
|i1 : describe lieAlgebra({a,b},Weights=>{{2,1},{3,2}})|
|                                                      |
|o1 = generators => {a, b}                             |
|     Weights => {{2, 1, 0}, {3, 2, 0}}                |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i2 : describe lieAlgebra({a,b},Weights=>{{2,1},{3,2}},|
|                 LastWeightHomological=>true)         |
|                                                      |
|o2 = generators => {a, b}                             |
|     Weights => {{2, 1}, {3, 2}}                      |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Function: lieAlgebra, -- make a free Lie algebra
  * Option key: LastWeightHomological, -- name for
    an optional argument for lieAlgebra

See also
========

  * lieAlgebra -- make a free Lie algebra
  * differentialLieAlgebra -- make a
    differential Lie algebra
  * weight -- get the weight of a homogeneous element
  * Differential Lie algebra tutorial

Functions with optional argument named LastWeightHomological :
==============================================================

  * lieAlgebra(...,LastWeightHomological=>...)
    -- optional
    argument for lieAlgebra

lieAlgebra(...,Signs=>...) -- optional argument for lieAlgebra
**************************************************************

Synopsis
========

  * Usage:
        L = lieAlgebra(gen,Signs => s)
  * Inputs:
      * gen, a list (Macaulay2Doc), the list of generators
      * s, a list (Macaulay2Doc), of signs (0 or 1), s has the same
        length as gen
      * s, an integer (Macaulay2Doc), 0 or 1, the same sign is
        assigned to each generator
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

This is an option to tell lieAlgebra, to assign the given
"signs" to the generators, which are either 0 (even) or 1 (odd). If the option
is given the value 1, then all generators will be odd. The default value is
that all generators are even. The signs affect the axioms of a Lie
superalgebra, see LieAlgebra. Use sign, to
compute the sign of an arbitrary homogeneous Lie expression.

+--------------------------------------------+
|i1 : describe lieAlgebra{a,b}               |
|                                            |
|o1 = generators => {a, b}                   |
|     Weights => {{1, 0}, {1, 0}}            |
|     Signs => {0, 0}                        |
|     ideal => {}                            |
|     ambient => LieAlgebra{...10...}        |
|     diff => {}                             |
|     Field => QQ                            |
|     computedDegree => 0                    |
+--------------------------------------------+
|i2 : describe lieAlgebra({a,b},Signs=>{1,0})|
|                                            |
|o2 = generators => {a, b}                   |
|     Weights => {{1, 0}, {1, 0}}            |
|     Signs => {1, 0}                        |
|     ideal => {}                            |
|     ambient => LieAlgebra{...10...}        |
|     diff => {}                             |
|     Field => QQ                            |
|     computedDegree => 0                    |
+--------------------------------------------+
|i3 : describe lieAlgebra({a,b},Signs=>1)    |
|                                            |
|o3 = generators => {a, b}                   |
|     Weights => {{1, 0}, {1, 0}}            |
|     Signs => {1, 1}                        |
|     ideal => {}                            |
|     ambient => LieAlgebra{...10...}        |
|     diff => {}                             |
|     Field => QQ                            |
|     computedDegree => 0                    |
+--------------------------------------------+

Further information
===================

  * Default value: 0
  * Function: lieAlgebra, -- make a free Lie algebra
  * Option key: Signs, -- name for an optional argument for
    lieAlgebra

See also
========

  * lieAlgebra -- make a free Lie algebra
  * sign -- get the sign of a homogeneous element
  * Second Lie algebra tutorial

Functions with optional argument named Signs :
==============================================

  * lieAlgebra(...,Signs=>...)
    -- optional argument for
    lieAlgebra

lieAlgebra(...,Weights=>...) -- optional argument for lieAlgebra
****************************************************************

Synopsis
========

  * Usage:
        L = lieAlgebra(gen,Weights => w)
  * Inputs:
      * gen, a list (Macaulay2Doc),
      * w, a list (Macaulay2Doc), of lists of weights or a list of
        positive integers
      * w, an integer (Macaulay2Doc), 1, the same weight (1,0) is
        assigned to each generator
  * Outputs:
      * L, an instance of the type LieAlgebra,

Description
===========

This is an option to tell lieAlgebra, to assign the given
weights to the generators. A weight is a list of integers of a length that is
the same for all generators, see degreeLength(LieAlgebra).
The first component (also just called the
degree) is positive, see firstDegree(LieElement). If the
option LastWeightHomological, is true, then the
last component in a weight is the homological degree, which is non-negative and
less than the first degree. If the option LastWeightHomological,
is false, then the program adds a last component 0 to
the existing degrees. When the option is given as a list of integers
$n1,n2,\ldots$, which is not possible when the option
LastWeightHomological, is true, then the program defines
the weights for the generators to be $\{n1,0\},\ \{n2,0\},\ldots$. The default
value is 1, which has the effect that all generators have weight $\{1,0\}$.

+------------------------------------------------------+
|i1 : describe lieAlgebra({a,b},Weights=>{{1,2},{2,3}})|
|                                                      |
|o1 = generators => {a, b}                             |
|     Weights => {{1, 2, 0}, {2, 3, 0}}                |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i2 : describe lieAlgebra({a,b},Weights=>{{2,1},{3,2}},|
|         LastWeightHomological=>true)                 |
|                                                      |
|o2 = generators => {a, b}                             |
|     Weights => {{2, 1}, {3, 2}}                      |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i3 : describe lieAlgebra{a,b}                         |
|                                                      |
|o3 = generators => {a, b}                             |
|     Weights => {{1, 0}, {1, 0}}                      |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i4 : describe lieAlgebra({a,b},Weights=>{{1,0},{1,0}})|
|                                                      |
|o4 = generators => {a, b}                             |
|     Weights => {{1, 0, 0}, {1, 0, 0}}                |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i5 : describe lieAlgebra({a,b},Weights=>{{1,0},{1,0}},|
|         LastWeightHomological=>true)                 |
|                                                      |
|o5 = generators => {a, b}                             |
|     Weights => {{1, 0}, {1, 0}}                      |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+
|i6 : describe lieAlgebra({a,b},Weights=>{1,2})        |
|                                                      |
|o6 = generators => {a, b}                             |
|     Weights => {{1, 0}, {2, 0}}                      |
|     Signs => {0, 0}                                  |
|     ideal => {}                                      |
|     ambient => LieAlgebra{...10...}                  |
|     diff => {}                                       |
|     Field => QQ                                      |
|     computedDegree => 0                              |
+------------------------------------------------------+

Further information
===================

  * Default value: 1
  * Function: lieAlgebra, -- make a free Lie algebra
  * Option key: Weights (Macaulay2Doc), -- assigning weights to
    the variables

See also
========

  * lieAlgebra -- make a free Lie algebra
  * weight -- get the weight of a homogeneous element
  * firstDegree(LieElement) -- get the degree of an element
  * Second Lie algebra tutorial

Functions with optional argument named Weights :
================================================

  * "betti(...,Weights=>...)" -- see betti(BettiTally) (Macaulay2Doc),
    -- view and set the weight vector of a
    Betti diagram
  * lieAlgebra(...,Weights=>...)
    -- optional argument for
    lieAlgebra
  * "minimalBetti(...,Weights=>...)" -- see minimalBetti (Macaulay2Doc),
    -- minimal betti numbers of (the minimal free
    resolution of) a homogeneous ideal or module
  * monoid(...,Weights=>...) (Macaulay2Doc)
    -- specify
    weights of the variables
  * "newRing(...,Weights=>...)" -- see newRing (Macaulay2Doc), --
    make a copy of a ring, with some features changed
  * "regularity(...,Weights=>...)" -- see regularity (Macaulay2Doc),
    -- compute the Castelnuovo-Mumford regularity
  * "symmetricAlgebra(...,Weights=>...)" -- see symmetricAlgebra (Macaulay2Doc),
    -- the symmetric algebra of a module
  * "tensor(Monoid,Monoid,Weights=>...)" -- see tensor(Monoid,Monoid) (Macaulay2Doc),
    -- tensor product of monoids
  * "tensor(Ring,Ring,Weights=>...)" -- see tensor(Monoid,Monoid) (Macaulay2Doc),
    -- tensor product of monoids

LieAlgebraMap -- the class of all Lie algebra homomorphisms
***********************************************************

Description
===========

This type represents homomorphisms from $M$ to $L$, where $M$ and $L$ are Lie
algebras defined over the same field. Use the constructor
map(LieAlgebra,LieAlgebra,List), to
define homomorphisms. A homomorphism is given by the value of the generators
and it should preserve weight and sign. Observe that the zero element is
considered to have any weight and sign. The zero element in L is denoted by
0_L. An object of type LieAlgebraMap need not be well defined as a map and need
not commute with the differentials. Use isWellDefined(ZZ,LieAlgebraMap),
to check if this is true.

+------------------------------------------------------+
|i1 : M = lieAlgebra({a,b,c},Weights=>{2,1,1})         |
|                                                      |
|o1 = M                                                |
|                                                      |
|o1 : LieAlgebra                                       |
+------------------------------------------------------+
|i2 : L = lieAlgebra{a,b}                              |
|                                                      |
|o2 = L                                                |
|                                                      |
|o2 : LieAlgebra                                       |
+------------------------------------------------------+
|i3 : f = map(L,M,{a b,a,0_L})                         |
|                                                      |
|o3 = f                                                |
|                                                      |
|o3 : LieAlgebraMap                                    |
+------------------------------------------------------+
|i4 : isWellDefined(3,f)                               |
|the map is well defined for all degrees               |
|the map commutes with the differential for all degrees|
|                                                      |
|o4 = true                                             |
+------------------------------------------------------+
|i5 : describe f                                       |
|                                                      |
|o5 = a =>  - (b a)                                    |
|     b => a                                           |
|     c => 0                                           |
|     source => M                                      |
|     target => L                                      |
+------------------------------------------------------+
|i6 : use M                                            |
+------------------------------------------------------+
|i7 : f (a c - a b)                                    |
|                                                      |
|o7 =  - (a b a)                                       |
|                                                      |
|o7 : L                                                |
+------------------------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism
  * Homomorphisms and derivations

Methods that use an object of class LieAlgebraMap :
===================================================

  * - LieAlgebraMap -- unary negation
  * "describe(LieAlgebraMap)" -- see describe(LieAlgebra),
    -- real description
  * image(LieAlgebraMap) -- make the image of
    a Lie algebra map
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism
  * isSurjective(LieAlgebraMap), --
    whether a Lie map is surjective
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * kernel(LieAlgebraMap) -- make the kernel
    of a map
  * LieAlgebra / LieAlgebraMap -- make a
    quotient Lie algebra
  * LieAlgebraMap * LieAlgebraMap, --
    composition of homomorphisms
  * LieAlgebraMap * LieDerivation, --
    composition of a homomorphism and a derivation
  * LieAlgebraMap + LieAlgebraMap, --
    addition of Lie homomorphisms
  * LieAlgebraMap - LieAlgebraMap, --
    subtraction of Lie homomorphisms
  * LieAlgebraMap == LieAlgebraMap, --
    whether two Lie algebra homomorphisms are defined in the same way
  * LieAlgebraMap @ LieElement -- formal
    application of a Lie map to a Lie element
  * LieAlgebraMap \ List -- apply a Lie
    homomorphism to every element in a list
  * LieAlgebraMap \\ List -- formal application
    of a Lie map to every element in a list
  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism
  * "lieDerivation(LieAlgebraMap,List)" -- see lieDerivation,
    -- make a graded derivation
  * LieDerivation * LieAlgebraMap, --
    composition of a derivation and a homomorphism
  * Number LieAlgebraMap -- multiplication of a
    number and a homomorphism
  * RingElement LieAlgebraMap, --
    multiplication of a field element and a homomorphism
  * source(LieAlgebraMap) -- get the source
    of a map
  * target(LieAlgebraMap) -- get the target
    of a map
  * trace(ZZ,LieSubSpace,LieAlgebraMap)
    -- compute the trace of a Lie
    algebra map acting on a Lie subspace

For the programmer
==================

The object LieAlgebraMap, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

LieAlgebraMap * LieAlgebraMap -- composition of homomorphisms
*************************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        h = f*g
  * Inputs:
      * f, an instance of the type LieAlgebraMap, a
        homomorphism from $M$ to $L$
      * g, an instance of the type LieAlgebraMap, a
        homomorphism from $N$ to $M$
  * Outputs:
      * h, an instance of the type LieAlgebraMap, the
        composition from $N$ to $L$

Description
===========

If $f$ or $g$ is not well defined, then it may happen that $f*g$ is well
defined and not equal to the map $x \ \to\  f(g(x))$ but equal to the map
induced by the values $f(g(gen))$ where $gen$ is a generator for $M$. Here is
an example of this fact for rings.

+---------------------+
|i1 : R = QQ[x]       |
|                     |
|o1 = R               |
|                     |
|o1 : PolynomialRing  |
+---------------------+
|i2 : S = R/(x*x)     |
|                     |
|o2 = S               |
|                     |
|o2 : QuotientRing    |
+---------------------+
|i3 : f = map(R,S)    |
|                     |
|o3 = map (R, S, {x}) |
|                     |
|o3 : RingMap R <--- S|
+---------------------+
|i4 : g = map(S,R)    |
|                     |
|o4 = map (S, R, {x}) |
|                     |
|o4 : RingMap S <--- R|
+---------------------+
|i5 : h = f*g         |
|                     |
|o5 = map (R, R, {x}) |
|                     |
|o5 : RingMap R <--- R|
+---------------------+
|i6 : isWellDefined f |
|                     |
|o6 = false           |
+---------------------+
|i7 : isWellDefined h |
|                     |
|o7 = true            |
+---------------------+
|i8 : use R           |
|                     |
|o8 = R               |
|                     |
|o8 : PolynomialRing  |
+---------------------+
|i9 : h(x*x)          |
|                     |
|      2              |
|o9 = x               |
|                     |
|o9 : R               |
+---------------------+
|i10 : f(g(x*x))      |
|                     |
|o10 = 0              |
|                     |
|o10 : R              |
+---------------------+
+-------------------------+
|i11 : L = lieAlgebra{a,b}|
|                         |
|o11 = L                  |
|                         |
|o11 : LieAlgebra         |
+-------------------------+
|i12 : f = map(L,L,{b,-a})|
|                         |
|o12 = f                  |
|                         |
|o12 : LieAlgebraMap      |
+-------------------------+
|i13 : describe(f*f+id_L) |
|                         |
|o13 = a => 0             |
|      b => 0             |
|      source => L        |
|      target => L        |
+-------------------------+

Ways to use this method:
========================

  * LieAlgebraMap * LieAlgebraMap, --
    composition of homomorphisms

LieAlgebraMap * LieDerivation -- composition of a homomorphism and a derivation
*******************************************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        h = g*d
  * Inputs:
      * g, an instance of the type LieAlgebraMap, a
        homomorphism from $L$ to $N$
      * d, an instance of the type LieDerivation, a
        derivation from $M$ to $L$
  * Outputs:
      * h, an instance of the type LieDerivation, a
        derivation from $M$ to $N$

Description
===========

The composition of maps $g*d$ is a derivation $M\ \to\ N$, with the composition
$g*f$ defining the module structure of $N$ over $M$, where $f: M\ \to\ L$
defines the module structure of $L$ over $M$.

+-----------------------------------+
|i1 : L = lieAlgebra{a,b}           |
|                                   |
|o1 = L                             |
|                                   |
|o1 : LieAlgebra                    |
+-----------------------------------+
|i2 : d = lieDerivation{a a b,b b a}|
|                                   |
|o2 = d                             |
|                                   |
|o2 : LieDerivation                 |
+-----------------------------------+
|i3 : describe d                    |
|                                   |
|o3 = a =>  - (a b a)               |
|     b => (b b a)                  |
|     map => id_L                   |
|     sign => 0                     |
|     weight => {2, 0}              |
|     source => L                   |
|     target => L                   |
+-----------------------------------+
|i4 : N = lieAlgebra{a1,b1}         |
|                                   |
|o4 = N                             |
|                                   |
|o4 : LieAlgebra                    |
+-----------------------------------+
|i5 : g = map(N,L,{b1,a1})          |
|                                   |
|o5 = g                             |
|                                   |
|o5 : LieAlgebraMap                 |
+-----------------------------------+
|i6 : h = g*d                       |
|                                   |
|o6 = h                             |
|                                   |
|o6 : LieDerivation                 |
+-----------------------------------+
|i7 : describe h                    |
|                                   |
|o7 = a => (b1 b1 a1)               |
|     b =>  - (a1 b1 a1)            |
|     map => g                      |
|     sign => 0                     |
|     weight => {2, 0}              |
|     source => L                   |
|     target => N                   |
+-----------------------------------+

Ways to use this method:
========================

  * LieAlgebraMap * LieDerivation, --
    composition of a homomorphism and a derivation

LieAlgebraMap + LieAlgebraMap -- addition of Lie homomorphisms
**************************************************************

Synopsis
========

  * Operator: + (Macaulay2Doc),
  * Usage:
        u = f + g
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * g, an instance of the type LieAlgebraMap,
  * Outputs:
      * u, an instance of the type LieAlgebraMap, the sum
        of $f$ and $g$

Description
===========

The symbol + is used as infix notation for the addition of Lie homomorphisms.

+------------------------+
|i1 : M = lieAlgebra{a,b}|
|                        |
|o1 = M                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : L = lieAlgebra{a,b}|
|                        |
|o2 = L                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(L,M,{a,b}) |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : g = map(L,M,{b,a}) |
|                        |
|o4 = g                  |
|                        |
|o4 : LieAlgebraMap      |
+------------------------+
|i5 : describe(f+g)      |
|                        |
|o5 = a => a + b         |
|     b => a + b         |
|     source => M        |
|     target => L        |
+------------------------+

Ways to use this method:
========================

  * LieAlgebraMap + LieAlgebraMap, --
    addition of Lie homomorphisms

LieAlgebraMap - LieAlgebraMap -- subtraction of Lie homomorphisms
*****************************************************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = f - g
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * g, an instance of the type LieAlgebraMap,
  * Outputs:
      * u, an instance of the type LieAlgebraMap, the
        difference of $f$ and $g$

Description
===========

The symbol - is used as infix notation for the subtraction of Lie
homomorphisms.

+------------------------+
|i1 : M = lieAlgebra{a,b}|
|                        |
|o1 = M                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : L = lieAlgebra{a,b}|
|                        |
|o2 = L                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(L,M,{a,b}) |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : g = map(L,M,{b,a}) |
|                        |
|o4 = g                  |
|                        |
|o4 : LieAlgebraMap      |
+------------------------+
|i5 : describe(f-g)      |
|                        |
|o5 = a => a - b         |
|     b =>  - a + b      |
|     source => M        |
|     target => L        |
+------------------------+

Ways to use this method:
========================

  * LieAlgebraMap - LieAlgebraMap, --
    subtraction of Lie homomorphisms

LieAlgebraMap == LieAlgebraMap -- whether two Lie algebra homomorphisms are defined in the same way
***************************************************************************************************

Synopsis
========

  * Operator: == (Macaulay2Doc),
  * Usage:
        f==g
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * g, an instance of the type LieAlgebraMap,
  * Outputs:
      * b, a Boolean value (Macaulay2Doc),

Description
===========

Two objects f and g of type LieAlgebraMap satisfies f==g if source f==source g,
target f==target g, and the values of the generators of source f under f
considered as elements in target g are the same as the values of the generators
of source g under g.

+------------------------+
|i1 : F = lieAlgebra{a,b}|
|                        |
|o1 = F                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : I = lieIdeal{a a b}|
|                        |
|o2 = I                  |
|                        |
|o2 : FGLieIdeal         |
+------------------------+
|i3 : f = map(F/I,F)     |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : G = lieAlgebra{a,b}|
|                        |
|o4 = G                  |
|                        |
|o4 : LieAlgebra         |
+------------------------+
|i5 : g=map(G/{a a b},G) |
|                        |
|o5 = g                  |
|                        |
|o5 : LieAlgebraMap      |
+------------------------+
|i6 : f==g               |
|                        |
|o6 = true               |
+------------------------+
|i7 : f===g              |
|                        |
|o7 = false              |
+------------------------+

See also
========

  * LieAlgebraMap -- the class of all Lie algebra
    homomorphisms

Ways to use this method:
========================

  * LieAlgebraMap == LieAlgebraMap, --
    whether two Lie algebra homomorphisms are defined in the same way

LieAlgebraMap @ LieElement -- formal application of a Lie map to a Lie element
******************************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),
  * Usage:
        y = f@x
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * x, an instance of the type LieElement, $x$ is an
        element in the source of $f$
  * Outputs:
      * y, an instance of the type LieElement, $y$ is the
        formal application of $f$ to the Lie element $x$

Description
===========

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : M = L/{a a b}      |
|                        |
|o2 = M                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(M,L)       |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : use L              |
+------------------------+
|i5 : f@a b b a          |
|                        |
|o5 = (b a b a)          |
|                        |
|o5 : M                  |
+------------------------+
|i6 : normalForm oo      |
|                        |
|o6 = 0                  |
|                        |
|o6 : M                  |
+------------------------+

See also
========

  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism

Ways to use this method:
========================

  * LieAlgebraMap @ LieElement -- formal
    application of a Lie map to a Lie element

LieAlgebraMap \ List -- apply a Lie homomorphism to every element in a list
***************************************************************************

Synopsis
========

  * Operator: \ (Macaulay2Doc),
  * Usage:
        y = f\x
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * x, a list (Macaulay2Doc), the elements in $x$ belong to the
        source of $f$
  * Outputs:
      * y, a list (Macaulay2Doc), the result of applying $f$ to
        every element in $x$

Description
===========

+--------------------------------------+
|i1 : L = lieAlgebra{a,b}              |
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : M = L/{a a b}                    |
|                                      |
|o2 = M                                |
|                                      |
|o2 : LieAlgebra                       |
+--------------------------------------+
|i3 : f = map(M,L)                     |
|                                      |
|o3 = f                                |
|                                      |
|o3 : LieAlgebraMap                    |
+--------------------------------------+
|i4 : basis(4,L)                       |
|                                      |
|o4 = {(a a b a), (b a b a), (b b b a)}|
|                                      |
|o4 : List                             |
+--------------------------------------+
|i5 : f\oo                             |
|                                      |
|o5 = {0, 0, (b b b a)}                |
|                                      |
|o5 : List                             |
+--------------------------------------+

Ways to use this method:
========================

  * LieAlgebraMap \ List -- apply a Lie
    homomorphism to every element in a list

LieAlgebraMap \\ List -- formal application of a Lie map to every element in a list
***********************************************************************************

Synopsis
========

  * Operator: \\ (Macaulay2Doc),
  * Usage:
        y = f\\x
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * x, a list (Macaulay2Doc), the elements in $x$ belong to the
        source of $f$
  * Outputs:
      * y, a list (Macaulay2Doc), the elements in $y$ are the
        formal application of $f$ to the elements in $x$

Description
===========

+--------------------------------------+
|i1 : L = lieAlgebra{a,b}              |
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : M = L/{a a b}                    |
|                                      |
|o2 = M                                |
|                                      |
|o2 : LieAlgebra                       |
+--------------------------------------+
|i3 : f = map(M,L)                     |
|                                      |
|o3 = f                                |
|                                      |
|o3 : LieAlgebraMap                    |
+--------------------------------------+
|i4 : b = basis(4,L)                   |
|                                      |
|o4 = {(a a b a), (b a b a), (b b b a)}|
|                                      |
|o4 : List                             |
+--------------------------------------+
|i5 : f\\b                             |
|                                      |
|o5 = {(a a b a), (b a b a), (b b b a)}|
|                                      |
|o5 : List                             |
+--------------------------------------+
|i6 : f\b                              |
|                                      |
|o6 = {0, 0, (b b b a)}                |
|                                      |
|o6 : List                             |
+--------------------------------------+

See also
========

  * LieAlgebraMap \ List -- apply a Lie
    homomorphism to every element in a list

Ways to use this method:
========================

  * LieAlgebraMap \\ List -- formal application
    of a Lie map to every element in a list

LieAlgebraMap LieElement -- apply a Lie homomorphism
****************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        y = f x
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * x, an instance of the type LieElement, $x$ is an
        element in the source of $f$
  * Outputs:
      * y, an instance of the type LieElement, $y$ is the
        result of applying $f$ to the element $x$

Description
===========

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : M = L/{a a b}      |
|                        |
|o2 = M                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(M,L)       |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : use L              |
+------------------------+
|i5 : f a b b a          |
|                        |
|o5 = 0                  |
|                        |
|o5 : M                  |
+------------------------+

Ways to use this method:
========================

  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism

LieDerivation -- the class of all Lie algebra derivations
*********************************************************

Description
===========

Given a homomorphism of Lie algebras $f: M \ \to\  L$, one has the notion of a
derivation $d: M \ \to\  L$ over $f$, and LieDerivation is the type
representing such pairs $(d,\,f)$ ($f$ is the identity for the case of ordinary
derivations from $L$ to $L$). The derivation law reads \break $d$ [x, y] = [$d$
x, $f$ y] ± [$f$ x, $d$ y], \break where the sign is determined by the sign of
interchanging $d$ and $x$, i.e., the sign is plus if sign$(d)$=0 or sign$(x)$=0
and minus otherwise. An object of type LieDerivation need not be well defined
as a map. Use isWellDefined(ZZ,LieDerivation),
to check if the derivation is well
defined.

+-----------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                             |
|                                                     |
|o1 = L                                               |
|                                                     |
|o1 : LieAlgebra                                      |
+-----------------------------------------------------+
|i2 : M = lieAlgebra{a,b,c}                           |
|                                                     |
|o2 = M                                               |
|                                                     |
|o2 : LieAlgebra                                      |
+-----------------------------------------------------+
|i3 : f = map(L,M)                                    |
|                                                     |
|o3 = f                                               |
|                                                     |
|o3 : LieAlgebraMap                                   |
+-----------------------------------------------------+
|i4 : use L                                           |
+-----------------------------------------------------+
|i5 : der = lieDerivation(f,{a a b,b b a,a a b+b b a})|
|                                                     |
|o5 = der                                             |
|                                                     |
|o5 : LieDerivation                                   |
+-----------------------------------------------------+
|i6 : describe der                                    |
|                                                     |
|o6 = a =>  - (a b a)                                 |
|     b => (b b a)                                    |
|     c =>  - (a b a) + (b b a)                       |
|     map => f                                        |
|     sign => 0                                       |
|     weight => {2, 0}                                |
|     source => M                                     |
|     target => L                                     |
+-----------------------------------------------------+
|i7 : use M                                           |
+-----------------------------------------------------+
|i8 : der a c                                         |
|                                                     |
|o8 =  - (a a b a) + (b a b a)                        |
|                                                     |
|o8 : L                                               |
+-----------------------------------------------------+

See also
========

  * lieDerivation -- make a graded derivation
  * isWellDefined(ZZ,LieDerivation)
    -- whether a Lie derivation is well
    defined
  * sign -- get the sign of a homogeneous element
  * Homomorphisms and derivations

Functions and methods returning an object of class LieDerivation :
==================================================================

  * euler(LieAlgebra) -- compute the Euler
    derivation
  * innerDerivation -- make the derivation defined by
    right Lie multiplication by a Lie element
  * lieDerivation -- make a graded derivation

Methods that use an object of class LieDerivation :
===================================================

  * - LieDerivation -- unary negation
  * "describe(LieDerivation)" -- see describe(LieAlgebra),
    -- real description
  * "firstDegree(LieDerivation)" -- see firstDegree, -- get
    the degree of an element
  * image(LieDerivation) -- make the image of
    a Lie derivation
  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation
  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation
  * isWellDefined(ZZ,LieDerivation)
    -- whether a Lie derivation is well
    defined
  * kernel(LieDerivation) -- make the kernel
    of a map
  * LieAlgebraMap * LieDerivation, --
    composition of a homomorphism and a derivation
  * LieDerivation * LieAlgebraMap, --
    composition of a derivation and a homomorphism
  * LieDerivation + LieDerivation, --
    addition of Lie derivations
  * LieDerivation - LieDerivation, --
    subtraction of Lie derivations
  * LieDerivation @ LieElement -- formal
    application of a derivation to a Lie element
  * LieDerivation \ List -- apply a derivation to
    every element in a list
  * LieDerivation \\ List -- formal application
    of a derivation to every element in a list
  * LieDerivation LieDerivation -- Lie
    multiplication of ordinary derivations
  * LieDerivation LieElement -- apply a
    derivation
  * map(LieDerivation) -- get the map in the
    definition of a Lie derivation
  * Number LieDerivation -- multiplication of a
    number and a derivation
  * RingElement LieDerivation, --
    multiplication of a field element and a derivation
  * "sign(LieDerivation)" -- see sign, -- get the sign of a
    homogeneous element
  * source(LieDerivation) -- get the source
    of a map
  * target(LieDerivation) -- get the target
    of a map
  * "weight(LieDerivation)" -- see weight, -- get the weight of a
    homogeneous element

For the programmer
==================

The object LieDerivation, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

lieDerivation -- make a graded derivation
*****************************************

Description
===========

Let $f: M ->  L$ be a map of Lie algebras. Let $F$ be a free Lie algebra
together with a surjective homomorphism $p: F  ->  M$. Define $g: F ->  L$ as
the composition $g=f*p$. A derivation $dF:F  ->   L$ over $g$ is defined by
defining $dF$ on the generators of $F$ and then extending $dF$ to all of $F$ by
the derivation rule $dF$ [x, y] = [$dF$ x, $g$ y] ± [$g$ x, $dF$ y], where  the
sign is plus if sign$(d)=0$ or sign$(x)=0$ and minus otherwise. The output d
represents the induced map $M  ->   L$, which might not be well defined. That
the derivation is indeed well defined may be checked (up to a certain degree)
using isWellDefined(ZZ,LieDerivation).
When no $f$ of class LieAlgebraMap is
given as input, the derivation $d$ maps $L$ to $L$ (and $f$ is the identity
map). In this case, the set $D$ of elements of class LieDerivation is a graded
Lie algebra with Lie multiplication using SPACE. If $L$ has differential $del$,
then $D$ is a differential Lie algebra with differential $d ->  $[$del$,$d$].
If $e$ is the Euler derivation on $L$, then $d ->  $[$e$,$d$] is the Euler
derivation on $D$.

Synopsis
========

  * Usage:
        d=lieDerivation(f,defs)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
      * defs, a list (Macaulay2Doc), the values of the generators
  * Outputs:
      * d, an instance of the type LieDerivation,
+--------------------------------------------------------------------+
|i1 : L=lieAlgebra({x,y},Signs=>1)                                   |
|                                                                    |
|o1 = L                                                              |
|                                                                    |
|o1 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i2 : M=lieAlgebra({a,b},Weights=>{2,2})/{b a b}                     |
|                                                                    |
|o2 = M                                                              |
|                                                                    |
|o2 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i3 : f = map(L,M,{x x,0_L})                                         |
|warning: the map might not be well defined,                         |
|         use isWellDefined                                          |
|                                                                    |
|o3 = f                                                              |
|                                                                    |
|o3 : LieAlgebraMap                                                  |
+--------------------------------------------------------------------+
|i4 : d = lieDerivation(f,{x,y})                                     |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o4 = d                                                              |
|                                                                    |
|o4 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i5 : isWellDefined(6,d)                                             |
|the derivation is well defined for all degrees                      |
|                                                                    |
|o5 = true                                                           |
+--------------------------------------------------------------------+
|i6 : describe d                                                     |
|                                                                    |
|o6 = a => x                                                         |
|     b => y                                                         |
|     map => f                                                       |
|     sign => 1                                                      |
|     weight => {-1, 0}                                              |
|     source => M                                                    |
|     target => L                                                    |
+--------------------------------------------------------------------+
|i7 : d a b                                                          |
|                                                                    |
|o7 =  - (y x x)                                                     |
|                                                                    |
|o7 : L                                                              |
+--------------------------------------------------------------------+

Synopsis
========

  * Usage:
        d=lieDerivation(defs)
  * Inputs:
      * defs, a list (Macaulay2Doc), the values of the generators
  * Outputs:
      * d, an instance of the type LieDerivation,
+-------------------------------------+
|i8 : L=lieAlgebra({x,y},Signs=>1)    |
|                                     |
|o8 = L                               |
|                                     |
|o8 : LieAlgebra                      |
+-------------------------------------+
|i9 : e = euler L                     |
|                                     |
|o9 = e                               |
|                                     |
|o9 : LieDerivation                   |
+-------------------------------------+
|i10 : d1 = lieDerivation{x y,0_L}    |
|                                     |
|o10 = d1                             |
|                                     |
|o10 : LieDerivation                  |
+-------------------------------------+
|i11 : d3 = lieDerivation{x x x y,0_L}|
|                                     |
|o11 = d3                             |
|                                     |
|o11 : LieDerivation                  |
+-------------------------------------+
|i12 : describe d3                    |
|                                     |
|o12 = x =>  - (1/2)(x y x x)         |
|      y => 0                         |
|      map => id_L                    |
|      sign => 1                      |
|      weight => {3, 0}               |
|      source => L                    |
|      target => L                    |
+-------------------------------------+
|i13 : e d1                           |
|                                     |
|o13 = d1                             |
|                                     |
|o13 : LieDerivation                  |
+-------------------------------------+
|i14 : e d3                           |
|                                     |
|o14 = derivation from L to L         |
|                                     |
|o14 : LieDerivation                  |
+-------------------------------------+
|i15 : oo===3 d3                      |
|                                     |
|o15 = true                           |
+-------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * sign -- get the sign of a homogeneous element
  * weight -- get the weight of a homogeneous element
  * LieDerivation -- the class of all Lie algebra
    derivations
  * differentialLieAlgebra -- make a
    differential Lie algebra

Ways to use lieDerivation :
===========================

  * "lieDerivation(LieAlgebraMap,List)"
  * "lieDerivation(List)"

For the programmer
==================

The object lieDerivation, is a method function (Macaulay2Doc).

LieDerivation * LieAlgebraMap -- composition of a derivation and a homomorphism
*******************************************************************************

Synopsis
========

  * Operator: * (Macaulay2Doc),
  * Usage:
        h = d*g
  * Inputs:
      * d, an instance of the type LieDerivation, a
        derivation from $M$ to $L$
      * g, an instance of the type LieAlgebraMap, a
        homomorphism from $N$ to $M$
  * Outputs:
      * h, an instance of the type LieDerivation, a
        derivation from $N$ to $L$

Description
===========

The composition of maps $d*g$ is a derivation $N\ \to\ L$, with the composition
$f*g$ defining the module structure of $L$ over $N$, where $f: M\ \to\ L$
defines the module structure of $L$ over $M$.

+---------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                           |
|                                                   |
|o1 = L                                             |
|                                                   |
|o1 : LieAlgebra                                    |
+---------------------------------------------------+
|i2 : M = lieAlgebra{a,b,c}                         |
|                                                   |
|o2 = M                                             |
|                                                   |
|o2 : LieAlgebra                                    |
+---------------------------------------------------+
|i3 : N = lieAlgebra{a1,b1}                         |
|                                                   |
|o3 = N                                             |
|                                                   |
|o3 : LieAlgebra                                    |
+---------------------------------------------------+
|i4 : f = map(L,M)                                  |
|                                                   |
|o4 = f                                             |
|                                                   |
|o4 : LieAlgebraMap                                 |
+---------------------------------------------------+
|i5 : use M                                         |
+---------------------------------------------------+
|i6 : g = map(M,N,{b,a})                            |
|                                                   |
|o6 = g                                             |
|                                                   |
|o6 : LieAlgebraMap                                 |
+---------------------------------------------------+
|i7 : use L                                         |
+---------------------------------------------------+
|i8 : d = lieDerivation(f,{a a b,b b a,a a b+b b a})|
|                                                   |
|o8 = d                                             |
|                                                   |
|o8 : LieDerivation                                 |
+---------------------------------------------------+
|i9 : describe d                                    |
|                                                   |
|o9 = a =>  - (a b a)                               |
|     b => (b b a)                                  |
|     c =>  - (a b a) + (b b a)                     |
|     map => f                                      |
|     sign => 0                                     |
|     weight => {2, 0}                              |
|     source => M                                   |
|     target => L                                   |
+---------------------------------------------------+
|i10 : describe(f*g)                                |
|                                                   |
|o10 = a1 => b                                      |
|      b1 => a                                      |
|      source => N                                  |
|      target => L                                  |
+---------------------------------------------------+
|i11 : describe(d*g)                                |
|                                                   |
|o11 = a1 => (b b a)                                |
|      b1 =>  - (a b a)                             |
|      map => homomorphism from N to L              |
|      sign => 0                                    |
|      weight => {2, 0}                             |
|      source => N                                  |
|      target => L                                  |
+---------------------------------------------------+

Ways to use this method:
========================

  * LieDerivation * LieAlgebraMap, --
    composition of a derivation and a homomorphism

LieDerivation + LieDerivation -- addition of Lie derivations
************************************************************

Synopsis
========

  * Operator: + (Macaulay2Doc),
  * Usage:
        u = d + e
  * Inputs:
      * d, an instance of the type LieDerivation,
      * e, an instance of the type LieDerivation,
  * Outputs:
      * u, an instance of the type LieDerivation, the sum
        of $d$ and $e$

Description
===========

The symbol + is used as infix notation for the addition of Lie derivations $M\
\to\ L$ with the same defining map $f: M\ \to\ L$.

+-------------------------------------+
|i1 : M = lieAlgebra{a,b}             |
|                                     |
|o1 = M                               |
|                                     |
|o1 : LieAlgebra                      |
+-------------------------------------+
|i2 : L = lieAlgebra{a1,b1}           |
|                                     |
|o2 = L                               |
|                                     |
|o2 : LieAlgebra                      |
+-------------------------------------+
|i3 : f = map(L,M,{b1,a1})            |
|                                     |
|o3 = f                               |
|                                     |
|o3 : LieAlgebraMap                   |
+-------------------------------------+
|i4 : d = lieDerivation(f,{a1,b1})    |
|                                     |
|o4 = d                               |
|                                     |
|o4 : LieDerivation                   |
+-------------------------------------+
|i5 : e = lieDerivation(f,{2 b1,2 a1})|
|                                     |
|o5 = e                               |
|                                     |
|o5 : LieDerivation                   |
+-------------------------------------+
|i6 : u = d+e                         |
|                                     |
|o6 = u                               |
|                                     |
|o6 : LieDerivation                   |
+-------------------------------------+
|i7 : describe u                      |
|                                     |
|o7 = a => a1 + 2 b1                  |
|     b => 2 a1 + b1                  |
|     map => f                        |
|     sign => 0                       |
|     weight => {0, 0}                |
|     source => M                     |
|     target => L                     |
+-------------------------------------+
|i8 : u a b                           |
|                                     |
|o8 = 4 (b1 a1)                       |
|                                     |
|o8 : L                               |
+-------------------------------------+

Ways to use this method:
========================

  * LieDerivation + LieDerivation, --
    addition of Lie derivations

LieDerivation - LieDerivation -- subtraction of Lie derivations
***************************************************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u = d - e
  * Inputs:
      * d, an instance of the type LieDerivation,
      * e, an instance of the type LieDerivation,
  * Outputs:
      * u, an instance of the type LieDerivation, the
        difference of $d$ and $e$

Description
===========

The symbol - is used as infix notation for the subtraction of Lie derivations
$M\ \to\ L$ with the same defining map $f: M\ \to\ L$.

+-------------------------------------+
|i1 : M = lieAlgebra{a,b}             |
|                                     |
|o1 = M                               |
|                                     |
|o1 : LieAlgebra                      |
+-------------------------------------+
|i2 : L = lieAlgebra{a1,b1}           |
|                                     |
|o2 = L                               |
|                                     |
|o2 : LieAlgebra                      |
+-------------------------------------+
|i3 : f = map(L,M,{b1,a1})            |
|                                     |
|o3 = f                               |
|                                     |
|o3 : LieAlgebraMap                   |
+-------------------------------------+
|i4 : d = lieDerivation(f,{a1,b1})    |
|                                     |
|o4 = d                               |
|                                     |
|o4 : LieDerivation                   |
+-------------------------------------+
|i5 : e = lieDerivation(f,{2 b1,2 a1})|
|                                     |
|o5 = e                               |
|                                     |
|o5 : LieDerivation                   |
+-------------------------------------+
|i6 : u = d-e                         |
|                                     |
|o6 = u                               |
|                                     |
|o6 : LieDerivation                   |
+-------------------------------------+
|i7 : describe u                      |
|                                     |
|o7 = a => a1 - 2 b1                  |
|     b =>  - 2 a1 + b1               |
|     map => f                        |
|     sign => 0                       |
|     weight => {0, 0}                |
|     source => M                     |
|     target => L                     |
+-------------------------------------+
|i8 : u a b                           |
|                                     |
|o8 =  - 4 (b1 a1)                    |
|                                     |
|o8 : L                               |
+-------------------------------------+

Ways to use this method:
========================

  * LieDerivation - LieDerivation, --
    subtraction of Lie derivations

LieDerivation @ LieElement -- formal application of a derivation to a Lie element
*********************************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),
  * Usage:
        y = d@x
  * Inputs:
      * d, an instance of the type LieDerivation,
      * x, an instance of the type LieElement, $x$ is an
        element in the source of $d$
  * Outputs:
      * y, an instance of the type LieElement, $y$ is the
        formal application of $d$ to the Lie element $x$

Description
===========

+------------------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                                                |
|                                                                        |
|o1 = L                                                                  |
|                                                                        |
|o1 : LieAlgebra                                                         |
+------------------------------------------------------------------------+
|i2 : d = euler L                                                        |
|                                                                        |
|o2 = d                                                                  |
|                                                                        |
|o2 : LieDerivation                                                      |
+------------------------------------------------------------------------+
|i3 : d@a a a b a                                                        |
|                                                                        |
|o3 = (a a a b a) + (a a a b a) + (a a a b a) + (a a a b a) + (a a a b a)|
|                                                                        |
|o3 : L                                                                  |
+------------------------------------------------------------------------+

See also
========

  * LieDerivation LieElement -- apply a
    derivation

Ways to use this method:
========================

  * LieDerivation @ LieElement -- formal
    application of a derivation to a Lie element

LieDerivation \ List -- apply a derivation to every element in a list
*********************************************************************

Synopsis
========

  * Operator: \ (Macaulay2Doc),
  * Usage:
        y = d\x
  * Inputs:
      * d, an instance of the type LieDerivation,
      * x, a list (Macaulay2Doc), the elements in $x$ belong to the
        source of $d$
  * Outputs:
      * y, a list (Macaulay2Doc), the result of applying $d$ to
        every element in $x$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                                                     |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : d = euler L                                                             |
|                                                                             |
|o2 = d                                                                       |
|                                                                             |
|o2 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i3 : d\basis(5,L)                                                            |
|                                                                             |
|o3 = {5 (a a a b a), 5 (b a a b a), 5 (a b a b a), 5 (b b a b a), 5 (a b b b |
|     ------------------------------------------------------------------------|
|     a), 5 (b b b b a)}                                                      |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+

Ways to use this method:
========================

  * LieDerivation \ List -- apply a derivation to
    every element in a list

LieDerivation \\ List -- formal application of a derivation to every element in a list
**************************************************************************************

Synopsis
========

  * Operator: \\ (Macaulay2Doc),
  * Usage:
        y = d\\x
  * Inputs:
      * d, an instance of the type LieDerivation,
      * x, a list (Macaulay2Doc), the elements in $x$ belong to the
        source of $d$
  * Outputs:
      * y, a list (Macaulay2Doc), the elements in $y$ are the
        formal application of $d$ to the elements in $x$

Description
===========

+-----------------------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a a b,b b b a}                                   |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : d = euler L                                                             |
|                                                                             |
|o2 = d                                                                       |
|                                                                             |
|o2 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i3 : d\\basis(5,L)                                                           |
|                                                                             |
|o3 = {(a b a b a) + (a b a b a) + (a b a b a) + (a b a b a) + (a b a b a), (b|
|     ------------------------------------------------------------------------|
|     b a b a) + (b b a b a) + (b b a b a) + (b b a b a) + (b b a b a)}       |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : d\basis(5,L)                                                            |
|                                                                             |
|o4 = {5 (a b a b a), 5 (b b a b a)}                                          |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * LieDerivation \ List -- apply a derivation to
    every element in a list

Ways to use this method:
========================

  * LieDerivation \\ List -- formal application
    of a derivation to every element in a list

LieDerivation LieDerivation -- Lie multiplication of ordinary derivations
*************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        e = d1 d2
  * Inputs:
      * d1, an instance of the type LieDerivation,
      * d2, an instance of the type LieDerivation,
  * Outputs:
      * e, an instance of the type LieDerivation, the Lie
        product of $d1$ and $d2$

Description
===========

The vector space $D$ of graded derivations from $L$ to $L$ with the identity
map as defining map, see LieDerivation, is a graded Lie
algebra. If $L$ has a differential $del$, then $D$ is a differential graded Lie
algebra with differential $d$\ \to\ [$del$,$d$].

+--------------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a a b,b b b a}                          |
|                                                                    |
|o1 = L                                                              |
|                                                                    |
|o1 : LieAlgebra                                                     |
+--------------------------------------------------------------------+
|i2 : d0 = lieDerivation{a,b}                                        |
|                                                                    |
|o2 = d0                                                             |
|                                                                    |
|o2 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i3 : d2 = lieDerivation{a b a,0_L}                                  |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o3 = d2                                                             |
|                                                                    |
|o3 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i4 : d4 = lieDerivation{a b a b a,0_L}                              |
|warning: the derivation might not be well defined, use isWellDefined|
|                                                                    |
|o4 = d4                                                             |
|                                                                    |
|o4 : LieDerivation                                                  |
+--------------------------------------------------------------------+
|i5 : describe d2 d4                                                 |
|                                                                    |
|o5 = a => (a b a b a b a)                                           |
|     b => 0                                                         |
|     map => id_L                                                    |
|     sign => 0                                                      |
|     weight => {6, 0}                                               |
|     source => L                                                    |
|     target => L                                                    |
+--------------------------------------------------------------------+
|i6 : describe d0 d4                                                 |
|                                                                    |
|o6 = a => 4 (a b a b a)                                             |
|     b => 0                                                         |
|     map => id_L                                                    |
|     sign => 0                                                      |
|     weight => {4, 0}                                               |
|     source => L                                                    |
|     target => L                                                    |
+--------------------------------------------------------------------+

See also
========

  * lieDerivation -- make a graded derivation

Ways to use this method:
========================

  * LieDerivation LieDerivation -- Lie
    multiplication of ordinary derivations

LieDerivation LieElement -- apply a derivation
**********************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        y = d x
  * Inputs:
      * d, an instance of the type LieDerivation,
      * x, an instance of the type LieElement, $x$ is an
        element in the source of $d$
  * Outputs:
      * y, an instance of the type LieElement, $y$ is the
        result of applying $d$ to the element $x$

Description
===========

+---------------------------+
|i1 : L = lieAlgebra{a,b}   |
|                           |
|o1 = L                     |
|                           |
|o1 : LieAlgebra            |
+---------------------------+
|i2 : d = lieDerivation{a,b}|
|                           |
|o2 = d                     |
|                           |
|o2 : LieDerivation         |
+---------------------------+
|i3 : d a a a b a           |
|                           |
|o3 = 5 (a a a b a)         |
|                           |
|o3 : L                     |
+---------------------------+

See also
========

  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism

Ways to use this method:
========================

  * LieDerivation LieElement -- apply a
    derivation

LieElement -- the class of all Lie algebra elements
***************************************************

Description
===========

This type represents elements in Lie algebras. Each object of type LieAlgebra
is itself a type L, and elements in L belong also to the type LieElement, which
is the parent of L. Internally an element of type LieElement is of type
BasicList consisting of two basic lists. The first is a list of coefficients
and the second is a list of basic lists of numbered generators that correspond
to iterated Lie products of generators.

+------------------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}                            |
|                                                      |
|o1 = L                                                |
|                                                      |
|o1 : LieAlgebra                                       |
+------------------------------------------------------+
|i2 : showStructure L                                  |
|                                                      |
|o2 = Thing : BasicList : LieElement : L               |
|                                                      |
|o2 : Descent                                          |
+------------------------------------------------------+
|i3 : x = a a b - 3 c b a                              |
|                                                      |
|o3 =  - (a b a) - 3 (c b a)                           |
|                                                      |
|o3 : L                                                |
+------------------------------------------------------+
|i4 : x#0                                              |
|                                                      |
|o4 = BasicList{-1, -3}                                |
|                                                      |
|o4 : BasicList                                        |
+------------------------------------------------------+
|i5 : x#1                                              |
|                                                      |
|o5 = BasicList{BasicList{0, 1, 0}, BasicList{2, 1, 0}}|
|                                                      |
|o5 : BasicList                                        |
+------------------------------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * LieElement LieElement -- multiplication of
    Lie elements
  * First Lie algebra tutorial

Functions and methods returning an object of class LieElement :
===============================================================

  * ZZ _ LieAlgebra -- get the zero element

Methods that use an object of class LieElement :
================================================

  * - LieElement -- unary negation
  * coefficients(LieElement) -- get the
    coefficients and monomials of a Lie element
  * "firstDegree(LieElement)" -- see firstDegree, -- get the
    degree of an element
  * "indexForm(LieElement)" -- see indexForm, -- get a Lie
    element in the polynomial ring representation
  * "innerDerivation(LieElement)" -- see innerDerivation,
    -- make the derivation defined by right Lie multiplication
    by a Lie element
  * LieAlgebraMap @ LieElement -- formal
    application of a Lie map to a Lie element
  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism
  * LieDerivation @ LieElement -- formal
    application of a derivation to a Lie element
  * LieDerivation LieElement -- apply a
    derivation
  * LieElement + LieElement -- addition of Lie
    elements
  * LieElement ++ LieElement -- formal
    addition of Lie elements
  * LieElement - LieElement -- subtraction of
    Lie elements
  * LieElement / LieElement -- formal
    subtraction of Lie elements
  * LieElement @ LieElement -- formal
    multiplication of Lie elements
  * LieElement LieElement -- multiplication of
    Lie elements
  * member(LieElement,LieSubSpace),
    -- whether a Lie element belongs to a Lie subspace
  * monomials(LieElement) -- get the
    monomials of a Lie element
  * "normalForm(LieElement)" -- see normalForm, -- compute
    the normal form of a LieElement
  * Number @ LieElement -- formal multiplication of
    a number and a Lie element
  * Number LieElement -- multiplication of a number
    and a Lie element
  * RingElement @ LieElement -- formal
    multiplication of a ring element and a Lie element
  * RingElement LieElement -- multiplication of
    a field element and a Lie element
  * "sign(LieElement)" -- see sign, -- get the sign of a
    homogeneous element
  * "weight(LieElement)" -- see weight, -- get the weight of a
    homogeneous element

For the programmer
==================

The object LieElement, is a type (Macaulay2Doc),
with ancestor classes BasicList (Macaulay2Doc), < Thing (Macaulay2Doc).

LieElement + LieElement -- addition of Lie elements
***************************************************

Synopsis
========

  * Operator: + (Macaulay2Doc),
  * Usage:
        u=x + y
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
      * y, an instance of the type LieElement, $y$ is of
        type $L$
  * Outputs:
      * u, an instance of the type LieElement, $u$ is of
        type $L$, the sum of $x$ and $y$

Description
===========

The symbol + is used as infix notation for the Lie addition. The elements $x$
and $y$ must have the same weight and sign.

+-----------------------------+
|i1 : L = lieAlgebra{a,b}     |
|                             |
|o1 = L                       |
|                             |
|o1 : LieAlgebra              |
+-----------------------------+
|i2 : b b b a + a a a b       |
|                             |
|o2 =  - (a a b a) + (b b b a)|
|                             |
|o2 : L                       |
+-----------------------------+

Ways to use this method:
========================

  * LieElement + LieElement -- addition of Lie
    elements

LieElement ++ LieElement -- formal addition of Lie elements
***********************************************************

Synopsis
========

  * Operator: ++ (Macaulay2Doc),

Description
===========

Formal addition of Lie elements. See the documentation of the formal Lie
multiplication for more information.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : a@b++b@a           |
|                        |
|o2 = (a b) + (b a)      |
|                        |
|o2 : L                  |
+------------------------+

See also
========

  * LieElement @ LieElement -- formal
    multiplication of Lie elements
  * LieElement / LieElement -- formal
    subtraction of Lie elements
  * LieElement + LieElement -- addition of Lie
    elements

Ways to use this method:
========================

  * LieElement ++ LieElement -- formal
    addition of Lie elements

LieElement - LieElement -- subtraction of Lie elements
******************************************************

Synopsis
========

  * Operator: - (Macaulay2Doc),
  * Usage:
        u=x - y
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
      * y, an instance of the type LieElement, $y$ is of
        type $L$
  * Outputs:
      * u, an instance of the type LieElement, $u$ is of
        type $L$, the difference of $x$ and $y$

Description
===========

The symbol - is used as infix notation for the Lie subtraction. The elements
$x$ and $y$ must hade the same weight and sign.

+--------------------------+
|i1 : L = lieAlgebra{a,b}  |
|                          |
|o1 = L                    |
|                          |
|o1 : LieAlgebra           |
+--------------------------+
|i2 : b b b a - a a a b    |
|                          |
|o2 = (a a b a) + (b b b a)|
|                          |
|o2 : L                    |
+--------------------------+

Ways to use this method:
========================

  * LieElement - LieElement -- subtraction of
    Lie elements

LieElement / LieElement -- formal subtraction of Lie elements
*************************************************************

Synopsis
========

  * Operator: / (Macaulay2Doc),

Description
===========

Formal subtraction of Lie elements. See the documentation of the formal Lie
multiplication for more information.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : a/a                |
|                        |
|o2 = a - a              |
|                        |
|o2 : L                  |
+------------------------+

See also
========

  * LieElement @ LieElement -- formal
    multiplication of Lie elements
  * LieElement ++ LieElement -- formal
    addition of Lie elements
  * LieElement - LieElement -- subtraction of
    Lie elements

Ways to use this method:
========================

  * LieElement / LieElement -- formal
    subtraction of Lie elements

LieElement @ LieElement -- formal multiplication of Lie elements
****************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),
  * Usage:
        u=x (symbol @) y
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
      * y, an instance of the type LieElement, $y$ is of
        type $L$
  * Outputs:
      * u, an instance of the type LieElement, u is of type
        $L$, the formal Lie product of $x$ and $y$

Description
===========

The "at sign" $@$ is used as infix notation for a "formal" Lie multiplication
(and also formal multiplication by scalars) where no simplifications are
performed. (The formal addition is written as ++ and / is used as formal
subtraction.) In this sense, it is different from the use of SPACE as
multiplication operator, which always gives an object of normal form as output.
The formal operations are useful when relations are introduced in a big free
Lie algebra, since then it might be too hard to compute the normal form of the
relations, which is not needed in order to define a quotient Lie algebra. For
an example, see Minimal models, Ext-algebras and Koszul duals.

+----------------------------------------------+
|i1 : L = lieAlgebra{a,b}                      |
|                                              |
|o1 = L                                        |
|                                              |
|o1 : LieAlgebra                               |
+----------------------------------------------+
|i2 : (b@b)@a/3@b@a@b++2@a@b@b                 |
|                                              |
|o2 = (b b a) - (b b a) - 3 (b a b) + 2 (a b b)|
|                                              |
|o2 : L                                        |
+----------------------------------------------+
|i3 : (b b) a - 3 b a b + 2 a b b              |
|                                              |
|o3 = 3 (b b a)                                |
|                                              |
|o3 : L                                        |
+----------------------------------------------+

See also
========

  * LieElement ++ LieElement -- formal
    addition of Lie elements
  * LieElement / LieElement -- formal
    subtraction of Lie elements
  * LieElement LieElement -- multiplication of
    Lie elements

Ways to use this method:
========================

  * LieElement @ LieElement -- formal
    multiplication of Lie elements

LieElement LieElement -- multiplication of Lie elements
*******************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        u=x y
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
      * y, an instance of the type LieElement, $y$ is of
        type $L$
  * Outputs:
      * u, an instance of the type LieElement, $u$ is of
        type $L$, the Lie product of $x$ and $y$

Description
===========

SPACE is used as infix notation for the Lie multiplication. It is right
associative and hence \break b b b a is the same as (b (b (b a))), which in
output is written as (b b b a) or a normal form equivalent.

+--------------------------------------------------+
|i1 : L = lieAlgebra{a,b,c}                        |
|                                                  |
|o1 = L                                            |
|                                                  |
|o1 : LieAlgebra                                   |
+--------------------------------------------------+
|i2 : b b b a                                      |
|                                                  |
|o2 = (b b b a)                                    |
|                                                  |
|o2 : L                                            |
+--------------------------------------------------+
|i3 : (a b+b c) (a c)                              |
|                                                  |
|o3 = (a c b a) - (b c c a) - (c a b a) + (c b c a)|
|                                                  |
|o3 : L                                            |
+--------------------------------------------------+

Ways to use this method:
========================

  * LieElement LieElement -- multiplication of
    Lie elements

lieHomology -- make the homology as a vector space
**************************************************

Description
===========

The basis elements for the homology of a Lie algebra (which is of type
VectorSpace) are represented as cycles in the Lie algebra.

Synopsis
========

  * Usage:
        H=lieHomology(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * H, an instance of the type VectorSpace, the
        homology of the Lie algebra
+------------------------------------------------------------+
|i1 : L=lieAlgebra({a,b},Signs=>{1,0},Weights=>{{2,0},{2,1}},|
|             Field=>ZZ/3,LastWeightHomological=>true)       |
|                                                            |
|o1 = L                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : D=differentialLieAlgebra({0_L,a})                      |
|                                                            |
|o2 = D                                                      |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : H=lieHomology D                                        |
|                                                            |
|o3 = H                                                      |
|                                                            |
|o3 : VectorSpace                                            |
+------------------------------------------------------------+
|i4 : dims(10,H)                                             |
|                                                            |
|o4 = | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 1 0 0 0 0 |                                |
|     | 0 0 0 0 0 1 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|     | 0 0 0 0 0 0 0 0 0 0 |                                |
|                                                            |
|              10        10                                  |
|o4 : Matrix ZZ   <--- ZZ                                    |
+------------------------------------------------------------+
|i5 : basis(6,H)                                             |
|                                                            |
|o5 = {(b a a), (b b a)}                                     |
|                                                            |
|o5 : List                                                   |
+------------------------------------------------------------+

See also
========

  * boundaries -- make the subalgebra of boundaries
  * cycles -- make the subalgebra of cycles

Ways to use lieHomology :
=========================

  * "lieHomology(LieAlgebra)"

For the programmer
==================

The object lieHomology, is a method function (Macaulay2Doc).

LieIdeal -- the class of all Lie ideals
***************************************

Description
===========

This type represents Lie ideals. It is a subtype of LieSubAlgebra and it has
FGLieIdeal as a subtype.

+-------------------------------+
|i1 : L = lieAlgebra{a,b}       |
|                               |
|o1 = L                         |
|                               |
|o1 : LieAlgebra                |
+-------------------------------+
|i2 : I=lieIdeal{a a b}         |
|                               |
|o2 = I                         |
|                               |
|o2 : FGLieIdeal                |
+-------------------------------+
|i3 : Q=L/I                     |
|                               |
|o3 = Q                         |
|                               |
|o3 : LieAlgebra                |
+-------------------------------+
|i4 : f=map(Q,L)                |
|                               |
|o4 = f                         |
|                               |
|o4 : LieAlgebraMap             |
+-------------------------------+
|i5 : J=kernel f                |
|                               |
|o5 = J                         |
|                               |
|o5 : LieIdeal                  |
+-------------------------------+
|i6 : I===J                     |
|                               |
|o6 = false                     |
+-------------------------------+
|i7 : describe I                |
|                               |
|o7 = generators => { - (a b a)}|
|     lieAlgebra => L           |
+-------------------------------+

The kernel of $f$ is defined as the inverse image under $f$ of the zero ideal.

+--------------------------------------------------+
|i8 : describe J                                   |
|                                                  |
|o8 = inverse => {f, finitely generated ideal of Q}|
|     lieAlgebra => L                              |
+--------------------------------------------------+
|i9 : J#inverse_1===zeroIdeal Q                    |
|                                                  |
|o9 = true                                         |
+--------------------------------------------------+

See also
========

  * FGLieIdeal -- the class of all finitely generated Lie
    ideals
  * FGLieSubAlgebra -- the class of all finitely
    generated Lie subalgebras

Types of LieIdeal :
===================

  * FGLieIdeal -- the class of all finitely generated Lie
    ideals

Methods that use an object of class LieIdeal :
==============================================

  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra
  * quotient(LieIdeal,FGLieSubAlgebra)
    -- make the quotient of a Lie
    ideal by a finitely generated Lie subalgebra

For the programmer
==================

The object LieIdeal, is a type (Macaulay2Doc), with
ancestor classes LieSubAlgebra, < LieSubSpace
< VectorSpace < HashTable (Macaulay2Doc)
< Thing (Macaulay2Doc).

lieIdeal -- make a Lie ideal
****************************

Description
===========

The input should be a list $g$ of Lie elements in a Lie algebra $L$ or a
subspace $S$ of $L$. The program adds generators to the input list or the
subspace to make the ideal invariant under the differential. In the case when
the input is a list, these extra non-normalized generators may be seen using
gens(I).

Synopsis
========

  * Usage:
        I=lieIdeal(g)
  * Inputs:
      * g, a list (Macaulay2Doc),
  * Outputs:
      * I, an instance of the type LieIdeal, the ideal
        generated by the list $g$
+----------------------------------------------------------+
|i1 : F = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}}, |
|               Signs=>{1,1,1},LastWeightHomological=>true)|
|                                                          |
|o1 = F                                                    |
|                                                          |
|o1 : LieAlgebra                                           |
+----------------------------------------------------------+
|i2 : D = differentialLieAlgebra({0_F,a a,a b})            |
|                                                          |
|o2 = D                                                    |
|                                                          |
|o2 : LieAlgebra                                           |
+----------------------------------------------------------+
|i3 : I = lieIdeal{a b,c}                                  |
|                                                          |
|o3 = I                                                    |
|                                                          |
|o3 : FGLieIdeal                                           |
+----------------------------------------------------------+
|i4 : gens I                                               |
|                                                          |
|o4 = {(a b), c,  - (a a a), (a b)}                        |
|                                                          |
|o4 : List                                                 |
+----------------------------------------------------------+

Synopsis
========

  * Usage:
        I=lieIdeal(S)
  * Inputs:
      * S, an instance of the type LieSubSpace,
  * Outputs:
      * I, an instance of the type LieIdeal, the ideal
        generated by the subspace $S$
+-------------------------------+
|i5 : C = cycles D              |
|                               |
|o5 = C                         |
|                               |
|o5 : LieSubAlgebra             |
+-------------------------------+
|i6 : basis(4,C)                |
|                               |
|o6 = {(a a b), (b b) + 4 (a c)}|
|                               |
|o6 : List                      |
+-------------------------------+
|i7 : I = lieIdeal C            |
|                               |
|o7 = I                         |
|                               |
|o7 : LieIdeal                  |
+-------------------------------+
|i8 : basis(4,I)                |
|                               |
|o8 = {(a a b), (a c), (b b)}   |
|                               |
|o8 : List                      |
+-------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * lieSubSpace -- make a Lie subspace
  * LieAlgebra / LieIdeal -- make a quotient Lie
    algebra

Ways to use lieIdeal :
======================

  * "lieIdeal(LieSubSpace)"
  * "lieIdeal(List)"

For the programmer
==================

The object lieIdeal, is a method function (Macaulay2Doc).

lieRing -- get the internal ring for representation of Lie elements
*******************************************************************

Synopsis
========

  * Usage:
        R = L#cache.lieRing
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * R, a polynomial ring (Macaulay2Doc),

Description
===========

The ring $R$ is the internal polynomial ring representation of Lie elements,
which can be obtained by writing L#cache.lieRing. The Lie monomials are
represented as commutative monomials in this ring. The number of generators in
lieRing is the number of generators in the Lie algebra times the internal
counter L#cache.max, which initially is set to $5$, and is changed to $n+5$ if
a computation is performed up to degree $n$ with $n\ > $ L#cache.max.

+----------------------------------------+
|i1 : L=lieAlgebra{a,b}/{a a a b,b b b a}|
|                                        |
|o1 = L                                  |
|                                        |
|o1 : LieAlgebra                         |
+----------------------------------------+
|i2 : dims(1,4,L)                        |
|                                        |
|o2 = {2, 1, 2, 1}                       |
|                                        |
|o2 : List                               |
+----------------------------------------+
|i3 : L#cache.max                        |
|                                        |
|o3 = 5                                  |
+----------------------------------------+
|i4 : L#cache.lieRing                    |
|                                        |
|o4 = QQ[aR ..aR ]                       |
|          0    9                        |
|                                        |
|o4 : PolynomialRing                     |
+----------------------------------------+
|i5 : dims(1,6,L)                        |
|                                        |
|o5 = {2, 1, 2, 1, 2, 1}                 |
|                                        |
|o5 : List                               |
+----------------------------------------+
|i6 : L#cache.max                        |
|                                        |
|o6 = 11                                 |
+----------------------------------------+
|i7 : numgens L#cache.lieRing            |
|                                        |
|o7 = 22                                 |
+----------------------------------------+
|i8 : dims(1,10,L)                       |
|                                        |
|o8 = {2, 1, 2, 1, 2, 1, 2, 1, 2, 1}     |
|                                        |
|o8 : List                               |
+----------------------------------------+
|i9 : L#cache.max                        |
|                                        |
|o9 = 11                                 |
+----------------------------------------+
|i10 : numgens L#cache.lieRing           |
|                                        |
|o10 = 22                                |
+----------------------------------------+

See also
========

  * Second Lie algebra tutorial
  * mbRing -- a polynomial ring representation of the Lie
    algebra used for output

For the programmer
==================

The object lieRing, is a symbol (Macaulay2Doc).

LieSubAlgebra -- the class of all Lie subalgebras
*************************************************

Description
===========

This type represents Lie subalgebras (which are invariant under the
differential), and has the subtypes LieIdeal, FGLieIdeal, FGLieSubAlgebra.

+--------------------------------+
|i1 : L = lieAlgebra{a,b}        |
|                                |
|o1 = L                          |
|                                |
|o1 : LieAlgebra                 |
+--------------------------------+
|i2 : S=lieSubAlgebra{a}         |
|                                |
|o2 = S                          |
|                                |
|o2 : FGLieSubAlgebra            |
+--------------------------------+
|i3 : I=lieIdeal{a}              |
|                                |
|o3 = I                          |
|                                |
|o3 : FGLieIdeal                 |
+--------------------------------+
|i4 : instance(I,LieSubAlgebra)  |
|                                |
|o4 = true                       |
+--------------------------------+
|i5 : instance(I,FGLieSubAlgebra)|
|                                |
|o5 = false                      |
+--------------------------------+

See also
========

  * LieIdeal -- the class of all Lie ideals
  * FGLieSubAlgebra -- the class of all finitely
    generated Lie subalgebras

Types of LieSubAlgebra :
========================

  * FGLieSubAlgebra -- the class of all finitely
    generated Lie subalgebras
  * LieIdeal -- the class of all Lie ideals

For the programmer
==================

The object LieSubAlgebra, is a type (Macaulay2Doc),
with ancestor classes LieSubSpace, <
VectorSpace < HashTable (Macaulay2Doc) <
Thing (Macaulay2Doc).

lieSubAlgebra -- make a Lie subalgebra
**************************************

Synopsis
========

  * Usage:
        S=lieSubAlgebra(gens)
  * Inputs:
      * gens, a list (Macaulay2Doc), a list of elements in a Lie
        algebra $L$
  * Outputs:
      * S, an instance of the type FGLieSubAlgebra, the
        subalgebra of $L$ generated by the list gens

Description
===========

The input should be a list of Lie elements in a Lie algebra $L$. The program
adds generators for the subalgebra to make it invariant under the differential.

+-----------------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                                         |
|        Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},                    |
|        Signs=>{0,0,0,1,1,0},LastWeightHomological=>true)                    |
|                                                                             |
|o1 = F                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}               |
|                                                                             |
|o2 = D                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : S=lieSubAlgebra{b c - a c,a b,b r4 - a r4}                              |
|                                                                             |
|o3 = S                                                                       |
|                                                                             |
|o3 : FGLieSubAlgebra                                                         |
+-----------------------------------------------------------------------------+
|i4 : describe S                                                              |
|                                                                             |
|o4 = generators => { - (a c) + (b c),  - (b a),  - (a r4) + (b r4),  - (a a a|
|     lieAlgebra => D                                                         |
|     ------------------------------------------------------------------------|
|     c) + (b a a c)}                                                         |
+-----------------------------------------------------------------------------+
|i5 : basis(5,S)                                                              |
|                                                                             |
|o5 = {(a b a c) - (a b b c) - (b a a c) + (b a b c), (a a a c) - (b a a c),  |
|     ------------------------------------------------------------------------|
|     (a r4) - (b r4)}                                                        |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : d=differential D                                                        |
|                                                                             |
|o6 = d                                                                       |
|                                                                             |
|o6 : LieDerivation                                                           |
+-----------------------------------------------------------------------------+
|i7 : d\S#gens                                                                |
|                                                                             |
|o7 = {0, 0,  - (a a a c) + (b a a c), 0}                                     |
|                                                                             |
|o7 : List                                                                    |
+-----------------------------------------------------------------------------+
|i8 : (b c-a c) a b                                                           |
|                                                                             |
|o8 = (a b a c) - (a b b c) - (b a a c) + (b a b c)                           |
|                                                                             |
|o8 : D                                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * lieIdeal -- make a Lie ideal

Ways to use lieSubAlgebra :
===========================

  * "lieSubAlgebra(List)"

For the programmer
==================

The object lieSubAlgebra, is a method function (Macaulay2Doc).

LieSubSpace -- the class of all Lie subspaces
*********************************************

Description
===========

This type represents  Lie subspaces, and has the subtypes LieIdeal, FGLieIdeal,
LieSubAlgebra, FGLieSubAlgebra. A Lie subspace need not be invariant under the
differential.

+------------------------------+
|i1 : L = lieAlgebra{a,b}      |
|                              |
|o1 = L                        |
|                              |
|o1 : LieAlgebra               |
+------------------------------+
|i2 : S=lieSubSpace{a b}       |
|                              |
|o2 = S                        |
|                              |
|o2 : LieSubSpace              |
+------------------------------+
|i3 : I=lieIdeal{a b}          |
|                              |
|o3 = I                        |
|                              |
|o3 : FGLieIdeal               |
+------------------------------+
|i4 : instance(S,LieSubAlgebra)|
|                              |
|o4 = false                    |
+------------------------------+
|i5 : dims(1,3,S)              |
|                              |
|o5 = {0, 1, 0}                |
|                              |
|o5 : List                     |
+------------------------------+
|i6 : dims(1,3,I)              |
|                              |
|o6 = {0, 1, 2}                |
|                              |
|o6 : List                     |
+------------------------------+

See also
========

  * LieIdeal -- the class of all Lie ideals
  * LieSubAlgebra -- the class of all Lie subalgebras

Types of LieSubSpace :
======================

  * LieSubAlgebra -- the class of all Lie subalgebras

Methods that use an object of class LieSubSpace :
=================================================

  * generators(LieSubSpace) -- get the
    generators
  * image(LieAlgebraMap,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie algebra map
  * image(LieDerivation,LieSubSpace)
    -- make the image of a Lie subspace
    under a Lie derivation
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map
  * inverse(LieDerivation,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie derivation
  * "lieIdeal(LieSubSpace)" -- see lieIdeal, -- make a Lie
    ideal
  * LieSubSpace + LieSubSpace -- make the sum
    of two Lie subspaces
  * LieSubSpace @ LieSubSpace -- make the
    intersection of two Lie subspaces
  * member(LieElement,LieSubSpace),
    -- whether a Lie element belongs to a Lie subspace
  * trace(ZZ,LieSubSpace,LieAlgebraMap)
    -- compute the trace of a Lie
    algebra map acting on a Lie subspace

For the programmer
==================

The object LieSubSpace, is a type (Macaulay2Doc),
with ancestor classes VectorSpace, <
HashTable (Macaulay2Doc) < Thing (Macaulay2Doc).

lieSubSpace -- make a Lie subspace
**********************************

Synopsis
========

  * Usage:
        S=lieSubSpace(gens)
  * Inputs:
      * gens, a list (Macaulay2Doc), a list of homogeneous elements
        in a Lie algebra $L$
  * Outputs:
      * S, an instance of the type LieSubSpace, the
        subspace of $L$ generated by the list gens

Description
===========

The input should be a list of homogeneous Lie elements in a Lie algebra $L$.
The output need not in general be invariant under the differential.

+-------------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                               |
|        Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},          |
|        Signs=>{0,0,0,1,1,0},LastWeightHomological=>true)          |
|                                                                   |
|o1 = F                                                             |
|                                                                   |
|o1 : LieAlgebra                                                    |
+-------------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}     |
|                                                                   |
|o2 = D                                                             |
|                                                                   |
|o2 : LieAlgebra                                                    |
+-------------------------------------------------------------------+
|i3 : S=lieSubSpace{b c - a c,a b,b r4 - a r4}                      |
|                                                                   |
|o3 = S                                                             |
|                                                                   |
|o3 : LieSubSpace                                                   |
+-------------------------------------------------------------------+
|i4 : describe S                                                    |
|                                                                   |
|o4 = generators => { - (a c) + (b c),  - (b a),  - (a r4) + (b r4)}|
|     lieAlgebra => D                                               |
+-------------------------------------------------------------------+
|i5 : d=differential D                                              |
|                                                                   |
|o5 = d                                                             |
|                                                                   |
|o5 : LieDerivation                                                 |
+-------------------------------------------------------------------+
|i6 : basis(5,S)                                                    |
|                                                                   |
|o6 = {(a r4) - (b r4)}                                             |
|                                                                   |
|o6 : List                                                          |
+-------------------------------------------------------------------+
|i7 : d\oo                                                          |
|                                                                   |
|o7 = {(a a a c) - (b a a c)}                                       |
|                                                                   |
|o7 : List                                                          |
+-------------------------------------------------------------------+

See also
========

  * lieAlgebra -- make a free Lie algebra
  * lieSubAlgebra -- make a Lie subalgebra
  * lieIdeal -- make a Lie ideal

Ways to use lieSubSpace :
=========================

  * "lieSubSpace(List)"

For the programmer
==================

The object lieSubSpace, is a method function (Macaulay2Doc).

LieSubSpace + LieSubSpace -- make the sum of two Lie subspaces
**************************************************************

Synopsis
========

  * Operator: + (Macaulay2Doc),
  * Usage:
        S = A + B
  * Inputs:
      * A, an instance of the type LieSubSpace, an instance
        of type LieSubSpace
      * B, an instance of the type LieSubSpace, an instance
        of type LieSubSpace
  * Outputs:
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace, the sum of $A$ and $B$

Description
===========

If both $A$ and $B$ are instances of FGLieIdeal, then $S$ is of type
FGLieIdeal. Otherwise, if both $A$ and $B$ are instances of LieIdeal, then $S$
is of type LieIdeal. If exactly one of $A$ and $B$ is an instance of LieIdeal,
and the other is an instance of LieSubAlgebra, then $S$ is of type
LieSubAlgebra. Otherwise, $S$ is of type LieSubSpace.

+--------------------------------------------------------------+
|i1 : F=lieAlgebra({a,b,c,r3,r4,r42},                          |
|        Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},     |
|        Signs=>{0,0,0,1,1,0},LastWeightHomological=>true)     |
|                                                              |
|o1 = F                                                        |
|                                                              |
|o1 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}|
|                                                              |
|o2 = D                                                        |
|                                                              |
|o2 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i3 : I=lieIdeal{b c - a c,a b,b r4 - a r4}                    |
|                                                              |
|o3 = I                                                        |
|                                                              |
|o3 : FGLieIdeal                                               |
+--------------------------------------------------------------+
|i4 : Q=D/I                                                    |
|                                                              |
|o4 = Q                                                        |
|                                                              |
|o4 : LieAlgebra                                               |
+--------------------------------------------------------------+
|i5 : f=map(Q,D)                                               |
|                                                              |
|o5 = f                                                        |
|                                                              |
|o5 : LieAlgebraMap                                            |
+--------------------------------------------------------------+
|i6 : J=lieIdeal{a c}                                          |
|                                                              |
|o6 = J                                                        |
|                                                              |
|o6 : FGLieIdeal                                               |
+--------------------------------------------------------------+
|i7 : K=inverse(f,J)                                           |
|                                                              |
|o7 = K                                                        |
|                                                              |
|o7 : LieIdeal                                                 |
+--------------------------------------------------------------+
|i8 : use D                                                    |
+--------------------------------------------------------------+
|i9 : I+lieIdeal{a c}                                          |
|                                                              |
|o9 = finitely generated ideal of D                            |
|                                                              |
|o9 : FGLieIdeal                                               |
+--------------------------------------------------------------+
|i10 : dims(6,oo)                                              |
|                                                              |
|o10 = | 0 1 4 7 16 30 |                                       |
|      | 0 0 0 0 2  9  |                                       |
|      | 0 0 0 0 0  1  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|                                                              |
|               6        6                                     |
|o10 : Matrix ZZ  <--- ZZ                                      |
+--------------------------------------------------------------+
|i11 : dims(6,K)                                               |
|                                                              |
|o11 = | 0 1 4 7 16 30 |                                       |
|      | 0 0 0 0 2  9  |                                       |
|      | 0 0 0 0 0  1  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|      | 0 0 0 0 0  0  |                                       |
|                                                              |
|               6        6                                     |
|o11 : Matrix ZZ  <--- ZZ                                      |
+--------------------------------------------------------------+

See also
========

  * LieSubSpace @ LieSubSpace -- make the
    intersection of two Lie subspaces

Ways to use this method:
========================

  * LieSubSpace + LieSubSpace -- make the sum
    of two Lie subspaces

LieSubSpace @ LieSubSpace -- make the intersection of two Lie subspaces
***********************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),
  * Usage:
        S = A @ B
  * Inputs:
      * A, an instance of the type LieSubSpace, an instance
        of LieSubSpace
      * B, an instance of the type LieSubSpace, an instance
        of LieSubSpace
  * Outputs:
      * S, an instance of the type LieSubSpace, an instance
        of LieSubSpace, the intersection of $A$ and $B$

Description
===========

If both $A$ and $B$ are instances of LieIdeal, then $S$ is of type  LieIdeal.
If both $A$ and $B$ are instances of LieSubAlgebra but not both of LieIdeal,
then $S$ is of type  LieSubAlgebra. Otherwise, $S$ is of type  LieSubSpace.

+-----------------------------------------+
|i1 : L = lieAlgebra{a,b,c}               |
|                                         |
|o1 = L                                   |
|                                         |
|o1 : LieAlgebra                          |
+-----------------------------------------+
|i2 : A=lieIdeal{a}                       |
|                                         |
|o2 = A                                   |
|                                         |
|o2 : FGLieIdeal                          |
+-----------------------------------------+
|i3 : B=lieIdeal{b}                       |
|                                         |
|o3 = B                                   |
|                                         |
|o3 : FGLieIdeal                          |
+-----------------------------------------+
|i4 : S=A@B                               |
|                                         |
|o4 = S                                   |
|                                         |
|o4 : LieIdeal                            |
+-----------------------------------------+
|i5 : basis(3,S)                          |
|                                         |
|o5 = {(a b a), (b b a), (c b a), (b c a)}|
|                                         |
|o5 : List                                |
+-----------------------------------------+
|i6 : T=A+B                               |
|                                         |
|o6 = T                                   |
|                                         |
|o6 : FGLieIdeal                          |
+-----------------------------------------+
|i7 : dims(1,3,L/T)                       |
|                                         |
|o7 = {1, 0, 0}                           |
|                                         |
|o7 : List                                |
+-----------------------------------------+
|i8 : dims(1,5,L/A@B)                     |
|                                         |
|o8 = {3, 2, 4, 6, 12}                    |
|                                         |
|o8 : List                                |
+-----------------------------------------+
|i9 : dims(1,5,L/A++L/B)                  |
|                                         |
|o9 = {4, 2, 4, 6, 12}                    |
|                                         |
|o9 : List                                |
+-----------------------------------------+

See also
========

  * LieSubSpace + LieSubSpace -- make the sum
    of two Lie subspaces
  * LieAlgebra ++ LieAlgebra -- direct sum of
    Lie algebras

Ways to use this method:
========================

  * LieSubSpace @ LieSubSpace -- make the
    intersection of two Lie subspaces

listMultiply -- multiplication of lists
***************************************

Synopsis
========

  * Usage:
        m=listMultiply(x,y)
  * Inputs:
      * x, a list (Macaulay2Doc),
      * y, a list (Macaulay2Doc), $x$ and $y$ are lists of Lie
        elements from the same Lie algebra or lists of Ext-elements from the
        same Ext-algebra
  * Outputs:
      * m, a list (Macaulay2Doc), of lists

Description
===========

The first list in the output consists of the first element in $x$ multiplied by
all elements in $y$.

+-----------------------------------------------------------------------------+
|i1 : K=lieAlgebra({a,b,c},Signs=>1)/{a a,b b- 2 c a}                         |
|                                                                             |
|o1 = K                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : E=extAlgebra(3,K)                                                       |
|                                                                             |
|o2 = E                                                                       |
|                                                                             |
|o2 : ExtAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : dims(3,E)                                                               |
|                                                                             |
|o3 = | 3 0 0 |                                                               |
|     | 0 2 0 |                                                               |
|     | 0 0 1 |                                                               |
|                                                                             |
|              3        3                                                     |
|o3 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i4 : listMultiply(basis(1,E),basis(2,E))                                     |
|                                                                             |
|o4 = {{0, ext_5}, {0, 0}, {0, 0}}                                            |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+
|i5 : basis(2,K)                                                              |
|                                                                             |
|o5 = {(b a), (c a), (c b), (c c)}                                            |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : listMultiply(basis(1,K),oo)                                             |
|                                                                             |
|o6 = {{0, 0,  - (c b a),  - 2 (c c a)}, {0, 0,  - (c c a),  - 2 (c c b)}, {(c|
|     ------------------------------------------------------------------------|
|     b a), (c c a), (c c b), 0}}                                             |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * LieElement LieElement -- multiplication of
    Lie elements
  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements

For the programmer
==================

The object listMultiply, is a function closure (Macaulay2Doc).

map(LieAlgebra) -- get the map of a minimal model
*************************************************

Synopsis
========

  * Function: map (Macaulay2Doc),
  * Usage:
        f = map(M)
  * Inputs:
      * M, an instance of the type LieAlgebra, the minimal
        model
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, null
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * f, an instance of the type LieAlgebraMap,

Description
===========

The optional inputs given above are not relevant for Lie algebras. If $M$ is
the minimal model of a Lie algebra $L$, then there is defined a Lie algebra map
$f: M \ \to\  L$, and this map is represented by map(M).

+------------------------------------+
|i1 : L=lieAlgebra{a,b,c}/{a b,a b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : M=minimalModel(3,L)            |
|                                    |
|o2 = M                              |
|                                    |
|o2 : LieAlgebra                     |
+------------------------------------+
|i3 : describe map(M)                |
|                                    |
|o3 = fr  => a                       |
|       0                            |
|     fr  => b                       |
|       1                            |
|     fr  => c                       |
|       2                            |
|     fr  => 0                       |
|       3                            |
|     fr  => 0                       |
|       4                            |
|     source => M                    |
|     target => L                    |
+------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * map(LieAlgebra,LieAlgebra) -- make
    a natural Lie algebra homomorphism
  * map(LieDerivation) -- get the map in the
    definition of a Lie derivation
  * minimalModel -- compute the minimal model
  * Differential Lie algebra tutorial

Ways to use this method:
========================

  * map(LieAlgebra) -- get the map of a minimal
    model

map(LieAlgebra,LieAlgebra) -- make a natural Lie algebra homomorphism
*********************************************************************

Synopsis
========

  * Function: map (Macaulay2Doc),
  * Usage:
        f=map(L,M)
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * M, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, null
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * f, an instance of the type LieAlgebraMap, a map
        from $M$ to $L$

Description
===========

The optional inputs given above are not relevant for Lie algebras. The effect
of map(L,M) is that the "common" generators are mapped to themselves and the
other generators are mapped to 0 (cf map for rings). Two generators are
"common" if they have the same name and the same weight and sign. The output
map f might not be well defined and not commute with the differentials. It can
be checked whether this is true by using isWellDefined(ZZ,LieAlgebraMap).

+---------------------------------------------+
|i1 : M = lieAlgebra{a,b,c}                   |
|                                             |
|o1 = M                                       |
|                                             |
|o1 : LieAlgebra                              |
+---------------------------------------------+
|i2 : L = lieAlgebra({a,b,d},Weights=>{2,1,1})|
|                                             |
|o2 = L                                       |
|                                             |
|o2 : LieAlgebra                              |
+---------------------------------------------+
|i3 : f = map(L,M)                            |
|                                             |
|o3 = f                                       |
|                                             |
|o3 : LieAlgebraMap                           |
+---------------------------------------------+
|i4 : describe f                              |
|                                             |
|o4 = a => 0                                  |
|     b => b                                  |
|     c => 0                                  |
|     source => M                             |
|     target => L                             |
+---------------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * map(LieAlgebra) -- get the map of a minimal
    model
  * map(LieDerivation) -- get the map in the
    definition of a Lie derivation
  * source(LieAlgebraMap) -- get the source
    of a map
  * target(LieAlgebraMap) -- get the target
    of a map
  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * Homomorphisms and derivations

Ways to use this method:
========================

  * map(LieAlgebra,LieAlgebra) -- make
    a natural Lie algebra homomorphism

map(LieAlgebra,LieAlgebra,List) -- make a Lie algebra homomorphism
******************************************************************

Synopsis
========

  * Function: map (Macaulay2Doc),
  * Usage:
        f=map(L,M,homdefs)
  * Inputs:
      * L, an instance of the type LieAlgebra,
      * M, an instance of the type LieAlgebra,
      * homdefs, a list (Macaulay2Doc), of elements in L
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, null
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * f, an instance of the type LieAlgebraMap, a map
        from $M$ to $L$

Description
===========

The optional inputs given above are not relevant for Lie algebras. The
generators of M are mapped to the Lie elements in the last argument homdefs.
The output map f might not be well defined and not commute with the
differentials. It can be checked whether this is true by using
isWellDefined(ZZ,LieAlgebraMap).

+---------------------------------------------------------------------------+
|i1 : L1=lieAlgebra({a,b},Signs=>1,LastWeightHomological=>true,             |
|         Weights=>{{1,0},{2,1}})/{a a}                                     |
|                                                                           |
|o1 = L1                                                                    |
|                                                                           |
|o1 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i2 : F2=lieAlgebra({a,b,c},                                                |
|         Weights=>{{1,0},{2,1},{5,2}},Signs=>1,LastWeightHomological=>true)|
|                                                                           |
|o2 = F2                                                                    |
|                                                                           |
|o2 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i3 : D2=differentialLieAlgebra{0_F2,a a,a a a b}                           |
|                                                                           |
|o3 = D2                                                                    |
|                                                                           |
|o3 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i4 : L2=D2/{a a a a b,a b a b + a c}                                       |
|                                                                           |
|o4 = L2                                                                    |
|                                                                           |
|o4 : LieAlgebra                                                            |
+---------------------------------------------------------------------------+
|i5 : use L1                                                                |
+---------------------------------------------------------------------------+
|i6 : f=map(L1,L2,{a,0_L1,a b b})                                           |
|warning: the map might not be well defined,                                |
|         use isWellDefined                                                 |
|                                                                           |
|o6 = f                                                                     |
|                                                                           |
|o6 : LieAlgebraMap                                                         |
+---------------------------------------------------------------------------+
|i7 : isWellDefined(6,f)                                                    |
|the map is well defined for all degrees                                    |
|the map commutes with the differential for all degrees                     |
|                                                                           |
|o7 = true                                                                  |
+---------------------------------------------------------------------------+
|i8 : describe f                                                            |
|                                                                           |
|o8 = a => a                                                                |
|     b => 0                                                                |
|     c => (a b b)                                                          |
|     source => L2                                                          |
|     target => L1                                                          |
+---------------------------------------------------------------------------+
|i9 : use L2                                                                |
+---------------------------------------------------------------------------+
|i10 : f c c                                                                |
|                                                                           |
|o10 = 2 (a b b a b b)                                                      |
|                                                                           |
|o10 : L1                                                                   |
+---------------------------------------------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra) -- make
    a natural Lie algebra homomorphism
  * map(LieAlgebra) -- get the map of a minimal
    model
  * map(LieDerivation) -- get the map in the
    definition of a Lie derivation
  * source(LieAlgebraMap) -- get the source
    of a map
  * target(LieAlgebraMap) -- get the target
    of a map
  * LieAlgebraMap LieElement -- apply a Lie
    homomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined
  * Homomorphisms and derivations

Ways to use this method:
========================

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism

map(LieDerivation) -- get the map in the definition of a Lie derivation
***********************************************************************

Synopsis
========

  * Function: map (Macaulay2Doc),
  * Usage:
        f = map(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Optional inputs (Macaulay2Doc),:
      * Degree (Macaulay2Doc), => ..., default value null, null
      * DegreeLift (Macaulay2Doc), => ...,
        default value null, null
      * DegreeMap (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * f, an instance of the type LieAlgebraMap,

Description
===========

The optional inputs given above are not relevant for Lie algebras. If $d$ is a
derivation $M \ \to\  L$, then there is defined a Lie algebra map $f: M \ \to\
L$, which determines the $M$-module-structure on $L$, and this map is
represented by map(d).

+------------------------------------------------+
|i1 : L=lieAlgebra({x,y},Signs=>1)               |
|                                                |
|o1 = L                                          |
|                                                |
|o1 : LieAlgebra                                 |
+------------------------------------------------+
|i2 : M=lieAlgebra({a,b},Signs=>0,Weights=>{2,2})|
|                                                |
|o2 = M                                          |
|                                                |
|o2 : LieAlgebra                                 |
+------------------------------------------------+
|i3 : f = map(L,M,{x x,x y})                     |
|                                                |
|o3 = f                                          |
|                                                |
|o3 : LieAlgebraMap                              |
+------------------------------------------------+
|i4 : d = lieDerivation(f,{2 x,-y})              |
|                                                |
|o4 = d                                          |
|                                                |
|o4 : LieDerivation                              |
+------------------------------------------------+
|i5 : describe d                                 |
|                                                |
|o5 = a => 2 x                                   |
|     b =>  - y                                  |
|     map => f                                   |
|     sign => 1                                  |
|     weight => {-1, 0}                          |
|     source => M                                |
|     target => L                                |
+------------------------------------------------+
|i6 : d a b                                      |
|                                                |
|o6 = 0                                          |
|                                                |
|o6 : L                                          |
+------------------------------------------------+

See also
========

  * map(LieAlgebra,LieAlgebra,List)
    -- make a Lie algebra homomorphism
  * map(LieAlgebra,LieAlgebra) -- make
    a natural Lie algebra homomorphism
  * map(LieAlgebra) -- get the map of a minimal
    model
  * lieDerivation -- make a graded derivation
  * Homomorphisms and derivations

Ways to use this method:
========================

  * map(LieDerivation) -- get the map in the
    definition of a Lie derivation

mbRing -- a polynomial ring representation of the Lie algebra used for output
*****************************************************************************

Synopsis
========

  * Usage:
        R=L#cache.mbRing
  * Outputs:
      * R, a polynomial ring (Macaulay2Doc),

Description
===========

The ring is used as a representation of the Lie algebra $L$ and may be obtained
as L#cache.mbRing. The ring mbRing, is very large: it has as many
generators as the total dimension of the computed Lie algebra. For this reason,
you should give the ring a name to avoid a large output. In order to transform
a Lie element to a linear polynomial in L#cache.mbRing, use indexForm.
For the other direction, use
standardForm(RingElement,LieAlgebra).

+-----------------------------------------------+
|i1 : L=lieAlgebra{a,b,c}/{a b-a c}             |
|                                               |
|o1 = L                                         |
|                                               |
|o1 : LieAlgebra                                |
+-----------------------------------------------+
|i2 : dims(1,5,L)                               |
|                                               |
|o2 = {3, 2, 5, 10, 24}                         |
|                                               |
|o2 : List                                      |
+-----------------------------------------------+
|i3 : R=L#cache.mbRing                          |
|                                               |
|o3 = R                                         |
|                                               |
|o3 : PolynomialRing                            |
+-----------------------------------------------+
|i4 : numgens R                                 |
|                                               |
|o4 = 44                                        |
+-----------------------------------------------+
|i5 : indexForm(a a a a b+a a a b c)            |
|                                               |
|o5 = - mb       - mb       + mb                |
|         {5, 0}     {5, 1}     {5, 2}          |
|                                               |
|o5 : R                                         |
+-----------------------------------------------+
|i6 : standardForm(oo,L)                        |
|                                               |
|o6 =  - (a a a c a) - (b a a c a) + (c a a c a)|
|                                               |
|o6 : L                                         |
+-----------------------------------------------+
|i7 : a a a a b+a a a b c                       |
|                                               |
|o7 =  - (a a a c a) - (b a a c a) + (c a a c a)|
|                                               |
|o7 : L                                         |
+-----------------------------------------------+

See also
========

  * indexForm -- get a Lie element in the polynomial ring
    representation
  * standardForm(RingElement,LieAlgebra)
    -- get a Lie element in
    standard form
  * lieRing -- get the internal ring for representation of Lie
    elements

For the programmer
==================

The object mbRing, is a symbol (Macaulay2Doc).

member(LieElement,LieSubSpace) -- whether a Lie element belongs to a Lie subspace
*********************************************************************************

Synopsis
========

  * Function: member (Macaulay2Doc),
  * Usage:
        b=member(x,S)
  * Inputs:
      * x, an instance of the type LieElement,
      * S, an instance of the type LieSubSpace, an instance
        of type LieSubSpace
  * Outputs:
      * b, a Boolean value (Macaulay2Doc), true if $x$ belongs
        to $S$ and false otherwise

Description
===========

+--------------------------------------------------+
|i1 : L=lieAlgebra{a,b,c}/{a a b-c c b,b b a-b b c}|
|                                                  |
|o1 = L                                            |
|                                                  |
|o1 : LieAlgebra                                   |
+--------------------------------------------------+
|i2 : I=lieIdeal{a}                                |
|                                                  |
|o2 = I                                            |
|                                                  |
|o2 : FGLieIdeal                                   |
+--------------------------------------------------+
|i3 : S=lieSubAlgebra{b,c}                         |
|                                                  |
|o3 = S                                            |
|                                                  |
|o3 : FGLieSubAlgebra                              |
+--------------------------------------------------+
|i4 : member(b b c,I)                              |
|                                                  |
|o4 = true                                         |
+--------------------------------------------------+
|i5 : member(a b b c,S)                            |
|                                                  |
|o5 = true                                         |
+--------------------------------------------------+

See also
========

  * LieSubSpace -- the class of all Lie subspaces
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map

Ways to use this method:
========================

  * member(LieElement,LieSubSpace),
    -- whether a Lie element belongs to a Lie subspace

Minimal models, Ext-algebras and Koszul duals
*********************************************

The Koszul dual of the polynomial ring $\mathbb Q$ [ $x$ ] is the exterior
algebra on one odd generator. This is the enveloping algebra of the free Lie
algebra on one odd generator $a$ modulo [$a$,$a$].

+------------------------------------+
|i1 : R=QQ[x]                        |
|                                    |
|o1 = R                              |
|                                    |
|o1 : PolynomialRing                 |
+------------------------------------+
|i2 : L=koszulDual R                 |
|                                    |
|o2 = L                              |
|                                    |
|o2 : LieAlgebra                     |
+------------------------------------+
|i3 : describe L                     |
|                                    |
|o3 = generators => {ko }            |
|                      0             |
|     Weights => {{1, 0}}            |
|     Signs => {1}                   |
|     ideal => { - (1/2)(ko_0 ko_0)} |
|     ambient => LieAlgebra{...10...}|
|     diff => {}                     |
|     Field => QQ                    |
|     computedDegree => 0            |
+------------------------------------+

The Ext-algebra of $L$ is $Ext_{UL}(k,k)$, where $k$ is the coefficient field
of $L$. It may be obtained using extAlgebra. A vector space
basis for the Ext-algebra in positive degrees is obtained using
generators(ExtAlgebra). This basis originates from
the Lie generators in the minimal model, see minimalModel, for
which the homological degree have been raised by 1 and the signs changed.

+-----------------------------------------------------------------------+
|i4 : M=minimalModel(4,L)                                               |
|                                                                       |
|o4 = M                                                                 |
|                                                                       |
|o4 : LieAlgebra                                                        |
+-----------------------------------------------------------------------+
|i5 : describe M                                                        |
|                                                                       |
|o5 = generators => {fr , fr , fr , fr }                                |
|                      0    1    2    3                                 |
|     Weights => {{1, 0}, {2, 1}, {3, 2}, {4, 3}}                       |
|     Signs => {1, 1, 1, 1}                                             |
|     ideal => {}                                                       |
|     ambient => LieAlgebra{...10...}                                   |
|     diff => {0, (fr_0 fr_0), (fr_0 fr_1), (fr_1 fr_1) + 4 (fr_0 fr_2)}|
|     Field => QQ                                                       |
|     computedDegree => 4                                               |
|     map => fr  => ko_0                                                |
|              0                                                        |
|            fr  => 0                                                   |
|              1                                                        |
|            fr  => 0                                                   |
|              2                                                        |
|            fr  => 0                                                   |
|              3                                                        |
|            source => M                                                |
|            target => L                                                |
+-----------------------------------------------------------------------+
|i6 : E=extAlgebra(4,L)                                                 |
|                                                                       |
|o6 = E                                                                 |
|                                                                       |
|o6 : ExtAlgebra                                                        |
+-----------------------------------------------------------------------+
|i7 : gE=gens E                                                         |
|                                                                       |
|o7 = {ext_0, ext_1, ext_2, ext_3}                                      |
|                                                                       |
|o7 : List                                                              |
+-----------------------------------------------------------------------+
|i8 : weight\gE                                                         |
|                                                                       |
|o8 = {{1, 1}, {2, 2}, {3, 3}, {4, 4}}                                  |
|                                                                       |
|o8 : List                                                              |
+-----------------------------------------------------------------------+
|i9 : sign\gE                                                           |
|                                                                       |
|o9 = {0, 0, 0, 0}                                                      |
|                                                                       |
|o9 : List                                                              |
+-----------------------------------------------------------------------+

The product in the Ext-algebra, see ExtElement ExtElement,
is derived by the program from the quadratic part of the
differential in the minimal model. The Ext-algebra is a skew-commutative
algebra. In case $L$ is the Koszul dual of a skew-commutative Koszul algebra
$R$, the Ext-algebra of $L$ is equal to $R$.

+-----------------------------+
|i10 : dims(4,E)              |
|                             |
|o10 = | 1 0 0 0 |            |
|      | 0 1 0 0 |            |
|      | 0 0 1 0 |            |
|      | 0 0 0 1 |            |
|                             |
|               4        4    |
|o10 : Matrix ZZ  <--- ZZ     |
+-----------------------------+
|i11 : ext_0 ext_0 ext_0 ext_0|
|                             |
|o11 = 8ext_3                 |
|                             |
|o11 : E                      |
+-----------------------------+

Observe that the first row of the matrix dims(4,E) gives the dimensions of $E$
in degree 1 to 5 and homological degree 1.

Here is the first known example of a non-Koszul algebra, due to Christer Lech.
It is the polynomial algebra in four variables modulo five general quadratic
forms, which may be specialized as follows.

+-----------------------------------+
|i12 : R = QQ[x,y,z,u]              |
|                                   |
|o12 = R                            |
|                                   |
|o12 : PolynomialRing               |
+-----------------------------------+
|i13 : I = {x^2,y^2,z^2,u^2,x*y+z*u}|
|                                   |
|        2   2   2   2              |
|o13 = {x , y , z , u , x*y + z*u}  |
|                                   |
|o13 : List                         |
+-----------------------------------+
|i14 : S = R/I                      |
|                                   |
|o14 = S                            |
|                                   |
|o14 : QuotientRing                 |
+-----------------------------------+
|i15 : hilbertSeries(S,Order=>4)    |
|                                   |
|                 2                 |
|o15 = 1 + 4T + 5T                  |
|                                   |
|o15 : ZZ[T]                        |
+-----------------------------------+
|i16 : L = koszulDual(S)            |
|                                   |
|o16 = L                            |
|                                   |
|o16 : LieAlgebra                   |
+-----------------------------------+
|i17 : E=extAlgebra(4,L)            |
|                                   |
|o17 = E                            |
|                                   |
|o17 : ExtAlgebra                   |
+-----------------------------------+
|i18 : dims(4,E)                    |
|                                   |
|o18 = | 4 0 0 0 |                  |
|      | 0 5 0 0 |                  |
|      | 0 0 0 5 |                  |
|      | 0 0 0 0 |                  |
|                                   |
|               4        4          |
|o18 : Matrix ZZ  <--- ZZ           |
+-----------------------------------+

The minimal model may also be used to compute a minimal presentation of a Lie
algebra, see minimalPresentation(ZZ,LieAlgebra).
Below is an example of computing a
minimal presentation of the Lie algebra of strictly upper triangular
5x5-matrices. The Lie algebra is presented  by means of the multiplication
table of the natural basis \{$ekn;\ 1\ \le\ k\ <\ n \le\ 5$\}. The degree of
$ekn$ is $n-k$. The relation [ $e14$, $e15$ ] is of degree 7 in the free Lie
algebra $F$ on the basis, and the dimension of $F$ in degree 7 is 7596. To
avoid a computation of the normal form of [ $e14$, $e15$ ] one uses "formal"
operators. The symbol $@$ is used as formal Lie multiplication and formal
multiplication by scalars, ++ is used as formal addition, and / is used as
formal subtraction. Observe that $@$, like SPACE, is right associative, while /
is left associative, so $a/b/c$ means $a-b-c$ and not $a-b+c$. Here is an
example of a formal expression, whose normal form is 0. The normal form may be
obtained by applying normalForm.

+-------------------------------------------------+
|i19 : L=lieAlgebra{a,b,c}                        |
|                                                 |
|o19 = L                                          |
|                                                 |
|o19 : LieAlgebra                                 |
+-------------------------------------------------+
|i20 : a@b@c++3@a@c@b++2@c@b@a/2@b@c@a            |
|                                                 |
|o20 = (a b c) + 3 (a c b) + 2 (c b a) - 2 (b c a)|
|                                                 |
|o20 : L                                          |
+-------------------------------------------------+
|i21 : normalForm oo                              |
|                                                 |
|o21 = 0                                          |
|                                                 |
|o21 : L                                          |
+-------------------------------------------------+

Here is the computation of the matrix example.

+-----------------------------------------------------------------------------+
|i22 : F=lieAlgebra({e12,e23,e34,e45,e13,e24,e35,e14,e25,e15},                |
|          Weights => {1,1,1,1,2,2,2,3,3,4})                                  |
|                                                                             |
|o22 = F                                                                      |
|                                                                             |
|o22 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i23 : I={e12@e34,e12@e45,e23@e45,e12@e13,e12@e35,e12@e14,                    |
|                e12@e15,e23@e45,e23@e13,e23@e24,e23@e14,e23@e25,             |
|                e23@e15,e34@e24,e34@e35,e34@e14,e34@e25,e34@e15,             |
|                e45@e13,e45@e35,e45@e25,e45@e15,e13@e24,e13@e14,             |
|                e13@e25,e13@e15,e24@e35,e24@e14,e24@e25,e24@e15,             |
|                e35@e14,e35@e25,e35@e15,e14@e25,e14@e15,e25@e15,             |
|                e12@e23/e13, e12@e24/e14,                                    |
|                e12@e25/e15, e13@e34/e14,                                    |
|                e13@e35/e15, e14@e45/e15,                                    |
|                e23@e34/e24, e23@e35/e25,                                    |
|                e24@e45/e25, e34@e45/e35}                                    |
|                                                                             |
|o23 = {(e12 e34), (e12 e45), (e23 e45), (e12 e13), (e12 e35), (e12 e14), (e12|
|      -----------------------------------------------------------------------|
|      e15), (e23 e45), (e23 e13), (e23 e24), (e23 e14), (e23 e25), (e23 e15),|
|      -----------------------------------------------------------------------|
|      (e34 e24), (e34 e35), (e34 e14), (e34 e25), (e34 e15), (e45 e13), (e45 |
|      -----------------------------------------------------------------------|
|      e35), (e45 e25), (e45 e15), (e13 e24), (e13 e14), (e13 e25), (e13 e15),|
|      -----------------------------------------------------------------------|
|      (e24 e35), (e24 e14), (e24 e25), (e24 e15), (e35 e14), (e35 e25), (e35 |
|      -----------------------------------------------------------------------|
|      e15), (e14 e25), (e14 e15), (e25 e15), (e12 e23) - e13, (e12 e24) -    |
|      -----------------------------------------------------------------------|
|      e14, (e12 e25) - e15, (e13 e34) - e14, (e13 e35) - e15, (e14 e45) -    |
|      -----------------------------------------------------------------------|
|      e15, (e23 e34) - e24, (e23 e35) - e25, (e24 e45) - e25, (e34 e45) -    |
|      -----------------------------------------------------------------------|
|      e35}                                                                   |
|                                                                             |
|o23 : List                                                                   |
+-----------------------------------------------------------------------------+
|i24 : L=F/I                                                                  |
|                                                                             |
|o24 = L                                                                      |
|                                                                             |
|o24 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i25 : dims(1,5,L)                                                            |
|                                                                             |
|o25 = {4, 3, 2, 1, 0}                                                        |
|                                                                             |
|o25 : List                                                                   |
+-----------------------------------------------------------------------------+
|i26 : M=minimalPresentation(4,L)                                             |
|                                                                             |
|o26 = M                                                                      |
|                                                                             |
|o26 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i27 : describe M                                                             |
|                                                                             |
|o27 = generators => {e12, e23, e34, e45}                                     |
|      Weights => {{1, 0}, {1, 0}, {1, 0}, {1, 0}}                            |
|      Signs => {0, 0, 0, 0}                                                  |
|      ideal => {(e45 e23), (e45 e12), (e34 e12), (e45 e45 e34), (e34 e45     |
|      ambient => LieAlgebra{...10...}                                        |
|      diff => {}                                                             |
|      Field => QQ                                                            |
|      computedDegree => 0                                                    |
|-----------------------------------------------------------------------------|
|e34), (e34 e34 e23), (e23 e34 e23), (e23 e23 e12), (e12 e23 e12)}            |
+-----------------------------------------------------------------------------+

Below is a differential Lie algebra, which is non-free, and where the linear
part of the differential is non-zero.

+-----------------------------------------------------------------------------+
|i28 : F = lieAlgebra({a,b,c,r3,r4,r42},                                      |
|         Weights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}},                   |
|         Signs => {0,0,0,1,1,0},                                             |
|         LastWeightHomological => true)                                      |
|                                                                             |
|o28 = F                                                                      |
|                                                                             |
|o28 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i29 : D = differentialLieAlgebra{0_F,0_F,0_F,a c,a a c,r4 - a r3}            |
|                                                                             |
|o29 = D                                                                      |
|                                                                             |
|o29 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i30 : L = D/{b c - a c,a b,b r4 - a r4}                                      |
|                                                                             |
|o30 = L                                                                      |
|                                                                             |
|o30 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i31 : M = minimalModel(5,L)                                                  |
|                                                                             |
|o31 = M                                                                      |
|                                                                             |
|o31 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i32 : describe M                                                             |
|                                                                             |
|o32 = generators => {fr , fr , fr , fr , fr , fr , fr }                      |
|                       0    1    2    3    4    5    6                       |
|      Weights => {{1, 0}, {1, 0}, {2, 0}, {2, 1}, {3, 1}, {3, 1}, {5, 2}}    |
|      Signs => {0, 0, 0, 1, 1, 1, 0}                                         |
|      ideal => {}                                                            |
|      ambient => LieAlgebra{...10...}                                        |
|      diff => {0, 0, 0, (fr_1 fr_0), (fr_1 fr_2), (fr_0 fr_2), (fr_0 fr_3    |
|      Field => QQ                                                            |
|      computedDegree => 5                                                    |
|      map => fr  => a                                                        |
|               0                                                             |
|             fr  => b                                                        |
|               1                                                             |
|             fr  => c                                                        |
|               2                                                             |
|             fr  => 0                                                        |
|               3                                                             |
|             fr  => r3                                                       |
|               4                                                             |
|             fr  => r3                                                       |
|               5                                                             |
|             fr  =>  - (a r42) + (b r42)                                     |
|               6                                                             |
|             source => M                                                     |
|             target => L                                                     |
|-----------------------------------------------------------------------------|
|fr_2) + (fr_0 fr_0 fr_4) - (fr_0 fr_1 fr_5)}                                 |
+-----------------------------------------------------------------------------+

The homology in homological degree 0 is concentrated in first degree 1 and 2.
In the general case, for a differential Lie algebra $L$, the function
minimalPresentation(ZZ,LieAlgebra),
gives a minimal presentation of the Lie algebra $H_0(L)$.

+-----------------------------------------+
|i33 :                                    |
|      HL = lieHomology L                 |
|                                         |
|o33 = HL                                 |
|                                         |
|o33 : VectorSpace                        |
+-----------------------------------------+
|i34 : dims(5,HL)                         |
|                                         |
|o34 = | 2 1 0 0 0 |                      |
|      | 0 0 0 1 1 |                      |
|      | 0 0 0 0 0 |                      |
|      | 0 0 0 0 0 |                      |
|      | 0 0 0 0 0 |                      |
|                                         |
|               5        5                |
|o34 : Matrix ZZ  <--- ZZ                 |
+-----------------------------------------+
|i35 : describe minimalPresentation(3,L)  |
|                                         |
|o35 = generators => {a, b, c}            |
|      Weights => {{1, 0}, {1, 0}, {2, 0}}|
|      Signs => {0, 0, 0}                 |
|      ideal => {(b a), (b c), (a c)}     |
|      ambient => LieAlgebra{...10...}    |
|      diff => {}                         |
|      Field => QQ                        |
|      computedDegree => 0                |
+-----------------------------------------+

We now check that the  homology of the minimal model $M$ is the same as for
$L$.

+-------------------------+
|i36 :                    |
|      HM = lieHomology M |
|                         |
|o36 = HM                 |
|                         |
|o36 : VectorSpace        |
+-------------------------+
|i37 : dims(5,HM)         |
|                         |
|o37 = | 2 1 0 0 0 |      |
|      | 0 0 0 1 1 |      |
|      | 0 0 0 0 0 |      |
|      | 0 0 0 0 0 |      |
|      | 0 0 0 0 0 |      |
|                         |
|               5        5|
|o37 : Matrix ZZ  <--- ZZ |
+-------------------------+

The quasi-isomorphism \ $f:\ M\ \to\ L$ from the minimal model $M$ of $L$ to
$L$ is obtained as map(M). If $L$ has no differential, then \ $f$ \ is
surjective, but in general this is not true as is shown by the example below.
Another example is obtained letting $L$ be a non-zero Lie algebra with zero
homology, see Differential Lie algebra tutorial.

+----------------------------------------+
|i38 :                                   |
|      f = map M                         |
|                                        |
|o38 = f                                 |
|                                        |
|o38 : LieAlgebraMap                     |
+----------------------------------------+
|i39 : dims(5,L)                         |
|                                        |
|o39 = | 2 1 1 1 2 |                     |
|      | 0 0 1 3 5 |                     |
|      | 0 0 0 1 2 |                     |
|      | 0 0 0 0 0 |                     |
|      | 0 0 0 0 0 |                     |
|                                        |
|               5        5               |
|o39 : Matrix ZZ  <--- ZZ                |
+----------------------------------------+
|i40 : image f                           |
|                                        |
|o40 = finitely generated subalgebra of L|
|                                        |
|o40 : FGLieSubAlgebra                   |
+----------------------------------------+
|i41 : dims(5,oo)                        |
|                                        |
|o41 = | 2 1 1 1 2 |                     |
|      | 0 0 1 2 4 |                     |
|      | 0 0 0 0 1 |                     |
|      | 0 0 0 0 0 |                     |
|      | 0 0 0 0 0 |                     |
|                                        |
|               5        5               |
|o41 : Matrix ZZ  <--- ZZ                |
+----------------------------------------+

We check below that $H(f)$ is iso in degree (5,1).

+--------------------------------------------------------------+
|i42 : basis(5,1,HL)                                           |
|                                                              |
|o42 = {(b a r3) - (b b r3)}                                   |
|                                                              |
|o42 : List                                                    |
+--------------------------------------------------------------+
|i43 : basis(5,1,HM)                                           |
|                                                              |
|o43 = {(fr_1 fr_3 fr_2) + (fr_1 fr_0 fr_4) - (fr_1 fr_1 fr_5)}|
|                                                              |
|o43 : List                                                    |
+--------------------------------------------------------------+
|i44 : f\oo                                                    |
|                                                              |
|o44 = {(b a r3) - (b b r3)}                                   |
|                                                              |
|o44 : List                                                    |
+--------------------------------------------------------------+

See also
========

  * koszulDual -- compute the Lie algebra whose enveloping
    algebra is the Koszul dual of a quadratic algebra
  * minimalModel -- compute the minimal model
  * minimalPresentation(ZZ,LieAlgebra)
    -- compute a minimal presentation
  * extAlgebra -- compute the Ext-algebra of a Lie algebra
  * Differential Lie algebra tutorial
  * Holonomy Lie algebras and symmetries

minimalModel -- compute the minimal model
*****************************************

Synopsis
========

  * Usage:
        M = minimalModel(d,L)
  * Inputs:
      * d, an integer (Macaulay2Doc), the maximal degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * M, an instance of the type LieAlgebra,

Description
===========

That $M$ is a minimal model of a Lie algebra $L$ up to degree $d$ means that
there exists a differential Lie algebra homomorphism $f: M \ \to\  L$ such that
$H(f)$ is an isomorphism up to degree $d$, $M$ is free as a Lie algebra, and
the linear part of the differential on $M$ is zero. The homomorphism $f$ may be
obtained using map(LieAlgebra), applied to $M$.

The generators of $M$ yield a basis for the cohomology of $L$, i.e.,
$Ext_{UL}(k,k)$, where $k$ is the coefficient field of $L$. This
skewcommutative algebra may be obtained using extAlgebra.
Multiplication of elements in $Ext_{UL}(k,k)$ is obtained using
ExtElement ExtElement.

Observe that the homological weight in the cohomology algebra is one higher
than the homological weight in the minimal model.

Since $R$ in the following example is a Koszul algebra it follows that the
cohomology algebra of $L$ is equal to $R$. This means that the minimal model of
$L$ has generators in each degree $(d,d-1)$.

+-----------------------------------------------------------------------------+
|i1 : R=QQ[x]                                                                 |
|                                                                             |
|o1 = R                                                                       |
|                                                                             |
|o1 : PolynomialRing                                                          |
+-----------------------------------------------------------------------------+
|i2 : L=koszulDual R                                                          |
|                                                                             |
|o2 = L                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : describe L                                                              |
|                                                                             |
|o3 = generators => {ko }                                                     |
|                      0                                                      |
|     Weights => {{1, 0}}                                                     |
|     Signs => {1}                                                            |
|     ideal => { - (1/2)(ko_0 ko_0)}                                          |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
+-----------------------------------------------------------------------------+
|i4 : E=extAlgebra(5,L)                                                       |
|                                                                             |
|o4 = E                                                                       |
|                                                                             |
|o4 : ExtAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i5 : dims(5,E)                                                               |
|                                                                             |
|o5 = | 1 0 0 0 0 |                                                           |
|     | 0 1 0 0 0 |                                                           |
|     | 0 0 1 0 0 |                                                           |
|     | 0 0 0 1 0 |                                                           |
|     | 0 0 0 0 1 |                                                           |
|                                                                             |
|              5        5                                                     |
|o5 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i6 : describe minimalModel(5,L)                                              |
|                                                                             |
|o6 = generators => {fr , fr , fr , fr , fr }                                 |
|                      0    1    2    3    4                                  |
|     Weights => {{1, 0}, {2, 1}, {3, 2}, {4, 3}, {5, 4}}                     |
|     Signs => {1, 1, 1, 1, 1}                                                |
|     ideal => {}                                                             |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {0, (fr_0 fr_0), (fr_0 fr_1), (fr_1 fr_1) + 4 (fr_0 fr_2), 2    |
|     Field => QQ                                                             |
|     computedDegree => 5                                                     |
|     map => fr  => ko_0                                                      |
|              0                                                              |
|            fr  => 0                                                         |
|              1                                                              |
|            fr  => 0                                                         |
|              2                                                              |
|            fr  => 0                                                         |
|              3                                                              |
|            fr  => 0                                                         |
|              4                                                              |
|            source => LieAlgebra{...10...}                                   |
|            target => L                                                      |
|-----------------------------------------------------------------------------|
|(fr_1 fr_2) + (fr_0 fr_3)}                                                   |
+-----------------------------------------------------------------------------+

In the following example the enveloping algebra of $L1$ has global dimension
$2$, which means that the computed minimal model is in fact the full minimal
model of $L1$.

+--------------------------------------------------------+
|i7 : L1=lieAlgebra{a,b,c}/{a b,a b c}                   |
|                                                        |
|o7 = L1                                                 |
|                                                        |
|o7 : LieAlgebra                                         |
+--------------------------------------------------------+
|i8 : M1= minimalModel(3,L1)                             |
|                                                        |
|o8 = M1                                                 |
|                                                        |
|o8 : LieAlgebra                                         |
+--------------------------------------------------------+
|i9 : describe M1                                        |
|                                                        |
|o9 = generators => {fr , fr , fr , fr , fr }            |
|                      0    1    2    3    4             |
|     Weights => {{1, 0}, {1, 0}, {1, 0}, {2, 1}, {3, 1}}|
|     Signs => {0, 0, 0, 1, 1}                           |
|     ideal => {}                                        |
|     ambient => LieAlgebra{...10...}                    |
|     diff => {0, 0, 0, (fr_1 fr_0), (fr_1 fr_2 fr_0)}   |
|     Field => QQ                                        |
|     computedDegree => 3                                |
|     map => fr  => a                                    |
|              0                                         |
|            fr  => b                                    |
|              1                                         |
|            fr  => c                                    |
|              2                                         |
|            fr  => 0                                    |
|              3                                         |
|            fr  => 0                                    |
|              4                                         |
|            source => M1                                |
|            target => L1                                |
+--------------------------------------------------------+
|i10 : H=lieHomology M1                                  |
|                                                        |
|o10 = H                                                 |
|                                                        |
|o10 : VectorSpace                                       |
+--------------------------------------------------------+
|i11 : dims(6,L1)===dims(6,H)                            |
|                                                        |
|o11 = true                                              |
+--------------------------------------------------------+

See also
========

  * minimalPresentation(ZZ,LieAlgebra)
    -- compute a minimal presentation
  * extAlgebra -- compute the Ext-algebra of a Lie algebra
  * map(LieAlgebra) -- get the map of a minimal
    model
  * ExtElement ExtElement -- multiplication of
    Ext-algebra elements
  * Differential Lie algebra tutorial
  * Minimal models, Ext-algebras and Koszul duals

Ways to use minimalModel :
==========================

  * "minimalModel(ZZ,LieAlgebra)"

For the programmer
==================

The object minimalModel, is a method function (Macaulay2Doc).

minimalPresentation(ZZ,LieAlgebra) -- compute a minimal presentation
********************************************************************

Synopsis
========

  * Function: minimalPresentation (Macaulay2Doc),
  * Usage:
        M = minimalPresentation(n,L)
  * Inputs:
      * n, an integer (Macaulay2Doc), the maximal  degree
      * L, an instance of the type LieAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * Exclude (Macaulay2Doc), => ...,
        default value {}, null
  * Outputs:
      * M, an instance of the type LieAlgebra,

Description
===========

The optional input given above is not relevant for Lie algebras. A minimal set
of generators and relations for the Lie algebra $L$ (without differential) is
given. In general the presentation applies to $H_0(L)$. The example $L$ below
is the Lie algebra of strictly upper triangular $4\times 4$-matrices given by
its multiplication table on the natural basis.

+-----------------------------------------------------------------------------+
|i1 : L=lieAlgebra({e12,e23,e34,e13,e24,e14},Weights=>{1,1,1,2,2,3})/         |
|      {e12 e34,e12 e13,e12 e14,                                              |
|       e23 e13,e23 e24,e23 e14,                                              |
|       e34 e24,e34 e14,e13 e24,                                              |
|       e13 e14,e24 e14,                                                      |
|       e12 e23 - e13,                                                        |
|       e12 e24 - e14,                                                        |
|       e13 e34 - e14,                                                        |
|       e23 e34 - e24}                                                        |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : M=minimalPresentation(3,L)                                              |
|                                                                             |
|o2 = M                                                                       |
|                                                                             |
|o2 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i3 : describe M                                                              |
|                                                                             |
|o3 = generators => {e12, e23, e34}                                           |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}                                     |
|     Signs => {0, 0, 0}                                                      |
|     ideal => {(e34 e12), (e34 e34 e23), (e23 e34 e23), (e23 e23 e12), (e12  |
|     ambient => LieAlgebra{...10...}                                         |
|     diff => {}                                                              |
|     Field => QQ                                                             |
|     computedDegree => 0                                                     |
|-----------------------------------------------------------------------------|
|e23 e12)}                                                                    |
+-----------------------------------------------------------------------------+
|i4 : dims(1,4,M)                                                             |
|                                                                             |
|o4 = {3, 2, 1, 0}                                                            |
|                                                                             |
|o4 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * minimalModel -- compute the minimal model
  * Minimal models, Ext-algebras and Koszul duals

Ways to use this method:
========================

  * minimalPresentation(ZZ,LieAlgebra)
    -- compute a minimal presentation

monomials(LieElement) -- get the monomials of a Lie element
***********************************************************

Synopsis
========

  * Function: monomials (Macaulay2Doc),
  * Usage:
        c = monomials(x)
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
  * Optional inputs (Macaulay2Doc),:
      * Variables (Macaulay2Doc),
        => ..., default value null, null
  * Outputs:
      * c, a list (Macaulay2Doc), the list of monomials in $x$

Description
===========

The optional input given above is not relevant for Lie algebras. This is equal
to the second part of coefficients(LieElement).

+---------------------------------------+
|i1 : L = lieAlgebra{a,b,c}             |
|                                       |
|o1 = L                                 |
|                                       |
|o1 : LieAlgebra                        |
+---------------------------------------+
|i2 : x = a b c - 3 c b a +(1/3) b a c  |
|                                       |
|o2 =  - (4/3)(b c a) - 2 (c b a)       |
|                                       |
|o2 : L                                 |
+---------------------------------------+
|i3 : monomials x                       |
|                                       |
|o3 = {(b c a), (c b a)}                |
|                                       |
|o3 : List                              |
+---------------------------------------+
|i4 : y = a@b@c/3@c@b@a++(1/3)@b@a@c    |
|                                       |
|o4 = (a b c) - 3 (c b a) + (1/3)(b a c)|
|                                       |
|o4 : L                                 |
+---------------------------------------+
|i5 : monomials y                       |
|                                       |
|o5 = {(a b c), (c b a), (b a c)}       |
|                                       |
|o5 : List                              |
+---------------------------------------+

See also
========

  * coefficients(LieElement) -- get the
    coefficients and monomials of a Lie element
  * indexForm -- get a Lie element in the polynomial ring
    representation
  * LieElement @ LieElement -- formal
    multiplication of Lie elements

Ways to use this method:
========================

  * monomials(LieElement) -- get the
    monomials of a Lie element

normalForm -- compute the normal form of a LieElement
*****************************************************

Synopsis
========

  * Usage:
        c = normalForm(x)
  * Inputs:
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
  * Outputs:
      * c, an instance of the type LieElement, the normal
        form of $x$

Description
===========

A Lie element obtained as a linear combination of iterated Lie products of
generators has an output that is of normal form. If the Lie element is defined
by the "formal" operators, then the output may be of non-normal form, and in
this case, the normal form is obtained using normalForm.

+---------------------------------------+
|i1 : L = lieAlgebra{a,b,c}             |
|                                       |
|o1 = L                                 |
|                                       |
|o1 : LieAlgebra                        |
+---------------------------------------+
|i2 : x = a b c - 3 c b a +(1/3) b a c  |
|                                       |
|o2 =  - (4/3)(b c a) - 2 (c b a)       |
|                                       |
|o2 : L                                 |
+---------------------------------------+
|i3 : y = a@b@c/3@c@b@a++(1/3)@b@a@c    |
|                                       |
|o3 = (a b c) - 3 (c b a) + (1/3)(b a c)|
|                                       |
|o3 : L                                 |
+---------------------------------------+
|i4 : normalForm y                      |
|                                       |
|o4 =  - (4/3)(b c a) - 2 (c b a)       |
|                                       |
|o4 : L                                 |
+---------------------------------------+

See also
========

  * standardForm(RingElement,LieAlgebra)
    -- get a Lie element in
    standard form
  * indexForm -- get a Lie element in the polynomial ring
    representation
  * LieElement @ LieElement -- formal
    multiplication of Lie elements

Ways to use normalForm :
========================

  * "normalForm(LieElement)"

For the programmer
==================

The object normalForm, is a method function (Macaulay2Doc).

Number @ LieElement -- formal multiplication of a number and a Lie element
**************************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),

Description
===========

Formal multiplication by scalars. See the documentation of the formal Lie
multiplication for more information.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : (2@a)++(2@a)       |
|                        |
|o2 = 2 a + 2 a          |
|                        |
|o2 : L                  |
+------------------------+

See also
========

  * Number LieElement -- multiplication of a number
    and a Lie element
  * LieElement @ LieElement -- formal
    multiplication of Lie elements

Ways to use this method:
========================

  * Number @ LieElement -- formal multiplication of
    a number and a Lie element

Number ExtElement -- multiplication of a number and an Ext-algebra element
**************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        u = a x
  * Inputs:
      * a, a number (Macaulay2Doc),
      * x, an instance of the type ExtElement, $x$ is of
        type $E$, where $E$ is of type ExtAlgebra
  * Outputs:
      * u, an instance of the type ExtElement, $u$ is of
        type $E$, the product $a*x$

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
are of type Number if the field is QQ, otherwise the scalars are of type
RingElement.

+------------------------------------+
|i1 : L = lieAlgebra{a,b,c}/{a b,b c}|
|                                    |
|o1 = L                              |
|                                    |
|o1 : LieAlgebra                     |
+------------------------------------+
|i2 : E = extAlgebra(3,L)            |
|                                    |
|o2 = E                              |
|                                    |
|o2 : ExtAlgebra                     |
+------------------------------------+
|i3 : (-3) (2 ext_3-ext_4)           |
|                                    |
|o3 =  - 6ext_3 + 3ext_4             |
|                                    |
|o3 : E                              |
+------------------------------------+

See also
========

  * RingElement ExtElement -- multiplication of
    a field element and a Ext-algebra element
  * ExtAlgebra -- the class of all Ext-algebras

Ways to use this method:
========================

  * Number ExtElement -- multiplication of a number
    and an Ext-algebra element

Number LieAlgebraMap -- multiplication of a number and a homomorphism
*********************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        g = a f
  * Inputs:
      * a, a number (Macaulay2Doc),
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * g, an instance of the type LieAlgebraMap,

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
are of type Number if the field is QQ, otherwise the scalars are of type
RingElement.

+------------------------+
|i1 : M = lieAlgebra{a,b}|
|                        |
|o1 = M                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : L = lieAlgebra{a,b}|
|                        |
|o2 = L                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f = map(L,M,{a,b}) |
|                        |
|o3 = f                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : describe(-2 f)     |
|                        |
|o4 = a =>  - 2 a        |
|     b =>  - 2 b        |
|     source => M        |
|     target => L        |
+------------------------+

See also
========

  * RingElement LieAlgebraMap, --
    multiplication of a field element and a homomorphism

Ways to use this method:
========================

  * Number LieAlgebraMap -- multiplication of a
    number and a homomorphism

Number LieDerivation -- multiplication of a number and a derivation
*******************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        e = a d
  * Inputs:
      * a, a number (Macaulay2Doc),
      * d, an instance of the type LieDerivation,
  * Outputs:
      * e, an instance of the type LieDerivation,

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
are of type Number if the field is QQ, otherwise the scalars are of type
RingElement.

+-----------------------------------+
|i1 : L = lieAlgebra{a,b}           |
|                                   |
|o1 = L                             |
|                                   |
|o1 : LieAlgebra                    |
+-----------------------------------+
|i2 : d = lieDerivation{a a b,b b a}|
|                                   |
|o2 = d                             |
|                                   |
|o2 : LieDerivation                 |
+-----------------------------------+
|i3 : describe(-2 d)                |
|                                   |
|o3 = a => 2 (a b a)                |
|     b =>  - 2 (b b a)             |
|     map => id_L                   |
|     sign => 0                     |
|     weight => {2, 0}              |
|     source => L                   |
|     target => L                   |
+-----------------------------------+

See also
========

  * RingElement LieDerivation, --
    multiplication of a field element and a derivation
  * Number LieElement -- multiplication of a number
    and a Lie element
  * Number LieAlgebraMap -- multiplication of a
    number and a homomorphism

Ways to use this method:
========================

  * Number LieDerivation -- multiplication of a
    number and a derivation

Number LieElement -- multiplication of a number and a Lie element
*****************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        u = a x
  * Inputs:
      * a, a number (Macaulay2Doc),
      * x, an instance of the type LieElement, $x$ is of
        type $L$, where $L$ is of type LieAlgebra
  * Outputs:
      * u, an instance of the type LieElement, $u$ is of
        type $L$, the product $a*x$

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
are of type Number if the field is QQ, otherwise the scalars are of type
RingElement. If the Lie element is surrounded by parentheses, the SPACE may be
omitted.

+--------------------------+
|i1 : L = lieAlgebra{a,b}  |
|                          |
|o1 = L                    |
|                          |
|o1 : LieAlgebra           |
+--------------------------+
|i2 : - 3(b b a + 2 a a b) |
|                          |
|o2 = 6 (a b a) - 3 (b b a)|
|                          |
|o2 : L                    |
+--------------------------+

See also
========

  * RingElement LieElement -- multiplication of
    a field element and a Lie element

Ways to use this method:
========================

  * Number LieElement -- multiplication of a number
    and a Lie element

numgens(LieAlgebra) -- get the number of generators
***************************************************

Synopsis
========

  * Function: numgens (Macaulay2Doc),
  * Usage:
        x=numgens(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * x, an integer (Macaulay2Doc), the number of generators of $L$

Description
===========

+------------------------+
|i1 : L=lieAlgebra{a,b,c}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : numgens L          |
|                        |
|o2 = 3                  |
+------------------------+

See also
========

  * describe(LieAlgebra) -- real description

Ways to use this method:
========================

  * numgens(LieAlgebra) -- get the number of
    generators

Quotient Lie algebras and subspaces
***********************************

The most common situation for a Lie algebra L (in this package) is that it is
finitely presented, i.e., $L$ is given by a finite number of generators,
yielding a free Lie algebra $F$, modulo a finite list of homogeneous elements
in $F$. The ambient Lie algebra of $L$, see  ambient(LieAlgebra),
is equal to $F$.

+------------------------------------------------------------+
|i1 : F = lieAlgebra{a,b,c}                                  |
|                                                            |
|o1 = F                                                      |
|                                                            |
|o1 : LieAlgebra                                             |
+------------------------------------------------------------+
|i2 : M = F/{a a b, a a c}                                   |
|                                                            |
|o2 = M                                                      |
|                                                            |
|o2 : LieAlgebra                                             |
+------------------------------------------------------------+
|i3 : L1 = M/{a b c}                                         |
|                                                            |
|o3 = L1                                                     |
|                                                            |
|o3 : LieAlgebra                                             |
+------------------------------------------------------------+
|i4 : describe M                                             |
|                                                            |
|o4 = generators => {a, b, c}                                |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}                    |
|     Signs => {0, 0, 0}                                     |
|     ideal => { - (a b a),  - (a c a)}                      |
|     ambient => F                                           |
|     diff => {}                                             |
|     Field => QQ                                            |
|     computedDegree => 3                                    |
+------------------------------------------------------------+
|i5 : describe L1                                            |
|                                                            |
|o5 = generators => {a, b, c}                                |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}                    |
|     Signs => {0, 0, 0}                                     |
|     ideal => { - (a b a),  - (a c a),  - (b c a) + (c b a)}|
|     ambient => F                                           |
|     diff => {}                                             |
|     Field => QQ                                            |
|     computedDegree => 0                                    |
+------------------------------------------------------------+

There is also the possibility to build quotients by Lie ideals. A Lie ideal is
of type LieIdeal, and may be constructed in different ways, e.g., as the kernel
of a homomorphism. In general, Lie ideals are not finitely generated (or not
known to be, as $J$ below), but a finitely generated Lie ideal may be formed
using the constructor lieIdeal. Building a quotient by a
finitely generated ideal is the same as above, taking the Lie algebra modulo
the generators of the ideal.

+------------------------------------------------------------+
|i6 : F = lieAlgebra{a,b,c}                                  |
|                                                            |
|o6 = F                                                      |
|                                                            |
|o6 : LieAlgebra                                             |
+------------------------------------------------------------+
|i7 : I = lieIdeal{a a b,a a c,a b c}                        |
|                                                            |
|o7 = I                                                      |
|                                                            |
|o7 : FGLieIdeal                                             |
+------------------------------------------------------------+
|i8 : L2=F/I                                                 |
|                                                            |
|o8 = L2                                                     |
|                                                            |
|o8 : LieAlgebra                                             |
+------------------------------------------------------------+
|i9 : describe L2                                            |
|                                                            |
|o9 = generators => {a, b, c}                                |
|     Weights => {{1, 0}, {1, 0}, {1, 0}}                    |
|     Signs => {0, 0, 0}                                     |
|     ideal => { - (a b a),  - (a c a),  - (b c a) + (c b a)}|
|     ambient => F                                           |
|     diff => {}                                             |
|     Field => QQ                                            |
|     computedDegree => 0                                    |
+------------------------------------------------------------+
|i10 : L1==L2                                                |
|                                                            |
|o10 = true                                                  |
+------------------------------------------------------------+

The Lie algebra $L3$ below is a quotient of the finitely presented Lie algebra
$M$ by the ideal $J$, which is not known to be finitely generated. The ambient
Lie algebra of $L3$ is $M$ and ideal(L3) is $J$. The Lie algebras $L2$ and $L3$
are isomorphic, but are presented in different ways.

+-----------------------------------------+
|i11 : f = map(L1,M)                      |
|                                         |
|o11 = f                                  |
|                                         |
|o11 : LieAlgebraMap                      |
+-----------------------------------------+
|i12 : J = kernel f                       |
|                                         |
|o12 = J                                  |
|                                         |
|o12 : LieIdeal                           |
+-----------------------------------------+
|i13 : L3 = M/J                           |
|                                         |
|o13 = L3                                 |
|                                         |
|o13 : LieAlgebra                         |
+-----------------------------------------+
|i14 : describe L3                        |
|                                         |
|o14 = generators => {a, b, c}            |
|      Weights => {{1, 0}, {1, 0}, {1, 0}}|
|      Signs => {0, 0, 0}                 |
|      ideal => J                         |
|      ambient => M                       |
|      diff => {}                         |
|      Field => QQ                        |
|      computedDegree => 0                |
+-----------------------------------------+
|i15 : dims(1,6,L2)                       |
|                                         |
|o15 = {3, 3, 5, 9, 22, 44}               |
|                                         |
|o15 : List                               |
+-----------------------------------------+
|i16 : dims(1,6,L3)                       |
|                                         |
|o16 = {3, 3, 5, 9, 22, 44}               |
|                                         |
|o16 : List                               |
+-----------------------------------------+

If two quotients by Lie ideals are performed successively, then the program
converts the final result to a quotient of the first Lie algebra by a single
ideal. In the example below, $L5=(M/J)/K$ and this is transformed to $M/P$,
where $P$ is the inverse image of $K$ under the natural map $M \ \to\  M/J$.

+--------------------------------------------+
|i17 : L4 = L3/{a b,a c}                     |
|                                            |
|o17 = L4                                    |
|                                            |
|o17 : LieAlgebra                            |
+--------------------------------------------+
|i18 : g = map(L4,L3)                        |
|warning: the map might not be well defined, |
|           use isWellDefined                |
|                                            |
|o18 = g                                     |
|                                            |
|o18 : LieAlgebraMap                         |
+--------------------------------------------+
|i19 : K = kernel g                          |
|                                            |
|o19 = K                                     |
|                                            |
|o19 : LieIdeal                              |
+--------------------------------------------+
|i20 : L5 = L3/K                             |
|                                            |
|o20 = L5                                    |
|                                            |
|o20 : LieAlgebra                            |
+--------------------------------------------+
|i21 : ambient L5                            |
|                                            |
|o21 = M                                     |
|                                            |
|o21 : LieAlgebra                            |
+--------------------------------------------+
|i22 : ideal L5===inverse(map(L3,M),K)       |
|                                            |
|o22 = true                                  |
+--------------------------------------------+

If a quotient by a Lie ideal that is not known to be finitely generated is
followed by a quotient with finitely many generators, then the programs
converts it by changing the order of the operations. In the example below,
L6=(M/J)/\{a b\} and this is transformed to (M/\{a b\})/Q, where $Q$ is the
image of $J$ under the natural map $M \ \to\  M/\{a b\}$\ (this in fact is an
ideal since the map is surjective).

+------------------------------------+
|i23 : L6 = (M/J)/{a b}              |
|                                    |
|o23 = L6                            |
|                                    |
|o23 : LieAlgebra                    |
+------------------------------------+
|i24 : L7 = ambient L6               |
|                                    |
|o24 = L7                            |
|                                    |
|o24 : LieAlgebra                    |
+------------------------------------+
|i25 : use M                         |
+------------------------------------+
|i26 : L7 == M/{a b}                 |
|                                    |
|o26 = true                          |
+------------------------------------+
|i27 : Q = image(map(L7,M),J)        |
|                                    |
|o27 = Q                             |
|                                    |
|o27 : LieSubAlgebra                 |
+------------------------------------+
|i28 : ideal L6===new LieIdeal from Q|
|                                    |
|o28 = true                          |
+------------------------------------+

It may also happen that L has a non-zero differential, see
differentialLieAlgebra. The differential is given as
the list diff(L) of elements in $F$ that consists of the values of the
differential on the generators of $F$, see  diff(LieAlgebra).
Note that ideal(D) (shown below) has been produced by
the program to get the square of the differential to be zero. The extra - (b b
a) in ideal(L) below is added by the program to ensure that the ideal generated
by b c2 is invariant under the differential.

+-----------------------------------------------------------+
|i29 :                                                      |
|                                                           |
|      F = lieAlgebra({a,b,c2,c3,c4},Signs=>{0,0,1,0,1},    |
|                Weights => {{1,0},{1,0},{2,1},{3,2},{5,3}},|
|                LastWeightHomological=>true)               |
|                                                           |
|o29 = F                                                    |
|                                                           |
|o29 : LieAlgebra                                           |
+-----------------------------------------------------------+
|i30 : D=differentialLieAlgebra{0_F,0_F,a b,a c2,a b c3}    |
|                                                           |
|o30 = D                                                    |
|                                                           |
|o30 : LieAlgebra                                           |
+-----------------------------------------------------------+
|i31 : describe D                                           |
|                                                           |
|o31 = generators => {a, b, c2, c3, c4}                     |
|      Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}, {5, 3}}  |
|      Signs => {0, 0, 1, 0, 1}                             |
|      ideal => { - (a b a), (a b a c2)}                    |
|      ambient => F                                         |
|      diff => {0, 0,  - (b a), (a c2), (a b c3)}           |
|      Field => QQ                                          |
|      computedDegree => 0                                  |
+-----------------------------------------------------------+
|i32 : L=D/{b c2}                                           |
|                                                           |
|o32 = L                                                    |
|                                                           |
|o32 : LieAlgebra                                           |
+-----------------------------------------------------------+
|i33 : describe L                                           |
|                                                           |
|o33 = generators => {a, b, c2, c3, c4}                     |
|      Weights => {{1, 0}, {1, 0}, {2, 1}, {3, 2}, {5, 3}}  |
|      Signs => {0, 0, 1, 0, 1}                             |
|      ideal => { - (a b a), (a b a c2), (b c2),  - (b b a)}|
|      ambient => F                                         |
|      diff => {0, 0,  - (b a), (a c2), (a b c3)}           |
|      Field => QQ                                          |
|      computedDegree => 0                                  |
+-----------------------------------------------------------+

In addition to the constructor lieIdeal, there are also the
constructors lieSubAlgebra, and lieSubSpace,
yielding finitely generated Lie subalgebras and finitely generated
subspaces respectively.

+-------------------------------------------+
|i34 : L = lieAlgebra{a,b,c}                |
|                                           |
|o34 = L                                    |
|                                           |
|o34 : LieAlgebra                           |
+-------------------------------------------+
|i35 : A = lieSubAlgebra{a,b c}             |
|                                           |
|o35 = A                                    |
|                                           |
|o35 : FGLieSubAlgebra                      |
+-------------------------------------------+
|i36 : basis(4,A)                           |
|                                           |
|o36 = {2 (a c b a) - (b a c a) - (c a b a)}|
|                                           |
|o36 : List                                 |
+-------------------------------------------+
|i37 : S=lieSubSpace{a,b c}                 |
|                                           |
|o37 = S                                    |
|                                           |
|o37 : LieSubSpace                          |
+-------------------------------------------+
|i38 : dims(1,4,S)                          |
|                                           |
|o38 = {1, 1, 0, 0}                         |
|                                           |
|o38 : List                                 |
+-------------------------------------------+

Ideals, subalgebras and subspaces are both inputs and possible outputs of
several methods. The methods image(LieAlgebraMap,LieSubSpace),
and
inverse(LieAlgebraMap,LieSubSpace),
which are used above, have image and kernel of a Lie algebra map or derivation
as special cases.  The method quotient(LieIdeal,FGLieSubAlgebra),
has
annihilator(FGLieSubAlgebra), and
center, as special cases.

+--------------------------------------------------+
|i39 : L = lieAlgebra{a,b,c}                       |
|                                                  |
|o39 = L                                           |
|                                                  |
|o39 : LieAlgebra                                  |
+--------------------------------------------------+
|i40 : I = lieIdeal{a a c+b a c-a b a,c c a-b b a }|
|                                                  |
|o40 = I                                           |
|                                                  |
|o40 : FGLieIdeal                                  |
+--------------------------------------------------+
|i41 : M = L/I                                     |
|                                                  |
|o41 = M                                           |
|                                                  |
|o41 : LieAlgebra                                  |
+--------------------------------------------------+
|i42 : J=lieIdeal{a b}                             |
|                                                  |
|o42 = J                                           |
|                                                  |
|o42 : FGLieIdeal                                  |
+--------------------------------------------------+
|i43 : A = quotient(J,lieSubAlgebra{a c})          |
|                                                  |
|o43 = A                                           |
|                                                  |
|o43 : LieSubAlgebra                               |
+--------------------------------------------------+
|i44 : dims(1,3,A)                                 |
|                                                  |
|o44 = {2, 3, 5}                                   |
|                                                  |
|o44 : List                                        |
+--------------------------------------------------+
|i45 : basis(2,A)                                  |
|                                                  |
|o45 = {(b a), (c a), (c b)}                       |
|                                                  |
|o45 : List                                        |
+--------------------------------------------------+
|i46 : member((c b) (a c),J)                       |
|                                                  |
|o46 = true                                        |
+--------------------------------------------------+

One may also form the sum, see LieSubSpace + LieSubSpace,
and intersection, see LieSubSpace @ LieSubSpace,
of two Lie subspaces (in particular subalgebras or ideals).

+---------------------------+
|i47 : L = lieAlgebra{a,b,c}|
|                           |
|o47 = L                    |
|                           |
|o47 : LieAlgebra           |
+---------------------------+
|i48 : I = lieIdeal{a b}    |
|                           |
|o48 = I                    |
|                           |
|o48 : FGLieIdeal           |
+---------------------------+
|i49 : J = lieIdeal{b c}    |
|                           |
|o49 = J                    |
|                           |
|o49 : FGLieIdeal           |
+---------------------------+
|i50 : T = I+J              |
|                           |
|o50 = T                    |
|                           |
|o50 : FGLieIdeal           |
+---------------------------+
|i51 : U = I@J              |
|                           |
|o51 = U                    |
|                           |
|o51 : LieIdeal             |
+---------------------------+
|i52 : dims(1,5,T)          |
|                           |
|o52 = {0, 2, 6, 15, 42}    |
|                           |
|o52 : List                 |
+---------------------------+
|i53 : dims(1,5,U)          |
|                           |
|o53 = {0, 0, 0, 1, 6}      |
|                           |
|o53 : List                 |
+---------------------------+
|i54 : 2*dims(1,5,I)        |
|                           |
|o54 = {0, 2, 6, 16, 48}    |
|                           |
|o54 : List                 |
+---------------------------+

Finally, the methods boundaries, and cycles,
give the subalgebras image(d) and kernel(d) respectively, where $d$ is the
differential, while lieHomology, gives the homology as a
vector space.

See also
========

  * Second Lie algebra tutorial
  * Differential Lie algebra tutorial
  * Homomorphisms and derivations

quotient(LieIdeal,FGLieSubAlgebra) -- make the quotient of a Lie ideal by a finitely generated Lie subalgebra
*************************************************************************************************************

Synopsis
========

  * Function: quotient (Macaulay2Doc),
  * Usage:
        T=quotient(I,S)
  * Inputs:
      * I, an instance of the type LieIdeal,
      * S, an instance of the type FGLieSubAlgebra,
  * Optional inputs (Macaulay2Doc),:
      * BasisElementLimit (Saturation),
        =>
        ..., default value infinity, null
      * DegreeLimit (Saturation),
        => ..., default value {}, null
      * MinimalGenerators (Saturation), =>
        ..., default value true, null
      * PairLimit (Saturation),
        => ..., default value infinity, null
      * Strategy (Saturation),
        => ..., default value null, null
  * Outputs:
      * T, an instance of the type LieSubAlgebra, the Lie
        elements that multiply all of $S$ into $I$

Description
===========

The optional inputs given above are not relevant for Lie algebras. A Lie
element $x$ is in $T$ if $x$ multiplies all the generators of $S$ into $I$.
However, $T$ is not in general finitely generated.

+--------------------------------------------------+
|i1 : L=lieAlgebra{a,b,c}/{a a b-c c b,b b a-b b c}|
|                                                  |
|o1 = L                                            |
|                                                  |
|o1 : LieAlgebra                                   |
+--------------------------------------------------+
|i2 : I=lieIdeal{a}                                |
|                                                  |
|o2 = I                                            |
|                                                  |
|o2 : FGLieIdeal                                   |
+--------------------------------------------------+
|i3 : S=lieSubAlgebra{b,c}                         |
|                                                  |
|o3 = S                                            |
|                                                  |
|o3 : FGLieSubAlgebra                              |
+--------------------------------------------------+
|i4 : K=quotient(I,S)                              |
|                                                  |
|o4 = K                                            |
|                                                  |
|o4 : LieSubAlgebra                                |
+--------------------------------------------------+
|i5 : basis(2,K)                                   |
|                                                  |
|o5 = {(b a), (c a), (c b)}                        |
|                                                  |
|o5 : List                                         |
+--------------------------------------------------+

See also
========

  * annihilator(FGLieSubAlgebra), --
    make the annihilator Lie subalgebra
  * inverse(LieAlgebraMap,LieSubSpace)
    -- make the inverse image of a
    Lie subspace under a Lie algebra map

Ways to use this method:
========================

  * quotient(LieIdeal,FGLieSubAlgebra)
    -- make the quotient of a Lie
    ideal by a finitely generated Lie subalgebra

random(ZZ,LieAlgebra) -- get a random element of a Lie algebra
**************************************************************

Synopsis
========

  * Function: random (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * Density (Macaulay2Doc), => ...,
        default value 1, null
      * Height (Macaulay2Doc), => ..., default
        value 10, null
      * MaximalRank (Macaulay2Doc), => ...,
        default value false, null
      * UpperTriangular (Macaulay2Doc), =>
        ..., default value false, null

Description
===========

The optional inputs given above are not relevant for Lie algebras. Below is an
example of a periodic Lie algebra (a periodization of $sl_3$) with five
generators and seven random quadratic relations.

Synopsis
========

  * Usage:
        random(d,L)
  * Inputs:
      * d, an integer (Macaulay2Doc), the degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * an instance of the type LieElement, a random Lie
        element of degree $d$

Synopsis
========

  * Usage:
        random(m,L)
  * Inputs:
      * m, a list (Macaulay2Doc), the multi-degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * an instance of the type LieElement, a random Lie
        element of multi-degree $m$

Synopsis
========

  * Usage:
        random(m,n,L)
  * Inputs:
      * m, an integer (Macaulay2Doc), the degree
      * n, an integer (Macaulay2Doc), the homological degree
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * an instance of the type LieElement, a random Lie
        element of degree $m$ and homological degree $n$
+----------------------------------------------+
|i1 : L = lieAlgebra({a,b,c,d,e}, Field=>ZZ/7) |
|                                              |
|o1 = L                                        |
|                                              |
|o1 : LieAlgebra                               |
+----------------------------------------------+
|i2 : Q = L/apply(7,i->random(2,L))            |
|                                              |
|o2 = Q                                        |
|                                              |
|o2 : LieAlgebra                               |
+----------------------------------------------+
|i3 : dims(1,8,Q)                              |
|                                              |
|o3 = {5, 3, 5, 3, 5, 3, 5, 3}                 |
|                                              |
|o3 : List                                     |
+----------------------------------------------+
|i4 : random({4,0},Q)                          |
|                                              |
|o4 = (-2)(d e e a) - (e e e a) + (-3)(e e e d)|
|                                              |
|o4 : Q                                        |
+----------------------------------------------+

Ways to use this method:
========================

  * "random(List,LieAlgebra)"
  * random(ZZ,LieAlgebra) -- get a random
    element of a Lie algebra
  * "random(ZZ,ZZ,LieAlgebra)"

RingElement @ LieElement -- formal multiplication of a ring element and a Lie element
*************************************************************************************

Synopsis
========

  * Operator: @ (Macaulay2Doc),

Description
===========

Formal multiplication by scalars. See the documentation of the formal Lie
multiplication for more information.

+--------------------------------------+
|i1 : L = lieAlgebra({a,b},Field=>ZZ/7)|
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : 5@a++2@a                         |
|                                      |
|o2 = (-2)a + (2)a                     |
|                                      |
|o2 : L                                |
+--------------------------------------+

See also
========

  * RingElement LieElement -- multiplication of
    a field element and a Lie element
  * LieElement @ LieElement -- formal
    multiplication of Lie elements

Ways to use this method:
========================

  * RingElement @ LieElement -- formal
    multiplication of a ring element and a Lie element

RingElement ExtElement -- multiplication of a field element and a Ext-algebra element
*************************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        y = a x
  * Inputs:
      * a, a ring element (Macaulay2Doc), $a$ is an element
        in the field of $E$, where $E$ is of type ExtAlgebra
      * x, an instance of the type ExtElement, $x$ is of
        type $E$
  * Outputs:
      * y, an instance of the type ExtElement, $y$ is of
        type $E$, the product $a*x$

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
belong to the field of $E$. If the field is not QQ, then the scalars are of
type RingElement. If the field is QQ, then the scalars are of type Number.
Observe that it is necessary to use the function toField when $F$ is defined as
an algebraic extension of a prime field.

+------------------------------------------------+
|i1 : F = toField(ZZ/7[x]/{x^2+1})               |
|                                                |
|o1 = F                                          |
|                                                |
|o1 : PolynomialRing                             |
+------------------------------------------------+
|i2 : L = lieAlgebra({a,b,c},Field=>F)/{a b,b c} |
|                                                |
|o2 = L                                          |
|                                                |
|o2 : LieAlgebra                                 |
+------------------------------------------------+
|i3 : E = extAlgebra(3,L)                        |
|                                                |
|o3 = E                                          |
|                                                |
|o3 : ExtAlgebra                                 |
+------------------------------------------------+
|i4 : (3*x+1) (ext_1 ext_2)+(2*x+3) (ext_2 ext_1)|
|                                                |
|o4 = (-x+2)ext_3                                |
|                                                |
|o4 : E                                          |
+------------------------------------------------+

See also
========

  * Number ExtElement -- multiplication of a number
    and an Ext-algebra element
  * ExtAlgebra -- the class of all Ext-algebras

Ways to use this method:
========================

  * RingElement ExtElement -- multiplication of
    a field element and a Ext-algebra element

RingElement LieAlgebraMap -- multiplication of a field element and a homomorphism
*********************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        g = a f
  * Inputs:
      * a, a ring element (Macaulay2Doc), $a$ is an element
        in L#Field, where $L$ is the target of $f$
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * g, an instance of the type LieAlgebraMap,

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
belong to L#Field, which must be the same as M#Field, where \ $f: M\ \to\ L$.
If the field is not QQ, then the scalars are of type RingElement. If the field
is QQ, then the scalars are of type Number.

+-----------------------------------+
|i1 : F = toField(ZZ/7[x]/{x^2+1})  |
|                                   |
|o1 = F                             |
|                                   |
|o1 : PolynomialRing                |
+-----------------------------------+
|i2 : M = lieAlgebra({a,b},Field=>F)|
|                                   |
|o2 = M                             |
|                                   |
|o2 : LieAlgebra                    |
+-----------------------------------+
|i3 : L = lieAlgebra({a,b},Field=>F)|
|                                   |
|o3 = L                             |
|                                   |
|o3 : LieAlgebra                    |
+-----------------------------------+
|i4 : f = map(L,M,{x a,3 b})        |
|                                   |
|o4 = f                             |
|                                   |
|o4 : LieAlgebraMap                 |
+-----------------------------------+
|i5 : describe((3*x) f)             |
|                                   |
|o5 = a => (-3)a                    |
|     b => (2*x)b                   |
|     source => M                   |
|     target => L                   |
+-----------------------------------+

See also
========

  * Number LieAlgebraMap -- multiplication of a
    number and a homomorphism
  * RingElement LieElement -- multiplication of
    a field element and a Lie element
  * RingElement LieDerivation, --
    multiplication of a field element and a derivation

Ways to use this method:
========================

  * RingElement LieAlgebraMap, --
    multiplication of a field element and a homomorphism

RingElement LieDerivation -- multiplication of a field element and a derivation
*******************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        e = a d
  * Inputs:
      * a, a ring element (Macaulay2Doc), $a$ is an element
        in L#Field, where $L$ is the target of $d$
      * d, an instance of the type LieDerivation,
  * Outputs:
      * e, an instance of the type LieDerivation,

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
belong to L#Field, which must be the same as M#Field, where $d: M\ \to\ L$. If
the field is not QQ, then the scalars are of type RingElement. If the field is
QQ, then the scalars are of type Number, see Number LieDerivation.

+-------------------------------------+
|i1 : F = toField(ZZ/7[x]/{x^2+1})    |
|                                     |
|o1 = F                               |
|                                     |
|o1 : PolynomialRing                  |
+-------------------------------------+
|i2 : M = lieAlgebra({a,b},Field=>F)  |
|                                     |
|o2 = M                               |
|                                     |
|o2 : LieAlgebra                      |
+-------------------------------------+
|i3 : L = lieAlgebra({a,b},Field=>F)  |
|                                     |
|o3 = L                               |
|                                     |
|o3 : LieAlgebra                      |
+-------------------------------------+
|i4 : f = map(L,M,{x a,3 b})          |
|                                     |
|o4 = f                               |
|                                     |
|o4 : LieAlgebraMap                   |
+-------------------------------------+
|i5 : d = lieDerivation(f,{-x b,-2 a})|
|                                     |
|o5 = d                               |
|                                     |
|o5 : LieDerivation                   |
+-------------------------------------+
|i6 : describe (3*x) d                |
|                                     |
|o6 = a => (3)b                       |
|     b => (x)a                       |
|     map => f                        |
|     sign => 0                       |
|     weight => {0, 0}                |
|     source => M                     |
|     target => L                     |
+-------------------------------------+

See also
========

  * RingElement LieElement -- multiplication of
    a field element and a Lie element
  * RingElement LieAlgebraMap, --
    multiplication of a field element and a homomorphism
  * Number LieDerivation -- multiplication of a
    number and a derivation

Ways to use this method:
========================

  * RingElement LieDerivation, --
    multiplication of a field element and a derivation

RingElement LieElement -- multiplication of a field element and a Lie element
*****************************************************************************

Synopsis
========

  * Operator: SPACE (Macaulay2Doc),
  * Usage:
        y = a x
  * Inputs:
      * a, a ring element (Macaulay2Doc), $a$ is an element
        in L#Field, where $L$ is of type Lielgebra
      * x, an instance of the type LieElement, $x$ is of
        type $L$
  * Outputs:
      * y, an instance of the type LieElement, $y$ is of
        type $L$, the product $a*x$

Description
===========

The symbol SPACE is used as notation for multiplication by scalars. The scalars
belong to L#Field. If the field is not QQ, then the scalars are of type
RingElement. If the field is QQ, then the scalars are of type Number. If the
field is not a prime field, then sometimes it is necessary to define the field
outside the constructor lieAlgebra. Observe also that it is necessary to use
the function toField when $F$ is defined as an algebraic extension of a prime
field.

+-----------------------------------+
|i1 : F = toField(ZZ/7[x]/{x^2+1})  |
|                                   |
|o1 = F                             |
|                                   |
|o1 : PolynomialRing                |
+-----------------------------------+
|i2 : L = lieAlgebra({a,b},Field=>F)|
|                                   |
|o2 = L                             |
|                                   |
|o2 : LieAlgebra                    |
+-----------------------------------+
|i3 : (3*x+2) a b + (2*x+3) b a     |
|                                   |
|o3 = (-x+1)(b a)                   |
|                                   |
|o3 : L                             |
+-----------------------------------+

See also
========

  * RingElement LieAlgebraMap, --
    multiplication of a field element and a homomorphism
  * RingElement LieDerivation, --
    multiplication of a field element and a derivation
  * Number LieElement -- multiplication of a number
    and a Lie element

Ways to use this method:
========================

  * RingElement LieElement -- multiplication of
    a field element and a Lie element

ScriptedFunctor _ LieAlgebra -- get the identity homomorphism
*************************************************************

Synopsis
========

  * Operator: _ (Macaulay2Doc),
  * Usage:
        f=id_L
  * Inputs:
      * id, a scripted functor (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * f, an instance of the type LieAlgebraMap, the
        identity homomorphism from $L$ to $L$

Description
===========

+------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                        |
|                                                |
|o1 = L                                          |
|                                                |
|o1 : LieAlgebra                                 |
+------------------------------------------------+
|i2 : id_L                                       |
|                                                |
|o2 = id_L                                       |
|                                                |
|o2 : LieAlgebraMap                              |
+------------------------------------------------+
|i3 : peek oo                                    |
|                                                |
|o3 = LieAlgebraMap{a => a                      }|
|                   b => b                       |
|                   cache => CacheTable{...1...} |
|                   source => L                  |
|                   target => L                  |
+------------------------------------------------+

Ways to use this method:
========================

  * ScriptedFunctor _ LieAlgebra -- get
    the identity homomorphism

Second Lie algebra tutorial
***************************

In this second tutorial, we continue the introduction on how to use the package
GradedLieAlgebras.

By default, the scalars are assumed to be rational numbers, but it is also
possible to define the coefficient field with the option Field,
which is one out of four options that can be used in the constructor
lieAlgebra.

+----------------------------------------------+
|i1 : F = frac(ZZ/7[x])                        |
|                                              |
|o1 = F                                        |
|                                              |
|o1 : FractionField                            |
+----------------------------------------------+
|i2 : L = lieAlgebra({a_1,a_2,a_3},Field => F)/|
|          {3 a_1 a_2 a_3+(5*x) a_2 a_1 a_3,   |
|           a_3 a_2 a_3 a_1}                   |
|                                              |
|o2 = L                                        |
|                                              |
|o2 : LieAlgebra                               |
+----------------------------------------------+

The example above specifies the Lie algebra over the fraction field of $\mathbb
Z/7$ [ $x$ ] on three generators $a_1, a_2, a_3$, modulo the ideal generated by
$3$ [$a_1$, [ $a_2$, $a_3$ ]] + $5x$ [ $a_2$, [ $a_1$, $a_3$ ]] and [$a_3$, [
$a_2$, [ $a_3$, $a_1$ ]]]. As input coefficients one may always use an integer
or a quotient of integers with non-zero denominator in the field.

To specify weights of the generators, use the option
lieAlgebra(...,Weights=>...).
The weights are lists of integers of the same length, where the first degree is
positive, also just called the degree, see firstDegree(LieElement).
The degree is the two first inputs for the function
dims(ZZ,ZZ,LieAlgebra). If the option
lieAlgebra(...,LastWeightHomological=>...),
is true, then the
last degree is the homological degree, which is non-negative and less than the
first degree. If the option lieAlgebra(...,LastWeightHomological=>...),
is false, which
is the default value, then the program defines the homological degree to be
zero, and adds a last component 0 to the existing degrees. In this case the
weights can also be given as a list of positive integers that will be the
degrees. See Differential Lie algebra tutorial,
how to define a differential. Use weight, to compute
the weight of an arbitrary homogeneous Lie expression.

+------------------------------------------------------------+
|i3 : L = lieAlgebra({a,b,c},Weights => {{1,-1},{1,4},{2,3}})|
|                                                            |
|o3 = L                                                      |
|                                                            |
|o3 : LieAlgebra                                             |
+------------------------------------------------------------+
|i4 : weight b                                               |
|                                                            |
|o4 = {1, 4, 0}                                              |
|                                                            |
|o4 : List                                                   |
+------------------------------------------------------------+
|i5 : ex = a b+(1/3) c                                       |
|                                                            |
|o5 = (1/3)c - (b a)                                         |
|                                                            |
|o5 : L                                                      |
+------------------------------------------------------------+
|i6 : weight ex                                              |
|                                                            |
|o6 = {2, 3, 0}                                              |
|                                                            |
|o6 : List                                                   |
+------------------------------------------------------------+
|i7 : firstDegree ex                                         |
|                                                            |
|o7 = 2                                                      |
+------------------------------------------------------------+
|i8 : L1 = lieAlgebra({a,b,c},Weights => {1,1,2})            |
|                                                            |
|o8 = L1                                                     |
|                                                            |
|o8 : LieAlgebra                                             |
+------------------------------------------------------------+
|i9 : describe L1                                            |
|                                                            |
|o9 = generators => {a, b, c}                                |
|     Weights => {{1, 0}, {1, 0}, {2, 0}}                    |
|     Signs => {0, 0, 0}                                     |
|     ideal => {}                                            |
|     ambient => L1                                          |
|     diff => {}                                             |
|     Field => QQ                                            |
|     computedDegree => 0                                    |
+------------------------------------------------------------+

To specify signs of the generators, use the option
lieAlgebra(...,Signs=>...). The
sign of a generator is either 0 (even) or 1 (odd). By default, the sign of all
generators are 0. Writing the option as "Signs => 1" defines the signs of all
the generators to be 1. The signs affect the axioms of a Lie superalgebra, see
LieAlgebra. Use sign, to compute the sign of an
arbitrary homogeneous Lie expression.

+-------------------------------------------------------------+
|i10 : L = lieAlgebra({a,b,c},Weights => {{1,-1},{1,4},{2,3}},|
|            Signs=>{0,1,1})                                  |
|                                                             |
|o10 = L                                                      |
|                                                             |
|o10 : LieAlgebra                                             |
+-------------------------------------------------------------+
|i11 : ex = a b+(1/3) c                                       |
|                                                             |
|o11 = (1/3)c - (b a)                                         |
|                                                             |
|o11 : L                                                      |
+-------------------------------------------------------------+
|i12 : sign ex                                                |
|                                                             |
|o12 = 1                                                      |
+-------------------------------------------------------------+

For each finitely presented Lie algebra $L$, ambient(L) represents a free Lie
algebra $M$ such that $L$ (without differential) is a quotient of $M$, see also
Quotient Lie algebras and subspaces.
Moreover, the relations belong to $M$, even if $L$ is defined as a
quotient in two or more steps from $M$. This is somewhat different from the
situation for rings.

+---------------------------+
|i13 : M = lieAlgebra{a,b,c}|
|                           |
|o13 = M                    |
|                           |
|o13 : LieAlgebra           |
+---------------------------+
|i14 : L = M/{a b}          |
|                           |
|o14 = L                    |
|                           |
|o14 : LieAlgebra           |
+---------------------------+
|i15 : a c                  |
|                           |
|o15 =  - (c a)             |
|                           |
|o15 : L                    |
+---------------------------+
|i16 : Q = L/{a c}          |
|                           |
|o16 = Q                    |
|                           |
|o16 : LieAlgebra           |
+---------------------------+
|i17 : ideal(Q)             |
|                           |
|o17 = { - (b a),  - (c a)} |
|                           |
|o17 : List                 |
+---------------------------+
|i18 : oo_1                 |
|                           |
|o18 =  - (c a)             |
|                           |
|o18 : M                    |
+---------------------------+
|i19 : ambient Q            |
|                           |
|o19 = M                    |
|                           |
|o19 : LieAlgebra           |
+---------------------------+

The relations may have a non-zero linear part. Use
minimalPresentation(ZZ,LieAlgebra),
to get a minimal presentation. Use describe(LieAlgebra),
to get information about the Lie algebra. This
contains the value of the three options lieAlgebra(...,Weights=>...),
see
lieAlgebra(...,Signs=>...),
lieAlgebra(...,Field=>...),
and also the values
generators(LieAlgebra), ideal(LieAlgebra),
see ambient(LieAlgebra),
diff(LieAlgebra), and
computedDegree(LieAlgebra),

+------------------------------------------------+
|i20 : F = lieAlgebra({a,b,c},Weights => {1,1,2},|
|            Signs=>{1,0,0})                     |
|                                                |
|o20 = F                                         |
|                                                |
|o20 : LieAlgebra                                |
+------------------------------------------------+
|i21 : L = F/{-c+a a,(a b) a}                    |
|                                                |
|o21 = L                                         |
|                                                |
|o21 : LieAlgebra                                |
+------------------------------------------------+
|i22 : dims(1,4,L)                               |
|                                                |
|o22 = {2, 2, 1, 2}                              |
|                                                |
|o22 : List                                      |
+------------------------------------------------+
|i23 : describe L                                |
|                                                |
|o23 = generators => {a, b, c}                   |
|      Weights => {{1, 0}, {1, 0}, {2, 0}}       |
|      Signs => {1, 0, 0}                        |
|      ideal => { - c + (a a),  - (1/2)(b a a)}  |
|      ambient => F                              |
|      diff => {}                                |
|      Field => QQ                               |
|      computedDegree => 4                       |
+------------------------------------------------+
|i24 : M = minimalPresentation(4,L)              |
|                                                |
|o24 = M                                         |
|                                                |
|o24 : LieAlgebra                                |
+------------------------------------------------+
|i25 : describe M                                |
|                                                |
|o25 = generators => {a, b}                      |
|      Weights => {{1, 0}, {1, 0}}               |
|      Signs => {1, 0}                           |
|      ideal => {(b a a)}                        |
|      ambient => LieAlgebra{...10...}           |
|      diff => {}                                |
|      Field => QQ                               |
|      computedDegree => 0                       |
+------------------------------------------------+

In L#cache there is more information about $L$ collected during a computation.
Some parts of the information are visible to the user, e.g., see lieRing,
and mbRing. The ring L#cache.lieRing is the internal
polynomial ring representation of Lie elements. The Lie monomials are
represented as commutative monomials in this ring. The program produces
internally an ideal of relations and a basis, which may be seen as L#cache.gb
and L#cache.basis. The number of generators in lieRing, is the
number of generators in the Lie algebra times the internal counter L#cache.max,
which initially is set to $5$, and is changed to $n+5$ if the computation of
$L$ is performed up to degree $n$ with $n\ >$ L#cache.max.

+-----------------------------------------------------------------------------+
|i26 :                                                                        |
|      L = lieAlgebra{a,b}/{a a a b,b b b a}                                  |
|                                                                             |
|o26 = L                                                                      |
|                                                                             |
|o26 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i27 : dims(1,4,L)                                                            |
|                                                                             |
|o27 = {2, 1, 2, 1}                                                           |
|                                                                             |
|o27 : List                                                                   |
+-----------------------------------------------------------------------------+
|i28 : peek L#cache                                                           |
|                                                                             |
|o28 = CacheTable{ambient => LieAlgebra{...10...}                             |
|                 basis => MutableHashTable{...15...}                         |
|                 degree => 4                                                 |
|                 degrees => MutableHashTable{...4...}                        |
|                 dim => MutableHashTable{...5...}                            |
|                 gb => MutableHashTable{...4...}                             |
|                 generators => {a, b}                                        |
|                 lieRing => QQ[aR ..aR ]                                     |
|                                 0    9                                      |
|                 max => 5                                                    |
|                 mbRing => QQ[mb      , mb      , mb      , mb      , mb     |
|                                {1, 0}    {1, 1}    {2, 0}    {3, 0}    {3,  |
|                 opL => MutableHashTable{}                                   |
|-----------------------------------------------------------------------------|
|             }                                                               |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  , mb      ]                                                                |
|1}    {4, 0}                                                                 |
+-----------------------------------------------------------------------------+
|i29 : L#cache.basis#4                                                        |
|                                                                             |
|o29 = {aR aR aR aR }                                                         |
|         0  3  4  7                                                          |
|                                                                             |
|o29 : List                                                                   |
+-----------------------------------------------------------------------------+
|i30 : basis(4,L)                                                             |
|                                                                             |
|o30 = {(b a b a)}                                                            |
|                                                                             |
|o30 : List                                                                   |
+-----------------------------------------------------------------------------+
|i31 : L#cache.gb#4                                                           |
|                                                                             |
|o31 = ideal (aR aR aR aR , aR aR aR aR  - aR aR aR aR , aR aR aR aR )        |
|               0  3  5  7    0  3  5  6     0  3  4  7    0  3  4  6         |
|                                                                             |
|o31 : Ideal of QQ[aR ..aR ]                                                  |
|                    0    9                                                   |
+-----------------------------------------------------------------------------+
|i32 : a b b a                                                                |
|                                                                             |
|o32 = (b a b a)                                                              |
|                                                                             |
|o32 : L                                                                      |
+-----------------------------------------------------------------------------+
|i33 : dims(1,6,L)                                                            |
|                                                                             |
|o33 = {2, 1, 2, 1, 2, 1}                                                     |
|                                                                             |
|o33 : List                                                                   |
+-----------------------------------------------------------------------------+
|i34 : peek L#cache                                                           |
|                                                                             |
|o34 = CacheTable{ambient => LieAlgebra{...10...}                             |
|                 basis => MutableHashTable{...28...}                         |
|                 degree => 6                                                 |
|                 degrees => MutableHashTable{...6...}                        |
|                 dim => MutableHashTable{...7...}                            |
|                 gb => MutableHashTable{...6...}                             |
|                 generators => {a, b}                                        |
|                 lieRing => QQ[aR ..aR  ]                                    |
|                                 0    21                                     |
|                 max => 11                                                   |
|                 mbRing => QQ[mb      , mb      , mb      , mb      , mb     |
|                                {1, 0}    {1, 1}    {2, 0}    {3, 0}    {3,  |
|                 opL => MutableHashTable{...10...}                           |
|-----------------------------------------------------------------------------|
|                                           }                                 |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  , mb      , mb      , mb      , mb      ]                                  |
|1}    {4, 0}    {5, 0}    {5, 1}    {6, 0}                                   |
+-----------------------------------------------------------------------------+

The ring L#cache.mbRing is used to get an output of Lie elements with indexed
basis elements, which sometimes is better to use than the iterated Lie products
of generators, especially in high degrees. Use indexForm, to
get the output in mbRing, and
standardForm(RingElement,LieAlgebra),
to get back the standard output.
The ring mbRing, is very large; it has as many generators as the
total dimension of the computed Lie algebra. For this reason, you should give
the ring a name to avoid a large output.

+-----------------------------------------------------------------------------+
|i35 : L = lieAlgebra{a,b,c}                                                  |
|                                                                             |
|o35 = L                                                                      |
|                                                                             |
|o35 : LieAlgebra                                                             |
+-----------------------------------------------------------------------------+
|i36 : x = (a b c a) (b c)                                                    |
|                                                                             |
|o36 = (b c a c b a) - (b c b a c a) - (b c c a b a) - (c b a c b a) + (c b b |
|                                                                             |
|o36 : L                                                                      |
|-----------------------------------------------------------------------------|
|a c a) + (c b c a b a)                                                       |
+-----------------------------------------------------------------------------+
|i37 : Q = L#cache.mbRing                                                     |
|                                                                             |
|o37 = Q                                                                      |
|                                                                             |
|o37 : PolynomialRing                                                         |
+-----------------------------------------------------------------------------+
|i38 : numgens Q                                                              |
|                                                                             |
|o38 = 196                                                                    |
+-----------------------------------------------------------------------------+
|i39 : indexForm x                                                            |
|                                                                             |
|o39 = mb        - mb        - mb        + mb        + mb        - mb         |
|        {6, 22}     {6, 24}     {6, 43}     {6, 45}     {6, 74}     {6, 76}  |
|                                                                             |
|o39 : Q                                                                      |
+-----------------------------------------------------------------------------+
|i40 : standardForm(oo,L)                                                     |
|                                                                             |
|o40 = (b c a c b a) - (b c b a c a) - (b c c a b a) - (c b a c b a) + (c b b |
|                                                                             |
|o40 : L                                                                      |
|-----------------------------------------------------------------------------|
|a c a) + (c b c a b a)                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * First Lie algebra tutorial
  * Differential Lie algebra tutorial
  * Holonomy Lie algebras and symmetries

sign -- get the sign of a homogeneous element
***********************************************

Description
===========

The sign of a homogeneous Lie (or Ext) element $x$ is obtained as sign(x). The
zero element has sign equal to 0; however, its sign should be thought of as
arbitrary. The sign of a derivation $d$ is the sign of $d$ as a graded map and
may also be obtained as d#sign.

Synopsis
========

  * Usage:
        s=sign(x)
  * Inputs:
      * x, an instance of the type LieElement, an element of
        type $L$ where $L$ is of type LieAlgebra
  * Outputs:
      * s, an integer (Macaulay2Doc), the sign; 0 or 1
+----------------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},       |
|         LastWeightHomological=>true, Signs => 1)               |
|                                                                |
|o1 = L                                                          |
|                                                                |
|o1 : LieAlgebra                                                 |
+----------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_L,a a,a b}/{a a b, a a c, b a b}|
|                                                                |
|o2 = D                                                          |
|                                                                |
|o2 : LieAlgebra                                                 |
+----------------------------------------------------------------+
|i3 : x=a b c+2 c b a                                            |
|                                                                |
|o3 =  - 2 (b a c) - (a b c)                                     |
|                                                                |
|o3 : D                                                          |
+----------------------------------------------------------------+
|i4 : sign x                                                     |
|                                                                |
|o4 = 1                                                          |
+----------------------------------------------------------------+

Synopsis
========

  * Usage:
        s=sign(x)
  * Inputs:
      * x, an instance of the type ExtElement, an element of
        type $E$ where $E$ is of type ExtAlgebra
  * Outputs:
      * s, an integer (Macaulay2Doc), the sign; 0 or 1
+----------------------+
|i5 : E=extAlgebra(5,D)|
|                      |
|o5 = E                |
|                      |
|o5 : ExtAlgebra       |
+----------------------+
|i6 : b=basis(5,E)     |
|                      |
|o6 = {ext_4, ext_5}   |
|                      |
|o6 : List             |
+----------------------+
|i7 : apply(b,sign)    |
|                      |
|o7 = {1, 1}           |
|                      |
|o7 : List             |
+----------------------+

Synopsis
========

  * Usage:
        s=sign(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * s, an integer (Macaulay2Doc), the sign; 0 or 1
+------------------------+
|i8 : sign differential D|
|                        |
|o8 = 1                  |
+------------------------+

See also
========

  * firstDegree(LieElement) -- get the degree of an element
  * weight -- get the weight of a homogeneous element

Ways to use sign :
==================

  * "sign(ExtElement)"
  * "sign(LieDerivation)"
  * "sign(LieElement)"

For the programmer
==================

The object sign, is a method function (Macaulay2Doc).

Signs -- name for an optional argument for lieAlgebra
*****************************************************

Description
===========

This is an option to tell lieAlgebra, to assign the given
"signs" to the generators, which are either 0 (even) or 1 (odd).

See also
========

  * lieAlgebra -- make a free Lie algebra
  * sign -- get the sign of a homogeneous element
  * Second Lie algebra tutorial

Functions with optional argument named Signs :
==============================================

  * lieAlgebra(...,Signs=>...)
    -- optional argument for
    lieAlgebra

For the programmer
==================

The object Signs, is a symbol (Macaulay2Doc).

source(LieAlgebraMap) -- get the source of a map
************************************************

Synopsis
========

  * Function: source (Macaulay2Doc),
  * Usage:
        S=source(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * S, an instance of the type LieAlgebra, the source of
        $f$

See also
========

  * source(LieDerivation) -- get the source
    of a map
  * target(LieAlgebraMap) -- get the target
    of a map

Ways to use this method:
========================

  * source(LieAlgebraMap) -- get the source
    of a map

source(LieDerivation) -- get the source of a map
************************************************

Synopsis
========

  * Function: source (Macaulay2Doc),
  * Usage:
        S=source(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * S, an instance of the type LieAlgebra, the source of
        $d$

See also
========

  * source(LieAlgebraMap) -- get the source
    of a map
  * target(LieDerivation) -- get the target
    of a map

Ways to use this method:
========================

  * source(LieDerivation) -- get the source
    of a map

standardForm(RingElement,LieAlgebra) -- get a Lie element in standard form
**************************************************************************

Synopsis
========

  * Function: standardForm (Macaulay2Doc),

Description
===========

The set of linear polynomials in L#cache.mbRing gives a representation of Lie
elements. The function standardForm gives back the standard output and
indexForm goes in the other direction.

Synopsis
========

  * Usage:
        standardForm(r,L)
  * Inputs:
      * r, a ring element (Macaulay2Doc), an element in
        L#cache.mbRing
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * an instance of the type LieElement, the
        corresponding Lie element

Synopsis
========

  * Usage:
        standardForm(x,L)
  * Inputs:
      * x, a list (Macaulay2Doc), a list of elements in
        L#cache.mbRing
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * a list (Macaulay2Doc), the list of the corresponding Lie
        elements
+-------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                               |
|                                                       |
|o1 = L                                                 |
|                                                       |
|o1 : LieAlgebra                                        |
+-------------------------------------------------------+
|i2 : b3 = basis(3,L)                                   |
|                                                       |
|o2 = {(a b a), (b b a)}                                |
|                                                       |
|o2 : List                                              |
+-------------------------------------------------------+
|i3 : Q = L#cache.mbRing                                |
|                                                       |
|o3 = Q                                                 |
|                                                       |
|o3 : PolynomialRing                                    |
+-------------------------------------------------------+
|i4 : gens Q                                            |
|                                                       |
|o4 = {mb      , mb      , mb      , mb      , mb      }|
|        {1, 0}    {1, 1}    {2, 0}    {3, 0}    {3, 1} |
|                                                       |
|o4 : List                                              |
+-------------------------------------------------------+
|i5 : c3 = {indexForm a a b,indexForm b a b}            |
|                                                       |
|o5 = {-mb      , -mb      }                            |
|         {3, 0}     {3, 1}                             |
|                                                       |
|o5 : List                                              |
+-------------------------------------------------------+
|i6 : standardForm(c3,L)                                |
|                                                       |
|o6 = { - (a b a),  - (b b a)}                          |
|                                                       |
|o6 : List                                              |
+-------------------------------------------------------+
|i7 : standardForm(mb_{3,0}+2*mb_{3,1},L)               |
|                                                       |
|o7 = (a b a) + 2 (b b a)                               |
|                                                       |
|o7 : L                                                 |
+-------------------------------------------------------+
|i8 : indexForm oo                                      |
|                                                       |
|o8 = mb       + 2mb                                    |
|       {3, 0}      {3, 1}                              |
|                                                       |
|o8 : Q                                                 |
+-------------------------------------------------------+

See also
========

  * indexForm -- get a Lie element in the polynomial ring
    representation
  * mbRing -- a polynomial ring representation of the Lie
    algebra used for output
  * normalForm -- compute the normal form of a LieElement

Ways to use this method:
========================

  * "standardForm(List,LieAlgebra)"
  * standardForm(RingElement,LieAlgebra)
    -- get a Lie element in
    standard form

target(LieAlgebraMap) -- get the target of a map
************************************************

Synopsis
========

  * Function: target (Macaulay2Doc),
  * Usage:
        T=target(f)
  * Inputs:
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * T, an instance of the type LieAlgebra, the target of
        $f$

See also
========

  * target(LieDerivation) -- get the target
    of a map
  * source(LieAlgebraMap) -- get the source
    of a map

Ways to use this method:
========================

  * target(LieAlgebraMap) -- get the target
    of a map

target(LieDerivation) -- get the target of a map
************************************************

Synopsis
========

  * Function: target (Macaulay2Doc),
  * Usage:
        T=target(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * T, an instance of the type LieAlgebra, the target of
        $d$

See also
========

  * target(LieAlgebraMap) -- get the target
    of a map
  * source(LieDerivation) -- get the source
    of a map

Ways to use this method:
========================

  * target(LieDerivation) -- get the target
    of a map

trace(ZZ,LieSubSpace,LieAlgebraMap) -- compute the trace of a Lie algebra map acting on a Lie subspace
******************************************************************************************************

Synopsis
========

  * Function: trace (Macaulay2Doc),
  * Usage:
        r = trace(n,S,f)
  * Inputs:
      * n, an integer (Macaulay2Doc), the degree
      * S, an instance of the type LieSubSpace,
      * f, an instance of the type LieAlgebraMap,
  * Outputs:
      * r, a ring element (Macaulay2Doc), the trace of the
        map $f$ acting on $S$ in degree $n$

Description
===========

The subspace $S$ in degree $n$ should be invariant under $f$ (which is tested
by the program), and the output gives the trace of $f$ acting on $S$ in degree
$n$, which is an element in L#Field.

+------------------------------------------+
|i1 : L = lieAlgebra({a,b,c}, Field=>ZZ/31)|
|                                          |
|o1 = L                                    |
|                                          |
|o1 : LieAlgebra                           |
+------------------------------------------+
|i2 : S=lieSubAlgebra{a,b,c}               |
|                                          |
|o2 = S                                    |
|                                          |
|o2 : FGLieSubAlgebra                      |
+------------------------------------------+
|i3 : f=map(L,L,{b,c,a})                   |
|                                          |
|o3 = f                                    |
|                                          |
|o3 : LieAlgebraMap                        |
+------------------------------------------+
|i4 : trace(3,S,f)                         |
|                                          |
|o4 = -1                                   |
|                                          |
|     ZZ                                   |
|o4 : --                                   |
|     31                                   |
+------------------------------------------+
|i5 : f c b a                              |
|                                          |
|o5 = (b c a) - (c b a)                    |
|                                          |
|o5 : L                                    |
+------------------------------------------+
|i6 : f b c a                              |
|                                          |
|o6 =  - (c b a)                           |
|                                          |
|o6 : L                                    |
+------------------------------------------+

See also
========

  * isIsomorphism(LieAlgebraMap), --
    whether a Lie map is an isomorphism
  * isWellDefined(ZZ,LieAlgebraMap)
    -- whether a Lie map is well defined

Ways to use this method:
========================

  * trace(ZZ,LieSubSpace,LieAlgebraMap)
    -- compute the trace of a Lie
    algebra map acting on a Lie subspace

use(LieAlgebra) -- set the generators
*************************************

Synopsis
========

  * Function: use (Macaulay2Doc),

Description
===========

The generator names of the Lie algebra (and Ext-algebra) will get the value of
the true generators. This is needed when several Lie algebras are used.

Synopsis
========

  * Usage:
        use(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,

Ways to use this method:
========================

  * use(LieAlgebra) -- set the generators

VectorSpace -- the class of all vector spaces
*********************************************

Description
===========

This type represents e.g., homology of Lie algebras, and it has the subtypes
LieSubSpace, LieSubAlgebra, LieIdeal, FGLieIdeal, FGLieSubAlgebra.

+-----------------------------------------------------------------------------+
|i1 : L = lieAlgebra{a,b}                                                     |
|                                                                             |
|o1 = L                                                                       |
|                                                                             |
|o1 : LieAlgebra                                                              |
+-----------------------------------------------------------------------------+
|i2 : I=lieIdeal{a}                                                           |
|                                                                             |
|o2 = I                                                                       |
|                                                                             |
|o2 : FGLieIdeal                                                              |
+-----------------------------------------------------------------------------+
|i3 : showStructure class I                                                   |
|                                                                             |
|o3 = Thing : HashTable : VectorSpace : LieSubSpace : LieSubAlgebra : LieIdeal|
|                                                                             |
|o3 : Descent                                                                 |
|-----------------------------------------------------------------------------|
|: FGLieIdeal                                                                 |
+-----------------------------------------------------------------------------+
|i4 : H=lieHomology L                                                         |
|                                                                             |
|o4 = H                                                                       |
|                                                                             |
|o4 : VectorSpace                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * LieSubAlgebra -- the class of all Lie subalgebras
  * lieSubAlgebra -- make a Lie subalgebra
  * lieIdeal -- make a Lie ideal
  * lieHomology -- make the homology as a vector space

Types of VectorSpace :
======================

  * LieSubSpace -- the class of all Lie subspaces

Methods that use an object of class VectorSpace :
=================================================

  * basis(List,VectorSpace) -- compute a
    basis
  * basis(ZZ,VectorSpace) -- compute a
    basis
  * basis(ZZ,ZZ,VectorSpace), --
    compute a basis
  * "describe(VectorSpace)" -- see describe(LieAlgebra),
    -- real description
  * dim(List,VectorSpace) -- compute the
    dimension
  * dim(ZZ,VectorSpace) -- compute the
    dimension
  * dim(ZZ,ZZ,VectorSpace) -- compute
    the dimension
  * "dims(ZZ,VectorSpace)" -- see dims, -- compute the dimensions
    of a Lie algebra, Ext-algebra or vector space
  * "dims(ZZ,ZZ,VectorSpace)" -- see dims, -- compute the
    dimensions of a Lie algebra, Ext-algebra or vector space

For the programmer
==================

The object VectorSpace, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

weight -- get the weight of a homogeneous element
*************************************************

Description
===========

The weight of a homogeneous Lie (or Ext) element $x$ is obtained as weight(x).
The zero element of a Lie algebra has weight equal to a list of zeroes of
length equal to the degree length of the Lie algebra; however, its weight
should be thought of as arbitrary. The weight of a derivation $d$ is the weight
of $d$ as a graded map and may also be obtained as d#weight.

Synopsis
========

  * Usage:
        w=weight(x)
  * Inputs:
      * x, an instance of the type LieElement,
  * Outputs:
      * w, a list (Macaulay2Doc),
+----------------------------------------------------------------+
|i1 : L = lieAlgebra({a,b,c},Weights=>{{1,0},{2,1},{3,2}},       |
|         LastWeightHomological=>true, Signs => 1)               |
|                                                                |
|o1 = L                                                          |
|                                                                |
|o1 : LieAlgebra                                                 |
+----------------------------------------------------------------+
|i2 : D=differentialLieAlgebra{0_L,a a,a b}/{a a b, a a c, b a b}|
|                                                                |
|o2 = D                                                          |
|                                                                |
|o2 : LieAlgebra                                                 |
+----------------------------------------------------------------+
|i3 : x=a b c+2 c b a                                            |
|                                                                |
|o3 =  - 2 (b a c) - (a b c)                                     |
|                                                                |
|o3 : D                                                          |
+----------------------------------------------------------------+
|i4 : weight x                                                   |
|                                                                |
|o4 = {6, 3}                                                     |
|                                                                |
|o4 : List                                                       |
+----------------------------------------------------------------+
|i5 : weight 0_D                                                 |
|                                                                |
|o5 = {0, 0}                                                     |
|                                                                |
|o5 : List                                                       |
+----------------------------------------------------------------+

Synopsis
========

  * Usage:
        w=weight(x)
  * Inputs:
      * x, an instance of the type ExtElement,
  * Outputs:
      * w, a list (Macaulay2Doc),
+----------------------+
|i6 : E=extAlgebra(5,D)|
|                      |
|o6 = E                |
|                      |
|o6 : ExtAlgebra       |
+----------------------+
|i7 : b=basis(5,E)     |
|                      |
|o7 = {ext_4, ext_5}   |
|                      |
|o7 : List             |
+----------------------+
|i8 : apply(b,weight)  |
|                      |
|o8 = {{5, 4}, {5, 4}} |
|                      |
|o8 : List             |
+----------------------+

Synopsis
========

  * Usage:
        w=weight(d)
  * Inputs:
      * d, an instance of the type LieDerivation,
  * Outputs:
      * w, a list (Macaulay2Doc),
+--------------------------+
|i9 : weight differential D|
|                          |
|o9 = {0, -1}              |
|                          |
|o9 : List                 |
+--------------------------+

See also
========

  * firstDegree(LieElement) -- get the degree of an element
  * sign -- get the sign of a homogeneous element
  * degreeLength (Macaulay2Doc) -- the length of the degree
    vector

Ways to use weight :
====================

  * "weight(ExtElement)"
  * "weight(LieDerivation)"
  * "weight(LieElement)"

For the programmer
==================

The object weight, is a method function (Macaulay2Doc).

zeroDerivation -- make a derivation from the zero map
*****************************************************

Synopsis
========

  * Usage:
        d=zeroDerivation(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * d, an instance of the type LieDerivation,

Description
===========

The zero map from $L$ to $L$ is a derivation.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : dL=differential L  |
|                        |
|o2 = 0                  |
|                        |
|o2 : LieDerivation      |
+------------------------+
|i3 : d=zeroDerivation L |
|                        |
|o3 = 0                  |
|                        |
|o3 : LieDerivation      |
+------------------------+
|i4 : dL===d             |
|                        |
|o4 = true               |
+------------------------+

See also
========

  * lieDerivation -- make a graded derivation

Ways to use zeroDerivation :
============================

  * "zeroDerivation(LieAlgebra)"

For the programmer
==================

The object zeroDerivation, is a method function (Macaulay2Doc).

zeroIdeal -- make the zero ideal
********************************

Synopsis
========

  * Usage:
        I=zeroIdeal(L)
  * Inputs:
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * I, an instance of the type LieIdeal,

Description
===========

The set \{$0_L$\}\  is an ideal in $L$.

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : I=zeroIdeal L      |
|                        |
|o2 = I                  |
|                        |
|o2 : FGLieIdeal         |
+------------------------+
|i3 : J=lieIdeal{0_L,a a}|
|                        |
|o3 = I                  |
|                        |
|o3 : FGLieIdeal         |
+------------------------+
|i4 : I===J              |
|                        |
|o4 = true               |
+------------------------+

See also
========

  * lieIdeal -- make a Lie ideal

Ways to use zeroIdeal :
=======================

  * "zeroIdeal(LieAlgebra)"

For the programmer
==================

The object zeroIdeal, is a method function (Macaulay2Doc).

zeroMap -- make the zero map
****************************

Synopsis
========

  * Usage:
        f=zeroMap(M,L)
  * Inputs:
      * M, an instance of the type LieAlgebra,
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * f, an instance of the type LieAlgebraMap,

Description
===========

The zero map from $L$ to $M$ is a Lie homomorphism

+------------------------+
|i1 : L = lieAlgebra{a,b}|
|                        |
|o1 = L                  |
|                        |
|o1 : LieAlgebra         |
+------------------------+
|i2 : M = lieAlgebra{a,b}|
|                        |
|o2 = M                  |
|                        |
|o2 : LieAlgebra         |
+------------------------+
|i3 : f=zeroMap(M,L)     |
|                        |
|o3 = 0                  |
|                        |
|o3 : LieAlgebraMap      |
+------------------------+
|i4 : describe f         |
|                        |
|o4 = a => 0             |
|     b => 0             |
|     source => L        |
|     target => M        |
+------------------------+

See also
========

  * zeroDerivation -- make a derivation from the zero
    map

Ways to use zeroMap :
=====================

  * "zeroMap(LieAlgebra,LieAlgebra)"

For the programmer
==================

The object zeroMap, is a method function (Macaulay2Doc).

ZZ _ ExtAlgebra -- get the zero element
***************************************

Synopsis
========

  * Operator: _ (Macaulay2Doc),

Description
===========

Synopsis
========

  * Usage:
        0_E
  * Inputs:
      * 0, an integer (Macaulay2Doc),
      * E, an instance of the type ExtAlgebra,
  * Outputs:
      * an instance of the type ExtElement,
+--------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a b,b b a}|
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : E = extAlgebra(4,L)              |
|                                      |
|o2 = E                                |
|                                      |
|o2 : ExtAlgebra                       |
+--------------------------------------+
|i3 : 0_E                              |
|                                      |
|o3 = 0                                |
|                                      |
|o3 : E                                |
+--------------------------------------+

Ways to use this method:
========================

  * ZZ _ ExtAlgebra -- get the zero element

ZZ _ LieAlgebra -- get the zero element
***************************************

Synopsis
========

  * Operator: _ (Macaulay2Doc),

Description
===========

Synopsis
========

  * Usage:
        0_L
  * Inputs:
      * 0, an integer (Macaulay2Doc),
      * L, an instance of the type LieAlgebra,
  * Outputs:
      * an instance of the type LieElement,
+--------------------------------------+
|i1 : L = lieAlgebra{a,b}/{a a b,b b a}|
|                                      |
|o1 = L                                |
|                                      |
|o1 : LieAlgebra                       |
+--------------------------------------+
|i2 : 0_L                              |
|                                      |
|o2 = 0                                |
|                                      |
|o2 : L                                |
+--------------------------------------+

Ways to use this method:
========================

  * ZZ _ LieAlgebra -- get the zero element