@@ -103,11 +103,12 @@ def index_set(self):
103
103
104
104
EXAMPLES::
105
105
106
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
107
- sage: W.index_set() # optional - coxeter3
106
+ sage: # optional - coxeter3
107
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
108
+ sage: W.index_set()
108
109
(1, 2, 3)
109
- sage: C = CoxeterGroup(['A', 3,1], implementation='coxeter3') # optional - coxeter3
110
- sage: C.index_set() # optional - coxeter3
110
+ sage: C = CoxeterGroup(['A', 3,1], implementation='coxeter3')
111
+ sage: C.index_set()
111
112
(0, 1, 2, 3)
112
113
"""
113
114
return self .cartan_type ().index_set ()
@@ -157,7 +158,7 @@ def simple_reflections(self):
157
158
EXAMPLES::
158
159
159
160
sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
160
- sage: s = W.simple_reflections() # optional - coxeter3
161
+ sage: s = W.simple_reflections() # optional - coxeter3
161
162
sage: s[2]*s[1]*s[2] # optional - coxeter3
162
163
[1, 2, 1]
163
164
"""
@@ -247,11 +248,12 @@ def root_system(self):
247
248
248
249
EXAMPLES::
249
250
250
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
251
- sage: R = W.root_system(); R # optional - coxeter3
251
+ sage: # optional - coxeter3
252
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
253
+ sage: R = W.root_system(); R
252
254
Root system of type ['A', 3]
253
- sage: alpha = R.root_space().basis() # optional - coxeter3
254
- sage: alpha[2] + alpha[3] # optional - coxeter3
255
+ sage: alpha = R.root_space().basis()
256
+ sage: alpha[2] + alpha[3]
255
257
alpha[2] + alpha[3]
256
258
"""
257
259
return self .cartan_type ().root_system ()
@@ -303,13 +305,14 @@ def kazhdan_lusztig_polynomial(self, u, v, constant_term_one=True):
303
305
304
306
EXAMPLES::
305
307
306
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
307
- sage: W.kazhdan_lusztig_polynomial([], [1,2, 1]) # optional - coxeter3
308
+ sage: # optional - coxeter3
309
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
310
+ sage: W.kazhdan_lusztig_polynomial([], [1,2, 1])
308
311
1
309
- sage: W.kazhdan_lusztig_polynomial([1],[3,2]) # optional - coxeter3
312
+ sage: W.kazhdan_lusztig_polynomial([1],[3,2])
310
313
0
311
- sage: W = CoxeterGroup(['A',3],implementation='coxeter3') # optional - coxeter3
312
- sage: W.kazhdan_lusztig_polynomial([2],[2,1,3,2]) # optional - coxeter3
314
+ sage: W = CoxeterGroup(['A',3],implementation='coxeter3')
315
+ sage: W.kazhdan_lusztig_polynomial([2],[2,1,3,2])
313
316
q + 1
314
317
315
318
.. NOTE::
@@ -384,24 +387,26 @@ def parabolic_kazhdan_lusztig_polynomial(self, u, v, J, constant_term_one=True):
384
387
385
388
EXAMPLES::
386
389
387
- sage: W = CoxeterGroup(['A',3], implementation='coxeter3') # optional - coxeter3
388
- sage: W.parabolic_kazhdan_lusztig_polynomial([],[3,2],[1,3]) # optional - coxeter3
390
+ sage: # optional - coxeter3
391
+ sage: W = CoxeterGroup(['A',3], implementation='coxeter3')
392
+ sage: W.parabolic_kazhdan_lusztig_polynomial([],[3,2],[1,3])
389
393
0
390
- sage: W.parabolic_kazhdan_lusztig_polynomial([2],[2,1,3,2],[1,3]) # optional - coxeter3
394
+ sage: W.parabolic_kazhdan_lusztig_polynomial([2],[2,1,3,2],[1,3])
391
395
q
392
396
393
- sage: C = CoxeterGroup(['A',3,1], implementation='coxeter3') # optional - coxeter3
394
- sage: C.parabolic_kazhdan_lusztig_polynomial([],[1],[0]) # optional - coxeter3
397
+ sage: # optional - coxeter3
398
+ sage: C = CoxeterGroup(['A',3,1], implementation='coxeter3')
399
+ sage: C.parabolic_kazhdan_lusztig_polynomial([],[1],[0])
395
400
1
396
- sage: C.parabolic_kazhdan_lusztig_polynomial([],[1,2,1],[0]) # optional - coxeter3
401
+ sage: C.parabolic_kazhdan_lusztig_polynomial([],[1,2,1],[0])
397
402
1
398
- sage: C.parabolic_kazhdan_lusztig_polynomial([],[0,1,0,1,2,1],[0]) # optional - coxeter3
403
+ sage: C.parabolic_kazhdan_lusztig_polynomial([],[0,1,0,1,2,1],[0])
399
404
q
400
405
sage: w=[1, 2, 1, 3, 0, 2, 1, 0, 3, 0, 2]
401
406
sage: v=[1, 2, 1, 3, 0, 1, 2, 1, 0, 3, 0, 2, 1, 0, 3, 0, 2]
402
- sage: C.parabolic_kazhdan_lusztig_polynomial(w,v,[1,3]) # optional - coxeter3
407
+ sage: C.parabolic_kazhdan_lusztig_polynomial(w,v,[1,3])
403
408
q^2 + q
404
- sage: C.parabolic_kazhdan_lusztig_polynomial(w,v,[1,3],constant_term_one=False) # optional - coxeter3
409
+ sage: C.parabolic_kazhdan_lusztig_polynomial(w,v,[1,3],constant_term_one=False)
405
410
q^4 + q^2
406
411
407
412
TESTS::
@@ -437,13 +442,14 @@ def __init__(self, parent, x):
437
442
438
443
Check that :trac:`32266` is fixed::
439
444
440
- sage: A3 = CoxeterGroup('A3', implementation='coxeter3') # optional - coxeter3
441
- sage: s1,s2,s3 = A3.simple_reflections() # optional - coxeter3
442
- sage: s1*s3 # optional - coxeter3
445
+ sage: # optional - coxeter3
446
+ sage: A3 = CoxeterGroup('A3', implementation='coxeter3')
447
+ sage: s1,s2,s3 = A3.simple_reflections()
448
+ sage: s1*s3
443
449
[1, 3]
444
- sage: s3*s1 # optional - coxeter3
450
+ sage: s3*s1
445
451
[1, 3]
446
- sage: s3*s1 == s1*s3 # optional - coxeter3
452
+ sage: s3*s1 == s1*s3
447
453
True
448
454
"""
449
455
if not isinstance (x , CoxGroupElement ):
@@ -484,12 +490,13 @@ def _richcmp_(self, other, op):
484
490
485
491
EXAMPLES::
486
492
487
- sage: W = CoxeterGroup(['B', 3], implementation='coxeter3') # optional - coxeter3
488
- sage: w = W([1,2,3]) # optional - coxeter3
489
- sage: v = W([3,1,2]) # optional - coxeter3
490
- sage: v < w # optional - coxeter3
493
+ sage: # optional - coxeter3
494
+ sage: W = CoxeterGroup(['B', 3], implementation='coxeter3')
495
+ sage: w = W([1,2,3])
496
+ sage: v = W([3,1,2])
497
+ sage: v < w
491
498
False
492
- sage: w < v # optional - coxeter3
499
+ sage: w < v
493
500
True
494
501
495
502
Some tests for equality::
@@ -534,11 +541,12 @@ def __getitem__(self, i):
534
541
"""
535
542
EXAMPLES::
536
543
537
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
538
- sage: w0 = W([1,2,1]) # optional - coxeter3
539
- sage: w0[0] # optional - coxeter3
544
+ sage: # optional - coxeter3
545
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
546
+ sage: w0 = W([1,2,1])
547
+ sage: w0[0]
540
548
1
541
- sage: w0[1] # optional - coxeter3
549
+ sage: w0[1]
542
550
2
543
551
544
552
"""
@@ -549,13 +557,14 @@ def _mul_(self, y):
549
557
"""
550
558
EXAMPLES::
551
559
552
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
553
- sage: s = W.gens() # optional - coxeter3
554
- sage: s[1]._mul_(s[1]) # optional - coxeter3
560
+ sage: # optional - coxeter3
561
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
562
+ sage: s = W.gens()
563
+ sage: s[1]._mul_(s[1])
555
564
[]
556
- sage: s[1]*s[2]*s[1] # optional - coxeter3
565
+ sage: s[1]*s[2]*s[1]
557
566
[1, 2, 1]
558
- sage: s[2]*s[1]*s[2] # optional - coxeter3
567
+ sage: s[2]*s[1]*s[2]
559
568
[1, 2, 1]
560
569
"""
561
570
return self .__class__ (self .parent (), self .value * y .value )
@@ -564,11 +573,12 @@ def __len__(self):
564
573
"""
565
574
EXAMPLES::
566
575
567
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
568
- sage: w = W([1,2,1]) # optional - coxeter3
569
- sage: w.length() # optional - coxeter3
576
+ sage: # optional - coxeter3
577
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
578
+ sage: w = W([1,2,1])
579
+ sage: w.length()
570
580
3
571
- sage: len(w) # optional - coxeter3
581
+ sage: len(w)
572
582
3
573
583
"""
574
584
return len (self .value )
@@ -594,18 +604,18 @@ def poincare_polynomial(self):
594
604
595
605
EXAMPLES::
596
606
597
- sage: W = CoxeterGroup(['A', 2], implementation='coxeter3') # optional - coxeter3
598
- sage: W.long_element().poincare_polynomial() # optional - coxeter3
607
+ sage: # optional - coxeter3
608
+ sage: W = CoxeterGroup(['A', 2], implementation='coxeter3')
609
+ sage: W.long_element().poincare_polynomial()
599
610
t^3 + 2*t^2 + 2*t + 1
600
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
601
- sage: W([2,1,3,2]).poincare_polynomial() # optional - coxeter3
611
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
612
+ sage: W([2,1,3,2]).poincare_polynomial()
602
613
t^4 + 4*t^3 + 5*t^2 + 3*t + 1
603
- sage: W([1,2,3,2,1]).poincare_polynomial() # optional - coxeter3
614
+ sage: W([1,2,3,2,1]).poincare_polynomial()
604
615
t^5 + 4*t^4 + 6*t^3 + 5*t^2 + 3*t + 1
605
-
606
- sage: rw = sage.combinat.permutation.from_reduced_word # optional - coxeter3
607
- sage: p = [w.poincare_polynomial() for w in W] # optional - coxeter3
608
- sage: [rw(w.reduced_word()) for i,w in enumerate(W) if p[i] != p[i].reverse()] # optional - coxeter3
616
+ sage: rw = sage.combinat.permutation.from_reduced_word
617
+ sage: p = [w.poincare_polynomial() for w in W]
618
+ sage: [rw(w.reduced_word()) for i,w in enumerate(W) if p[i] != p[i].reverse()]
609
619
[[3, 4, 1, 2], [4, 2, 3, 1]]
610
620
"""
611
621
return self .value .poincare_polynomial ()
@@ -648,12 +658,13 @@ def action(self, v):
648
658
649
659
EXAMPLES::
650
660
651
- sage: W = CoxeterGroup(['B', 3], implementation='coxeter3') # optional - coxeter3
652
- sage: R = W.root_system().root_space() # optional - coxeter3
653
- sage: v = R.an_element(); v # optional - coxeter3
661
+ sage: # optional - coxeter3
662
+ sage: W = CoxeterGroup(['B', 3], implementation='coxeter3')
663
+ sage: R = W.root_system().root_space()
664
+ sage: v = R.an_element(); v
654
665
2*alpha[1] + 2*alpha[2] + 3*alpha[3]
655
- sage: w = W([1,2,3]) # optional - coxeter3
656
- sage: w.action(v) # optional - coxeter3
666
+ sage: w = W([1,2,3])
667
+ sage: w.action(v)
657
668
-alpha[1] + alpha[2] + alpha[3]
658
669
"""
659
670
#TODO: Find a better way to do this
@@ -675,14 +686,15 @@ def action_on_rational_function(self, f):
675
686
676
687
EXAMPLES::
677
688
678
- sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
679
- sage: S = PolynomialRing(QQ, 'x,y,z').fraction_field() # optional - coxeter3
680
- sage: x,y,z = S.gens() # optional - coxeter3
681
- sage: W([1]).action_on_rational_function(x+y+z) # optional - coxeter3
689
+ sage: # optional - coxeter3
690
+ sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
691
+ sage: S = PolynomialRing(QQ, 'x,y,z').fraction_field()
692
+ sage: x,y,z = S.gens()
693
+ sage: W([1]).action_on_rational_function(x+y+z)
682
694
(x^2*y + x*z + 1)/x
683
- sage: W([2]).action_on_rational_function(x+y+z) # optional - coxeter3
695
+ sage: W([2]).action_on_rational_function(x+y+z)
684
696
(x*y^2 + y^2*z + 1)/y
685
- sage: W([3]).action_on_rational_function(x+y+z) # optional - coxeter3
697
+ sage: W([3]).action_on_rational_function(x+y+z)
686
698
(y*z^2 + x*z + 1)/z
687
699
"""
688
700
Q = f .parent ()
0 commit comments