| 1268 | def reflection(self, root, use_coroot = False): |
| 1269 | r""" |
| 1270 | Reflects ``self`` across the hyperplane orthogonal to ``root``. |
| 1271 | |
| 1272 | If ``use_coroot`` is True, ``root`` is interpreted as a coroot. |
| 1273 | |
| 1274 | EXAMPLES:: |
| 1275 | |
| 1276 | sage: R = RootSystem(['C',4]) |
| 1277 | sage: weight_lattice = R.weight_lattice() |
| 1278 | sage: mu = weight_lattice.from_vector(vector([0,0,1,2])) |
| 1279 | sage: coroot_lattice = R.coroot_lattice() |
| 1280 | sage: alphavee = coroot_lattice.from_vector(vector([0,0,1,1])) |
| 1281 | sage: mu.reflection(alphavee, use_coroot=True) |
| 1282 | 6*Lambda[2] - 5*Lambda[3] + 2*Lambda[4] |
| 1283 | sage: root_lattice = R.root_lattice() |
| 1284 | sage: beta = root_lattice.from_vector(vector([0,1,1,0])) |
| 1285 | sage: mu.reflection(beta) |
| 1286 | Lambda[1] - Lambda[2] + 3*Lambda[4] |
| 1287 | """ |
| 1288 | if use_coroot: |
| 1289 | return self - self.scalar(root) * root.associated_coroot() |
| 1290 | else: |
| 1291 | return self - self.scalar(root.associated_coroot()) * root |
| 1292 | |
| 1293 | |
| 1381 | If ``get_direction`` is True, returns the 2-tuple (``weight``, ``direction``) |
| 1382 | where ``weight`` is the (anti)dominant orbit element and ``direction`` is a reduced word |
| 1383 | for the Weyl group element sending ``weight`` to ``self``. |
| 1384 | |
| 1385 | .. warning:: |
| 1386 | |
| 1387 | In infinite type, an orbit may not contain a dominant element. |
| 1388 | In this case the function may go into an infinite loop. |
| 1389 | |
| 1390 | For affine root systems, assertion errors are generated if |
| 1391 | the orbit does not contain the requested kind of representative. |
| 1392 | If the input vector is of positive (resp. negative) |
| 1393 | level, then there is a dominant (resp. antidominant) element in its orbit |
| 1394 | but not an antidominant (resp. dominant) one. If the vector is of level zero, |
| 1395 | then there are neither dominant nor antidominant orbit representatives, except |
| 1396 | for multiples of the null root, which are themselves both dominant and antidominant |
| 1397 | orbit representatives. |
| 1407 | sage: wl=RootSystem(['A',2,1]).weight_lattice(extended=True) |
| 1408 | sage: mu=wl.from_vector(vector([1,-3,0])) |
| 1409 | sage: mu.to_dominant_chamber(positive=False, get_direction = True) |
| 1410 | (-Lambda[1] - Lambda[2] - delta, [0, 2]) |
| 1411 | |
| 1412 | sage: R = RootSystem(['A',1,1]) |
| 1413 | sage: rl = R.root_lattice() |
| 1414 | sage: mu = rl.from_vector(vector([0,1])) |
| 1415 | sage: mu.to_dominant_chamber() |
| 1416 | Traceback (most recent call last): |
| 1417 | ... |
| 1418 | AssertionError: This element is not in the orbit of the fundamental chamber |
| 1419 | |
1366 | | index_set=self.parent().index_set() |
| 1423 | # default index set is the entire Dynkin node set |
| 1424 | index_set = self.parent().index_set() |
| 1425 | cartan_type = self.parent().cartan_type() |
| 1426 | # generate assertion errors for infinite loop cases in affine type |
| 1427 | if cartan_type.is_affine(): |
| 1428 | if index_set == self.parent().index_set(): |
| 1429 | # If the full affine Weyl group is being used |
| 1430 | level = self.level() |
| 1431 | if level > 0: |
| 1432 | assert positive, "This element is not in the orbit of the fundamental chamber" |
| 1433 | elif level < 0: |
| 1434 | assert not positive, "This element is not in the orbit of the negative of the fundamental chamber" |
| 1435 | else: |
| 1436 | # level zero |
| 1437 | if positive: |
| 1438 | assert self.is_dominant(), "This element is not in the orbit of the fundamental chamber" |
| 1439 | else: |
| 1440 | assert self.is_dominant(), "This element is not in the orbit of the negative of the fundamental chamber" |
| 1441 | if get_direction: |
| 1442 | direction = [] |
1376 | | """ |
1377 | | Returns a shortest sequence of simple reflections mapping self |
1378 | | to the unique element `o` of its orbit in the positive |
1379 | | chamber. Alternatively this is a reduced word for the smallest |
1380 | | element of the group mapping `o` to self (recall that, by |
1381 | | convention, Weyl groups act on the left). |
| 1459 | r""" |
| 1460 | Returns a reduced word for the inverse of the shortest Weyl group element that sends the vector ``self`` into the dominant chamber. |
| 1461 | |
| 1462 | With the ``index_set`` optional parameter, this is done with |
| 1463 | respect to the corresponding parabolic subgroup. |
| 1683 | |
| 1684 | def weyl_action(self, w = None, reduced_word = None, inverse = False): |
| 1685 | r""" |
| 1686 | Acts on ``self`` by a Weyl group element. |
| 1687 | |
| 1688 | INPUT: |
| 1689 | - If ``w`` is not None, use it to act. |
| 1690 | - If ``reduced_word`` is not None, use it to act. |
| 1691 | - Exactly one of ``w`` and ``reduced_word`` should not be None. |
| 1692 | - If ``inverse`` is True, act by the inverse element. |
| 1693 | |
| 1694 | EXAMPLES:: |
| 1695 | |
| 1696 | sage: wl = RootSystem(['A',2,1]).weight_lattice(extended = True) |
| 1697 | sage: mu = wl.from_vector(vector([1,-3,0])) |
| 1698 | sage: mu |
| 1699 | Lambda[0] - 3*Lambda[1] |
| 1700 | sage: mudom, rw = mu.to_dominant_chamber(positive=False, get_direction = True) |
| 1701 | sage: mudom, rw |
| 1702 | (-Lambda[1] - Lambda[2] - delta, [0, 2]) |
| 1703 | sage: mudom.weyl_action(reduced_word = rw) |
| 1704 | Lambda[0] - 3*Lambda[1] |
| 1705 | sage: mu.weyl_action(reduced_word = rw, inverse = True) |
| 1706 | -Lambda[1] - Lambda[2] - delta |
| 1707 | |
| 1708 | """ |
| 1709 | |
| 1710 | if w is None: |
| 1711 | assert reduced_word is not None |
| 1712 | rw = copy(reduced_word) |
| 1713 | else: |
| 1714 | rw = w.reduced_word() |
| 1715 | if not inverse: |
| 1716 | rw.reverse() |
| 1717 | for i in rw: |
| 1718 | self = self.simple_reflection(i) |
| 1719 | return self |
| 1720 | |
| 1721 | def weyl_stabilizer(self, index_set=None): |
| 1722 | r""" |
| 1723 | Returns the subset of Dynkin nodes whose reflections fix ``self``. |
| 1724 | |
| 1725 | If ``index_set`` is not None, only consider nodes in this set. |
| 1726 | Note that if ``self`` is dominant or antidominant, then its stabilizer is the |
| 1727 | parabolic subgroup defined by the returned node set. |
| 1728 | |
| 1729 | EXAMPLES:: |
| 1730 | |
| 1731 | sage: wl = RootSystem(['A',2,1]).weight_lattice(extended = True) |
| 1732 | sage: al = wl.null_root() |
| 1733 | sage: al.weyl_stabilizer() |
| 1734 | [0, 1, 2] |
| 1735 | sage: wl = RootSystem(['A',4]).weight_lattice() |
| 1736 | sage: mu = wl.from_vector(vector([1,1,0,0])) |
| 1737 | sage: mu.weyl_stabilizer() |
| 1738 | [3, 4] |
| 1739 | sage: mu.weyl_stabilizer(index_set = [1,2,3]) |
| 1740 | [3] |
| 1741 | |
| 1742 | """ |
| 1743 | |
| 1744 | if index_set is None: |
| 1745 | index_set = self.parent().cartan_type().index_set() |
| 1746 | alphavee = self.parent().coroot_lattice().basis() |
| 1747 | return [i for i in index_set if self.scalar(alphavee[i]) == 0] |