Skip to content

Commit 2463947

Browse files
author
Matthias Koeppe
committed
src/sage/combinat/root_system/root_lattice_realization_algebras.py: Add # optional
1 parent 46a25d7 commit 2463947

File tree

1 file changed

+62
-37
lines changed

1 file changed

+62
-37
lines changed

src/sage/combinat/root_system/root_lattice_realization_algebras.py

Lines changed: 62 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,12 @@ def demazure_operators(self):
258258
Let us check this systematically on Schur functions of degree 6::
259259
260260
sage: for p in Partitions(6, max_length=3).list(): # optional - sage.combinat
261-
....: assert s.monomial(p).expand(3, P.variable_names()) == pi0(KL.monomial(L(tuple(p)))).expand(P.gens())
261+
....: assert (s.monomial(p).expand(3, P.variable_names())
262+
....: == pi0(KL.monomial(L(tuple(p)))).expand(P.gens()))
262263
263264
We check systematically that these operators satisfy the Iwahori-Hecke algebra relations::
264265
265-
sage: for cartan_type in CartanType.samples(crystallographic=True): # long time 12s
266+
sage: for cartan_type in CartanType.samples(crystallographic=True): # long time 12s
266267
....: L = RootSystem(cartan_type).weight_lattice()
267268
....: KL = L.algebra(QQ)
268269
....: T = KL.demazure_operators()
@@ -326,8 +327,8 @@ def demazure_lusztig_operator_on_basis(self, weight, i, q1, q2, convention="anti
326327
327328
- ``weight`` -- an element `\lambda` of the weight lattice
328329
- ``i`` -- an element of the index set
329-
- ``q1,q2`` -- two elements of the ground ring
330-
- ``convention`` -- "antidominant", "bar", or "dominant" (default: "antidominant")
330+
- ``q1``, ``q2`` -- two elements of the ground ring
331+
- ``convention`` -- ``"antidominant"``, ``"bar"``, or ``"dominant"`` (default: ``"antidominant"``)
331332
332333
See :meth:`demazure_lusztig_operators` for the details.
333334
@@ -442,7 +443,8 @@ def demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
442443
sage: KL = L.algebra(K)
443444
sage: T = KL.demazure_lusztig_operators(q1, q2)
444445
sage: Tbar = KL.demazure_lusztig_operators(q1, q2, convention="bar")
445-
sage: Tdominant = KL.demazure_lusztig_operators(q1, q2, convention="dominant")
446+
sage: Tdominant = KL.demazure_lusztig_operators(q1, q2,
447+
....: convention="dominant")
446448
sage: x = KL.monomial(L((3,0)))
447449
sage: T[1](x)
448450
(q1+q2)*B[(1, 2)] + (q1+q2)*B[(2, 1)] + (q1+q2)*B[(3, 0)] + q1*B[(0, 3)]
@@ -464,13 +466,16 @@ def demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
464466
sage: KL = L.algebra(K)
465467
sage: T = KL.demazure_lusztig_operators(q1, q2)
466468
sage: Tbar = KL.demazure_lusztig_operators(q1, q2, convention="bar")
467-
sage: Tdominant = KL.demazure_lusztig_operators(q1, q2, convention="dominant")
469+
sage: Tdominant = KL.demazure_lusztig_operators(q1, q2,
470+
....: convention="dominant")
468471
sage: e = L.basis()
469472
sage: x = KL.monomial(3*e[0])
470473
sage: T[1](x)
471-
(q1+q2)*B[e[0] + 2*e[1]] + (q1+q2)*B[2*e[0] + e[1]] + (q1+q2)*B[3*e[0]] + q1*B[3*e[1]]
474+
(q1+q2)*B[e[0] + 2*e[1]] + (q1+q2)*B[2*e[0] + e[1]]
475+
+ (q1+q2)*B[3*e[0]] + q1*B[3*e[1]]
472476
sage: Tbar[1](x)
473-
(-q1-q2)*B[e[0] + 2*e[1]] + (-q1-q2)*B[2*e[0] + e[1]] + (-q1-2*q2)*B[3*e[1]]
477+
(-q1-q2)*B[e[0] + 2*e[1]] + (-q1-q2)*B[2*e[0] + e[1]]
478+
+ (-q1-2*q2)*B[3*e[1]]
474479
sage: Tbar[1](x) + T[1](x)
475480
(q1+q2)*B[3*e[0]] + (-2*q2)*B[3*e[1]]
476481
sage: Tdominant[1](x)
@@ -503,8 +508,9 @@ def demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
503508
504509
And the `\bar{T}` are basically the inverses of the `T` s::
505510
506-
sage: Tinv = KL.demazure_lusztig_operators(2/q1+1/q2,-1/q1,convention="bar")
507-
sage: [Tinv[1](T[1](x))-x for x in KL.some_elements()]
511+
sage: Tinv = KL.demazure_lusztig_operators(2/q1 + 1/q2, -1/q1,
512+
....: convention="bar")
513+
sage: [Tinv[1](T[1](x)) - x for x in KL.some_elements()] # optional - sage.graphs
508514
[0, 0, 0, 0, 0, 0, 0]
509515
510516
We check that `\Lambda_1-\Lambda_0` is an eigenvector for
@@ -519,7 +525,7 @@ def demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
519525
sage: KL = L.algebra(K)
520526
sage: T = KL.demazure_lusztig_operators(q1, q2, convention="dominant")
521527
sage: Y = T.Y()
522-
sage: alphacheck = Y.keys().alpha() # alpha of coroot lattice is alphacheck
528+
sage: alphacheck = Y.keys().alpha() # alpha of coroot lattice is alphacheck
523529
sage: alphacheck
524530
Finite family {0: alphacheck[0], 1: alphacheck[1], 2: alphacheck[2]}
525531
sage: x = KL.monomial(Lambda[1] - Lambda[0]); x # optional - sage.graphs
@@ -537,7 +543,7 @@ def demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
537543
sage: KL.q_project(Y[alphacheck[1]](x),q) # optional - sage.graphs
538544
((-q2^2)/(-q*q1^2))*B[(1, 0, 0)]
539545
540-
sage: KL.q_project(x, q)
546+
sage: KL.q_project(x, q) # optional - sage.graphs
541547
B[(1, 0, 0)]
542548
sage: KL.q_project(Y[alphacheck[0]](x),q) # optional - sage.graphs
543549
((-q*q1)/q2)*B[(1, 0, 0)]
@@ -591,7 +597,7 @@ def demazure_lusztig_operator_on_classical_on_basis(self, weight, i, q, q1, q2,
591597
- ``weight`` -- a classical weight `\lambda`
592598
- ``i`` -- an element of the index set
593599
- ``q1,q2`` -- two elements of the ground ring
594-
- ``convention`` -- "antidominant", "bar", or "dominant" (default: "antidominant")
600+
- ``convention`` -- ``"antidominant"``, ``"bar"``, or ``"dominant"`` (default: ``"antidominant"``)
595601
596602
See :meth:`demazure_lusztig_operators` for the details.
597603
@@ -613,21 +619,25 @@ def demazure_lusztig_operator_on_classical_on_basis(self, weight, i, q, q1, q2,
613619
These operators coincide with the usual Demazure-Lusztig
614620
operators::
615621
616-
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((2,2)), 1, q, q1, q2) # optional - sage.graphs
622+
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((2,2)), # optional - sage.graphs
623+
....: 1, q, q1, q2)
617624
q1*B[(2, 2)]
618625
sage: KL0.demazure_lusztig_operator_on_basis(L0((2,2)), 1, q1, q2)
619626
q1*B[(2, 2)]
620627
621-
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((3,0)), 1, q, q1, q2) # optional - sage.graphs
628+
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((3,0)), # optional - sage.graphs
629+
....: 1, q, q1, q2)
622630
(q1+q2)*B[(1, 2)] + (q1+q2)*B[(2, 1)] + (q1+q2)*B[(3, 0)] + q1*B[(0, 3)]
623631
sage: KL0.demazure_lusztig_operator_on_basis(L0((3,0)), 1, q1, q2)
624632
(q1+q2)*B[(1, 2)] + (q1+q2)*B[(2, 1)] + (q1+q2)*B[(3, 0)] + q1*B[(0, 3)]
625633
626634
except that we now have an action of `T_0`, which introduces some `q` s::
627635
628-
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((2,2)), 0, q, q1, q2) # optional - sage.graphs
636+
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((2,2)), # optional - sage.graphs
637+
....: 0, q, q1, q2)
629638
q1*B[(2, 2)]
630-
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((3,0)), 0, q, q1, q2) # optional - sage.graphs
639+
sage: KL.demazure_lusztig_operator_on_classical_on_basis(L0((3,0)), # optional - sage.graphs
640+
....: 0, q, q1, q2)
631641
(-q^2*q1-q^2*q2)*B[(1, 2)] + (-q*q1-q*q2)*B[(2, 1)] + (-q^3*q2)*B[(0, 3)]
632642
"""
633643
L = self.basis().keys()
@@ -641,7 +651,7 @@ def demazure_lusztig_operators_on_classical(self, q, q1, q2, convention="antidom
641651
INPUT:
642652
643653
- ``q,q1,q2`` -- three elements of the ground ring
644-
- ``convention`` -- "antidominant", "bar", or "dominant" (default: "antidominant")
654+
- ``convention`` -- ``"antidominant"``, ``"bar"``, or ``"dominant"`` (default: ``"antidominant"``)
645655
646656
Let `KL` be the group algebra of an affine weight lattice
647657
realization `L`. The Demazure-Lusztig operators for `KL`
@@ -783,7 +793,7 @@ def T0_check_on_basis(self, q1, q2, convention="antidominant"):
783793
784794
The following results have not been checked::
785795
786-
sage: for x in some_weights:
796+
sage: for x in some_weights: # optional - sage.graphs
787797
....: print("{} : {}".format(x, f(x)))
788798
(1, 0, 0, 0) : q1*B[(1, 0, 0, 0)]
789799
(1, 1, 0, 0) : q1*B[(1, 1, 0, 0)]
@@ -890,7 +900,8 @@ def q_project_on_basis(self, l, q):
890900
sage: KL = RootSystem(["A",2,1]).ambient_space().algebra(K)
891901
sage: L = KL.basis().keys()
892902
sage: e = L.basis()
893-
sage: KL.q_project_on_basis( 4*e[1] + 3*e[2] + e['deltacheck'] - 2*e['delta'], q)
903+
sage: KL.q_project_on_basis(4*e[1] + 3*e[2]
904+
....: + e['deltacheck'] - 2*e['delta'], q)
894905
1/q^2*B[(0, 4, 3)]
895906
"""
896907
KL0 = self.classical()
@@ -917,16 +928,22 @@ def q_project(self, x, q):
917928
sage: KL = RootSystem(["A",2,1]).ambient_space().algebra(K)
918929
sage: L = KL.basis().keys()
919930
sage: e = L.basis()
920-
sage: x = KL.an_element() + KL.monomial(4*e[1] + 3*e[2] + e['deltacheck'] - 2*e['delta']); x
921-
B[2*e[0] + 2*e[1] + 3*e[2]] + B[4*e[1] + 3*e[2] - 2*e['delta'] + e['deltacheck']]
931+
sage: x = (KL.an_element()
932+
....: + KL.monomial(4*e[1] + 3*e[2]
933+
....: + e['deltacheck'] - 2*e['delta'])); x
934+
B[2*e[0] + 2*e[1] + 3*e[2]]
935+
+ B[4*e[1] + 3*e[2] - 2*e['delta'] + e['deltacheck']]
922936
sage: KL.q_project(x, q)
923937
B[(2, 2, 3)] + 1/q^2*B[(0, 4, 3)]
924938
925939
sage: KL = RootSystem(["BC",3,2]).ambient_space().algebra(K)
926940
sage: L = KL.basis().keys()
927941
sage: e = L.basis()
928-
sage: x = KL.an_element() + KL.monomial(4*e[1] + 3*e[2] + e['deltacheck'] - 2*e['delta']); x
929-
B[2*e[0] + 2*e[1] + 3*e[2]] + B[4*e[1] + 3*e[2] - 2*e['delta'] + e['deltacheck']]
942+
sage: x = (KL.an_element()
943+
....: + KL.monomial(4*e[1] + 3*e[2]
944+
....: + e['deltacheck'] - 2*e['delta'])); x
945+
B[2*e[0] + 2*e[1] + 3*e[2]]
946+
+ B[4*e[1] + 3*e[2] - 2*e['delta'] + e['deltacheck']]
930947
sage: KL.q_project(x, q)
931948
B[(2, 2, 3)] + 1/q^2*B[(0, 4, 3)]
932949
@@ -954,7 +971,7 @@ def twisted_demazure_lusztig_operator_on_basis(self, weight, i, q1, q2, conventi
954971
- ``weight`` -- an element `\lambda` of the weight lattice
955972
- ``i`` -- an element of the index set
956973
- ``q1,q2`` -- two elements of the ground ring
957-
- ``convention`` -- "antidominant", "bar", or "dominant" (default: "antidominant")
974+
- ``convention`` -- ``"antidominant"``, ``"bar"``, or ``"dominant"`` (default: ``"antidominant"``)
958975
959976
.. SEEALSO:: :meth:`twisted_demazure_lusztig_operators`
960977
@@ -966,16 +983,23 @@ def twisted_demazure_lusztig_operator_on_basis(self, weight, i, q1, q2, conventi
966983
sage: q1, q2 = K.gens()
967984
sage: KL = L.algebra(K)
968985
sage: Lambda = L.classical().fundamental_weights()
969-
sage: KL.twisted_demazure_lusztig_operator_on_basis(Lambda[1]+2*Lambda[2], 1, q1, q2, convention="dominant")
986+
sage: KL.twisted_demazure_lusztig_operator_on_basis(
987+
....: Lambda[1] + 2*Lambda[2], 1, q1, q2, convention="dominant")
970988
(-q2)*B[(2, 3, 0, 0)]
971-
sage: KL.twisted_demazure_lusztig_operator_on_basis(Lambda[1]+2*Lambda[2], 2, q1, q2, convention="dominant")
989+
sage: KL.twisted_demazure_lusztig_operator_on_basis(
990+
....: Lambda[1] + 2*Lambda[2], 2, q1, q2, convention="dominant")
972991
(-q1-q2)*B[(3, 1, 1, 0)] + (-q2)*B[(3, 0, 2, 0)]
973-
sage: KL.twisted_demazure_lusztig_operator_on_basis(Lambda[1]+2*Lambda[2], 3, q1, q2, convention="dominant")
992+
sage: KL.twisted_demazure_lusztig_operator_on_basis(
993+
....: Lambda[1] + 2*Lambda[2], 3, q1, q2, convention="dominant")
974994
q1*B[(3, 2, 0, 0)]
975-
sage: KL.twisted_demazure_lusztig_operator_on_basis(Lambda[1]+2*Lambda[2], 0, q1, q2, convention="dominant") # optional - sage.graphs
976-
((q1*q2+q2^2)/q1)*B[(1, 2, 1, 1)] + ((q1*q2+q2^2)/q1)*B[(1, 2, 2, 0)] + q2^2/q1*B[(1, 2, 0, 2)]
977-
+ ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 1, 1, 1)] + ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 1, 2, 0)]
978-
+ ((q1*q2+q2^2)/q1)*B[(2, 1, 0, 2)] + ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 2, 1, 0)] + ((q1*q2+q2^2)/q1)*B[(2, 2, 0, 1)]
995+
sage: KL.twisted_demazure_lusztig_operator_on_basis( # optional - sage.graphs
996+
....: Lambda[1]+2*Lambda[2], 0, q1, q2, convention="dominant")
997+
((q1*q2+q2^2)/q1)*B[(1, 2, 1, 1)] + ((q1*q2+q2^2)/q1)*B[(1, 2, 2, 0)]
998+
+ q2^2/q1*B[(1, 2, 0, 2)] + ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 1, 1, 1)]
999+
+ ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 1, 2, 0)]
1000+
+ ((q1*q2+q2^2)/q1)*B[(2, 1, 0, 2)]
1001+
+ ((q1^2+2*q1*q2+q2^2)/q1)*B[(2, 2, 1, 0)]
1002+
+ ((q1*q2+q2^2)/q1)*B[(2, 2, 0, 1)]
9791003
"""
9801004
if i == 0: # should use the special node
9811005
if convention != "dominant":
@@ -992,12 +1016,12 @@ def twisted_demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
9921016
INPUT:
9931017
9941018
- ``q1,q2`` -- two elements of the ground ring
995-
- ``convention`` -- "antidominant", "bar", or "dominant" (default: "antidominant")
1019+
- ``convention`` -- ``"antidominant"``, ``"bar"``, or ``"dominant"`` (default: ``"antidominant"``)
9961020
9971021
.. WARNING::
9981022
9991023
- the code is currently only tested for `q_1q_2=-1`
1000-
- only the "dominant" convention is functional for `i=0`
1024+
- only the ``"dominant"`` convention is functional for `i=0`
10011025
10021026
For `T_1,\ldots,T_n`, these operators are the usual
10031027
Demazure-Lusztig operators. On the other hand, the
@@ -1088,7 +1112,7 @@ def twisted_demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
10881112
sage: cartan_type = CartanType(["BC",1,2])
10891113
sage: KL = RootSystem(cartan_type).weight_lattice().algebra(K)
10901114
sage: T = KL.twisted_demazure_lusztig_operators(q1,q2, convention="dominant")
1091-
sage: T._test_relations()
1115+
sage: T._test_relations() # optional - sage.graphs
10921116
Traceback (most recent call last):
10931117
... tester.assertTrue(Ti(Ti(x,i,-q2),i,-q1).is_zero()) ...
10941118
AssertionError: False is not true
@@ -1105,12 +1129,13 @@ def twisted_demazure_lusztig_operators(self, q1, q2, convention="antidominant"):
11051129
sage: L0 = L.classical()
11061130
sage: T = KL.demazure_lusztig_operators(q1,q2, convention="dominant")
11071131
sage: def T0(*l0): return KL.q_project(T[0].on_basis()(L.embed_at_level(L0(l0), 1)), q)
1108-
sage: T0_check_on_basis = KL.T0_check_on_basis(q1, q2, convention="dominant") # optional - sage.graphs
1132+
sage: T0_check_on_basis = KL.T0_check_on_basis(q1, q2, # optional - sage.graphs
1133+
....: convention="dominant")
11091134
sage: def T0c(*l0): return T0_check_on_basis(L0(l0))
11101135
11111136
sage: T0(0,0,1) # not double checked # optional - sage.graphs
11121137
((-t+1)/q)*B[(1, 0, 0)] + 1/q^2*B[(2, 0, -1)]
1113-
sage: T0c(0,0,1)
1138+
sage: T0c(0,0,1) # optional - sage.graphs
11141139
(t^2-t)*B[(1, 0, 0)] + (t^2-t)*B[(1, 1, -1)] + t^2*B[(2, 0, -1)] + (t-1)*B[(0, 0, 1)]
11151140
"""
11161141
T_on_basis = functools.partial(self.twisted_demazure_lusztig_operator_on_basis,

0 commit comments

Comments
 (0)