Ask Your Question

Tensor product of exterior power

asked 2022-01-27 20:41:50 +0100

anonymous user


updated 2022-01-27 20:52:35 +0100

I am trying to use the SageManifolds tensor modules package to work with the tensor power $T = E^{\otimes 2}$ where $E$ is itself the exterior power $E = \bigwedge^2 \mathbb{Z}$.

Here is what I have so far:

sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
sage: E = M.exterior_power(2)
sage: T = E.tensor_module(2,0)

I then want to work with an element of $T$ by giving it coordinates. I can give an element of $E$ a coordinate by doing

sage: a = E([], name='a')
sage: a.set_comp()[0,1] = 3
sage: a.set_comp()[0,2] = 1
sage: a.display()
a = 3 e_0∧e_1 + e_0∧e_2

So I would have expected to be able to do the same for $T$:

sage: t = T([], name='t')
sage: t.set_comp()[0,0] = 1

but I get a ValueError:

ValueError: the None has not been defined on the 2nd exterior power of the Rank-3 free module M over the Integer Ring

The code in the source which prints None is raise ValueError("the {} has not been ".format(basis) +... and so the problem is that there is no basis for E.

sage: E.default_basis()
No default basis has been defined on the 2nd exterior power of the Rank-3 free module M over the Integer Ring

When I try to define a basis I get a type error:

sage: E.basis('e')
TypeError: __init__() missing 1 required positional argument: 'degree'

coming from the line

sage/tensor/modules/ in __init__(self, fmodule, symbol, latex_symbol, indices, latex_indices, symbol_dual, latex_symbol_dual)
     637         ring_one =
     638         for i in fmodule.irange():
--> 639             v = fmodule.element_class(fmodule)
     640             v.set_comp(self)[i] = ring_one
     641             vl.append(v)

because E.element_class() has the init signature E.element_class(fmodule, degree, name=None, latex_name=None). There is no default degree passed, and there is no option for fmodule.element_class(fmodule) to take an argument degree. Are there any workarounds to this problem?

Many thanks!!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2022-01-28 14:41:12 +0100

eric_g gravatar image

You are facing a shortcoming of the current implementation: the modules constructed upon M, like the exterior power E, are not endowed with their own bases; all their elements are expanded on wedge products of basis elements of E. For instance

sage: E.an_element().display()

(By the way, the line sage: e = M.basis('e') seems to be missing in your code snippet). Hence E is not implemented as a finite rank free module on the same setting as M. This is reflected by the fact that it has a "base module":

sage: E.base_module()
Rank-3 free module M over the Integer Ring

and all its elements are expanded in terms of bases of this base module.

Such an implementation turned out to be convenient for tensor fields on manifolds. If one would like to extend it to allow for E to have its own bases, then one should make some choice about the storage of the components of the elements of E and the associated methods display, comp and set_comp.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2022-01-27 20:41:50 +0100

Seen: 197 times

Last updated: Jan 28 '22