@@ -1147,15 +1147,16 @@ def coxeter_diagram(self):
1147
1147
1148
1148
EXAMPLES::
1149
1149
1150
- sage: CartanType(['B',3]).coxeter_diagram() # needs sage.graphs
1150
+ sage: # needs sage.graphs
1151
+ sage: CartanType(['B',3]).coxeter_diagram()
1151
1152
Graph on 3 vertices
1152
- sage: CartanType(['A',3]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1153
+ sage: CartanType(['A',3]).coxeter_diagram().edges(sort=True)
1153
1154
[(1, 2, 3), (2, 3, 3)]
1154
- sage: CartanType(['B',3]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1155
+ sage: CartanType(['B',3]).coxeter_diagram().edges(sort=True)
1155
1156
[(1, 2, 3), (2, 3, 4)]
1156
- sage: CartanType(['G',2]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1157
+ sage: CartanType(['G',2]).coxeter_diagram().edges(sort=True)
1157
1158
[(1, 2, 6)]
1158
- sage: CartanType(['F',4]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1159
+ sage: CartanType(['F',4]).coxeter_diagram().edges(sort=True)
1159
1160
[(1, 2, 3), (2, 3, 4), (3, 4, 3)]
1160
1161
"""
1161
1162
@@ -1641,17 +1642,18 @@ def coxeter_diagram(self):
1641
1642
1642
1643
EXAMPLES::
1643
1644
1644
- sage: CartanType(['A',3]).coxeter_diagram() # needs sage.graphs
1645
+ sage: # needs sage.graphs
1646
+ sage: CartanType(['A',3]).coxeter_diagram()
1645
1647
Graph on 3 vertices
1646
- sage: CartanType(['A',3]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1648
+ sage: CartanType(['A',3]).coxeter_diagram().edges(sort=True)
1647
1649
[(1, 2, 3), (2, 3, 3)]
1648
- sage: CartanType(['B',3]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1650
+ sage: CartanType(['B',3]).coxeter_diagram().edges(sort=True)
1649
1651
[(1, 2, 3), (2, 3, 4)]
1650
- sage: CartanType(['G',2]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1652
+ sage: CartanType(['G',2]).coxeter_diagram().edges(sort=True)
1651
1653
[(1, 2, 6)]
1652
- sage: CartanType(['F',4]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1654
+ sage: CartanType(['F',4]).coxeter_diagram().edges(sort=True)
1653
1655
[(1, 2, 3), (2, 3, 4), (3, 4, 3)]
1654
- sage: CartanType(['A',2,2]).coxeter_diagram().edges(sort=True) # needs sage.graphs
1656
+ sage: CartanType(['A',2,2]).coxeter_diagram().edges(sort=True)
1655
1657
[(0, 1, +Infinity)]
1656
1658
"""
1657
1659
return self .dynkin_diagram ().coxeter_diagram ()
@@ -1977,17 +1979,18 @@ def special_nodes(self):
1977
1979
1978
1980
EXAMPLES::
1979
1981
1980
- sage: CartanType(['A',3,1]).special_nodes() # needs sage.graphs sage.groups
1982
+ sage: # needs sage.graphs sage.groups
1983
+ sage: CartanType(['A',3,1]).special_nodes()
1981
1984
(0, 1, 2, 3)
1982
- sage: CartanType(['C',2,1]).special_nodes() # needs sage.graphs sage.groups
1985
+ sage: CartanType(['C',2,1]).special_nodes()
1983
1986
(0, 2)
1984
- sage: CartanType(['D',4,1]).special_nodes() # needs sage.graphs sage.groups
1987
+ sage: CartanType(['D',4,1]).special_nodes()
1985
1988
(0, 1, 3, 4)
1986
- sage: CartanType(['E',6,1]).special_nodes() # needs sage.graphs sage.groups
1989
+ sage: CartanType(['E',6,1]).special_nodes()
1987
1990
(0, 1, 6)
1988
- sage: CartanType(['D',3,2]).special_nodes() # needs sage.graphs sage.groups
1991
+ sage: CartanType(['D',3,2]).special_nodes()
1989
1992
(0, 2)
1990
- sage: CartanType(['A',4,2]).special_nodes() # needs sage.graphs sage.groups
1993
+ sage: CartanType(['A',4,2]).special_nodes()
1991
1994
(0,)
1992
1995
"""
1993
1996
return tuple (sorted (self .dynkin_diagram ().automorphism_group (edge_labels = True ).orbit (self .special_node ())))
@@ -2094,13 +2097,14 @@ def row_annihilator(self, m=None):
2094
2097
2095
2098
EXAMPLES::
2096
2099
2097
- sage: RootSystem(['C',2,1]).cartan_type().acheck() # needs sage.graphs
2100
+ sage: # needs sage.graphs
2101
+ sage: RootSystem(['C',2,1]).cartan_type().acheck()
2098
2102
Finite family {0: 1, 1: 1, 2: 1}
2099
- sage: RootSystem(['D',4,1]).cartan_type().acheck() # needs sage.graphs
2103
+ sage: RootSystem(['D',4,1]).cartan_type().acheck()
2100
2104
Finite family {0: 1, 1: 1, 2: 2, 3: 1, 4: 1}
2101
- sage: RootSystem(['F',4,1]).cartan_type().acheck() # needs sage.graphs
2105
+ sage: RootSystem(['F',4,1]).cartan_type().acheck()
2102
2106
Finite family {0: 1, 1: 2, 2: 3, 3: 2, 4: 1}
2103
- sage: RootSystem(['BC',4,2]).cartan_type().acheck() # needs sage.graphs
2107
+ sage: RootSystem(['BC',4,2]).cartan_type().acheck()
2104
2108
Finite family {0: 1, 1: 2, 2: 2, 3: 2, 4: 2}
2105
2109
2106
2110
``acheck`` is a shortcut for row_annihilator::
@@ -2143,13 +2147,14 @@ def col_annihilator(self):
2143
2147
2144
2148
EXAMPLES::
2145
2149
2146
- sage: RootSystem(['C',2,1]).cartan_type().a() # needs sage.graphs
2150
+ sage: # needs sage.graphs
2151
+ sage: RootSystem(['C',2,1]).cartan_type().a()
2147
2152
Finite family {0: 1, 1: 2, 2: 1}
2148
- sage: RootSystem(['D',4,1]).cartan_type().a() # needs sage.graphs
2153
+ sage: RootSystem(['D',4,1]).cartan_type().a()
2149
2154
Finite family {0: 1, 1: 1, 2: 2, 3: 1, 4: 1}
2150
- sage: RootSystem(['F',4,1]).cartan_type().a() # needs sage.graphs
2155
+ sage: RootSystem(['F',4,1]).cartan_type().a()
2151
2156
Finite family {0: 1, 1: 2, 2: 3, 3: 4, 4: 2}
2152
- sage: RootSystem(['BC',4,2]).cartan_type().a() # needs sage.graphs
2157
+ sage: RootSystem(['BC',4,2]).cartan_type().a()
2153
2158
Finite family {0: 2, 1: 2, 2: 2, 3: 2, 4: 1}
2154
2159
2155
2160
``a`` is a shortcut for col_annihilator::
@@ -2172,13 +2177,14 @@ def c(self):
2172
2177
2173
2178
EXAMPLES::
2174
2179
2175
- sage: RootSystem(['C',2,1]).cartan_type().c() # needs sage.graphs
2180
+ sage: # needs sage.graphs
2181
+ sage: RootSystem(['C',2,1]).cartan_type().c()
2176
2182
Finite family {0: 1, 1: 2, 2: 1}
2177
- sage: RootSystem(['D',4,1]).cartan_type().c() # needs sage.graphs
2183
+ sage: RootSystem(['D',4,1]).cartan_type().c()
2178
2184
Finite family {0: 1, 1: 1, 2: 1, 3: 1, 4: 1}
2179
- sage: RootSystem(['F',4,1]).cartan_type().c() # needs sage.graphs
2185
+ sage: RootSystem(['F',4,1]).cartan_type().c()
2180
2186
Finite family {0: 1, 1: 1, 2: 1, 3: 2, 4: 2}
2181
- sage: RootSystem(['BC',4,2]).cartan_type().c() # needs sage.graphs
2187
+ sage: RootSystem(['BC',4,2]).cartan_type().c()
2182
2188
Finite family {0: 2, 1: 1, 2: 1, 3: 1, 4: 1}
2183
2189
2184
2190
TESTS::
@@ -2228,55 +2234,57 @@ def translation_factors(self):
2228
2234
2229
2235
EXAMPLES::
2230
2236
2231
- sage: CartanType(['C',2,1]).translation_factors() # needs sage.graphs
2237
+ sage: # needs sage.graphs
2238
+ sage: CartanType(['C',2,1]).translation_factors()
2232
2239
Finite family {0: 1, 1: 2, 2: 1}
2233
- sage: CartanType(['C',2,1]).dual().translation_factors() # needs sage.graphs
2240
+ sage: CartanType(['C',2,1]).dual().translation_factors()
2234
2241
Finite family {0: 1, 1: 1, 2: 1}
2235
- sage: CartanType(['D',4,1]).translation_factors() # needs sage.graphs
2242
+ sage: CartanType(['D',4,1]).translation_factors()
2236
2243
Finite family {0: 1, 1: 1, 2: 1, 3: 1, 4: 1}
2237
- sage: CartanType(['F',4,1]).translation_factors() # needs sage.graphs
2244
+ sage: CartanType(['F',4,1]).translation_factors()
2238
2245
Finite family {0: 1, 1: 1, 2: 1, 3: 2, 4: 2}
2239
- sage: CartanType(['BC',4,2]).translation_factors() # needs sage.graphs
2246
+ sage: CartanType(['BC',4,2]).translation_factors()
2240
2247
Finite family {0: 1, 1: 1, 2: 1, 3: 1, 4: 1/2}
2241
2248
2242
2249
We proceed with systematic tests taken from MuPAD-Combinat's
2243
2250
testsuite::
2244
2251
2245
- sage: list(CartanType(["A", 1, 1]).translation_factors()) # needs sage.graphs
2252
+ sage: # needs sage.graphs
2253
+ sage: list(CartanType(["A", 1, 1]).translation_factors())
2246
2254
[1, 1]
2247
- sage: list(CartanType(["A", 5, 1]).translation_factors()) # needs sage.graphs
2255
+ sage: list(CartanType(["A", 5, 1]).translation_factors())
2248
2256
[1, 1, 1, 1, 1, 1]
2249
- sage: list(CartanType(["B", 5, 1]).translation_factors()) # needs sage.graphs
2257
+ sage: list(CartanType(["B", 5, 1]).translation_factors())
2250
2258
[1, 1, 1, 1, 1, 2]
2251
- sage: list(CartanType(["C", 5, 1]).translation_factors()) # needs sage.graphs
2259
+ sage: list(CartanType(["C", 5, 1]).translation_factors())
2252
2260
[1, 2, 2, 2, 2, 1]
2253
- sage: list(CartanType(["D", 5, 1]).translation_factors()) # needs sage.graphs
2261
+ sage: list(CartanType(["D", 5, 1]).translation_factors())
2254
2262
[1, 1, 1, 1, 1, 1]
2255
- sage: list(CartanType(["E", 6, 1]).translation_factors()) # needs sage.graphs
2263
+ sage: list(CartanType(["E", 6, 1]).translation_factors())
2256
2264
[1, 1, 1, 1, 1, 1, 1]
2257
- sage: list(CartanType(["E", 7, 1]).translation_factors()) # needs sage.graphs
2265
+ sage: list(CartanType(["E", 7, 1]).translation_factors())
2258
2266
[1, 1, 1, 1, 1, 1, 1, 1]
2259
- sage: list(CartanType(["E", 8, 1]).translation_factors()) # needs sage.graphs
2267
+ sage: list(CartanType(["E", 8, 1]).translation_factors())
2260
2268
[1, 1, 1, 1, 1, 1, 1, 1, 1]
2261
- sage: list(CartanType(["F", 4, 1]).translation_factors()) # needs sage.graphs
2269
+ sage: list(CartanType(["F", 4, 1]).translation_factors())
2262
2270
[1, 1, 1, 2, 2]
2263
- sage: list(CartanType(["G", 2, 1]).translation_factors()) # needs sage.graphs
2271
+ sage: list(CartanType(["G", 2, 1]).translation_factors())
2264
2272
[1, 3, 1]
2265
- sage: list(CartanType(["A", 2, 2]).translation_factors()) # needs sage.graphs
2273
+ sage: list(CartanType(["A", 2, 2]).translation_factors())
2266
2274
[1, 1/2]
2267
- sage: list(CartanType(["A", 2, 2]).dual().translation_factors()) # needs sage.graphs
2275
+ sage: list(CartanType(["A", 2, 2]).dual().translation_factors())
2268
2276
[1/2, 1]
2269
- sage: list(CartanType(["A", 10, 2]).translation_factors()) # needs sage.graphs
2277
+ sage: list(CartanType(["A", 10, 2]).translation_factors())
2270
2278
[1, 1, 1, 1, 1, 1/2]
2271
- sage: list(CartanType(["A", 10, 2]).dual().translation_factors()) # needs sage.graphs
2279
+ sage: list(CartanType(["A", 10, 2]).dual().translation_factors())
2272
2280
[1/2, 1, 1, 1, 1, 1]
2273
- sage: list(CartanType(["A", 9, 2]).translation_factors()) # needs sage.graphs
2281
+ sage: list(CartanType(["A", 9, 2]).translation_factors())
2274
2282
[1, 1, 1, 1, 1, 1]
2275
- sage: list(CartanType(["D", 5, 2]).translation_factors()) # needs sage.graphs
2283
+ sage: list(CartanType(["D", 5, 2]).translation_factors())
2276
2284
[1, 1, 1, 1, 1]
2277
- sage: list(CartanType(["D", 4, 3]).translation_factors()) # needs sage.graphs
2285
+ sage: list(CartanType(["D", 4, 3]).translation_factors())
2278
2286
[1, 1, 1]
2279
- sage: list(CartanType(["E", 6, 2]).translation_factors()) # needs sage.graphs
2287
+ sage: list(CartanType(["E", 6, 2]).translation_factors())
2280
2288
[1, 1, 1, 1, 1]
2281
2289
2282
2290
We conclude with a discussion of the appropriate value for
@@ -2312,11 +2320,11 @@ def translation_factors(self):
2312
2320
2313
2321
The projections of the simple roots can be read off::
2314
2322
2315
- sage: alpha[0]
2323
+ sage: alpha[0] # needs sage.graphs
2316
2324
2*Lambda[0] - Lambda[1]
2317
- sage: alpha[1]
2325
+ sage: alpha[1] # needs sage.graphs
2318
2326
-2*Lambda[0] + 2*Lambda[1] - Lambda[2]
2319
- sage: alpha[2]
2327
+ sage: alpha[2] # needs sage.graphs
2320
2328
-2*Lambda[1] + 2*Lambda[2]
2321
2329
2322
2330
Namely `\alpha_0 = -\omega_1`, `\alpha_1 = 2\omega_1 -
0 commit comments