Ask Your Question
0

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

asked 2021-01-13 16:21:54 +0200

qfaes gravatar image

updated 2021-01-13 16:57:26 +0200

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 $a \in V$.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-01-13 17:24:55 +0200

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
edit flag offensive delete link more

Comments

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

qfaes gravatar imageqfaes ( 2021-01-13 19:31:58 +0200 )edit

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: 2021-01-13 16:21:54 +0200

Seen: 178 times

Last updated: Jan 13 '21