Hi guys, I am trying to create a CDGA using an existed Lie Algebra bases as follow:
L = LieAlgebra(QQ, 3, step=3)
gen_list = L.basis().list(); gen_listOutput: [X_1, X_2, X_3, X_12, X_13, X_23, X_112, X_113, X_122, X_123, X_132, X_133, X_223, X_233]
I wanted to use these generators as the ones for my CGA so I did a little poke around:
gen_list = str(gen_list)[1:-1] # turn list to string
A = GradedCommutativeAlgebra(QQ, names=var(gen_list)); AOutput: Graded Commutative Algebra with generators ('X_1', 'X_2', 'X_3', 'X_12', 'X_13', 'X_23', 'X_112', 'X_113', 'X_122', 'X_123', 'X_132', 'X_133', 'X_223', 'X_233') in degrees (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) over Rational Field
But when I tried to access a specific generator, e.g. X_1, its type(X_1)
was actually just and expression <class 'sage.symbolic.expression.Expression'>
. For example, a correct generator should have the type(A.gen(0))
of <class 'sage.algebras.commutative_dga.GCAlgebra_with_category.element_class'>
.
I have to generalize this method so I cannot define the CGA as in the library guide A.<x,y,z>
. Thus, how do I define the generators correctly to get the type that I want? Thank you in advanced!