Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/combinat/crystals/letters.pyx
8817 views
1
r"""
2
Crystals of letters
3
"""
4
5
#*****************************************************************************
6
# Copyright (C) 2007 Anne Schilling <anne at math.ucdavis.edu>
7
# Nicolas M. Thiery <nthiery at users.sf.net>
8
# Daniel Bump <bump at match.stanford.edu>
9
# Brant Jones <brant at math.ucdavis.edu>
10
#
11
# Distributed under the terms of the GNU General Public License (GPL)
12
#
13
# This code is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
# General Public License for more details.
17
#
18
# The full text of the GPL is available at:
19
#
20
# http://www.gnu.org/licenses/
21
#****************************************************************************
22
23
include "../../ext/python.pxi"
24
25
from sage.misc.cachefunc import cached_method
26
from sage.misc.lazy_attribute import lazy_attribute
27
from sage.structure.unique_representation import UniqueRepresentation
28
from sage.structure.parent import Parent
29
from sage.structure.element cimport Element
30
from sage.categories.enumerated_sets import EnumeratedSets
31
from sage.categories.classical_crystals import ClassicalCrystals
32
from sage.combinat.root_system.cartan_type import CartanType
33
34
def CrystalOfLetters(cartan_type, element_print_style=None, dual=None):
35
r"""
36
Return the crystal of letters of the given type.
37
38
For classical types, this is a combinatorial model for the crystal
39
with highest weight `\Lambda_1` (the first fundamental weight).
40
41
Any irreducible classical crystal appears as the irreducible
42
component of the tensor product of several copies of this crystal
43
(plus possibly one copy of the spin crystal, see :class:`CrystalOfSpins`).
44
See [KN94]_. Elements of this irreducible component have a fixed shape,
45
and can be fit inside a tableau shape. Otherwise said, any irreducible
46
classical crystal is isomorphic to a crystal of tableaux with cells
47
filled by elements of the crystal of letters (possibly tensored with
48
the crystal of spins).
49
50
INPUT:
51
52
- ``T`` -- A Cartan type
53
54
REFERENCES:
55
56
.. [KN94] M. Kashiwara and T. Nakashima.
57
Crystal graphs for representations of the `q`-analogue of classical Lie
58
algebras.
59
J. Algebra **165**, no. 2, pp. 295--345, 1994.
60
61
EXAMPLES::
62
63
sage: C = CrystalOfLetters(['A',5])
64
sage: C.list()
65
[1, 2, 3, 4, 5, 6]
66
sage: C.cartan_type()
67
['A', 5]
68
69
For type `E_6`, one can also specify how elements are printed.
70
This option is usually set to None and the default representation is used.
71
If one chooses the option 'compact', the elements are printed in the more
72
compact convention with 27 letters ``+abcdefghijklmnopqrstuvwxyz`` and
73
the 27 letters ``-ABCDEFGHIJKLMNOPQRSTUVWXYZ`` for the dual crystal.
74
75
EXAMPLES::
76
77
sage: C = CrystalOfLetters(['E',6], element_print_style = 'compact')
78
sage: C
79
The crystal of letters for type ['E', 6]
80
sage: C.list()
81
[+, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]
82
sage: C = CrystalOfLetters(['E',6], element_print_style = 'compact', dual = True)
83
sage: C
84
The crystal of letters for type ['E', 6] (dual)
85
sage: C.list()
86
[-, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z]
87
"""
88
ct = CartanType(cartan_type)
89
if ct.letter == 'A':
90
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_A_element)
91
elif ct.letter == 'B':
92
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_B_element)
93
elif ct.letter == 'C':
94
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_C_element)
95
elif ct.letter == 'D':
96
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_D_element)
97
elif ct.letter == 'E' and ct.rank() == 6:
98
if dual is None:
99
return ClassicalCrystalOfLetters(ct,
100
Crystal_of_letters_type_E6_element,
101
element_print_style)
102
else:
103
return ClassicalCrystalOfLetters(ct,
104
Crystal_of_letters_type_E6_element_dual,
105
element_print_style, dual = True)
106
elif ct.letter == 'E' and ct.rank() == 7:
107
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_E7_element)
108
elif ct.letter == 'G':
109
return ClassicalCrystalOfLetters(ct, Crystal_of_letters_type_G_element)
110
else:
111
raise NotImplementedError
112
113
class ClassicalCrystalOfLetters(UniqueRepresentation, Parent):
114
r"""
115
A generic class for classical crystals of letters.
116
117
All classical crystals of letters should be instances of this class
118
or of subclasses. To define a new crystal of letters, one only
119
needs to implement a class for the elements (which subclasses
120
:class:`~sage.combinat.crystals.Letter`), with appropriate
121
`e_i` and `f_i` operations. If the module generator is not `1`, one also
122
needs to define the subclass :class:`ClassicalCrystalOfLetters` for the
123
crystal itself.
124
125
The basic assumption is that crystals of letters are small, but
126
used intensively as building blocks. Therefore, we explicitly build
127
in memory the list of all elements, the crystal graph and its
128
transitive closure, so as to make the following operations constant
129
time: ``list``, ``cmp``, (todo: ``phi``, ``epsilon``, ``e``, and
130
``f`` with caching)
131
"""
132
def __init__(self, cartan_type, element_class, element_print_style = None, dual = None):
133
"""
134
EXAMPLES::
135
136
sage: C = CrystalOfLetters(['A',5])
137
sage: C.category()
138
Category of classical crystals
139
sage: TestSuite(C).run()
140
"""
141
self.Element = element_class
142
Parent.__init__(self, category = ClassicalCrystals())
143
self._cartan_type = CartanType(cartan_type)
144
self.rename("The crystal of letters for type %s"%self._cartan_type)
145
if cartan_type.type() == 'E':
146
if cartan_type.rank() == 6:
147
if dual:
148
self.module_generators = (self._element_constructor_((6,)),)
149
self._ambient = CrystalOfLetters(CartanType(['E',6]))
150
self.rename("%s (dual)"%self)
151
else:
152
self.module_generators = (self._element_constructor_((1,)),)
153
elif cartan_type.rank() == 7:
154
self.module_generators = (self._element_constructor_((7,)),)
155
self._list = [x for x in super(ClassicalCrystalOfLetters, self).__iter__()]
156
else:
157
self.module_generators = (self._element_constructor_(1),)
158
if cartan_type.type() == 'G':
159
self._list = [self._element_constructor_(1),
160
self._element_constructor_(2),
161
self._element_constructor_(3),
162
self._element_constructor_(0),
163
self._element_constructor_(-3),
164
self._element_constructor_(-2),
165
self._element_constructor_(-1)]
166
else:
167
self._list = [self._element_constructor_(i)
168
for i in xrange(1, cartan_type.rank()+1)]
169
if cartan_type.type() == 'B':
170
self._list.append(self._element_constructor_(0))
171
if cartan_type.type() != 'A':
172
self._list += [self._element_constructor_(-i)
173
for i in xrange(cartan_type.rank(), 0, -1)]
174
else:
175
self._list.append(self._element_constructor_(cartan_type.rank()+1))
176
self._element_print_style = element_print_style
177
178
def __call__(self, value):
179
"""
180
Parse input to valid values to give to ``_element_constructor_()``.
181
182
EXAMPLES::
183
184
sage: C = CrystalOfLetters(['E',6])
185
sage: c = C((1,))
186
sage: C([1]) == c
187
True
188
"""
189
if value.__class__ == self.element_class and value.parent() is self:
190
return value
191
if isinstance(value, list):
192
return self._element_constructor_(tuple(value))
193
return self._element_constructor_(value)
194
195
@cached_method
196
def _element_constructor_(self, value):
197
"""
198
Convert ``value`` into an element of ``self``.
199
200
EXAMPLES::
201
202
sage: C = CrystalOfLetters(['A',5])
203
sage: c = C(1); c
204
1
205
sage: c.parent()
206
The crystal of letters for type ['A', 5]
207
sage: c is C(c)
208
True
209
"""
210
if value == 'E':
211
return EmptyLetter(self)
212
else: # Should do sanity checks!
213
return self.element_class(self, value)
214
215
def __iter__(self):
216
"""
217
Iterate through ``self``.
218
219
EXAMPLES::
220
221
sage: C = CrystalOfLetters(['A',5])
222
sage: [x for x in C]
223
[1, 2, 3, 4, 5, 6]
224
"""
225
return iter(self._list)
226
227
def list(self):
228
"""
229
Return a list of the elements of ``self``.
230
231
EXAMPLES::
232
233
sage: C = CrystalOfLetters(['A',5])
234
sage: C.list()
235
[1, 2, 3, 4, 5, 6]
236
"""
237
return self._list
238
239
@lazy_attribute
240
def _digraph_closure(self):
241
"""
242
The transitive closure of the directed graph associated to ``self``.
243
244
EXAMPLES::
245
246
sage: CrystalOfLetters(['A',5])._digraph_closure
247
Transitive closure of : Digraph on 6 vertices
248
"""
249
return self.digraph().transitive_closure()
250
251
def __contains__(self, x):
252
"""
253
EXAMPLES::
254
255
sage: C = CrystalOfLetters(['A',5])
256
sage: 1 in C
257
False
258
sage: C(1) in C
259
True
260
"""
261
return x in self._list
262
263
def lt_elements(self, x, y):
264
r"""
265
Return ``True`` if and only if there is a path from ``x`` to ``y`` in
266
the crystal graph, when ``x`` is not equal to ``y``.
267
268
Because the crystal graph is classical, it is a directed acyclic
269
graph which can be interpreted as a poset. This function implements
270
the comparison function of this poset.
271
272
EXAMPLES::
273
274
sage: C = CrystalOfLetters(['A', 5])
275
sage: x = C(1)
276
sage: y = C(2)
277
sage: C.lt_elements(x,y)
278
True
279
sage: C.lt_elements(y,x)
280
False
281
sage: C.lt_elements(x,x)
282
False
283
sage: C = CrystalOfLetters(['D', 4])
284
sage: C.lt_elements(C(4),C(-4))
285
False
286
sage: C.lt_elements(C(-4),C(4))
287
False
288
"""
289
if x.parent() is not self or y.parent() is not self:
290
raise ValueError("Cannot compare elements of different parents")
291
if self._digraph_closure.has_edge(x,y):
292
return True
293
return False
294
295
# temporary woraround while an_element is overriden by Parent
296
_an_element_ = EnumeratedSets.ParentMethods._an_element_
297
298
# Utility. Note: much of this class should be factored out at some point!
299
cdef class Letter(Element):
300
r"""
301
A class for letters.
302
303
Like :class:`ElementWrapper`, plus delegates ``__lt__`` (comparison)
304
to the parent.
305
306
EXAMPLES::
307
308
sage: from sage.combinat.crystals.letters import Letter
309
sage: a = Letter(ZZ, 1)
310
sage: Letter(ZZ, 1).parent()
311
Integer Ring
312
313
sage: Letter(ZZ, 1)._repr_()
314
'1'
315
316
sage: parent1 = ZZ # Any fake value ...
317
sage: parent2 = QQ # Any fake value ...
318
sage: l11 = Letter(parent1, 1)
319
sage: l12 = Letter(parent1, 2)
320
sage: l21 = Letter(parent2, 1)
321
sage: l22 = Letter(parent2, 2)
322
sage: l11 == l11
323
True
324
sage: l11 == l12
325
False
326
sage: l11 == l21 # not tested
327
False
328
329
sage: C = CrystalOfLetters(['B', 3])
330
sage: C(0) != C(0)
331
False
332
sage: C(1) != C(-1)
333
True
334
"""
335
cdef readonly int value
336
337
def __init__(self, parent, int value):
338
"""
339
EXAMPLES::
340
341
sage: C = CrystalOfLetters(['B',4])
342
sage: a = C(3)
343
sage: TestSuite(a).run()
344
"""
345
self.value = value
346
Element.__init__(self, parent)
347
348
def __setstate__(self, state):
349
r"""
350
Used in unpickling old pickles.
351
352
EXAMPLES::
353
354
sage: C = CrystalOfLetters(['B',4])
355
sage: a = C(3)
356
sage: loads(dumps(a)) == a
357
True
358
"""
359
self._set_parent(state[0])
360
self.value = state[1]['value']
361
362
def __reduce__(self):
363
r"""
364
Used in pickling crystal of letters elements.
365
366
EXAMPLES::
367
368
sage: C = CrystalOfLetters(['A',3])
369
sage: a = C(1)
370
sage: a.__reduce__()
371
(The crystal of letters for type ['A', 3], (1,))
372
"""
373
return (self._parent, (self.value,))
374
375
def _repr_(self):
376
"""
377
Return a string representation of ``self``.
378
379
EXAMPLES::
380
381
sage: C = CrystalOfLetters(['B', 3])
382
sage: C(0)
383
0
384
sage: C(1)
385
1
386
sage: C(-1)
387
-1
388
"""
389
return repr(self.value)
390
391
def _latex_(self):
392
r"""
393
A latex representation of ``self``.
394
395
EXAMPLES::
396
397
sage: C = CrystalOfLetters(['D', 4])
398
sage: latex(C(2))
399
2
400
sage: latex(C(-3))
401
\overline{3}
402
"""
403
if self.value < 0:
404
return "\\overline{" + repr(-self.value) + "}"
405
return repr(self.value)
406
407
def __hash__(self):
408
"""
409
Return the hash value of ``self``.
410
411
EXAMPLES::
412
413
sage: C = CrystalOfLetters(['D', 4])
414
sage: hash(C(4)) == hash(4)
415
True
416
"""
417
return self.value
418
419
def __richcmp__(left, right, int op):
420
"""
421
Entry point for rich comparisons. Needed for cython because we are
422
overriding `__hash__()`.
423
424
EXAMPLES::
425
426
sage: C = CrystalOfLetters(['D', 4])
427
sage: C(4) > C(-4)
428
False
429
"""
430
return (<Element>left)._richcmp(right, op)
431
432
cdef _richcmp_c_impl(left, Element right, int op):
433
"""
434
Return ``True`` if ``left`` compares with ``right`` based on ``op``.
435
436
EXAMPLES::
437
438
sage: C = CrystalOfLetters(['D', 4])
439
sage: C(4) > C(-4) # indirect doctest
440
False
441
sage: C(4) < C(-3)
442
True
443
sage: C(4) == C(4)
444
True
445
446
TESTS::
447
448
sage: C = CrystalOfLetters(['C', 3])
449
sage: C('E') == C(2)
450
False
451
sage: C(2) == C('E')
452
False
453
sage: C('E') == C('E')
454
True
455
"""
456
# Special case for the empty letter
457
if isinstance(left, EmptyLetter):
458
return isinstance(right, EmptyLetter) \
459
and (op == Py_EQ or op == Py_LE or op == Py_GE)
460
if isinstance(right, EmptyLetter):
461
return op == Py_NE
462
463
cdef Letter self, x
464
self = left
465
x = right
466
if op == Py_EQ:
467
return self.value == x.value
468
if op == Py_NE:
469
return self.value != x.value
470
if op == Py_LT:
471
return self._parent.lt_elements(self, x)
472
if op == Py_GT:
473
return x.parent().lt_elements(x, self)
474
if op == Py_LE:
475
return self.value == x.value or self._parent.lt_elements(self, x)
476
if op == Py_GE:
477
return self.value == x.value or x.parent().lt_elements(x, self)
478
return False
479
480
cdef class EmptyLetter(Element):
481
"""
482
The affine letter `\emptyset` thought of as a classical crystal letter
483
in classical type `B_n` and `C_n`.
484
485
.. WARNING::
486
487
This is not a classical letter.
488
489
Used in the rigged configuration bijections.
490
"""
491
cdef readonly str value
492
493
def __init__(self, parent):
494
"""
495
Initialize ``xelf``.
496
497
EXAMPLES::
498
499
sage: C = CrystalOfLetters(['C', 3])
500
sage: TestSuite(C('E')).run()
501
"""
502
self.value = 'E'
503
Element.__init__(self, parent)
504
505
def __reduce__(self):
506
r"""
507
Used in pickling crystal of letters elements.
508
509
EXAMPLES::
510
511
sage: C = CrystalOfLetters(['C',3])
512
sage: a = C('E')
513
sage: a.__reduce__()
514
(The crystal of letters for type ['C', 3], ('E',))
515
"""
516
return (self._parent, ('E',))
517
518
def _repr_(self):
519
"""
520
Return a string representation of ``self``.
521
522
EXAMPLES::
523
524
sage: C = CrystalOfLetters(['C', 3])
525
sage: C('E')
526
E
527
"""
528
return 'E'
529
530
def _latex_(self):
531
"""
532
Return a latex representation of ``self``.
533
534
EXAMPLES::
535
536
sage: C = CrystalOfLetters(['C', 3])
537
sage: latex(C('E'))
538
\emptyset
539
"""
540
return "\\emptyset"
541
542
def __hash__(self):
543
"""
544
Return the hash value of ``self``.
545
546
EXAMPLES::
547
548
sage: C = CrystalOfLetters(['D', 4])
549
sage: hash(C('E')) == hash('E')
550
True
551
"""
552
return hash(self.value)
553
554
def weight(self):
555
"""
556
Return the weight of ``self``.
557
558
EXAMPLES::
559
560
sage: C = CrystalOfLetters(['C', 3])
561
sage: C('E').weight()
562
(0, 0, 0)
563
"""
564
return self.parent().weight_lattice_realization().zero()
565
566
cpdef e(self, int i):
567
"""
568
Return `e_i` of ``self`` which is ``None``.
569
570
EXAMPLES::
571
572
sage: C = CrystalOfLetters(['C', 3])
573
sage: C('E').e(1)
574
"""
575
return None
576
577
cpdef f(self, int i):
578
"""
579
Return `f_i` of ``self`` which is ``None``.
580
581
EXAMPLES::
582
583
sage: C = CrystalOfLetters(['C', 3])
584
sage: C('E').f(1)
585
"""
586
return None
587
588
cpdef int epsilon(self, int i):
589
r"""
590
Return `\varepsilon_i` of ``self``.
591
592
EXAMPLES::
593
594
sage: C = CrystalOfLetters(['C', 3])
595
sage: C('E').epsilon(1)
596
0
597
"""
598
return 0
599
600
cpdef int phi(self, int i):
601
r"""
602
Return `\varphi_i` of ``self``.
603
604
EXAMPLES::
605
606
sage: C = CrystalOfLetters(['C', 3])
607
sage: C('E').phi(1)
608
0
609
"""
610
return 0
611
612
#########################
613
# Type A
614
#########################
615
616
cdef class Crystal_of_letters_type_A_element(Letter):
617
r"""
618
Type `A` crystal of letters elements.
619
620
TESTS::
621
622
sage: C = CrystalOfLetters(['A',3])
623
sage: C.list()
624
[1, 2, 3, 4]
625
sage: [ [x < y for y in C] for x in C ]
626
[[False, True, True, True],
627
[False, False, True, True],
628
[False, False, False, True],
629
[False, False, False, False]]
630
631
::
632
633
sage: C = CrystalOfLetters(['A',5])
634
sage: C(1) < C(1), C(1) < C(2), C(1) < C(3), C(2) < C(1)
635
(False, True, True, False)
636
637
::
638
639
sage: TestSuite(C).run()
640
"""
641
def weight(self):
642
"""
643
Return the weight of ``self``.
644
645
EXAMPLES::
646
647
sage: [v.weight() for v in CrystalOfLetters(['A',3])]
648
[(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)]
649
"""
650
return self._parent.weight_lattice_realization().monomial(self.value-1)
651
652
cpdef Letter e(self, int i):
653
r"""
654
Return the action of `e_i` on ``self``.
655
656
EXAMPLES::
657
658
sage: C = CrystalOfLetters(['A',4])
659
sage: [(c,i,c.e(i)) for i in C.index_set() for c in C if c.e(i) is not None]
660
[(2, 1, 1), (3, 2, 2), (4, 3, 3), (5, 4, 4)]
661
"""
662
if self.value == i+1:
663
return self._parent._element_constructor_(self.value-1)
664
else:
665
return None
666
667
cpdef Letter f(self, int i):
668
r"""
669
Return the action of `f_i` on ``self``.
670
671
EXAMPLES::
672
673
sage: C = CrystalOfLetters(['A',4])
674
sage: [(c,i,c.f(i)) for i in C.index_set() for c in C if c.f(i) is not None]
675
[(1, 1, 2), (2, 2, 3), (3, 3, 4), (4, 4, 5)]
676
"""
677
if self.value == i:
678
return self._parent._element_constructor_(self.value+1)
679
else:
680
return None
681
682
cpdef int epsilon(self, int i):
683
r"""
684
Return `\varepsilon_i` of ``self``.
685
686
EXAMPLES::
687
688
sage: C = CrystalOfLetters(['A',4])
689
sage: [(c,i) for i in C.index_set() for c in C if c.epsilon(i) != 0]
690
[(2, 1), (3, 2), (4, 3), (5, 4)]
691
"""
692
if self.value == i+1:
693
return 1
694
return 0
695
696
cpdef int phi(self, int i):
697
r"""
698
Return `\varphi_i` of ``self``.
699
700
EXAMPLES::
701
702
sage: C = CrystalOfLetters(['A',4])
703
sage: [(c,i) for i in C.index_set() for c in C if c.phi(i) != 0]
704
[(1, 1), (2, 2), (3, 3), (4, 4)]
705
"""
706
if self.value == i:
707
return 1
708
return 0
709
710
#########################
711
# Type B
712
#########################
713
714
cdef class Crystal_of_letters_type_B_element(Letter):
715
r"""
716
Type `B` crystal of letters elements.
717
718
TESTS::
719
720
sage: C = CrystalOfLetters(['B',3])
721
sage: TestSuite(C).run()
722
"""
723
def weight(self):
724
"""
725
Return the weight of ``self``.
726
727
EXAMPLES::
728
729
sage: [v.weight() for v in CrystalOfLetters(['B',3])]
730
[(1, 0, 0),
731
(0, 1, 0),
732
(0, 0, 1),
733
(0, 0, 0),
734
(0, 0, -1),
735
(0, -1, 0),
736
(-1, 0, 0)]
737
"""
738
if self.value > 0:
739
return self._parent.weight_lattice_realization().monomial(self.value-1)
740
elif self.value < 0:
741
return -self._parent.weight_lattice_realization().monomial(-self.value-1)
742
else:
743
return self._parent.weight_lattice_realization()(0)
744
745
cpdef Letter e(self, int i):
746
r"""
747
Return the action of `e_i` on ``self``.
748
749
EXAMPLES::
750
751
sage: C = CrystalOfLetters(['B',4])
752
sage: [(c,i,c.e(i)) for i in C.index_set() for c in C if c.e(i) is not None]
753
[(2, 1, 1),
754
(-1, 1, -2),
755
(3, 2, 2),
756
(-2, 2, -3),
757
(4, 3, 3),
758
(-3, 3, -4),
759
(0, 4, 4),
760
(-4, 4, 0)]
761
"""
762
if self.value == i+1:
763
return self._parent._element_constructor_(i)
764
elif self.value == 0 and i == self._parent._cartan_type.n:
765
return self._parent._element_constructor_(self._parent._cartan_type.n)
766
elif self.value == -i:
767
if i == self._parent._cartan_type.n:
768
return self._parent._element_constructor_(0)
769
else:
770
return self._parent._element_constructor_(-i-1)
771
else:
772
return None
773
774
cpdef Letter f(self, int i):
775
r"""
776
Return the actions of `f_i` on ``self``.
777
778
EXAMPLES::
779
780
sage: C = CrystalOfLetters(['B',4])
781
sage: [(c,i,c.f(i)) for i in C.index_set() for c in C if c.f(i) is not None]
782
[(1, 1, 2),
783
(-2, 1, -1),
784
(2, 2, 3),
785
(-3, 2, -2),
786
(3, 3, 4),
787
(-4, 3, -3),
788
(4, 4, 0),
789
(0, 4, -4)]
790
"""
791
if self.value == i:
792
if i < self._parent._cartan_type.n:
793
return self._parent._element_constructor_(i+1)
794
else:
795
return self._parent._element_constructor_(0)
796
elif self.value == 0 and i == self._parent._cartan_type.n:
797
return self._parent._element_constructor_(-self._parent._cartan_type.n)
798
elif self.value == -i-1:
799
return self._parent._element_constructor_(-i)
800
else:
801
return None
802
803
cpdef int epsilon(self, int i):
804
r"""
805
Return `\varepsilon_i` of ``self``.
806
807
EXAMPLES::
808
809
sage: C = CrystalOfLetters(['B',3])
810
sage: [(c,i) for i in C.index_set() for c in C if c.epsilon(i) != 0]
811
[(2, 1), (-1, 1), (3, 2), (-2, 2), (0, 3), (-3, 3)]
812
"""
813
cdef int n = self._parent._cartan_type.n
814
if self.value == 0:
815
if i == n:
816
return 1
817
return 0
818
if i == n and self.value == -n:
819
return 2
820
if self.value == i+1 or self.value == -i:
821
return 1
822
return 0
823
824
cpdef int phi(self, int i):
825
r"""
826
Return `\varphi_i` of ``self``.
827
828
EXAMPLES::
829
830
sage: C = CrystalOfLetters(['B',3])
831
sage: [(c,i) for i in C.index_set() for c in C if c.phi(i) != 0]
832
[(1, 1), (-2, 1), (2, 2), (-3, 2), (3, 3), (0, 3)]
833
"""
834
cdef int n = self._parent._cartan_type.n
835
if self.value == 0:
836
if i == n:
837
return 1
838
return 0
839
if i == n and self.value == n:
840
return 2
841
if self.value == i or self.value == -i-1:
842
return 1
843
return 0
844
845
#########################
846
# Type C
847
#########################
848
849
cdef class Crystal_of_letters_type_C_element(Letter):
850
r"""
851
Type `C` crystal of letters elements.
852
853
TESTS::
854
855
sage: C = CrystalOfLetters (['C',3])
856
sage: C.list()
857
[1, 2, 3, -3, -2, -1]
858
sage: [ [x < y for y in C] for x in C ]
859
[[False, True, True, True, True, True],
860
[False, False, True, True, True, True],
861
[False, False, False, True, True, True],
862
[False, False, False, False, True, True],
863
[False, False, False, False, False, True],
864
[False, False, False, False, False, False]]
865
sage: TestSuite(C).run()
866
"""
867
def weight(self):
868
"""
869
Return the weight of ``self``.
870
871
EXAMPLES::
872
873
sage: [v.weight() for v in CrystalOfLetters(['C',3])]
874
[(1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, -1), (0, -1, 0), (-1, 0, 0)]
875
"""
876
if self.value > 0:
877
return self._parent.weight_lattice_realization().monomial(self.value-1)
878
elif self.value < 0:
879
return -self._parent.weight_lattice_realization().monomial(-self.value-1)
880
else:
881
return self._parent.weight_lattice_realization()(0)
882
883
cpdef Letter e(self, int i):
884
r"""
885
Return the action of `e_i` on ``self``.
886
887
EXAMPLES::
888
889
sage: C = CrystalOfLetters(['C',4])
890
sage: [(c,i,c.e(i)) for i in C.index_set() for c in C if c.e(i) is not None]
891
[(2, 1, 1),
892
(-1, 1, -2),
893
(3, 2, 2),
894
(-2, 2, -3),
895
(4, 3, 3),
896
(-3, 3, -4),
897
(-4, 4, 4)]
898
"""
899
if self.value == -self._parent._cartan_type.n and self.value == -i:
900
return self._parent._element_constructor_(-self.value)
901
elif self.value == i+1 or self.value == -i:
902
return self._parent._element_constructor_(self.value-1)
903
else:
904
return None
905
906
cpdef Letter f(self, int i):
907
r"""
908
Return the action of `f_i` on ``self``.
909
910
EXAMPLES::
911
912
sage: C = CrystalOfLetters(['C',4])
913
sage: [(c,i,c.f(i)) for i in C.index_set() for c in C if c.f(i) is not None]
914
[(1, 1, 2), (-2, 1, -1), (2, 2, 3),
915
(-3, 2, -2), (3, 3, 4), (-4, 3, -3), (4, 4, -4)]
916
"""
917
if self.value == self._parent._cartan_type.n and self.value == i:
918
return self._parent._element_constructor_(-self.value)
919
elif self.value == i or self.value == -i-1:
920
return self._parent._element_constructor_(self.value+1)
921
else:
922
return None
923
924
cpdef int epsilon(self, int i):
925
r"""
926
Return `\varepsilon_i` of ``self``.
927
928
EXAMPLES::
929
930
sage: C = CrystalOfLetters(['C',3])
931
sage: [(c,i) for i in C.index_set() for c in C if c.epsilon(i) != 0]
932
[(2, 1), (-1, 1), (3, 2), (-2, 2), (-3, 3)]
933
"""
934
if self.value == i+1 or self.value == -i:
935
return 1
936
return 0
937
938
cpdef int phi(self, int i):
939
r"""
940
Return `\varphi_i` of ``self``.
941
942
EXAMPLES::
943
944
sage: C = CrystalOfLetters(['C',3])
945
sage: [(c,i) for i in C.index_set() for c in C if c.phi(i) != 0]
946
[(1, 1), (-2, 1), (2, 2), (-3, 2), (3, 3)]
947
"""
948
if self.value == i or self.value == -i-1:
949
return 1
950
return 0
951
952
#########################
953
# Type D
954
#########################
955
956
cdef class Crystal_of_letters_type_D_element(Letter):
957
r"""
958
Type `D` crystal of letters elements.
959
960
TESTS::
961
962
sage: C = CrystalOfLetters(['D',4])
963
sage: C.list()
964
[1, 2, 3, 4, -4, -3, -2, -1]
965
sage: TestSuite(C).run()
966
"""
967
def weight(self):
968
"""
969
Return the weight of ``self``.
970
971
EXAMPLES::
972
973
sage: [v.weight() for v in CrystalOfLetters(['D',4])]
974
[(1, 0, 0, 0),
975
(0, 1, 0, 0),
976
(0, 0, 1, 0),
977
(0, 0, 0, 1),
978
(0, 0, 0, -1),
979
(0, 0, -1, 0),
980
(0, -1, 0, 0),
981
(-1, 0, 0, 0)]
982
"""
983
if self.value > 0:
984
return self._parent.weight_lattice_realization().monomial(self.value-1)
985
elif self.value < 0:
986
return -self._parent.weight_lattice_realization().monomial(-self.value-1)
987
else:
988
return self._parent.weight_lattice_realization()(0)
989
990
cpdef Letter e(self, int i):
991
r"""
992
Return the action of `e_i` on ``self``.
993
994
EXAMPLES::
995
996
sage: C = CrystalOfLetters(['D',5])
997
sage: [(c,i,c.e(i)) for i in C.index_set() for c in C if c.e(i) is not None]
998
[(2, 1, 1),
999
(-1, 1, -2),
1000
(3, 2, 2),
1001
(-2, 2, -3),
1002
(4, 3, 3),
1003
(-3, 3, -4),
1004
(5, 4, 4),
1005
(-4, 4, -5),
1006
(-5, 5, 4),
1007
(-4, 5, 5)]
1008
"""
1009
if i == self._parent._cartan_type.n:
1010
if self.value == -i:
1011
return self._parent._element_constructor_(i-1)
1012
elif self.value == -(i-1):
1013
return self._parent._element_constructor_(i)
1014
else:
1015
return None
1016
elif self.value == i+1:
1017
return self._parent._element_constructor_(i)
1018
elif self.value == -i:
1019
return self._parent._element_constructor_(-(i+1))
1020
else:
1021
return None
1022
1023
cpdef Letter f(self, int i):
1024
r"""
1025
Return the action of `f_i` on ``self``.
1026
1027
EXAMPLES::
1028
1029
sage: C = CrystalOfLetters(['D',5])
1030
sage: [(c,i,c.f(i)) for i in C.index_set() for c in C if c.f(i) is not None]
1031
[(1, 1, 2),
1032
(-2, 1, -1),
1033
(2, 2, 3),
1034
(-3, 2, -2),
1035
(3, 3, 4),
1036
(-4, 3, -3),
1037
(4, 4, 5),
1038
(-5, 4, -4),
1039
(4, 5, -5),
1040
(5, 5, -4)]
1041
"""
1042
if i == self.value:
1043
if i == self._parent._cartan_type.n:
1044
return self._parent._element_constructor_(-(i-1))
1045
else:
1046
return self._parent._element_constructor_(i+1)
1047
elif self.value == -(i+1):
1048
return self._parent._element_constructor_(-i)
1049
elif self.value == self._parent._cartan_type.n-1 and i == self.value+1:
1050
return self._parent._element_constructor_(-i)
1051
else:
1052
return None
1053
1054
cpdef int epsilon(self, int i):
1055
r"""
1056
Return `\varepsilon_i` of ``self``.
1057
1058
EXAMPLES::
1059
1060
sage: C = CrystalOfLetters(['D',4])
1061
sage: [(c,i) for i in C.index_set() for c in C if c.epsilon(i) != 0]
1062
[(2, 1), (-1, 1), (3, 2), (-2, 2), (4, 3), (-3, 3), (-4, 4), (-3, 4)]
1063
"""
1064
if self.value == i+1 or self.value == -i:
1065
return 1
1066
cdef int n = self._parent._cartan_type.n
1067
if i == n and self.value == -n+1:
1068
return 1
1069
return 0
1070
1071
cpdef int phi(self, int i):
1072
r"""
1073
Return `\varphi_i` of ``self``.
1074
1075
EXAMPLES::
1076
1077
sage: C = CrystalOfLetters(['D',4])
1078
sage: [(c,i) for i in C.index_set() for c in C if c.phi(i) != 0]
1079
[(1, 1), (-2, 1), (2, 2), (-3, 2), (3, 3), (-4, 3), (3, 4), (4, 4)]
1080
"""
1081
if self.value == i or self.value == -i-1:
1082
return 1
1083
cdef int n = self._parent._cartan_type.n
1084
if i == n and self.value == n-1:
1085
return 1
1086
return 0
1087
1088
#########################
1089
# Type G2
1090
#########################
1091
1092
cdef class Crystal_of_letters_type_G_element(Letter):
1093
r"""
1094
Type `G_2` crystal of letters elements.
1095
1096
TESTS::
1097
1098
sage: C = CrystalOfLetters(['G',2])
1099
sage: C.list()
1100
[1, 2, 3, 0, -3, -2, -1]
1101
sage: TestSuite(C).run()
1102
"""
1103
def weight(self):
1104
"""
1105
Return the weight of ``self``.
1106
1107
EXAMPLES::
1108
1109
sage: [v.weight() for v in CrystalOfLetters(['G',2])]
1110
[(1, 0, -1), (1, -1, 0), (0, 1, -1), (0, 0, 0), (0, -1, 1), (-1, 1, 0), (-1, 0, 1)]
1111
"""
1112
if self.value == 1:
1113
return self._parent.weight_lattice_realization()((1, 0, -1))
1114
elif self.value == 2:
1115
return self._parent.weight_lattice_realization()((1, -1, 0))
1116
elif self.value == 3:
1117
return self._parent.weight_lattice_realization()((0, 1, -1))
1118
elif self.value == 0:
1119
return self._parent.weight_lattice_realization()((0, 0, 0))
1120
elif self.value == -3:
1121
return self._parent.weight_lattice_realization()((0, -1, 1))
1122
elif self.value == -2:
1123
return self._parent.weight_lattice_realization()((-1, 1, 0))
1124
elif self.value == -1:
1125
return self._parent.weight_lattice_realization()((-1, 0, 1))
1126
else:
1127
raise RuntimeError("G2 crystal of letters element %d not valid"%self.value)
1128
1129
cpdef Letter e(self, int i):
1130
r"""
1131
Return the action of `e_i` on ``self``.
1132
1133
EXAMPLES::
1134
1135
sage: C = CrystalOfLetters(['G',2])
1136
sage: [(c,i,c.e(i)) for i in C.index_set() for c in C if c.e(i) is not None]
1137
[(2, 1, 1),
1138
(0, 1, 3),
1139
(-3, 1, 0),
1140
(-1, 1, -2),
1141
(3, 2, 2),
1142
(-2, 2, -3)]
1143
"""
1144
if i == 1:
1145
if self.value == 2:
1146
return self._parent._element_constructor_(1)
1147
elif self.value == 0:
1148
return self._parent._element_constructor_(3)
1149
elif self.value == -3:
1150
return self._parent._element_constructor_(0)
1151
elif self.value == -1:
1152
return self._parent._element_constructor_(-2)
1153
else:
1154
return None
1155
else:
1156
if self.value == 3:
1157
return self._parent._element_constructor_(2)
1158
elif self.value == -2:
1159
return self._parent._element_constructor_(-3)
1160
else:
1161
return None
1162
1163
cpdef Letter f(self, int i):
1164
r"""
1165
Return the action of `f_i` on ``self``.
1166
1167
EXAMPLES::
1168
1169
sage: C = CrystalOfLetters(['G',2])
1170
sage: [(c,i,c.f(i)) for i in C.index_set() for c in C if c.f(i) is not None]
1171
[(1, 1, 2),
1172
(3, 1, 0),
1173
(0, 1, -3),
1174
(-2, 1, -1),
1175
(2, 2, 3),
1176
(-3, 2, -2)]
1177
"""
1178
if i == 1:
1179
if self.value == 1:
1180
return self._parent._element_constructor_(2)
1181
elif self.value == 3:
1182
return self._parent._element_constructor_(0)
1183
elif self.value == 0:
1184
return self._parent._element_constructor_(-3)
1185
elif self.value == -2:
1186
return self._parent._element_constructor_(-1)
1187
else:
1188
return None
1189
else:
1190
if self.value == 2:
1191
return self._parent._element_constructor_(3)
1192
elif self.value == -3:
1193
return self._parent._element_constructor_(-2)
1194
else:
1195
return None
1196
1197
cpdef int epsilon(self, int i):
1198
r"""
1199
Return `\varepsilon_i` of ``self``.
1200
1201
EXAMPLES::
1202
1203
sage: C = CrystalOfLetters(['G',2])
1204
sage: [(c,i,c.epsilon(i)) for i in C.index_set() for c in C if c.epsilon(i) != 0]
1205
[(2, 1, 1), (0, 1, 1), (-3, 1, 2), (-1, 1, 1), (3, 2, 1), (-2, 2, 1)]
1206
"""
1207
if i == 1:
1208
if self.value in (2,0,-1):
1209
return 1
1210
if self.value == -3:
1211
return 2
1212
return 0
1213
if self.value == 3 or self.value == -2: # i must be 2
1214
return 1
1215
return 0
1216
1217
cpdef int phi(self, int i):
1218
r"""
1219
Return `\varphi_i` of ``self``.
1220
1221
EXAMPLES::
1222
1223
sage: C = CrystalOfLetters(['G',2])
1224
sage: [(c,i,c.phi(i)) for i in C.index_set() for c in C if c.phi(i) != 0]
1225
[(1, 1, 1), (3, 1, 2), (0, 1, 1), (-2, 1, 1), (2, 2, 1), (-3, 2, 1)]
1226
"""
1227
if i == 1:
1228
if self.value in (1,0,-2):
1229
return 1
1230
if self.value == 3:
1231
return 2
1232
return 0
1233
if self.value == -3 or self.value == 2: # i must be 2
1234
return 1
1235
return 0
1236
1237
#########################
1238
# Type E Letter
1239
#########################
1240
1241
cdef class LetterTuple(Element):
1242
"""
1243
Abstract class for type `E` letters.
1244
"""
1245
cdef readonly tuple value
1246
1247
def __init__(self, parent, tuple value):
1248
"""
1249
Initialize ``self``.
1250
1251
EXAMPLES::
1252
1253
sage: C = CrystalOfLetters(['E',6])
1254
sage: a = C((1,-3))
1255
sage: TestSuite(a).run()
1256
"""
1257
self.value = value
1258
Element.__init__(self, parent)
1259
1260
def __setstate__(self, state):
1261
r"""
1262
Used in unpickling old pickles.
1263
1264
EXAMPLES::
1265
1266
sage: C = CrystalOfLetters(['E',6])
1267
sage: a = C((1,-3))
1268
sage: loads(dumps(a)) == a
1269
True
1270
"""
1271
self._set_parent(state[0])
1272
self.value = tuple(state[1]['value'])
1273
1274
def __reduce__(self):
1275
"""
1276
Used in pickling of letters.
1277
1278
EXAMPLES::
1279
1280
sage: C = CrystalOfLetters(['E',6])
1281
sage: a = C((1,-3))
1282
sage: a.__reduce__()
1283
(The crystal of letters for type ['E', 6], ((1, -3),))
1284
"""
1285
return (self._parent, (self.value,))
1286
1287
def __hash__(self):
1288
"""
1289
Return the hash value of ``self``.
1290
1291
EXAMPLES::
1292
1293
sage: C = CrystalOfLetters(['E', 6])
1294
sage: hash(C((1, -3))) == hash((1, -3))
1295
True
1296
"""
1297
return hash(self.value)
1298
1299
def __richcmp__(left, right, int op):
1300
"""
1301
Entry point for rich comparisons. Needed for cython because we are
1302
overriding `__hash__()`.
1303
1304
EXAMPLES::
1305
1306
sage: C = CrystalOfLetters(['E', 6])
1307
sage: C((1,)) > C((-1, 3))
1308
False
1309
"""
1310
return (<Element>left)._richcmp(right, op)
1311
1312
cdef _richcmp_c_impl(left, Element right, int op):
1313
"""
1314
Check comparison between ``left`` and ``right`` based on ``op``
1315
1316
EXAMPLES::
1317
1318
sage: C = CrystalOfLetters(['E', 6])
1319
sage: C((1,)) < C((-1, 3)) # indirect doctest
1320
True
1321
sage: C((6,)) < C((1,))
1322
False
1323
sage: C((-1, 3)) == C((-1, 3))
1324
True
1325
"""
1326
cdef LetterTuple self, x
1327
self = left
1328
x = right
1329
if op == Py_EQ:
1330
return self.value == x.value
1331
if op == Py_NE:
1332
return self.value != x.value
1333
if op == Py_LT:
1334
return self._parent.lt_elements(self, x)
1335
if op == Py_GT:
1336
return x._parent.lt_elements(x, self)
1337
if op == Py_LE:
1338
return self.value == x.value or self._parent.lt_elements(self, x)
1339
if op == Py_GE:
1340
return self.value == x.value or x._parent.lt_elements(x, self)
1341
return False
1342
1343
def _repr_(self):
1344
"""
1345
Return a string representation of ``self``.
1346
1347
EXAMPLES::
1348
1349
sage: C = CrystalOfLetters(['E', 6])
1350
sage: C((-1, 3))
1351
(-1, 3)
1352
"""
1353
return repr(self.value)
1354
1355
def _latex_(self):
1356
r"""
1357
A latex representation of ``self``.
1358
1359
EXAMPLES::
1360
1361
sage: C = CrystalOfLetters(['E', 6])
1362
sage: latex(C((-1, 3)))
1363
\left(\overline{1}, 3\right)
1364
"""
1365
ret = "\\left("
1366
first = True
1367
for v in self.value:
1368
if not first:
1369
ret += ", "
1370
else:
1371
first = False
1372
if v < 0:
1373
ret += "\\overline{" + repr(-v) + "}"
1374
else:
1375
ret+= repr(v)
1376
return ret + "\\right)"
1377
1378
cpdef int epsilon(self, int i):
1379
r"""
1380
Return `\varepsilon_i` of ``self``.
1381
1382
EXAMPLES::
1383
1384
sage: C = CrystalOfLetters(['E',6])
1385
sage: C((-6,)).epsilon(1)
1386
0
1387
sage: C((-6,)).epsilon(6)
1388
1
1389
"""
1390
if -i in self.value:
1391
return 1
1392
return 0
1393
1394
cpdef int phi(self, int i):
1395
r"""
1396
Return `\varphi_i` of ``self``.
1397
1398
EXAMPLES::
1399
1400
sage: C = CrystalOfLetters(['E',6])
1401
sage: C((1,)).phi(1)
1402
1
1403
sage: C((1,)).phi(6)
1404
0
1405
"""
1406
if i in self.value:
1407
return 1
1408
return 0
1409
1410
#########################
1411
# Type E6
1412
#########################
1413
1414
cdef class Crystal_of_letters_type_E6_element(LetterTuple):
1415
r"""
1416
Type `E_6` crystal of letters elements. This crystal corresponds to the highest weight
1417
crystal `B(\Lambda_1)`.
1418
1419
TESTS::
1420
1421
sage: C = CrystalOfLetters(['E',6])
1422
sage: C.module_generators
1423
((1,),)
1424
sage: C.list()
1425
[(1,), (-1, 3), (-3, 4), (-4, 2, 5), (-2, 5), (-5, 2, 6), (-2, -5, 4, 6),
1426
(-4, 3, 6), (-3, 1, 6), (-1, 6), (-6, 2), (-2, -6, 4), (-4, -6, 3, 5),
1427
(-3, -6, 1, 5), (-1, -6, 5), (-5, 3), (-3, -5, 1, 4), (-1, -5, 4), (-4, 1, 2),
1428
(-1, -4, 2, 3), (-3, 2), (-2, -3, 4), (-4, 5), (-5, 6), (-6,), (-2, 1), (-1, -2, 3)]
1429
sage: TestSuite(C).run()
1430
sage: all(b.f(i).e(i) == b for i in C.index_set() for b in C if b.f(i) is not None)
1431
True
1432
sage: all(b.e(i).f(i) == b for i in C.index_set() for b in C if b.e(i) is not None)
1433
True
1434
sage: G = C.digraph()
1435
sage: G.show(edge_labels=true, figsize=12, vertex_size=1)
1436
"""
1437
1438
def _repr_(self):
1439
"""
1440
In their full representation, the vertices of this crystal are labeled
1441
by their weight. For example vertex (-5,2,6) indicates that a 5-arrow
1442
is coming into this vertex, and a 2-arrow and 6-arrow is leaving the vertex.
1443
Specifying element_print_style = 'compact' for a given crystal C, labels the
1444
vertices of this crystal by the 27 letters +abcdefghijklmnopqrstuvwxyz.
1445
1446
EXAMPLES::
1447
1448
sage: C = CrystalOfLetters(['E',6], element_print_style = 'compact')
1449
sage: C.list()
1450
[+, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]
1451
"""
1452
if self._parent._element_print_style == 'compact':
1453
l=['+','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
1454
return l[self._parent.list().index(self)]
1455
return repr(self.value)
1456
1457
def weight(self):
1458
"""
1459
Return the weight of ``self``.
1460
1461
EXAMPLES::
1462
1463
sage: [v.weight() for v in CrystalOfLetters(['E',6])]
1464
[(0, 0, 0, 0, 0, -2/3, -2/3, 2/3),
1465
(-1/2, 1/2, 1/2, 1/2, 1/2, -1/6, -1/6, 1/6),
1466
(1/2, -1/2, 1/2, 1/2, 1/2, -1/6, -1/6, 1/6),
1467
(1/2, 1/2, -1/2, 1/2, 1/2, -1/6, -1/6, 1/6),
1468
(-1/2, -1/2, -1/2, 1/2, 1/2, -1/6, -1/6, 1/6),
1469
(1/2, 1/2, 1/2, -1/2, 1/2, -1/6, -1/6, 1/6),
1470
(-1/2, -1/2, 1/2, -1/2, 1/2, -1/6, -1/6, 1/6),
1471
(-1/2, 1/2, -1/2, -1/2, 1/2, -1/6, -1/6, 1/6),
1472
(1/2, -1/2, -1/2, -1/2, 1/2, -1/6, -1/6, 1/6),
1473
(0, 0, 0, 0, 1, 1/3, 1/3, -1/3),
1474
(1/2, 1/2, 1/2, 1/2, -1/2, -1/6, -1/6, 1/6),
1475
(-1/2, -1/2, 1/2, 1/2, -1/2, -1/6, -1/6, 1/6),
1476
(-1/2, 1/2, -1/2, 1/2, -1/2, -1/6, -1/6, 1/6),
1477
(1/2, -1/2, -1/2, 1/2, -1/2, -1/6, -1/6, 1/6),
1478
(0, 0, 0, 1, 0, 1/3, 1/3, -1/3),
1479
(-1/2, 1/2, 1/2, -1/2, -1/2, -1/6, -1/6, 1/6),
1480
(1/2, -1/2, 1/2, -1/2, -1/2, -1/6, -1/6, 1/6),
1481
(0, 0, 1, 0, 0, 1/3, 1/3, -1/3),
1482
(1/2, 1/2, -1/2, -1/2, -1/2, -1/6, -1/6, 1/6),
1483
(0, 1, 0, 0, 0, 1/3, 1/3, -1/3),
1484
(1, 0, 0, 0, 0, 1/3, 1/3, -1/3),
1485
(0, -1, 0, 0, 0, 1/3, 1/3, -1/3),
1486
(0, 0, -1, 0, 0, 1/3, 1/3, -1/3),
1487
(0, 0, 0, -1, 0, 1/3, 1/3, -1/3),
1488
(0, 0, 0, 0, -1, 1/3, 1/3, -1/3),
1489
(-1/2, -1/2, -1/2, -1/2, -1/2, -1/6, -1/6, 1/6),
1490
(-1, 0, 0, 0, 0, 1/3, 1/3, -1/3)]
1491
"""
1492
R=self._parent.weight_lattice_realization().fundamental_weights()
1493
return sum(cmp(i,0)*R[abs(i)] for i in self.value)
1494
1495
cpdef LetterTuple e(self, int i):
1496
r"""
1497
Return the action of `e_i` on ``self``.
1498
1499
EXAMPLES::
1500
1501
sage: C = CrystalOfLetters(['E',6])
1502
sage: C((-1,3)).e(1)
1503
(1,)
1504
sage: C((-2,-3,4)).e(2)
1505
(-3, 2)
1506
sage: C((1,)).e(1)
1507
"""
1508
if self.value == (-1, 3) and i == 1:
1509
return self._parent._element_constructor_((1,))
1510
if self.value == (-3, 4) and i == 3:
1511
return self._parent._element_constructor_((-1, 3))
1512
if self.value == (-4, 2, 5) and i == 4:
1513
return self._parent._element_constructor_((-3, 4))
1514
if self.value == (-5, 2, 6) and i == 5:
1515
return self._parent._element_constructor_((-4, 2, 5))
1516
if self.value == (-2, 5) and i == 2:
1517
return self._parent._element_constructor_((-4, 2, 5))
1518
if self.value == (-6, 2) and i == 6:
1519
return self._parent._element_constructor_((-5, 2, 6))
1520
if self.value == (-2, -5, 4, 6) and i == 2:
1521
return self._parent._element_constructor_((-5, 2, 6))
1522
if self.value == (-2, -6, 4) and i == 2:
1523
return self._parent._element_constructor_((-6, 2))
1524
if self.value == (-2, -5, 4, 6) and i == 5:
1525
return self._parent._element_constructor_((-2, 5))
1526
if self.value == (-2, -6, 4) and i == 6:
1527
return self._parent._element_constructor_((-2, -5, 4, 6))
1528
if self.value == (-4, 3, 6) and i == 4:
1529
return self._parent._element_constructor_((-2, -5, 4, 6))
1530
if self.value == (-4, -6, 3, 5) and i == 4:
1531
return self._parent._element_constructor_((-2, -6, 4))
1532
if self.value == (-4, -6, 3, 5) and i == 6:
1533
return self._parent._element_constructor_((-4, 3, 6))
1534
if self.value == (-3, 1, 6) and i == 3:
1535
return self._parent._element_constructor_((-4, 3, 6))
1536
if self.value == (-5, 3) and i == 5:
1537
return self._parent._element_constructor_((-4, -6, 3, 5))
1538
if self.value == (-3, -6, 1, 5) and i == 3:
1539
return self._parent._element_constructor_((-4, -6, 3, 5))
1540
if self.value == (-3, -5, 1, 4) and i == 3:
1541
return self._parent._element_constructor_((-5, 3))
1542
if self.value == (-3, -6, 1, 5) and i == 6:
1543
return self._parent._element_constructor_((-3, 1, 6))
1544
if self.value == (-1, 6) and i == 1:
1545
return self._parent._element_constructor_((-3, 1, 6))
1546
if self.value == (-3, -5, 1, 4) and i == 5:
1547
return self._parent._element_constructor_((-3, -6, 1, 5))
1548
if self.value == (-1, -6, 5) and i == 1:
1549
return self._parent._element_constructor_((-3, -6, 1, 5))
1550
if self.value == (-4, 1, 2) and i == 4:
1551
return self._parent._element_constructor_((-3, -5, 1, 4))
1552
if self.value == (-1, -5, 4) and i == 1:
1553
return self._parent._element_constructor_((-3, -5, 1, 4))
1554
if self.value == (-2, 1) and i == 2:
1555
return self._parent._element_constructor_((-4, 1, 2))
1556
if self.value == (-1, -4, 2, 3) and i == 1:
1557
return self._parent._element_constructor_((-4, 1, 2))
1558
if self.value == (-1, -2, 3) and i == 1:
1559
return self._parent._element_constructor_((-2, 1))
1560
if self.value == (-1, -6, 5) and i == 6:
1561
return self._parent._element_constructor_((-1, 6))
1562
if self.value == (-1, -5, 4) and i == 5:
1563
return self._parent._element_constructor_((-1, -6, 5))
1564
if self.value == (-1, -4, 2, 3) and i == 4:
1565
return self._parent._element_constructor_((-1, -5, 4))
1566
if self.value == (-1, -2, 3) and i == 2:
1567
return self._parent._element_constructor_((-1, -4, 2, 3))
1568
if self.value == (-3, 2) and i == 3:
1569
return self._parent._element_constructor_((-1, -4, 2, 3))
1570
if self.value == (-2, -3, 4) and i == 3:
1571
return self._parent._element_constructor_((-1, -2, 3))
1572
if self.value == (-2, -3, 4) and i == 2:
1573
return self._parent._element_constructor_((-3, 2))
1574
if self.value == (-4, 5) and i == 4:
1575
return self._parent._element_constructor_((-2, -3, 4))
1576
if self.value == (-5, 6) and i == 5:
1577
return self._parent._element_constructor_((-4, 5))
1578
if self.value == (-6,) and i == 6:
1579
return self._parent._element_constructor_((-5, 6))
1580
else:
1581
return None
1582
1583
cpdef LetterTuple f(self, int i):
1584
r"""
1585
Return the action of `f_i` on ``self``.
1586
1587
EXAMPLES::
1588
1589
sage: C = CrystalOfLetters(['E',6])
1590
sage: C((1,)).f(1)
1591
(-1, 3)
1592
sage: C((-6,)).f(1)
1593
"""
1594
if self.value == (1,) and i == 1:
1595
return self._parent._element_constructor_((-1, 3))
1596
if self.value == (-1, 3) and i == 3:
1597
return self._parent._element_constructor_((-3, 4))
1598
if self.value == (-3, 4) and i == 4:
1599
return self._parent._element_constructor_((-4, 2, 5))
1600
if self.value == (-4, 2, 5) and i == 5:
1601
return self._parent._element_constructor_((-5, 2, 6))
1602
if self.value == (-4, 2, 5) and i == 2:
1603
return self._parent._element_constructor_((-2, 5))
1604
if self.value == (-5, 2, 6) and i == 6:
1605
return self._parent._element_constructor_((-6, 2))
1606
if self.value == (-5, 2, 6) and i == 2:
1607
return self._parent._element_constructor_((-2, -5, 4, 6))
1608
if self.value == (-6, 2) and i == 2:
1609
return self._parent._element_constructor_((-2, -6, 4))
1610
if self.value == (-2, 5) and i == 5:
1611
return self._parent._element_constructor_((-2, -5, 4, 6))
1612
if self.value == (-2, -5, 4, 6) and i == 6:
1613
return self._parent._element_constructor_((-2, -6, 4))
1614
if self.value == (-2, -5, 4, 6) and i == 4:
1615
return self._parent._element_constructor_((-4, 3, 6))
1616
if self.value == (-2, -6, 4) and i == 4:
1617
return self._parent._element_constructor_((-4, -6, 3, 5))
1618
if self.value == (-4, 3, 6) and i == 6:
1619
return self._parent._element_constructor_((-4, -6, 3, 5))
1620
if self.value == (-4, 3, 6) and i == 3:
1621
return self._parent._element_constructor_((-3, 1, 6))
1622
if self.value == (-4, -6, 3, 5) and i == 5:
1623
return self._parent._element_constructor_((-5, 3))
1624
if self.value == (-4, -6, 3, 5) and i == 3:
1625
return self._parent._element_constructor_((-3, -6, 1, 5))
1626
if self.value == (-5, 3) and i == 3:
1627
return self._parent._element_constructor_((-3, -5, 1, 4))
1628
if self.value == (-3, 1, 6) and i == 6:
1629
return self._parent._element_constructor_((-3, -6, 1, 5))
1630
if self.value == (-3, 1, 6) and i == 1:
1631
return self._parent._element_constructor_((-1, 6))
1632
if self.value == (-3, -6, 1, 5) and i == 5:
1633
return self._parent._element_constructor_((-3, -5, 1, 4))
1634
if self.value == (-3, -6, 1, 5) and i == 1:
1635
return self._parent._element_constructor_((-1, -6, 5))
1636
if self.value == (-3, -5, 1, 4) and i == 4:
1637
return self._parent._element_constructor_((-4, 1, 2))
1638
if self.value == (-3, -5, 1, 4) and i == 1:
1639
return self._parent._element_constructor_((-1, -5, 4))
1640
if self.value == (-4, 1, 2) and i == 2:
1641
return self._parent._element_constructor_((-2, 1))
1642
if self.value == (-4, 1, 2) and i == 1:
1643
return self._parent._element_constructor_((-1, -4, 2, 3))
1644
if self.value == (-2, 1) and i == 1:
1645
return self._parent._element_constructor_((-1, -2, 3))
1646
if self.value == (-1, 6) and i == 6:
1647
return self._parent._element_constructor_((-1, -6, 5))
1648
if self.value == (-1, -6, 5) and i == 5:
1649
return self._parent._element_constructor_((-1, -5, 4))
1650
if self.value == (-1, -5, 4) and i == 4:
1651
return self._parent._element_constructor_((-1, -4, 2, 3))
1652
if self.value == (-1, -4, 2, 3) and i == 2:
1653
return self._parent._element_constructor_((-1, -2, 3))
1654
if self.value == (-1, -4, 2, 3) and i == 3:
1655
return self._parent._element_constructor_((-3, 2))
1656
if self.value == (-1, -2, 3) and i == 3:
1657
return self._parent._element_constructor_((-2, -3, 4))
1658
if self.value == (-3, 2) and i == 2:
1659
return self._parent._element_constructor_((-2, -3, 4))
1660
if self.value == (-2, -3, 4) and i == 4:
1661
return self._parent._element_constructor_((-4, 5))
1662
if self.value == (-4, 5) and i == 5:
1663
return self._parent._element_constructor_((-5, 6))
1664
if self.value == (-5, 6) and i == 6:
1665
return self._parent._element_constructor_((-6,))
1666
else:
1667
return None
1668
1669
cdef class Crystal_of_letters_type_E6_element_dual(LetterTuple):
1670
r"""
1671
Type `E_6` crystal of letters elements. This crystal corresponds to the highest weight
1672
crystal `B(\Lambda_6)`. This crystal is dual to `B(\Lambda_1)` of type `E_6`.
1673
1674
TESTS::
1675
1676
sage: C = CrystalOfLetters(['E',6], dual = True)
1677
sage: C.module_generators
1678
((6,),)
1679
sage: all(b==b.retract(b.lift()) for b in C)
1680
True
1681
sage: C.list()
1682
[(6,), (5, -6), (4, -5), (2, 3, -4), (3, -2), (1, 2, -3), (2, -1), (1, 4, -2, -3),
1683
(4, -1, -2), (1, 5, -4), (3, 5, -1, -4), (5, -3), (1, 6, -5), (3, 6, -1, -5), (4, 6, -3, -5),
1684
(2, 6, -4), (6, -2), (1, -6), (3, -1, -6), (4, -3, -6), (2, 5, -4, -6), (5, -2, -6), (2, -5),
1685
(4, -2, -5), (3, -4), (1, -3), (-1,)]
1686
sage: TestSuite(C).run()
1687
sage: all(b.f(i).e(i) == b for i in C.index_set() for b in C if b.f(i) is not None)
1688
True
1689
sage: all(b.e(i).f(i) == b for i in C.index_set() for b in C if b.e(i) is not None)
1690
True
1691
sage: G = C.digraph()
1692
sage: G.show(edge_labels=true, figsize=12, vertex_size=1)
1693
"""
1694
1695
def _repr_(self):
1696
"""
1697
In their full representation, the vertices of this crystal are labeled
1698
by their weight. For example vertex (-2,1) indicates that a 2-arrow
1699
is coming into this vertex, and a 1-arrow is leaving the vertex.
1700
Specifying the option element_print_style = 'compact' for a given crystal C,
1701
labels the vertices of this crystal by the 27 letters -ABCDEFGHIJKLMNOPQRSTUVWXYZ
1702
1703
EXAMPLES::
1704
1705
sage: C = CrystalOfLetters(['E',6], element_print_style = 'compact', dual = True)
1706
sage: C.list()
1707
[-, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z]
1708
"""
1709
if self._parent._element_print_style == 'compact':
1710
l=['-','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
1711
return l[self._parent.list().index(self)]
1712
return repr(self.value)
1713
1714
cpdef LetterTuple lift(self):
1715
"""
1716
Lift an element of ``self`` to the crystal of letters
1717
``CrystalOfLetters(['E',6])`` by taking its inverse weight.
1718
1719
EXAMPLES::
1720
1721
sage: C = CrystalOfLetters(['E',6], dual = True)
1722
sage: b = C.module_generators[0]
1723
sage: b.lift()
1724
(-6,)
1725
"""
1726
# Because a generators are not supported and the element constuctor
1727
# being a cached method can't take lists as input, we have to make a
1728
# tuple from a list
1729
return self._parent._ambient(tuple([-i for i in self.value]))
1730
1731
cpdef LetterTuple retract(self, LetterTuple p):
1732
"""
1733
Retract element ``p``, which is an element in
1734
``CrystalOfLetters(['E',6])`` to an element in
1735
``CrystalOfLetters(['E',6], dual=True)`` by taking its inverse weight.
1736
1737
EXAMPLES::
1738
1739
sage: C = CrystalOfLetters(['E',6])
1740
sage: Cd = CrystalOfLetters(['E',6], dual = True)
1741
sage: b = Cd.module_generators[0]
1742
sage: p = C((-1,3))
1743
sage: b.retract(p)
1744
(1, -3)
1745
sage: b.retract(None)
1746
"""
1747
if p is None:
1748
return None
1749
# Because a generators are not supported and the element constuctor
1750
# being a cached method can't take lists as input, we have to make a
1751
# tuple from a list
1752
return self._parent._element_constructor_(tuple([-i for i in p.value]))
1753
1754
cpdef LetterTuple e(self, int i):
1755
r"""
1756
Return the action of `e_i` on ``self``.
1757
1758
EXAMPLES::
1759
1760
sage: C = CrystalOfLetters(['E',6], dual = True)
1761
sage: C((-1,)).e(1)
1762
(1, -3)
1763
"""
1764
return self.retract(self.lift().f(i))
1765
1766
cpdef LetterTuple f(self, int i):
1767
r"""
1768
Return the action of `f_i` on ``self``.
1769
1770
EXAMPLES::
1771
1772
sage: C = CrystalOfLetters(['E',6], dual = True)
1773
sage: C((6,)).f(6)
1774
(5, -6)
1775
sage: C((6,)).f(1)
1776
"""
1777
return self.retract(self.lift().e(i))
1778
1779
def weight(self):
1780
"""
1781
Return the weight of ``self``.
1782
1783
EXAMPLES::
1784
1785
sage: C = CrystalOfLetters(['E',6], dual = True)
1786
sage: b=C.module_generators[0]
1787
sage: b.weight()
1788
(0, 0, 0, 0, 1, -1/3, -1/3, 1/3)
1789
sage: [v.weight() for v in C]
1790
[(0, 0, 0, 0, 1, -1/3, -1/3, 1/3),
1791
(0, 0, 0, 1, 0, -1/3, -1/3, 1/3),
1792
(0, 0, 1, 0, 0, -1/3, -1/3, 1/3),
1793
(0, 1, 0, 0, 0, -1/3, -1/3, 1/3),
1794
(-1, 0, 0, 0, 0, -1/3, -1/3, 1/3),
1795
(1, 0, 0, 0, 0, -1/3, -1/3, 1/3),
1796
(1/2, 1/2, 1/2, 1/2, 1/2, 1/6, 1/6, -1/6),
1797
(0, -1, 0, 0, 0, -1/3, -1/3, 1/3),
1798
(-1/2, -1/2, 1/2, 1/2, 1/2, 1/6, 1/6, -1/6),
1799
(0, 0, -1, 0, 0, -1/3, -1/3, 1/3),
1800
(-1/2, 1/2, -1/2, 1/2, 1/2, 1/6, 1/6, -1/6),
1801
(1/2, -1/2, -1/2, 1/2, 1/2, 1/6, 1/6, -1/6),
1802
(0, 0, 0, -1, 0, -1/3, -1/3, 1/3),
1803
(-1/2, 1/2, 1/2, -1/2, 1/2, 1/6, 1/6, -1/6),
1804
(1/2, -1/2, 1/2, -1/2, 1/2, 1/6, 1/6, -1/6),
1805
(1/2, 1/2, -1/2, -1/2, 1/2, 1/6, 1/6, -1/6),
1806
(-1/2, -1/2, -1/2, -1/2, 1/2, 1/6, 1/6, -1/6),
1807
(0, 0, 0, 0, -1, -1/3, -1/3, 1/3),
1808
(-1/2, 1/2, 1/2, 1/2, -1/2, 1/6, 1/6, -1/6),
1809
(1/2, -1/2, 1/2, 1/2, -1/2, 1/6, 1/6, -1/6),
1810
(1/2, 1/2, -1/2, 1/2, -1/2, 1/6, 1/6, -1/6),
1811
(-1/2, -1/2, -1/2, 1/2, -1/2, 1/6, 1/6, -1/6),
1812
(1/2, 1/2, 1/2, -1/2, -1/2, 1/6, 1/6, -1/6),
1813
(-1/2, -1/2, 1/2, -1/2, -1/2, 1/6, 1/6, -1/6),
1814
(-1/2, 1/2, -1/2, -1/2, -1/2, 1/6, 1/6, -1/6),
1815
(1/2, -1/2, -1/2, -1/2, -1/2, 1/6, 1/6, -1/6),
1816
(0, 0, 0, 0, 0, 2/3, 2/3, -2/3)]
1817
"""
1818
return -self.lift().weight()
1819
1820
1821
#########################
1822
# Type E7
1823
#########################
1824
1825
cdef class Crystal_of_letters_type_E7_element(LetterTuple):
1826
r"""
1827
Type `E_7` crystal of letters elements. This crystal corresponds to the highest weight
1828
crystal `B(\Lambda_7)`.
1829
1830
TESTS::
1831
1832
sage: C = CrystalOfLetters(['E',7])
1833
sage: C.module_generators
1834
((7,),)
1835
sage: C.list()
1836
[(7,), (-7, 6), (-6, 5), (-5, 4), (-4, 2, 3), (-2, 3), (-3, 1, 2), (-1,
1837
2), (-3, -2, 1, 4), (-1, -2, 4), (-4, 1, 5), (-4, -1, 3, 5), (-3, 5),
1838
(-5, 6, 1), (-5, -1, 3, 6), (-5, -3, 4, 6), (-4, 2, 6), (-2, 6), (-6, 7,
1839
1), (-1, -6, 3, 7), (-6, -3, 7, 4), (-6, -4, 2, 7, 5), (-6, -2, 7, 5),
1840
(-5, 7, 2), (-5, -2, 4, 7), (-4, 7, 3), (-3, 1, 7), (-1, 7), (-7, 1),
1841
(-1, -7, 3), (-7, -3, 4), (-4, -7, 2, 5), (-7, -2, 5), (-5, -7, 6, 2),
1842
(-5, -2, -7, 4, 6), (-7, -4, 6, 3), (-3, -7, 1, 6), (-7, -1, 6), (-6,
1843
2), (-2, -6, 4), (-6, -4, 5, 3), (-3, -6, 1, 5), (-6, -1, 5), (-5, 3),
1844
(-3, -5, 4, 1), (-5, -1, 4), (-4, 1, 2), (-1, -4, 3, 2), (-3, 2), (-2,
1845
-3, 4), (-4, 5), (-5, 6), (-6, 7), (-7,), (-2, 1), (-2, -1, 3)]
1846
sage: TestSuite(C).run()
1847
sage: all(b.f(i).e(i) == b for i in C.index_set() for b in C if b.f(i) is not None)
1848
True
1849
sage: all(b.e(i).f(i) == b for i in C.index_set() for b in C if b.e(i) is not None)
1850
True
1851
sage: G = C.digraph()
1852
sage: G.show(edge_labels=true, figsize=12, vertex_size=1)
1853
"""
1854
1855
def weight(self):
1856
"""
1857
Return the weight of ``self``.
1858
1859
EXAMPLES::
1860
1861
sage: [v.weight() for v in CrystalOfLetters(['E',7])]
1862
[(0, 0, 0, 0, 0, 1, -1/2, 1/2), (0, 0, 0, 0, 1, 0, -1/2, 1/2), (0, 0, 0,
1863
1, 0, 0, -1/2, 1/2), (0, 0, 1, 0, 0, 0, -1/2, 1/2), (0, 1, 0, 0, 0, 0,
1864
-1/2, 1/2), (-1, 0, 0, 0, 0, 0, -1/2, 1/2), (1, 0, 0, 0, 0, 0, -1/2,
1865
1/2), (1/2, 1/2, 1/2, 1/2, 1/2, 1/2, 0, 0), (0, -1, 0, 0, 0, 0, -1/2,
1866
1/2), (-1/2, -1/2, 1/2, 1/2, 1/2, 1/2, 0, 0), (0, 0, -1, 0, 0, 0, -1/2,
1867
1/2), (-1/2, 1/2, -1/2, 1/2, 1/2, 1/2, 0, 0), (1/2, -1/2, -1/2, 1/2,
1868
1/2, 1/2, 0, 0), (0, 0, 0, -1, 0, 0, -1/2, 1/2), (-1/2, 1/2, 1/2, -1/2,
1869
1/2, 1/2, 0, 0), (1/2, -1/2, 1/2, -1/2, 1/2, 1/2, 0, 0), (1/2, 1/2,
1870
-1/2, -1/2, 1/2, 1/2, 0, 0), (-1/2, -1/2, -1/2, -1/2, 1/2, 1/2, 0, 0),
1871
(0, 0, 0, 0, -1, 0, -1/2, 1/2), (-1/2, 1/2, 1/2, 1/2, -1/2, 1/2, 0, 0),
1872
(1/2, -1/2, 1/2, 1/2, -1/2, 1/2, 0, 0), (1/2, 1/2, -1/2, 1/2, -1/2, 1/2,
1873
0, 0), (-1/2, -1/2, -1/2, 1/2, -1/2, 1/2, 0, 0), (1/2, 1/2, 1/2, -1/2,
1874
-1/2, 1/2, 0, 0), (-1/2, -1/2, 1/2, -1/2, -1/2, 1/2, 0, 0), (-1/2, 1/2,
1875
-1/2, -1/2, -1/2, 1/2, 0, 0), (1/2, -1/2, -1/2, -1/2, -1/2, 1/2, 0, 0),
1876
(0, 0, 0, 0, 0, 1, 1/2, -1/2), (0, 0, 0, 0, 0, -1, -1/2, 1/2), (-1/2,
1877
1/2, 1/2, 1/2, 1/2, -1/2, 0, 0), (1/2, -1/2, 1/2, 1/2, 1/2, -1/2, 0, 0),
1878
(1/2, 1/2, -1/2, 1/2, 1/2, -1/2, 0, 0), (-1/2, -1/2, -1/2, 1/2, 1/2,
1879
-1/2, 0, 0), (1/2, 1/2, 1/2, -1/2, 1/2, -1/2, 0, 0), (-1/2, -1/2, 1/2,
1880
-1/2, 1/2, -1/2, 0, 0), (-1/2, 1/2, -1/2, -1/2, 1/2, -1/2, 0, 0), (1/2,
1881
-1/2, -1/2, -1/2, 1/2, -1/2, 0, 0), (0, 0, 0, 0, 1, 0, 1/2, -1/2), (1/2,
1882
1/2, 1/2, 1/2, -1/2, -1/2, 0, 0), (-1/2, -1/2, 1/2, 1/2, -1/2, -1/2, 0,
1883
0), (-1/2, 1/2, -1/2, 1/2, -1/2, -1/2, 0, 0), (1/2, -1/2, -1/2, 1/2,
1884
-1/2, -1/2, 0, 0), (0, 0, 0, 1, 0, 0, 1/2, -1/2), (-1/2, 1/2, 1/2, -1/2,
1885
-1/2, -1/2, 0, 0), (1/2, -1/2, 1/2, -1/2, -1/2, -1/2, 0, 0), (0, 0, 1,
1886
0, 0, 0, 1/2, -1/2), (1/2, 1/2, -1/2, -1/2, -1/2, -1/2, 0, 0), (0, 1, 0,
1887
0, 0, 0, 1/2, -1/2), (1, 0, 0, 0, 0, 0, 1/2, -1/2), (0, -1, 0, 0, 0, 0,
1888
1/2, -1/2), (0, 0, -1, 0, 0, 0, 1/2, -1/2), (0, 0, 0, -1, 0, 0, 1/2,
1889
-1/2), (0, 0, 0, 0, -1, 0, 1/2, -1/2), (0, 0, 0, 0, 0, -1, 1/2, -1/2),
1890
(-1/2, -1/2, -1/2, -1/2, -1/2, -1/2, 0, 0), (-1, 0, 0, 0, 0, 0, 1/2,
1891
-1/2)]
1892
"""
1893
R=self._parent.weight_lattice_realization().fundamental_weights()
1894
return sum(cmp(i,0)*R[abs(i)] for i in self.value)
1895
1896
cpdef LetterTuple e(self, int i):
1897
r"""
1898
Return the action of `e_i` on ``self``.
1899
1900
EXAMPLES::
1901
1902
sage: C = CrystalOfLetters(['E',7])
1903
sage: C((7,)).e(7)
1904
sage: C((-7,6)).e(7)
1905
(7,)
1906
"""
1907
if self.value == (-7, 6) and i == 7 :
1908
return self._parent._element_constructor_( (7,) )
1909
if self.value == (-6, 5) and i == 6 :
1910
return self._parent._element_constructor_( (-7, 6) )
1911
if self.value == (-5, 4) and i == 5 :
1912
return self._parent._element_constructor_( (-6, 5) )
1913
if self.value == (-4, 2, 3) and i == 4 :
1914
return self._parent._element_constructor_( (-5, 4) )
1915
if self.value == (-2, 3) and i == 2 :
1916
return self._parent._element_constructor_( (-4, 2, 3) )
1917
if self.value == (-3, 1, 2) and i == 3 :
1918
return self._parent._element_constructor_( (-4, 2, 3) )
1919
if self.value == (-3, -2, 1, 4) and i == 3 :
1920
return self._parent._element_constructor_( (-2, 3) )
1921
if self.value == (-1, 2) and i == 1 :
1922
return self._parent._element_constructor_( (-3, 1, 2) )
1923
if self.value == (-3, -2, 1, 4) and i == 2 :
1924
return self._parent._element_constructor_( (-3, 1, 2) )
1925
if self.value == (-1, -2, 4) and i == 1 :
1926
return self._parent._element_constructor_( (-3, -2, 1, 4) )
1927
if self.value == (-4, 1, 5) and i == 4 :
1928
return self._parent._element_constructor_( (-3, -2, 1, 4) )
1929
if self.value == (-7, 1) and i == 7 :
1930
return self._parent._element_constructor_( (-6, 7, 1) )
1931
if self.value == (-1, -6, 3, 7) and i == 1 :
1932
return self._parent._element_constructor_( (-6, 7, 1) )
1933
if self.value == (-1, -2, 4) and i == 2 :
1934
return self._parent._element_constructor_( (-1, 2) )
1935
if self.value == (-4, -1, 3, 5) and i == 4 :
1936
return self._parent._element_constructor_( (-1, -2, 4) )
1937
if self.value == (-4, -1, 3, 5) and i == 1 :
1938
return self._parent._element_constructor_( (-4, 1, 5) )
1939
if self.value == (-5, 6, 1) and i == 5 :
1940
return self._parent._element_constructor_( (-4, 1, 5) )
1941
if self.value == (-3, 5) and i == 3 :
1942
return self._parent._element_constructor_( (-4, -1, 3, 5) )
1943
if self.value == (-5, -1, 3, 6) and i == 5 :
1944
return self._parent._element_constructor_( (-4, -1, 3, 5) )
1945
if self.value == (-5, -3, 4, 6) and i == 5 :
1946
return self._parent._element_constructor_( (-3, 5) )
1947
if self.value == (-6, 7, 1) and i == 6 :
1948
return self._parent._element_constructor_( (-5, 6, 1) )
1949
if self.value == (-5, -1, 3, 6) and i == 1 :
1950
return self._parent._element_constructor_( (-5, 6, 1) )
1951
if self.value == (-5, -3, 4, 6) and i == 3 :
1952
return self._parent._element_constructor_( (-5, -1, 3, 6) )
1953
if self.value == (-1, -6, 3, 7) and i == 6 :
1954
return self._parent._element_constructor_( (-5, -1, 3, 6) )
1955
if self.value == (-4, 2, 6) and i == 4 :
1956
return self._parent._element_constructor_( (-5, -3, 4, 6) )
1957
if self.value == (-6, -3, 7, 4) and i == 6 :
1958
return self._parent._element_constructor_( (-5, -3, 4, 6) )
1959
if self.value == (-6, -2, 7, 5) and i == 6 :
1960
return self._parent._element_constructor_( (-2, 6) )
1961
if self.value == (-6, -3, 7, 4) and i == 3 :
1962
return self._parent._element_constructor_( (-1, -6, 3, 7) )
1963
if self.value == (-1, -7, 3) and i == 7 :
1964
return self._parent._element_constructor_( (-1, -6, 3, 7) )
1965
if self.value == (-7, -3, 4) and i == 7 :
1966
return self._parent._element_constructor_( (-6, -3, 7, 4) )
1967
if self.value == (-6, -4, 2, 7, 5) and i == 4 :
1968
return self._parent._element_constructor_( (-6, -3, 7, 4) )
1969
if self.value == (-2, 6) and i == 2 :
1970
return self._parent._element_constructor_( (-4, 2, 6) )
1971
if self.value == (-6, -4, 2, 7, 5) and i == 6 :
1972
return self._parent._element_constructor_( (-4, 2, 6) )
1973
if self.value == (-6, -2, 7, 5) and i == 2 :
1974
return self._parent._element_constructor_( (-6, -4, 2, 7, 5) )
1975
if self.value == (-4, -7, 2, 5) and i == 7 :
1976
return self._parent._element_constructor_( (-6, -4, 2, 7, 5) )
1977
if self.value == (-7, -4, 6, 3) and i == 7 :
1978
return self._parent._element_constructor_( (-4, 7, 3) )
1979
if self.value == (-3, 1, 7) and i == 3 :
1980
return self._parent._element_constructor_( (-4, 7, 3) )
1981
if self.value == (-1, 7) and i == 1 :
1982
return self._parent._element_constructor_( (-3, 1, 7) )
1983
if self.value == (-3, -7, 1, 6) and i == 7 :
1984
return self._parent._element_constructor_( (-3, 1, 7) )
1985
if self.value == (-1, -7, 3) and i == 1 :
1986
return self._parent._element_constructor_( (-7, 1) )
1987
if self.value == (-7, -2, 5) and i == 2 :
1988
return self._parent._element_constructor_( (-4, -7, 2, 5) )
1989
if self.value == (-5, -7, 6, 2) and i == 5 :
1990
return self._parent._element_constructor_( (-4, -7, 2, 5) )
1991
if self.value == (-5, -2, -7, 4, 6) and i == 5 :
1992
return self._parent._element_constructor_( (-7, -2, 5) )
1993
if self.value == (-5, -7, 6, 2) and i == 7 :
1994
return self._parent._element_constructor_( (-5, 7, 2) )
1995
if self.value == (-5, -2, 4, 7) and i == 2 :
1996
return self._parent._element_constructor_( (-5, 7, 2) )
1997
if self.value == (-7, -3, 4) and i == 3 :
1998
return self._parent._element_constructor_( (-1, -7, 3) )
1999
if self.value == (-5, 7, 2) and i == 5 :
2000
return self._parent._element_constructor_( (-6, -4, 2, 7, 5) )
2001
if self.value == (-6, 2) and i == 6 :
2002
return self._parent._element_constructor_( (-5, -7, 6, 2) )
2003
if self.value == (-5, -2, -7, 4, 6) and i == 2 :
2004
return self._parent._element_constructor_( (-5, -7, 6, 2) )
2005
if self.value == (-7, -2, 5) and i == 7 :
2006
return self._parent._element_constructor_( (-6, -2, 7, 5) )
2007
if self.value == (-5, -2, 4, 7) and i == 5 :
2008
return self._parent._element_constructor_( (-6, -2, 7, 5) )
2009
if self.value == (-4, 7, 3) and i == 4 :
2010
return self._parent._element_constructor_( (-5, -2, 4, 7) )
2011
if self.value == (-5, -2, -7, 4, 6) and i == 7 :
2012
return self._parent._element_constructor_( (-5, -2, 4, 7) )
2013
if self.value == (-4, -7, 2, 5) and i == 4 :
2014
return self._parent._element_constructor_( (-7, -3, 4) )
2015
if self.value == (-7, -4, 6, 3) and i == 4 :
2016
return self._parent._element_constructor_( (-5, -2, -7, 4, 6) )
2017
if self.value == (-2, -6, 4) and i == 6 :
2018
return self._parent._element_constructor_( (-5, -2, -7, 4, 6) )
2019
if self.value == (-6, -4, 5, 3) and i == 6 :
2020
return self._parent._element_constructor_( (-7, -4, 6, 3) )
2021
if self.value == (-3, -7, 1, 6) and i == 3 :
2022
return self._parent._element_constructor_( (-7, -4, 6, 3) )
2023
if self.value == (-3, -6, 1, 5) and i == 6 :
2024
return self._parent._element_constructor_( (-3, -7, 1, 6) )
2025
if self.value == (-6, -1, 5) and i == 6 :
2026
return self._parent._element_constructor_( (-7, -1, 6) )
2027
if self.value == (-2, -6, 4) and i == 2 :
2028
return self._parent._element_constructor_( (-6, 2) )
2029
if self.value == (-6, -4, 5, 3) and i == 4 :
2030
return self._parent._element_constructor_( (-2, -6, 4) )
2031
if self.value == (-7, -1, 6) and i == 1 :
2032
return self._parent._element_constructor_( (-3, -7, 1, 6) )
2033
if self.value == (-5, 3) and i == 5 :
2034
return self._parent._element_constructor_( (-6, -4, 5, 3) )
2035
if self.value == (-3, -6, 1, 5) and i == 3 :
2036
return self._parent._element_constructor_( (-6, -4, 5, 3) )
2037
if self.value == (-6, -1, 5) and i == 1 :
2038
return self._parent._element_constructor_( (-3, -6, 1, 5) )
2039
if self.value == (-3, -5, 4, 1) and i == 5 :
2040
return self._parent._element_constructor_( (-3, -6, 1, 5) )
2041
if self.value == (-5, -1, 4) and i == 5 :
2042
return self._parent._element_constructor_( (-6, -1, 5) )
2043
if self.value == (-3, -5, 4, 1) and i == 3 :
2044
return self._parent._element_constructor_( (-5, 3) )
2045
if self.value == (-4, 1, 2) and i == 4 :
2046
return self._parent._element_constructor_( (-3, -5, 4, 1) )
2047
if self.value == (-5, -1, 4) and i == 1 :
2048
return self._parent._element_constructor_( (-3, -5, 4, 1) )
2049
if self.value == (-1, -4, 3, 2) and i == 4 :
2050
return self._parent._element_constructor_( (-5, -1, 4) )
2051
if self.value == (-1, -4, 3, 2) and i == 1 :
2052
return self._parent._element_constructor_( (-4, 1, 2) )
2053
if self.value == (-2, 1) and i == 2 :
2054
return self._parent._element_constructor_( (-4, 1, 2) )
2055
if self.value == (-3, 2) and i == 3 :
2056
return self._parent._element_constructor_( (-1, -4, 3, 2) )
2057
if self.value == (-2, -1, 3) and i == 2 :
2058
return self._parent._element_constructor_( (-1, -4, 3, 2) )
2059
if self.value == (-2, -1, 3) and i == 1 :
2060
return self._parent._element_constructor_( (-2, 1) )
2061
if self.value == (-7, -1, 6) and i == 7 :
2062
return self._parent._element_constructor_( (-1, 7) )
2063
if self.value == (-2, -3, 4) and i == 3 :
2064
return self._parent._element_constructor_( (-2, -1, 3) )
2065
if self.value == (-2, -3, 4) and i == 2 :
2066
return self._parent._element_constructor_( (-3, 2) )
2067
if self.value == (-4, 5) and i == 4 :
2068
return self._parent._element_constructor_( (-2, -3, 4) )
2069
if self.value == (-5, 6) and i == 5 :
2070
return self._parent._element_constructor_( (-4, 5) )
2071
if self.value == (-6, 7) and i == 6 :
2072
return self._parent._element_constructor_( (-5, 6) )
2073
if self.value == (-7,) and i == 7 :
2074
return self._parent._element_constructor_( (-6, 7) )
2075
else:
2076
return None
2077
2078
cpdef LetterTuple f(self, int i):
2079
r"""
2080
Return the action of `f_i` on ``self``.
2081
2082
EXAMPLES::
2083
2084
sage: C = CrystalOfLetters(['E',7])
2085
sage: C((-7,)).f(7)
2086
sage: C((7,)).f(7)
2087
(-7, 6)
2088
"""
2089
if self.value == (7,) and i == 7 :
2090
return self._parent._element_constructor_( (-7, 6) )
2091
if self.value == (-7, 6) and i == 6 :
2092
return self._parent._element_constructor_( (-6, 5) )
2093
if self.value == (-6, 5) and i == 5 :
2094
return self._parent._element_constructor_( (-5, 4) )
2095
if self.value == (-5, 4) and i == 4 :
2096
return self._parent._element_constructor_( (-4, 2, 3) )
2097
if self.value == (-4, 2, 3) and i == 2 :
2098
return self._parent._element_constructor_( (-2, 3) )
2099
if self.value == (-4, 2, 3) and i == 3 :
2100
return self._parent._element_constructor_( (-3, 1, 2) )
2101
if self.value == (-2, 3) and i == 3 :
2102
return self._parent._element_constructor_( (-3, -2, 1, 4) )
2103
if self.value == (-3, 1, 2) and i == 1 :
2104
return self._parent._element_constructor_( (-1, 2) )
2105
if self.value == (-3, 1, 2) and i == 2 :
2106
return self._parent._element_constructor_( (-3, -2, 1, 4) )
2107
if self.value == (-3, -2, 1, 4) and i == 1 :
2108
return self._parent._element_constructor_( (-1, -2, 4) )
2109
if self.value == (-3, -2, 1, 4) and i == 4 :
2110
return self._parent._element_constructor_( (-4, 1, 5) )
2111
if self.value == (-6, 7, 1) and i == 7 :
2112
return self._parent._element_constructor_( (-7, 1) )
2113
if self.value == (-6, 7, 1) and i == 1 :
2114
return self._parent._element_constructor_( (-1, -6, 3, 7) )
2115
if self.value == (-1, 2) and i == 2 :
2116
return self._parent._element_constructor_( (-1, -2, 4) )
2117
if self.value == (-1, -2, 4) and i == 4 :
2118
return self._parent._element_constructor_( (-4, -1, 3, 5) )
2119
if self.value == (-4, 1, 5) and i == 1 :
2120
return self._parent._element_constructor_( (-4, -1, 3, 5) )
2121
if self.value == (-4, 1, 5) and i == 5 :
2122
return self._parent._element_constructor_( (-5, 6, 1) )
2123
if self.value == (-4, -1, 3, 5) and i == 3 :
2124
return self._parent._element_constructor_( (-3, 5) )
2125
if self.value == (-4, -1, 3, 5) and i == 5 :
2126
return self._parent._element_constructor_( (-5, -1, 3, 6) )
2127
if self.value == (-3, 5) and i == 5 :
2128
return self._parent._element_constructor_( (-5, -3, 4, 6) )
2129
if self.value == (-5, 6, 1) and i == 6 :
2130
return self._parent._element_constructor_( (-6, 7, 1) )
2131
if self.value == (-5, 6, 1) and i == 1 :
2132
return self._parent._element_constructor_( (-5, -1, 3, 6) )
2133
if self.value == (-5, -1, 3, 6) and i == 3 :
2134
return self._parent._element_constructor_( (-5, -3, 4, 6) )
2135
if self.value == (-5, -1, 3, 6) and i == 6 :
2136
return self._parent._element_constructor_( (-1, -6, 3, 7) )
2137
if self.value == (-5, -3, 4, 6) and i == 4 :
2138
return self._parent._element_constructor_( (-4, 2, 6) )
2139
if self.value == (-5, -3, 4, 6) and i == 6 :
2140
return self._parent._element_constructor_( (-6, -3, 7, 4) )
2141
if self.value == (-2, 6) and i == 6 :
2142
return self._parent._element_constructor_( (-6, -2, 7, 5) )
2143
if self.value == (-1, -6, 3, 7) and i == 3 :
2144
return self._parent._element_constructor_( (-6, -3, 7, 4) )
2145
if self.value == (-1, -6, 3, 7) and i == 7 :
2146
return self._parent._element_constructor_( (-1, -7, 3) )
2147
if self.value == (-6, -3, 7, 4) and i == 7 :
2148
return self._parent._element_constructor_( (-7, -3, 4) )
2149
if self.value == (-6, -3, 7, 4) and i == 4 :
2150
return self._parent._element_constructor_( (-6, -4, 2, 7, 5) )
2151
if self.value == (-4, 2, 6) and i == 2 :
2152
return self._parent._element_constructor_( (-2, 6) )
2153
if self.value == (-4, 2, 6) and i == 6 :
2154
return self._parent._element_constructor_( (-6, -4, 2, 7, 5) )
2155
if self.value == (-6, -4, 2, 7, 5) and i == 2 :
2156
return self._parent._element_constructor_( (-6, -2, 7, 5) )
2157
if self.value == (-6, -4, 2, 7, 5) and i == 7 :
2158
return self._parent._element_constructor_( (-4, -7, 2, 5) )
2159
if self.value == (-4, 7, 3) and i == 7 :
2160
return self._parent._element_constructor_( (-7, -4, 6, 3) )
2161
if self.value == (-4, 7, 3) and i == 3 :
2162
return self._parent._element_constructor_( (-3, 1, 7) )
2163
if self.value == (-3, 1, 7) and i == 1 :
2164
return self._parent._element_constructor_( (-1, 7) )
2165
if self.value == (-3, 1, 7) and i == 7 :
2166
return self._parent._element_constructor_( (-3, -7, 1, 6) )
2167
if self.value == (-7, 1) and i == 1 :
2168
return self._parent._element_constructor_( (-1, -7, 3) )
2169
if self.value == (-4, -7, 2, 5) and i == 2 :
2170
return self._parent._element_constructor_( (-7, -2, 5) )
2171
if self.value == (-4, -7, 2, 5) and i == 5 :
2172
return self._parent._element_constructor_( (-5, -7, 6, 2) )
2173
if self.value == (-7, -2, 5) and i == 5 :
2174
return self._parent._element_constructor_( (-5, -2, -7, 4, 6) )
2175
if self.value == (-5, 7, 2) and i == 7 :
2176
return self._parent._element_constructor_( (-5, -7, 6, 2) )
2177
if self.value == (-5, 7, 2) and i == 2 :
2178
return self._parent._element_constructor_( (-5, -2, 4, 7) )
2179
if self.value == (-1, -7, 3) and i == 3 :
2180
return self._parent._element_constructor_( (-7, -3, 4) )
2181
if self.value == (-6, -4, 2, 7, 5) and i == 5 :
2182
return self._parent._element_constructor_( (-5, 7, 2) )
2183
if self.value == (-5, -7, 6, 2) and i == 6 :
2184
return self._parent._element_constructor_( (-6, 2) )
2185
if self.value == (-5, -7, 6, 2) and i == 2 :
2186
return self._parent._element_constructor_( (-5, -2, -7, 4, 6) )
2187
if self.value == (-6, -2, 7, 5) and i == 7 :
2188
return self._parent._element_constructor_( (-7, -2, 5) )
2189
if self.value == (-6, -2, 7, 5) and i == 5 :
2190
return self._parent._element_constructor_( (-5, -2, 4, 7) )
2191
if self.value == (-5, -2, 4, 7) and i == 4 :
2192
return self._parent._element_constructor_( (-4, 7, 3) )
2193
if self.value == (-5, -2, 4, 7) and i == 7 :
2194
return self._parent._element_constructor_( (-5, -2, -7, 4, 6) )
2195
if self.value == (-7, -3, 4) and i == 4 :
2196
return self._parent._element_constructor_( (-4, -7, 2, 5) )
2197
if self.value == (-5, -2, -7, 4, 6) and i == 4 :
2198
return self._parent._element_constructor_( (-7, -4, 6, 3) )
2199
if self.value == (-5, -2, -7, 4, 6) and i == 6 :
2200
return self._parent._element_constructor_( (-2, -6, 4) )
2201
if self.value == (-7, -4, 6, 3) and i == 6 :
2202
return self._parent._element_constructor_( (-6, -4, 5, 3) )
2203
if self.value == (-7, -4, 6, 3) and i == 3 :
2204
return self._parent._element_constructor_( (-3, -7, 1, 6) )
2205
if self.value == (-3, -7, 1, 6) and i == 6 :
2206
return self._parent._element_constructor_( (-3, -6, 1, 5) )
2207
if self.value == (-7, -1, 6) and i == 6 :
2208
return self._parent._element_constructor_( (-6, -1, 5) )
2209
if self.value == (-6, 2) and i == 2 :
2210
return self._parent._element_constructor_( (-2, -6, 4) )
2211
if self.value == (-2, -6, 4) and i == 4 :
2212
return self._parent._element_constructor_( (-6, -4, 5, 3) )
2213
if self.value == (-3, -7, 1, 6) and i == 1 :
2214
return self._parent._element_constructor_( (-7, -1, 6) )
2215
if self.value == (-6, -4, 5, 3) and i == 5 :
2216
return self._parent._element_constructor_( (-5, 3) )
2217
if self.value == (-6, -4, 5, 3) and i == 3 :
2218
return self._parent._element_constructor_( (-3, -6, 1, 5) )
2219
if self.value == (-3, -6, 1, 5) and i == 1 :
2220
return self._parent._element_constructor_( (-6, -1, 5) )
2221
if self.value == (-3, -6, 1, 5) and i == 5 :
2222
return self._parent._element_constructor_( (-3, -5, 4, 1) )
2223
if self.value == (-6, -1, 5) and i == 5 :
2224
return self._parent._element_constructor_( (-5, -1, 4) )
2225
if self.value == (-5, 3) and i == 3 :
2226
return self._parent._element_constructor_( (-3, -5, 4, 1) )
2227
if self.value == (-3, -5, 4, 1) and i == 4 :
2228
return self._parent._element_constructor_( (-4, 1, 2) )
2229
if self.value == (-3, -5, 4, 1) and i == 1 :
2230
return self._parent._element_constructor_( (-5, -1, 4) )
2231
if self.value == (-5, -1, 4) and i == 4 :
2232
return self._parent._element_constructor_( (-1, -4, 3, 2) )
2233
if self.value == (-4, 1, 2) and i == 1 :
2234
return self._parent._element_constructor_( (-1, -4, 3, 2) )
2235
if self.value == (-4, 1, 2) and i == 2 :
2236
return self._parent._element_constructor_( (-2, 1) )
2237
if self.value == (-1, -4, 3, 2) and i == 3 :
2238
return self._parent._element_constructor_( (-3, 2) )
2239
if self.value == (-1, -4, 3, 2) and i == 2 :
2240
return self._parent._element_constructor_( (-2, -1, 3) )
2241
if self.value == (-2, 1) and i == 1 :
2242
return self._parent._element_constructor_( (-2, -1, 3) )
2243
if self.value == (-1, 7) and i == 7 :
2244
return self._parent._element_constructor_( (-7, -1, 6) )
2245
if self.value == (-2, -1, 3) and i == 3 :
2246
return self._parent._element_constructor_( (-2, -3, 4) )
2247
if self.value == (-3, 2) and i == 2 :
2248
return self._parent._element_constructor_( (-2, -3, 4) )
2249
if self.value == (-2, -3, 4) and i == 4 :
2250
return self._parent._element_constructor_( (-4, 5) )
2251
if self.value == (-4, 5) and i == 5 :
2252
return self._parent._element_constructor_( (-5, 6) )
2253
if self.value == (-5, 6) and i == 6 :
2254
return self._parent._element_constructor_( (-6, 7) )
2255
if self.value == (-6, 7) and i == 7 :
2256
return self._parent._element_constructor_( (-7,) )
2257
else:
2258
return None
2259
2260
2261