Ticket #3660: trac_3660-2.patch
| File trac_3660-2.patch, 10.8 kB (added by mhansen, 5 months ago) |
|---|
-
a/sage/combinat/crystals/crystals.py
old new 4 4 Let $T$ be a CartanType with index set $I$, and $W$ be a realization of the 5 5 type $T$ weight lattice. 6 6 7 A type $T$ crystal $C$ is a noriented graph equipped with a weight8 function the nodes to some realization of the type $T$ weight lattice7 A type $T$ crystal $C$ is a colored oriented graph equipped with a weight 8 function from the nodes to some realization of the type $T$ weight lattice 9 9 such that: 10 10 \begin{itemize} 11 \item each edge has a label in $I$12 \item for each $i$ in $I$, each node $x$ has:11 \item Each edge is colored with a label in $i \in I$. 12 \item For each $i\in I$, each node $x$ has: 13 13 \begin{itemize} 14 \item at most one $i$-successor $f_i(x)$ 15 \item at most one $i$-predecessor $e_i(x)$ 14 \item at most one $i$-successor $f_i(x)$; 15 \item at most one $i$-predecessor $e_i(x)$. 16 16 \end{itemize} 17 Furthermore, when the exists,17 Furthermore, when they exist, 18 18 \begin{itemize} 19 \item $f_i(x)$.weight() = x.weight() - $\alpha_i$ 20 \item $e_i(x)$.weight() = x.weight() + $\alpha_i$ 19 \item $f_i(x)$.weight() = x.weight() - $\alpha_i$; 20 \item $e_i(x)$.weight() = x.weight() + $\alpha_i$. 21 21 \end{itemize} 22 22 \end{itemize} 23 23 24 24 This crystal actually models a representation of a Lie algebra if it 25 satisfies some further local conditions due to Stembridge. 25 satisfies some further local conditions due to Stembridge, see 26 J. Stembridge, \textit{A local characterization of simply-laced crystals}, 27 Trans. Amer. Math. Soc. 355 (2003), no. 12, 4807--4823. 26 28 27 29 EXAMPLES: 28 30 29 We construct the type $A_5$ crystal on letters 31 We construct the type $A_5$ crystal on letters (or in representation 32 theoretic terms, the highest weight crystal of type $A_5$ corresponding 33 to the highest weight $\Lambda_1$) 30 34 31 35 sage: C = CrystalOfLetters(['A',5]); C 32 36 The crystal of letters for type ['A', 5] 33 37 34 38 It has a single highest weight element: 35 sage: C. module_generators39 sage: C.highest_weight_vectors() 36 40 [1] 37 41 38 42 A crystal is a CombinatorialClass; and we can count and list its elements … … 57 61 sage: Tab.plot() 58 62 59 63 60 61 64 For rank two crystals, there is an alternative method of getting 62 65 metapost pictures. For more information see C.metapost? 63 66 … … 80 83 \item RestrictionOfCrystal / DirectSumOfCrystals 81 84 \item Crystal.crystal_morphism 82 85 \item Affine crystals 86 \item Kirillov--Reshetikhin crystals 83 87 \end{itemize} 84 88 85 89 Most of the above features (except Littelmann/alcove paths) are in … … 128 132 \item index_set 129 133 the index set of the cartan type 130 134 \item module_generators 131 a list (or container) of distinct elements which generate the crystal 135 a list (or container) of distinct elements which generate the crystal using $f_i$ 132 136 \item weight_lattice_realization 133 137 \end{itemize} 134 138 """ … … 514 518 Returns a dot_tex version of self. 515 519 516 520 EXAMPLES: 517 sage: C = CrystalOfLetters(['A',2]) 518 sage: C.dot_tex() 519 'digraph G { \n node [ shape=plaintext ];\n N_0 [ label = " ", texlbl = "$\\text{1}$" ];\n N_1 [ label = " ", texlbl = "$\\text{2}$" ];\n N_2 [ label = " ", texlbl = "$\\text{3}$" ];\n N_0 -> N_1 [ label = " ", texlbl = "1" ];\n N_1 -> N_2 [ label = " ", texlbl = "2" ];\n}' 521 522 sage: C = CrystalOfLetters(['A',2]) 523 sage: C.dot_tex() 524 'digraph G { \n node [ shape=plaintext ];\n N_0 [ label = " ", texlbl = "$\\text{1}$" ];\n N_1 [ label = " ", texlbl = "$\\text{2}$" ];\n N_2 [ label = " ", texlbl = "$\\text{3}$" ];\n N_0 -> N_1 [ label = " ", texlbl = "1" ];\n N_1 -> N_2 [ label = " ", texlbl = "2" ];\n}' 520 525 521 526 """ 522 527 import re -
a/sage/combinat/crystals/letters.py
old new 30 30 For classical types, this is a combinatorial model for the crystal 31 31 with highest weight Lambda_1 (the first fundamental weight). 32 32 33 Any irreducible classical crystal appears as irreducible component33 Any irreducible classical crystal appears as the irreducible component 34 34 of the tensor product of several copies of this crystal (plus 35 35 possibly one copy of the spin crystal, see CrystalOfSpins). 36 See M. Kashiwara, T. Nakashima, \textit{Crystal graphs for representations of 37 the $q$-analogue of classical Lie algebras}, J. Algebra \textbf{165} (1994), no. 2, 295--345. 36 38 Elements of this irreducible component have a fixed shape, and can 37 39 be fit inside a tableau shape. Otherwise said, any irreducible 38 40 classical crystal is isomorphic to a crystal of tableaux with … … 74 76 75 77 All classical crystals of letters should be instances of this class 76 78 or of subclasses. To define a new crystal of letters, one only 77 need to implement a class for the elements (which subclasses79 needs to implement a class for the elements (which subclasses 78 80 Letter and CrystalElement), with appropriate e and f 79 operations. If the module generator is not 1, one also need to81 operations. If the module generator is not 1, one also needs to define the 80 82 subclass ClassicalCrystalOfLetters for the crystal itself. 81 83 82 84 The basic assumption is that crystals of letters are small, but -
a/sage/combinat/crystals/tensor_product.py
old new 1 1 r""" 2 Tensor products of crystals 2 Tensor product of crystals. 3 4 EXAMPLES: 5 6 We construct the type $A_2$-crystal generated by $2\otimes 1\otimes 1$: 7 8 sage: C = CrystalOfLetters(['A',2]) 9 sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)]]) 10 11 It has $8$ elements 12 13 sage: T.list() 14 [[2, 1, 1], [2, 1, 2], [2, 1, 3], [3, 1, 3], [3, 2, 3], [3, 1, 1], [3, 1, 2], [3, 2, 2]] 15 16 sage: C = CrystalOfTableaux(['A',3], shape=[1,1,0]) 17 sage: D = CrystalOfTableaux(['A',3], shape=[1,0,0]) 18 sage: T = TensorProductOfCrystals(C,D, generators=[[C(rows=[[1], [2]]), D(rows=[[1]])], [C(rows=[[2], [3]]), D(rows=[[1]])]]) 19 sage: T.count() 20 24 21 sage: T.check() 22 True 23 sage: T.module_generators 24 [[[[1], [2]], [[1]]], [[[2], [3]], [[1]]]] 25 sage: [x.weight() for x in T.module_generators] 26 [(2, 1, 0, 0), (1, 1, 1, 0)] 27 28 If no module generators are specified, we obtain the full tensor product: 29 30 sage: C=CrystalOfLetters(['A',2]) 31 sage: T=TensorProductOfCrystals(C,C) 32 sage: T.list() 33 [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]] 34 sage: T.count() 35 9 36 37 For a tensor product of crystals without module generators, the default implementation of module_generators 38 contains all elements in the tensor product of the crystals. If there is a subset of elements 39 in the tensor product that still generates the crystal, this needs to be implemented for the specific 40 crystal separately: 41 42 sage: T.module_generators.list() 43 [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]] 44 45 For classical highest weight crystals, it is also possible to list all highest weight elements: 46 47 sage: C = CrystalOfLetters(['A',2]) 48 sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)],[C(1),C(2),C(1)]]) 49 sage: T.highest_weight_vectors() 50 [[2, 1, 1], [1, 2, 1]] 3 51 """ 4 52 5 53 #***************************************************************************** … … 163 211 return self.sibling(l) 164 212 165 213 def TensorProductOfCrystals(*crystals, **options): 166 r"""167 Tensor product of crystals.168 169 EXAMPLES:170 171 We construct the type $A_2$-crystal generated by $2\otimes172 1\otimes 1$:173 174 sage: C = CrystalOfLetters(['A',2])175 sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)]])176 177 It has $8$ elements178 179 sage: T.list()180 [[2, 1, 1], [2, 1, 2], [2, 1, 3], [3, 1, 3], [3, 2, 3], [3, 1, 1], [3, 1, 2], [3, 2, 2]]181 182 sage: C = CrystalOfTableaux(['A',3], shape=[1,1,0])183 sage: D = CrystalOfTableaux(['A',3], shape=[1,0,0])184 sage: T = TensorProductOfCrystals(C,D, generators=[[C(rows=[[1], [2]]), D(rows=[[1]])], [C(rows=[[2], [3]]), D(rows=[[1]])]])185 sage: T.count()186 24187 sage: T.check()188 True189 sage: T.module_generators190 [[[[1], [2]], [[1]]], [[[2], [3]], [[1]]]]191 sage: [x.weight() for x in T.module_generators]192 [(2, 1, 0, 0), (1, 1, 1, 0)]193 194 If no module generators are specified, we obtain the full tensor product:195 196 sage: C=CrystalOfLetters(['A',2])197 sage: T=TensorProductOfCrystals(C,C)198 sage: T.list()199 [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]]200 sage: T.count()201 9202 203 For a tensor product of crystals without module generators, the default implementation of module_generators204 contains all elements in the tensor product of the crystals. If there is a subset of elements205 in the tensor product that still generates the crystal, this needs to be implemented for the specific206 crystal separately:207 208 sage: T.module_generators.list()209 [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]]210 211 For classical highest weight crystals, it is also possible to list all highest weight elements:212 213 sage: C = CrystalOfLetters(['A',2])214 sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)],[C(1),C(2),C(1)]])215 sage: T.highest_weight_vectors()216 [[2, 1, 1], [1, 2, 1]]217 """218 214 if options.has_key('generators'): 219 215 if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): 220 216 return TensorProductOfClassicalCrystalsWithGenerators(generators=options['generators'], *crystals) … … 523 519 524 520 # sage: Tab.latex() # random 525 521 526 See sage.combinat.crystals ? for general help on using crystals522 See sage.combinat.crystals.crystals? for general help on using crystals 527 523 528 524 Internally, a tableau of a given Cartan type is represented as a tensor 529 525 product of letters of the same type. The order in which the tensor factors 530 appear is by reading the columns of the tableaux left to right, top to bottom .531 As an example:526 appear is by reading the columns of the tableaux left to right, top to bottom 527 (in French notation). As an example: 532 528 sage: T = CrystalOfTableaux(['A',2], shape = [3,2]) 533 529 sage: T.module_generators[0] 534 530 [[1, 1, 1], [2, 2]]