Skip to content

Commit 5635dc4

Browse files
author
Matthias Koeppe
committed
sage.combinat.root_system: More block tags, docstring/doctest cosmetics
1 parent 68d31db commit 5635dc4

File tree

6 files changed

+137
-100
lines changed

6 files changed

+137
-100
lines changed

src/sage/combinat/root_system/cartan_type.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -331,59 +331,61 @@
331331
For the user convenience, Kac's notations for twisted affine types are
332332
automatically translated into the previous ones::
333333
334+
sage: # needs sage.graphs
334335
sage: CartanType(["A", 9, 2])
335336
['B', 5, 1]^*
336-
sage: CartanType(["A", 9, 2]).dynkin_diagram() # needs sage.graphs
337+
sage: CartanType(["A", 9, 2]).dynkin_diagram()
337338
O 0
338339
|
339340
|
340341
O---O---O---O=<=O
341342
1 2 3 4 5
342343
B5~*
343-
sage: CartanType(["A", 10, 2]).dynkin_diagram() # needs sage.graphs
344+
sage: CartanType(["A", 10, 2]).dynkin_diagram()
344345
O=<=O---O---O---O=<=O
345346
0 1 2 3 4 5
346347
BC5~
347-
sage: CartanType(["D", 5, 2]).dynkin_diagram() # needs sage.graphs
348+
sage: CartanType(["D", 5, 2]).dynkin_diagram()
348349
O=<=O---O---O=>=O
349350
0 1 2 3 4
350351
C4~*
351-
sage: CartanType(["D", 4, 3]).dynkin_diagram() # needs sage.graphs
352+
sage: CartanType(["D", 4, 3]).dynkin_diagram()
352353
3
353354
O=>=O---O
354355
2 1 0
355356
G2~* relabelled by {0: 0, 1: 2, 2: 1}
356-
sage: CartanType(["E", 6, 2]).dynkin_diagram() # needs sage.graphs
357+
sage: CartanType(["E", 6, 2]).dynkin_diagram()
357358
O---O---O=<=O---O
358359
0 1 2 3 4
359360
F4~*
360361
361362
Additionally one can set the notation option to use Kac's notation::
362363
364+
sage: # needs sage.graphs
363365
sage: CartanType.options['notation'] = 'Kac'
364366
sage: CartanType(["A", 9, 2])
365367
['A', 9, 2]
366-
sage: CartanType(["A", 9, 2]).dynkin_diagram() # needs sage.graphs
368+
sage: CartanType(["A", 9, 2]).dynkin_diagram()
367369
O 0
368370
|
369371
|
370372
O---O---O---O=<=O
371373
1 2 3 4 5
372374
A9^2
373-
sage: CartanType(["A", 10, 2]).dynkin_diagram() # needs sage.graphs
375+
sage: CartanType(["A", 10, 2]).dynkin_diagram()
374376
O=<=O---O---O---O=<=O
375377
0 1 2 3 4 5
376378
A10^2
377-
sage: CartanType(["D", 5, 2]).dynkin_diagram() # needs sage.graphs
379+
sage: CartanType(["D", 5, 2]).dynkin_diagram()
378380
O=<=O---O---O=>=O
379381
0 1 2 3 4
380382
D5^2
381-
sage: CartanType(["D", 4, 3]).dynkin_diagram() # needs sage.graphs
383+
sage: CartanType(["D", 4, 3]).dynkin_diagram()
382384
3
383385
O=>=O---O
384386
2 1 0
385387
D4^3
386-
sage: CartanType(["E", 6, 2]).dynkin_diagram() # needs sage.graphs
388+
sage: CartanType(["E", 6, 2]).dynkin_diagram()
387389
O---O---O=<=O---O
388390
0 1 2 3 4
389391
E6^2
@@ -1415,15 +1417,17 @@ def is_simply_laced(self):
14151417
[['C', 1], True], [['C', 5], False],
14161418
[['D', 2], True], [['D', 3], True], [['D', 5], True],
14171419
[['E', 6], True], [['E', 7], True], [['E', 8], True],
1418-
[['F', 4], False], [['G', 2], False], [['I', 5], False], [['H', 3], False], [['H', 4], False],
1420+
[['F', 4], False], [['G', 2], False], [['I', 5], False],
1421+
[['H', 3], False], [['H', 4], False],
14191422
[['A', 1, 1], False], [['A', 5, 1], True],
14201423
[['B', 1, 1], False], [['B', 5, 1], False],
14211424
[['C', 1, 1], False], [['C', 5, 1], False],
14221425
[['D', 3, 1], True], [['D', 5, 1], True],
14231426
[['E', 6, 1], True], [['E', 7, 1], True], [['E', 8, 1], True],
14241427
[['F', 4, 1], False], [['G', 2, 1], False],
14251428
[['BC', 1, 2], False], [['BC', 5, 2], False],
1426-
[['B', 5, 1]^*, False], [['C', 4, 1]^*, False], [['F', 4, 1]^*, False], [['G', 2, 1]^*, False],
1429+
[['B', 5, 1]^*, False], [['C', 4, 1]^*, False],
1430+
[['F', 4, 1]^*, False], [['G', 2, 1]^*, False],
14271431
[['BC', 1, 2]^*, False], [['BC', 5, 2]^*, False]]
14281432
"""
14291433
return False
@@ -1937,7 +1941,7 @@ def is_untwisted_affine(self):
19371941
19381942
sage: CartanType(['A', 3, 1]).is_untwisted_affine()
19391943
True
1940-
sage: CartanType(['A', 3, 1]).dual().is_untwisted_affine() # this one is self dual!
1944+
sage: CartanType(['A', 3, 1]).dual().is_untwisted_affine() # this one is self dual!
19411945
True
19421946
sage: CartanType(['B', 3, 1]).dual().is_untwisted_affine()
19431947
False
@@ -2313,8 +2317,8 @@ def translation_factors(self):
23132317
as unit vector on the `x`-axis, and the projection `\omega_2`
23142318
at level 0 of `\Lambda_2` as unit vector of the `y`-axis::
23152319
2316-
sage: omega1 = Lambda[1]-2*Lambda[0]
2317-
sage: omega2 = Lambda[2]-2*Lambda[0]
2320+
sage: omega1 = Lambda[1] - 2*Lambda[0]
2321+
sage: omega2 = Lambda[2] - 2*Lambda[0]
23182322
sage: omega1.level(), omega2.level() # needs sage.graphs
23192323
(0, 0)
23202324

0 commit comments

Comments
 (0)