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  
    44Let $T$ be a CartanType with index set $I$, and $W$ be a realization of the 
    55type $T$ weight lattice. 
    66 
    7 A type $T$ crystal $C$ is an oriented graph equipped with a weight 
    8 function the nodes to some realization of the type $T$ weight lattice 
     7A type $T$ crystal $C$ is a colored oriented graph equipped with a weight 
     8function from the nodes to some realization of the type $T$ weight lattice 
    99such that: 
    1010\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: 
    1313  \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)$. 
    1616  \end{itemize} 
    17    Furthermore, when the exists
     17   Furthermore, when they exist
    1818   \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$. 
    2121   \end{itemize} 
    2222\end{itemize} 
    2323 
    2424This crystal actually models a representation of a Lie algebra if it 
    25 satisfies some further local conditions due to Stembridge. 
     25satisfies some further local conditions due to Stembridge, see 
     26J. Stembridge, \textit{A local characterization of simply-laced crystals}, 
     27Trans. Amer. Math. Soc. 355 (2003), no. 12, 4807--4823. 
    2628 
    2729EXAMPLES: 
    2830 
    29 We construct the type $A_5$ crystal on letters 
     31We construct the type $A_5$ crystal on letters (or in representation 
     32theoretic terms, the highest weight crystal of type $A_5$ corresponding 
     33to the highest weight $\Lambda_1$) 
    3034 
    3135    sage: C = CrystalOfLetters(['A',5]); C 
    3236    The crystal of letters for type ['A', 5] 
    3337 
    3438It has a single highest weight element: 
    35     sage: C.module_generators 
     39    sage: C.highest_weight_vectors() 
    3640    [1] 
    3741 
    3842A crystal is a CombinatorialClass; and we can count and list its elements 
     
    5761    sage: Tab.plot() 
    5862 
    5963 
    60  
    6164For rank two crystals, there is an alternative method of getting 
    6265metapost pictures. For more information see C.metapost? 
    6366 
     
    8083  \item RestrictionOfCrystal / DirectSumOfCrystals 
    8184  \item Crystal.crystal_morphism 
    8285  \item Affine crystals 
     86  \item Kirillov--Reshetikhin crystals 
    8387\end{itemize} 
    8488 
    8589Most of the above features (except Littelmann/alcove paths) are in 
     
    128132    \item index_set 
    129133        the index set of the cartan type 
    130134    \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$ 
    132136    \item weight_lattice_realization 
    133137    \end{itemize} 
    134138    """ 
     
    514518        Returns a dot_tex version of self. 
    515519 
    516520        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}' 
    520525 
    521526        """ 
    522527        import re 
  • a/sage/combinat/crystals/letters.py

    old new  
    3030    For classical types, this is a combinatorial model for the crystal 
    3131    with highest weight Lambda_1 (the first fundamental weight). 
    3232 
    33     Any irreducible classical crystal appears as irreducible component 
     33    Any irreducible classical crystal appears as the irreducible component 
    3434    of the tensor product of several copies of this crystal (plus 
    3535    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. 
    3638    Elements of this irreducible component have a fixed shape, and can 
    3739    be fit inside a tableau shape. Otherwise said, any irreducible 
    3840    classical crystal is isomorphic to a crystal of tableaux with 
     
    7476 
    7577    All classical crystals of letters should be instances of this class 
    7678    or of subclasses. To define a new crystal of letters, one only 
    77     need to implement a class for the elements (which subclasses 
     79    needs to implement a class for the elements (which subclasses 
    7880    Letter and CrystalElement), with appropriate e and f 
    79     operations. If the module generator is not 1, one also need to 
     81    operations. If the module generator is not 1, one also needs to define the 
    8082    subclass ClassicalCrystalOfLetters for the crystal itself. 
    8183 
    8284    The basic assumption is that crystals of letters are small, but 
  • a/sage/combinat/crystals/tensor_product.py

    old new  
    11r""" 
    2 Tensor products of crystals 
     2Tensor product of crystals. 
     3 
     4EXAMPLES: 
     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]] 
    351""" 
    452 
    553#***************************************************************************** 
     
    163211        return self.sibling(l) 
    164212 
    165213def 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\otimes 
    172         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$ elements 
    178  
    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         24 
    187         sage: T.check() 
    188         True 
    189         sage: T.module_generators 
    190         [[[[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         9 
    202  
    203         For a tensor product of crystals without module generators, the default implementation of module_generators 
    204         contains all elements in the tensor product of the crystals. If there is a subset of elements 
    205         in the tensor product that still generates the crystal, this needs to be implemented for the specific  
    206         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     """ 
    218214    if options.has_key('generators'): 
    219215        if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): 
    220216            return TensorProductOfClassicalCrystalsWithGenerators(generators=options['generators'], *crystals) 
     
    523519 
    524520#        sage: Tab.latex() # random 
    525521 
    526         See sage.combinat.crystals? for general help on using crystals 
     522        See sage.combinat.crystals.crystals? for general help on using crystals 
    527523 
    528524        Internally, a tableau of a given Cartan type is represented as a tensor  
    529525        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: 
    532528        sage: T = CrystalOfTableaux(['A',2], shape = [3,2]) 
    533529        sage: T.module_generators[0] 
    534530        [[1, 1, 1], [2, 2]]