@@ -33,7 +33,7 @@ class RootSystem(UniqueRepresentation, SageObject):
33
33
34
34
We construct the root system for type `B_3`::
35
35
36
- sage: R= RootSystem(['B',3]); R
36
+ sage: R = RootSystem(['B',3]); R
37
37
Root system of type ['B', 3]
38
38
39
39
``R`` models the root system abstractly. It comes equipped with various
@@ -156,7 +156,7 @@ class RootSystem(UniqueRepresentation, SageObject):
156
156
In finite type `A`, we recover the natural representation of the
157
157
symmetric group as group of permutation matrices::
158
158
159
- sage: RootSystem(["A",2]).ambient_space().weyl_group().simple_reflections()
159
+ sage: RootSystem(["A",2]).ambient_space().weyl_group().simple_reflections() # optional - sage.libs.pari
160
160
Finite family {1: [0 1 0]
161
161
[1 0 0]
162
162
[0 0 1],
@@ -167,7 +167,7 @@ class RootSystem(UniqueRepresentation, SageObject):
167
167
In type `B`, `C`, and `D`, we recover the natural representation
168
168
of the Weyl group as groups of signed permutation matrices::
169
169
170
- sage: RootSystem(["B",3]).ambient_space().weyl_group().simple_reflections()
170
+ sage: RootSystem(["B",3]).ambient_space().weyl_group().simple_reflections() # optional - sage.libs.pari
171
171
Finite family {1: [0 1 0]
172
172
[1 0 0]
173
173
[0 0 1],
@@ -187,29 +187,29 @@ class RootSystem(UniqueRepresentation, SageObject):
187
187
188
188
Define the "identity" by an appropriate vector at level `-3`::
189
189
190
- sage: e = L.basis(); Lambda = L.fundamental_weights()
191
- sage: id = e[0] + 2*e[1] + 3*e[2] - 3*Lambda[0]
190
+ sage: e = L.basis(); Lambda = L.fundamental_weights() # optional - sage.graphs
191
+ sage: id = e[0] + 2*e[1] + 3*e[2] - 3*Lambda[0] # optional - sage.graphs
192
192
193
193
The corresponding permutation is obtained by projecting it onto
194
194
the classical ambient space::
195
195
196
196
sage: L.classical()
197
197
Ambient space of the Root system of type ['A', 2]
198
- sage: L.classical()(id)
198
+ sage: L.classical()(id) # optional - sage.graphs
199
199
(1, 2, 3)
200
200
201
201
Here is the orbit of the identity under the action of the finite
202
202
group::
203
203
204
- sage: W = L.weyl_group()
205
- sage: S3 = [ w.action(id) for w in W.classical() ]
206
- sage: [L.classical()(x) for x in S3]
204
+ sage: W = L.weyl_group() # optional - sage.libs.pari
205
+ sage: S3 = [ w.action(id) for w in W.classical() ] # optional - sage.libs.pari
206
+ sage: [L.classical()(x) for x in S3] # optional - sage.libs.pari
207
207
[(1, 2, 3), (3, 1, 2), (2, 3, 1), (2, 1, 3), (1, 3, 2), (3, 2, 1)]
208
208
209
209
And the action of `s_0` on these yields::
210
210
211
- sage: s = W.simple_reflections()
212
- sage: [L.classical()(s[0].action(x)) for x in S3]
211
+ sage: s = W.simple_reflections() # optional - sage.libs.pari
212
+ sage: [L.classical()(s[0].action(x)) for x in S3] # optional - sage.libs.pari
213
213
[(0, 2, 4), (-1, 1, 6), (-2, 3, 5), (0, 1, 5), (-1, 3, 4), (-2, 2, 6)]
214
214
215
215
We can also plot various components of the ambient spaces::
@@ -263,11 +263,11 @@ class RootSystem(UniqueRepresentation, SageObject):
263
263
TESTS::
264
264
265
265
sage: R = RootSystem(['C',3])
266
- sage: TestSuite(R).run()
266
+ sage: TestSuite(R).run() # optional - sage.graphs
267
267
sage: L = R.ambient_space()
268
268
sage: s = L.simple_reflections() # this used to break the testsuite below due to caching an unpicklable method
269
269
sage: s = L.simple_projections() # todo: not implemented
270
- sage: TestSuite(L).run()
270
+ sage: TestSuite(L).run() # optional - sage.graphs
271
271
sage: L = R.root_space()
272
272
sage: s = L.simple_reflections()
273
273
sage: TestSuite(L).run()
@@ -342,7 +342,7 @@ def _test_root_lattice_realizations(self, **options):
342
342
343
343
EXAMPLES::
344
344
345
- sage: RootSystem(["A",3])._test_root_lattice_realizations()
345
+ sage: RootSystem(["A",3])._test_root_lattice_realizations() # optional - sage.graphs
346
346
347
347
.. SEEALSO:: :class:`TestSuite`.
348
348
"""
@@ -376,7 +376,7 @@ def _repr_(self):
376
376
377
377
def cartan_type (self ):
378
378
"""
379
- Returns the Cartan type of the root system.
379
+ Return the Cartan type of the root system.
380
380
381
381
EXAMPLES::
382
382
@@ -389,7 +389,7 @@ def cartan_type(self):
389
389
@cached_method
390
390
def dynkin_diagram (self ):
391
391
"""
392
- Returns the Dynkin diagram of the root system.
392
+ Return the Dynkin diagram of the root system.
393
393
394
394
EXAMPLES::
395
395
@@ -406,7 +406,7 @@ def cartan_matrix(self):
406
406
"""
407
407
EXAMPLES::
408
408
409
- sage: RootSystem(['A',3]).cartan_matrix()
409
+ sage: RootSystem(['A',3]).cartan_matrix() # optional - sage.graphs
410
410
[ 2 -1 0]
411
411
[-1 2 -1]
412
412
[ 0 -1 2]
@@ -426,7 +426,7 @@ def index_set(self):
426
426
@cached_method
427
427
def is_finite (self ):
428
428
"""
429
- Returns True if self is a finite root system.
429
+ Return `` True`` if `` self`` is a finite root system.
430
430
431
431
EXAMPLES::
432
432
@@ -440,7 +440,7 @@ def is_finite(self):
440
440
@cached_method
441
441
def is_irreducible (self ):
442
442
"""
443
- Returns True if self is an irreducible root system.
443
+ Return `` True`` if `` self`` is an irreducible root system.
444
444
445
445
EXAMPLES::
446
446
@@ -453,7 +453,7 @@ def is_irreducible(self):
453
453
454
454
def root_lattice (self ):
455
455
"""
456
- Returns the root lattice associated to self.
456
+ Return the root lattice associated to `` self`` .
457
457
458
458
EXAMPLES::
459
459
@@ -532,7 +532,7 @@ def coroot_space(self, base_ring=QQ):
532
532
@cached_method
533
533
def weight_lattice (self , extended = False ):
534
534
"""
535
- Returns the weight lattice associated to self.
535
+ Return the weight lattice associated to `` self`` .
536
536
537
537
.. SEEALSO::
538
538
@@ -545,15 +545,16 @@ def weight_lattice(self, extended=False):
545
545
sage: RootSystem(['A',3]).weight_lattice()
546
546
Weight lattice of the Root system of type ['A', 3]
547
547
548
- sage: RootSystem(['A',3,1]).weight_space(extended = True)
549
- Extended weight space over the Rational Field of the Root system of type ['A', 3, 1]
548
+ sage: RootSystem(['A',3,1]).weight_space(extended=True)
549
+ Extended weight space over the Rational Field
550
+ of the Root system of type ['A', 3, 1]
550
551
"""
551
552
return WeightSpace (self , ZZ , extended = extended )
552
553
553
554
@cached_method
554
555
def weight_space (self , base_ring = QQ , extended = False ):
555
556
"""
556
- Returns the weight space associated to self.
557
+ Returns the weight space associated to `` self`` .
557
558
558
559
.. SEEALSO::
559
560
@@ -566,14 +567,15 @@ def weight_space(self, base_ring=QQ, extended=False):
566
567
sage: RootSystem(['A',3]).weight_space()
567
568
Weight space over the Rational Field of the Root system of type ['A', 3]
568
569
569
- sage: RootSystem(['A',3,1]).weight_space(extended = True)
570
- Extended weight space over the Rational Field of the Root system of type ['A', 3, 1]
570
+ sage: RootSystem(['A',3,1]).weight_space(extended=True)
571
+ Extended weight space over the Rational Field
572
+ of the Root system of type ['A', 3, 1]
571
573
"""
572
574
return WeightSpace (self , base_ring , extended = extended )
573
575
574
576
def coweight_lattice (self , extended = False ):
575
577
"""
576
- Returns the coweight lattice associated to self.
578
+ Return the coweight lattice associated to `` self`` .
577
579
578
580
This is the weight lattice of the dual root system.
579
581
@@ -588,14 +590,14 @@ def coweight_lattice(self, extended=False):
588
590
sage: RootSystem(['A',3]).coweight_lattice()
589
591
Coweight lattice of the Root system of type ['A', 3]
590
592
591
- sage: RootSystem(['A',3,1]).coweight_lattice(extended = True)
593
+ sage: RootSystem(['A',3,1]).coweight_lattice(extended= True)
592
594
Extended coweight lattice of the Root system of type ['A', 3, 1]
593
595
"""
594
596
return self .dual .weight_lattice (extended = extended )
595
597
596
598
def coweight_space (self , base_ring = QQ , extended = False ):
597
599
"""
598
- Returns the coweight space associated to self.
600
+ Return the coweight space associated to `` self`` .
599
601
600
602
This is the weight space of the dual root system.
601
603
@@ -611,7 +613,8 @@ def coweight_space(self, base_ring=QQ, extended=False):
611
613
Coweight space over the Rational Field of the Root system of type ['A', 3]
612
614
613
615
sage: RootSystem(['A',3,1]).coweight_space(extended=True)
614
- Extended coweight space over the Rational Field of the Root system of type ['A', 3, 1]
616
+ Extended coweight space over the Rational Field
617
+ of the Root system of type ['A', 3, 1]
615
618
"""
616
619
return self .dual .weight_space (base_ring , extended = extended )
617
620
@@ -719,7 +722,7 @@ def ambient_space(self, base_ring=QQ):
719
722
An alternative base ring can be provided as an option::
720
723
721
724
sage: e = RootSystem(['B',3]).ambient_space(RR)
722
- sage: TestSuite(e).run()
725
+ sage: TestSuite(e).run() # optional - sage.graphs
723
726
724
727
It should contain the smallest ring over which the ambient
725
728
space can be defined (`\ZZ` in type `A` or `\QQ` otherwise).
@@ -732,7 +735,7 @@ def ambient_space(self, base_ring=QQ):
732
735
you are welcome to experiment::
733
736
734
737
sage: e = RootSystem(['G',2]).ambient_space(RR)
735
- sage: TestSuite(e).run()
738
+ sage: TestSuite(e).run() # optional - sage.graphs
736
739
Failure in _test_root_lattice_realization:
737
740
Traceback (most recent call last):
738
741
...
@@ -786,9 +789,9 @@ def WeylDim(ct, coeffs):
786
789
INPUT:
787
790
788
791
789
- - ``type `` - a Cartan type
792
+ - ``ct `` - - a Cartan type
790
793
791
- - ``coeffs`` - a list of nonnegative integers
794
+ - ``coeffs`` -- a list of nonnegative integers
792
795
793
796
794
797
The length of the list must equal the rank type[1]. A dominant
@@ -801,17 +804,20 @@ def WeylDim(ct, coeffs):
801
804
802
805
For `SO(7)`, the Cartan type is `B_3`, so::
803
806
804
- sage: WeylDim(['B',3],[1,0,0]) # standard representation of SO(7)
807
+ sage: WeylDim(['B',3],[1,0,0]) # standard representation of SO(7)
805
808
7
806
- sage: WeylDim(['B',3],[0,1,0]) # exterior square
809
+ sage: WeylDim(['B',3],[0,1,0]) # exterior square
807
810
21
808
- sage: WeylDim(['B',3],[0,0,1]) # spin representation of spin(7)
811
+ sage: WeylDim(['B',3],[0,0,1]) # spin representation of spin(7)
809
812
8
810
- sage: WeylDim(['B',3],[1,0,1]) # sum of the first and third fundamental weights
813
+ sage: WeylDim(['B',3],[1,0,1]) # sum of the first and third fundamental weights
811
814
48
812
815
sage: [WeylDim(['F',4],x) for x in ([1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1])]
813
816
[52, 1274, 273, 26]
814
- sage: [WeylDim(['E', 6], x) for x in ([0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0])]
817
+ sage: [WeylDim(['E', 6], x)
818
+ ....: for x in ([0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1],
819
+ ....: [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0],
820
+ ....: [1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0])]
815
821
[1, 78, 27, 351, 351, 351, 27, 650, 351]
816
822
"""
817
823
ct = CartanType (ct )
0 commit comments