1+ r"""
2+ Vector Bundles
3+ """
4+ #*****************************************************************************
5+ # Copyright (C) 2019 Michael Jung <micjung at uni-potsdam.de>
6+ #
7+ # Distributed under the terms of the GNU General Public License (GPL)
8+ # http://www.gnu.org/licenses/
9+ #******************************************************************************
10+
11+ from sage .categories .category_types import Category_over_base_ring
12+ from sage .categories .category_with_axiom import CategoryWithAxiom_over_base_ring
13+ from sage .misc .cachefunc import cached_method
14+ from sage .categories .sets_cat import Sets
15+ from sage .categories .fields import Fields
16+
17+ class VectorBundles (Category_over_base_ring ):
18+ r"""
19+ The category of vector bundles over any base space and base field.
20+
21+ .. SEEALSO:: :class:`~sage.manifolds.vector_bundle.TopologicalVectorBundle`
22+
23+ EXAMPLES::
24+
25+ sage: M = Manifold(2, 'M', structure='top')
26+ sage: from sage.categories.vector_bundles import VectorBundles
27+ sage: C = VectorBundles(M, RR); C
28+ Category of vector bundles over Real Field with 53 bits of precision
29+ with base space 2-dimensional topological manifold M
30+ sage: C.super_categories()
31+ [Category of topological spaces]
32+
33+ TESTS::
34+
35+ sage: TestSuite(C).run(skip="_test_category_over_bases")
36+
37+ """
38+ def __init__ (self , base_space , base_field , name = None ):
39+ r"""
40+ Initialize ``self``.
41+
42+ EXAMPLES::
43+
44+ sage: M = Manifold(2, 'M')
45+ sage: from sage.categories.vector_bundles import VectorBundles
46+ sage: C = VectorBundles(M, RR)
47+ sage: TestSuite(C).run(skip="_test_category_over_bases")
48+
49+ """
50+ if base_field not in Fields ().Topological ():
51+ raise ValueError ("base field must be a topological field" )
52+ self ._base_space = base_space
53+ Category_over_base_ring .__init__ (self , base_field , name )
54+
55+ @cached_method
56+ def super_categories (self ):
57+ r"""
58+ EXAMPLES::
59+
60+ sage: M = Manifold(2, 'M')
61+ sage: from sage.categories.vector_bundles import VectorBundles
62+ sage: VectorBundles(M, RR).super_categories()
63+ [Category of topological spaces]
64+
65+ """
66+ return [Sets ().Topological ()]
67+
68+ def base_space (self ):
69+ r"""
70+ Return the base space of this category.
71+
72+ EXAMPLES::
73+
74+ sage: M = Manifold(2, 'M', structure='top')
75+ sage: from sage.categories.vector_bundles import VectorBundles
76+ sage: VectorBundles(M, RR).base_space()
77+ 2-dimensional topological manifold M
78+
79+ """
80+ return self ._base_space
81+
82+ def _repr_object_names (self ):
83+ r"""
84+ Return the name of the objects of this category.
85+
86+ .. SEEALSO:: :meth:`Category._repr_object_names`
87+
88+ EXAMPLES::
89+
90+ sage: M = Manifold(2, 'M')
91+ sage: from sage.categories.vector_bundles import VectorBundles
92+ sage: VectorBundles(M, RR)._repr_object_names()
93+ 'vector bundles over Real Field with 53 bits of precision with base
94+ space 2-dimensional differentiable manifold M'
95+
96+ """
97+ base_space = self ._base_space
98+ return Category_over_base_ring ._repr_object_names (self ) + \
99+ " with base space %s" % base_space
100+
101+ class SubcategoryMethods :
102+ @cached_method
103+ def Differentiable (self ):
104+ r"""
105+ Return the subcategory of the differentiable objects
106+ of ``self``.
107+
108+ EXAMPLES::
109+
110+ sage: M = Manifold(2, 'M')
111+ sage: from sage.categories.vector_bundles import VectorBundles
112+ sage: VectorBundles(M, RR).Differentiable()
113+ Category of differentiable vector bundles over Real Field with
114+ 53 bits of precision with base space 2-dimensional
115+ differentiable manifold M
116+
117+ TESTS::
118+
119+ sage: TestSuite(VectorBundles(M, RR).Differentiable()).run()
120+ sage: VectorBundles(M, RR).Differentiable.__module__
121+ 'sage.categories.vector_bundles'
122+
123+ """
124+ return self ._with_axiom ('Differentiable' )
125+
126+ @cached_method
127+ def Smooth (self ):
128+ """
129+ Return the subcategory of the smooth objects of ``self``.
130+
131+ EXAMPLES::
132+
133+ sage: M = Manifold(2, 'M')
134+ sage: from sage.categories.vector_bundles import VectorBundles
135+ sage: VectorBundles(M, RR).Smooth()
136+ Category of smooth vector bundles over Real Field with 53 bits
137+ of precision with base space 2-dimensional differentiable
138+ manifold M
139+
140+ TESTS::
141+
142+ sage: TestSuite(VectorBundles(M, RR).Smooth()).run()
143+ sage: VectorBundles(M, RR).Smooth.__module__
144+ 'sage.categories.vector_bundles'
145+
146+ """
147+ return self ._with_axiom ('Smooth' )
148+
149+ class Differentiable (CategoryWithAxiom_over_base_ring ):
150+ """
151+ The category of differentiable vector bundles.
152+
153+ A differentiable vector bundle is a differentiable manifold with
154+ differentiable surjective projection on a differentiable base space.
155+
156+ """
157+
158+ class Smooth (CategoryWithAxiom_over_base_ring ):
159+ """
160+ The category of smooth vector bundles.
161+
162+ A smooth vector bundle is a smooth manifold with
163+ smooth surjective projection on a smooth base space.
164+
165+ """
0 commit comments