Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

How to compute in the Tensor Algebra T(V) ?

asked 4 years ago

qfaes gravatar image

updated 4 years ago

I need to make some computations in low degree in the Tensor algebra T(V) of a rational vector space V, but i cannot find a good way of doing this. I could use FreeAlgebras, but then i cannot get access to the summands in my element : for example i want to be able to retrieve a b and c from the element $abc $ (whenever the element is homogeneous).

The reason for this is I need to define a 'cycle' function that associates Wa to a tensor aW when W is a tensor and aV.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

FrédéricC gravatar image

Like this maybe

sage: A = algebras.Free(QQ, 'abc')                                                                                                             
sage: elt = 4 * A.monomial(Word('abc')) + 6*A.monomial(Word('a'))                                                                                 
sage: data = [(w.to_word(), cf) for w, cf in elt]                                                                                             
sage: A.sum_of_terms((w[1:] + w[:1], cf) for w, cf in data)                                                                                   
6*a + 4*b*c*a
Preview: (hide)
link

Comments

Thank you so much, that is exactly what I need ! So the algebra element is secretly a list of tuples ?

qfaes gravatar imageqfaes ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 4 years ago

Seen: 301 times

Last updated: Jan 13 '21