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

Commit

Permalink
Merge with latest #19092 to fix doctests after the merge of #20770 in…
Browse files Browse the repository at this point in the history
… sage 7.3.beta3
  • Loading branch information
egourgoulhon committed Jun 13, 2016
2 parents 3b1b794 + 96f09ab commit 72396dd
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
17 changes: 17 additions & 0 deletions src/sage/manifolds/differentiable/vectorfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,23 @@ def add_point_plot(vector,dom,xx_list,chart_domain,chart,ambient_coords,mapping,
resu = set_axes_labels(resu, *labels)
return resu

def bracket(self, other):
"""
Return the Lie bracket ``[self, other]``.
EXAMPLES::
sage: M = Manifold(3, 'M', structure='smooth')
sage: X.<x,y,z> = M.chart()
sage: v = -X.frame()[0] + 2*X.frame()[1] - (x^2 - y)*X.frame()[2]
sage: w = (z + y) * X.frame()[1] - X.frame()[2]
sage: vw = v.bracket(w); vw
Vector field on the 3-dimensional differentiable manifold M
sage: vw.disp()
(-x^2 + y + 2) d/dy + (-y - z) d/dz
"""
return other.lie_der(self)

#******************************************************************************

class VectorFieldParal(FiniteRankFreeModuleElement, TensorFieldParal,
Expand Down
38 changes: 29 additions & 9 deletions src/sage/manifolds/differentiable/vectorfield_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
The set of vector fields along a differentiable manifold `U` with values on
a differentiable manifold `M` via a differentiable map `\Phi: U\rightarrow M`
(possibly `U=M` and `\Phi=\mathrm{Id}_M`) is a module over the algebra
`C^k(U)` of differentiable scalar fields on `U`. It is a free module iff `M` is
parallelizable. Accordingly, two classes are devoted to vector field modules:
`C^k(U)` of differentiable scalar fields on `U`. If `\Phi` is the identity map,
this module is considered a Lie algebroid under the Lie bracket `[\ ,\ ]` (cf. :wikipedia:`Lie_algebroid`). It is a free module iff `M` is parallelizable.
Accordingly, two classes are devoted to vector field modules:
- :class:`VectorFieldModule` for vector fields with values on a
generic (in practice, not parallelizable) differentiable manifold `M`
Expand All @@ -15,6 +16,7 @@
AUTHORS:
- Eric Gourgoulhon, Michal Bejger (2014-2015): initial version
- Travis Scrimshaw (2016): structure of Lie algebroid (:trac:`20771`)
REFERENCES:
Expand All @@ -29,6 +31,7 @@
#******************************************************************************
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down Expand Up @@ -73,6 +76,16 @@ class VectorFieldModule(UniqueRepresentation, Parent):
The set `\mathcal{X}(U,\Phi)` is a module over `C^k(U)`, the ring
(algebra) of differentiable scalar fields on `U` (see
:class:`~sage.manifolds.differentiable.scalarfield_algebra.DiffScalarFieldAlgebra`).
Furthermore, it is a Lie algebroid under the Lie bracket (cf.
:wikipedia:`Lie_algebroid`)
.. MATH::
[X, Y] = X \circ Y - Y \circ X
over the scalarfields if `\Phi` is the identity map. That is to say
the Lie bracket is antisymmetric, bilinear over the base field,
satisfies the Jacobi identity, and `[X, fY] = X(f) Y + f[X, Y]`.
The standard case of vector fields *on* a differentiable manifold
corresponds to `U=M` and `\Phi = \mathrm{Id}_M`; we then denote
Expand Down Expand Up @@ -894,6 +907,8 @@ class VectorFieldFreeModule(FiniteRankFreeModule):
over `C^k(U)`, the ring (algebra) of differentiable scalar fields on `U`
(see
:class:`~sage.manifolds.differentiable.scalarfield_algebra.DiffScalarFieldAlgebra`).
In fact, it carries the structure of a finite-dimensional Lie algebroid
(cf. :wikipedia:`Lie_algebroid`).
The standard case of vector fields *on* a differentiable manifold
corresponds to `U=M` and `\Phi = \mathrm{Id}_M`; we then denote
Expand Down Expand Up @@ -927,8 +942,9 @@ class VectorFieldFreeModule(FiniteRankFreeModule):
Free module X(R^2) of vector fields on the 2-dimensional differentiable
manifold R^2
sage: XM.category()
Category of finite dimensional modules over Algebra of differentiable
scalar fields on the 2-dimensional differentiable manifold R^2
Category of finite dimensional modules
over Algebra of differentiable scalar fields
on the 2-dimensional differentiable manifold R^2
sage: XM.base_ring() is M.scalar_field_algebra()
True
Expand Down Expand Up @@ -966,8 +982,9 @@ class VectorFieldFreeModule(FiniteRankFreeModule):
differentiable manifold I mapped into the 2-dimensional differentiable
manifold R^2
sage: XIM.category()
Category of finite dimensional modules over Algebra of differentiable
scalar fields on the 1-dimensional differentiable manifold I
Category of finite dimensional modules
over Algebra of differentiable scalar fields
on the 1-dimensional differentiable manifold I
The rank of the free module `\mathcal{X}(I,\Phi)` is the dimension
of the manifold `\RR^2`, namely two::
Expand Down Expand Up @@ -1046,8 +1063,9 @@ class VectorFieldFreeModule(FiniteRankFreeModule):
sage: isinstance(XM, FiniteRankFreeModule)
True
sage: XM.category()
Category of finite dimensional modules over Algebra of differentiable
scalar fields on the 1-dimensional differentiable manifold S^1
Category of finite dimensional modules
over Algebra of differentiable scalar fields
on the 1-dimensional differentiable manifold S^1
sage: XM.base_ring() is M.scalar_field_algebra()
True
Expand Down Expand Up @@ -1118,10 +1136,12 @@ def __init__(self, domain, dest_map=None):
name += "," + self._dest_map._name + ")"
latex_name += "," + self._dest_map._latex_name + r"\right)"
manif = self._ambient_domain.manifold()
cat = Modules(domain.scalar_field_algebra()).FiniteDimensional()
FiniteRankFreeModule.__init__(self, domain.scalar_field_algebra(),
manif._dim, name=name, latex_name=latex_name,
start_index=manif._sindex,
output_formatter=DiffScalarField.coord_function)
output_formatter=DiffScalarField.coord_function,
category=cat)
#
# Special treatment when self._dest_map != identity:
# bases of self are created from vector frames of the ambient domain
Expand Down

0 comments on commit 72396dd

Please sign in to comment.