Navigation

Given a topological field \(K\) (in most applications, \(K = \RR\) or
\(K = \CC\)) and a non-negative integer \(n\), a topological manifold of
dimension\(n\)over K is a topological space \(M\) such that

\(M\) is a Hausdorff space,

\(M\) is second countable,

every point in \(M\) has a neighborhood homeomorphic to \(K^n\).

Topological manifolds are implemented via the class
TopologicalManifold. Open subsets of topological manifolds
are also implemented via TopologicalManifold, since they are
topological manifolds by themselves.

In the current setting, topological manifolds are mostly described by
means of charts (see Chart).

To fully construct the manifold, we declare that it is the union of \(U\)
and \(V\):

sage: M.declare_union(U,V)

and we provide the transition map between the charts stereoN =
\((U, (x, y))\) and stereoS = \((V, (u, v))\), denoting by \(W\) the
intersection of \(U\) and \(V\) (\(W\) is the subset of \(U\) defined by
\(x^2 + y^2 \neq 0\), as well as the subset of \(V\) defined by
\(u^2 + v^2 \neq 0\)):

Given a topological field \(K\) (in most applications, \(K = \RR\) or
\(K = \CC\)) and a non-negative integer \(n\), a topological manifold of
dimension\(n\)over K is a topological space \(M\) such that

\(M\) is a Hausdorff space,

\(M\) is second countable, and

every point in \(M\) has a neighborhood homeomorphic to \(K^n\).

A real manifold is a manifold over \(\RR\). A differentiable (resp.
smooth, resp. analytic) manifold is a manifold such that all
transition maps are differentiable (resp. smooth, resp. analytic). A
pseudo-Riemannian manifold is a real differentiable manifold equipped
with a metric tensor \(g\) (i.e. a field of non-degenerate symmetric bilinear
forms), with the two subcases of Riemannian manifold (\(g\)
positive-definite) and Lorentzian manifold (\(g\) has signature \(n-2\) or
\(2-n\)).

INPUT:

dim – positive integer; dimension of the manifold

name – string; name (symbol) given to the manifold

latex_name – (default: None) string; LaTeX symbol to
denote the manifold; if none are provided, it is set to name

field – (default: 'real') field \(K\) on which the
manifold is defined; allowed values are

'real' or an object of type RealField (e.g. RR) for a
manifold over \(\RR\)

'complex' or an object of type ComplexField (e.g. CC)
for a manifold over \(\CC\)

metric_name – (only for pseudo-Riemannian manifolds; default:
'g') string; name (symbol) given to the metric

metric_latex_name – (only for pseudo-Riemannian manifolds;
default: None) string; LaTeX symbol to denote the metric; if none
is provided, the symbol is set to metric_name

signature – (only for pseudo-Riemannian manifolds; default:
None) signature \(S\) of the metric as a single integer:
\(S = n_+ - n_-\), where \(n_+\) (resp. \(n_-\)) is the number of positive
terms (resp. negative terms) in any diagonal writing of the
metric components; if signature is not provided, \(S\) is set to the
manifold’s dimension (Riemannian signature); for Lorentzian manifolds
the values signature='positive' (default) or
signature='negative' are allowed to indicate the chosen signature
convention.

Moreover, the two manifolds M and M_old are still considered
distinct:

sage: M!=M_oldTrue

This reflects the fact that the equality of manifold objects holds only
for identical objects, i.e. one has M1==M2 if, and only if,
M1isM2. Actually, the manifold classes inherit from
WithEqualityById:

Given a topological field \(K\) (in most applications, \(K = \RR\) or
\(K = \CC\)) and a non-negative integer \(n\), a topological manifold of
dimension\(n\)over K is a topological space \(M\) such that

\(M\) is a Hausdorff space,

\(M\) is second countable, and

every point in \(M\) has a neighborhood homeomorphic to \(K^n\).

This is a Sage parent class, the corresponding element
class being ManifoldPoint.

INPUT:

n – positive integer; dimension of the manifold

name – string; name (symbol) given to the manifold

field – field \(K\) on which the manifold is
defined; allowed values are

'real' or an object of type RealField (e.g., RR) for
a manifold over \(\RR\)

'complex' or an object of type ComplexField (e.g., CC)
for a manifold over \(\CC\)

unique_tag – (default: None) tag used to force the construction
of a new object when all the other arguments have been used previously
(without unique_tag, the
UniqueRepresentation
behavior inherited from
ManifoldSubset
would return the previously constructed object corresponding to these
arguments)

Since an open subset of a topological manifold \(M\) is itself a
topological manifold, open subsets of \(M\) are instances of the class
TopologicalManifold:

sage: U=M.open_subset('U');UOpen subset U of the 4-dimensional topological manifold Msage: isinstance(U,sage.manifolds.manifold.TopologicalManifold)Truesage: U.base_field()==M.base_field()Truesage: dim(U)==dim(M)Truesage: U.category()Join of Category of subobjects of sets and Category of manifolds over Real Field with 53 bits of precision

The manifold passes all the tests of the test suite relative to its
category:

sage: M=Manifold(3,'M',structure='topological')sage: M.base_field()Real Field with 53 bits of precisionsage: M=Manifold(3,'M',structure='topological',field='complex')sage: M.base_field()Complex Field with 53 bits of precisionsage: M=Manifold(3,'M',structure='topological',field=QQ)sage: M.base_field()Rational Field

A chart is a pair \((U, \varphi)\), where \(U\) is the current
manifold and \(\varphi: U \rightarrow V \subset K^n\)
is a homeomorphism from \(U\) to an open subset \(V\) of \(K^n\), \(K\)
being the field on which the manifold is defined.

