Differentiable Manifolds¶
Given a non-discrete topological field
(in most applications,
or
; see however [Ser1992] for
and [Ber2008] for other fields),
a differentiable manifold over
is a topological manifold
over
equipped with an atlas whose transitions maps are of class
(i.e.
-times continuously differentiable) for a fixed positive integer
(possibly
).
is then called a
-manifold over
.
Note that
- if the mention of
is omitted, then
is assumed; - if
, any
-manifold with
is actually a
-manifold (even an analytic manifold); - if
, any
-manifold with
admits a compatible
-structure (Whitney’s smoothing theorem).
Differentiable manifolds are implemented via the class
DifferentiableManifold.
Open subsets of differentiable manifolds are also implemented via
DifferentiableManifold, since they are differentiable manifolds by
themselves.
The user interface is provided by the generic function
Manifold(), with
the argument structure set to 'differentiable' and the argument
diff_degree set to
, or the argument structure set to 'smooth'
(the default value).
Example 1: the 2-sphere as a differentiable manifold of dimension
2 over 
One starts by declaring
as a 2-dimensional differentiable manifold:
sage: M = Manifold(2, 'S^2')
sage: M
2-dimensional differentiable manifold S^2
Since the base topological field has not been specified in the argument list
of Manifold,
is assumed:
sage: M.base_field()
Real Field with 53 bits of precision
sage: dim(M)
2
By default, the created object is a smooth manifold:
sage: M.diff_degree()
+Infinity
Let us consider the complement of a point, the “North pole” say; this is an
open subset of
, which we call
:
sage: U = M.open_subset('U'); U
Open subset U of the 2-dimensional differentiable manifold S^2
A standard chart on
is provided by the stereographic projection from the
North pole to the equatorial plane:
sage: stereoN.<x,y> = U.chart(); stereoN
Chart (U, (x, y))
Thanks to the operator <x,y> on the left-hand side, the coordinates
declared in a chart (here
and
), are accessible by their names; they are
Sage’s symbolic variables:
sage: y
y
sage: type(y)
<type 'sage.symbolic.expression.Expression'>
The South pole is the point of coordinates
in the above
chart:
sage: S = U.point((0,0), chart=stereoN, name='S'); S
Point S on the 2-dimensional differentiable manifold S^2
Let us call
the open subset that is the complement of the South pole and
let us introduce on it the chart induced by the stereographic projection from
the South pole to the equatorial plane:
sage: V = M.open_subset('V'); V
Open subset V of the 2-dimensional differentiable manifold S^2
sage: stereoS.<u,v> = V.chart(); stereoS
Chart (V, (u, v))
The North pole is the point of coordinates
in this chart:
sage: N = V.point((0,0), chart=stereoS, name='N'); N
Point N on the 2-dimensional differentiable manifold S^2
To fully construct the manifold, we declare that it is the union of
and
:
sage: M.declare_union(U,V)
and we provide the transition map between the charts stereoN =
and stereoS =
, denoting by
the intersection of
and
(
is the subset of
defined by
, as well as the subset
of
defined by
):
sage: stereoN_to_S = stereoN.transition_map(stereoS,
....: [x/(x^2+y^2), y/(x^2+y^2)], intersection_name='W',
....: restrictions1= x^2+y^2!=0, restrictions2= u^2+v^2!=0)
sage: stereoN_to_S
Change of coordinates from Chart (W, (x, y)) to Chart (W, (u, v))
sage: stereoN_to_S.display()
u = x/(x^2 + y^2)
v = y/(x^2 + y^2)
We give the name W to the Python variable representing
:
sage: W = U.intersection(V)
The inverse of the transition map is computed by the method inverse():
sage: stereoN_to_S.inverse()
Change of coordinates from Chart (W, (u, v)) to Chart (W, (x, y))
sage: stereoN_to_S.inverse().display()
x = u/(u^2 + v^2)
y = v/(u^2 + v^2)
At this stage, we have four open subsets on
:
sage: M.list_of_subsets()
[2-dimensional differentiable manifold S^2,
Open subset U of the 2-dimensional differentiable manifold S^2,
Open subset V of the 2-dimensional differentiable manifold S^2,
Open subset W of the 2-dimensional differentiable manifold S^2]
is the open subset that is the complement of the two poles:
sage: N in W or S in W
False
The North pole lies in
and the South pole in
:
sage: N in V, N in U
(True, False)
sage: S in U, S in V
(True, False)
The manifold’s (user) atlas contains four charts, two of them being restrictions of charts to a smaller domain:
sage: M.atlas()
[Chart (U, (x, y)), Chart (V, (u, v)), Chart (W, (x, y)), Chart (W, (u, v))]
Let us consider the point of coordinates (1,2) in the chart stereoN:
sage: p = M.point((1,2), chart=stereoN, name='p'); p
Point p on the 2-dimensional differentiable manifold S^2
sage: p.parent()
2-dimensional differentiable manifold S^2
sage: p in W
True
The coordinates of
in the chart stereoS are computed by letting
the chart act on the point:
sage: stereoS(p)
(1/5, 2/5)
Given the definition of
, we have of course:
sage: stereoN(p)
(1, 2)
Similarly:
sage: stereoS(N)
(0, 0)
sage: stereoN(S)
(0, 0)
A differentiable scalar field on the sphere:
sage: f = M.scalar_field({stereoN: atan(x^2+y^2), stereoS: pi/2-atan(u^2+v^2)},
....: name='f')
sage: f
Scalar field f on the 2-dimensional differentiable manifold S^2
sage: f.display()
f: S^2 --> R
on U: (x, y) |--> arctan(x^2 + y^2)
on V: (u, v) |--> 1/2*pi - arctan(u^2 + v^2)
sage: f(p)
arctan(5)
sage: f(N)
1/2*pi
sage: f(S)
0
sage: f.parent()
Algebra of differentiable scalar fields on the 2-dimensional differentiable
manifold S^2
sage: f.parent().category()
Category of commutative algebras over Symbolic Ring
A differentiable manifold has a default vector frame, which, unless otherwise specified, is the coordinate frame associated with the first defined chart:
sage: M.default_frame()
Coordinate frame (U, (d/dx,d/dy))
sage: latex(M.default_frame())
\left(U, \left(\frac{\partial}{\partial x },\frac{\partial}{\partial y }\right)\right)
sage: M.default_frame() is stereoN.frame()
True
A vector field on the sphere:
sage: w = M.vector_field('w')
sage: w[stereoN.frame(), :] = [x, y]
sage: w.add_comp_by_continuation(stereoS.frame(), W, stereoS)
sage: w.display() # display in the default frame (stereoN.frame())
w = x d/dx + y d/dy
sage: w.display(stereoS.frame())
w = -u d/du - v d/dv
sage: w.parent()
Module X(S^2) of vector fields on the 2-dimensional differentiable
manifold S^2
sage: w.parent().category()
Category of modules over Algebra of differentiable scalar fields on the
2-dimensional differentiable manifold S^2
Vector fields act on scalar fields:
sage: w(f)
Scalar field w(f) on the 2-dimensional differentiable manifold S^2
sage: w(f).display()
w(f): S^2 --> R
on U: (x, y) |--> 2*(x^2 + y^2)/(x^4 + 2*x^2*y^2 + y^4 + 1)
on V: (u, v) |--> 2*(u^2 + v^2)/(u^4 + 2*u^2*v^2 + v^4 + 1)
sage: w(f) == f.differential()(w)
True
The value of the vector field at point
is a vector tangent to the sphere:
sage: w.at(p)
Tangent vector w at Point p on the 2-dimensional differentiable manifold S^2
sage: w.at(p).display()
w = d/dx + 2 d/dy
sage: w.at(p).parent()
Tangent space at Point p on the 2-dimensional differentiable manifold S^2
A 1-form on the sphere:
sage: df = f.differential() ; df
1-form df on the 2-dimensional differentiable manifold S^2
sage: df.display()
df = 2*x/(x^4 + 2*x^2*y^2 + y^4 + 1) dx + 2*y/(x^4 + 2*x^2*y^2 + y^4 + 1) dy
sage: df.display(stereoS.frame())
df = -2*u/(u^4 + 2*u^2*v^2 + v^4 + 1) du - 2*v/(u^4 + 2*u^2*v^2 + v^4 + 1) dv
sage: df.parent()
Module /\^1(S^2) of 1-forms on the 2-dimensional differentiable manifold S^2
sage: df.parent().category()
Category of modules over Algebra of differentiable scalar fields on the
2-dimensional differentiable manifold S^2
The value of the 1-form at point
is a linear form on the tangent space
at
:
sage: df.at(p)
Linear form df on the Tangent space at Point p on the 2-dimensional
differentiable manifold S^2
sage: df.at(p).display()
df = 1/13 dx + 2/13 dy
sage: df.at(p).parent()
Dual of the Tangent space at Point p on the 2-dimensional differentiable
manifold S^2
Example 2: the Riemann sphere as a differentiable manifold of
dimension 1 over 
We declare the Riemann sphere
as a 1-dimensional differentiable
manifold over
:
sage: M = Manifold(1, 'C*', field='complex'); M
1-dimensional complex manifold C*
We introduce a first open subset, which is actually
if we interpret
as the Alexandroff
one-point compactification of
:
sage: U = M.open_subset('U')
A natural chart on
is then nothing but the identity map of
, hence
we denote the associated coordinate by
:
sage: Z.<z> = U.chart()
The origin of the complex plane is the point of coordinate
:
sage: O = U.point((0,), chart=Z, name='O'); O
Point O on the 1-dimensional complex manifold C*
Another open subset of
is
:
sage: V = M.open_subset('V')
We define a chart on
such that the point at infinity is the point of
coordinate 0 in this chart:
sage: W.<w> = V.chart(); W
Chart (V, (w,))
sage: inf = M.point((0,), chart=W, name='inf', latex_name=r'\infty')
sage: inf
Point inf on the 1-dimensional complex manifold C*
To fully construct the Riemann sphere, we declare that it is the union of
and
:
sage: M.declare_union(U,V)
and we provide the transition map between the two charts as
on
on
:
sage: Z_to_W = Z.transition_map(W, 1/z, intersection_name='A',
....: restrictions1= z!=0, restrictions2= w!=0)
sage: Z_to_W
Change of coordinates from Chart (A, (z,)) to Chart (A, (w,))
sage: Z_to_W.display()
w = 1/z
sage: Z_to_W.inverse()
Change of coordinates from Chart (A, (w,)) to Chart (A, (z,))
sage: Z_to_W.inverse().display()
z = 1/w
Let consider the complex number
as a point of the Riemann sphere:
sage: i = M((I,), chart=Z, name='i'); i
Point i on the 1-dimensional complex manifold C*
Its coordinates w.r.t. the charts Z and W are:
sage: Z(i)
(I,)
sage: W(i)
(-I,)
and we have:
sage: i in U
True
sage: i in V
True
The following subsets and charts have been defined:
sage: M.list_of_subsets()
[Open subset A of the 1-dimensional complex manifold C*,
1-dimensional complex manifold C*,
Open subset U of the 1-dimensional complex manifold C*,
Open subset V of the 1-dimensional complex manifold C*]
sage: M.atlas()
[Chart (U, (z,)), Chart (V, (w,)), Chart (A, (z,)), Chart (A, (w,))]
A constant map
:
sage: f = M.constant_scalar_field(3+2*I, name='f'); f
Scalar field f on the 1-dimensional complex manifold C*
sage: f.display()
f: C* --> C
on U: z |--> 2*I + 3
on V: w |--> 2*I + 3
sage: f(O)
2*I + 3
sage: f(i)
2*I + 3
sage: f(inf)
2*I + 3
sage: f.parent()
Algebra of differentiable scalar fields on the 1-dimensional complex
manifold C*
sage: f.parent().category()
Category of commutative algebras over Symbolic Ring
A vector field on the Riemann sphere:
sage: v = M.vector_field(name='v')
sage: v[Z.frame(), 0] = z^2
sage: v.add_comp_by_continuation(W.frame(), U.intersection(V), W)
sage: v.display(Z.frame())
v = z^2 d/dz
sage: v.display(W.frame())
v = -d/dw
sage: v.parent()
Module X(C*) of vector fields on the 1-dimensional complex manifold C*
The vector field
acting on the scalar field
:
sage: v(f)
Scalar field v(f) on the 1-dimensional complex manifold C*
Since
is constant,
is vanishing:
sage: v(f).display()
v(f): C* --> C
on U: z |--> 0
on V: w |--> 0
The value of the vector field
at the point
is a vector tangent to
the Riemann sphere:
sage: v.at(inf)
Tangent vector v at Point inf on the 1-dimensional complex manifold C*
sage: v.at(inf).display()
v = -d/dw
sage: v.at(inf).parent()
Tangent space at Point inf on the 1-dimensional complex manifold C*
AUTHORS:
- Eric Gourgoulhon (2015): initial version
- Travis Scrimshaw (2016): review tweaks
REFERENCES:
- [Lee2013]
- [KN1963]
- [Huy2005]
- [Ser1992]
- [Ber2008]
- [BG1988]
-
class
sage.manifolds.differentiable.manifold.DifferentiableManifold(n, name, field, structure, ambient=None, diff_degree=+Infinity, latex_name=None, start_index=0, category=None, unique_tag=None)¶ Bases:
sage.manifolds.manifold.TopologicalManifoldDifferentiable manifold over a topological field
.Given a non-discrete topological field
(in most applications,
or
; see however [Ser1992] for
and
[Ber2008] for other fields), a differentiable manifold over
is a
topological manifold
over
equipped with an atlas whose transitions
maps are of class
(i.e.
-times continuously differentiable) for
a fixed positive integer
(possibly
).
is then called a
-manifold over
.Note that
- if the mention of
is omitted, then
is assumed; - if
, any
-manifold with
is actually a
-manifold (even an analytic manifold); - if
, any
-manifold with
admits a compatible
-structure (Whitney’s smoothing theorem).
INPUT:
n– positive integer; dimension of the manifoldname– string; name (symbol) given to the manifoldfield– field
on which the manifold is
defined; allowed values are'real'or an object of typeRealField(e.g.,RR) for a manifold over
'complex'or an object of typeComplexField(e.g.,CC) for a manifold over
- an object in the category of topological fields (see
FieldsandTopologicalSpaces) for other types of manifolds
structure– manifold structure (seeDifferentialStructureorRealDifferentialStructure)ambient– (default:None) if notNone, must be a differentiable manifold; the created object is then an open subset ofambientdiff_degree– (default:infinity) degree
of
differentiabilitylatex_name– (default:None) string; LaTeX symbol to denote the manifold; if none is provided, it is set tonamestart_index– (default: 0) integer; lower value of the range of indices used for “indexed objects” on the manifold, e.g. coordinates in a chartcategory– (default:None) to specify the category; ifNone,Manifolds(field).Differentiable()(orManifolds(field).Smooth()ifdiff_degree=infinity) is assumed (see the categoryManifolds)unique_tag– (default:None) tag used to force the construction of a new object when all the other arguments have been used previously (withoutunique_tag, theUniqueRepresentationbehavior inherited fromManifoldSubset, viaTopologicalManifold, would return the previously constructed object corresponding to these arguments).
EXAMPLES:
A 4-dimensional differentiable manifold (over
):sage: M = Manifold(4, 'M', latex_name=r'\mathcal{M}'); M 4-dimensional differentiable manifold M sage: type(M) <class 'sage.manifolds.differentiable.manifold.DifferentiableManifold_with_category'> sage: latex(M) \mathcal{M} sage: dim(M) 4
Since the base field has not been specified,
has been assumed:sage: M.base_field() Real Field with 53 bits of precision
Since the degree of differentiability has not been specified, the default value,
, has been assumed:sage: M.diff_degree() +Infinity
The input parameter
start_indexdefines the range of indices on the manifold:sage: M = Manifold(4, 'M') sage: list(M.irange()) [0, 1, 2, 3] sage: M = Manifold(4, 'M', start_index=1) sage: list(M.irange()) [1, 2, 3, 4] sage: list(Manifold(4, 'M', start_index=-2).irange()) [-2, -1, 0, 1]
A complex manifold:
sage: N = Manifold(3, 'N', field='complex'); N 3-dimensional complex manifold N
A differentiable manifold over
, the field of 5-adic numbers:sage: N = Manifold(2, 'N', field=Qp(5)); N 2-dimensional differentiable manifold N over the 5-adic Field with capped relative precision 20
A differentiable manifold is of course a topological manifold:
sage: isinstance(M, sage.manifolds.manifold.TopologicalManifold) True sage: isinstance(N, sage.manifolds.manifold.TopologicalManifold) True
A differentiable manifold is a Sage parent object, in the category of differentiable (here smooth) manifolds over a given topological field (see
Manifolds):sage: isinstance(M, Parent) True sage: M.category() Category of smooth manifolds over Real Field with 53 bits of precision sage: from sage.categories.manifolds import Manifolds sage: M.category() is Manifolds(RR).Smooth() True sage: M.category() is Manifolds(M.base_field()).Smooth() True sage: M in Manifolds(RR).Smooth() True sage: N in Manifolds(Qp(5)).Smooth() True
The corresponding Sage elements are points:
sage: X.<t, x, y, z> = M.chart() sage: p = M.an_element(); p Point on the 4-dimensional differentiable manifold M sage: p.parent() 4-dimensional differentiable manifold M sage: M.is_parent_of(p) True sage: p in M True
The manifold’s points are instances of class
ManifoldPoint:sage: isinstance(p, sage.manifolds.point.ManifoldPoint) True
Since an open subset of a differentiable manifold
is itself a
differentiable manifold, open subsets of
have all attributes of
manifolds:sage: U = M.open_subset('U', coord_def={X: t>0}); U Open subset U of the 4-dimensional differentiable manifold M sage: U.category() Join of Category of subobjects of sets and Category of smooth manifolds over Real Field with 53 bits of precision sage: U.base_field() == M.base_field() True sage: dim(U) == dim(M) True
The manifold passes all the tests of the test suite relative to its category:
sage: TestSuite(M).run()-
affine_connection(name, latex_name=None)¶ Define an affine connection on the manifold.
See
AffineConnectionfor a complete documentation.INPUT:
name– name given to the affine connectionlatex_name– (default:None) LaTeX symbol to denote the affine connection
OUTPUT:
- the affine connection, as an instance of
AffineConnection
EXAMPLE:
Affine connection on an open subset of a 3-dimensional smooth manifold:
sage: M = Manifold(3, 'M', start_index=1) sage: A = M.open_subset('A', latex_name=r'\mathcal{A}') sage: nab = A.affine_connection('nabla', r'\nabla') ; nab Affine connection nabla on the Open subset A of the 3-dimensional differentiable manifold M
See also
AffineConnectionfor more examples.
-
automorphism_field(name=None, latex_name=None, dest_map=None)¶ Define a field of automorphisms (invertible endomorphisms in each tangent space) on
self.Via the argument
dest_map, it is possible to let the field take its values on another manifold. More precisely, if
is the current manifold,
a differentiable
manifold and
a differentiable map,
a field of automorphisms along
with values on
is a
differentiable map
(
being the tensor bundle of type
over
)
such that
where
is the general linear
group of the tangent space
.The standard case of a field of automorphisms on
corresponds
to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).See also
AutomorphismFieldfor complete documentation.INPUT:
name– (default:None) name given to the fieldlatex_name– (default:None) LaTeX symbol to denote the field; if none is provided, the LaTeX symbol is set tonamedest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a field of
automorphisms on
), otherwise dest_mapmust be aDiffMap
OUTPUT:
- a
AutomorphismField(or if
is parallelizable, a
AutomorphismFieldParal) representing the defined field of automorphisms
EXAMPLES:
A field of automorphisms on a 3-dimensional manifold:
sage: M = Manifold(3,'M') sage: c_xyz.<x,y,z> = M.chart() sage: a = M.automorphism_field('A') ; a Field of tangent-space automorphisms A on the 3-dimensional differentiable manifold M sage: a.parent() General linear group of the Free module X(M) of vector fields on the 3-dimensional differentiable manifold M
See also
For more examples, see
AutomorphismField.
-
automorphism_field_group(dest_map=None)¶ Return the group of tangent-space automorphism fields defined on
self, possibly with values in another manifold, as a module over the algebra of scalar fields defined onself.If
is the current manifold and
a differentiable map
, where
is a differentiable manifold,
this method called with dest_mapbeing
returns the
general linear group
of the module
of vector fields along
with values in
.INPUT:
dest_map– (default:None) destination map, i.e. a differentiable map
, where
is the
current manifold and
a differentiable manifold;
if None, it is assumed that
and that
is the
identity map, otherwise dest_mapmust be aDiffMap
OUTPUT:
- a
AutomorphismFieldParalGroup(if
is parallelizable) or a
AutomorphismFieldGroup(if
is not parallelizable) representing

