Skip to content

Commit f6e599a

Browse files
author
Matthias Koeppe
committed
sage.combinat.root_system: Use more block tags, restore lost comments
1 parent a75404d commit f6e599a

12 files changed

+317
-275
lines changed

src/sage/combinat/root_system/cartan_matrix.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def matrix_space(self, nrows=None, ncols=None, sparse=None):
363363
Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring
364364
sage: cm.matrix_space(2, 2)
365365
Full MatrixSpace of 2 by 2 sparse matrices over Integer Ring
366-
sage: cm[:2,1:]
366+
sage: cm[:2,1:] # indirect doctest
367367
[-1 0]
368368
[ 2 -1]
369369
"""
@@ -386,7 +386,7 @@ def _CM_init(self, cartan_type, index_set, cartan_type_check):
386386
387387
TESTS::
388388
389-
sage: C = CartanMatrix(['A',1,1]) # needs sage.graphs
389+
sage: C = CartanMatrix(['A',1,1]) # indirect doctest # needs sage.graphs
390390
sage: TestSuite(C).run(skip=["_test_category", "_test_change_ring"]) # needs sage.graphs
391391
"""
392392
self._index_set = index_set
@@ -672,18 +672,19 @@ def dual(self):
672672
673673
EXAMPLES::
674674
675+
sage: # needs sage.graphs
675676
sage: ct = CartanType(['C',3])
676-
sage: M = CartanMatrix(ct); M # needs sage.graphs
677+
sage: M = CartanMatrix(ct); M
677678
[ 2 -1 0]
678679
[-1 2 -2]
679680
[ 0 -1 2]
680-
sage: M.dual() # needs sage.graphs
681+
sage: M.dual()
681682
[ 2 -1 0]
682683
[-1 2 -1]
683684
[ 0 -2 2]
684-
sage: M.dual() == CartanMatrix(ct.dual()) # needs sage.graphs
685+
sage: M.dual() == CartanMatrix(ct.dual())
685686
True
686-
sage: M.dual().cartan_type() == ct.dual() # needs sage.graphs
687+
sage: M.dual().cartan_type() == ct.dual()
687688
True
688689
689690
An example with arbitrary Cartan matrices::
@@ -936,19 +937,20 @@ def coxeter_matrix(self):
936937
937938
EXAMPLES::
938939
939-
sage: cm = CartanMatrix([[2,-5,0],[-2,2,-1],[0,-1,2]]) # needs sage.graphs
940-
sage: cm.coxeter_matrix() # needs sage.graphs
940+
sage: # needs sage.graphs
941+
sage: cm = CartanMatrix([[2,-5,0],[-2,2,-1],[0,-1,2]])
942+
sage: cm.coxeter_matrix()
941943
[ 1 -1 2]
942944
[-1 1 3]
943945
[ 2 3 1]
944946
sage: ct = CartanType([['A',2,2], ['B',3]])
945-
sage: ct.coxeter_matrix() # needs sage.graphs
947+
sage: ct.coxeter_matrix()
946948
[ 1 -1 2 2 2]
947949
[-1 1 2 2 2]
948950
[ 2 2 1 3 2]
949951
[ 2 2 3 1 4]
950952
[ 2 2 2 4 1]
951-
sage: ct.cartan_matrix().coxeter_matrix() == ct.coxeter_matrix() # needs sage.graphs
953+
sage: ct.cartan_matrix().coxeter_matrix() == ct.coxeter_matrix()
952954
True
953955
"""
954956
scalarproducts_to_order = {0: 2, 1: 3, 2: 4, 3: 6}
@@ -973,15 +975,16 @@ def coxeter_diagram(self):
973975
974976
EXAMPLES::
975977
976-
sage: cm = CartanMatrix([[2,-5,0],[-2,2,-1],[0,-1,2]]) # needs sage.graphs
977-
sage: G = cm.coxeter_diagram(); G # needs sage.graphs
978+
sage: # needs sage.graphs
979+
sage: cm = CartanMatrix([[2,-5,0],[-2,2,-1],[0,-1,2]])
980+
sage: G = cm.coxeter_diagram(); G
978981
Graph on 3 vertices
979-
sage: G.edges(sort=True) # needs sage.graphs
982+
sage: G.edges(sort=True)
980983
[(0, 1, +Infinity), (1, 2, 3)]
981984
sage: ct = CartanType([['A',2,2], ['B',3]])
982-
sage: ct.coxeter_diagram() # needs sage.graphs
985+
sage: ct.coxeter_diagram()
983986
Graph on 5 vertices
984-
sage: ct.cartan_matrix().coxeter_diagram() == ct.coxeter_diagram() # needs sage.graphs
987+
sage: ct.cartan_matrix().coxeter_diagram() == ct.coxeter_diagram()
985988
True
986989
"""
987990
return self.coxeter_matrix().coxeter_graph()