The components \((x^1, \ldots, x^n)\) of \(\varphi\), defined by
\(\varphi(p) = (x^1(p), \ldots, x^n(p)) \in K^n\) for any point
\(p \in U\), are called the coordinates of the chart \((U, \varphi)\).

The coordinates declared in the string coordinates are
separated by '' (whitespace) and each coordinate has at most four
fields, separated by a colon (':'):

The coordinate symbol (a letter or a few letters).

(optional, only for manifolds over \(\RR\)) The interval \(I\)
defining the coordinate range: if not provided, the coordinate
is assumed to span all \(\RR\); otherwise \(I\) must be provided
in the form (a,b) (or equivalently ]a,b[)
The bounds a and b can be +/-Infinity, Inf,
infinity, inf or oo. For singular coordinates,
non-open intervals such as [a,b] and
(a,b] (or equivalently ]a,b]) are allowed. Note that
the interval declaration must not contain any space character.

(optional) Indicator of the periodic character of the coordinate,
either as period=T, where T is the period, or, for manifolds
over \(\RR\) only, as the keyword periodic (the value of the
period is then deduced from the interval \(I\) declared in field 2;
see the example below)

(optional) The LaTeX spelling of the coordinate; if not provided
the coordinate symbol given in the first field will be used.

The order of fields 2 to 4 does not matter and each of them can
be omitted. If it contains any LaTeX expression, the string
coordinates must be declared with the prefix ‘r’ (for “raw”) to
allow for a proper treatment of the backslash character (see
examples below). If no interval range, no period and no LaTeX spelling
is to be set for any coordinate, the argument coordinates can be
omitted when the shortcut operator <,> is used to declare the
chart (see examples below).

OUTPUT:

the created chart, as an instance of
Chart or one of its subclasses, like
RealDiffChart for
differentiable manifolds over \(\RR\).

(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 self and chart2 a chart on codomain);

(ii) a single coordinate expression in a given pair of charts, the
latter being provided by the arguments chart1 and chart2;

in both cases, if the dimension of the codomain is \(1\), a single
coordinate expression can be passed instead of a tuple with
a single element

chart1 – (default: None; used only in case (ii) above)
chart on self defining the start coordinates involved in
coord_functions for case (ii); if None, the coordinates
are assumed to refer to the default chart of self

chart2 – (default: None; used only in case (ii) above)
chart on codomain defining the target coordinates involved in
coord_functions for case (ii); if None, the coordinates
are assumed to refer to the default chart of codomain

name – (default: None) name given to the continuous map

latex_name – (default: None) LaTeX symbol to denote the
continuous map; if None, the LaTeX symbol is set to name

(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 self and chart2 a chart on codomain);

(ii) a single coordinate expression in a given pair of charts, the
latter being provided by the arguments chart1 and chart2;

in both cases, if the dimension of the codomain is \(1\), a single
coordinate expression can be passed instead of a tuple with
a single element

chart1 – (default: None; used only in case (ii) above)
chart on self defining the start coordinates involved in
coord_functions for case (ii); if None, the coordinates
are assumed to refer to the default chart of self

chart2 – (default: None; used only in case (ii) above)
chart on codomain defining the target coordinates involved in
coord_functions for case (ii); if None, the coordinates
are assumed to refer to the default chart of codomain

name – (default: None) name given to the homeomorphism

latex_name – (default: None) LaTeX symbol to denote the
homeomorphism; if None, the LaTeX symbol is set to name

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 topological
manifold by itself. Hence the returned object is an instance of
TopologicalManifold.

INPUT:

name – name given to the open subset

latex_name – (default: None) LaTeX symbol to denote
the subset; if none are provided, it is set to name

coord_def – (default: {}) definition of the subset in
terms of coordinates; coord_def must a be dictionary with keys
charts on the manifold and values the symbolic expressions formed
by the coordinates to define the subset

coord_expression – (default: None) coordinate expression(s)
of the scalar field; this can be either

a single coordinate expression; if the argument chart is
'all', this expression is set to all the charts defined
on the open set; otherwise, the expression is set in the
specific chart provided by the argument chart

a dictionary of coordinate expressions, with the charts as keys

chart – (default: None) chart defining the coordinates
used in coord_expression when the latter is a single
coordinate expression; if None, the default chart of the
open set is assumed; if chart=='all', coord_expression is
assumed to be independent of the chart (constant scalar field)

name – (default: None) name given to the scalar field

latex_name – (default: None) LaTeX symbol to denote the
scalar field; if None, the LaTeX symbol is set to name

instance of
ScalarFieldAlgebra
representing the algebra \(C^0(U)\) of all scalar fields defined
on \(U\) = self

EXAMPLES:

Scalar algebra of a 3-dimensional open subset:

sage: M=Manifold(3,'M',structure='topological')sage: U=M.open_subset('U')sage: CU=U.scalar_field_algebra();CUAlgebra of scalar fields on the Open subset U of the 3-dimensional topological manifold Msage: CU.category()Category of commutative algebras over Symbolic Ringsage: CU.zero()Scalar field zero on the Open subset U of the 3-dimensional topological manifold M

Set the simplifying function associated to a given coordinate
calculus method in all the charts defined on self.

INPUT:

simplifying_func – either the string 'default' for restoring
the default simplifying function or a function f of a single
argument expr such that f(expr) returns an object of the same
type as expr (hopefully the simplified version of expr), this
type being

Thanks to the argument method, one can specify a simplifying
function for a calculus method distinct from the current one. For
instance, let us define a simplifying function for SymPy (note that
trigsimp() is a SymPy method only):