Base classes for reflexive modules¶
- class sage.tensor.modules.reflexive_module.ReflexiveModule_abstract[source]¶
Bases:
Parent
Abstract base class for reflexive modules.
An \(R\)-module \(M\) is reflexive if the natural map from \(M\) to its double dual \(M^{**}\) is an isomorphism.
In the category of \(R\)-modules, the dual module \(M^*\) is the \(R\)-module of linear functionals \(\phi:\ M \longrightarrow R\). However, we do not make the assumption that the dual module (obtained by
dual()
) is in the categoryHomsets
.We identify the double dual \(M^{**}\) with \(M\).
Tensor products of reflexive modules are reflexive. We identify all tensor products of \(k\) copies of \(M\) and \(l\) copies of \(M^*\) and denote it by \(T^{(k,l)}(M)\). The
tensor_type()
of such a tensor product is the pair \((k, l)\), and \(M\) is called itsbase_module()
.There are three abstract subclasses:
ReflexiveModule_base
is the base class for implementations of base modules \(M\).ReflexiveModule_dual
is the base class for implementations of duals \(M^*\).ReflexiveModule_tensor
is the base class for implementations of tensor modules \(T^{(k,l)}(M)\).
- base_module()[source]¶
Return the module on which
self
is constructed.EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3) sage: M.base_module() is M True sage: M.dual().base_module() is M True sage: M.tensor_module(1, 2).base_module() is M True
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3)) >>> M.base_module() is M True >>> M.dual().base_module() is M True >>> M.tensor_module(Integer(1), Integer(2)).base_module() is M True
- dual()[source]¶
Return the dual module.
EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3) sage: M.dual() Dual of the Rank-3 free module over the Integer Ring sage: M.dual().dual() Rank-3 free module over the Integer Ring sage: M.tensor_module(1, 2) Free module of type-(1,2) tensors on the Rank-3 free module over the Integer Ring sage: M.tensor_module(1, 2).dual() Free module of type-(2,1) tensors on the Rank-3 free module over the Integer Ring
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3)) >>> M.dual() Dual of the Rank-3 free module over the Integer Ring >>> M.dual().dual() Rank-3 free module over the Integer Ring >>> M.tensor_module(Integer(1), Integer(2)) Free module of type-(1,2) tensors on the Rank-3 free module over the Integer Ring >>> M.tensor_module(Integer(1), Integer(2)).dual() Free module of type-(2,1) tensors on the Rank-3 free module over the Integer Ring
- tensor(*args, **kwds)[source]¶
Return the tensor product of
self
andothers
.This method is invoked when
TensorProductFunctor
is applied to parents.It just delegates to
tensor_product()
.EXAMPLES:
sage: M = FiniteRankFreeModule(QQ, 2); M 2-dimensional vector space over the Rational Field sage: M20 = M.tensor_module(2, 0); M20 Free module of type-(2,0) tensors on the 2-dimensional vector space over the Rational Field sage: tensor([M20, M20]) Free module of type-(4,0) tensors on the 2-dimensional vector space over the Rational Field
>>> from sage.all import * >>> M = FiniteRankFreeModule(QQ, Integer(2)); M 2-dimensional vector space over the Rational Field >>> M20 = M.tensor_module(Integer(2), Integer(0)); M20 Free module of type-(2,0) tensors on the 2-dimensional vector space over the Rational Field >>> tensor([M20, M20]) Free module of type-(4,0) tensors on the 2-dimensional vector space over the Rational Field
- tensor_power(n)[source]¶
Return the
n
-fold tensor product ofself
.EXAMPLES:
sage: M = FiniteRankFreeModule(QQ, 2) sage: M.tensor_power(3) Free module of type-(3,0) tensors on the 2-dimensional vector space over the Rational Field sage: M.tensor_module(1,2).tensor_power(3) Free module of type-(3,6) tensors on the 2-dimensional vector space over the Rational Field
>>> from sage.all import * >>> M = FiniteRankFreeModule(QQ, Integer(2)) >>> M.tensor_power(Integer(3)) Free module of type-(3,0) tensors on the 2-dimensional vector space over the Rational Field >>> M.tensor_module(Integer(1),Integer(2)).tensor_power(Integer(3)) Free module of type-(3,6) tensors on the 2-dimensional vector space over the Rational Field
- tensor_product(*others)[source]¶
Return the tensor product of
self
andothers
.EXAMPLES:
sage: M = FiniteRankFreeModule(QQ, 2) sage: M.tensor_product(M) Free module of type-(2,0) tensors on the 2-dimensional vector space over the Rational Field sage: M.tensor_product(M.dual()) Free module of type-(1,1) tensors on the 2-dimensional vector space over the Rational Field sage: M.dual().tensor_product(M, M.dual()) Free module of type-(1,2) tensors on the 2-dimensional vector space over the Rational Field sage: M.tensor_product(M.tensor_module(1,2)) Free module of type-(2,2) tensors on the 2-dimensional vector space over the Rational Field sage: M.tensor_module(1,2).tensor_product(M) Free module of type-(2,2) tensors on the 2-dimensional vector space over the Rational Field sage: M.tensor_module(1,1).tensor_product(M.tensor_module(1,2)) Free module of type-(2,3) tensors on the 2-dimensional vector space over the Rational Field sage: Sym2M = M.tensor_module(2, 0, sym=range(2)); Sym2M Free module of fully symmetric type-(2,0) tensors on the 2-dimensional vector space over the Rational Field sage: Sym01x23M = Sym2M.tensor_product(Sym2M); Sym01x23M Free module of type-(4,0) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (0, 1), with symmetry on the index positions (2, 3) sage: Sym01x23M._index_maps ((0, 1), (2, 3)) sage: N = M.tensor_module(3, 3, sym=[1, 2], antisym=[3, 4]); N Free module of type-(3,3) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (1, 2), with antisymmetry on the index positions (3, 4) sage: NxN = N.tensor_product(N); NxN Free module of type-(6,6) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (1, 2), with symmetry on the index positions (4, 5), with antisymmetry on the index positions (6, 7), with antisymmetry on the index positions (9, 10) sage: NxN._index_maps ((0, 1, 2, 6, 7, 8), (3, 4, 5, 9, 10, 11))
>>> from sage.all import * >>> M = FiniteRankFreeModule(QQ, Integer(2)) >>> M.tensor_product(M) Free module of type-(2,0) tensors on the 2-dimensional vector space over the Rational Field >>> M.tensor_product(M.dual()) Free module of type-(1,1) tensors on the 2-dimensional vector space over the Rational Field >>> M.dual().tensor_product(M, M.dual()) Free module of type-(1,2) tensors on the 2-dimensional vector space over the Rational Field >>> M.tensor_product(M.tensor_module(Integer(1),Integer(2))) Free module of type-(2,2) tensors on the 2-dimensional vector space over the Rational Field >>> M.tensor_module(Integer(1),Integer(2)).tensor_product(M) Free module of type-(2,2) tensors on the 2-dimensional vector space over the Rational Field >>> M.tensor_module(Integer(1),Integer(1)).tensor_product(M.tensor_module(Integer(1),Integer(2))) Free module of type-(2,3) tensors on the 2-dimensional vector space over the Rational Field >>> Sym2M = M.tensor_module(Integer(2), Integer(0), sym=range(Integer(2))); Sym2M Free module of fully symmetric type-(2,0) tensors on the 2-dimensional vector space over the Rational Field >>> Sym01x23M = Sym2M.tensor_product(Sym2M); Sym01x23M Free module of type-(4,0) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (0, 1), with symmetry on the index positions (2, 3) >>> Sym01x23M._index_maps ((0, 1), (2, 3)) >>> N = M.tensor_module(Integer(3), Integer(3), sym=[Integer(1), Integer(2)], antisym=[Integer(3), Integer(4)]); N Free module of type-(3,3) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (1, 2), with antisymmetry on the index positions (3, 4) >>> NxN = N.tensor_product(N); NxN Free module of type-(6,6) tensors on the 2-dimensional vector space over the Rational Field, with symmetry on the index positions (1, 2), with symmetry on the index positions (4, 5), with antisymmetry on the index positions (6, 7), with antisymmetry on the index positions (9, 10) >>> NxN._index_maps ((0, 1, 2, 6, 7, 8), (3, 4, 5, 9, 10, 11))
- tensor_type()[source]¶
Return the tensor type of
self
.OUTPUT:
pair \((k,l)\) such that
self
is the module tensor product \(T^{(k,l)}(M)\), where \(M\) is thebase_module()
ofself
.
EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3) sage: T = M.tensor_module(1, 2) sage: T.tensor_type() (1, 2)
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3)) >>> T = M.tensor_module(Integer(1), Integer(2)) >>> T.tensor_type() (1, 2)
- class sage.tensor.modules.reflexive_module.ReflexiveModule_base[source]¶
Bases:
ReflexiveModule_abstract
Abstract base class for reflexive modules that are base modules.
- base_module()[source]¶
Return the free module on which
self
is constructed, namelyself
itself.EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3, name='M') sage: M.base_module() is M True sage: M = Manifold(2, 'M') # needs sage.symbolic sage: XM = M.vector_field_module() # needs sage.symbolic sage: XM.base_module() is XM # needs sage.symbolic True
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3), name='M') >>> M.base_module() is M True >>> M = Manifold(Integer(2), 'M') # needs sage.symbolic >>> XM = M.vector_field_module() # needs sage.symbolic >>> XM.base_module() is XM # needs sage.symbolic True
- dual()[source]¶
Return the dual module.
EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3, name='M') sage: M.dual() Dual of the Rank-3 free module M over the Integer Ring
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3), name='M') >>> M.dual() Dual of the Rank-3 free module M over the Integer Ring
- tensor_module(k, l, **kwds)[source]¶
Return the module of all tensors of type \((k, l)\) defined on
self
.EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3) sage: M.tensor_module(1, 2) Free module of type-(1,2) tensors on the Rank-3 free module over the Integer Ring
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3)) >>> M.tensor_module(Integer(1), Integer(2)) Free module of type-(1,2) tensors on the Rank-3 free module over the Integer Ring
- tensor_type()[source]¶
Return the tensor type of
self
, the pair \((1, 0)\).EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3) sage: M.tensor_type() (1, 0) sage: M = Manifold(2, 'M') # needs sage.symbolic sage: XM = M.vector_field_module() # needs sage.symbolic sage: XM.tensor_type() # needs sage.symbolic (1, 0)
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3)) >>> M.tensor_type() (1, 0) >>> M = Manifold(Integer(2), 'M') # needs sage.symbolic >>> XM = M.vector_field_module() # needs sage.symbolic >>> XM.tensor_type() # needs sage.symbolic (1, 0)
- class sage.tensor.modules.reflexive_module.ReflexiveModule_dual[source]¶
Bases:
ReflexiveModule_abstract
Abstract base class for reflexive modules that are the duals of base modules.
- class sage.tensor.modules.reflexive_module.ReflexiveModule_tensor[source]¶
Bases:
ReflexiveModule_abstract
Abstract base class for reflexive modules that are tensor products of base modules.
- tensor_factors()[source]¶
Return the tensor factors of this tensor module.
EXAMPLES:
sage: M = FiniteRankFreeModule(ZZ, 3, name='M') sage: T = M.tensor_module(2, 3) sage: T.tensor_factors() [Rank-3 free module M over the Integer Ring, Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring]
>>> from sage.all import * >>> M = FiniteRankFreeModule(ZZ, Integer(3), name='M') >>> T = M.tensor_module(Integer(2), Integer(3)) >>> T.tensor_factors() [Rank-3 free module M over the Integer Ring, Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring, Dual of the Rank-3 free module M over the Integer Ring]