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 |