EXAMPLES:
Group of tangent-space automorphism fields of a 2-dimensional differentiable manifold:
sage: M = Manifold(2, 'M') sage: M.automorphism_field_group() General linear group of the Module X(M) of vector fields on the 2-dimensional differentiable manifold M sage: M.automorphism_field_group().category() Category of groups
See also
For more examples, see
AutomorphismFieldParalGroupandAutomorphismFieldGroup.
-
change_of_frame(frame1, frame2)¶ Return a change of vector frames defined on
self.INPUT:
frame1– vector frame 1frame2– vector frame 2
OUTPUT:
- a
AutomorphismFieldrepresenting, at each point, the vector space automorphism
that relates frame 1,
say, to frame 2,
say,
according to 
EXAMPLES:
Change of vector frames induced by a change of coordinates:
sage: M = Manifold(2, 'M') sage: c_xy.<x,y> = M.chart() sage: c_uv.<u,v> = M.chart() sage: c_xy.transition_map(c_uv, (x+y, x-y)) Change of coordinates from Chart (M, (x, y)) to Chart (M, (u, v)) sage: M.change_of_frame(c_xy.frame(), c_uv.frame()) Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M sage: M.change_of_frame(c_xy.frame(), c_uv.frame())[:] [ 1/2 1/2] [ 1/2 -1/2] sage: M.change_of_frame(c_uv.frame(), c_xy.frame()) Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M sage: M.change_of_frame(c_uv.frame(), c_xy.frame())[:] [ 1 1] [ 1 -1] sage: M.change_of_frame(c_uv.frame(), c_xy.frame()) == \ ....: M.change_of_frame(c_xy.frame(), c_uv.frame()).inverse() True
In the present example, the manifold
is parallelizable, so
that the module
of vector fields on
is free. A change
of frame on
is then identical to a change of basis in
:sage: XM = M.vector_field_module() ; XM Free module X(M) of vector fields on the 2-dimensional differentiable manifold M sage: XM.print_bases() Bases defined on the Free module X(M) of vector fields on the 2-dimensional differentiable manifold M: - (M, (d/dx,d/dy)) (default basis) - (M, (d/du,d/dv)) sage: XM.change_of_basis(c_xy.frame(), c_uv.frame()) Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M sage: M.change_of_frame(c_xy.frame(), c_uv.frame()) is \ ....: XM.change_of_basis(c_xy.frame(), c_uv.frame()) True
-
changes_of_frame()¶ Return all the changes of vector frames defined on
self.OUTPUT:
- dictionary of fields of tangent-space automorphisms representing the changes of frames, the keys being the pair of frames
EXAMPLES:
Let us consider a first vector frame on a 2-dimensional differentiable manifold:
sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: e = X.frame(); e Coordinate frame (M, (d/dx,d/dy))
At this stage, the dictionary of changes of frame is empty:
sage: M.changes_of_frame() {}
We introduce a second frame on the manifold, relating it to frame
eby a field of tangent space automorphisms:sage: a = M.automorphism_field(name='a') sage: a[:] = [[-y, x], [1, 2]] sage: f = e.new_frame(a, 'f'); f Vector frame (M, (f_0,f_1))
Then we have:
sage: M.changes_of_frame() # random (dictionary output) {(Coordinate frame (M, (d/dx,d/dy)), Vector frame (M, (f_0,f_1))): Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M, (Vector frame (M, (f_0,f_1)), Coordinate frame (M, (d/dx,d/dy))): Field of tangent-space automorphisms on the 2-dimensional differentiable manifold M}
Some checks:
sage: M.changes_of_frame()[(e,f)] == a True sage: M.changes_of_frame()[(f,e)] == a^(-1) True
-
coframes()¶ Return the list of coframes defined on open subsets of
self.OUTPUT:
- list of coframes defined on open subsets of
self
EXAMPLES:
Coframes on subsets of
:sage: M = Manifold(2, 'R^2') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2 sage: M.coframes() [Coordinate coframe (R^2, (dx,dy))] sage: e = M.vector_frame('e') sage: M.coframes() [Coordinate coframe (R^2, (dx,dy)), Coframe (R^2, (e^0,e^1))] sage: U = M.open_subset('U', coord_def={c_cart: x^2+y^2<1}) # unit disk sage: U.coframes() [Coordinate coframe (U, (dx,dy))] sage: e.restrict(U) Vector frame (U, (e_0,e_1)) sage: U.coframes() [Coordinate coframe (U, (dx,dy)), Coframe (U, (e^0,e^1))] sage: M.coframes() [Coordinate coframe (R^2, (dx,dy)), Coframe (R^2, (e^0,e^1)), Coordinate coframe (U, (dx,dy)), Coframe (U, (e^0,e^1))]
- list of coframes defined on open subsets of
-
curve(coord_expression, param, chart=None, name=None, latex_name=None)¶ Define a differentiable curve in the manifold.
See also
DifferentiableCurvefor details.INPUT:
coord_expression– either- (i) a dictionary whose keys are charts on the manifold and values the coordinate expressions (as lists or tuples) of the curve in the given chart
- (ii) a single coordinate expression in a given chart on the
manifold, the latter being provided by the argument
chart
in both cases, if the dimension of the manifold is 1, a single coordinate expression can be passed instead of a tuple with a single element
param– a tuple of the type(t, t_min, t_max), wheretis the curve parameter used incoord_expression;t_minis its minimal value;t_maxits maximal value;
if
t_min=-Infinityandt_max=+Infinity, they can be omitted andtcan be passed forparaminstead of the tuple(t, t_min, t_max)chart– (default:None) chart on the manifold used for case (ii) above; ifNonethe default chart of the manifold is assumedname– (default:None) string; symbol given to the curvelatex_name– (default:None) string; LaTeX symbol to denote the curve; if none is provided,namewill be used
OUTPUT:
EXAMPLES:
The lemniscate of Gerono in the 2-dimensional Euclidean plane:
sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: R.<t> = RealLine() sage: c = M.curve([sin(t), sin(2*t)/2], (t, 0, 2*pi), name='c') ; c Curve c in the 2-dimensional differentiable manifold M
The same definition with the coordinate expression passed as a dictionary:
sage: c = M.curve({X: [sin(t), sin(2*t)/2]}, (t, 0, 2*pi), name='c') ; c Curve c in the 2-dimensional differentiable manifold M
An example of definition with
t_minandt_maxomitted: a helix in
:sage: R3 = Manifold(3, 'R^3') sage: X.<x,y,z> = R3.chart() sage: c = R3.curve([cos(t), sin(t), t], t, name='c') ; c Curve c in the 3-dimensional differentiable manifold R^3 sage: c.domain() # check that t is unbounded Real number line R
See also
DifferentiableCurvefor more examples, including plots.
-
default_frame()¶ Return the default vector frame defined on
self.By vector frame, it is meant a field on the manifold that provides, at each point
, a vector basis of the tangent space at
.Unless changed via
set_default_frame(), the default frame is the first one defined on the manifold, usually implicitely as the coordinate basis associated with the first chart defined on the manifold.OUTPUT:
- a
VectorFramerepresenting the default vector frame
EXAMPLES:
The default vector frame is often the coordinate frame associated with the first chart defined on the manifold:
sage: M = Manifold(2, 'M') sage: c_xy.<x,y> = M.chart() sage: M.default_frame() Coordinate frame (M, (d/dx,d/dy))
- a
-
diff_degree()¶ Return the manifold’s degree of differentiability.
The degree of differentiability is the integer
(possibly
) such that the manifold is a
-manifold over its base
field.EXAMPLES:
sage: M = Manifold(2, 'M') sage: M.diff_degree() +Infinity sage: M = Manifold(2, 'M', structure='differentiable', diff_degree=3) sage: M.diff_degree() 3
-
diff_form(degree, name=None, latex_name=None, dest_map=None)¶ Define a differential form on
self.Via the argument
dest_map, it is possible to let the differential form take its values on another manifold. More precisely, if
is the current manifold,
a differentiable
manifold,
a differentiable map and
a non-negative integer, a differential form of degree
(or
-form) along
with values on
is a differentiable map
(
being the tensor bundle of type
over
)
such that
where
is the
-th exterior power
of the dual of the tangent space
.The standard case of a differential form on
corresponds
to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).For
, one can use the method
one_form()instead.See also
DiffFormfor complete documentation.INPUT:
degree– the degree
of the differential form (i.e. its
tensor rank)name– (default:None) name given to the differential formlatex_name– (default:None) LaTeX symbol to denote the differential form; if none is provided, the LaTeX symbol is set tonamedest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a differential
form on
), otherwise dest_mapmust be aDiffMap
OUTPUT:
- the
-form as a
DiffForm(or if
is parallelizable, a
DiffFormParal)
EXAMPLES:
A 2-form on a open subset of a 4-dimensional differentiable manifold:
sage: M = Manifold(4, 'M') sage: A = M.open_subset('A', latex_name=r'\mathcal{A}'); A Open subset A of the 4-dimensional differentiable manifold M sage: c_xyzt.<x,y,z,t> = A.chart() sage: f = A.diff_form(2, 'F'); f 2-form F on the Open subset A of the 4-dimensional differentiable manifold M
See the documentation of class
DiffFormfor more examples.
-
diff_form_module(degree, dest_map=None)¶ Return the set of differential forms of a given degree defined on
self, possibly with values in another manifold, as a module over the algebra of scalar fields defined onself.See also
DiffFormModulefor complete documentation.INPUT:
degree– positive integer; the degree
of the
differential formsdest_map– (default:None) destination map, i.e. a differentiable map
, where
is the
current manifold and
a differentiable manifold;
if None, it is assumed that
and that
is the
identity map (case of differential forms on
), otherwise
dest_mapmust be aDiffMap
OUTPUT:
- a
DiffFormModule(or if
is parallelizable, a
DiffFormFreeModule) representing the module
of
-forms on
taking values on 
EXAMPLES:
Module of 2-forms on a 3-dimensional parallelizable manifold:
sage: M = Manifold(3, 'M') sage: X.<x,y,z> = M.chart() sage: M.diff_form_module(2) Free module /\^2(M) of 2-forms on the 3-dimensional differentiable manifold M sage: M.diff_form_module(2).category() Category of finite dimensional modules over Algebra of differentiable scalar fields on the 3-dimensional differentiable manifold M sage: M.diff_form_module(2).base_ring() Algebra of differentiable scalar fields on the 3-dimensional differentiable manifold M sage: M.diff_form_module(2).rank() 3
The outcome is cached:
sage: M.diff_form_module(2) is M.diff_form_module(2) True
-
diff_map(codomain, coord_functions=None, chart1=None, chart2=None, name=None, latex_name=None)¶ Define a differentiable map between the current differentiable manifold and a differentiable manifold over the same topological field.
See
DiffMapfor a complete documentation.INPUT:
codomain– the map codomain (a differentiable manifold over the same topological field as the current differentiable manifold)coord_functions– (default:None) if notNone, must be either- (i) a dictionary of
the coordinate expressions (as lists (or tuples) of the
coordinates of the image expressed in terms of the coordinates of
the considered point) with the pairs of charts (chart1, chart2)
as keys (chart1 being a chart on the current manifold and chart2 a
chart on
codomain) - (ii) a single coordinate expression in a given pair of charts, the
latter being provided by the arguments
chart1andchart2
In both cases, if the dimension of the arrival manifold is 1, a single coordinate expression can be passed instead of a tuple with a single element
- (i) a dictionary of
the coordinate expressions (as lists (or tuples) of the
coordinates of the image expressed in terms of the coordinates of
the considered point) with the pairs of charts (chart1, chart2)
as keys (chart1 being a chart on the current manifold and chart2 a
chart on
chart1– (default:None; used only in case (ii) above) chart on the current manifold defining the start coordinates involved incoord_functionsfor case (ii); if none is provided, the coordinates are assumed to refer to the manifold’s default chartchart2– (default:None; used only in case (ii) above) chart oncodomaindefining the arrival coordinates involved incoord_functionsfor case (ii); if none is provided, the coordinates are assumed to refer to the default chart ofcodomainname– (default:None) name given to the differentiable maplatex_name– (default:None) LaTeX symbol to denote the differentiable map; if none is provided, the LaTeX symbol is set toname
OUTPUT:
- the differentiable map, as an instance of
DiffMap
EXAMPLES:
A differentiable map between an open subset of
covered by regular
spherical coordinates and
:sage: M = Manifold(2, 'S^2') sage: U = M.open_subset('U') sage: c_spher.<th,ph> = U.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi') sage: N = Manifold(3, 'R^3', r'\RR^3') sage: c_cart.<x,y,z> = N.chart() # Cartesian coord. on R^3 sage: Phi = U.diff_map(N, (sin(th)*cos(ph), sin(th)*sin(ph), cos(th)), ....: name='Phi', latex_name=r'\Phi') sage: Phi Differentiable map Phi from the Open subset U of the 2-dimensional differentiable manifold S^2 to the 3-dimensional differentiable manifold R^3
The same definition, but with a dictionary with pairs of charts as keys (case (i) above):
sage: Phi1 = U.diff_map(N, ....: {(c_spher, c_cart): (sin(th)*cos(ph), sin(th)*sin(ph), ....: cos(th))}, name='Phi', latex_name=r'\Phi') sage: Phi1 == Phi True
The differentiable map acting on a point:
sage: p = U.point((pi/2, pi)) ; p Point on the 2-dimensional differentiable manifold S^2 sage: Phi(p) Point on the 3-dimensional differentiable manifold R^3 sage: Phi(p).coord(c_cart) (-1, 0, 0) sage: Phi1(p) == Phi(p) True
See the documentation of class
DiffMapfor more examples.
-
diff_mapping(codomain, coord_functions=None, chart1=None, chart2=None, name=None, latex_name=None)¶ Deprecated.
Use
diff_map()instead.EXAMPLE:
sage: M = Manifold(2, 'M'); X.<x,y> = M.chart() sage: N = Manifold(2, 'N'); Y.<u,v> = N.chart() sage: Phi = M.diff_mapping(N, {(X,Y): [x+y, x-y]}, name='Phi') doctest:...: DeprecationWarning: Use diff_map() instead. See http://trac.sagemath.org/18783 for details. sage: Phi Differentiable map Phi from the 2-dimensional differentiable manifold M to the 2-dimensional differentiable manifold N
-
diffeomorphism(codomain, coord_functions=None, chart1=None, chart2=None, name=None, latex_name=None)¶ Define a diffeomorphism between the current manifold and another one.
See
DiffMapfor a complete documentation.INPUT:
codomain– codomain of the diffeomorphism (the arrival manifold or some subset of it)coord_functions– (default:None) if notNone, must be either- (i) a dictionary of
the coordinate expressions (as lists (or tuples) of the
coordinates of the image expressed in terms of the coordinates of
the considered point) with the pairs of charts (chart1, chart2)
as keys (chart1 being a chart on the current manifold and chart2
a chart on
codomain) - (ii) a single coordinate expression in a given pair of charts, the
latter being provided by the arguments
chart1andchart2
In both cases, if the dimension of the arrival manifold is 1, a single coordinate expression can be passed instead of a tuple with a single element
- (i) a dictionary of
the coordinate expressions (as lists (or tuples) of the
coordinates of the image expressed in terms of the coordinates of
the considered point) with the pairs of charts (chart1, chart2)
as keys (chart1 being a chart on the current manifold and chart2
a chart on
chart1– (default:None; used only in case (ii) above) chart on the current manifold defining the start coordinates involved incoord_functionsfor case (ii); if none is provided, the coordinates are assumed to refer to the manifold’s default chartchart2– (default:None; used only in case (ii) above) chart oncodomaindefining the arrival coordinates involved incoord_functionsfor case (ii); if none is provided, the coordinates are assumed to refer to the default chart ofcodomainname– (default:None) name given to the diffeomorphismlatex_name– (default:None) LaTeX symbol to denote the diffeomorphism; if none is provided, the LaTeX symbol is set toname
OUTPUT:
- the diffeomorphism, as an instance of
DiffMap
EXAMPLE:
Diffeomorphism between the open unit disk in
and
:sage: M = Manifold(2, 'M') # the open unit disk sage: forget() # for doctests only sage: c_xy.<x,y> = M.chart('x:(-1,1) y:(-1,1)') # Cartesian coord on M sage: c_xy.add_restrictions(x^2+y^2<1) sage: N = Manifold(2, 'N') # R^2 sage: c_XY.<X,Y> = N.chart() # canonical coordinates on R^2 sage: Phi = M.diffeomorphism(N, [x/sqrt(1-x^2-y^2), y/sqrt(1-x^2-y^2)], ....: name='Phi', latex_name=r'\Phi') sage: Phi Diffeomorphism Phi from the 2-dimensional differentiable manifold M to the 2-dimensional differentiable manifold N sage: Phi.display() Phi: M --> N (x, y) |--> (X, Y) = (x/sqrt(-x^2 - y^2 + 1), y/sqrt(-x^2 - y^2 + 1))
The inverse diffeomorphism:
sage: Phi^(-1) Diffeomorphism Phi^(-1) from the 2-dimensional differentiable manifold N to the 2-dimensional differentiable manifold M sage: (Phi^(-1)).display() Phi^(-1): N --> M (X, Y) |--> (x, y) = (X/sqrt(X^2 + Y^2 + 1), Y/sqrt(X^2 + Y^2 + 1))
See the documentation of class
DiffMapfor more examples.
-
frames()¶ Return the list of vector frames defined on open subsets of
self.OUTPUT:
- list of vector frames defined on open subsets of
self
EXAMPLES:
Vector frames on subsets of
:sage: M = Manifold(2, 'R^2') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2 sage: M.frames() [Coordinate frame (R^2, (d/dx,d/dy))] sage: e = M.vector_frame('e') sage: M.frames() [Coordinate frame (R^2, (d/dx,d/dy)), Vector frame (R^2, (e_0,e_1))] sage: U = M.open_subset('U', coord_def={c_cart: x^2+y^2<1}) # unit disk sage: U.frames() [Coordinate frame (U, (d/dx,d/dy))] sage: M.frames() [Coordinate frame (R^2, (d/dx,d/dy)), Vector frame (R^2, (e_0,e_1)), Coordinate frame (U, (d/dx,d/dy))]
- list of vector frames defined on open subsets of
-
is_manifestly_parallelizable()¶ Return
Trueifselfis known to be a parallelizable andFalseotherwise.If
Falseis returned, either the manifold is not parallelizable or no vector frame has been defined on it yet.EXAMPLES:
A just created manifold is a priori not manifestly parallelizable:
sage: M = Manifold(2, 'M') sage: M.is_manifestly_parallelizable() False
Defining a vector frame on it makes it parallelizable:
sage: e = M.vector_frame('e') sage: M.is_manifestly_parallelizable() True
Defining a coordinate chart on the whole manifold also makes it parallelizable:
sage: N = Manifold(4, 'N') sage: X.<t,x,y,z> = N.chart() sage: N.is_manifestly_parallelizable() True
-
lorentz_metric(name, signature='positive', latex_name=None, dest_map=None)¶ Deprecated.
Use
lorentzian_metric()instead.EXAMPLE:
sage: M = Manifold(4, 'M') sage: g = M.lorentz_metric('g') doctest:...: DeprecationWarning: Use lorentzian_metric() instead. See http://trac.sagemath.org/19209 for details. sage: g Lorentzian metric g on the 4-dimensional differentiable manifold M
-
lorentzian_metric(name, signature='positive', latex_name=None, dest_map=None)¶ Define a Lorentzian metric on the manifold.
A Lorentzian metric is a field of nondegenerate symmetric bilinear forms acting in the tangent spaces, with signature
or
.See
PseudoRiemannianMetricfor a complete documentation.INPUT:
name– name given to the metricsignature– (default: ‘positive’) sign of the metric signature:- if set to ‘positive’, the signature is n-2, where n is the
manifold’s dimension, i.e.

- if set to ‘negative’, the signature is -n+2, i.e.

- if set to ‘positive’, the signature is n-2, where n is the
manifold’s dimension, i.e.
latex_name– (default:None) LaTeX symbol to denote the metric; ifNone, it is formed fromnamedest_map– (default:None) instance of classDiffMaprepresenting the destination map
, where
is the current manifold; if None, the identity map is assumed (case of a metric field on
)
OUTPUT:
- instance of
PseudoRiemannianMetricrepresenting the defined Lorentzian metric.
EXAMPLE:
Metric of Minkowski spacetime:
sage: M = Manifold(4, 'M') sage: X.<t,x,y,z> = M.chart() sage: g = M.lorentzian_metric('g'); g Lorentzian metric g on the 4-dimensional differentiable manifold M sage: g[0,0], g[1,1], g[2,2], g[3,3] = -1, 1, 1, 1 sage: g.display() g = -dt*dt + dx*dx + dy*dy + dz*dz sage: g.signature() 2
Choice of a negative signature:
sage: g = M.lorentzian_metric('g', signature='negative'); g Lorentzian metric g on the 4-dimensional differentiable manifold M sage: g[0,0], g[1,1], g[2,2], g[3,3] = 1, -1, -1, -1 sage: g.display() g = dt*dt - dx*dx - dy*dy - dz*dz sage: g.signature() -2
-
metric(name, signature=None, latex_name=None, dest_map=None)¶ Define a pseudo-Riemannian metric on the manifold.
A pseudo-Riemannian metric is a field of nondegenerate symmetric bilinear forms acting in the tangent spaces. See
PseudoRiemannianMetricfor a complete documentation.INPUT:
name– name given to the metricsignature– (default:None) signature
of the metric as a
single integer:
, where
(resp.
) is the
number of positive terms (resp. number of negative terms) in any
diagonal writing of the metric components; if signatureis not provided,
is set to the manifold’s dimension (Riemannian
signature)latex_name– (default:None) LaTeX symbol to denote the metric; ifNone, it is formed fromnamedest_map– (default:None) instance of classDiffMaprepresenting the destination map
, where
is the current manifold; if None, the identity map is assumed (case of a metric field on
)
OUTPUT:
- instance of
PseudoRiemannianMetricrepresenting the defined pseudo-Riemannian metric.
EXAMPLE:
Metric on a 3-dimensional manifold:
sage: M = Manifold(3, 'M', start_index=1) sage: c_xyz.<x,y,z> = M.chart() sage: g = M.metric('g'); g Riemannian metric g on the 3-dimensional differentiable manifold M
See also
PseudoRiemannianMetricfor more examples.
-
one_form(name=None, latex_name=None, dest_map=None)¶ Define a 1-form on the manifold.
Via the argument
dest_map, it is possible to let the 1-form take its values on another manifold. More precisely, if
is the current manifold,
a differentiable
manifold and
a differentiable map,
a 1-form along
with values on
is a differentiable map
(
being the cotangent bundle of
) such that
where
is the dual of the tangent space
.The standard case of a 1-form on
corresponds to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).See also
DiffFormfor complete documentation.INPUT:
name– (default:None) name given to the 1-formlatex_name– (default:None) LaTeX symbol to denote the 1-form; if none is provided, the LaTeX symbol is set tonamedest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a 1-form on
),
otherwise dest_mapmust be aDiffMap
OUTPUT:
- the 1-form as a
DiffForm(or if
is parallelizable, a
DiffFormParal)
EXAMPLES:
A 1-form on a 3-dimensional open subset:
sage: M = Manifold(3, 'M') sage: A = M.open_subset('A', latex_name=r'\mathcal{A}') sage: X.<x,y,z> = A.chart() sage: om = A.one_form('omega', r'\omega') ; om 1-form omega on the Open subset A of the 3-dimensional differentiable manifold M sage: om.parent() Free module /\^1(A) of 1-forms on the Open subset A of the 3-dimensional differentiable manifold M
See also
For more examples, see
DiffForm.
-
open_subset(name, latex_name=None, coord_def={})¶ Create an open subset of the manifold.
An open subset is a set that is (i) included in the manifold and (ii) open with respect to the manifold’s topology. It is a differentiable manifold by itself. Hence the returned object is an instance of
DifferentiableManifold.INPUT:
name– name given to the open subsetlatex_name– (default:None) LaTeX symbol to denote the subset; if none is provided, it is set tonamecoord_def– (default: {}) definition of the subset in terms of coordinates;coord_defmust a be dictionary with keys charts in the manifold’s atlas and values the symbolic expressions formed by the coordinates to define the subset.
OUTPUT:
- the open subset, as an instance of
DifferentiableManifold
EXAMPLES:
Creating an open subset of a differentiable manifold:
sage: M = Manifold(2, 'M') sage: A = M.open_subset('A'); A Open subset A of the 2-dimensional differentiable manifold M
As an open subset of a differentiable manifold,
Ais itself a differentiable manifold, on the same topological field and of the same dimension asM:sage: A.category() Join of Category of subobjects of sets and Category of smooth manifolds over Real Field with 53 bits of precision sage: A.base_field() == M.base_field() True sage: dim(A) == dim(M) True
Creating an open subset of
A:sage: B = A.open_subset('B'); B Open subset B of the 2-dimensional differentiable manifold M
We have then:
sage: A.list_of_subsets() [Open subset A of the 2-dimensional differentiable manifold M, Open subset B of the 2-dimensional differentiable manifold M] sage: B.is_subset(A) True sage: B.is_subset(M) True
Defining an open subset by some coordinate restrictions: the open unit disk in of the Euclidean plane:
sage: X.<x,y> = M.chart() # Cartesian coordinates on M sage: U = M.open_subset('U', coord_def={X: x^2+y^2<1}); U Open subset U of the 2-dimensional differentiable manifold M
Since the argument
coord_defhas been set,Uis automatically endowed with a chart, which is the restriction ofXtoU:sage: U.atlas() [Chart (U, (x, y))] sage: U.default_chart() Chart (U, (x, y)) sage: U.default_chart() is X.restrict(U) True
An point in
U:sage: p = U.an_element(); p Point on the 2-dimensional differentiable manifold M sage: X(p) # the coordinates (x,y) of p (0, 0) sage: p in U True
Checking whether various points, defined by their coordinates w.r.t. chart
X, are inU:sage: M((0,1/2)) in U True sage: M((0,1)) in U False sage: M((1/2,1)) in U False sage: M((-1/2,1/3)) in U True
-
riemann_metric(name, latex_name=None, dest_map=None)¶ Deprecated.
Use
riemannian_metric()instead.EXAMPLE:
sage: M = Manifold(3, 'M') sage: g = M.riemann_metric('g') doctest:...: DeprecationWarning: Use riemannian_metric() instead. See http://trac.sagemath.org/19209 for details. sage: g Riemannian metric g on the 3-dimensional differentiable manifold M
-
riemannian_metric(name, latex_name=None, dest_map=None)¶ Define a Riemannian metric on the manifold.
A Riemannian metric is a field of positive definite symmetric bilinear forms acting in the tangent spaces.
See
PseudoRiemannianMetricfor a complete documentation.INPUT:
name– name given to the metriclatex_name– (default:None) LaTeX symbol to denote the metric; ifNone, it is formed fromnamedest_map– (default:None) instance of classDiffMaprepresenting the destination map
, where
is the current manifold; if None, the identity map is assumed (case of a metric field on
)
OUTPUT:
- instance of
PseudoRiemannianMetricrepresenting the defined Riemannian metric.
EXAMPLE:
Metric of the hyperbolic plane
:sage: H2 = Manifold(2, 'H^2', start_index=1) sage: X.<x,y> = H2.chart('x y:(0,+oo)') # Poincare half-plane coord. sage: g = H2.riemannian_metric('g') sage: g[1,1], g[2,2] = 1/y^2, 1/y^2 sage: g Riemannian metric g on the 2-dimensional differentiable manifold H^2 sage: g.display() g = y^(-2) dx*dx + y^(-2) dy*dy sage: g.signature() 2
See also
PseudoRiemannianMetricfor more examples.
-
set_change_of_frame(frame1, frame2, change_of_frame, compute_inverse=True)¶ Relate two vector frames by an automorphism.
This updates the internal dictionary
self._frame_changes.INPUT:
frame1– frame 1, denoted
belowframe2– frame 2, denoted
belowchange_of_frame– instance of classAutomorphismFieldParaldescribing the automorphism
that relates the basis
to
the basis
according to 
compute_inverse(default: True) – if set to True, the inverse automorphism is computed and the change from basis
to
is set to it in the internal dictionary self._frame_changes
EXAMPLES:
Connecting two vector frames on a 2-dimensional manifold:
sage: M = Manifold(2, 'M') sage: c_xy.<x,y> = M.chart() sage: e = M.vector_frame('e') sage: f = M.vector_frame('f') sage: a = M.automorphism_field() sage: a[e,:] = [[1,2],[0,3]] sage: M.set_change_of_frame(e, f, a) sage: f[0].display(e) f_0 = e_0 sage: f[1].display(e) f_1 = 2 e_0 + 3 e_1 sage: e[0].display(f) e_0 = f_0 sage: e[1].display(f) e_1 = -2/3 f_0 + 1/3 f_1 sage: M.change_of_frame(e,f)[e,:] [1 2] [0 3]
-
set_default_frame(frame)¶ Changing the default vector frame on
self.INPUT:
frame–VectorFramea vector frame defined on the manifold
EXAMPLES:
Changing the default frame on a 2-dimensional manifold:
sage: M = Manifold(2, 'M') sage: c_xy.<x,y> = M.chart() sage: e = M.vector_frame('e') sage: M.default_frame() Coordinate frame (M, (d/dx,d/dy)) sage: M.set_default_frame(e) sage: M.default_frame() Vector frame (M, (e_0,e_1))
-
sym_bilin_form_field(name=None, latex_name=None, dest_map=None)¶ Define a field of symmetric bilinear forms on
self.Via the argument
dest_map, it is possible to let the field take its values on another manifold. More precisely, if
is
the current manifold,
a differentiable manifold and
a differentiable map, a field of
symmetric bilinear forms along
with values on
is a
differentiable map
(
being the tensor bundle of type
over
)
such that
where
is the space of symmetric bilinear forms on
the tangent space
.The standard case of fields of symmetric bilinear forms on
corresponds to
and
. Other common
cases are
being an immersion and
being a curve in
(
is then an open interval of
).INPUT:
name– (default:None) name given to the fieldlatex_name– (default:None) LaTeX symbol to denote the field; if none is provided, the LaTeX symbol is set tonamedest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a field on
),
otherwise dest_mapmust be an instance of instance of classDiffMap
OUTPUT:
- a
TensorField(or if
is parallelizable, a
TensorFieldParal) of tensor type
and symmetric representing the defined
field of symmetric bilinear forms
EXAMPLES:
A field of symmetric bilinear forms on a 3-dimensional manifold:
sage: M = Manifold(3, 'M') sage: c_xyz.<x,y,z> = M.chart() sage: t = M.sym_bilin_form_field('T'); t Field of symmetric bilinear forms T on the 3-dimensional differentiable manifold M
Such a object is a tensor field of rank 2 and type
:sage: t.parent() Free module T^(0,2)(M) of type-(0,2) tensors fields on the 3-dimensional differentiable manifold M sage: t.tensor_rank() 2 sage: t.tensor_type() (0, 2)
The LaTeX symbol is deduced from the name or can be specified when creating the object:
sage: latex(t) T sage: om = M.sym_bilin_form_field('Omega', r'\Omega') sage: latex(om) \Omega
Components with respect to some vector frame:
sage: e = M.vector_frame('e') ; M.set_default_frame(e) sage: t.set_comp() Fully symmetric 2-indices components w.r.t. Vector frame (M, (e_0,e_1,e_2)) sage: type(t.comp()) <class 'sage.tensor.modules.comp.CompFullySym'>
For the default frame, the components are accessed with the square brackets:
sage: t[0,0], t[0,1], t[0,2] = (1, 2, 3) sage: t[1,1], t[1,2] = (4, 5) sage: t[2,2] = 6
The other components are deduced by symmetry:
sage: t[1,0], t[2,0], t[2,1] (2, 3, 5) sage: t[:] [1 2 3] [2 4 5] [3 5 6]
A symmetric bilinear form acts on vector pairs:
sage: M = Manifold(2, 'M') sage: c_xy.<x,y> = M.chart() sage: t = M.sym_bilin_form_field('T') sage: t[0,0], t[0,1], t[1,1] = (-1, x, y*x) sage: v1 = M.vector_field('V_1') sage: v1[:] = (y,x) sage: v2 = M.vector_field('V_2') sage: v2[:] = (x+y,2) sage: s = t(v1,v2) ; s Scalar field T(V_1,V_2) on the 2-dimensional differentiable manifold M sage: s.expr() x^3 + (3*x^2 + x)*y - y^2 sage: s.expr() - t[0,0]*v1[0]*v2[0] - \ ....: t[0,1]*(v1[0]*v2[1]+v1[1]*v2[0]) - t[1,1]*v1[1]*v2[1] 0 sage: latex(s) T\left(V_1,V_2\right)
Adding two symmetric bilinear forms results in another symmetric bilinear form:
sage: a = M.sym_bilin_form_field() sage: a[0,0], a[0,1], a[1,1] = (1,2,3) sage: b = M.sym_bilin_form_field() sage: b[0,0], b[0,1], b[1,1] = (-1,4,5) sage: s = a + b ; s Field of symmetric bilinear forms on the 2-dimensional differentiable manifold M sage: s[:] [0 6] [6 8]
But adding a symmetric bilinear from with a non-symmetric bilinear form results in a generic type
tensor:sage: c = M.tensor_field(0,2) sage: c[:] = [[-2, -3], [1,7]] sage: s1 = a + c ; s1 Tensor field of type (0,2) on the 2-dimensional differentiable manifold M sage: s1[:] [-1 -1] [ 3 10] sage: s2 = c + a ; s2 Tensor field of type (0,2) on the 2-dimensional differentiable manifold M sage: s2[:] [-1 -1] [ 3 10]
-
tangent_identity_field(name='Id', latex_name=None, dest_map=None)¶ Return the field of identity maps in the tangent spaces on
self.Via the argument
dest_map, it is possible to let the field take its values on another manifold. More precisely, if
is the current manifold,
a differentiable
manifold and
a differentiable map,
a field of identity maps along
with values on
is a
differentiable map
(
being the tensor bundle of type
over
) such
that
where
is the identity map of the
tangent space
.The standard case of a field of identity maps on
corresponds
to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).INPUT:
name– (string; default: ‘Id’) name given to the field of identity mapslatex_name– (string; default:None) LaTeX symbol to denote the field of identity map; if none is provided, the LaTeX symbol is set to ‘mathrm{Id}’ ifnameis ‘Id’ and tonameotherwisedest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a field of identity
maps on
), otherwise dest_mapmust be aDiffMap
OUTPUT:
- a
AutomorphismField(or if
is parallelizable, a
AutomorphismFieldParal) representing the field of identity maps
EXAMPLES:
Field of tangent-space identity maps on a 3-dimensional manifold:
sage: M = Manifold(3, 'M', start_index=1) sage: c_xyz.<x,y,z> = M.chart() sage: a = M.tangent_identity_field(); a Field of tangent-space identity maps on the 3-dimensional differentiable manifold M sage: a.comp() Kronecker delta of size 3x3
See also
For more examples, see
AutomorphismField.
-
tangent_space(point)¶ Tangent space to
selfat a given point.INPUT:
point–ManifoldPoint; point
on the manifold
OUTPUT:
TangentSpacerepresenting the tangent vector space
, where
is the
current manifold
EXAMPLES:
A tangent space to a 2-dimensional manifold:
sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: p = M.point((2, -3), name='p') sage: Tp = M.tangent_space(p); Tp Tangent space at Point p on the 2-dimensional differentiable manifold M sage: Tp.category() Category of finite dimensional vector spaces over Symbolic Ring sage: dim(Tp) 2
See also
TangentSpacefor more examples.
-
tensor_field(k, l, name=None, latex_name=None, sym=None, antisym=None, dest_map=None)¶ Define a tensor field on
self.Via the argument
dest_map, it is possible to let the tensor field take its values on another manifold. More precisely, if
is
the current manifold,
a differentiable manifold,
a differentiable map and
a pair of non-negative integers, a tensor field of type
along
with values on
is a differentiable map
(
being the tensor bundle of type
over
)
such that
where
is the space of tensors of type
on the tangent space
.The standard case of tensor fields on
corresponds
to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).See
TensorFieldfor a complete documentation.INPUT:
k– the contravariant rank
, the tensor type being 
l– the covariant rank
, the tensor type being 
name– (default:None) name given to the tensor fieldlatex_name– (default:None) LaTeX symbol to denote the tensor field; ifNone, the LaTeX symbol is set tonamesym– (default:None) a symmetry or a list of symmetries among the tensor arguments: each symmetry is described by a tuple containing the positions of the involved arguments, with the conventionposition=0for the first argument; for instance:sym = (0,1)for a symmetry between the 1st and 2nd argumentssym = [(0,2), (1,3,4)]for a symmetry between the 1st and 3rd arguments and a symmetry between the 2nd, 4th and 5th arguments
antisym– (default:None) antisymmetry or list of antisymmetries among the arguments, with the same convention as forsymdest_map– (default:None) the destination map
; if None, it is assumed that
and that
is the identity map (case of a tensor field
on
), otherwise dest_mapmust be aDiffMap
OUTPUT:
- a
TensorField(or if
is parallelizable, a
TensorFieldParal) representing the defined tensor field
EXAMPLES:
A tensor field of type
on an open subset of a 3-dimensional
differentiable manifold:sage: M = Manifold(3, 'M') sage: U = M.open_subset('U') sage: c_xyz.<x,y,z> = U.chart() sage: t = U.tensor_field(2, 0, 'T'); t Tensor field T of type (2,0) on the Open subset U of the 3-dimensional differentiable manifold M
The type
tensor fields on
form the set
, which is a module over the algebra
of differentiable scalar fields on
:sage: t.parent() Free module T^(2,0)(U) of type-(2,0) tensors fields on the Open subset U of the 3-dimensional differentiable manifold M sage: t in U.tensor_field_module((2,0)) True
-
tensor_field_module(tensor_type, dest_map=None)¶ Return the set of tensor fields of a given type defined on
self, possibly with values in another manifold, as a module over the algebra of scalar fields defined onself.See also
TensorFieldModulefor complete documentation.INPUT:
tensor_type– pair
with
being the contravariant
rank and
the covariant rankdest_map– (default:None) destination map, i.e. a differentiable map
, where
is the
current manifold and
a differentiable manifold;
if None, it is assumed that
and that
is the
identity map (case of tensor fields on
), otherwise
dest_mapmust be aDiffMap
OUTPUT:
- a
TensorFieldModule(or if
is parallelizable, a
TensorFieldFreeModule) representing the module
of type-
tensor fields on
taking values on 
EXAMPLES:
Module of type-
tensor fields on a 3-dimensional open subset of
a differentiable manifold:sage: M = Manifold(3, 'M') sage: U = M.open_subset('U') sage: c_xyz.<x,y,z> = U.chart() sage: TU = U.tensor_field_module((2,1)) ; TU Free module T^(2,1)(U) of type-(2,1) tensors fields on the Open subset U of the 3-dimensional differentiable manifold M sage: TU.category() Category of finite dimensional modules over Algebra of differentiable scalar fields on the Open subset U of the 3-dimensional differentiable manifold M sage: TU.base_ring() Algebra of differentiable scalar fields on the Open subset U of the 3-dimensional differentiable manifold M sage: TU.base_ring() is U.scalar_field_algebra() True sage: TU.an_element() Tensor field of type (2,1) on the Open subset U of the 3-dimensional differentiable manifold M sage: TU.an_element().display() 2 d/dx*d/dx*dx
-
vector_field(name=None, latex_name=None, dest_map=None)¶ Define a vector field on
self.Via the argument
dest_map, it is possible to let the vector field take its values on another manifold. More precisely, if
is
the current manifold,
a differentiable manifold and
a differentiable map, a vector field
along
with values on
is a differentiable map
(
being the tangent bundle of
) such that
where
is the tangent space to
at the
point
.The standard case of vector fields on
corresponds
to
and
. Other common cases are
being an immersion and
being a curve in
(
is then
an open interval of
).See
VectorFieldfor a complete documentation.INPUT:
name– (default:None) name given to the vector fieldlatex_name– (default:None) LaTeX symbol to denote the vector field; if none is provided, the LaTeX symbol is set tonamedest_map– (default:None) the destination map
; if None, it is assumed that
andthat
is the identity map (case of a vector field
on
), otherwise dest_mapmust be aDiffMap
OUTPUT:
- a
VectorField(or if
is parallelizable, a
VectorFieldParal) representing the defined vector field
EXAMPLES:
A vector field on a open subset of a 3-dimensional differentiable manifold:
sage: M = Manifold(3, 'M') sage: U = M.open_subset('U') sage: c_xyz.<x,y,z> = U.chart() sage: v = U.vector_field('v'); v Vector field v on the Open subset U of the 3-dimensional differentiable manifold M
The vector fields on
form the set
, which is a
module over the algebra
of differentiable scalar fields
on
:sage: v.parent() Free module X(U) of vector fields on the Open subset U of the 3-dimensional differentiable manifold M sage: v in U.vector_field_module() True
See also
For more examples, see
VectorField.
-
vector_field_module(dest_map=None, force_free=False)¶ Return the set of vector fields defined on
self, possibly with values in another differentiable manifold, as a module over the algebra of scalar fields defined on the manifold.See
VectorFieldModulefor a complete documentation.INPUT:
dest_map– (default:None) destination map, i.e. a differentiable map
, where
is the
current manifold and
a differentiable manifold;
if None, it is assumed that
and that
is the
identity map (case of vector fields on
), otherwise
dest_mapmust be aDiffMapforce_free– (default:False) if set toTrue, force the construction of a free module (this implies that
is
parallelizable)
OUTPUT:
- a
VectorFieldModule(or if
is parallelizable, a
VectorFieldFreeModule) representing the module
of vector fields on
taking values on 
EXAMPLES:
Vector field module
of the complement
of the two poles on the sphere
:sage: S2 = Manifold(2, 'S^2') sage: U = S2.open_subset('U') # the complement of the two poles sage: spher_coord.<th,ph> = U.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi') # spherical coordinates sage: XU = U.vector_field_module() ; XU Free module X(U) of vector fields on the Open subset U of the 2-dimensional differentiable manifold S^2 sage: XU.category() Category of finite dimensional modules over Algebra of differentiable scalar fields on the Open subset U of the 2-dimensional differentiable manifold S^2 sage: XU.base_ring() Algebra of differentiable scalar fields on the Open subset U of the 2-dimensional differentiable manifold S^2 sage: XU.base_ring() is U.scalar_field_algebra() True
is a free module because
is parallelizable
(being a chart domain):sage: U.is_manifestly_parallelizable() True
Its rank is the manifold’s dimension:
sage: XU.rank() 2
The elements of
are vector fields on
:sage: XU.an_element() Vector field on the Open subset U of the 2-dimensional differentiable manifold S^2 sage: XU.an_element().display() 2 d/dth + 2 d/dph
Vector field module
of the
-valued vector fields along
, associated with the
embedding
of
into
:sage: R3 = Manifold(3, 'R^3') sage: cart_coord.<x, y, z> = R3.chart() sage: Phi = U.diff_map(R3, ....: [sin(th)*cos(ph), sin(th)*sin(ph), cos(th)], name='Phi') sage: XU_R3 = U.vector_field_module(dest_map=Phi) ; XU_R3 Free module X(U,Phi) of vector fields along the Open subset U of the 2-dimensional differentiable manifold S^2 mapped into the 3-dimensional differentiable manifold R^3 sage: XU_R3.base_ring() Algebra of differentiable scalar fields on the Open subset U of the 2-dimensional differentiable manifold S^2
is a free module because
is parallelizable and its rank is 3:sage: XU_R3.rank() 3
-
vector_frame(symbol=None, latex_symbol=None, dest_map=None, from_frame=None)¶ Define a vector frame on
self.A vector frame is a field on the manifold that provides, at each point
of the manifold, a vector basis of the tangent space at
.See also
VectorFramefor complete documentation.INPUT:
symbol– (default:None) a letter (of a few letters) to denote a generic vector of the frame; can be set toNoneif the parameterfrom_frameis filledlatex_symbol– (default:None) symbol to denote a generic vector of the frame; if None, the value ofsymbolis used.dest_map– (default:None)DiffMap; destination map
; if None, the identity is assumed (case of a vector frame on
)from_frame– (default:None) vector frame
on the codomain
of the destination map
; the returned
frame
is then such that for all
,
we have 
OUTPUT:
- a
VectorFramerepresenting the defined vector frame
EXAMPLES:
Setting a vector frame on a 3-dimensional open subset:
sage: M = Manifold(3, 'M') sage: A = M.open_subset('A', latex_name=r'\mathcal{A}'); A Open subset A of the 3-dimensional differentiable manifold M sage: c_xyz.<x,y,z> = A.chart() sage: e = A.vector_frame('e'); e Vector frame (A, (e_0,e_1,e_2)) sage: e[0] Vector field e_0 on the Open subset A of the 3-dimensional differentiable manifold M
See also
For more examples, see
VectorFrame.
- if the mention of
