Skip to content

Tensors on free modules of finite rank #15916

@egourgoulhon

Description

@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 Ml --> 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
  • morphisms of free modules of finite rank, with coercion of endomorphisms to/from type-(1,1) tensors

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 Coo(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; it can also be generated via the command sage -docbuild reference/tensor_free_modules html

See also this page.

Remarks

  1. 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 14499 lines of Python code (most of them being doctests), while at present (version 0.6) SageManifolds contains 35157 lines of code.

  2. The ticket follows Sage's !Parent/Element pattern and the (new) category framework. In particular, the ticket's free module class (FiniteRankFreeModule) passes the module TestSuite.

  3. 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 Rn, 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 seems to assume a distinguished basis (cf. its method basis()).

CC: @simon-king-jena

Component: linear algebra

Keywords: free module, tensor, tensor product, days64

Author: Eric Gourgoulhon, Michal Bejger

Branch: 99f9ac5

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/15916

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions