Ask Your Question

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

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 close merge delete

## 1 Answer

Sort by » oldest newest most voted 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

more

## Comments

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

## Your Answer

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

Add Answer

## Stats

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

Seen: 53 times

Last updated: Jan 13