Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
FiniteRankDualFreeModule.tensor_type: New; add tensor_product doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 2, 2022
1 parent 94f59b8 commit 37e41b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/sage/tensor/modules/finite_rank_free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,10 @@ def tensor_product(self, *others):
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)
Expand Down Expand Up @@ -3243,3 +3247,16 @@ def base_module(self):
"""
return self._fmodule

def tensor_type(self):
r"""
Return the tensor type of ``self``.
EXAMPLES::
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
sage: M.dual().tensor_type()
(0, 1)
"""
return (0, 1)

0 comments on commit 37e41b9

Please sign in to comment.