Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

r""" 

Manifolds 

""" 

#***************************************************************************** 

# Copyright (C) 2015 Travis Scrimshaw <tscrim at ucdavis.edu> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# http://www.gnu.org/licenses/ 

#****************************************************************************** 

 

from sage.misc.abstract_method import abstract_method 

from sage.misc.cachefunc import cached_method 

from sage.categories.category_types import Category_over_base_ring 

from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring 

from sage.categories.sets_cat import Sets 

from sage.categories.fields import Fields 

 

class Manifolds(Category_over_base_ring): 

r""" 

The category of manifolds over any topological field. 

 

Let `k` be a topological field. A `d`-dimensional `k`-*manifold* `M` 

is a second countable Hausdorff space such that the neighborhood of 

any point `x \in M` is homeomorphic to `k^d`. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: C = Manifolds(RR); C 

Category of manifolds over Real Field with 53 bits of precision 

sage: C.super_categories() 

[Category of topological spaces] 

 

TESTS:: 

 

sage: TestSuite(C).run(skip="_test_category_over_bases") 

""" 

def __init__(self, base, name=None): 

r""" 

Initialize ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: C = Manifolds(RR) 

sage: TestSuite(C).run(skip="_test_category_over_bases") 

""" 

if base not in Fields().Topological(): 

raise ValueError("base must be a topological field") 

Category_over_base_ring.__init__(self, base, name) 

 

@cached_method 

def super_categories(self): 

""" 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).super_categories() 

[Category of topological spaces] 

""" 

return [Sets().Topological()] 

 

def additional_structure(self): 

r""" 

Return ``None``. 

 

Indeed, the category of manifolds defines no new 

structure: a morphism of topological spaces between 

manifolds is a manifold morphism. 

 

.. SEEALSO:: :meth:`Category.additional_structure` 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).additional_structure() 

""" 

return None 

 

class ParentMethods: 

@abstract_method 

def dimension(self): 

""" 

Return the dimension of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: M = Manifolds(RR).example() 

sage: M.dimension() 

3 

""" 

 

class SubcategoryMethods: 

@cached_method 

def Connected(self): 

""" 

Return the full subcategory of the connected objects of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Connected() 

Category of connected manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: Manifolds(RR).Connected.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('Connected') 

 

@cached_method 

def FiniteDimensional(self): 

""" 

Return the full subcategory of the finite dimensional 

objects of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: C = Manifolds(RR).Connected().FiniteDimensional(); C 

Category of finite dimensional connected manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Connected().FiniteDimensional.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('FiniteDimensional') 

 

@cached_method 

def Differentiable(self): 

""" 

Return the subcategory of the differentiable objects 

of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Differentiable() 

Category of differentiable manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: TestSuite(Manifolds(RR).Differentiable()).run() 

sage: Manifolds(RR).Differentiable.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('Differentiable') 

 

@cached_method 

def Smooth(self): 

""" 

Return the subcategory of the smooth objects of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Smooth() 

Category of smooth manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: TestSuite(Manifolds(RR).Smooth()).run() 

sage: Manifolds(RR).Smooth.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('Smooth') 

 

@cached_method 

def Analytic(self): 

""" 

Return the subcategory of the analytic objects of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Analytic() 

Category of analytic manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: TestSuite(Manifolds(RR).Analytic()).run() 

sage: Manifolds(RR).Analytic.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('Analytic') 

 

@cached_method 

def AlmostComplex(self): 

""" 

Return the subcategory of the almost complex objects 

of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).AlmostComplex() 

Category of almost complex manifolds 

over Real Field with 53 bits of precision 

 

TESTS:: 

 

sage: TestSuite(Manifolds(RR).AlmostComplex()).run() 

sage: Manifolds(RR).AlmostComplex.__module__ 

'sage.categories.manifolds' 

""" 

return self._with_axiom('AlmostComplex') 

 

@cached_method 

def Complex(self): 

""" 

Return the subcategory of manifolds over `\CC` of ``self``. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(CC).Complex() 

Category of complex manifolds over 

Complex Field with 53 bits of precision 

 

TESTS:: 

 

sage: TestSuite(Manifolds(CC).Complex()).run() 

sage: Manifolds(CC).Complex.__module__ 

'sage.categories.manifolds' 

""" 

return ComplexManifolds(self.base())._with_axioms(self.axioms()) 

 

class Differentiable(CategoryWithAxiom_over_base_ring): 

""" 

The category of differentiable manifolds. 

 

A differentiable manifold is a manifold with a differentiable atlas. 

""" 

 

class Smooth(CategoryWithAxiom_over_base_ring): 

""" 

The category of smooth manifolds. 

 

A smooth manifold is a manifold with a smooth atlas. 

""" 

def extra_super_categories(self): 

""" 

Return the extra super categories of ``self``. 

 

A smooth manifold is differentiable. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Smooth().super_categories() # indirect doctest 

[Category of differentiable manifolds 

over Real Field with 53 bits of precision] 

""" 

return [Manifolds(self.base()).Differentiable()] 

 

class Analytic(CategoryWithAxiom_over_base_ring): 

r""" 

The category of complex manifolds. 

 

An analytic manifold is a manifold with an analytic atlas. 

""" 

def extra_super_categories(self): 

""" 

Return the extra super categories of ``self``. 

 

An analytic manifold is smooth. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).Analytic().super_categories() # indirect doctest 

[Category of smooth manifolds 

over Real Field with 53 bits of precision] 

""" 

return [Manifolds(self.base()).Smooth()] 

 

class AlmostComplex(CategoryWithAxiom_over_base_ring): 

r""" 

The category of almost complex manifolds. 

 

An *almost complex manifold* `M` is a manifold with a smooth tensor 

field `J` of rank `(1, 1)` such that `J^2 = -1` when regarded as a 

vector bundle isomorphism `J : TM \to TM` on the tangent bundle. 

The tensor field `J` is called the *almost complex structure* of `M`. 

""" 

def extra_super_categories(self): 

""" 

Return the extra super categories of ``self``. 

 

An almost complex manifold is smooth. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).AlmostComplex().super_categories() # indirect doctest 

[Category of smooth manifolds 

over Real Field with 53 bits of precision] 

""" 

return [Manifolds(self.base()).Smooth()] 

 

class FiniteDimensional(CategoryWithAxiom_over_base_ring): 

""" 

Category of finite dimensional manifolds. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: C = Manifolds(RR).FiniteDimensional() 

sage: TestSuite(C).run(skip="_test_category_over_bases") 

""" 

 

class Connected(CategoryWithAxiom_over_base_ring): 

""" 

The category of connected manifolds. 

 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: C = Manifolds(RR).Connected() 

sage: TestSuite(C).run(skip="_test_category_over_bases") 

""" 

 

class ComplexManifolds(Category_over_base_ring): 

r""" 

The category of complex manifolds. 

 

A `d`-dimensional complex manifold is a manifold whose underlying 

vector space is `\CC^d` and has a holomorphic atlas. 

""" 

@cached_method 

def super_categories(self): 

""" 

EXAMPLES:: 

 

sage: from sage.categories.manifolds import Manifolds 

sage: Manifolds(RR).super_categories() 

[Category of topological spaces] 

""" 

return [Manifolds(self.base()).Analytic()]