passagemath-symbolics 10.6.37__cp310-cp310-musllinux_1_2_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.
- passagemath_symbolics/__init__.py +3 -0
- passagemath_symbolics-10.6.37.dist-info/METADATA +187 -0
- passagemath_symbolics-10.6.37.dist-info/RECORD +171 -0
- passagemath_symbolics-10.6.37.dist-info/WHEEL +5 -0
- passagemath_symbolics-10.6.37.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-310-x86_64-linux-gnu.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-310-x86_64-linux-gnu.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-310-x86_64-linux-gnu.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-310-x86_64-linux-gnu.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-310-x86_64-linux-gnu.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,831 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-symbolics
|
|
2
|
+
r"""
|
|
3
|
+
Section Modules
|
|
4
|
+
|
|
5
|
+
The set of sections over a vector bundle `E \to M` of class `C^k` on a domain
|
|
6
|
+
`U \in M` is a module over the algebra `C^k(U)` of scalar fields on `U`.
|
|
7
|
+
|
|
8
|
+
Depending on the domain, there are two classes of section modules:
|
|
9
|
+
|
|
10
|
+
- :class:`SectionModule` for local sections over a non-trivial part of a
|
|
11
|
+
topological vector bundle
|
|
12
|
+
- :class:`SectionFreeModule` for local sections over a trivial part of a
|
|
13
|
+
topological vector bundle
|
|
14
|
+
|
|
15
|
+
AUTHORS:
|
|
16
|
+
|
|
17
|
+
- Michael Jung (2019): initial version
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
#******************************************************************************
|
|
21
|
+
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
22
|
+
# Copyright (C) 2019 Michael Jung <micjung@uni-potsdam.de>
|
|
23
|
+
#
|
|
24
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
25
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
26
|
+
# the License, or (at your option) any later version.
|
|
27
|
+
# http://www.gnu.org/licenses/
|
|
28
|
+
#******************************************************************************
|
|
29
|
+
|
|
30
|
+
from sage.categories.modules import Modules
|
|
31
|
+
from sage.manifolds.section import Section, TrivialSection
|
|
32
|
+
from sage.misc.cachefunc import cached_method
|
|
33
|
+
from sage.rings.infinity import infinity
|
|
34
|
+
from sage.structure.parent import Parent
|
|
35
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
36
|
+
from sage.tensor.modules.finite_rank_free_module import FiniteRankFreeModule
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class SectionModule(UniqueRepresentation, Parent):
|
|
40
|
+
r"""
|
|
41
|
+
Module of sections over a vector bundle `E \to M` of class `C^k` on a domain
|
|
42
|
+
`U \in M`.
|
|
43
|
+
|
|
44
|
+
The *section module* `C^k(U;E)` is the set of all `C^k`-maps, called
|
|
45
|
+
*sections*, of type
|
|
46
|
+
|
|
47
|
+
.. MATH::
|
|
48
|
+
|
|
49
|
+
s: U \longrightarrow E
|
|
50
|
+
|
|
51
|
+
such that
|
|
52
|
+
|
|
53
|
+
.. MATH::
|
|
54
|
+
|
|
55
|
+
\forall p \in U,\ s(p) \in E_p,
|
|
56
|
+
|
|
57
|
+
where `E_p` is the vector bundle fiber of `E` at the point `p`.
|
|
58
|
+
|
|
59
|
+
`C^k(U;E)` is a module over `C^k(U)`, the algebra of `C^k` scalar fields on
|
|
60
|
+
`U`.
|
|
61
|
+
|
|
62
|
+
INPUT:
|
|
63
|
+
|
|
64
|
+
- ``vbundle`` -- vector bundle `E` on which the sections takes its values
|
|
65
|
+
- ``domain`` -- (default: ``None``) subdomain `U` of the base space on which
|
|
66
|
+
the sections are defined
|
|
67
|
+
|
|
68
|
+
EXAMPLES:
|
|
69
|
+
|
|
70
|
+
Module of sections on the Möbius bundle::
|
|
71
|
+
|
|
72
|
+
sage: M = Manifold(1, 'RP^1', structure='top', start_index=1)
|
|
73
|
+
sage: U = M.open_subset('U') # the complement of one point
|
|
74
|
+
sage: c_u.<u> = U.chart() # [1:u] in homogeneous coord.
|
|
75
|
+
sage: V = M.open_subset('V') # the complement of the point u=0
|
|
76
|
+
sage: M.declare_union(U,V) # [v:1] in homogeneous coord.
|
|
77
|
+
sage: c_v.<v> = V.chart()
|
|
78
|
+
sage: u_to_v = c_u.transition_map(c_v, (1/u),
|
|
79
|
+
....: intersection_name='W',
|
|
80
|
+
....: restrictions1 = u!=0,
|
|
81
|
+
....: restrictions2 = v!=0)
|
|
82
|
+
sage: v_to_u = u_to_v.inverse()
|
|
83
|
+
sage: W = U.intersection(V)
|
|
84
|
+
sage: E = M.vector_bundle(1, 'E')
|
|
85
|
+
sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
|
|
86
|
+
....: domain=U)
|
|
87
|
+
sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
|
|
88
|
+
....: domain=V)
|
|
89
|
+
sage: transf = phi_U.transition_map(phi_V, [[u]])
|
|
90
|
+
sage: C0 = E.section_module(); C0
|
|
91
|
+
Module C^0(RP^1;E) of sections on the 1-dimensional topological manifold
|
|
92
|
+
RP^1 with values in the real vector bundle E of rank 1
|
|
93
|
+
|
|
94
|
+
`C^0(\RR P^1;E)` is a module over the algebra `C^0(\RR P^1)`::
|
|
95
|
+
|
|
96
|
+
sage: C0.category()
|
|
97
|
+
Category of modules over Algebra of scalar fields on the 1-dimensional
|
|
98
|
+
topological manifold RP^1
|
|
99
|
+
sage: C0.base_ring() is M.scalar_field_algebra()
|
|
100
|
+
True
|
|
101
|
+
|
|
102
|
+
However, `C^0(\RR P^1;E)` is not a free module::
|
|
103
|
+
|
|
104
|
+
sage: isinstance(C0, FiniteRankFreeModule)
|
|
105
|
+
False
|
|
106
|
+
|
|
107
|
+
since the Möbius bundle is not trivial::
|
|
108
|
+
|
|
109
|
+
sage: E.is_manifestly_trivial()
|
|
110
|
+
False
|
|
111
|
+
|
|
112
|
+
The section module over `U`, on the other hand, is a free module since
|
|
113
|
+
`E|_U` admits a trivialization and therefore has a local frame::
|
|
114
|
+
|
|
115
|
+
sage: C0_U = E.section_module(domain=U)
|
|
116
|
+
sage: isinstance(C0_U, FiniteRankFreeModule)
|
|
117
|
+
True
|
|
118
|
+
|
|
119
|
+
The zero element of the module::
|
|
120
|
+
|
|
121
|
+
sage: z = C0.zero() ; z
|
|
122
|
+
Section zero on the 1-dimensional topological manifold RP^1 with values
|
|
123
|
+
in the real vector bundle E of rank 1
|
|
124
|
+
sage: z.display(phi_U.frame())
|
|
125
|
+
zero = 0
|
|
126
|
+
sage: z.display(phi_V.frame())
|
|
127
|
+
zero = 0
|
|
128
|
+
|
|
129
|
+
The module `C^0(M;E)` coerces to any module of sections defined
|
|
130
|
+
on a subdomain of `M`, for instance `C^0(U;E)`::
|
|
131
|
+
|
|
132
|
+
sage: C0_U.has_coerce_map_from(C0)
|
|
133
|
+
True
|
|
134
|
+
sage: C0_U.coerce_map_from(C0)
|
|
135
|
+
Coercion map:
|
|
136
|
+
From: Module C^0(RP^1;E) of sections on the 1-dimensional topological
|
|
137
|
+
manifold RP^1 with values in the real vector bundle E of rank 1
|
|
138
|
+
To: Free module C^0(U;E) of sections on the Open subset U of the
|
|
139
|
+
1-dimensional topological manifold RP^1 with values in the real vector
|
|
140
|
+
bundle E of rank 1
|
|
141
|
+
|
|
142
|
+
The conversion map is actually the restriction of sections defined
|
|
143
|
+
on `M` to `U`.
|
|
144
|
+
"""
|
|
145
|
+
Element = Section
|
|
146
|
+
|
|
147
|
+
def __init__(self, vbundle, domain):
|
|
148
|
+
r"""
|
|
149
|
+
Construct the module of continuous sections over a vector bundle.
|
|
150
|
+
|
|
151
|
+
TESTS::
|
|
152
|
+
|
|
153
|
+
sage: M = Manifold(1, 'S^1', latex_name=r'S^1', start_index=1,
|
|
154
|
+
....: structure='topological')
|
|
155
|
+
sage: U = M.open_subset('U')
|
|
156
|
+
sage: c_x.<x> = U.chart()
|
|
157
|
+
sage: V = M.open_subset('V')
|
|
158
|
+
sage: c_u.<u> = V.chart()
|
|
159
|
+
sage: M.declare_union(U, V)
|
|
160
|
+
sage: x_to_u = c_x.transition_map(c_u, 1/x, intersection_name='W',
|
|
161
|
+
....: restrictions1= x!=0, restrictions2= u!=0)
|
|
162
|
+
sage: W = U.intersection(V)
|
|
163
|
+
sage: u_to_x = x_to_u.inverse()
|
|
164
|
+
sage: E = M.vector_bundle(1, 'E')
|
|
165
|
+
sage: phi_U = E.trivialization('phi_U', latex_name=r'\varphi_U',
|
|
166
|
+
....: domain=U)
|
|
167
|
+
sage: phi_V = E.trivialization('phi_V', latex_name=r'\varphi_V',
|
|
168
|
+
....: domain=V)
|
|
169
|
+
sage: transf = phi_U.transition_map(phi_V, [[-1]])
|
|
170
|
+
sage: C0 = E.section_module(); C0
|
|
171
|
+
Module C^0(S^1;E) of sections on the 1-dimensional topological
|
|
172
|
+
manifold S^1 with values in the real vector bundle E of rank 1
|
|
173
|
+
sage: TestSuite(C0).run()
|
|
174
|
+
"""
|
|
175
|
+
base_space = vbundle.base_space()
|
|
176
|
+
if not domain.is_subset(base_space):
|
|
177
|
+
raise ValueError("domain must be a subset of base space")
|
|
178
|
+
if vbundle._diff_degree == infinity:
|
|
179
|
+
repr_deg = "infinity" # to skip the "+" in repr(infinity)
|
|
180
|
+
latex_deg = r"\infty" # to skip the "+" in latex(infinity)
|
|
181
|
+
else:
|
|
182
|
+
repr_deg = r"{}".format(vbundle._diff_degree)
|
|
183
|
+
latex_deg = r"{}".format(vbundle._diff_degree)
|
|
184
|
+
self._name = "C^{}({};{})".format(repr_deg, domain._name, vbundle._name)
|
|
185
|
+
self._latex_name = r"C^{" + latex_deg + r"}" + \
|
|
186
|
+
r"({};{})".format(domain._latex_name,
|
|
187
|
+
vbundle._latex_name)
|
|
188
|
+
self._vbundle = vbundle
|
|
189
|
+
self._domain = domain
|
|
190
|
+
self._base_space = vbundle.base_space()
|
|
191
|
+
self._ring = domain.scalar_field_algebra()
|
|
192
|
+
self._def_frame = None
|
|
193
|
+
Parent.__init__(self, base=self._ring,
|
|
194
|
+
category=Modules(self._ring))
|
|
195
|
+
|
|
196
|
+
#### Begin of parent methods
|
|
197
|
+
|
|
198
|
+
def _element_constructor_(self, comp=[], frame=None, name=None,
|
|
199
|
+
latex_name=None):
|
|
200
|
+
r"""
|
|
201
|
+
Construct an element of the module.
|
|
202
|
+
|
|
203
|
+
TESTS::
|
|
204
|
+
|
|
205
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
206
|
+
sage: c_xyz.<x,y,z> = M.chart()
|
|
207
|
+
sage: U = M.open_subset('U'); V = M.open_subset('V')
|
|
208
|
+
sage: c_xyz_U = c_xyz.restrict(U); c_xyz_V = c_xyz.restrict(V)
|
|
209
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
210
|
+
sage: C0 = E.section_module()
|
|
211
|
+
sage: e = E.local_frame('e', domain=U)
|
|
212
|
+
sage: f = E.local_frame('f', domain=V)
|
|
213
|
+
sage: s = C0([-x,y], frame=e, name='s'); s
|
|
214
|
+
Section s on the 3-dimensional topological manifold M with values in
|
|
215
|
+
the real vector bundle E of rank 2
|
|
216
|
+
sage: s.display(e)
|
|
217
|
+
s = -x e_0 + y e_1
|
|
218
|
+
sage: C0(0) is C0.zero()
|
|
219
|
+
True
|
|
220
|
+
"""
|
|
221
|
+
try:
|
|
222
|
+
if comp.is_trivial_zero():
|
|
223
|
+
return self.zero()
|
|
224
|
+
except AttributeError:
|
|
225
|
+
if comp == 0:
|
|
226
|
+
return self.zero()
|
|
227
|
+
if isinstance(comp, Section):
|
|
228
|
+
if self._domain.is_subset(comp._domain):
|
|
229
|
+
return comp.restrict(self._domain)
|
|
230
|
+
else:
|
|
231
|
+
raise ValueError("cannot convert the {} ".format(comp) +
|
|
232
|
+
"to a local section in {}".format(self))
|
|
233
|
+
if not isinstance(comp, (list, tuple)):
|
|
234
|
+
raise TypeError("cannot convert the {} ".format(comp) +
|
|
235
|
+
"to an element of {}".format(self))
|
|
236
|
+
# standard construction
|
|
237
|
+
resu = self.element_class(self, name=name, latex_name=latex_name)
|
|
238
|
+
if comp:
|
|
239
|
+
resu.set_comp(frame)[:] = comp
|
|
240
|
+
return resu
|
|
241
|
+
|
|
242
|
+
def _an_element_(self):
|
|
243
|
+
r"""
|
|
244
|
+
Construct some (unnamed) element of the module.
|
|
245
|
+
|
|
246
|
+
TESTS::
|
|
247
|
+
|
|
248
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
249
|
+
sage: U = M.open_subset('U'); V = M.open_subset('V')
|
|
250
|
+
sage: c_xy.<x,y> = U.chart(); c_uv.<u,v> = V.chart()
|
|
251
|
+
sage: M.declare_union(U,V)
|
|
252
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
253
|
+
sage: C0 = E.section_module()
|
|
254
|
+
sage: C0._an_element_()
|
|
255
|
+
Section on the 2-dimensional topological manifold M with values in
|
|
256
|
+
the real vector bundle E of rank 2
|
|
257
|
+
"""
|
|
258
|
+
resu = self.element_class(self)
|
|
259
|
+
for oc in self._domain.open_covers(trivial=False):
|
|
260
|
+
# the first non-trivial open cover is selected
|
|
261
|
+
for dom in oc:
|
|
262
|
+
smodule_dom = self._vbundle.section_module(domain=dom)
|
|
263
|
+
resu.set_restriction(smodule_dom._an_element_())
|
|
264
|
+
return resu
|
|
265
|
+
return resu
|
|
266
|
+
|
|
267
|
+
def _coerce_map_from_(self, other):
|
|
268
|
+
r"""
|
|
269
|
+
Determine whether coercion to ``self`` exists from ``other`` parent.
|
|
270
|
+
|
|
271
|
+
TESTS::
|
|
272
|
+
|
|
273
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
274
|
+
sage: U = M.open_subset('U')
|
|
275
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
276
|
+
sage: C0 = E.section_module()
|
|
277
|
+
sage: C0_U = E.section_module(domain=U)
|
|
278
|
+
sage: C0._coerce_map_from_(C0_U)
|
|
279
|
+
False
|
|
280
|
+
sage: C0_U._coerce_map_from_(C0)
|
|
281
|
+
True
|
|
282
|
+
"""
|
|
283
|
+
if isinstance(other, (SectionModule, SectionFreeModule)):
|
|
284
|
+
return self._domain.is_subset(other._domain)
|
|
285
|
+
else:
|
|
286
|
+
return False
|
|
287
|
+
|
|
288
|
+
#### End of parent methods
|
|
289
|
+
|
|
290
|
+
def _repr_(self):
|
|
291
|
+
r"""
|
|
292
|
+
String representation of the object.
|
|
293
|
+
|
|
294
|
+
TESTS::
|
|
295
|
+
|
|
296
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
297
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
298
|
+
sage: C0 = E.section_module()
|
|
299
|
+
sage: C0._repr_()
|
|
300
|
+
'Module C^0(M;E) of sections on the 2-dimensional topological
|
|
301
|
+
manifold M with values in the real vector bundle E of rank 2'
|
|
302
|
+
sage: repr(C0) # indirect doctest
|
|
303
|
+
'Module C^0(M;E) of sections on the 2-dimensional topological
|
|
304
|
+
manifold M with values in the real vector bundle E of rank 2'
|
|
305
|
+
sage: C0 # indirect doctest
|
|
306
|
+
Module C^0(M;E) of sections on the 2-dimensional topological
|
|
307
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
308
|
+
"""
|
|
309
|
+
desc = "Module {} of sections on the {} with values in the {} vector " \
|
|
310
|
+
"bundle {} of rank {}"
|
|
311
|
+
desc = desc.format(self._name, self._domain,
|
|
312
|
+
self._vbundle.base_field_type(),
|
|
313
|
+
self._vbundle._name,
|
|
314
|
+
self._vbundle.rank())
|
|
315
|
+
return desc
|
|
316
|
+
|
|
317
|
+
def _latex_(self):
|
|
318
|
+
r"""
|
|
319
|
+
LaTeX representation of the object.
|
|
320
|
+
|
|
321
|
+
TESTS::
|
|
322
|
+
|
|
323
|
+
sage: M = Manifold(2, 'M')
|
|
324
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
325
|
+
sage: C = E.section_module()
|
|
326
|
+
sage: C._latex_()
|
|
327
|
+
'C^{\\infty}(M;E)'
|
|
328
|
+
sage: latex(C) # indirect doctest
|
|
329
|
+
C^{\infty}(M;E)
|
|
330
|
+
"""
|
|
331
|
+
return self._latex_name
|
|
332
|
+
|
|
333
|
+
def base_space(self):
|
|
334
|
+
r"""
|
|
335
|
+
Return the base space of the sections in this module.
|
|
336
|
+
|
|
337
|
+
EXAMPLES::
|
|
338
|
+
|
|
339
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
340
|
+
sage: U = M.open_subset('U')
|
|
341
|
+
sage: E = U.vector_bundle(2, 'E')
|
|
342
|
+
sage: C0 = E.section_module(); C0
|
|
343
|
+
Module C^0(U;E) of sections on the Open subset U of the
|
|
344
|
+
3-dimensional topological manifold M with values in the real vector
|
|
345
|
+
bundle E of rank 2
|
|
346
|
+
sage: C0.base_space()
|
|
347
|
+
Open subset U of the 3-dimensional topological manifold M
|
|
348
|
+
"""
|
|
349
|
+
return self._base_space
|
|
350
|
+
|
|
351
|
+
def domain(self):
|
|
352
|
+
r"""
|
|
353
|
+
Return the domain of the section module.
|
|
354
|
+
|
|
355
|
+
EXAMPLES::
|
|
356
|
+
|
|
357
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
358
|
+
sage: U = M.open_subset('U')
|
|
359
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
360
|
+
sage: C0_U = E.section_module(domain=U); C0_U
|
|
361
|
+
Module C^0(U;E) of sections on the Open subset U of the
|
|
362
|
+
3-dimensional topological manifold M with values in the real vector
|
|
363
|
+
bundle E of rank 2
|
|
364
|
+
sage: C0_U.domain()
|
|
365
|
+
Open subset U of the 3-dimensional topological manifold M
|
|
366
|
+
"""
|
|
367
|
+
return self._domain
|
|
368
|
+
|
|
369
|
+
def vector_bundle(self):
|
|
370
|
+
r"""
|
|
371
|
+
Return the overlying vector bundle on which the section module is
|
|
372
|
+
defined.
|
|
373
|
+
|
|
374
|
+
EXAMPLES::
|
|
375
|
+
|
|
376
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
377
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
378
|
+
sage: C0 = E.section_module(); C0
|
|
379
|
+
Module C^0(M;E) of sections on the 3-dimensional topological
|
|
380
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
381
|
+
sage: C0.vector_bundle()
|
|
382
|
+
Topological real vector bundle E -> M of rank 2 over the base space
|
|
383
|
+
3-dimensional topological manifold M
|
|
384
|
+
sage: E is C0.vector_bundle()
|
|
385
|
+
True
|
|
386
|
+
"""
|
|
387
|
+
return self._vbundle
|
|
388
|
+
|
|
389
|
+
@cached_method
|
|
390
|
+
def zero(self):
|
|
391
|
+
"""
|
|
392
|
+
Return the zero of ``self``.
|
|
393
|
+
|
|
394
|
+
EXAMPLES::
|
|
395
|
+
|
|
396
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
397
|
+
sage: X.<x,y> = M.chart()
|
|
398
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
399
|
+
sage: C0 = E.section_module()
|
|
400
|
+
sage: z = C0.zero(); z
|
|
401
|
+
Section zero on the 2-dimensional topological manifold M with values
|
|
402
|
+
in the real vector bundle E of rank 2
|
|
403
|
+
sage: z == 0
|
|
404
|
+
True
|
|
405
|
+
"""
|
|
406
|
+
res = self.element_class(self, name='zero', latex_name='0')
|
|
407
|
+
for frame in self._vbundle._frames:
|
|
408
|
+
if frame._domain.is_subset(self._domain):
|
|
409
|
+
res.add_comp(frame)
|
|
410
|
+
# (since new components are initialized to zero)
|
|
411
|
+
res.set_immutable()
|
|
412
|
+
return res
|
|
413
|
+
|
|
414
|
+
def default_frame(self):
|
|
415
|
+
r"""
|
|
416
|
+
Return the default frame defined on ``self``.
|
|
417
|
+
|
|
418
|
+
EXAMPLES:
|
|
419
|
+
|
|
420
|
+
Get the default local frame of a non-trivial section module::
|
|
421
|
+
|
|
422
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
423
|
+
sage: U = M.open_subset('U')
|
|
424
|
+
sage: V = M.open_subset('V')
|
|
425
|
+
sage: M.declare_union(U, V)
|
|
426
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
427
|
+
sage: C0 = E.section_module()
|
|
428
|
+
sage: e = E.local_frame('e', domain=U)
|
|
429
|
+
sage: C0.default_frame()
|
|
430
|
+
Local frame (E|_U, (e_0,e_1))
|
|
431
|
+
|
|
432
|
+
The local frame is indeed the same, and not a copy::
|
|
433
|
+
|
|
434
|
+
sage: e is C0.default_frame()
|
|
435
|
+
True
|
|
436
|
+
"""
|
|
437
|
+
return self._def_frame
|
|
438
|
+
|
|
439
|
+
def set_default_frame(self, basis):
|
|
440
|
+
r"""
|
|
441
|
+
Set the default local frame on ``self``.
|
|
442
|
+
|
|
443
|
+
EXAMPLES:
|
|
444
|
+
|
|
445
|
+
Set a default frame of a non-trivial section module::
|
|
446
|
+
|
|
447
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
448
|
+
sage: U = M.open_subset('U')
|
|
449
|
+
sage: V = M.open_subset('V')
|
|
450
|
+
sage: M.declare_union(U, V)
|
|
451
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
452
|
+
sage: C0 = E.section_module(); C0
|
|
453
|
+
Module C^0(M;E) of sections on the 3-dimensional topological
|
|
454
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
455
|
+
sage: e = E.local_frame('e', domain=U)
|
|
456
|
+
sage: C0.set_default_frame(e)
|
|
457
|
+
sage: C0.default_frame()
|
|
458
|
+
Local frame (E|_U, (e_0,e_1))
|
|
459
|
+
|
|
460
|
+
The local frame is indeed the same, and not a copy::
|
|
461
|
+
|
|
462
|
+
sage: e is C0.default_frame()
|
|
463
|
+
True
|
|
464
|
+
|
|
465
|
+
Notice, that the local frame is defined on a subset and is not part of
|
|
466
|
+
the section module `C^k(M;E)`::
|
|
467
|
+
|
|
468
|
+
sage: C0.default_frame().domain()
|
|
469
|
+
Open subset U of the 3-dimensional topological manifold M
|
|
470
|
+
"""
|
|
471
|
+
from sage.manifolds.local_frame import LocalFrame
|
|
472
|
+
if not isinstance(basis, LocalFrame):
|
|
473
|
+
raise ValueError("the argument is not a local frame")
|
|
474
|
+
elif not basis._domain.is_subset(self._domain):
|
|
475
|
+
raise ValueError("local frame's domain must be a subset "
|
|
476
|
+
"of the {}".format(self._domain))
|
|
477
|
+
self._def_frame = basis
|
|
478
|
+
|
|
479
|
+
#******************************************************************************
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
class SectionFreeModule(FiniteRankFreeModule):
|
|
483
|
+
r"""
|
|
484
|
+
Free module of sections over a vector bundle `E \to M` of class `C^k` on a
|
|
485
|
+
domain `U \in M` which admits a trivialization or local frame.
|
|
486
|
+
|
|
487
|
+
The *section module* `C^k(U;E)` is the set of all `C^k`-maps, called
|
|
488
|
+
*sections*, of type
|
|
489
|
+
|
|
490
|
+
.. MATH::
|
|
491
|
+
|
|
492
|
+
s: U \longrightarrow E
|
|
493
|
+
|
|
494
|
+
such that
|
|
495
|
+
|
|
496
|
+
.. MATH::
|
|
497
|
+
|
|
498
|
+
\forall p \in U,\ s(p) \in E_p,
|
|
499
|
+
|
|
500
|
+
where `E_p` is the vector bundle fiber of `E` at the point `p`.
|
|
501
|
+
|
|
502
|
+
Since the domain `U` admits a local frame, the corresponding vector bundle
|
|
503
|
+
`E|_U \to U` is trivial and `C^k(U;E)` is a free module over `C^k(U)`.
|
|
504
|
+
|
|
505
|
+
.. NOTE::
|
|
506
|
+
|
|
507
|
+
If `E|_U` is not trivial, the class :class:`SectionModule` should be
|
|
508
|
+
used instead, for `C^k(U;E)` is no longer a free module.
|
|
509
|
+
|
|
510
|
+
INPUT:
|
|
511
|
+
|
|
512
|
+
- ``vbundle`` -- vector bundle `E` on which the sections takes its values
|
|
513
|
+
- ``domain`` -- (default: ``None``) subdomain `U` of the base space on which
|
|
514
|
+
the sections are defined
|
|
515
|
+
|
|
516
|
+
EXAMPLES:
|
|
517
|
+
|
|
518
|
+
Module of sections on the 2-rank trivial vector bundle over the Euclidean
|
|
519
|
+
plane `\RR^2`::
|
|
520
|
+
|
|
521
|
+
sage: M = Manifold(2, 'R^2', structure='top')
|
|
522
|
+
sage: c_cart.<x,y> = M.chart()
|
|
523
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
524
|
+
sage: e = E.local_frame('e') # Trivializes the vector bundle
|
|
525
|
+
sage: C0 = E.section_module(); C0
|
|
526
|
+
Free module C^0(R^2;E) of sections on the 2-dimensional topological
|
|
527
|
+
manifold R^2 with values in the real vector bundle E of rank 2
|
|
528
|
+
sage: C0.category()
|
|
529
|
+
Category of finite dimensional modules over Algebra of scalar fields on
|
|
530
|
+
the 2-dimensional topological manifold R^2
|
|
531
|
+
sage: C0.base_ring() is M.scalar_field_algebra()
|
|
532
|
+
True
|
|
533
|
+
|
|
534
|
+
The vector bundle admits a global frame and is therefore trivial::
|
|
535
|
+
|
|
536
|
+
sage: E.is_manifestly_trivial()
|
|
537
|
+
True
|
|
538
|
+
|
|
539
|
+
Since the vector bundle is trivial, its section module of global sections
|
|
540
|
+
is a free module::
|
|
541
|
+
|
|
542
|
+
sage: isinstance(C0, FiniteRankFreeModule)
|
|
543
|
+
True
|
|
544
|
+
|
|
545
|
+
Some elements are::
|
|
546
|
+
|
|
547
|
+
sage: C0.an_element().display()
|
|
548
|
+
2 e_0 + 2 e_1
|
|
549
|
+
sage: C0.zero().display()
|
|
550
|
+
zero = 0
|
|
551
|
+
sage: s = C0([-y,x]); s
|
|
552
|
+
Section on the 2-dimensional topological manifold R^2 with values in the
|
|
553
|
+
real vector bundle E of rank 2
|
|
554
|
+
sage: s.display()
|
|
555
|
+
-y e_0 + x e_1
|
|
556
|
+
|
|
557
|
+
The rank of the free module equals the rank of the vector bundle::
|
|
558
|
+
|
|
559
|
+
sage: C0.rank()
|
|
560
|
+
2
|
|
561
|
+
|
|
562
|
+
The basis is given by the definition above::
|
|
563
|
+
|
|
564
|
+
sage: C0.bases()
|
|
565
|
+
[Local frame (E|_R^2, (e_0,e_1))]
|
|
566
|
+
|
|
567
|
+
The test suite is passed as well::
|
|
568
|
+
|
|
569
|
+
sage: TestSuite(C0).run()
|
|
570
|
+
"""
|
|
571
|
+
Element = TrivialSection
|
|
572
|
+
|
|
573
|
+
def __init__(self, vbundle, domain):
|
|
574
|
+
r"""
|
|
575
|
+
Construct the free module of sections over a trivial part of a vector
|
|
576
|
+
bundle.
|
|
577
|
+
|
|
578
|
+
TESTS::
|
|
579
|
+
|
|
580
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
581
|
+
sage: X.<x,y,z> = M.chart()
|
|
582
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
583
|
+
sage: from sage.manifolds.section_module import SectionFreeModule
|
|
584
|
+
sage: C0 = SectionFreeModule(E, M); C0
|
|
585
|
+
Free module C^0(M;E) of sections on the 3-dimensional topological
|
|
586
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
587
|
+
sage: C0 is E.section_module(force_free=True)
|
|
588
|
+
True
|
|
589
|
+
sage: TestSuite(C0).run()
|
|
590
|
+
"""
|
|
591
|
+
from sage.manifolds.scalarfield import ScalarField
|
|
592
|
+
self._domain = domain
|
|
593
|
+
name = "C^0({};{})".format(domain._name, vbundle._name)
|
|
594
|
+
latex_name = r'C^0({};{})'.format(domain._latex_name,
|
|
595
|
+
vbundle._latex_name)
|
|
596
|
+
base_space = vbundle.base_space()
|
|
597
|
+
self._base_space = base_space
|
|
598
|
+
self._vbundle = vbundle
|
|
599
|
+
cat = Modules(domain.scalar_field_algebra()).FiniteDimensional()
|
|
600
|
+
FiniteRankFreeModule.__init__(self, domain.scalar_field_algebra(),
|
|
601
|
+
vbundle.rank(), name=name,
|
|
602
|
+
latex_name=latex_name,
|
|
603
|
+
start_index=base_space._sindex,
|
|
604
|
+
output_formatter=ScalarField.coord_function,
|
|
605
|
+
category=cat)
|
|
606
|
+
|
|
607
|
+
#### Parent methods
|
|
608
|
+
|
|
609
|
+
def _element_constructor_(self, comp=[], basis=None, name=None,
|
|
610
|
+
latex_name=None):
|
|
611
|
+
r"""
|
|
612
|
+
Construct an element of ``self``.
|
|
613
|
+
|
|
614
|
+
TESTS::
|
|
615
|
+
|
|
616
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
617
|
+
sage: c_xyz.<x,y,z> = M.chart()
|
|
618
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
619
|
+
sage: e = E.local_frame('e')
|
|
620
|
+
sage: C0 = E.section_module(); C0
|
|
621
|
+
Free module C^0(M;E) of sections on the 3-dimensional topological
|
|
622
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
623
|
+
sage: s = C0([-x,y], basis=e, name='s'); s
|
|
624
|
+
Section s on the 3-dimensional topological manifold M with values in
|
|
625
|
+
the real vector bundle E of rank 2
|
|
626
|
+
sage: s.display(e)
|
|
627
|
+
s = -x e_0 + y e_1
|
|
628
|
+
sage: C0(0) is C0.zero()
|
|
629
|
+
True
|
|
630
|
+
"""
|
|
631
|
+
try:
|
|
632
|
+
if comp.is_trivial_zero():
|
|
633
|
+
return self.zero()
|
|
634
|
+
except AttributeError:
|
|
635
|
+
if comp == 0:
|
|
636
|
+
return self.zero()
|
|
637
|
+
if isinstance(comp, Section):
|
|
638
|
+
if self._domain.is_subset(comp._domain):
|
|
639
|
+
return comp.restrict(self._domain)
|
|
640
|
+
else:
|
|
641
|
+
raise ValueError("cannot convert the {}".format(comp) +
|
|
642
|
+
"to a local section in {}".format(self))
|
|
643
|
+
if not isinstance(comp, (list, tuple)):
|
|
644
|
+
raise TypeError("cannot convert the {} ".format(comp) +
|
|
645
|
+
"to an element of {}".format(self))
|
|
646
|
+
# standard construction
|
|
647
|
+
resu = self.element_class(self, name=name, latex_name=latex_name)
|
|
648
|
+
if comp:
|
|
649
|
+
resu.set_comp(basis)[:] = comp
|
|
650
|
+
return resu
|
|
651
|
+
|
|
652
|
+
# Rem: _an_element_ is declared in the superclass FiniteRankFreeModule
|
|
653
|
+
|
|
654
|
+
def _coerce_map_from_(self, other):
|
|
655
|
+
r"""
|
|
656
|
+
Determine whether coercion to ``self`` exists from parent ``other``.
|
|
657
|
+
|
|
658
|
+
TESTS::
|
|
659
|
+
|
|
660
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
661
|
+
sage: U = M.open_subset('U')
|
|
662
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
663
|
+
sage: C0 = E.section_module(force_free=True)
|
|
664
|
+
sage: C0_U = E.section_module(domain=U, force_free=True)
|
|
665
|
+
sage: C0._coerce_map_from_(C0_U)
|
|
666
|
+
False
|
|
667
|
+
sage: C0_U._coerce_map_from_(C0)
|
|
668
|
+
True
|
|
669
|
+
"""
|
|
670
|
+
if isinstance(other, (SectionModule, SectionFreeModule)):
|
|
671
|
+
return self._domain.is_subset(other._domain)
|
|
672
|
+
else:
|
|
673
|
+
return False
|
|
674
|
+
|
|
675
|
+
#### End of parent methods
|
|
676
|
+
|
|
677
|
+
def _repr_(self):
|
|
678
|
+
r"""
|
|
679
|
+
String representation of the object.
|
|
680
|
+
|
|
681
|
+
TESTS::
|
|
682
|
+
|
|
683
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
684
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
685
|
+
sage: C0 = E.section_module(force_free=True)
|
|
686
|
+
sage: C0._repr_()
|
|
687
|
+
'Free module C^0(M;E) of sections on the 2-dimensional topological
|
|
688
|
+
manifold M with values in the real vector bundle E of rank 2'
|
|
689
|
+
sage: repr(C0) # indirect doctest
|
|
690
|
+
'Free module C^0(M;E) of sections on the 2-dimensional topological
|
|
691
|
+
manifold M with values in the real vector bundle E of rank 2'
|
|
692
|
+
sage: C0 # indirect doctest
|
|
693
|
+
Free module C^0(M;E) of sections on the 2-dimensional topological
|
|
694
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
695
|
+
"""
|
|
696
|
+
desc = "Free module {} of sections on the {} with values in the {} " \
|
|
697
|
+
"vector bundle {} of rank {}"
|
|
698
|
+
desc = desc.format(self._name, self._domain,
|
|
699
|
+
self._vbundle.base_field_type(),
|
|
700
|
+
self._vbundle._name,
|
|
701
|
+
self._vbundle.rank())
|
|
702
|
+
return desc
|
|
703
|
+
|
|
704
|
+
def domain(self):
|
|
705
|
+
r"""
|
|
706
|
+
Return the domain of the section module.
|
|
707
|
+
|
|
708
|
+
EXAMPLES::
|
|
709
|
+
|
|
710
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
711
|
+
sage: U = M.open_subset('U')
|
|
712
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
713
|
+
sage: C0_U = E.section_module(domain=U, force_free=True); C0_U
|
|
714
|
+
Free module C^0(U;E) of sections on the Open subset U of the
|
|
715
|
+
3-dimensional topological manifold M with values in the real vector
|
|
716
|
+
bundle E of rank 2
|
|
717
|
+
sage: C0_U.domain()
|
|
718
|
+
Open subset U of the 3-dimensional topological manifold M
|
|
719
|
+
"""
|
|
720
|
+
return self._domain
|
|
721
|
+
|
|
722
|
+
def base_space(self):
|
|
723
|
+
r"""
|
|
724
|
+
Return the base space of the sections in this module.
|
|
725
|
+
|
|
726
|
+
EXAMPLES::
|
|
727
|
+
|
|
728
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
729
|
+
sage: U = M.open_subset('U')
|
|
730
|
+
sage: E = U.vector_bundle(2, 'E')
|
|
731
|
+
sage: C0 = E.section_module(force_free=True); C0
|
|
732
|
+
Free module C^0(U;E) of sections on the Open subset U of the
|
|
733
|
+
3-dimensional topological manifold M with values in the real
|
|
734
|
+
vector bundle E of rank 2
|
|
735
|
+
sage: C0.base_space()
|
|
736
|
+
Open subset U of the 3-dimensional topological manifold M
|
|
737
|
+
"""
|
|
738
|
+
return self._base_space
|
|
739
|
+
|
|
740
|
+
def vector_bundle(self):
|
|
741
|
+
r"""
|
|
742
|
+
Return the overlying vector bundle on which the section module is
|
|
743
|
+
defined.
|
|
744
|
+
|
|
745
|
+
EXAMPLES::
|
|
746
|
+
|
|
747
|
+
sage: M = Manifold(3, 'M', structure='top')
|
|
748
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
749
|
+
sage: C0 = E.section_module(force_free=True); C0
|
|
750
|
+
Free module C^0(M;E) of sections on the 3-dimensional topological
|
|
751
|
+
manifold M with values in the real vector bundle E of rank 2
|
|
752
|
+
sage: C0.vector_bundle()
|
|
753
|
+
Topological real vector bundle E -> M of rank 2 over the base space
|
|
754
|
+
3-dimensional topological manifold M
|
|
755
|
+
sage: E is C0.vector_bundle()
|
|
756
|
+
True
|
|
757
|
+
"""
|
|
758
|
+
return self._vbundle
|
|
759
|
+
|
|
760
|
+
def basis(self, symbol=None, latex_symbol=None, from_frame=None,
|
|
761
|
+
indices=None, latex_indices=None, symbol_dual=None,
|
|
762
|
+
latex_symbol_dual=None):
|
|
763
|
+
r"""
|
|
764
|
+
Define a basis of ``self``.
|
|
765
|
+
|
|
766
|
+
A basis of the section module is actually a local frame on the
|
|
767
|
+
differentiable manifold `U` over which the section module is defined.
|
|
768
|
+
|
|
769
|
+
If the basis specified by the given symbol already exists, it is
|
|
770
|
+
simply returned.
|
|
771
|
+
If no argument is provided the module's default basis is returned.
|
|
772
|
+
|
|
773
|
+
INPUT:
|
|
774
|
+
|
|
775
|
+
- ``symbol`` -- (default: ``None``) either a string, to be used as a
|
|
776
|
+
common base for the symbols of the elements of the basis, or a
|
|
777
|
+
tuple of strings, representing the individual symbols of the
|
|
778
|
+
elements of the basis
|
|
779
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
780
|
+
as a common base for the LaTeX symbols of the elements of the basis,
|
|
781
|
+
or a tuple of strings, representing the individual LaTeX symbols
|
|
782
|
+
of the elements of the basis; if ``None``, ``symbol`` is used in
|
|
783
|
+
place of ``latex_symbol``
|
|
784
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a
|
|
785
|
+
single string) tuple of strings representing the indices
|
|
786
|
+
labelling the elements of the basis; if ``None``, the indices will be
|
|
787
|
+
generated as integers within the range declared on ``self``
|
|
788
|
+
- ``latex_indices`` -- (default: ``None``) tuple of strings
|
|
789
|
+
representing the indices for the LaTeX symbols of the elements of
|
|
790
|
+
the basis; if ``None``, ``indices`` is used instead
|
|
791
|
+
- ``symbol_dual`` -- (default: ``None``) same as ``symbol`` but for the
|
|
792
|
+
dual basis; if ``None``, ``symbol`` must be a string and is used
|
|
793
|
+
for the common base of the symbols of the elements of the dual basis
|
|
794
|
+
- ``latex_symbol_dual`` -- (default: ``None``) same as ``latex_symbol``
|
|
795
|
+
but for the dual basis
|
|
796
|
+
|
|
797
|
+
OUTPUT:
|
|
798
|
+
|
|
799
|
+
- a :class:`~sage.manifolds.local_frame.LocalFrame` representing a basis
|
|
800
|
+
on ``self``
|
|
801
|
+
|
|
802
|
+
EXAMPLES::
|
|
803
|
+
|
|
804
|
+
sage: M = Manifold(2, 'M', structure='top')
|
|
805
|
+
sage: E = M.vector_bundle(2, 'E')
|
|
806
|
+
sage: C0 = E.section_module(force_free=True)
|
|
807
|
+
sage: e = C0.basis('e'); e
|
|
808
|
+
Local frame (E|_M, (e_0,e_1))
|
|
809
|
+
|
|
810
|
+
See :class:`~sage.manifolds.local_frame.LocalFrame` for more examples
|
|
811
|
+
and documentation.
|
|
812
|
+
"""
|
|
813
|
+
from sage.manifolds.local_frame import LocalFrame
|
|
814
|
+
if symbol is None:
|
|
815
|
+
symbol = from_frame._symbol
|
|
816
|
+
latex_symbol = from_frame._latex_symbol
|
|
817
|
+
indices = from_frame._indices
|
|
818
|
+
latex_indices = from_frame._latex_indices
|
|
819
|
+
symbol_dual = from_frame._symbol_dual
|
|
820
|
+
latex_symbol_dual = from_frame._latex_symbol_dual
|
|
821
|
+
for other in self._known_bases:
|
|
822
|
+
if symbol == other._symbol:
|
|
823
|
+
return other
|
|
824
|
+
return LocalFrame(self, symbol, latex_symbol=latex_symbol,
|
|
825
|
+
indices=indices,
|
|
826
|
+
latex_indices=latex_indices,
|
|
827
|
+
symbol_dual=symbol_dual,
|
|
828
|
+
latex_symbol_dual=latex_symbol_dual)
|
|
829
|
+
|
|
830
|
+
set_default_frame = FiniteRankFreeModule.set_default_basis
|
|
831
|
+
default_frame = FiniteRankFreeModule.default_basis
|