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

Commit

Permalink
TensorFieldModule: Put it in the category Modules.TensorProducts
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Nov 12, 2022
1 parent a6ba101 commit 8e0bf36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/sage/manifolds/differentiable/tensorfield.py
Expand Up @@ -176,8 +176,8 @@ class TensorField(ModuleElementWithMutability):
Module T^(0,2)(S^2) of type-(0,2) tensors fields on the 2-dimensional
differentiable manifold S^2
sage: t.parent().category()
Category of modules over Algebra of differentiable scalar fields on the
2-dimensional differentiable manifold S^2
Category of tensor products of modules over Algebra of differentiable scalar fields
on the 2-dimensional differentiable manifold S^2
The parent of `t` is not a free module, for the sphere `S^2` is not
parallelizable::
Expand Down
9 changes: 5 additions & 4 deletions src/sage/manifolds/differentiable/tensorfield_module.py
Expand Up @@ -125,8 +125,8 @@ class TensorFieldModule(VectorFieldModule_abstract):
`T^{(2,0)}(M)` is a module over the algebra `C^k(M)`::
sage: T20.category()
Category of modules over Algebra of differentiable scalar fields on the
2-dimensional differentiable manifold M
Category of tensor products of modules over Algebra of differentiable scalar fields
on the 2-dimensional differentiable manifold M
sage: T20.base_ring() is M.scalar_field_algebra()
True
Expand Down Expand Up @@ -237,7 +237,7 @@ class TensorFieldModule(VectorFieldModule_abstract):
"""
Element = TensorField

def __init__(self, vector_field_module, tensor_type):
def __init__(self, vector_field_module, tensor_type, category=None):
r"""
Construct a module of tensor fields taking values on a (a priori) not
parallelizable differentiable manifold.
Expand Down Expand Up @@ -289,7 +289,8 @@ def __init__(self, vector_field_module, tensor_type):
# the member self._ring is created for efficiency (to avoid calls to
# self.base_ring()):
self._ring = domain.scalar_field_algebra()
Parent.__init__(self, base=self._ring, category=Modules(self._ring))
category = Modules(self._ring).TensorProducts().or_subcategory(category)
Parent.__init__(self, base=self._ring, category=category)
self._domain = domain
self._dest_map = dest_map
self._ambient_domain = vector_field_module._ambient_domain
Expand Down

0 comments on commit 8e0bf36

Please sign in to comment.