Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/combinat/crystals/infinity_crystals.py
8817 views
1
r"""
2
`\mathcal{B}(\infty)` Crystals of Tableaux in Nonexceptional Types and `G_2`
3
4
A tableau model for `\mathcal{B}(\infty)`. For more information, see
5
:class:`InfinityCrystalOfTableaux`.
6
7
AUTHORS:
8
9
- Ben Salisbury: Initial version
10
11
- Travis Scrimshaw: Initial version
12
"""
13
14
#*****************************************************************************
15
# Copyright (C) 2013 Ben Salisbury <bsalisbury1 at gmail.com>
16
# Travis Scrimshaw <tscrim at ucdavis.edu>
17
#
18
# Distributed under the terms of the GNU General Public License (GPL)
19
#
20
# This code is distributed in the hope that it will be useful,
21
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
# General Public License for more details.
24
#
25
# The full text of the GPL is available at:
26
#
27
# http://www.gnu.org/licenses/
28
#****************************************************************************
29
30
from sage.structure.parent import Parent
31
from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
32
from sage.categories.highest_weight_crystals import HighestWeightCrystals
33
from sage.misc.cachefunc import cached_method
34
from sage.misc.flatten import flatten
35
from sage.rings.infinity import Infinity
36
37
from sage.combinat.partition import Partition
38
from sage.combinat.root_system.cartan_type import CartanType
39
from sage.combinat.crystals.letters import CrystalOfLetters
40
from sage.combinat.crystals.tensor_product import CrystalOfWords, CrystalOfTableauxElement
41
42
class InfinityCrystalOfTableaux(CrystalOfWords):
43
r"""
44
`\mathcal{B}(\infty)` crystal of tableaux.
45
46
A tableaux model `\mathcal{T}(\infty)` for the crystal
47
`\mathcal{B}(\infty)` is introduced by Hong and Lee in [HL08]_. This model
48
is currently valid for types `A_n`, `B_n`, `C_n`, `D_n`, and `G_2`, and
49
builds on the tableaux model given by Kashiwara and Nakashima [KN94]_ in
50
types `A_n`, `B_n`, `C_n`, and `D_n`, and by Kang and Misra [KM94]_ in
51
type `G_2`.
52
53
.. NOTE::
54
55
We are using the English convention for our tableaux.
56
57
We say a tableau `T` is *marginally large* if:
58
59
- for each `1 \leq i \leq n`, the leftmost box in the `i`-th row
60
from the top in `T` is an `i`-box,
61
62
- for each `1 \leq i \leq n`, the number of `i`-boxes in the `i`-th row
63
from the top in `T` is greater than the total number of boxes in the
64
`(i+1)`-th row by exactly one.
65
66
We now will describe this tableaux model type-by-type.
67
68
.. rubric:: Type `A_n`
69
70
`\mathcal{T}(\infty)` is the set of marginally large semistandard
71
tableaux with exactly `n` rows over the alphabet `\{1 \prec 2 \prec
72
\cdots \prec n+1 \}`.
73
74
.. rubric:: Type `B_n`
75
76
`\mathcal{T}(\infty)` is the set of marginally large semistandard
77
tableaux with exactly `n` rows over the alphabet `\{1 \prec \cdots
78
\prec n \prec 0 \prec \overline{n} \prec \cdots \prec \overline{1} \}`
79
and subject to the following constraints:
80
81
- for each `1 \le i \le n`, the contents of the boxes in the
82
`i`-th row are `\preceq \overline{i}`,
83
84
- the entry `0` can appear at most once in a single row.
85
86
.. rubric:: Type `C_n`
87
88
`\mathcal{T}(\infty)` is the set of marginally large semistandard
89
tableaux with exactly `n` rows over the alphabet `\{1 \prec \cdots
90
\prec n \prec \overline{n} \prec \cdots \prec \overline{1} \}` and
91
for each `1 \leq i \leq n`, the contents of the boxes in the `i`-th
92
row are `\preceq \overline{i}`.
93
94
.. rubric:: Type `D_n`
95
96
`\mathcal{T}(\infty)` is the set of marginally large semistandard
97
tableaux with exactly `n-1` rows over the alphabet `\{1 \prec \cdots
98
\prec n, \overline{n} \prec \cdots \prec \overline{1} \}` and subject
99
to the following constaints:
100
101
- for each `1 \le i \le n`, the contents of the boxes in the `i`-th
102
row are `\preceq \overline{i}`,
103
104
- the entries `n` and `\overline{n}` may not appear simultaneously in
105
a single row.
106
107
.. rubric:: Type `G_2`
108
109
`\mathcal{T}(\infty)` is the set of marginally large semistandard
110
tableaux with exactly `2` rows over the ordered alphabet `\{1 \prec
111
2 \prec 3 \prec 0 \prec \overline{3} \prec \overline{2} \prec
112
\overline{1}\}` and subject to the following constraints:
113
114
- the contents of the boxes in the first row are `\preceq \overline{i}`,
115
116
- the contents of the boxes in the second row are `\preceq 3`,
117
118
- the entry `0` can appear at most once in the first row and not at
119
all in the second row.
120
121
In particular, the shape of the tableaux is not fixed in any instance of
122
`\mathcal{T}(\infty)`; the row lengths of a tableau can be arbitrarily long.
123
124
REFERENCES:
125
126
.. [BN10] D. Bump and M. Nakasuji.
127
Integration on `p`-adic groups and crystal bases.
128
Proc. Amer. Math. Soc. 138(5), pp. 1595--1605.
129
130
.. [LS12] K.-H. Lee and B. Salisbury.
131
Young tableaux, canonical bases, and the Gindikin-Karpelevich formula.
132
:arXiv:`1205.6006`.
133
134
.. [HL08] J. Hong and H. Lee.
135
Young tableaux and crystal `B(\infty)` for finite simple Lie algebras.
136
J. Algebra 320, pp. 3680--3693, 2008.
137
138
.. [KM94] S.-J. Kang and K. C. Misra.
139
Crystal bases and tensor product decompositions of `U_q(G_2)`-modules.
140
J. Algebra 163, pp. 675--691, 1994.
141
142
INPUT:
143
144
- ``cartan_type`` -- One of ``['A',n]``, ``['B',n]``, ``['C',n]``,
145
``['D',n]``, or ``['G',2]``, where ``n`` is a positive integer
146
147
EXAMPLES::
148
149
sage: B = InfinityCrystalOfTableaux(['A',2])
150
sage: b = B.highest_weight_vector(); b.pp()
151
1 1
152
2
153
sage: b.f_string([2,1,1,2,2,2]).pp()
154
1 1 1 1 1 2 3
155
2 3 3 3
156
157
sage: B = InfinityCrystalOfTableaux(['G',2])
158
sage: b = B(rows=[[1,1,1,1,1,2,3,3,0,-3,-1,-1,-1],[2,3,3,3]])
159
sage: b.e_string([2,1,1,1,1,1,1]).pp()
160
1 1 1 1 2 3 3 3 3 -2 -2 -2
161
2 3 3
162
sage: b.e_string([2,1,1,1,1,1,1,1])
163
164
We check that a few classical crystals embed into `\mathcal{T}(\infty)`::
165
166
sage: def crystal_test(B, C):
167
....: g = {C.module_generators[0] : B.module_generators[0]}
168
....: f = C.crystal_morphism(g)
169
....: G = B.digraph(subset=[f(x) for x in C])
170
....: return G.is_isomorphic(C.digraph(), edge_labels=True)
171
sage: B = InfinityCrystalOfTableaux(['A',2])
172
sage: C = CrystalOfTableaux(['A',2], shape=[2,1])
173
sage: crystal_test(B, C)
174
True
175
sage: C = CrystalOfTableaux(['A',2], shape=[6,2])
176
sage: crystal_test(B, C)
177
True
178
sage: B = InfinityCrystalOfTableaux(['B',2])
179
sage: C = CrystalOfTableaux(['B',2], shape=[3])
180
sage: crystal_test(B, C)
181
True
182
sage: C = CrystalOfTableaux(['B',2], shape=[2,1])
183
sage: crystal_test(B, C)
184
True
185
sage: B = InfinityCrystalOfTableaux(['C',3])
186
sage: C = CrystalOfTableaux(['C',3], shape=[2,1])
187
sage: crystal_test(B, C)
188
True
189
sage: B = InfinityCrystalOfTableaux(['D',4])
190
sage: C = CrystalOfTableaux(['D',4], shape=[2])
191
sage: crystal_test(B, C)
192
True
193
sage: C = CrystalOfTableaux(['D',4], shape=[1,1,1,1])
194
sage: crystal_test(B, C)
195
True
196
sage: B = InfinityCrystalOfTableaux(['G',2])
197
sage: C = CrystalOfTableaux(['G',2], shape=[3])
198
sage: crystal_test(B, C)
199
True
200
"""
201
@staticmethod
202
def __classcall_private__(cls, cartan_type):
203
"""
204
Normalize input to ensure a unique representation.
205
206
EXAMPLES::
207
208
sage: B = InfinityCrystalOfTableaux(['A',4])
209
sage: B2 = InfinityCrystalOfTableaux(CartanType(['A',4]))
210
sage: B is B2
211
True
212
"""
213
cartan_type = CartanType(cartan_type)
214
if cartan_type.type() == 'D':
215
return InfinityCrystalOfTableauxTypeD(cartan_type)
216
return super(InfinityCrystalOfTableaux, cls).__classcall__(cls, cartan_type)
217
218
def __init__(self, cartan_type):
219
"""
220
Initialize ``self``.
221
222
EXAMPLES::
223
224
sage: B = InfinityCrystalOfTableaux(['A',2])
225
sage: TestSuite(B).run() # long time
226
"""
227
Parent.__init__( self, category=(HighestWeightCrystals(), InfiniteEnumeratedSets()) )
228
self._cartan_type = cartan_type
229
self.letters = CrystalOfLetters(cartan_type)
230
self.module_generators = (self.module_generator(),)
231
232
def _repr_(self):
233
"""
234
Return a string representation of ``self``.
235
236
EXAMPLES::
237
238
sage: B = InfinityCrystalOfTableaux(['A',4]); B
239
The infinity crystal of tableaux of type ['A', 4]
240
"""
241
return "The infinity crystal of tableaux of type %s"%self._cartan_type
242
243
@cached_method
244
def module_generator(self):
245
"""
246
Return the module generator (or highest weight element) of ``self``.
247
248
The module generator is the unique tableau of shape `(n, n-1, \ldots,
249
2, 1)` with weight `0`.
250
251
EXAMPLES::
252
253
sage: T = InfinityCrystalOfTableaux(['A',3])
254
sage: T.module_generator()
255
[[1, 1, 1], [2, 2], [3]]
256
"""
257
n = self._cartan_type.rank()
258
p = Partition([x for x in reversed(range(1, n+1))])
259
# The column canonical tableau, read by columns
260
module_generator = flatten([[p[j]-i for i in range(p[j])] for j in range(n)])
261
return self(list=[self.letters(x) for x in module_generator])
262
263
def _element_constructor_(self, *args, **options):
264
"""
265
Construct an element of ``self`` from the input data.
266
267
EXAMPLES::
268
269
sage: T = CrystalOfTableaux(['A',3], shape = [2,2])
270
sage: T(rows=[[1,2],[3,4]])
271
[[1, 2], [3, 4]]
272
sage: T(columns=[[3,1],[4,2]])
273
[[1, 2], [3, 4]]
274
"""
275
return self.element_class(self, *args, **options)
276
277
class Element(CrystalOfTableauxElement):
278
r"""
279
Elements in `\mathcal{B}(\infty)` crystal of tableaux.
280
"""
281
282
def e(self,i):
283
r"""
284
Return the action of `\widetilde{e}_i` on ``self``.
285
286
INPUT:
287
288
- ``i`` -- An element of the index set
289
290
EXAMPLES::
291
292
sage: B = InfinityCrystalOfTableaux(['B',3])
293
sage: b = B(rows=[[1,1,1,1,1,1,1,2,0,-3,-1,-1,-1,-1],[2,2,2,2,-2,-2],[3,-3,-3]])
294
sage: b.e(3).pp()
295
1 1 1 1 1 1 1 2 0 -3 -1 -1 -1 -1
296
2 2 2 2 -2 -2
297
3 0 -3
298
sage: b.e(1).pp()
299
1 1 1 1 1 1 1 0 -3 -1 -1 -1 -1
300
2 2 2 2 -2 -2
301
3 -3 -3
302
"""
303
if i not in self.index_set():
304
raise ValueError('i is not in the index set.')
305
position = self.positions_of_unmatched_plus(i)
306
if position == []:
307
return None
308
k = position[0]
309
ret = self.set_index(k, self[k].e(i))
310
if k+i > len(self):
311
return ret
312
for j in reversed(range(1, i+1)):
313
if ret[k+i-j].value != j:
314
return ret
315
# We've found a column, so we need to remove it
316
for j in range(i):
317
ret._list.pop(k)
318
return ret
319
320
def f(self, i):
321
r"""
322
Return the action of `\widetilde{f}_i` on ``self``.
323
324
INPUT:
325
326
- ``i`` -- An element of the index set
327
328
EXAMPLES::
329
330
sage: B = InfinityCrystalOfTableaux(['C',4])
331
sage: b = B.highest_weight_vector()
332
sage: b.f(1).pp()
333
1 1 1 1 2
334
2 2 2
335
3 3
336
4
337
sage: b.f(3).pp()
338
1 1 1 1 1
339
2 2 2 2
340
3 3 4
341
4
342
sage: b.f(3).f(4).pp()
343
1 1 1 1 1
344
2 2 2 2
345
3 3 -4
346
4
347
"""
348
if i not in self.index_set():
349
raise ValueError('i is not in the index set.')
350
position = self.positions_of_unmatched_minus(i)
351
if position == []:
352
return None
353
k = position[len(position)-1]
354
ret = self.set_index(k, self[k].f(i))
355
if k+i > len(self):
356
return ret
357
for j in reversed(range(1,i+1)):
358
if self[k+i-j].value != j:
359
return ret
360
# We've found a full column, so we'll need to add a new column
361
for j in range(i):
362
ret._list.insert(k,self.parent().letters(j+1))
363
return ret
364
365
def phi(self,i):
366
r"""
367
Return `\varphi_i` of ``self``.
368
369
Let `T \in \mathcal{B}(\infty)` Define `\varphi_i(T) :=
370
\varepsilon_i(T) + \langle h_i, \mathrm{wt}(T) \rangle`, where `h_i`
371
is the `i`-th simple coroot and `\mathrm{wt}(T)` is the :meth:`weight`
372
of `T`.
373
374
INPUT:
375
376
- ``i`` -- An element of the index set
377
378
EXAMPLES::
379
380
sage: B = InfinityCrystalOfTableaux("A3")
381
sage: [B.highest_weight_vector().f_string([1,3,2,3,1,3,2,1]).phi(i) for i in B.index_set()]
382
[-3, 4, -3]
383
384
sage: B = InfinityCrystalOfTableaux("G2")
385
sage: [B.highest_weight_vector().f_string([2,2,1,2,1,1,1,2]).phi(i) for i in B.index_set()]
386
[5, -3]
387
"""
388
P = self.parent().weight_lattice_realization()
389
h = P.simple_coroots()
390
return self.epsilon(i) + P(self.weight()).scalar(h[i])
391
392
@cached_method
393
def weight(self):
394
r"""
395
Return the weight of ``self``.
396
397
From the definition of a crystal and that the highest weight
398
element `b_{\infty}` of `\mathcal{B}(\infty)` is `0`, the weight of
399
`T \in \mathcal{B}(\infty)` can be defined as `\mathrm{wt}(T)
400
:= -\sum_j \alpha_{i_j}` where `\widetilde{e}_{i_1} \cdots
401
\widetilde{e}_{i_{\ell}} T = b_{\infty}` and `\{\alpha_i\}` is the
402
set of simple roots. (Note that the weight is independent of the
403
path chosen to get to the highest weight.)
404
405
However we can also take advantage of the fact that
406
`\rho \colon R_{\lambda} \otimes \mathcal{B}(\infty) \longrightarrow
407
B(\lambda)`, where `\lambda` is the shape of `T`, preserves the
408
tableau representation of `T`. Therefore
409
410
.. MATH::
411
412
\mathrm{wt}(T) = \mathrm{wt}\bigl( \rho(T) \bigr) - \lambda
413
414
where `\mathrm{wt}\bigl( \rho(T) \bigr)` is just the usual weight of
415
the tableau `T`.
416
417
Let `\Lambda_i` be the `i`-th fundamental weight. In type `D`, the
418
height `n-1` columns corresponds to `\Lambda_{n-1} + \Lambda_n` and
419
the in type `B`, the height `n` columns corresponds to
420
`2 \Lambda_n`.
421
422
EXAMPLES::
423
424
sage: B = InfinityCrystalOfTableaux("C7")
425
sage: b = B.highest_weight_vector().f_string([1,6,4,7,4,2,4,6,2,4,6,7,1,2,4,7])
426
sage: b.weight()
427
(-2, -1, 3, -5, 5, -3, -3)
428
429
Check that the definitions agree::
430
431
sage: P = B.weight_lattice_realization()
432
sage: alpha = P.simple_roots()
433
sage: b.weight() == -2*alpha[1] - 3*alpha[2] - 5*alpha[4] - 3*alpha[6] - 3*alpha[7]
434
True
435
436
Check that it works for type `B`::
437
438
sage: B = InfinityCrystalOfTableaux("B2")
439
sage: B.highest_weight_vector().weight()
440
(0, 0)
441
sage: b = B.highest_weight_vector().f_string([1,2,2,2,1,2])
442
sage: P = B.weight_lattice_realization()
443
sage: alpha = P.simple_roots()
444
sage: b.weight() == -2*alpha[1] - 4*alpha[2]
445
True
446
447
Check that it works for type `D`::
448
449
sage: B = InfinityCrystalOfTableaux("D4")
450
sage: B.highest_weight_vector().weight()
451
(0, 0, 0, 0)
452
sage: b = B.highest_weight_vector().f_string([1,4,4,2,4,3,2,4,1,3,2,4])
453
sage: P = B.weight_lattice_realization()
454
sage: alpha = P.simple_roots()
455
sage: b.weight() == -2*alpha[1] - 3*alpha[2] - 2*alpha[3] - 5*alpha[4]
456
True
457
"""
458
P = self.parent().weight_lattice_realization()
459
La = P.fundamental_weights()
460
cur_col_len = 1
461
shape_wt = P.zero()
462
n = self.cartan_type().rank()
463
ty = self.cartan_type().type()
464
for i in range(1, len(self)):
465
if self[i-1] < self[i] or (self[i-1].value != 0 and self[i-1] == self[i]):
466
if (cur_col_len == n - 1 and ty == 'D') or \
467
(cur_col_len == n and ty == 'B'):
468
shape_wt += La[n]
469
shape_wt += La[cur_col_len]
470
cur_col_len = 1
471
else:
472
cur_col_len += 1
473
shape_wt += La[1] # Since we miss the last column (which is always height 1)
474
return CrystalOfTableauxElement.weight(self) - shape_wt
475
476
def reduced_form(self):
477
r"""
478
Return the reduced form of ``self``.
479
480
The reduced form of a tableaux `T \in \mathcal{T}(\infty)` is the
481
(not necessarily semistandard) tableaux obtained from `T` by
482
removing all `i`-boxes in the `i`-th row, subject to the condition
483
that if the row is empty, a `\ast` is put as a placeholder.
484
This is described in [BN10]_ and [LS12]_.
485
486
EXAMPLES::
487
488
sage: B = InfinityCrystalOfTableaux(['A',3])
489
sage: b = B.highest_weight_vector().f_string([2,2,2,3,3,3,3,3])
490
sage: b.pp()
491
1 1 1 1 1 1 1 1
492
2 2 2 2 4 4 4
493
3 4 4
494
sage: b.reduced_form().pp()
495
*
496
4 4 4
497
4 4
498
"""
499
tab = self.to_tableau()
500
for i in range(len(tab)):
501
j=0
502
while j < len(tab[i]):
503
if tab[i][j] == i+1:
504
tab[i].pop(j)
505
if tab[i] == []:
506
tab[i].append('*')
507
else:
508
j += 1
509
return tab
510
511
def seg(self):
512
r"""
513
Returns the statistic `\mathrm{seg}` of ``self.``
514
515
More precisely, following [LS12]_, define a `k`-segment of a
516
tableau `T` in `\mathcal{B}(\infty)` to be a maximal string
517
of `k`-boxes in a single row of `T`. Set `\mathrm{seg}^{\prime}(T)`
518
to be the number of `k`-segments in `T`, as `k` varies over
519
all possible values. Then `\mathrm{seg}(T)` is determined
520
type-by-type.
521
522
- In types `A_n` and `C_n`, define `\mathrm{seg}(T) :=
523
\mathrm{seg}^{\prime}(T)`.
524
525
- In types `B_n` and `G_2`, set `e(T)` to be the number of rows in
526
`T` which contain both a `0`-box and an `\overline{\imath}`-box.
527
Define `\mathrm{seg}(T) := \mathrm{seg}^{\prime}(T) - e(T)`.
528
529
- In type `D_n`, set `d(T)` to be the number of rows in `T` which
530
contain an `\overline{\imath}`-box, but no `n`-box nor
531
`\overline{n}`-box. Define `\mathrm{seg}(T) :=
532
\mathrm{seg}^{\prime}(T) + d(T)`.
533
534
EXAMPLES::
535
536
sage: B = InfinityCrystalOfTableaux(['A',3])
537
sage: b = B.highest_weight_vector().f_string([1,3,2,2,3,1,1,3])
538
sage: b.pp()
539
1 1 1 1 1 1 2 2 4
540
2 2 2 2 3
541
3 4 4
542
sage: b.seg()
543
4
544
545
sage: B = InfinityCrystalOfTableaux(['D',4])
546
sage: b = B(rows=[[1,1,1,1,1,1,3,-2,-1],[2,2,2,4,-2],[3,3],[4]])
547
sage: b.pp()
548
1 1 1 1 1 1 3 -2 -1
549
2 2 2 4 -2
550
3 3
551
4
552
sage: b.seg()
553
6
554
555
sage: B = InfinityCrystalOfTableaux(['G',2])
556
sage: b = B.highest_weight_vector().f_string([2,1,1,1,2,1,2,2,1,2,2,2,1,2,2,1])
557
sage: b.pp()
558
1 1 1 1 1 1 1 1 2 3 0 -3
559
2 3 3 3 3 3 3
560
sage: b.seg()
561
5
562
"""
563
tab = self.to_tableau()
564
segments = []
565
for r in range(len(tab)):
566
for c in range(len(tab[r])):
567
if tab[r][c] != r+1:
568
if [r,tab[r][c]] not in segments:
569
segments.append([r,tab[r][c]])
570
if self.parent().cartan_type().type() == 'B':
571
for r in range(len(tab)):
572
for c in range(len(tab[r])):
573
if tab[r][c] == 0 and tab[r][-1] == -r-1:
574
segments.remove([r,tab[r][c]])
575
if self.parent().cartan_type().type() == 'D':
576
n = self.parent().cartan_type().rank()
577
add = []
578
for r in range(len(tab)):
579
if tab[r][-1] == -1*(r+1):
580
for c in range(len(tab[r])):
581
if tab[r][c] != n and tab[r][c] != -n:
582
if [r,n] not in add:
583
add.append([r,n])
584
if len(add) > 0:
585
segments.append([r,n])
586
if self.parent().cartan_type().type() == 'G':
587
for c in range(len(tab[0])):
588
if tab[0][c] == 0 and tab[0][-1] == -1:
589
segments.remove([0,tab[0][c]])
590
return len(segments)
591
592
def content(self):
593
r"""
594
Return the content of ``self``.
595
596
The content `|T|` of `T \in \mathcal{B}(\infty)` is the number of
597
blocks added to the highest weight to obtain `T` with any
598
`\overline{\imath}`-boxes in the `i`-th row counted with
599
multiplicity `2` provided the underlying Cartan type is of type
600
`B`, `D`, or `G`.
601
602
EXAMPLES::
603
604
sage: B = InfinityCrystalOfTableaux("D5")
605
sage: b = B.highest_weight_vector().f_string([5,4,3,1,1,3,4,5,3,4,5,1,4,5,2,3,5,3,2,4])
606
sage: b.content()
607
13
608
609
sage: B = InfinityCrystalOfTableaux("B2")
610
sage: b = B(rows=[[1,1,1,1,1,1,2,2,2,-2,-2],[2,0,-2,-2,-2]])
611
sage: b.content()
612
12
613
614
sage: B = InfinityCrystalOfTableaux("C2")
615
sage: b = B(rows=[[1,1,1,1,1,1,2,2,2,-2,-2],[2,-2,-2,-2]])
616
sage: b.content()
617
8
618
"""
619
tab = self.to_tableau()
620
count = 0
621
ct = self.parent().cartan_type().type()
622
for i,row in enumerate(tab):
623
for entry in row:
624
if entry == -i-1 and ct in ('B','D','G'):
625
count += 2
626
elif entry != i+1:
627
count += 1
628
return count
629
630
def string_parameters(self,word):
631
r"""
632
Return the string parametrization of ``self`` with respect to ``word``.
633
634
For `w` in the Weyl group, let `R(w)` denote the set of reduced
635
expressions for `w`; that is, if `w = s_{i_1} s_{i_2} \cdots
636
s_{i_{\ell}}` is a reduced expression, then
637
`(i_1, i_2, \ldots, i_{\ell}) \in R(w)`. For brevity, such words
638
are denoted by `\mathbf{i}`.
639
640
For `T \in \mathcal{T}(\infty)` and
641
`\mathbf{i} = (i_1, \ldots, i_{\ell}) \in R(w)`,
642
the string parametrization `(a_1, \ldots, a_{\ell})` of `T` in the
643
direction `\mathbf{i}` is defined recursively by `a_1 =
644
\varepsilon_{i_1}(T)` and `a_j = \varepsilon_{i_j}
645
(\widetilde{e}_{i_{j-1}}^{\, a_{j-1}} \cdots \widetilde{e}_{i_1}^{\,
646
a_1} T)` for `j = 2, \ldots, \ell`. If `w = w_0` is the longest
647
element of the Weyl group, then the path determined by the string
648
parametrization terminates at the highest weight vector.
649
650
INPUT:
651
652
- ``word`` -- A word in the alphabet of the index set
653
654
EXAMPLES::
655
656
sage: B = InfinityCrystalOfTableaux("A5")
657
sage: b = B(rows=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,6,6,6,6,6,6],[2,2,2,2,2,2,2,2,2,4,5,5,5,6],[3,3,3,3,3,3,3,5],[4,4,4,6,6,6],[5,6]])
658
sage: b.string_parameters([1,2,1,3,2,1,4,3,2,1,5,4,3,2,1])
659
[0, 1, 1, 1, 1, 0, 4, 4, 3, 0, 11, 10, 7, 7, 6]
660
661
sage: B = InfinityCrystalOfTableaux("G2")
662
sage: b = B(rows=[[1,1,1,1,1,3,3,0,-3,-3,-2,-2,-1,-1,-1,-1],[2,3,3,3]])
663
sage: b.string_parameters([2,1,2,1,2,1])
664
[5, 13, 11, 15, 4, 4]
665
sage: b.string_parameters([1,2,1,2,1,2])
666
[7, 12, 15, 8, 10, 0]
667
"""
668
ret = []
669
for i in word:
670
a = 0
671
while self.e(i) != None:
672
self = self.e(i)
673
a += 1
674
ret.append(a)
675
return ret
676
677
class InfinityCrystalOfTableauxTypeD(InfinityCrystalOfTableaux):
678
r"""
679
`\mathcal{B}(\infty)` crystal of tableaux for type `D_n`.
680
681
This is the set `\mathcal{T}(\infty)` of marginally large semistandard
682
tableaux with exactly `n-1` rows over the alphabet `\{1 \prec \cdots
683
\prec n, \overline{n} \prec \cdots \prec \overline{1} \}` and subject
684
to the following constraints:
685
686
- for each `1 \le i \le n`, the contents of the boxes in the `i`-th
687
row are `\preceq \overline{i}`,
688
689
- the entries `n` and `\overline{n}` may not appear simultaneously in
690
a single row.
691
692
For more information, see :class:`InfinityCrystalOfTableaux`.
693
694
EXAMPLES::
695
696
sage: B = InfinityCrystalOfTableaux("D4")
697
sage: b = B.highest_weight_vector().f_string([4,3,2,1,4])
698
sage: b.pp()
699
1 1 1 1 1 1 2
700
2 2 2 2 3
701
3 -4 -3
702
sage: b.weight()
703
(-1, 0, -2, -1)
704
"""
705
@staticmethod
706
def __classcall_private__(cls, cartan_type):
707
"""
708
Normalize input to ensure a unique representation.
709
710
EXAMPLES::
711
712
sage: B = InfinityCrystalOfTableaux(['D',4])
713
sage: B2 = InfinityCrystalOfTableaux(CartanType(['D',4]))
714
sage: B is B2
715
True
716
"""
717
return super(InfinityCrystalOfTableauxTypeD, cls).__classcall__(cls, CartanType(cartan_type))
718
719
@cached_method
720
def module_generator(self):
721
"""
722
Return the module generator (or highest weight element) of ``self``.
723
724
The module generator is the unique tableau of shape `(n-1, \ldots, 2,
725
1)` with weight `0`.
726
727
EXAMPLES::
728
729
sage: T = InfinityCrystalOfTableaux(['D',4])
730
sage: T.module_generator()
731
[[1, 1, 1], [2, 2], [3]]
732
"""
733
n = self._cartan_type.rank()
734
p = Partition([x for x in reversed(range(1, n))])
735
# The column canonical tableau, read by columns
736
module_generator = flatten([[p[j]-i for i in range(p[j])] for j in range(n-1)])
737
return self(list=[self.letters(x) for x in module_generator])
738
739
class Element(InfinityCrystalOfTableaux.Element):
740
r"""
741
Elements in `\mathcal{B}(\infty)` crystal of tableaux for type `D_n`.
742
"""
743
def e(self, i):
744
r"""
745
Return the action of `\widetilde{e}_i` on ``self``.
746
747
INPUT:
748
749
- ``i`` -- An element of the index set
750
751
EXAMPLES::
752
753
sage: B = InfinityCrystalOfTableaux(['D',4])
754
sage: b = B.highest_weight_vector().f_string([1,4,3,1,2]); b.pp()
755
1 1 1 1 2 3
756
2 2 2
757
3 -3
758
sage: b.e(2).pp()
759
1 1 1 1 2 2
760
2 2 2
761
3 -3
762
"""
763
if i not in self.index_set():
764
raise ValueError('i is not in the index set.')
765
position = self.positions_of_unmatched_plus(i)
766
if position == []:
767
return None
768
k = position[0]
769
ret = self.set_index(k, self[k].e(i))
770
if i == self.cartan_type().rank():
771
i -= 1
772
if k+i > len(self):
773
return ret
774
for j in reversed(range(1, i+1)):
775
if ret[k+i-j].value != j:
776
return ret
777
# We've found a column, so we need to remove it
778
for j in range(i):
779
ret._list.pop(k)
780
return ret
781
782
def f(self, i):
783
r"""
784
Return the action of `\widetilde{f}_i` on ``self``.
785
786
INPUT:
787
788
- ``i`` -- An element of the index set
789
790
EXAMPLES::
791
792
sage: B = InfinityCrystalOfTableaux(['D',5])
793
sage: b = B.highest_weight_vector().f_string([1,4,3,1,5]); b.pp()
794
1 1 1 1 1 1 2 2
795
2 2 2 2 2
796
3 3 3 -5
797
4 5
798
sage: b.f(1).pp()
799
1 1 1 1 1 1 2 2 2
800
2 2 2 2 2
801
3 3 3 -5
802
4 5
803
sage: b.f(5).pp()
804
1 1 1 1 1 1 2 2
805
2 2 2 2 2
806
3 3 3 -5
807
4 -4
808
"""
809
ret = InfinityCrystalOfTableaux.Element.f(self, i)
810
if ret._list[0].value == -self.cartan_type().rank():
811
# Exceptional case for f_n where we need to add a new column
812
for j in range(i-1):
813
ret._list.insert(0,self.parent().letters(j+1))
814
return ret
815
816
817