Ask Your Question

Revision history [back]

Commutative Graded Algebra bases showed as Expression

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_list

Output: [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)); A

Output: 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!

Commutative Graded Algebra bases showed as Expression

Hi guys, I am trying to create a CDGA using an existed Lie Algebra bases as follow:

sage: L = LieAlgebra(QQ, 3, step=3) 
step=3) sage: gen_list = L.basis().list(); gen_list

Output: L.basis().list() sage: gen_list [X_1, X_2, X_3, X_12, X_13, X_23, X_112, X_113, X_113, X_122, X_123, X_132, X_133, X_223, X_233]

X_233]

I wanted to use these generators as the ones for my CGA so I did a little poke around:

sage: gen_list = str(gen_list)[1:-1] # turn list to string 
string sage: A = GradedCommutativeAlgebra(QQ, names=var(gen_list)); A

Output: names=var(gen_list)) sage: A Graded Commutative Algebra with generators generators ('X_1', 'X_2', 'X_3', 'X_12', 'X_13', 'X_23', 'X_112', 'X_113', 'X_113', 'X_122', 'X_123', 'X_132', 'X_133', 'X_223', 'X_233') 'X_233') in degrees (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) over Rational Field

Field

But when I tried to access a specific generator, e.g. X_1, its type(X_1) X_1, it type was actually just and expression an expression:

sage: type(X_1)
<class 'sage.symbolic.expression.Expression'>. 'sage.symbolic.expression.Expression'>

For example, a correct generator should have the type(A.gen(0)) of following type:

sage: type(A.gen(0))
<class 'sage.algebras.commutative_dga.GCAlgebra_with_category.element_class'>. 

'sage.algebras.commutative_dga.GCAlgebra_with_category.element_class'>

I have to generalize this method so I cannot define the CGA CGA as in the library guide A.<x,y,z>. A.<x, y, z>.

Thus, how do I define the generators correctly to get the type that I want? Thank you in advanced!want?

Commutative Graded Algebra bases showed as Expression

I am trying to create a CDGA using an existed existing Lie Algebra bases as follow:basis as follows:

sage: L = LieAlgebra(QQ, 3, step=3)
sage: gen_list = L.basis().list()
sage: gen_list
[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 To use these generators as the ones for my CGA so I did CGA, after poking around a little poke around:bit I tried:

sage: gen_list = str(gen_list)[1:-1] # turn list to string
sage: A = GradedCommutativeAlgebra(QQ, names=var(gen_list))
sage: A
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 try to access a specific generator, e.g. X_1, it type was , its type is actually just an expression:

sage: type(X_1)
<class 'sage.symbolic.expression.Expression'>

For example, a A correct generator should have the following type:

sage: type(A.gen(0))
<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 using something like A.<x, y, z>z> = ....

Thus, how How do I define the generators correctly to get the type that I want?

Commutative Graded Algebra bases showed as Expression

I am trying to create a CDGA using an existing Lie Algebra basis as follows:

sage: L = LieAlgebra(QQ, 3, step=3)
sage: gen_list = L.basis().list()
sage: gen_list
[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]

To use these generators as the ones for my CGA, after poking around a bit I tried:

sage: gen_list = str(gen_list)[1:-1] # turn list to string
sage: A = GradedCommutativeAlgebra(QQ, names=var(gen_list))
sage: A
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 try to access a specific generator, e.g. X_1, its type is actually just an expression:

sage: type(X_1)
<class 'sage.symbolic.expression.Expression'>

A correct generator should have the following type:

sage: type(A.gen(0))
<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 using something like A.<x, y, z> = ....

How do I define the generators correctly to get the type that I want?