passagemath-symbolics 10.6.40__cp314-cp314t-macosx_13_0_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-symbolics might be problematic. Click here for more details.
- passagemath_symbolics/.dylibs/libgmp.10.dylib +0 -0
- passagemath_symbolics/__init__.py +3 -0
- passagemath_symbolics-10.6.40.dist-info/METADATA +187 -0
- passagemath_symbolics-10.6.40.dist-info/RECORD +172 -0
- passagemath_symbolics-10.6.40.dist-info/WHEEL +6 -0
- passagemath_symbolics-10.6.40.dist-info/top_level.txt +3 -0
- sage/all__sagemath_symbolics.py +17 -0
- sage/calculus/all.py +14 -0
- sage/calculus/calculus.py +2826 -0
- sage/calculus/desolvers.py +1866 -0
- sage/calculus/predefined.py +51 -0
- sage/calculus/tests.py +225 -0
- sage/calculus/var.cpython-314t-darwin.so +0 -0
- sage/calculus/var.pyx +401 -0
- sage/dynamics/all__sagemath_symbolics.py +6 -0
- sage/dynamics/complex_dynamics/all.py +5 -0
- sage/dynamics/complex_dynamics/mandel_julia.py +765 -0
- sage/dynamics/complex_dynamics/mandel_julia_helper.cpython-314t-darwin.so +0 -0
- sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +1035 -0
- sage/ext/all__sagemath_symbolics.py +1 -0
- sage/ext_data/kenzo/CP2.txt +45 -0
- sage/ext_data/kenzo/CP3.txt +349 -0
- sage/ext_data/kenzo/CP4.txt +4774 -0
- sage/ext_data/kenzo/README.txt +49 -0
- sage/ext_data/kenzo/S4.txt +20 -0
- sage/ext_data/magma/latex/latex.m +1021 -0
- sage/ext_data/magma/latex/latex.spec +1 -0
- sage/ext_data/magma/sage/basic.m +356 -0
- sage/ext_data/magma/sage/sage.spec +1 -0
- sage/ext_data/magma/spec +9 -0
- sage/geometry/all__sagemath_symbolics.py +8 -0
- sage/geometry/hyperbolic_space/all.py +5 -0
- sage/geometry/hyperbolic_space/hyperbolic_coercion.py +743 -0
- sage/geometry/hyperbolic_space/hyperbolic_constants.py +5 -0
- sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +2409 -0
- sage/geometry/hyperbolic_space/hyperbolic_interface.py +206 -0
- sage/geometry/hyperbolic_space/hyperbolic_isometry.py +1082 -0
- sage/geometry/hyperbolic_space/hyperbolic_model.py +1502 -0
- sage/geometry/hyperbolic_space/hyperbolic_point.py +621 -0
- sage/geometry/riemannian_manifolds/all.py +7 -0
- sage/geometry/riemannian_manifolds/parametrized_surface3d.py +1632 -0
- sage/geometry/riemannian_manifolds/surface3d_generators.py +461 -0
- sage/interfaces/all__sagemath_symbolics.py +1 -0
- sage/interfaces/magma.py +3017 -0
- sage/interfaces/magma_free.py +92 -0
- sage/interfaces/maple.py +1397 -0
- sage/interfaces/mathematica.py +1345 -0
- sage/interfaces/mathics.py +1312 -0
- sage/interfaces/sympy.py +1398 -0
- sage/interfaces/sympy_wrapper.py +197 -0
- sage/interfaces/tides.py +938 -0
- sage/libs/all__sagemath_symbolics.py +6 -0
- sage/manifolds/all.py +7 -0
- sage/manifolds/calculus_method.py +555 -0
- sage/manifolds/catalog.py +437 -0
- sage/manifolds/chart.py +4019 -0
- sage/manifolds/chart_func.py +3419 -0
- sage/manifolds/continuous_map.py +2183 -0
- sage/manifolds/continuous_map_image.py +155 -0
- sage/manifolds/differentiable/affine_connection.py +2475 -0
- sage/manifolds/differentiable/all.py +1 -0
- sage/manifolds/differentiable/automorphismfield.py +1383 -0
- sage/manifolds/differentiable/automorphismfield_group.py +604 -0
- sage/manifolds/differentiable/bundle_connection.py +1445 -0
- sage/manifolds/differentiable/characteristic_cohomology_class.py +1840 -0
- sage/manifolds/differentiable/chart.py +1241 -0
- sage/manifolds/differentiable/curve.py +1028 -0
- sage/manifolds/differentiable/de_rham_cohomology.py +541 -0
- sage/manifolds/differentiable/degenerate.py +559 -0
- sage/manifolds/differentiable/degenerate_submanifold.py +1671 -0
- sage/manifolds/differentiable/diff_form.py +1658 -0
- sage/manifolds/differentiable/diff_form_module.py +1062 -0
- sage/manifolds/differentiable/diff_map.py +1315 -0
- sage/manifolds/differentiable/differentiable_submanifold.py +291 -0
- sage/manifolds/differentiable/examples/all.py +1 -0
- sage/manifolds/differentiable/examples/euclidean.py +2517 -0
- sage/manifolds/differentiable/examples/real_line.py +897 -0
- sage/manifolds/differentiable/examples/sphere.py +1186 -0
- sage/manifolds/differentiable/examples/symplectic_space.py +187 -0
- sage/manifolds/differentiable/examples/symplectic_space_test.py +40 -0
- sage/manifolds/differentiable/integrated_curve.py +4035 -0
- sage/manifolds/differentiable/levi_civita_connection.py +841 -0
- sage/manifolds/differentiable/manifold.py +4254 -0
- sage/manifolds/differentiable/manifold_homset.py +1826 -0
- sage/manifolds/differentiable/metric.py +3032 -0
- sage/manifolds/differentiable/mixed_form.py +1507 -0
- sage/manifolds/differentiable/mixed_form_algebra.py +559 -0
- sage/manifolds/differentiable/multivector_module.py +800 -0
- sage/manifolds/differentiable/multivectorfield.py +1520 -0
- sage/manifolds/differentiable/poisson_tensor.py +268 -0
- sage/manifolds/differentiable/pseudo_riemannian.py +755 -0
- sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +1839 -0
- sage/manifolds/differentiable/scalarfield.py +1343 -0
- sage/manifolds/differentiable/scalarfield_algebra.py +472 -0
- sage/manifolds/differentiable/symplectic_form.py +910 -0
- sage/manifolds/differentiable/symplectic_form_test.py +220 -0
- sage/manifolds/differentiable/tangent_space.py +412 -0
- sage/manifolds/differentiable/tangent_vector.py +616 -0
- sage/manifolds/differentiable/tensorfield.py +4665 -0
- sage/manifolds/differentiable/tensorfield_module.py +963 -0
- sage/manifolds/differentiable/tensorfield_paral.py +2450 -0
- sage/manifolds/differentiable/tensorfield_paral_test.py +16 -0
- sage/manifolds/differentiable/vector_bundle.py +1728 -0
- sage/manifolds/differentiable/vectorfield.py +1717 -0
- sage/manifolds/differentiable/vectorfield_module.py +2445 -0
- sage/manifolds/differentiable/vectorframe.py +1832 -0
- sage/manifolds/family.py +270 -0
- sage/manifolds/local_frame.py +1490 -0
- sage/manifolds/manifold.py +3090 -0
- sage/manifolds/manifold_homset.py +452 -0
- sage/manifolds/operators.py +359 -0
- sage/manifolds/point.py +994 -0
- sage/manifolds/scalarfield.py +3718 -0
- sage/manifolds/scalarfield_algebra.py +629 -0
- sage/manifolds/section.py +3111 -0
- sage/manifolds/section_module.py +831 -0
- sage/manifolds/structure.py +229 -0
- sage/manifolds/subset.py +2764 -0
- sage/manifolds/subsets/all.py +1 -0
- sage/manifolds/subsets/closure.py +131 -0
- sage/manifolds/subsets/pullback.py +885 -0
- sage/manifolds/topological_submanifold.py +891 -0
- sage/manifolds/trivialization.py +733 -0
- sage/manifolds/utilities.py +1348 -0
- sage/manifolds/vector_bundle.py +1342 -0
- sage/manifolds/vector_bundle_fiber.py +332 -0
- sage/manifolds/vector_bundle_fiber_element.py +111 -0
- sage/matrix/all__sagemath_symbolics.py +1 -0
- sage/matrix/matrix_symbolic_dense.cpython-314t-darwin.so +0 -0
- sage/matrix/matrix_symbolic_dense.pxd +6 -0
- sage/matrix/matrix_symbolic_dense.pyx +1022 -0
- sage/matrix/matrix_symbolic_sparse.cpython-314t-darwin.so +0 -0
- sage/matrix/matrix_symbolic_sparse.pxd +6 -0
- sage/matrix/matrix_symbolic_sparse.pyx +1029 -0
- sage/modules/all__sagemath_symbolics.py +1 -0
- sage/modules/vector_callable_symbolic_dense.py +105 -0
- sage/modules/vector_symbolic_dense.py +116 -0
- sage/modules/vector_symbolic_sparse.py +118 -0
- sage/rings/all__sagemath_symbolics.py +4 -0
- sage/rings/asymptotic/all.py +6 -0
- sage/rings/asymptotic/asymptotic_expansion_generators.py +1485 -0
- sage/rings/asymptotic/asymptotic_ring.py +4858 -0
- sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +4153 -0
- sage/rings/asymptotic/growth_group.py +5373 -0
- sage/rings/asymptotic/growth_group_cartesian.py +1400 -0
- sage/rings/asymptotic/term_monoid.py +5237 -0
- sage/rings/function_field/all__sagemath_symbolics.py +2 -0
- sage/rings/polynomial/all__sagemath_symbolics.py +1 -0
- sage/symbolic/all.py +15 -0
- sage/symbolic/assumptions.py +985 -0
- sage/symbolic/benchmark.py +93 -0
- sage/symbolic/callable.py +459 -0
- sage/symbolic/complexity_measures.py +35 -0
- sage/symbolic/constants.py +1287 -0
- sage/symbolic/expression_conversion_algebraic.py +310 -0
- sage/symbolic/expression_conversion_sympy.py +317 -0
- sage/symbolic/expression_conversions.py +1713 -0
- sage/symbolic/function_factory.py +355 -0
- sage/symbolic/integration/all.py +1 -0
- sage/symbolic/integration/external.py +270 -0
- sage/symbolic/integration/integral.py +1115 -0
- sage/symbolic/maxima_wrapper.py +162 -0
- sage/symbolic/operators.py +267 -0
- sage/symbolic/random_tests.py +462 -0
- sage/symbolic/relation.py +1907 -0
- sage/symbolic/ring.cpython-314t-darwin.so +0 -0
- sage/symbolic/ring.pxd +5 -0
- sage/symbolic/ring.pyx +1396 -0
- sage/symbolic/subring.py +1025 -0
- sage/symbolic/symengine.py +19 -0
- sage/symbolic/tests.py +40 -0
- sage/symbolic/units.py +1470 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-symbolics
|
|
2
|
+
r"""
|
|
3
|
+
Degenerate manifolds
|
|
4
|
+
"""
|
|
5
|
+
# *****************************************************************************
|
|
6
|
+
# Copyright (C) 2019 Hans Fotsing Tetsing <hans.fotsing@aims-cameroon.org>
|
|
7
|
+
#
|
|
8
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
9
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
10
|
+
# the License, or (at your option) any later version.
|
|
11
|
+
# https://www.gnu.org/licenses/
|
|
12
|
+
# *****************************************************************************
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import TYPE_CHECKING
|
|
17
|
+
|
|
18
|
+
from sage.manifolds.differentiable.manifold import DifferentiableManifold
|
|
19
|
+
from sage.manifolds.structure import DegenerateStructure
|
|
20
|
+
from sage.rings.infinity import infinity
|
|
21
|
+
|
|
22
|
+
if TYPE_CHECKING:
|
|
23
|
+
from sage.manifolds.differentiable.metric import DegenerateMetric
|
|
24
|
+
|
|
25
|
+
###############################################################################
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DegenerateManifold(DifferentiableManifold):
|
|
29
|
+
r"""
|
|
30
|
+
|
|
31
|
+
Degenerate Manifolds
|
|
32
|
+
|
|
33
|
+
A *degenerate manifold* (or a *null manifold*) is a pair `(M,g)`
|
|
34
|
+
where `M` is a real differentiable manifold (see
|
|
35
|
+
:class:`~sage.manifolds.differentiable.manifold.DifferentiableManifold`)
|
|
36
|
+
and `g` is a field of degenerate symmetric bilinear forms on `M` (see
|
|
37
|
+
:class:`~sage.manifolds.differentiable.metric.DegenerateMetric`).
|
|
38
|
+
|
|
39
|
+
INPUT:
|
|
40
|
+
|
|
41
|
+
- ``n`` -- positive integer; dimension of the manifold
|
|
42
|
+
- ``name`` -- string; name (symbol) given to the manifold
|
|
43
|
+
- ``metric_name`` -- (default: ``None``) string; name (symbol) given to the
|
|
44
|
+
metric; if ``None``, ``'g'`` is used
|
|
45
|
+
- ``signature`` -- (default: ``None``) signature `S` of the metric as a
|
|
46
|
+
tuple: `S = (n_+, n_-, n_0)`, where `n_+` (resp. `n_-`, resp. `n_0`) is the
|
|
47
|
+
number of positive terms (resp. negative terms, resp. zero tems) in any
|
|
48
|
+
diagonal writing of the metric components; if ``signature`` is not
|
|
49
|
+
provided, `S` is set to `(ndim-1, 0, 1)`, being `ndim` the manifold's dimension
|
|
50
|
+
- ``ambient`` -- (default: ``None``) if not ``None``, must be a
|
|
51
|
+
differentiable manifold; the created object is then an open subset of
|
|
52
|
+
``ambient``
|
|
53
|
+
- ``diff_degree`` -- (default: ``infinity``) degree `k` of
|
|
54
|
+
differentiability
|
|
55
|
+
- ``latex_name`` -- (default: ``None``) string; LaTeX symbol to
|
|
56
|
+
denote the manifold; if none is provided, it is set to ``name``
|
|
57
|
+
- ``metric_latex_name`` -- (default: ``None``) string; LaTeX symbol to
|
|
58
|
+
denote the metric; if none is provided, it is set to ``metric_name``
|
|
59
|
+
- ``start_index`` -- (default: 0) integer; lower value of the range of
|
|
60
|
+
indices used for "indexed objects" on the manifold, e.g. coordinates
|
|
61
|
+
in a chart
|
|
62
|
+
- ``category`` -- (default: ``None``) to specify the category; if ``None``,
|
|
63
|
+
``Manifolds(RR).Differentiable()`` (or ``Manifolds(RR).Smooth()``
|
|
64
|
+
if ``diff_degree`` = ``infinity``) is assumed (see the category
|
|
65
|
+
:class:`~sage.categories.manifolds.Manifolds`)
|
|
66
|
+
- ``unique_tag`` -- (default: ``None``) tag used to force the construction
|
|
67
|
+
of a new object when all the other arguments have been used previously
|
|
68
|
+
(without ``unique_tag``, the
|
|
69
|
+
:class:`~sage.structure.unique_representation.UniqueRepresentation`
|
|
70
|
+
behavior inherited from
|
|
71
|
+
:class:`~sage.manifolds.subset.ManifoldSubset`, via
|
|
72
|
+
:class:`~sage.manifolds.differentiable.manifold.DifferentiableManifold`
|
|
73
|
+
and :class:`~sage.manifolds.manifold.TopologicalManifold`,
|
|
74
|
+
would return the previously constructed object corresponding to these
|
|
75
|
+
arguments).
|
|
76
|
+
|
|
77
|
+
EXAMPLES:
|
|
78
|
+
|
|
79
|
+
A degenerate manifold is constructed via the generic function
|
|
80
|
+
:func:`~sage.manifolds.manifold.Manifold`, using the keyword
|
|
81
|
+
``structure``::
|
|
82
|
+
|
|
83
|
+
sage: M = Manifold(3, 'M', structure='degenerate_metric')
|
|
84
|
+
sage: M
|
|
85
|
+
3-dimensional degenerate_metric manifold M
|
|
86
|
+
sage: M.parent()
|
|
87
|
+
<class 'sage.manifolds.differentiable.degenerate.DegenerateManifold_with_category'>
|
|
88
|
+
|
|
89
|
+
The metric associated with ``M`` is::
|
|
90
|
+
|
|
91
|
+
sage: g = M.metric()
|
|
92
|
+
sage: g
|
|
93
|
+
degenerate metric g on the 3-dimensional degenerate_metric manifold M
|
|
94
|
+
sage: g.signature()
|
|
95
|
+
(0, 2, 1)
|
|
96
|
+
|
|
97
|
+
Its value has to be initialized either by setting its components in various
|
|
98
|
+
vector frames (see the above examples regarding the 2-sphere and Minkowski
|
|
99
|
+
spacetime) or by making it equal to a given field of symmetric bilinear
|
|
100
|
+
forms (see the method
|
|
101
|
+
:meth:`~sage.manifolds.differentiable.metric.PseudoRiemannianMetric.set`
|
|
102
|
+
of the metric class). Both methods are also covered in the
|
|
103
|
+
documentation of method :meth:`metric` below.
|
|
104
|
+
|
|
105
|
+
REFERENCES:
|
|
106
|
+
|
|
107
|
+
- [DB1996]_
|
|
108
|
+
- [DS2010]_
|
|
109
|
+
"""
|
|
110
|
+
def __init__(self, n, name, metric_name=None, signature=None,
|
|
111
|
+
base_manifold=None, diff_degree=infinity, latex_name=None,
|
|
112
|
+
metric_latex_name=None, start_index=0, category=None,
|
|
113
|
+
unique_tag=None):
|
|
114
|
+
r"""
|
|
115
|
+
Construct a degenerate manifold.
|
|
116
|
+
|
|
117
|
+
TESTS::
|
|
118
|
+
|
|
119
|
+
sage: M = Manifold(3, 'M', structure='degenerate_metric')
|
|
120
|
+
sage: M
|
|
121
|
+
3-dimensional degenerate_metric manifold M
|
|
122
|
+
sage: type(M)
|
|
123
|
+
<class 'sage.manifolds.differentiable.degenerate.DegenerateManifold_with_category'>
|
|
124
|
+
sage: X.<x,y,z> = M.chart()
|
|
125
|
+
sage: M.metric()
|
|
126
|
+
degenerate metric g on the 3-dimensional degenerate_metric manifold M
|
|
127
|
+
sage: TestSuite(M).run()
|
|
128
|
+
"""
|
|
129
|
+
if base_manifold and not isinstance(base_manifold, DegenerateManifold):
|
|
130
|
+
raise TypeError("the argument 'base_manifold' must be a " +
|
|
131
|
+
"Degenerate manifold")
|
|
132
|
+
structure = DegenerateStructure()
|
|
133
|
+
DifferentiableManifold.__init__(self, n, name, 'real', structure,
|
|
134
|
+
base_manifold=base_manifold,
|
|
135
|
+
diff_degree=diff_degree,
|
|
136
|
+
latex_name=latex_name,
|
|
137
|
+
start_index=start_index,
|
|
138
|
+
category=category)
|
|
139
|
+
self._metric = None # to be initialized by metric()
|
|
140
|
+
self._metric_signature = signature
|
|
141
|
+
if metric_name is None:
|
|
142
|
+
metric_name = 'g'
|
|
143
|
+
elif not isinstance(metric_name, str):
|
|
144
|
+
raise TypeError("{} is not a string".format(metric_name))
|
|
145
|
+
self._metric_name = metric_name
|
|
146
|
+
if metric_latex_name is None:
|
|
147
|
+
self._metric_latex_name = self._metric_name
|
|
148
|
+
else:
|
|
149
|
+
if not isinstance(metric_latex_name, str):
|
|
150
|
+
raise TypeError("{} is not a string".format(metric_latex_name))
|
|
151
|
+
self._metric_latex_name = metric_latex_name
|
|
152
|
+
|
|
153
|
+
def metric(self, name=None, signature=None, latex_name=None,
|
|
154
|
+
dest_map=None) -> DegenerateMetric:
|
|
155
|
+
r"""
|
|
156
|
+
Return the metric giving the null manifold structure to the
|
|
157
|
+
manifold, or define a new metric tensor on the manifold.
|
|
158
|
+
|
|
159
|
+
INPUT:
|
|
160
|
+
|
|
161
|
+
- ``name`` -- (default: ``None``) name given to the metric; if
|
|
162
|
+
``name`` is ``None`` or matches the name of the metric defining the
|
|
163
|
+
null manifold structure of ``self``, the latter metric is
|
|
164
|
+
returned
|
|
165
|
+
- ``signature`` -- (default: ``None``; ignored if ``name`` is ``None``)
|
|
166
|
+
signature `S` of the metric as a tuple: `S = (n_+, n_-, n_0)`,
|
|
167
|
+
where `n_+` (resp. `n_-`, resp. `n_0`) is the number of positive
|
|
168
|
+
terms (resp. negative terms, resp. zero tems) in any diagonal writing
|
|
169
|
+
of the metric components; if ``signature`` is not provided, `S` is set
|
|
170
|
+
to `(ndim-1, 0, 1)`, being `ndim` the manifold's dimension
|
|
171
|
+
- ``latex_name`` -- (default: ``None``; ignored if ``name`` is ``None``)
|
|
172
|
+
LaTeX symbol to denote the metric; if ``None``, it is formed from
|
|
173
|
+
``name``
|
|
174
|
+
- ``dest_map`` -- (default: ``None``; ignored if ``name`` is ``None``)
|
|
175
|
+
instance of
|
|
176
|
+
class :class:`~sage.manifolds.differentiable.diff_map.DiffMap`
|
|
177
|
+
representing the destination map `\Phi:\ U \rightarrow M`, where `U`
|
|
178
|
+
is the current manifold; if ``None``, the identity map is assumed
|
|
179
|
+
(case of a metric tensor field *on* `U`)
|
|
180
|
+
|
|
181
|
+
OUTPUT:
|
|
182
|
+
|
|
183
|
+
- instance of
|
|
184
|
+
:class:`~sage.manifolds.differentiable.metric.DegenerateMetric`
|
|
185
|
+
|
|
186
|
+
EXAMPLES:
|
|
187
|
+
|
|
188
|
+
Metric of a 3-dimensional degenerate manifold::
|
|
189
|
+
|
|
190
|
+
sage: M = Manifold(3, 'M', structure='degenerate_metric', start_index=1)
|
|
191
|
+
sage: X.<x,y,z> = M.chart()
|
|
192
|
+
sage: g = M.metric(); g
|
|
193
|
+
degenerate metric g on the 3-dimensional degenerate_metric manifold M
|
|
194
|
+
|
|
195
|
+
The metric remains to be initialized, for instance by setting its
|
|
196
|
+
components in the coordinate frame associated to the chart ``X``::
|
|
197
|
+
|
|
198
|
+
sage: g[1,1], g[2,2] = -1, 1
|
|
199
|
+
sage: g.display()
|
|
200
|
+
g = -dx⊗dx + dy⊗dy
|
|
201
|
+
sage: g[:]
|
|
202
|
+
[-1 0 0]
|
|
203
|
+
[ 0 1 0]
|
|
204
|
+
[ 0 0 0]
|
|
205
|
+
|
|
206
|
+
Alternatively, the metric can be initialized from a given field of
|
|
207
|
+
degenerate symmetric bilinear forms; we may create the former
|
|
208
|
+
object by::
|
|
209
|
+
|
|
210
|
+
sage: X.coframe()
|
|
211
|
+
Coordinate coframe (M, (dx,dy,dz))
|
|
212
|
+
sage: dx, dy = X.coframe()[1], X.coframe()[2]
|
|
213
|
+
sage: b = dx*dx + dy*dy
|
|
214
|
+
sage: b
|
|
215
|
+
Field of symmetric bilinear forms dx⊗dx+dy⊗dy on the 3-dimensional
|
|
216
|
+
degenerate_metric manifold M
|
|
217
|
+
|
|
218
|
+
We then use the metric method
|
|
219
|
+
:meth:`~sage.manifolds.differentiable.metric.DegenerateMetric.set`
|
|
220
|
+
to make ``g`` being equal to ``b`` as a symmetric tensor field of
|
|
221
|
+
type ``(0,2)``::
|
|
222
|
+
|
|
223
|
+
sage: g.set(b)
|
|
224
|
+
sage: g.display()
|
|
225
|
+
g = dx⊗dx + dy⊗dy
|
|
226
|
+
|
|
227
|
+
Another metric can be defined on ``M`` by specifying a metric name
|
|
228
|
+
distinct from that chosen at the creation of the manifold (which
|
|
229
|
+
is ``g`` by default, but can be changed thanks to the keyword
|
|
230
|
+
``metric_name`` in :func:`~sage.manifolds.manifold.Manifold`)::
|
|
231
|
+
|
|
232
|
+
sage: h = M.metric('h'); h
|
|
233
|
+
degenerate metric h on the 3-dimensional degenerate_metric manifold M
|
|
234
|
+
sage: h[1,1], h[2,2], h[3,3] = 1+y^2, 1+z^2, 1+x^2
|
|
235
|
+
sage: h.display()
|
|
236
|
+
h = (y^2 + 1) dx⊗dx + (z^2 + 1) dy⊗dy + (x^2 + 1) dz⊗dz
|
|
237
|
+
|
|
238
|
+
The metric tensor ``h`` is distinct from the metric entering in the
|
|
239
|
+
definition of the degenerate manifold ``M``::
|
|
240
|
+
|
|
241
|
+
sage: h is M.metric()
|
|
242
|
+
False
|
|
243
|
+
|
|
244
|
+
while we have of course::
|
|
245
|
+
|
|
246
|
+
sage: g is M.metric()
|
|
247
|
+
True
|
|
248
|
+
|
|
249
|
+
Providing the same name as the manifold's default metric returns the
|
|
250
|
+
latter::
|
|
251
|
+
|
|
252
|
+
sage: M.metric('g') is M.metric()
|
|
253
|
+
True
|
|
254
|
+
"""
|
|
255
|
+
if signature is None:
|
|
256
|
+
signature = self._metric_signature
|
|
257
|
+
if name is None or name == self._metric_name:
|
|
258
|
+
# Default metric associated with the manifold
|
|
259
|
+
if self._metric is None:
|
|
260
|
+
if self._manifold is not self and self._manifold._metric is not None:
|
|
261
|
+
# case of an open subset with a metric already defined on
|
|
262
|
+
# the ambient manifold:
|
|
263
|
+
self._metric = self._manifold._metric.restrict(self)
|
|
264
|
+
else:
|
|
265
|
+
# creation from scratch:
|
|
266
|
+
self._metric = DifferentiableManifold.metric(self,
|
|
267
|
+
self._metric_name,
|
|
268
|
+
signature=self._metric_signature,
|
|
269
|
+
latex_name=self._metric_latex_name)
|
|
270
|
+
return self._metric
|
|
271
|
+
# Metric distinct from the default one: it is created by the method
|
|
272
|
+
# metric of the superclass for generic differentiable manifolds:
|
|
273
|
+
return DifferentiableManifold.metric(self, name, signature=signature,
|
|
274
|
+
latex_name=latex_name,
|
|
275
|
+
dest_map=dest_map)
|
|
276
|
+
|
|
277
|
+
def open_subset(self, name, latex_name=None, coord_def={}):
|
|
278
|
+
r"""
|
|
279
|
+
Create an open subset of ``self``.
|
|
280
|
+
|
|
281
|
+
An open subset is a set that is (i) included in the manifold and (ii)
|
|
282
|
+
open with respect to the manifold's topology. It is a differentiable
|
|
283
|
+
manifold by itself. Moreover, equipped with the restriction of the
|
|
284
|
+
manifold metric to itself, it is a null manifold. Hence
|
|
285
|
+
the returned object is an instance of
|
|
286
|
+
:class:`DegenerateManifold`.
|
|
287
|
+
|
|
288
|
+
INPUT:
|
|
289
|
+
|
|
290
|
+
- ``name`` -- name given to the open subset
|
|
291
|
+
- ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the
|
|
292
|
+
subset; if none is provided, it is set to ``name``
|
|
293
|
+
- ``coord_def`` -- (default: {}) definition of the subset in
|
|
294
|
+
terms of coordinates; ``coord_def`` must a be dictionary with keys
|
|
295
|
+
charts in the manifold's atlas and values the symbolic expressions
|
|
296
|
+
formed by the coordinates to define the subset.
|
|
297
|
+
|
|
298
|
+
OUTPUT:
|
|
299
|
+
|
|
300
|
+
- instance of :class:`DegenerateManifold` representing the
|
|
301
|
+
created open subset
|
|
302
|
+
|
|
303
|
+
EXAMPLES:
|
|
304
|
+
|
|
305
|
+
Open subset of a 3-dimensional degenerate manifold::
|
|
306
|
+
|
|
307
|
+
sage: M = Manifold(3, 'M', structure='degenerate_metric', start_index=1)
|
|
308
|
+
sage: X.<x,y,z> = M.chart()
|
|
309
|
+
sage: U = M.open_subset('U', coord_def={X: [x>0, y>0]}); U
|
|
310
|
+
Open subset U of the 3-dimensional degenerate_metric manifold M
|
|
311
|
+
sage: type(U)
|
|
312
|
+
<class 'sage.manifolds.differentiable.degenerate.DegenerateManifold_with_category'>
|
|
313
|
+
|
|
314
|
+
We initialize the metric of ``M``::
|
|
315
|
+
|
|
316
|
+
sage: g = M.metric()
|
|
317
|
+
sage: g[1,1], g[2,2] = -1, 1
|
|
318
|
+
|
|
319
|
+
Then the metric on ``U`` is determined as the restriction of ``g`` to
|
|
320
|
+
``U``::
|
|
321
|
+
|
|
322
|
+
sage: gU = U.metric(); gU
|
|
323
|
+
degenerate metric g on the Open subset U of the 3-dimensional
|
|
324
|
+
degenerate_metric manifold M
|
|
325
|
+
sage: gU.display()
|
|
326
|
+
g = -dx⊗dx + dy⊗dy
|
|
327
|
+
sage: gU is g.restrict(U)
|
|
328
|
+
True
|
|
329
|
+
|
|
330
|
+
TESTS:
|
|
331
|
+
|
|
332
|
+
Open subset created after the initialization of the metric::
|
|
333
|
+
|
|
334
|
+
sage: V = M.open_subset('V', coord_def={X: x<0}); V
|
|
335
|
+
Open subset V of the 3-dimensional degenerate_metric manifold M
|
|
336
|
+
sage: gV = V.metric()
|
|
337
|
+
sage: gV.display()
|
|
338
|
+
g = -dx⊗dx + dy⊗dy
|
|
339
|
+
sage: gV is g.restrict(V)
|
|
340
|
+
True
|
|
341
|
+
"""
|
|
342
|
+
resu = DegenerateManifold(self._dim, name,
|
|
343
|
+
metric_name=self._metric_name,
|
|
344
|
+
signature=self._metric_signature,
|
|
345
|
+
base_manifold=self._manifold,
|
|
346
|
+
diff_degree=self._diff_degree,
|
|
347
|
+
latex_name=latex_name,
|
|
348
|
+
metric_latex_name=self._metric_latex_name,
|
|
349
|
+
start_index=self._sindex)
|
|
350
|
+
resu._calculus_method = self._calculus_method
|
|
351
|
+
resu._supersets.update(self._supersets)
|
|
352
|
+
for sd in self._supersets:
|
|
353
|
+
sd._subsets.add(resu)
|
|
354
|
+
self._top_subsets.add(resu)
|
|
355
|
+
# Charts on the result from the coordinate definition:
|
|
356
|
+
for chart, restrictions in coord_def.items():
|
|
357
|
+
if chart not in self._atlas:
|
|
358
|
+
raise ValueError("the {} does not belong to ".format(chart) +
|
|
359
|
+
"the atlas of {}".format(self))
|
|
360
|
+
chart.restrict(resu, restrictions)
|
|
361
|
+
# Transition maps on the result inferred from those of self:
|
|
362
|
+
for chart1 in coord_def:
|
|
363
|
+
for chart2 in coord_def:
|
|
364
|
+
if chart2 != chart1 and (chart1, chart2) in self._coord_changes:
|
|
365
|
+
self._coord_changes[(chart1, chart2)].restrict(resu)
|
|
366
|
+
#!# update non-coordinate vector frames and change of frames
|
|
367
|
+
#
|
|
368
|
+
return resu
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
#*******************************************************************************************
|
|
372
|
+
|
|
373
|
+
from sage.manifolds.differentiable.tensorfield import TensorField
|
|
374
|
+
from sage.manifolds.differentiable.tensorfield_paral import TensorFieldParal
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
class TangentTensor(TensorFieldParal):
|
|
378
|
+
r"""
|
|
379
|
+
Let ``S`` be a lightlike submanifold embedded in a pseudo-Riemannian
|
|
380
|
+
manifold ``(M,g)`` with ``Phi`` the embedding map. Let ``T1`` be a tensor
|
|
381
|
+
on ``M`` along ``S`` or not. ``TangentTensor(T1, Phi)`` returns the
|
|
382
|
+
restriction ``T2`` of ``T1`` along ``S`` that in addition can be applied
|
|
383
|
+
only on vector fields tangent to ``S``, when ``T1`` has a covariant part.
|
|
384
|
+
|
|
385
|
+
INPUT:
|
|
386
|
+
|
|
387
|
+
- ``tensor`` -- a tensor field on the ambient manifold
|
|
388
|
+
- ``embedding`` -- the embedding map ``Phi``
|
|
389
|
+
|
|
390
|
+
EXAMPLES:
|
|
391
|
+
|
|
392
|
+
Section of the lightcone of the Minkowski space with a hyperplane
|
|
393
|
+
passing through the origin::
|
|
394
|
+
|
|
395
|
+
sage: M = Manifold(4, 'M', structure='Lorentzian')
|
|
396
|
+
sage: X.<t,x,y,z> = M.chart()
|
|
397
|
+
sage: S = Manifold(2, 'S', ambient=M, structure='degenerate_metric')
|
|
398
|
+
sage: X_S.<u,v> = S.chart()
|
|
399
|
+
sage: Phi = S.diff_map(M, {(X_S, X): [sqrt(u^2+v^2), u, v, 0]},
|
|
400
|
+
....: name='Phi', latex_name=r'\Phi')
|
|
401
|
+
sage: Phi_inv = M.diff_map(S, {(X, X_S): [x, y]}, name='Phi_inv',
|
|
402
|
+
....: latex_name=r'\Phi^{-1}')
|
|
403
|
+
sage: S.set_immersion(Phi, inverse=Phi_inv); S.declare_embedding()
|
|
404
|
+
sage: g = M.metric()
|
|
405
|
+
sage: g[0,0], g[1,1], g[2,2], g[3,3] = -1, 1, 1, 1
|
|
406
|
+
sage: V = M.vector_field(0,0,0,1)
|
|
407
|
+
sage: S.set_transverse(rigging=t, normal=V)
|
|
408
|
+
sage: xi = M.vector_field(sqrt(x^2+y^2+z^2), x, y, 0)
|
|
409
|
+
sage: U = M.vector_field(0, -y, x, 0)
|
|
410
|
+
sage: Sc = S.screen('Sc', U, xi);
|
|
411
|
+
sage: T1 = M.tensor_field(1,1).along(Phi); T1[0,0] = 1
|
|
412
|
+
sage: V1 = M.vector_field().along(Phi); V1[0] = 1; V1[1]=1
|
|
413
|
+
sage: T1(V1).display()
|
|
414
|
+
∂/∂t
|
|
415
|
+
sage: from sage.manifolds.differentiable.degenerate_submanifold import TangentTensor
|
|
416
|
+
sage: T2 = TangentTensor(T1, Phi)
|
|
417
|
+
sage: T2
|
|
418
|
+
Tensor field of type (1,1) along the 2-dimensional degenerate
|
|
419
|
+
submanifold S embedded in 4-dimensional differentiable manifold M
|
|
420
|
+
with values on the 4-dimensional Lorentzian manifold M
|
|
421
|
+
sage: V2 = S.projection(V1)
|
|
422
|
+
sage: T2(V2).display()
|
|
423
|
+
u/sqrt(u^2 + v^2) ∂/∂t
|
|
424
|
+
|
|
425
|
+
Of course `T1` and `T2` give the same output on vector fields tangent to S::
|
|
426
|
+
|
|
427
|
+
sage: T1(xi.along(Phi)).display()
|
|
428
|
+
sqrt(u^2 + v^2) ∂/∂t
|
|
429
|
+
sage: T2(xi.along(Phi)).display()
|
|
430
|
+
sqrt(u^2 + v^2) ∂/∂t
|
|
431
|
+
"""
|
|
432
|
+
def __init__(self, tensor, embedding, screen=None):
|
|
433
|
+
r"""
|
|
434
|
+
|
|
435
|
+
TESTS::
|
|
436
|
+
|
|
437
|
+
sage: M = Manifold(4, 'M', structure='Lorentzian')
|
|
438
|
+
sage: X.<t,x,y,z> = M.chart()
|
|
439
|
+
sage: S = Manifold(3, 'S', ambient=M, structure='degenerate_metric')
|
|
440
|
+
sage: X_S.<u,v,w> = S.chart()
|
|
441
|
+
sage: Phi = S.diff_map(M, {(X_S, X): [u, u, v, w]},
|
|
442
|
+
....: name='Phi', latex_name=r'\Phi');
|
|
443
|
+
sage: Phi_inv = M.diff_map(S, {(X, X_S): [x,y, z]}, name='Phi_inv',
|
|
444
|
+
....: latex_name=r'\Phi^{-1}');
|
|
445
|
+
sage: S.set_immersion(Phi, inverse=Phi_inv); S.declare_embedding()
|
|
446
|
+
sage: g = M.metric()
|
|
447
|
+
sage: g[0,0], g[1,1], g[2,2], g[3,3] = -1,1,1,1
|
|
448
|
+
sage: v = M.vector_field(); v[1] = 1
|
|
449
|
+
sage: S.set_transverse(rigging=v)
|
|
450
|
+
sage: xi = M.vector_field(); xi[0] = 1; xi[1] = 1
|
|
451
|
+
sage: U = M.vector_field(); U[2] = 1; V = M.vector_field(); V[3] = 1
|
|
452
|
+
sage: Sc = S.screen('Sc', (U,V), xi);
|
|
453
|
+
sage: T1 = M.tensor_field(1,1).along(Phi); T1[0,0] = 1
|
|
454
|
+
sage: from sage.manifolds.differentiable.degenerate_submanifold import TangentTensor
|
|
455
|
+
sage: T2 = TangentTensor(T1, Phi); T2
|
|
456
|
+
Tensor field of type (1,1) along the degenerate hypersurface S embedded in
|
|
457
|
+
4-dimensional differentiable manifold M with values on the 4-dimensional
|
|
458
|
+
Lorentzian manifold M
|
|
459
|
+
"""
|
|
460
|
+
if not isinstance(tensor, TensorField):
|
|
461
|
+
raise TypeError("the second argument must be a tensor field")
|
|
462
|
+
self._tensor = tensor
|
|
463
|
+
self._tensor.set_name(tensor._name, latex_name=tensor._latex_name)
|
|
464
|
+
self._embedding = embedding
|
|
465
|
+
try:
|
|
466
|
+
tensor = tensor.along(embedding)
|
|
467
|
+
except ValueError:
|
|
468
|
+
pass
|
|
469
|
+
if isinstance(tensor, TensorFieldParal):
|
|
470
|
+
TensorFieldParal.__init__(self, tensor._vmodule, tensor._tensor_type, name=tensor._name,
|
|
471
|
+
latex_name=tensor._latex_name, sym=tensor._sym, antisym=tensor._antisym)
|
|
472
|
+
else:
|
|
473
|
+
TensorField.__init__(self, tensor._vmodule, tensor._tensor_type, name=tensor._name,
|
|
474
|
+
latex_name=tensor._latex_name, sym=tensor._sym, antisym=tensor._antisym)
|
|
475
|
+
f = tensor._domain._ambient.default_frame().along(embedding)
|
|
476
|
+
self[f, :] = tensor[f, :]
|
|
477
|
+
frame = self._domain.adapted_frame(screen)
|
|
478
|
+
self.display(frame)
|
|
479
|
+
for i in self._domain._ambient.index_generator(tensor.tensor_rank()):
|
|
480
|
+
for j in range(len(i)):
|
|
481
|
+
if i[j] == self._domain._ambient._dim-self._domain._sindex-1:
|
|
482
|
+
self[frame, i] = 0
|
|
483
|
+
|
|
484
|
+
def __call__(self, *args):
|
|
485
|
+
r"""
|
|
486
|
+
|
|
487
|
+
TESTS::
|
|
488
|
+
|
|
489
|
+
sage: M = Manifold(4, 'M', structure='Lorentzian')
|
|
490
|
+
sage: X.<t,x,y,z> = M.chart()
|
|
491
|
+
sage: S = Manifold(3, 'S', ambient=M, structure='degenerate_metric')
|
|
492
|
+
sage: X_S.<u,v,w> = S.chart()
|
|
493
|
+
sage: Phi = S.diff_map(M, {(X_S, X): [u, u, v, w]},
|
|
494
|
+
....: name='Phi', latex_name=r'\Phi');
|
|
495
|
+
sage: Phi_inv = M.diff_map(S, {(X, X_S): [x,y, z]}, name='Phi_inv',
|
|
496
|
+
....: latex_name=r'\Phi^{-1}');
|
|
497
|
+
sage: S.set_immersion(Phi, inverse=Phi_inv); S.declare_embedding()
|
|
498
|
+
sage: g = M.metric()
|
|
499
|
+
sage: g[0,0], g[1,1], g[2,2], g[3,3] = -1,1,1,1
|
|
500
|
+
sage: v = M.vector_field(); v[1] = 1
|
|
501
|
+
sage: S.set_transverse(rigging=v)
|
|
502
|
+
sage: xi = M.vector_field(); xi[0] = 1; xi[1] = 1
|
|
503
|
+
sage: U = M.vector_field(); U[2] = 1; V = M.vector_field(); V[3] = 1
|
|
504
|
+
sage: Sc = S.screen('Sc', (U,V), xi);
|
|
505
|
+
sage: T1 = M.tensor_field(1,1).along(Phi); T1[0,0] = 1
|
|
506
|
+
sage: from sage.manifolds.differentiable.degenerate_submanifold import TangentTensor
|
|
507
|
+
sage: T2 = TangentTensor(T1, Phi); T2(xi.along(Phi))
|
|
508
|
+
Vector field along the degenerate hypersurface S embedded in
|
|
509
|
+
4-dimensional differentiable manifold M with values on the 4-dimensional
|
|
510
|
+
Lorentzian manifold M
|
|
511
|
+
"""
|
|
512
|
+
for vector in args:
|
|
513
|
+
try:
|
|
514
|
+
vector = vector.along(self._embedding)
|
|
515
|
+
except ValueError:
|
|
516
|
+
pass
|
|
517
|
+
if not self._domain.is_tangent(vector):
|
|
518
|
+
raise ValueError("The provided vector field is not " +
|
|
519
|
+
"tangent to {}".format(self._domain._name))
|
|
520
|
+
try:
|
|
521
|
+
return TensorField.__call__(self._tensor.along(self._embedding), *args)
|
|
522
|
+
except ValueError:
|
|
523
|
+
return TensorField.__call__(self._tensor, *args)
|
|
524
|
+
|
|
525
|
+
def extension(self):
|
|
526
|
+
r"""
|
|
527
|
+
|
|
528
|
+
Return initial tensor
|
|
529
|
+
|
|
530
|
+
EXAMPLES:
|
|
531
|
+
|
|
532
|
+
Section of the lightcone of the Minkowski space with a hyperplane
|
|
533
|
+
passing through the origin::
|
|
534
|
+
|
|
535
|
+
sage: M = Manifold(4, 'M', structure='Lorentzian')
|
|
536
|
+
sage: X.<t,x,y,z> = M.chart()
|
|
537
|
+
sage: S = Manifold(2, 'S', ambient=M, structure='degenerate_metric')
|
|
538
|
+
sage: X_S.<u,v> = S.chart()
|
|
539
|
+
sage: Phi = S.diff_map(M, {(X_S, X): [sqrt(u^2+v^2), u, v, 0]},
|
|
540
|
+
....: name='Phi', latex_name=r'\Phi')
|
|
541
|
+
sage: Phi_inv = M.diff_map(S, {(X, X_S): [x, y]}, name='Phi_inv',
|
|
542
|
+
....: latex_name=r'\Phi^{-1}')
|
|
543
|
+
sage: S.set_immersion(Phi, inverse=Phi_inv); S.declare_embedding()
|
|
544
|
+
sage: g = M.metric()
|
|
545
|
+
sage: g[0,0], g[1,1], g[2,2], g[3,3] = -1,1,1,1
|
|
546
|
+
sage: V = M.vector_field(); V[3] = 1
|
|
547
|
+
sage: S.set_transverse(rigging=t, normal=V)
|
|
548
|
+
sage: xi = M.vector_field(); xi[0] = sqrt(x^2+y^2+z^2); xi[1] = x; xi[2] = y
|
|
549
|
+
sage: U = M.vector_field(); U[1] = -y; U[2] = x
|
|
550
|
+
sage: Sc = S.screen('Sc', U, xi);
|
|
551
|
+
sage: T1 = M.tensor_field(1,1).along(Phi); T1[0,0] = 1
|
|
552
|
+
sage: from sage.manifolds.differentiable.degenerate_submanifold import TangentTensor
|
|
553
|
+
sage: T2 = TangentTensor(T1, Phi); T3 = T2.extension()
|
|
554
|
+
sage: T3 is T2
|
|
555
|
+
False
|
|
556
|
+
sage: T3 is T1
|
|
557
|
+
True
|
|
558
|
+
"""
|
|
559
|
+
return self._tensor
|