Opened 2 years ago
Closed 21 months ago
#23429 closed enhancement (fixed)
Multivector fields and the SchoutenNijenhuis bracket
Reported by:  egourgoulhon  Owned by:  

Priority:  major  Milestone:  sage8.1 
Component:  geometry  Keywords:  multivector, SchoutenNijenhuis bracket 
Cc:  bpym, tscrim  Merged in:  
Authors:  Eric Gourgoulhon  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  18df6e6 (Commits)  Commit:  18df6e6efdeb307b3c7abdb15fbccfe191dd5901 
Dependencies:  #23207  Stopgaps: 
Description
This ticket implements multivector fields (i.e. alternating contravariant tensor fields) on differentiable manifolds, via the parent classes
MultivectorModule
: set A^{p}(M) of multivector fields of a degree p on a manifold M, considered as a module over the commutative algebra C^{k}(M) of differentiable scalar fieldsMultivectorFreeModule
: set A^{p}(M) of multivector fields of a degree p on a parallelizable manifold M, considered as a free module of rank binomial(n,p) over C^{k}(M) (where n=dimM)
and the element classes
MultivectorField
: multivector field on a differentiable manifoldMultivectorFieldParal
: multivector field on a parallelizable differentiable manifold
The classes MultivectorFreeModule
and MultivectorFieldParal
inherit from respectively ExtPowerFreeModule
and AlternatingContrTensor
, which have been introduced in #23207.
The classes VectorField
and VectorFieldParal
inherit now from the new classes MultivectorField
and MultivectorFieldParal
, since a vector field is a multivector field of degree 1.
The ticket implements the exterior product A^{p}(M) x A^{q}(M) > A^{p+q}(M) (method wedge
), as well as the interior products
 A^{p}(M) x Omega^{q}(M) > Omega^{qp}(M)
 Omega^{p}(M) x A^{q}(M) > A^{qp}(M)
for p<=q, where Omega^{p}(M) is the C^{k}(M)module of differential forms of degree p on M (method interior_product
).
The ticket also implements the SchoutenNijenhuis bracket A^{p}(M)xA^{q}(M) > A^{p+q1}(M) (method bracket
), extending the Lie bracket of vector fields.
This is a follow up of #23207 within the SageManifolds project (see the metaticket #18528 for an overview).
Change History (16)
comment:1 Changed 2 years ago by
 Branch set to public/manifolds/multivector_fields
 Commit set to 3ef506fefbd77db9a6acbcee247e3b284246f483
 Status changed from new to needs_review
comment:2 Changed 22 months ago by
 Commit changed from 3ef506fefbd77db9a6acbcee247e3b284246f483 to 08b5dae48cd9242dbaa758d03ac88b0232d93ddd
Branch pushed to git repo; I updated commit sha1. New commits:
08b5dae  Slight improvement in MultivectorModule._element_constructor_

comment:3 Changed 22 months ago by
Following what has been done in #23623 for tensor field modules, the above commit changes the potentially expensive test
if comp == 0: return self.zero()
to
if isinstance(comp, (int, Integer)) and comp == 0: return self.zero()
in _element_constructor_
of classes MultivectorModule
and MultivectorFreeModule
.
comment:4 Changed 21 months ago by
 Commit changed from 08b5dae48cd9242dbaa758d03ac88b0232d93ddd to bff445f1b111b436cdb47cc17a5611cbdc0288f4
Branch pushed to git repo; I updated commit sha1. New commits:
bff445f  Solve merge conflict in master references file

comment:5 Changed 21 months ago by
The above commit (cf. comment:4) solves a merge conflict with Sage 8.1.beta5 in the master file for references (src/doc/en/reference/references/index.rst
).
comment:6 followup: ↓ 8 Changed 21 months ago by
A few minor comments:
Typo (appears twice):
 ``other``  a multivector field, `b` say
No comma here:
 ``other``  a multivector field, of degree `p`