src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py

Lines changed: 56 additions & 53 deletions
Large diffs are not rendered by default.

src/sage/combinat/root_system/plot.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,15 @@
503503
:meth:`~sage.combinat.root_system.root_lattice_realizations.RootLatticeRealizations.ParentMethods.plot_parse_options`,
504504
and pass it down to each piece. We use this to plot our two walks::
505505
506+
sage: # long time
506507
sage: plot_options = L.plot_parse_options(bounding_box=[[-2,5],[-2,6]])
507508
sage: w2 = [2,1,2,0,2,0,2,1,2,0,1,2,1,2,1,0,1,2,0,2,0,1,2,0,2]
508-
sage: p = L.plot_alcoves(plot_options=plot_options) # long time
509-
sage: p += L.plot_alcove_walk(w1, color="green", # long time
509+
sage: p = L.plot_alcoves(plot_options=plot_options)
510+
sage: p += L.plot_alcove_walk(w1, color="green",
510511
....: plot_options=plot_options)
511-
sage: p += L.plot_alcove_walk(w2, color="orange", # long time
512+
sage: p += L.plot_alcove_walk(w2, color="orange",
512513
....: plot_options=plot_options)
513-
sage: p # long time
514+
sage: p
514515
Graphics object consisting of ... graphics primitives
515516
516517
.. PLOT::
@@ -552,19 +553,20 @@
552553
Here we show a weight at level `0` and the reduced word implementing
553554
the translation by this weight::
554555
556+
sage: # long time
555557
sage: L = RootSystem(["A",2,1]).ambient_space()
556558
sage: P = RootSystem(["A",2,1]).weight_space(extended=True)
557559
sage: Lambda = P.fundamental_weights()
558560
sage: t = 6*Lambda[1] - 2*Lambda[2] - 4*Lambda[0]
559561
sage: walk = L.reduced_word_of_translation(L(t))
560562
sage: plot_options = L.plot_parse_options(bounding_box=[[-2,5],[-2,5]])
561-
sage: p = L.plot(plot_options=plot_options) # long time
562-
sage: p += L.plot_alcove_walk(walk, color="green", # long time
563+
sage: p = L.plot(plot_options=plot_options)
564+
sage: p += L.plot_alcove_walk(walk, color="green",
563565
....: plot_options=plot_options)
564-
sage: p += plot_options.family_of_vectors({t: L(t)}) # long time
565-
sage: plot_options.finalize(p) # long time
566+
sage: p += plot_options.family_of_vectors({t: L(t)})
567+
sage: plot_options.finalize(p)
566568
Graphics object consisting of ... graphics primitives
567-
sage: p # long time
569+
sage: p
568570
Graphics object consisting of ... graphics primitives
569571
570572
.. PLOT::

src/sage/combinat/root_system/root_lattice_realization_algebras.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def demazure_operators(self):
263263
264264
We check systematically that these operators satisfy the Iwahori-Hecke algebra relations::
265265
266-
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)
267267
....: L = RootSystem(cartan_type).weight_lattice()
268268
....: KL = L.algebra(QQ)
269269
....: T = KL.demazure_operators()
@@ -694,14 +694,14 @@ def demazure_lusztig_operators_on_classical(self, q, q1, q2, convention="antidom
694694
Note that there is no translation part, and in particular
695695
1 is an eigenvector for all `T_i`'s::
696696
697-
sage: T[0](KL0.one()) # needs sage.graphs
697+
sage: # needs sage.graphs
698+
sage: T[0](KL0.one())
698699
q1*B[(0, 0)]
699-
sage: T[1](KL0.one()) # needs sage.graphs
700+
sage: T[1](KL0.one())
700701
q1*B[(0, 0)]
701-
702-
sage: Y = T.Y() # needs sage.graphs
703-
sage: alphacheck = Y.keys().simple_roots() # needs sage.graphs
704-
sage: Y[alphacheck[0]](KL0.one()) # needs sage.graphs
702+
sage: Y = T.Y()
703+
sage: alphacheck = Y.keys().simple_roots()
704+
sage: Y[alphacheck[0]](KL0.one())
705705
((-q2)/(q*q1))*B[(0, 0)]
706706
707707
Matching with Ion Bogdan's hand calculations from 3/15/2013::
@@ -713,33 +713,33 @@ def demazure_lusztig_operators_on_classical(self, q, q1, q2, convention="antidom
713713
sage: KL0 = KL.classical()
714714
sage: L0 = KL0.basis().keys()
715715
sage: omega = L0.fundamental_weights()
716-
sage: T = KL.demazure_lusztig_operators_on_classical(q, u, -1/u, # needs sage.graphs
716+
717+
sage: # needs sage.graphs
718+
sage: T = KL.demazure_lusztig_operators_on_classical(q, u, -1/u,
717719
....: convention="dominant")
718-
sage: Y = T.Y() # needs sage.graphs
719-
sage: alphacheck = Y.keys().simple_roots() # needs sage.graphs
720-
sage: Ydelta = Y[Y.keys().null_root()] # needs sage.graphs
721-
sage: Ydelta.word, Ydelta.signs, Ydelta.scalar # needs sage.graphs
720+
sage: Y = T.Y()
721+
sage: alphacheck = Y.keys().simple_roots()
722+
sage: Ydelta = Y[Y.keys().null_root()]
723+
sage: Ydelta.word, Ydelta.signs, Ydelta.scalar
722724
((), (), 1/q)
723-
724-
sage: Y1 = Y[alphacheck[1]] # needs sage.graphs
725-
sage: Y1.word, Y1.signs, Y1.scalar # This is T_0 T_1 (T_1 acts first, then T_0); Ion gets T_1 T_0 # needs sage.graphs
725+
sage: Y1 = Y[alphacheck[1]]
726+
sage: Y1.word, Y1.signs, Y1.scalar # This is T_0 T_1 (T_1 acts first, then T_0); Ion gets T_1 T_0
726727
((1, 0), (1, 1), 1)
727-
728-
sage: Y0 = Y[alphacheck[0]] # needs sage.graphs
729-
sage: Y0.word, Y0.signs, Y0.scalar # This is 1/q T_1^-1 T_0^-1 # needs sage.graphs
728+
sage: Y0 = Y[alphacheck[0]]
729+
sage: Y0.word, Y0.signs, Y0.scalar # This is 1/q T_1^-1 T_0^-1
730730
((0, 1), (-1, -1), 1/q)
731731
732732
Note that the following computations use the "dominant" convention::
733733
734-
sage: T0 = T.Tw(0) # needs sage.graphs
735-
sage: T0(KL0.monomial(omega[1])) # needs sage.graphs
734+
sage: # needs sage.graphs
735+
sage: T0 = T.Tw(0)
736+
sage: T0(KL0.monomial(omega[1]))
736737
q*u*B[-Lambda[1]] + ((u^2-1)/u)*B[Lambda[1]]
737-
sage: T0(KL0.monomial(2*omega[1])) # needs sage.graphs
738+
sage: T0(KL0.monomial(2*omega[1]))
738739
((q*u^2-q)/u)*B[0] + q^2*u*B[-2*Lambda[1]] + ((u^2-1)/u)*B[2*Lambda[1]]
739-
740-
sage: T0(KL0.monomial(-omega[1])) # needs sage.graphs
740+
sage: T0(KL0.monomial(-omega[1]))
741741
1/(q*u)*B[Lambda[1]]
742-
sage: T0(KL0.monomial(-2*omega[1])) # needs sage.graphs
742+
sage: T0(KL0.monomial(-2*omega[1]))
743743
((-u^2+1)/(q*u))*B[0] + 1/(q^2*u)*B[2*Lambda[1]]
744744
745745
"""

0 commit comments

Comments
 (0)