Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tensor product of exterior power

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/free_module_basis.py in __init__(self, fmodule, symbol, latex_symbol, indices, latex_indices, symbol_dual, latex_symbol_dual)
     637         ring_one = fmodule._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!!

Tensor product of exterior power

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$: $T$:

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

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/free_module_basis.py in __init__(self, fmodule, symbol, latex_symbol, indices, latex_indices, symbol_dual, latex_symbol_dual)
     637         ring_one = fmodule._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!!