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

""" 

Root system data for type A infinity 

""" 

 

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

# Copyright (C) 2016 Andrew Mathas <Andrew dot Mathas at Sydney dot edu dot au> 

# 

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

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

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

 

from __future__ import print_function, absolute_import 

 

from .cartan_type import CartanType_standard, CartanType_simple 

from sage.rings.integer_ring import ZZ 

 

 

class CartanType(CartanType_standard, CartanType_simple): 

r""" 

The Cartan type `A_{\infty}`. 

 

We use ``NN`` and ``ZZ`` to explicitly differentiate between the 

`A_{+\infty}` and `A_{\infty}` root systems, respectively. 

While ``oo`` is the same as ``+Infinity`` in Sage, it is used as 

an alias for ``ZZ``. 

""" 

# We do not inherit from CartanType_crystallographic because it provides 

# methods that are not implemented for A_oo. 

def __init__(self, index_set): 

""" 

EXAMPLES:: 

 

sage: CartanType(['A',oo]) is CartanType(['A', ZZ]) 

True 

sage: CartanType(['A',oo]) is CartanType(['A', NN]) 

False 

sage: ct=CartanType(['A',ZZ]) 

sage: ct 

['A', ZZ] 

sage: ct._repr_(compact = True) 

'A_ZZ' 

sage: ct.is_irreducible() 

True 

sage: ct.is_finite() 

False 

sage: ct.is_affine() 

False 

sage: ct.is_untwisted_affine() 

False 

sage: ct.is_crystallographic() 

True 

sage: ct.is_simply_laced() 

True 

sage: ct.dual() 

['A', ZZ] 

 

TESTS:: 

 

sage: TestSuite(ct).run() 

""" 

super(CartanType, self).__init__() 

self.letter = 'A' 

self.n = index_set 

 

def _repr_(self, compact=False): 

""" 

Return a representation of ``self``. 

 

TESTS:: 

 

sage: CartanType(['A',ZZ]) 

['A', ZZ] 

sage: CartanType(['A',NN])._repr_(compact=True) 

'A_NN' 

""" 

ret = '%s_%s' if compact else "['%s', %s]" 

return ret % (self.letter, 'ZZ' if self.n == ZZ else 'NN') 

 

def _latex_(self): 

""" 

Return a latex representation of ``self``. 

 

EXAMPLES:: 

 

sage: latex( CartanType(['A',NN]) ) 

A_{\Bold{N}} 

sage: latex( CartanType(['A',ZZ]) ) 

A_{\Bold{Z}} 

""" 

return 'A_{{{}}}'.format(self.n._latex_()) 

 

def ascii_art(self, label=lambda i: i, node=None): 

""" 

Return an ascii art representation of the extended Dynkin diagram. 

 

EXAMPLES:: 

 

sage: print(CartanType(['A', ZZ]).ascii_art()) 

..---O---O---O---O---O---O---O---.. 

-3 -2 -1 0 1 2 3 

sage: print(CartanType(['A', NN]).ascii_art()) 

O---O---O---O---O---O---O---.. 

0 1 2 3 4 5 6 

 

""" 

if node is None: 

node = self._ascii_art_node 

 

if self.n == ZZ: 

ret = '..---'+'---'.join(node(label(i)) for i in range(7))+'---..\n' 

ret += ' '+''.join("{:4}".format(label(i)) for i in range(-3,4)) 

else: 

ret = '---'.join(node(label(i)) for i in range(7))+'---..\n' 

ret += '0'+''.join("{:4}".format(label(i)) for i in range(1,7)) 

 

return ret 

 

def dual(self): 

""" 

Simply laced Cartan types are self-dual, so return ``self``. 

 

EXAMPLES:: 

 

sage: CartanType(["A", NN]).dual() 

['A', NN] 

sage: CartanType(["A", ZZ]).dual() 

['A', ZZ] 

""" 

return self 

 

def is_simply_laced(self): 

""" 

Return ``True`` because ``self`` is simply laced. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).is_simply_laced() 

True 

sage: CartanType(['A', ZZ]).is_simply_laced() 

True 

""" 

return True 

 

def is_crystallographic(self): 

""" 

Return ``False`` because ``self`` is not crystallographic. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).is_crystallographic() 

True 

sage: CartanType(['A', ZZ]).is_crystallographic() 

True 

""" 

return True 

 

def is_finite(self): 

""" 

Return ``True`` because ``self`` is not finite. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).is_finite() 

False 

sage: CartanType(['A', ZZ]).is_finite() 

False 

""" 

return False 

 

def is_affine(self): 

""" 

Return ``False`` because ``self`` is not (untwisted) affine. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).is_affine() 

False 

sage: CartanType(['A', ZZ]).is_affine() 

False 

""" 

return False 

 

def is_untwisted_affine(self): 

""" 

Return ``False`` because ``self`` is not (untwisted) affine. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).is_untwisted_affine() 

False 

sage: CartanType(['A', ZZ]).is_untwisted_affine() 

False 

""" 

return False 

 

def rank(self): 

""" 

Return the rank of ``self`` which for type `X_n` is `n`. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).rank() 

+Infinity 

sage: CartanType(['A', ZZ]).rank() 

+Infinity 

 

As this example shows, the rank is slightly ambiguous because the root 

systems of type `['A',NN]` and type `['A',ZZ]` have the same rank. 

Instead, it is better ot use :meth:`index_set` to differentiate between 

these two root systems. 

""" 

return self.n.cardinality() 

 

def type(self): 

""" 

Return the type of ``self``. 

 

EXAMPLES:: 

 

sage: CartanType(['A', NN]).type() 

'A' 

sage: CartanType(['A', ZZ]).type() 

'A' 

""" 

return self.letter 

 

def index_set(self): 

""" 

Return the index set for the Cartan type ``self``. 

 

The index set for all standard finite Cartan types is of the form 

`\{1, \ldots, n\}`. (See :mod:`~sage.combinat.root_system.type_I` 

for a slight abuse of this). 

 

EXAMPLES:: 

 

sage: CartanType(['A', 5]).index_set() 

(1, 2, 3, 4, 5) 

""" 

return self.n