See Second LieAlgebra Tutorial on how to use the option genDiffs.
i1 : L=lieAlgebra({a,b,c},{[a,a],[b,b]},genSigns=>1, genWeights=>{{1,0},{1,0},{2,1}},genDiffs=>{[],[],[a,b]}) o1 = L o1 : LieAlgebra |
The dimensions of the homology can be obtained using homologyLie. A basis for the homology and the boundaries in a certain first and homological degree is obtained by homologyBasisLie and boundariesBasisLie.
i2 : homologyLie 5 o2 = | 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 o2 : Matrix ZZ <--- ZZ |
i3 : boundariesBasisLie(4,1) o3 = {{{1, 1}, {[a, b, c], [b, a, c]}}} o3 : List |
i4 : invImageBasisLie(4,1,diffLie(),oo) o4 = {[c, c]} o4 : List |
i5 : evalDiffLie[c,c] o5 = {{2, 2}, {[a, b, c], [b, a, c]}} o5 : List |
i6 : homologyBasisLie(4,1) o6 = {[b, a, c]} o6 : List |
It follows from above that a basis for the cycles of weight (4,1) is {[b,a,c],[a,b,c]}. In degree (3,1) there are two independent cycles and no boundaries:
i7 : homologyBasisLie(3,1) o7 = {[b, c], [a, c]} o7 : List |
i8 : boundariesBasisLie(3,1) o8 = {} o8 : List |
In degree (5,1) all elements are boundaries, so homologyLie(5,1)=0 (which was obtained above). In degree (5,2) there are no cycles.
i9 : boundariesBasisLie(5,1) o9 = {[b, a, b, c], [a, b, a, c]} o9 : List |
i10 : basisLie(5,1) o10 = {[a, b, a, c], [b, a, b, c]} o10 : List |
i11 : homologyLie(5,1) o11 = 0 |
i12 : basisLie(5,2) o12 = {[a, c, c], [b, c, c]} o12 : List |
i13 : evalDiffLie([c,a,c]) o13 = [a, b, a, c] o13 : Array |
i14 : evalDiffLie([c,b,c]) o14 = [b, a, b, c] o14 : Array |
i15 : homologyLie(5,2) o15 = 0 |
i16 : boundariesBasisLie(5,2) o16 = {} o16 : List |
Here is an example with zero homology and hence also its minimal model, see minmodelLie, is the zero Lie algebra.
i17 : L1=lieAlgebra({a,b},{},genSigns=>{0,1},genWeights=>{{2,0},{2,1}}, genDiffs=>{[],[a]}) o17 = L1 o17 : LieAlgebra |
i18 : homologyLie 12 o18 = 0 12 12 o18 : Matrix ZZ <--- ZZ |
i19 : M1=minmodelLie 12 o19 = M1 o19 : LieAlgebra |
i20 : peek oo o20 = LieAlgebra{cache => CacheTable{...10...}} compdeg => 12 deglength => 0 field => QQ genDiffs => {} genSigns => {} gensLie => {} genWeights => {} modelmap => MapLie{...2...} numGen => 0 relsLie => {} targetLie => L1 |
i21 : whichLie() o21 = L1 o21 : LieAlgebra |
i22 : useLie M1 o22 = M1 o22 : LieAlgebra |
i23 : homologyLie 12 o23 = 0 12 12 o23 : Matrix ZZ <--- ZZ |
i24 : peek M1.modelmap o24 = MapLie{sourceLie => M1} targetLie => L1 |
The above result is true in characteristic zero and false in positive characteristic.
i25 : L3=lieAlgebra({a,b},{},genSigns=>{1,0},genWeights=>{{2,0},{2,1}}, genDiffs=>{[],[a]},field=>ZZ/3) o25 = L3 o25 : LieAlgebra |
i26 : homologyLie 12 o26 = | 0 0 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 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 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 | 12 12 o26 : Matrix ZZ <--- ZZ |
i27 : homologyBasisLie(6,1) o27 = {[b, a, a]} o27 : List |
i28 : homologyBasisLie(6,2) o28 = {[b, b, a]} o28 : List |
In characteristic different from two, the differential of [b,b,a] is 3/2[b,a,a] and [b,a,a] is a cycle, which explains the result above (in characteristic 2, [b,a] is a cycle which is not a boundary).
Below is a differential Lie algebra which is non-free and where the differential has a linear part.
i29 : L=lieAlgebra({a,b,c,r3,r4,r42}, {{{1,-1},{[b,c],[a,c]}},[a,b],{{1,-1},{[b,r4],[a,r4]}}}, genWeights => {{1,0},{1,0},{2,0},{3,1},{4,1},{4,2}}, genDiffs=>{[],[],[],[a,c],[a,a,c],{{1,-1},{[r4],[a,r3]}}}, genSigns=>{0,0,0,1,1,0}) o29 = L o29 : LieAlgebra |
i30 : homologyLie 5 o30 = | 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 o30 : Matrix ZZ <--- ZZ |
The homology in homological degree zero is concentrated in degree 1 and 2. The function minPresLie gives a minimal presentation of the Lie algebra H0 (and L is still the current Lie algebra).
i31 : minPresLie 3 o31 = LieAlgebra{...10...} o31 : LieAlgebra |
i32 : peek oo o32 = LieAlgebra{cache => CacheTable{...9...} } compdeg => 0 deglength => 2 field => QQ genDiffs => {[], [], []} genSigns => {0, 0, 0} gensLie => {a, b, c} genWeights => {{1, 0}, {1, 0}, {2, 0}} numGen => 3 relsLie => {[b, a], [b, c], [a, c]} |
i33 : whichLie() o33 = L o33 : LieAlgebra |
We now compute the minimal model of L and check that its homology is the same as for L.
i34 : M=minmodelLie 5 o34 = M o34 : LieAlgebra |
i35 : useLie M o35 = M o35 : LieAlgebra |
i36 : homologyLie 5 o36 = | 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 o36 : Matrix ZZ <--- ZZ |
i37 : peek M o37 = LieAlgebra{cache => CacheTable{...10...} } compdeg => 5 deglength => 2 field => QQ genDiffs => {[], [], [], [fr , fr ], [fr , fr ], [fr , fr ], {{1, 1, -1}, {[fr , fr , fr ], [fr , fr , fr ], [fr , fr , fr ]}}} 1 0 1 2 0 2 0 3 2 0 0 4 0 1 5 genSigns => {0, 0, 0, 1, 1, 1, 0} gensLie => {fr , fr , fr , fr , fr , fr , fr } 0 1 2 3 4 5 6 genWeights => {{1, 0}, {1, 0}, {2, 0}, {2, 1}, {3, 1}, {3, 1}, {5, 2}} modelmap => MapLie{...9...} numGen => 7 relsLie => {} targetLie => L |
The quasi-isomorphism is obtained as f=M.modelmap. In homological degree zero, f is surjective, but in general in higher homological degrees, it is not so as in this example, see below.
i38 : f=M.modelmap o38 = f o38 : MapLie |
i39 : peek f o39 = MapLie{fr => [] } 3 fr => [a] 0 fr => [b] 1 fr => [c] 2 fr => [r3] 4 fr => [r3] 5 fr => {{-1, 1}, {[a, r42], [b, r42]}} 6 sourceLie => M targetLie => L |
i40 : useLie L o40 = L o40 : LieAlgebra |
i41 : dimTableLie 5 o41 = | 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 | | 0 0 0 0 0 | 6 5 o41 : Matrix ZZ <--- ZZ |
i42 : imageLie(5,f) o42 = | 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 o42 : Matrix ZZ <--- ZZ |
We check below that H(f) is iso in degree (5,1).
i43 : homologyBasisLie(5,1) o43 = {{{1, -1}, {[b, a, r3], [b, b, r3]}}} o43 : List |
i44 : useLie M o44 = M o44 : LieAlgebra |
i45 : homologyBasisLie(5,1) o45 = {{{1, 1, -1}, {[fr , fr , fr ], [fr , fr , fr ], [fr , fr , fr ]}}} 1 3 2 1 0 4 1 1 5 o45 : List |
i46 : evalMapLie(f,oo_0) o46 = {{1, -1}, {[b, a, r3], [b, b, r3]}} o46 : List |
The generators of M yield basis elements for the cohomology ExtUL(k,k) (with a shift in the homological degree , k=L.field). Its dimensions may be obtained using extAlgLie (observe that the first row gives ExtUL(k,k) in degree 1 to 5 and homological degree 1 ).
i47 : extAlgLie 5 o47 = | 2 1 0 0 0 | | 0 1 2 0 0 | | 0 0 0 0 1 | | 0 0 0 0 0 | | 0 0 0 0 0 | 5 5 o47 : Matrix ZZ <--- ZZ |
i48 : M.genWeights o48 = {{1, 0}, {1, 0}, {2, 0}, {2, 1}, {3, 1}, {3, 1}, {5, 2}} o48 : List |