Could you remove a few of these extra blanklines:
+ The Lie derivative of a 2vector field is a 2vector field::
+
+ sage: ab.lie_der(a)
+ 2vector field on the 3dimensional differentiable manifold R3
+
+
+
+ """
+ def __init__(self, vector_field_module, degree, name=None,
+ latex_name=None):
It is a little easier to read
 resu_name = None ; resu_latex_name = None + resu_name = None + resu_latex_name = None
Do you need to use Sage's Set
? It is quite a bit slower than the Python set
.
For things like this:
resu._restrictions[dom] = \ dom.tensor_field_module((p,0))(rst)
it is better on 1 line and go over the 80 char/line for maintenance and readability. This is more a judgment call about the lesser of two evils.
comment:7 Changed 21 months ago by
 Commit changed from bff445f1b111b436cdb47cc17a5611cbdc0288f4 to b9670952c258c69d6350e91a8d926916ccce3399
Branch pushed to git repo; I updated commit sha1. New commits:
b967095  Minor corrections regarding multivector fields

comment:8 in reply to: ↑ 6 ; followup: ↓ 11 Changed 21 months ago by
Replying to tscrim:
Thanks for your comments; the above commit takes them into account.
Do you need to use Sage's
Set
?
Yes, because I need the method subsets
, which does not exist for Python set
.
comment:9 Changed 21 months ago by
 Commit changed from b9670952c258c69d6350e91a8d926916ccce3399 to fc4ef8e0eeecf09da501d9816b6ba401c0c2b016
Branch pushed to git repo; I updated commit sha1. New commits:
fc4ef8e  Correct typo in TensorField.__call__

comment:10 Changed 21 months ago by
I've just noticed a typo in the __call__
method of TensorField
, as well as a redundant import in vectorfield_module.py
. The above commit corrects this.
comment:11 in reply to: ↑ 8 ; followup: ↓ 13 Changed 21 months ago by
Replying to egourgoulhon:
Replying to tscrim:
Do you need to use Sage's
Set
?Yes, because I need the method
subsets
, which does not exist for Pythonset
.
I am pretty sure you can use:
sage: import itertools sage: list(itertools.combinations([1,2,3], 2)) [(1, 2), (1, 3), (2, 3)]
to iterate over all subsets of a fixed size. (There is also from sage.misc.misc import powerset
for an iterator over all subsets.) I don't even think you need to convert the subsets, which are tuples, to Python set
s.
comment:12 Changed 21 months ago by
 Commit changed from fc4ef8e0eeecf09da501d9816b6ba401c0c2b016 to 18df6e6efdeb307b3c7abdb15fbccfe191dd5901
Branch pushed to git repo; I updated commit sha1. New commits:
18df6e6  Use Python's set instead of Sage's Set in the SchoutenNijenhuis bracket

comment:13 in reply to: ↑ 11 Changed 21 months ago by
Replying to tscrim:
I am pretty sure you can use:
sage: import itertools sage: list(itertools.combinations([1,2,3], 2)) [(1, 2), (1, 3), (2, 3)]to iterate over all subsets of a fixed size. (There is also
from sage.misc.misc import powerset
for an iterator over all subsets.) I don't even think you need to convert the subsets, which are tuples, to Pythonset
s.
Thanks for the tip. The above commit implements this. I've quickly checked that this is supported by Python 3 as well. Do you confirm?
comment:14 Changed 21 months ago by
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
Yep, all looks good. Thanks.
comment:15 Changed 21 months ago by
Thank you very much for the review!
comment:16 Changed 21 months ago by
 Branch changed from public/manifolds/multivector_fields to 18df6e6efdeb307b3c7abdb15fbccfe191dd5901
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
Merge branch 'public/manifolds/ext_powers' of git://trac.sagemath.org/sage into Sage 8.0.rc1
Change the name of modules of differential forms of degree p from Lambda^p(M) to Omega^p(M)
Start the implementation of multivector fields on manifolds (work in progress)
More code regarding multivector fields on manifolds (work in progress)
Implement alternating multivector fields on manifolds (interior products in progress)
Complete implementation of interior products on manifolds
Start implementation of SchoutenNijenhuis bracket (work in progress)
Complete implementation of SchoutenNijenhuis bracket on parallelizable manifolds
Add doctests and documentation for the SchoutenNijenhuis bracket
Complete doctests and documentation for the SchoutenNijenhuis bracket