Skip to content

fix dimension of total space of vector bundle #40249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions src/sage/manifolds/differentiable/vector_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
- Michael Jung (2019) : initial version
"""

#******************************************************************************
# ****************************************************************************
# Copyright (C) 2019 Michael Jung <micjung at uni-potsdam.de>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# https://www.gnu.org/licenses/
#******************************************************************************
# ****************************************************************************

from sage.categories.vector_bundles import VectorBundles
from sage.manifolds.vector_bundle import TopologicalVectorBundle
Expand Down Expand Up @@ -317,18 +317,20 @@ def total_space(self):
sage: M = Manifold(3, 'M')
sage: E = M.vector_bundle(2, 'E')
sage: E.total_space()
6-dimensional differentiable manifold E
5-dimensional differentiable manifold E
"""
if self._total_space is None:
from sage.manifolds.manifold import Manifold
base_space = self._base_space
dim = base_space._dim * self._rank
dim = base_space._dim + self._rank
sindex = base_space.start_index()
self._total_space = Manifold(dim, self._name,
latex_name=self._latex_name,
field=self._field, structure='differentiable',
diff_degree=self._diff_degree,
start_index=sindex)
self._total_space = Manifold(
dim, self._name,
latex_name=self._latex_name,
field=self._field, structure='differentiable',
diff_degree=self._diff_degree,
start_index=sindex
)

# TODO: if update_atlas: introduce charts via self._atlas

Expand Down Expand Up @@ -634,9 +636,10 @@ def section_module(self, domain=None):
base_space = self.base_space()
return base_space.tensor_field_module(self._tensor_type,
dest_map=self._dest_map)
else:
return domain.tensor_field_module(self._tensor_type,
dest_map=self._dest_map.restrict(domain))
return domain.tensor_field_module(
self._tensor_type,
dest_map=self._dest_map.restrict(domain)
)

def section(self, *args, **kwargs):
r"""
Expand Down
39 changes: 22 additions & 17 deletions src/sage/manifolds/vector_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
- [Mil1974]_
"""

#******************************************************************************
# ****************************************************************************
# Copyright (C) 2019 Michael Jung <[email protected]>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# https://www.gnu.org/licenses/
#******************************************************************************
# ****************************************************************************

import sage.rings.abc
from sage.categories.vector_bundles import VectorBundles
Expand Down Expand Up @@ -265,16 +265,19 @@ def _init_attributes(self):
sage: E = M.vector_bundle(2, 'E')
sage: E._init_attributes()
"""
self._section_modules = {} # dict of section modules with domains as
# keys
self._section_modules = {}
# dict of section modules with domains as keys

self._atlas = [] # list of trivializations defined on self
self._transitions = {} # dictionary of transition maps (key: pair of
# of trivializations)
self._transitions = {}
# dictionary of transition maps (key: pair of trivializations)

self._frames = [] # list of local frames for self
self._frame_changes = {} # dictionary of changes of frames
self._coframes = [] # list of local coframes for self
self._trivial_parts = set() # subsets of base space on which self is
# trivial
self._coframes = [] # list of local coframes for self
self._trivial_parts = set()
# subsets of base space on which self is trivial

self._def_frame = None

def base_space(self):
Expand Down Expand Up @@ -526,7 +529,7 @@ def atlas(self):
Trivialization (phi_V, E|_V),
Trivialization (phi_M, E|_M)]
"""
return list(self._atlas) # Make a (shallow) copy
return list(self._atlas) # Make a (shallow) copy

def is_manifestly_trivial(self):
r"""
Expand Down Expand Up @@ -869,17 +872,19 @@ def total_space(self):
sage: M = Manifold(3, 'M', structure='top')
sage: E = M.vector_bundle(2, 'E')
sage: E.total_space()
6-dimensional topological manifold E
5-dimensional topological manifold E
"""
if self._total_space is None:
from sage.manifolds.manifold import Manifold
base_space = self._base_space
dim = base_space._dim * self._rank
dim = base_space._dim + self._rank
sindex = base_space.start_index()
self._total_space = Manifold(dim, self._name,
latex_name=self._latex_name,
field=self._field, structure='topological',
start_index=sindex)
self._total_space = Manifold(
dim, self._name,
latex_name=self._latex_name,
field=self._field, structure='topological',
start_index=sindex
)

# TODO: if update_atlas: introduce charts via self._atlas

Expand Down Expand Up @@ -934,7 +939,7 @@ def set_change_of_frame(self, frame1, frame2, change_of_frame,
"section module")
if isinstance(change_of_frame, FreeModuleAutomorphism):
auto = change_of_frame
else: # Otherwise try to coerce the input
else: # Otherwise try to coerce the input
auto_group = sec_module.general_linear_group()
auto = auto_group(change_of_frame, basis=frame1)
sec_module.set_change_of_basis(frame1, frame2, auto,
Expand Down
Loading