Opened 6 months ago
Last modified 4 weeks ago
#15916 needs_review enhancement
Tensors on free modules of finite rank
Buildbot: Failure
Reported by: | egourgoulhon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | linear algebra | Keywords: | free module, tensor, tensor product |
Cc: | SimonKing | Merged in: | |
Authors: | Eric Gourgoulhon, Michal Bejger | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/egourgoulhon/tensor_modules (Commits) | Commit: | 8f0878d7c04e15559a76c427fac9a764fa1ecca8 |
Dependencies: | Stopgaps: |
Description (last modified by egourgoulhon)
Description
This ticket implements:
- tensor products of the type M\otimes ...\otimes M \otimes M* \otimes...\otimes M* where M is a free module of finite rank over a commutative ring R and M* is its dual (k factors of M and l factors of M*, say)
- the elements of the above tensor products, considered as tensors of type (k,l) on M, i.e. multilinear forms (M*)^{k} \times M^{l} --> R, thanks to the canonical isomorphism (M*)* = M (which holds since M is a free module of finite rank)
- the following tensor operations:
- operations inherent to the module structure (addition, multiplication by a ring element)
- tensor product of two tensors
- tensor contraction
- symmetry / antisymmetry handling (on subset of the tensor arguments or on all arguments)
- exterior product of alternating forms
No distinguished basis is assumed on the free module M; on the contrary many bases can be introduced. Each tensor has then various representations, via its components in the various bases.
Motivation and context
The ticket has been motivated by tensors on smooth manifolds over R, within the
SageManifolds project. In this context, tensors on free modules appear at two levels:
- tensors on tangent spaces:
- commutative ring R: real field R
- free module M: tangent vector space at a given manifold's point
- tensor fields on a manifold:
- commutative ring R: the algebra C^{oo}(U) of smooth functions U--> R, where U is a parallelizable open set of the manifold
- free module M: the set X(U) of smooth vector fields on U (since U is parallelizable, this is a free module; its rank is the manifold's dimension)
Documentation
Apart from the numerous doctests in the code, some pieces of documentation are
- the tutorial worksheet posted here (a pdf version is here)
- the "tensors on free modules" reference manual (a pdf version is here); it can also be generated via the command sage -docbuild tensors_free_module html
See also this page.
Remarks
- Although developed in the context of SageManifolds (ticket:14865), the ticket is self-contained and does not depend on other parts of SageManifolds. It this respect, it can be viewed as some attempt to include a first subset of SageManifolds in Sage, with a moderate size: the ticket comprises 9634 lines of Python code (most of them being doctests), while at present (version 0.5) SageManifolds contains 33272 lines of code.
- The ticket follows Sage's Parent/Element scheme and the (new) category framework. In particular, the ticket's free module class (FiniteRankFreeModule) passes the module TestSuite.
- It turned out to be necessary to develop a new class to implement free modules of finite rank. Indeed, the category of free modules does not exist yet in Sage: only those of generic modules (Modules) or free modules with a distinguished basis (ModulesWithBasis) are available. Now, the tangent space at a given point of a manifold is a vector space without any distinguished basis (in other words, while the tangent space is isomorphic to R^{n}, there is no canonical isomorphism, each isomorphism relying on the choice of some coordinate chart). The new class, FiniteRankFreeModule, does not rely on any distinguished basis. It inherits directly from Parent, with the category set to Modules(). In particular, it does not inherit from sage.modules.module.FreeModule_generic since the latter does not conform to the new coercion model and seems to assume a distinguished basis (cf. its method basis()).
Change History (17)
comment:1 Changed 6 months ago by egourgoulhon
comment:2 Changed 6 months ago by egourgoulhon
- Description modified (diff)
comment:3 Changed 6 months ago by git
- Commit changed from f8e9c3e62c1b016a41d377a0ccdbcd665aa189dc to e34f29ec69a4595f52894724a5aec22a571c02ce
comment:4 Changed 6 months ago by jhpalmieri
Is there any connection and/or overlap between this ticket and #15726?
comment:5 Changed 5 months ago by egourgoulhon
This ticket implements tensor modules T^{(k,l)}(M) of a fixed type (k,l) over a free module M of finite rank, while #15726 implements the tensor algebra T(M), which is the direct sum of all T^{(k,l)}(M).
Another major difference is that here the base module M is a generic free module, while in #15726 M is a free module with a distinguished basis (the classes TensorModule and TensorAlgebra of #15726 inherit from class CombinatorialFreeModule, which assumes a distinguished basis). In the present ticket, an arbitrary number of bases can be introduced on the free module M, along with the change-of-basis automorphisms, and each tensor has various sets of components, one per basis.
Another difference may regard symmetry/antisymmetry handling: the tensors implemented in this ticket can have arbitrary symmetries and/or antisymmetries. The symmetries are taken into account to reduce the storage of tensor components and to optimize some computations, such as the tensor product. But maybe something similar is implemented in #15726.
comment:6 Changed 5 months ago by vbraun_spam
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 4 months ago by git
- Commit changed from e34f29ec69a4595f52894724a5aec22a571c02ce to 8b7bd605a0b41f3e428c6e67bb85d630d193065a
Branch pushed to git repo; I updated commit sha1. New commits:
8b7bd60 | Updated 'tensors on free modules' to Sage 6.2 |
comment:8 Changed 4 months ago by git
- Commit changed from 8b7bd605a0b41f3e428c6e67bb85d630d193065a to 010c31309df79e4957bb7e8daca6cd47d22b2121
Branch pushed to git repo; I updated commit sha1. New commits:
010c313 | Minor improvements; coincides with SageManifolds as of 18 May 2014 (commit d488f8f807 on github) |
comment:9 Changed 2 months ago by git
- Commit changed from 010c31309df79e4957bb7e8daca6cd47d22b2121 to 267b6b937226357d87669f7c5c8c699d99188b5a
Branch pushed to git repo; I updated commit sha1. New commits:
267b6b9 | Update to SageManifolds v0.5 |
comment:10 Changed 2 months ago by egourgoulhon
This is now part of SageManifolds v0.5 (see this post on sage-devel and http://sagemanifolds.obspm.fr/changelog.html).
comment:11 Changed 2 months ago by egourgoulhon
- Status changed from new to needs_review
comment:12 Changed 2 months ago by egourgoulhon
- Description modified (diff)
comment:13 Changed 2 months ago by egourgoulhon
- Description modified (diff)
comment:14 Changed 2 months ago by egourgoulhon
- Description modified (diff)
comment:15 Changed 2 months ago by SimonKing
- Cc SimonKing added
comment:16 Changed 6 weeks ago by vbraun_spam
- Milestone changed from sage-6.3 to sage-6.4
comment:17 Changed 4 weeks ago by git
- Commit changed from 267b6b937226357d87669f7c5c8c699d99188b5a to 8f0878d7c04e15559a76c427fac9a764fa1ecca8
Branch pushed to git repo; I updated commit sha1. New commits:
8f0878d | Added index notation for tensor contractions and symmetrizations |
Branch pushed to git repo; I updated commit sha1. New commits: