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.

Files changed (172) hide show
  1. passagemath_symbolics/.dylibs/libgmp.10.dylib +0 -0
  2. passagemath_symbolics/__init__.py +3 -0
  3. passagemath_symbolics-10.6.40.dist-info/METADATA +187 -0
  4. passagemath_symbolics-10.6.40.dist-info/RECORD +172 -0
  5. passagemath_symbolics-10.6.40.dist-info/WHEEL +6 -0
  6. passagemath_symbolics-10.6.40.dist-info/top_level.txt +3 -0
  7. sage/all__sagemath_symbolics.py +17 -0
  8. sage/calculus/all.py +14 -0
  9. sage/calculus/calculus.py +2826 -0
  10. sage/calculus/desolvers.py +1866 -0
  11. sage/calculus/predefined.py +51 -0
  12. sage/calculus/tests.py +225 -0
  13. sage/calculus/var.cpython-314t-darwin.so +0 -0
  14. sage/calculus/var.pyx +401 -0
  15. sage/dynamics/all__sagemath_symbolics.py +6 -0
  16. sage/dynamics/complex_dynamics/all.py +5 -0
  17. sage/dynamics/complex_dynamics/mandel_julia.py +765 -0
  18. sage/dynamics/complex_dynamics/mandel_julia_helper.cpython-314t-darwin.so +0 -0
  19. sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +1035 -0
  20. sage/ext/all__sagemath_symbolics.py +1 -0
  21. sage/ext_data/kenzo/CP2.txt +45 -0
  22. sage/ext_data/kenzo/CP3.txt +349 -0
  23. sage/ext_data/kenzo/CP4.txt +4774 -0
  24. sage/ext_data/kenzo/README.txt +49 -0
  25. sage/ext_data/kenzo/S4.txt +20 -0
  26. sage/ext_data/magma/latex/latex.m +1021 -0
  27. sage/ext_data/magma/latex/latex.spec +1 -0
  28. sage/ext_data/magma/sage/basic.m +356 -0
  29. sage/ext_data/magma/sage/sage.spec +1 -0
  30. sage/ext_data/magma/spec +9 -0
  31. sage/geometry/all__sagemath_symbolics.py +8 -0
  32. sage/geometry/hyperbolic_space/all.py +5 -0
  33. sage/geometry/hyperbolic_space/hyperbolic_coercion.py +743 -0
  34. sage/geometry/hyperbolic_space/hyperbolic_constants.py +5 -0
  35. sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +2409 -0
  36. sage/geometry/hyperbolic_space/hyperbolic_interface.py +206 -0
  37. sage/geometry/hyperbolic_space/hyperbolic_isometry.py +1082 -0
  38. sage/geometry/hyperbolic_space/hyperbolic_model.py +1502 -0
  39. sage/geometry/hyperbolic_space/hyperbolic_point.py +621 -0
  40. sage/geometry/riemannian_manifolds/all.py +7 -0
  41. sage/geometry/riemannian_manifolds/parametrized_surface3d.py +1632 -0
  42. sage/geometry/riemannian_manifolds/surface3d_generators.py +461 -0
  43. sage/interfaces/all__sagemath_symbolics.py +1 -0
  44. sage/interfaces/magma.py +3017 -0
  45. sage/interfaces/magma_free.py +92 -0
  46. sage/interfaces/maple.py +1397 -0
  47. sage/interfaces/mathematica.py +1345 -0
  48. sage/interfaces/mathics.py +1312 -0
  49. sage/interfaces/sympy.py +1398 -0
  50. sage/interfaces/sympy_wrapper.py +197 -0
  51. sage/interfaces/tides.py +938 -0
  52. sage/libs/all__sagemath_symbolics.py +6 -0
  53. sage/manifolds/all.py +7 -0
  54. sage/manifolds/calculus_method.py +555 -0
  55. sage/manifolds/catalog.py +437 -0
  56. sage/manifolds/chart.py +4019 -0
  57. sage/manifolds/chart_func.py +3419 -0
  58. sage/manifolds/continuous_map.py +2183 -0
  59. sage/manifolds/continuous_map_image.py +155 -0
  60. sage/manifolds/differentiable/affine_connection.py +2475 -0
  61. sage/manifolds/differentiable/all.py +1 -0
  62. sage/manifolds/differentiable/automorphismfield.py +1383 -0
  63. sage/manifolds/differentiable/automorphismfield_group.py +604 -0
  64. sage/manifolds/differentiable/bundle_connection.py +1445 -0
  65. sage/manifolds/differentiable/characteristic_cohomology_class.py +1840 -0
  66. sage/manifolds/differentiable/chart.py +1241 -0
  67. sage/manifolds/differentiable/curve.py +1028 -0
  68. sage/manifolds/differentiable/de_rham_cohomology.py +541 -0
  69. sage/manifolds/differentiable/degenerate.py +559 -0
  70. sage/manifolds/differentiable/degenerate_submanifold.py +1671 -0
  71. sage/manifolds/differentiable/diff_form.py +1658 -0
  72. sage/manifolds/differentiable/diff_form_module.py +1062 -0
  73. sage/manifolds/differentiable/diff_map.py +1315 -0
  74. sage/manifolds/differentiable/differentiable_submanifold.py +291 -0
  75. sage/manifolds/differentiable/examples/all.py +1 -0
  76. sage/manifolds/differentiable/examples/euclidean.py +2517 -0
  77. sage/manifolds/differentiable/examples/real_line.py +897 -0
  78. sage/manifolds/differentiable/examples/sphere.py +1186 -0
  79. sage/manifolds/differentiable/examples/symplectic_space.py +187 -0
  80. sage/manifolds/differentiable/examples/symplectic_space_test.py +40 -0
  81. sage/manifolds/differentiable/integrated_curve.py +4035 -0
  82. sage/manifolds/differentiable/levi_civita_connection.py +841 -0
  83. sage/manifolds/differentiable/manifold.py +4254 -0
  84. sage/manifolds/differentiable/manifold_homset.py +1826 -0
  85. sage/manifolds/differentiable/metric.py +3032 -0
  86. sage/manifolds/differentiable/mixed_form.py +1507 -0
  87. sage/manifolds/differentiable/mixed_form_algebra.py +559 -0
  88. sage/manifolds/differentiable/multivector_module.py +800 -0
  89. sage/manifolds/differentiable/multivectorfield.py +1520 -0
  90. sage/manifolds/differentiable/poisson_tensor.py +268 -0
  91. sage/manifolds/differentiable/pseudo_riemannian.py +755 -0
  92. sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +1839 -0
  93. sage/manifolds/differentiable/scalarfield.py +1343 -0
  94. sage/manifolds/differentiable/scalarfield_algebra.py +472 -0
  95. sage/manifolds/differentiable/symplectic_form.py +910 -0
  96. sage/manifolds/differentiable/symplectic_form_test.py +220 -0
  97. sage/manifolds/differentiable/tangent_space.py +412 -0
  98. sage/manifolds/differentiable/tangent_vector.py +616 -0
  99. sage/manifolds/differentiable/tensorfield.py +4665 -0
  100. sage/manifolds/differentiable/tensorfield_module.py +963 -0
  101. sage/manifolds/differentiable/tensorfield_paral.py +2450 -0
  102. sage/manifolds/differentiable/tensorfield_paral_test.py +16 -0
  103. sage/manifolds/differentiable/vector_bundle.py +1728 -0
  104. sage/manifolds/differentiable/vectorfield.py +1717 -0
  105. sage/manifolds/differentiable/vectorfield_module.py +2445 -0
  106. sage/manifolds/differentiable/vectorframe.py +1832 -0
  107. sage/manifolds/family.py +270 -0
  108. sage/manifolds/local_frame.py +1490 -0
  109. sage/manifolds/manifold.py +3090 -0
  110. sage/manifolds/manifold_homset.py +452 -0
  111. sage/manifolds/operators.py +359 -0
  112. sage/manifolds/point.py +994 -0
  113. sage/manifolds/scalarfield.py +3718 -0
  114. sage/manifolds/scalarfield_algebra.py +629 -0
  115. sage/manifolds/section.py +3111 -0
  116. sage/manifolds/section_module.py +831 -0
  117. sage/manifolds/structure.py +229 -0
  118. sage/manifolds/subset.py +2764 -0
  119. sage/manifolds/subsets/all.py +1 -0
  120. sage/manifolds/subsets/closure.py +131 -0
  121. sage/manifolds/subsets/pullback.py +885 -0
  122. sage/manifolds/topological_submanifold.py +891 -0
  123. sage/manifolds/trivialization.py +733 -0
  124. sage/manifolds/utilities.py +1348 -0
  125. sage/manifolds/vector_bundle.py +1342 -0
  126. sage/manifolds/vector_bundle_fiber.py +332 -0
  127. sage/manifolds/vector_bundle_fiber_element.py +111 -0
  128. sage/matrix/all__sagemath_symbolics.py +1 -0
  129. sage/matrix/matrix_symbolic_dense.cpython-314t-darwin.so +0 -0
  130. sage/matrix/matrix_symbolic_dense.pxd +6 -0
  131. sage/matrix/matrix_symbolic_dense.pyx +1022 -0
  132. sage/matrix/matrix_symbolic_sparse.cpython-314t-darwin.so +0 -0
  133. sage/matrix/matrix_symbolic_sparse.pxd +6 -0
  134. sage/matrix/matrix_symbolic_sparse.pyx +1029 -0
  135. sage/modules/all__sagemath_symbolics.py +1 -0
  136. sage/modules/vector_callable_symbolic_dense.py +105 -0
  137. sage/modules/vector_symbolic_dense.py +116 -0
  138. sage/modules/vector_symbolic_sparse.py +118 -0
  139. sage/rings/all__sagemath_symbolics.py +4 -0
  140. sage/rings/asymptotic/all.py +6 -0
  141. sage/rings/asymptotic/asymptotic_expansion_generators.py +1485 -0
  142. sage/rings/asymptotic/asymptotic_ring.py +4858 -0
  143. sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +4153 -0
  144. sage/rings/asymptotic/growth_group.py +5373 -0
  145. sage/rings/asymptotic/growth_group_cartesian.py +1400 -0
  146. sage/rings/asymptotic/term_monoid.py +5237 -0
  147. sage/rings/function_field/all__sagemath_symbolics.py +2 -0
  148. sage/rings/polynomial/all__sagemath_symbolics.py +1 -0
  149. sage/symbolic/all.py +15 -0
  150. sage/symbolic/assumptions.py +985 -0
  151. sage/symbolic/benchmark.py +93 -0
  152. sage/symbolic/callable.py +459 -0
  153. sage/symbolic/complexity_measures.py +35 -0
  154. sage/symbolic/constants.py +1287 -0
  155. sage/symbolic/expression_conversion_algebraic.py +310 -0
  156. sage/symbolic/expression_conversion_sympy.py +317 -0
  157. sage/symbolic/expression_conversions.py +1713 -0
  158. sage/symbolic/function_factory.py +355 -0
  159. sage/symbolic/integration/all.py +1 -0
  160. sage/symbolic/integration/external.py +270 -0
  161. sage/symbolic/integration/integral.py +1115 -0
  162. sage/symbolic/maxima_wrapper.py +162 -0
  163. sage/symbolic/operators.py +267 -0
  164. sage/symbolic/random_tests.py +462 -0
  165. sage/symbolic/relation.py +1907 -0
  166. sage/symbolic/ring.cpython-314t-darwin.so +0 -0
  167. sage/symbolic/ring.pxd +5 -0
  168. sage/symbolic/ring.pyx +1396 -0
  169. sage/symbolic/subring.py +1025 -0
  170. sage/symbolic/symengine.py +19 -0
  171. sage/symbolic/tests.py +40 -0
  172. sage/symbolic/units.py +1470 -0
@@ -0,0 +1,733 @@
1
+ # sage_setup: distribution = sagemath-symbolics
2
+ r"""
3
+ Trivializations
4
+
5
+ The class :class:`Trivialization` implements trivializations on vector bundles.
6
+ The corresponding transition maps between two trivializations are represented by
7
+ :class:`TransitionMap`.
8
+
9
+ AUTHORS:
10
+
11
+ - Michael Jung (2019) : initial version
12
+ """
13
+
14
+ # ****************************************************************************
15
+ # Copyright (C) 2019 Michael Jung <micjung@uni-potsdam.de>
16
+ #
17
+ # This program is free software: you can redistribute it and/or modify
18
+ # it under the terms of the GNU General Public License as published by
19
+ # the Free Software Foundation, either version 2 of the License, or
20
+ # (at your option) any later version.
21
+ # https://www.gnu.org/licenses/
22
+ # ****************************************************************************
23
+
24
+ from sage.manifolds.local_frame import TrivializationFrame
25
+ from sage.structure.sage_object import SageObject
26
+ from sage.structure.unique_representation import UniqueRepresentation
27
+
28
+
29
+ class Trivialization(UniqueRepresentation, SageObject):
30
+ r"""
31
+ A local trivialization of a given vector bundle.
32
+
33
+ Let `\pi:E \to M` be a vector bundle of rank `n` and class `C^k` over the
34
+ field `K`
35
+ (see :class:`~sage.manifolds.vector_bundle.TopologicalVectorBundle` or
36
+ :class:`~sage.manifolds.differentiable.vector_bundle.DifferentiableVectorBundle`).
37
+ A *local trivialization* over an open subset `U \subset M` is a
38
+ `C^k`-diffeomorphism `\varphi: \pi^{-1}(U) \to U \times K^n` such that
39
+ `\pi \circ \varphi^{-1}=\mathrm{pr}_1` and `v \mapsto \varphi^{-1}(q,v)`
40
+ is a linear isomorphism for any `q \in U`.
41
+
42
+ .. NOTE::
43
+
44
+ Notice that frames and trivializations are equivalent concepts (for
45
+ further details see :class:`~sage.manifolds.local_frame.LocalFrame`).
46
+ However, in order to facilitate applications and being consistent with
47
+ the implementations of charts, trivializations are introduced
48
+ separately.
49
+
50
+ EXAMPLES:
51
+
52
+ Local trivializations on a real rank 2 vector bundle over the 2-sphere::
53
+
54
+ sage: S2 = Manifold(2, 'S^2', structure='top')
55
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
56
+ sage: S2.declare_union(U,V)
57
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
58
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
59
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
60
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
61
+ ....: restrictions2= u^2+v^2!=0)
62
+ sage: W = U.intersection(V)
63
+ sage: uv_to_xy = xy_to_uv.inverse()
64
+ sage: E = S2.vector_bundle(2, 'E')
65
+ sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
66
+ ....: domain=U); phi_U
67
+ Trivialization (phi_U, E|_U)
68
+ sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
69
+ ....: domain=V); phi_V
70
+ Trivialization (phi_V, E|_V)
71
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]]); phi_U_to_phi_V
72
+ Transition map from Trivialization (phi_U, E|_U) to Trivialization
73
+ (phi_V, E|_V)
74
+
75
+ The LaTeX output gives the following::
76
+
77
+ sage: latex(phi_U)
78
+ \varphi_U : E |_{U} \to U \times \Bold{R}^2
79
+ sage: latex(phi_V)
80
+ \varphi_V : E |_{V} \to V \times \Bold{R}^2
81
+
82
+ The trivializations are part of the vector bundle atlas::
83
+
84
+ sage: E.atlas()
85
+ [Trivialization (phi_U, E|_U), Trivialization (phi_V, E|_V)]
86
+
87
+ Each trivialization induces a local trivialization frame::
88
+
89
+ sage: fU = phi_U.frame(); fU
90
+ Trivialization frame (E|_U, ((phi_U^*e_1),(phi_U^*e_2)))
91
+ sage: fV = phi_V.frame(); fV
92
+ Trivialization frame (E|_V, ((phi_V^*e_1),(phi_V^*e_2)))
93
+
94
+ and the transition map connects these two frames via a bundle automorphism::
95
+
96
+ sage: aut = phi_U_to_phi_V.automorphism(); aut
97
+ Automorphism phi_U^(-1)*phi_V of the Free module C^0(W;E) of sections on
98
+ the Open subset W of the 2-dimensional topological manifold S^2 with
99
+ values in the real vector bundle E of rank 2
100
+ sage: aut.display(fU.restrict(W))
101
+ phi_U^(-1)*phi_V = (phi_U^*e_1)⊗(phi_U^*e^2) + (phi_U^*e_2)⊗(phi_U^*e^1)
102
+ sage: aut.display(fV.restrict(W))
103
+ phi_U^(-1)*phi_V = (phi_V^*e_1)⊗(phi_V^*e^2) + (phi_V^*e_2)⊗(phi_V^*e^1)
104
+
105
+ The automorphisms are listed in the frame changes of the vector bundle::
106
+
107
+ sage: E.changes_of_frame() # random
108
+ {(Local frame (E|_W, ((phi_U^*e_1),(phi_U^*e_2))),
109
+ Local frame (E|_W, ((phi_V^*e_1),(phi_V^*e_2)))): Automorphism
110
+ phi_U^(-1)*phi_V^(-1) of the Free module C^0(W;E) of sections on the
111
+ Open subset W of the 2-dimensional topological manifold S^2 with values
112
+ in the real vector bundle E of rank 2,
113
+ (Local frame (E|_W, ((phi_V^*e_1),(phi_V^*e_2))),
114
+ Local frame (E|_W, ((phi_U^*e_1),(phi_U^*e_2)))): Automorphism
115
+ phi_U^(-1)*phi_V of the Free module C^0(W;E) of sections on the Open
116
+ subset W of the 2-dimensional topological manifold S^2 with values in
117
+ the real vector bundle E of rank 2}
118
+
119
+ Let us check the components of ``fU`` with respect to the frame ``fV``::
120
+
121
+ sage: fU[0].comp(fV.restrict(W))[:]
122
+ [0, 1]
123
+ sage: fU[1].comp(fV.restrict(W))[:]
124
+ [1, 0]
125
+ """
126
+
127
+ def __init__(self, vector_bundle, name, domain, latex_name=None):
128
+ r"""
129
+ Construct a local trivialization of the vector bundle ``vector_bundle``.
130
+
131
+ TESTS::
132
+
133
+ sage: M = Manifold(3, 'M', structure='topological')
134
+ sage: E = M.vector_bundle(2, 'E')
135
+ sage: phi = E.trivialization('phi')
136
+ sage: TestSuite(phi).run()
137
+ """
138
+ self._name = name
139
+ if latex_name is None:
140
+ self._latex_name = self._name
141
+ else:
142
+ self._latex_name = latex_name
143
+ self._base_space = vector_bundle.base_space()
144
+ self._vbundle = vector_bundle
145
+ self._bdl_rank = vector_bundle.rank()
146
+ self._base_field = vector_bundle.base_field()
147
+ self._sindex = self._base_space.start_index()
148
+ self._domain = domain
149
+ # Add this trivialization to the atlas of the vector bundle:
150
+ vector_bundle._atlas.append(self)
151
+ self._frame = TrivializationFrame(self)
152
+ self._coframe = self._frame._coframe
153
+
154
+ def _repr_(self):
155
+ r"""
156
+ String representation of ``self``.
157
+
158
+ TESTS::
159
+
160
+ sage: M = Manifold(2, 'M', structure='top')
161
+ sage: E = M.vector_bundle(1, 'E')
162
+ sage: phi = E.trivialization('phi', domain=M)
163
+ sage: phi._repr_()
164
+ 'Trivialization (phi, E|_M)'
165
+ """
166
+ desc = "Trivialization ("
167
+ desc += self._name + ", "
168
+ desc += "{}|_{})".format(self._vbundle._name, self._domain._name)
169
+ return desc
170
+
171
+ def _latex_(self):
172
+ r"""
173
+ Return the LaTeX representation of the object.
174
+
175
+ TESTS::
176
+
177
+ sage: M = Manifold(2, 'M', structure='top')
178
+ sage: E = M.vector_bundle(1, 'E')
179
+ sage: phi = E.trivialization('phi', domain=M, latex_name=r'\varphi')
180
+ sage: phi._latex_()
181
+ '\\varphi : E |_{M} \\to M \\times \\Bold{R}^1'
182
+ """
183
+ latex = self._latex_name + r' : '
184
+ latex += r'{} |_{{{}}} \to {} \times {}^{}'.format(self._vbundle._latex_name,
185
+ self._domain._latex_(), self._domain._latex_(),
186
+ self._base_field._latex_(), self._bdl_rank)
187
+ return latex
188
+
189
+ def base_space(self):
190
+ r"""
191
+ Return the manifold on which the trivialization is defined.
192
+
193
+ EXAMPLES::
194
+
195
+ sage: M = Manifold(2, 'M', structure='top')
196
+ sage: U = M.open_subset('U')
197
+ sage: E = M.vector_bundle(2, 'E')
198
+ sage: phi = E.trivialization('phi', domain=U)
199
+ sage: phi.base_space()
200
+ 2-dimensional topological manifold M
201
+ """
202
+ return self._base_space
203
+
204
+ def transition_map(self, other, transf, compute_inverse=True):
205
+ r"""
206
+ Return the transition map between ``self`` and ``other``.
207
+
208
+ INPUT:
209
+
210
+ - ``other`` -- the trivialization where the transition map from ``self``
211
+ goes to
212
+ - ``transf`` -- transformation of the transition map
213
+ - ``intersection_name`` -- (default: ``None``) name to be given to the
214
+ subset `U \cap V` if the latter differs from `U` or `V`
215
+
216
+ EXAMPLES::
217
+
218
+ sage: M = Manifold(2, 'M', structure='top')
219
+ sage: X.<x,y> = M.chart()
220
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
221
+ sage: XU = X.restrict(U); XV = X.restrict(U)
222
+ sage: W = U.intersection(V)
223
+ sage: XW = X.restrict(W)
224
+ sage: E = M.vector_bundle(2, 'E')
225
+ sage: phi_U = E.trivialization('phi_U', domain=U)
226
+ sage: phi_V = E.trivialization('phi_V', domain=V)
227
+ sage: phi_U.transition_map(phi_V, 1)
228
+ Transition map from Trivialization (phi_U, E|_U) to Trivialization
229
+ (phi_V, E|_V)
230
+ """
231
+ return TransitionMap(self, other, transf,
232
+ compute_inverse=compute_inverse)
233
+
234
+ def vector_bundle(self):
235
+ r"""
236
+ Return the vector bundle on which the trivialization is defined.
237
+
238
+ EXAMPLES::
239
+
240
+ sage: M = Manifold(2, 'M', structure='top')
241
+ sage: U = M.open_subset('U')
242
+ sage: E = M.vector_bundle(2, 'E')
243
+ sage: phi = E.trivialization('phi', domain=U)
244
+ sage: phi.vector_bundle()
245
+ Topological real vector bundle E -> M of rank 2 over the base space
246
+ 2-dimensional topological manifold M
247
+ """
248
+ return self._vbundle
249
+
250
+ def domain(self):
251
+ r"""
252
+ Return the domain on which the trivialization is defined.
253
+
254
+ EXAMPLES::
255
+
256
+ sage: M = Manifold(2, 'M', structure='top')
257
+ sage: U = M.open_subset('U')
258
+ sage: E = M.vector_bundle(2, 'E')
259
+ sage: phi = E.trivialization('phi', domain=U)
260
+ sage: phi.domain()
261
+ Open subset U of the 2-dimensional topological manifold M
262
+ """
263
+ return self._domain
264
+
265
+ def frame(self):
266
+ r"""
267
+ Return the standard frame induced by ``self``. If `\psi` is a
268
+ trivialization then the corresponding frame can be obtained by the maps
269
+ `p \mapsto \psi^{-1}(p,e_i)`, where `(e_1, \ldots, e_n)` is the standard
270
+ basis of `K^n`. We briefly denote `(\psi^*e_i)` instead of
271
+ `\psi^{-1}(\cdot,e_i)`.
272
+
273
+ .. SEEALSO::
274
+
275
+ :class:`~sage.manifolds.local_frame.LocalFrame`
276
+
277
+ EXAMPLES::
278
+
279
+ sage: M = Manifold(2, 'M', structure='top')
280
+ sage: E = M.vector_bundle(2, 'E')
281
+ sage: phi = E.trivialization('phi')
282
+ sage: phi.frame()
283
+ Trivialization frame (E|_M, ((phi^*e_1),(phi^*e_2)))
284
+ """
285
+ return self._frame
286
+
287
+ def coframe(self):
288
+ r"""
289
+ Return the standard coframe induced by ``self``.
290
+
291
+ .. SEEALSO::
292
+
293
+ :class:`~sage.manifolds.local_frame.LocalCoFrame`
294
+
295
+ EXAMPLES::
296
+
297
+ sage: M = Manifold(2, 'M', structure='top')
298
+ sage: E = M.vector_bundle(2, 'E')
299
+ sage: phi = E.trivialization('phi')
300
+ sage: phi.coframe()
301
+ Trivialization coframe (E|_M, ((phi^*e^1),(phi^*e^2)))
302
+ """
303
+ return self._frame._coframe
304
+
305
+ # *****************************************************************************
306
+
307
+
308
+ class TransitionMap(SageObject):
309
+ r"""
310
+ Transition map between two trivializations.
311
+
312
+ Given a vector bundle `\pi : E \to M` of class `C^k` and rank `n` over the
313
+ field `K`, and two trivializations
314
+ `\varphi_U : \pi^{-1}(U) \to U \times K^n` and
315
+ `\varphi_V : \pi^{-1}(V) \to V \times K^n`, the transition map from
316
+ `\varphi_U` to `\varphi_V` is given by the composition
317
+
318
+ .. MATH::
319
+
320
+ \varphi_V \circ \varphi_U^{-1} : U \cap V \times K^n \to
321
+ U \cap V \times K^n .
322
+
323
+ This composition is of the form
324
+
325
+ .. MATH::
326
+
327
+ (p, v) \mapsto (p, g(p)v),
328
+
329
+ where `p \mapsto g(p)` is a `C^k` family of invertible `n\times n` matrices.
330
+
331
+ INPUT:
332
+
333
+ - ``triv1`` -- trivialization 1
334
+ - ``triv2`` -- trivialization 2
335
+ - ``transf`` -- the transformation between both trivializations in form of a
336
+ matrix of scalar fields (:class:`~sage.manifolds.scalarfield.ScalarField`)
337
+ or coordinate functions (:class:`~sage.manifolds.chart_func.ChartFunction`),
338
+ or a bundle automorphism
339
+ (:class:`~sage.tensor.modules.free_module_automorphism.FreeModuleAutomorphism`)
340
+ - ``compute_inverse`` -- boolean (default: ``True``); determines whether the inverse
341
+ shall be computed or not
342
+
343
+ EXAMPLES:
344
+
345
+ Transition map of two trivializations on a real rank 2 vector bundle of the
346
+ 2-sphere::
347
+
348
+ sage: S2 = Manifold(2, 'S^2', structure='top')
349
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
350
+ sage: S2.declare_union(U,V)
351
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
352
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
353
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
354
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
355
+ ....: restrictions2= u^2+v^2!=0)
356
+ sage: W = U.intersection(V)
357
+ sage: uv_to_xy = xy_to_uv.inverse()
358
+ sage: E = S2.vector_bundle(2, 'E')
359
+ sage: phi_U = E.trivialization('phi_U', domain=U)
360
+ sage: phi_V = E.trivialization('phi_V', domain=V)
361
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]])
362
+ sage: phi_U_to_phi_V
363
+ Transition map from Trivialization (phi_U, E|_U) to Trivialization
364
+ (phi_V, E|_V)
365
+ """
366
+ def __init__(self, triv1, triv2, transf, compute_inverse=True):
367
+ r"""
368
+ Construct a transition map between two trivializations.
369
+
370
+ TESTS::
371
+
372
+ sage: S2 = Manifold(2, 'S^2', structure='top')
373
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
374
+ sage: S2.declare_union(U,V)
375
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
376
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
377
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
378
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
379
+ ....: restrictions2= u^2+v^2!=0)
380
+ sage: W = U.intersection(V)
381
+ sage: uv_to_xy = xy_to_uv.inverse()
382
+ sage: E = S2.vector_bundle(2, 'E')
383
+ sage: phi_U = E.trivialization('phi_U', domain=U)
384
+ sage: phi_V = E.trivialization('phi_V', domain=V)
385
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]])
386
+ sage: TestSuite(phi_U_to_phi_V).run()
387
+ """
388
+ bs1 = triv1.base_space()
389
+ bs2 = triv2.base_space()
390
+ if bs1 is not bs2:
391
+ raise ValueError("base spaces must coincide")
392
+ self._base_space = bs1
393
+
394
+ vb1 = triv1.vector_bundle()
395
+ vb2 = triv2.vector_bundle()
396
+ if vb1 is not vb2:
397
+ raise ValueError("vector bundles must coincide")
398
+ self._vbundle = vb1
399
+ self._bdl_rank = self._vbundle.rank()
400
+
401
+ dom1 = triv1.domain()
402
+ dom2 = triv2.domain()
403
+ dom = dom1.intersection(dom2)
404
+ self._domain = dom
405
+ self._frame1 = triv1._frame.restrict(dom)
406
+ self._frame2 = triv2._frame.restrict(dom)
407
+ self._triv1 = triv1
408
+ self._triv2 = triv2
409
+ self._inverse = None
410
+ self._vbundle._transitions[(triv1, triv2)] = self
411
+ self._name = triv2._name + "*" + triv1._name + "^(-1)"
412
+ self._latex_name = triv2._latex_name + r'\circ ' + triv1._latex_name + \
413
+ r'^{-1}'
414
+ ###
415
+ # Define the automorphism
416
+ auto_name = triv1._name + "^(-1)*" + triv2._name
417
+ auto_lname = triv1._latex_name + r'^{-1} \circ ' + triv2._latex_name
418
+ sec_module = self._vbundle.section_module(dom, force_free=True)
419
+ auto_group = sec_module.general_linear_group()
420
+ auto = auto_group(transf, basis=self._frame1, name=auto_name,
421
+ latex_name=auto_lname)
422
+ self._automorphism = auto
423
+ # Add this change of basis to the basis changes
424
+ self._vbundle.set_change_of_frame(self._frame2, self._frame1, auto,
425
+ compute_inverse=compute_inverse)
426
+ if compute_inverse:
427
+ self._inverse = type(self)(self._triv2, self._triv1, ~auto,
428
+ compute_inverse=False)
429
+ self._inverse._inverse = self
430
+
431
+ def _repr_(self):
432
+ r"""
433
+ String representation of ``self``.
434
+
435
+ TESTS::
436
+
437
+ sage: M = Manifold(2, 'M', structure='top')
438
+ sage: X.<x,y> = M.chart()
439
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
440
+ sage: XU = X.restrict(U); XV = X.restrict(U)
441
+ sage: W = U.intersection(V)
442
+ sage: XW = X.restrict(W)
443
+ sage: E = M.vector_bundle(2, 'E')
444
+ sage: phi_U = E.trivialization('phi_U', domain=U)
445
+ sage: phi_V = E.trivialization('phi_V', domain=V)
446
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, 1)
447
+ sage: phi_U_to_phi_V._repr_()
448
+ 'Transition map from Trivialization (phi_U, E|_U) to Trivialization
449
+ (phi_V, E|_V)'
450
+ sage: repr(phi_U_to_phi_V)
451
+ 'Transition map from Trivialization (phi_U, E|_U) to Trivialization
452
+ (phi_V, E|_V)'
453
+ sage: phi_U_to_phi_V # indirect doctest
454
+ Transition map from Trivialization (phi_U, E|_U) to Trivialization
455
+ (phi_V, E|_V)
456
+ """
457
+ desc = "Transition map from {} to {}".format(self._triv1, self._triv2)
458
+ return desc
459
+
460
+ def _latex_(self):
461
+ r"""
462
+ Return the LaTeX representation of the object.
463
+
464
+ TESTS::
465
+
466
+ sage: M = Manifold(2, 'M', structure='top')
467
+ sage: X.<x,y> = M.chart()
468
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
469
+ sage: XU = X.restrict(U); XV = X.restrict(U)
470
+ sage: W = U.intersection(V)
471
+ sage: XW = X.restrict(W)
472
+ sage: E = M.vector_bundle(2, 'E')
473
+ sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
474
+ ....: domain=U)
475
+ sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
476
+ ....: domain=V)
477
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, 1)
478
+ sage: phi_U_to_phi_V._latex_()
479
+ '\\varphi_V\\circ \\varphi_U^{-1}:U\\cap V\\times \\Bold{R}^2 \\to
480
+ U\\cap V\\times \\Bold{R}^2'
481
+ sage: latex(phi_U_to_phi_V)
482
+ \varphi_V\circ \varphi_U^{-1}:U\cap V\times \Bold{R}^2 \to U\cap
483
+ V\times \Bold{R}^2
484
+ """
485
+ vspace_lname = r'\times {}^{}'.format(self._triv1._base_field._latex_(),
486
+ self._bdl_rank)
487
+ latex = self._latex_name + r':'
488
+ latex += self._domain._latex_name
489
+ latex += vspace_lname + r' \to '
490
+ latex += self._domain._latex_name
491
+ latex += vspace_lname
492
+ return latex
493
+
494
+ def automorphism(self):
495
+ r"""
496
+ Return the automorphism connecting both trivializations.
497
+
498
+ The family of matrices `p \mapsto g(p)` given by the transition map
499
+ induce a bundle automorphism
500
+
501
+ .. MATH::
502
+
503
+ \varphi_U^{-1} \circ \varphi_V : \pi^{-1}(U \cap V) \to
504
+ \pi^{-1}(U \cap V)
505
+
506
+ correlating the local frames induced by the trivializations in the
507
+ following way:
508
+
509
+ .. MATH::
510
+
511
+ (\varphi_U^{-1} \circ \varphi_V) (\varphi_V^*e_i) = \varphi_U^*e_i .
512
+
513
+ Then, for each point `p \in M`, the matrix `g(p)` is the representation
514
+ of the induced automorphism on the fiber `E_p=\pi^{-1}(p)` in the basis
515
+ `\left( (\varphi_V^*e_i)(p)\right)_{i=1,\dots,n}`.
516
+
517
+ EXAMPLES::
518
+
519
+ sage: S2 = Manifold(2, 'S^2', structure='top')
520
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
521
+ sage: S2.declare_union(U,V)
522
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
523
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
524
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
525
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
526
+ ....: restrictions2= u^2+v^2!=0)
527
+ sage: W = U.intersection(V)
528
+ sage: uv_to_xy = xy_to_uv.inverse()
529
+ sage: E = S2.vector_bundle(2, 'E')
530
+ sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
531
+ ....: domain=U); phi_U
532
+ Trivialization (phi_U, E|_U)
533
+ sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
534
+ ....: domain=V); phi_V
535
+ Trivialization (phi_V, E|_V)
536
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]])
537
+ sage: aut = phi_U_to_phi_V.automorphism(); aut
538
+ Automorphism phi_U^(-1)*phi_V of the Free module C^0(W;E) of
539
+ sections on the Open subset W of the 2-dimensional topological
540
+ manifold S^2 with values in the real vector bundle E of rank 2
541
+ sage: aut.display(phi_U.frame().restrict(W))
542
+ phi_U^(-1)*phi_V = (phi_U^*e_1)⊗(phi_U^*e^2) +
543
+ (phi_U^*e_2)⊗(phi_U^*e^1)
544
+ """
545
+ return self._automorphism
546
+
547
+ def inverse(self):
548
+ r"""
549
+ Return the inverse transition map.
550
+
551
+ EXAMPLES::
552
+
553
+ sage: M = Manifold(2, 'M', structure='top')
554
+ sage: X.<x,y> = M.chart()
555
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
556
+ sage: XU = X.restrict(U); XV = X.restrict(U)
557
+ sage: W = U.intersection(V)
558
+ sage: XW = X.restrict(W)
559
+ sage: E = M.vector_bundle(2, 'E')
560
+ sage: phi_U = E.trivialization('phi_U', domain=U)
561
+ sage: phi_V = E.trivialization('phi_V', domain=V)
562
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[1,1],[-1,1]],
563
+ ....: compute_inverse=False)
564
+ sage: phi_V_to_phi_U = phi_U_to_phi_V.inverse(); phi_V_to_phi_U
565
+ Transition map from Trivialization (phi_V, E|_V) to Trivialization (phi_U, E|_U)
566
+ sage: phi_V_to_phi_U.automorphism() == phi_U_to_phi_V.automorphism().inverse()
567
+ True
568
+ """
569
+ if self._inverse is None:
570
+ self._vbundle.set_change_of_frame(self._frame1, self._frame2,
571
+ ~self._automorphism)
572
+ self._inverse = type(self)(self._triv2, self._triv1,
573
+ ~self._automorphism,
574
+ compute_inverse=False)
575
+ self._inverse._inverse = self
576
+ return self._inverse
577
+
578
+ def det(self):
579
+ r"""
580
+ Return the determinant of ``self``.
581
+
582
+ OUTPUT: an instance of :class:`~sage.manifolds.scalarfield.ScalarField`
583
+
584
+ EXAMPLES::
585
+
586
+ sage: S2 = Manifold(2, 'S^2', structure='top')
587
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
588
+ sage: S2.declare_union(U,V)
589
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
590
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
591
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
592
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
593
+ ....: restrictions2= u^2+v^2!=0)
594
+ sage: W = U.intersection(V)
595
+ sage: uv_to_xy = xy_to_uv.inverse()
596
+ sage: E = S2.vector_bundle(2, 'E')
597
+ sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
598
+ ....: domain=U); phi_U
599
+ Trivialization (phi_U, E|_U)
600
+ sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
601
+ ....: domain=V); phi_V
602
+ Trivialization (phi_V, E|_V)
603
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]])
604
+ sage: det = phi_U_to_phi_V.det(); det
605
+ Scalar field det(phi_U^(-1)*phi_V) on the Open subset W of the
606
+ 2-dimensional topological manifold S^2
607
+ sage: det.display()
608
+ det(phi_U^(-1)*phi_V): W → ℝ
609
+ (x, y) ↦ -1
610
+ (u, v) ↦ -1
611
+ """
612
+ aut = self._automorphism
613
+ det = aut.det()
614
+ name = "det({})".format(aut._name)
615
+ latex_name = r'\det({})'.format(aut._latex_name)
616
+ det.set_name(name=name, latex_name=latex_name)
617
+ return det
618
+
619
+ def matrix(self):
620
+ r"""
621
+ Return the matrix representation the transition map.
622
+
623
+ EXAMPLES:
624
+
625
+ Local trivializations on a real rank 2 vector bundle over the 2-sphere::
626
+
627
+ sage: S2 = Manifold(2, 'S^2', structure='top')
628
+ sage: U = S2.open_subset('U') ; V = S2.open_subset('V') # complement of the North and South pole, respectively
629
+ sage: S2.declare_union(U,V)
630
+ sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
631
+ sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
632
+ sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)),
633
+ ....: intersection_name='W', restrictions1= x^2+y^2!=0,
634
+ ....: restrictions2= u^2+v^2!=0)
635
+ sage: W = U.intersection(V)
636
+ sage: uv_to_xy = xy_to_uv.inverse()
637
+ sage: E = S2.vector_bundle(2, 'E')
638
+ sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
639
+ ....: domain=U); phi_U
640
+ Trivialization (phi_U, E|_U)
641
+ sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
642
+ ....: domain=V); phi_V
643
+ Trivialization (phi_V, E|_V)
644
+
645
+ The input is coerced into a bundle automorphism. From there, the matrix
646
+ can be recovered::
647
+
648
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[0,1],[1,0]])
649
+ sage: matrix = phi_U_to_phi_V.matrix(); matrix
650
+ [Scalar field zero on the Open subset W of the 2-dimensional
651
+ topological manifold S^2 Scalar field 1 on the Open subset
652
+ W of the 2-dimensional topological manifold S^2]
653
+ [ Scalar field 1 on the Open subset W of the 2-dimensional
654
+ topological manifold S^2 Scalar field zero on the Open subset W of
655
+ the 2-dimensional topological manifold S^2]
656
+
657
+ Let us check the matrix components::
658
+
659
+ sage: matrix[0,0].display()
660
+ zero: W → ℝ
661
+ (x, y) ↦ 0
662
+ (u, v) ↦ 0
663
+ sage: matrix[0,1].display()
664
+ 1: W → ℝ
665
+ (x, y) ↦ 1
666
+ (u, v) ↦ 1
667
+ sage: matrix[1,0].display()
668
+ 1: W → ℝ
669
+ (x, y) ↦ 1
670
+ (u, v) ↦ 1
671
+ sage: matrix[1,1].display()
672
+ zero: W → ℝ
673
+ (x, y) ↦ 0
674
+ (u, v) ↦ 0
675
+ """
676
+ return self._automorphism.matrix(self._frame1)
677
+
678
+ def __eq__(self, other):
679
+ r"""
680
+ Equality operator.
681
+
682
+ TESTS::
683
+
684
+ sage: M = Manifold(2, 'M', structure='topological')
685
+ sage: X.<x,y> = M.chart()
686
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
687
+ sage: XU = X.restrict(U); XV = X.restrict(V)
688
+ sage: XUV = X.restrict(U.intersection(V))
689
+ sage: E = M.vector_bundle(2, 'E')
690
+ sage: phi_U = E.trivialization('phi_U', domain=U)
691
+ sage: phi_V = E.trivialization('phi_V', domain=V)
692
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[1,2],[3,-2]])
693
+ sage: phi_U_to_phi_V == phi_U_to_phi_V
694
+ True
695
+ sage: phi_U_to_phi_V_1 = phi_U.transition_map(phi_V, [[1,2],[3,-2]])
696
+ sage: phi_U_to_phi_V == phi_U_to_phi_V_1
697
+ True
698
+ sage: phi_U_to_phi_V_2 = phi_U.transition_map(phi_V, [[1,2],[2,-1]])
699
+ sage: phi_U_to_phi_V == phi_U_to_phi_V_2
700
+ False
701
+ sage: psi_V = E.trivialization('psi_V', domain=V)
702
+ sage: phi_U_to_psi_V = phi_U.transition_map(psi_V, [[1,2],[3,-2]])
703
+ sage: phi_U_to_phi_V == phi_U_to_psi_V
704
+ False
705
+ """
706
+ if other is self:
707
+ return True
708
+ if not isinstance(other, TransitionMap):
709
+ return False
710
+ return ((self._triv1 == other._triv1)
711
+ and (self._triv2 == other._triv2)
712
+ and (self._automorphism == other._automorphism))
713
+
714
+ def __ne__(self, other):
715
+ r"""
716
+ Non-equality operator.
717
+
718
+ TESTS::
719
+
720
+ sage: M = Manifold(2, 'M', structure='topological')
721
+ sage: X.<x,y> = M.chart()
722
+ sage: U = M.open_subset('U'); V = M.open_subset('V')
723
+ sage: XU = X.restrict(U); XV = X.restrict(V)
724
+ sage: XUV = X.restrict(U.intersection(V))
725
+ sage: E = M.vector_bundle(2, 'E')
726
+ sage: phi_U = E.trivialization('phi_U', domain=U)
727
+ sage: phi_V = E.trivialization('phi_V', domain=V)
728
+ sage: phi_U_to_phi_V = phi_U.transition_map(phi_V, [[1,2],[3,-2]])
729
+ sage: phi_U_to_phi_V_1 = phi_U.transition_map(phi_V, [[1,2],[2,-1]])
730
+ sage: phi_U_to_phi_V != phi_U_to_phi_V_1
731
+ True
732
+ """
733
+ return not (self == other)