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

r""" 

Topological Spaces 

""" 

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

# 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.cachefunc import cached_method 

from sage.categories.category_with_axiom import CategoryWithAxiom 

from sage.categories.covariant_functorial_construction import RegressiveCovariantConstructionCategory 

from sage.categories.sets_cat import Sets 

 

class TopologicalSpacesCategory(RegressiveCovariantConstructionCategory): 

 

_functor_category = "Topological" 

 

def _repr_object_names(self): 

""" 

EXAMPLES:: 

 

sage: Groups().Topological() # indirect doctest 

Category of topological groups 

""" 

return "topological {}".format(self.base_category()._repr_object_names()) 

 

class TopologicalSpaces(TopologicalSpacesCategory): 

""" 

The category of topological spaces. 

 

EXAMPLES:: 

 

sage: Sets().Topological() 

Category of topological spaces 

sage: Sets().Topological().super_categories() 

[Category of sets] 

 

The category of topological spaces defines the topological structure, 

which shall be preserved by morphisms:: 

 

sage: Sets().Topological().additional_structure() 

Category of topological spaces 

 

TESTS:: 

 

sage: TestSuite(Sets().Topological()).run() 

""" 

# We must override the general object because the names don't match 

_base_category_class = (Sets,) 

 

def _repr_object_names(self): 

""" 

EXAMPLES:: 

 

sage: Sets().Topological() # indirect doctest 

Category of topological spaces 

""" 

return "topological spaces" 

 

class SubcategoryMethods: 

@cached_method 

def Connected(self): 

""" 

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

 

EXAMPLES:: 

 

sage: Sets().Topological().Connected() 

Category of connected topological spaces 

 

TESTS:: 

 

sage: TestSuite(Sets().Topological().Connected()).run() 

sage: Sets().Topological().Connected.__module__ 

'sage.categories.topological_spaces' 

""" 

return self._with_axiom('Connected') 

 

@cached_method 

def Compact(self): 

""" 

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

 

EXAMPLES:: 

 

sage: Sets().Topological().Compact() 

Category of compact topological spaces 

 

TESTS:: 

 

sage: TestSuite(Sets().Topological().Compact()).run() 

sage: Sets().Topological().Compact.__module__ 

'sage.categories.topological_spaces' 

""" 

return self._with_axiom('Compact') 

 

class Connected(CategoryWithAxiom): 

""" 

The category of connected topological spaces. 

""" 

 

class Compact(CategoryWithAxiom): 

""" 

The category of compact topological spaces. 

"""