1 | initial version |
You might also be asking whether the functionality of GAP for Lie groups, Lie algebras, and structure constants is accessible from sage; for that, the answer is "yes!". If you can construct the corresponding Lie algebra in GAP, then you can get its structure constants (in GAP) by using StruccctureConstantsTable
. For example:
gap> e6 := SimpleLieAlgebra("E",6,Rationals);
gap> StructureConstantsTable(Basis(e6));
...(array of output which could be pulled into sage)...
Once you know what relations you're looking for, you could create this algebra by first defining a polynomial ring on the a_i, b_j, c_k
and an ideal determined by your relations, and then constructing the quotient. Documentation is here. Or, if speed is an issue, maybe you could do the work directly in GAP. You can see the following link to read more about the GAP interface. Or maybe someone else has a better solution.
p.s. I do agree, it might help to clarify your question; and watch out for _underscores_.
2 | updated to use GAP interface from within sage |
You might also be asking whether the functionality of GAP for Lie groups, Lie algebras, and structure constants is accessible from sage; for that, the answer is "yes!". If you can construct the corresponding Lie algebra in GAP, then you can get its structure constants (in GAP) by using StruccctureConstantsTable
. For example:
sage: a3 = gap.SimpleLieAlgebra('"A"',3,'Rationals') # note extra quotes around the string "A" sage: tg = gap.StructureConstantsTable(gap.Basis(a3)) sage: tg.parent() Gap sage: type(tg) <class 'sage.interfaces.gap.GapElement'> sage: ts = tg.sage() sage: type(ts) <type 'list'>
Now you can do the following with either
or gap> e6 := SimpleLieAlgebra("E",6,Rationals);
gap> StructureConstantsTable(Basis(e6));
...(array of output which could tgts
, but note the difference in indexing (GAP lists start indexing at 1!):
sage: ts[3][7] [[1], [-1]] sage: tg[3][7] [ [ ], [ ] ] sage: tg[4][8] [ [ 1 ], [ -1 ] ] sage: ts[0] [[[], []], [[4], [-1]], [[], []], [[], []], [[6], [-1]], [[], []], [[13], [1]], [[], []], [[], []], [[8], [1]], [[], []], [[11], [1]], [[1], [-2]], [[1], [1]], [[], []]] sage: tg[0] Traceback (most recent call last) ... TypeError: Gap produced error output List Element: <position> must bepulled into sage)...positive (not a 0)
Once you know what relations you're looking for, you could create this algebra by first defining a polynomial ring on the a_i, b_j, c_k
and an ideal determined by your relations, and then constructing the quotient. Documentation is here. Or, if speed is an issue, maybe you could do the work directly in GAP. You can see the following link to read more about the GAP interface. Or maybe someone else has a better solution.
p.s. I do agree, it might help to clarify your question; and watch out for _underscores_.