Quick question: why not use the class sage.modules.free_module.FreeModule_generic?
Longer question/comment (not directed at you, but at the general situation in Sage): is it a problem to have multiple parallel developments of free modules, one in sage.modules.free_module, one in sage.combinat.free_module, and then possibly a new one in this ticket? (It doesn't seem like a good idea to me.) Should they all be unified somehow? Are there any plans to do that? For my own uses, the version in combinat.free_module has been the most relevant, but it's not in an obvious place; there is nothing intrinsically combinatorial about it, is there? We could move it to sage.module.free_module_with_basis, for example... John On Monday, March 10, 2014 9:09:01 AM UTC-7, Eric Gourgoulhon wrote: > > Hi, > > A new enhancement, devoted to tensors on generic free modules of finite > rank, has been submitted to trac (ticket > #15916<http://trac.sagemath.org/ticket/15916>). > By *generic*, it is meant *without any distinguished basis*. > > *Description* > > This ticket implements: > > - tensor products of the type M\otimes ...\otimes M \otimes M^* > \otimes...\otimes M^* (k factors of M and l factors of M*, say) > where M is a free module of finite rank over a commutative ring R and > M^* is its dual > - 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 \RR, > within the SageManifolds <http://sagemanifolds.obspm.fr/> project. In > this context, tensors on free modules appear at two places: > - tensors on tangent spaces: > * commutative ring R = real field \RR > * free module M = tangent vector space at a given manifold's point > - tensor fields on a manifold: > * commutative ring R = the set C^\infty(N) of smooth functions N--> \RR, > where N is a parallelizable open set of the manifold > * free module M = the set X(N) of smooth vector fields on N (since N 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<http://sagemanifolds.obspm.fr/examples/html/SM_tensors_modules.html> > (the pdf version is > here<http://sagemanifolds.obspm.fr/examples/pdf/SM_tensors_modules.pdf> > ) > - the reference > manual<http://sagemanifolds.obspm.fr/doc/tensors_free_module/index.html>(the > pdf version is > here <http://sagemanifolds.obspm.fr/doc/tensors_free_modules_ref.pdf>); > it can also be generated via the command > sage -docbuild tensors_free_module html > > See also this page <http://sagemanifolds.obspm.fr/tensor_modules.html>. > > *Remarks* > > 1/ Although developed in the context of SageManifolds, 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 9391 > lines of Python code (most of them being doctests), while at present > SageManifolds contains 29240 lines of code. > > 2/ The ticket follows Sage's Parent/Element scheme and the (new) category > framework. In particular, the ticket's free module class (FiniteFreeModule) > 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 \RR^n, there is no *canonical* isomorphism, each isomorphism relying on > the choice of some coordinate chart). The new class, > FiniteFreeModule<http://sagemanifolds.obspm.fr/doc/tensors_free_module/finite_free_module.html>, > > does not rely on any distinguished basis. It inherits directly from > sage.modules.module.Module. In particular, it does not inherit from > sage.modules.module.Module_old.FreeModule_generic since the latter does not > conform to the new coercion model and seems to assume a distinguished basis > (cf. its method > basis()<http://www.sagemath.org/doc/reference/modules/sage/modules/free_module.html#sage.modules.free_module.FreeModule_generic> > ). > > Eric. > > > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
