| 1 | r""" |
| 2 | Virtual Cartan types |
| 3 | |
| 4 | AUTHORS: |
| 5 | |
| 6 | - Travis Scrimshaw (2013-01-12) - Initial version |
| 7 | """ |
| 8 | #***************************************************************************** |
| 9 | # Copyright (C) 2013 Travis Scrimshaw <tscrim@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 | from sage.misc.cachefunc import cached_method |
| 24 | from sage.misc.abstract_method import abstract_method |
| 25 | from sage.rings.all import ZZ |
| 26 | from sage.structure.unique_representation import UniqueRepresentation |
| 27 | from sage.combinat.root_system.cartan_type import CartanType |
| 28 | |
| 29 | class VirtualCartanType(UniqueRepresentation): |
| 30 | """ |
| 31 | A virtual Cartan type. |
| 32 | |
| 33 | Given an affine Cartan type `X`, we say `\hat{X}` is a virtual Cartan |
| 34 | type of `X` if there exists am affine folding of the Dynkin diagram of |
| 35 | `\hat{X}` onto `X`. |
| 36 | |
| 37 | An affine folding of (the Dynkin diagram of) `X` is an automorphism |
| 38 | `\sigma` of `X` which fixes the `0` node. The resulting Dynkin diagram |
| 39 | induced by `I / \sigma` where `I` is the index set of `X`. By abuse of |
| 40 | notation, we will denote the folding by `\sigma`. |
| 41 | |
| 42 | We also have multiplication factors `\gamma_i` where `i \in I` induced |
| 43 | by the folding `\sigma`. We define `\gamma_i` as follows: |
| 44 | |
| 45 | 1. There exists a unique arrow (multiple bond) in `X`. |
| 46 | |
| 47 | a. Suppose the arrow points towards 0. Then `\gamma_i = 1` for all |
| 48 | `i \in I`. |
| 49 | b. Otherwise `\gamma_i` is the order of `\sigma` for all `i` in the |
| 50 | connected component of 0 after removing the arrow, else |
| 51 | `\gamma_i = 1`. |
| 52 | |
| 53 | 2. There is not a unique arrow. Thus `\hat{X} = A_{2n-1}^{(1)}` and |
| 54 | `\gamma_i = 1` for all `1 \leq i \leq n-1`. If `i \in \{0, n\}`, then |
| 55 | `\gamma_i = 2` if the arrow indicent to `i` points away and is `1` |
| 56 | otherwise. |
| 57 | |
| 58 | The default embeddings we consider here are: |
| 59 | |
| 60 | .. MATH:: |
| 61 | |
| 62 | C_n^{(1)}, A_{2n}^{(2)}, A_{2n}^{(2)\dagger}, D_{n+1}^{(2)} |
| 63 | \hookrightarrow A_{2n-1}^{(1)} |
| 64 | |
| 65 | A_{2n-1}^{(2)}, B_n^{(1)} \hookrightarrow D_{n+1}^{(1)} |
| 66 | |
| 67 | E_6^{(2)}, F_4^{(1)} \hookrightarrow E_6^{(1)} |
| 68 | |
| 69 | D_4^{(3)}, G_2^{(1)} \hookrightarrow D_4^{(1)} |
| 70 | |
| 71 | and were chosen based on virtual crystals. |
| 72 | |
| 73 | If the Cartan type is simply laced, this is the folding induced from the |
| 74 | identity map. |
| 75 | |
| 76 | For more information in Cartan types, see |
| 77 | :mod:`sage.combinat.root_system.cartan_type`. |
| 78 | |
| 79 | To consider a folding that is not one of the default embeddings, one may |
| 80 | pass in an optional second argument ``virtual_data``. See below. |
| 81 | |
| 82 | INPUT: |
| 83 | |
| 84 | - ``cartan_type`` -- The Cartan type `X` to create a virtual crystal of |
| 85 | |
| 86 | - ``virtual_data`` -- (Optional, default: ``None``) A tuple |
| 87 | ``(virtual, gamma, sigma)`` where: |
| 88 | |
| 89 | - ``virtual`` -- the codomain of the embedding, |
| 90 | - ``gamma`` -- the multiplication factors, |
| 91 | - ``sigma`` -- the Dynkin diagram automorphism. |
| 92 | |
| 93 | EXAMPLES:: |
| 94 | |
| 95 | sage: vct = VirtualCartanType(['C',4,1]); vct |
| 96 | Virtual Cartan type of ['C', 4, 1] in ['A', 7, 1] |
| 97 | |
| 98 | If the Cartan type is simply-laced, then just consider it a virtual type |
| 99 | of itself:: |
| 100 | |
| 101 | sage: vct = VirtualCartanType(['A',4,1]); vct |
| 102 | Virtual Cartan type of ['A', 4, 1] in ['A', 4, 1] |
| 103 | """ |
| 104 | @staticmethod |
| 105 | def __classcall_private__(cls, cartan_type, virtual_data=None): |
| 106 | """ |
| 107 | Normalize input to ensure a unique representation. |
| 108 | |
| 109 | EXAMPLES:: |
| 110 | |
| 111 | sage: vct1 = VirtualCartanType(['C',4,1]) |
| 112 | sage: vct2 = VirtualCartanType(CartanType(['C',4,1])) |
| 113 | sage: vct3 = VirtualCartanType(vct2) |
| 114 | sage: vct1 is vct2, vct1 is vct3 |
| 115 | (True, True) |
| 116 | """ |
| 117 | if isinstance(cartan_type, VirtualCartanType): |
| 118 | return cartan_type |
| 119 | cartan_type = CartanType(cartan_type) |
| 120 | if virtual_data is not None: |
| 121 | virtual_data = (CartanType(virtual_data[0]), tuple(virtual_data[1]), tuple(virtual_data[2])) |
| 122 | return super(VirtualCartanType, cls).__classcall__(cls, cartan_type, virtual_data) |
| 123 | |
| 124 | def __init__(self, cartan_type, virtual_data): |
| 125 | """ |
| 126 | Initialize ``self``. |
| 127 | |
| 128 | EXAMPLES:: |
| 129 | |
| 130 | sage: vct = VirtualCartanType(['C',4,1]); vct |
| 131 | Virtual Cartan type of ['C', 4, 1] in ['A', 7, 1] |
| 132 | sage: TestSuite(vct).run() |
| 133 | """ |
| 134 | if not cartan_type.is_affine(): |
| 135 | raise ValueError("%s must be an affine type"%cartan_type) |
| 136 | |
| 137 | gamma = None # Embedding multiplier |
| 138 | sigma = None # Dynkin diagram cosets |
| 139 | |
| 140 | # Determine if this is a virtual crystal |
| 141 | type = cartan_type.type() |
| 142 | if virtual_data is not None: |
| 143 | virtual = virtual_data[0] |
| 144 | gamma = virtual_data[1] |
| 145 | sigma = virtual_data[2] |
| 146 | #raise ValueError("%s is not a virtual Cartan type of %s"%cartan_type, virtual) |
| 147 | elif cartan_type.is_simply_laced(): |
| 148 | virtual = cartan_type |
| 149 | rank = cartan_type.rank() |
| 150 | gamma = [1]*rank |
| 151 | sigma = [[i] for i in range(rank)] |
| 152 | elif cartan_type.is_untwisted_affine(): |
| 153 | if type == 'B': |
| 154 | n = cartan_type.n |
| 155 | virtual = CartanType(['D', n + 1, 1]) |
| 156 | gamma = [2]*n + [1] |
| 157 | sigma = [[i] for i in range(n)] + [[n, n+1]] |
| 158 | elif type == 'C': |
| 159 | n = cartan_type.n |
| 160 | virtual = CartanType(['A', 2*n - 1, 1]) |
| 161 | gamma = [2] + [1]*(n-1) + [2] |
| 162 | sigma = [[0]] + [[i, 2*n-i] for i in range(1, n)] + [[n]] |
| 163 | elif type == 'F': |
| 164 | virtual = CartanType(['E', 6, 1]) |
| 165 | gamma = [2, 2, 2, 1, 1] |
| 166 | sigma = [[0], [2], [4], [3, 5], [1, 6]] |
| 167 | elif type == 'G': |
| 168 | virtual = CartanType(['D', 4, 1]) |
| 169 | gamma = [3, 1, 3] |
| 170 | sigma = [[0], [1, 3, 4], [2]] |
| 171 | else: |
| 172 | if type == 'BC': # A_{2n}^{(2)} |
| 173 | n = cartan_type.classical().n |
| 174 | virtual = CartanType(['A', 2*n - 1, 1]) |
| 175 | gamma = [1]*n + [2] |
| 176 | sigma = [[0]] + [[i, 2*n-i] for i in range(1, n)] + [[n]] |
| 177 | elif cartan_type.dual().type() == 'BC': # A_{2n}^{(2)\dagger} |
| 178 | n = cartan_type.classical().n |
| 179 | virtual = CartanType(['A', 2*n - 1, 1]) |
| 180 | gamma = [2] + [1]*n |
| 181 | sigma = [[0]] + [[i, 2*n-i] for i in range(1, n)] + [[n]] |
| 182 | elif cartan_type.dual().type() == 'B': # A_{2n-1}^{(2)} |
| 183 | n = cartan_type.classical().n |
| 184 | virtual = CartanType(['D', n + 1, 1]) |
| 185 | gamma = [1]*(n+1) |
| 186 | sigma = [[i] for i in range(n)] + [[n, n+1]] |
| 187 | elif cartan_type.dual().type() == 'C': # D_{n+1}^{(2)} |
| 188 | n = cartan_type.classical().n |
| 189 | virtual = CartanType(['A', 2*n-1, 1]) |
| 190 | gamma = [1]*(n+1) |
| 191 | sigma = [[0]] + [[i, 2*n-i] for i in range(1, n)] + [[n]] |
| 192 | elif cartan_type.dual().type() == 'F': # E_6^{(2)} |
| 193 | virtual = CartanType(['E', 6, 1]) |
| 194 | gamma = [1, 1, 1, 1, 1] |
| 195 | sigma = [[0], [2], [4], [3, 5], [1, 6]] |
| 196 | elif cartan_type.dual().type() == 'G': # D_4^{(3)} |
| 197 | # Get rid of the relabeling... |
| 198 | cartan_type = CartanType(['G',2,1]).dual() |
| 199 | virtual = CartanType(['D', 4, 1]) |
| 200 | gamma = [1, 1, 1] |
| 201 | sigma = [[0], [1, 3, 4], [2]] |
| 202 | |
| 203 | self.cartan_type = cartan_type |
| 204 | self.virtual = virtual |
| 205 | self.gamma = gamma |
| 206 | self.sigma = sigma |
| 207 | |
| 208 | def __repr__(self): |
| 209 | """ |
| 210 | Return a string representation of ``self``. |
| 211 | |
| 212 | EXAMPLES:: |
| 213 | |
| 214 | sage: vct = VirtualCartanType(['C',4,1]); vct # indirect doctest |
| 215 | Virtual Cartan type of ['C', 4, 1] in ['A', 7, 1] |
| 216 | """ |
| 217 | return "Virtual Cartan type of %s in %s"%(self.cartan_type,self.virtual) |