本文整理汇总了Python中sage.combinat.root_system.root_system.RootSystem.sum方法的典型用法代码示例。如果您正苦于以下问题:Python RootSystem.sum方法的具体用法?Python RootSystem.sum怎么用?Python RootSystem.sum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.root_system.RootSystem
的用法示例。
在下文中一共展示了RootSystem.sum方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: weight_in_root_lattice
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import sum [as 别名]
def weight_in_root_lattice(self):
r"""
Return the weight of ``self`` as an element of the root lattice.
EXAMPLES::
sage: M = crystals.infinity.NakajimaMonomials(['F',4])
sage: m = M.module_generators[0].f_string([3,3,1,2,4])
sage: m.weight_in_root_lattice()
-alpha[1] - alpha[2] - 2*alpha[3] - alpha[4]
sage: M = crystals.infinity.NakajimaMonomials(['B',3,1])
sage: mg = M.module_generators[0]
sage: m = mg.f_string([1,3,2,0,1,2,3,0,0,1])
sage: m.weight_in_root_lattice()
-3*alpha[0] - 3*alpha[1] - 2*alpha[2] - 2*alpha[3]
sage: M = crystals.infinity.NakajimaMonomials(['C',3,1])
sage: m = M.module_generators[0].f_string([3,0,1,2,0])
sage: m.weight_in_root_lattice()
-2*alpha[0] - alpha[1] - alpha[2] - alpha[3]
"""
Q = RootSystem(self.parent().cartan_type()).root_lattice()
al = Q.simple_roots()
return Q.sum(e*al[k[0]] for k,e in six.iteritems(self._A))
示例2: energy_function
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import sum [as 别名]
def energy_function(self):
r"""
Return the energy function of ``self``.
The energy function `D(\pi)` of the level zero LS path `\pi \in \mathbb{B}_\mathrm{cl}(\lambda)`
requires a series of definitions; for simplicity the root system is assumed to be untwisted affine.
The LS path `\pi` is a piecewise linear map from the unit interval `[0,1]` to the weight lattice.
It is specified by "times" `0=\sigma_0<\sigma_1<\dotsm<\sigma_s=1` and "direction vectors"
`x_u \lambda` where `x_u \in W/W_J` for `1\le u\le s`, and `W_J` is the
stabilizer of `\lambda` in the finite Weyl group `W`. Precisely,
.. MATH::
\pi(t)=\sum_{u'=1}^{u-1} (\sigma_{u'}-\sigma_{u'-1})x_{u'}\lambda+(t-\sigma_{u-1})x_{u}\lambda
for `1\le u\le s` and `\sigma_{u-1} \le t \le \sigma_{u}`.
For any `x,y\in W/W_J` let
.. MATH::
d: x= w_{0} \stackrel{\beta_{1}}{\leftarrow}
w_{1} \stackrel{\beta_{2}}{\leftarrow} \cdots
\stackrel{\beta_{n}}{\leftarrow} w_{n}=y
be a shortest directed path in the parabolic quantum Bruhat graph. Define
.. MATH::
\mathrm{wt}(d):=\sum_{\substack{1\le k\le n \\ \ell(w_{k-1})<\ell(w_k)}}
\beta_{k}^{\vee}
It can be shown that `\mathrm{wt}(d)` depends only on `x,y`;
call its value `\mathrm{wt}(x,y)`. The energy function `D(\pi)` is defined by
.. MATH::
D(\pi)=-\sum_{u=1}^{s-1} (1-\sigma_{u}) \langle \lambda,\mathrm{wt}(x_u,x_{u+1}) \rangle
For more information, see [LNSSS2013]_.
REFERENCES:
.. [LNSSS2013] C. Lenart, S. Naito, D. Sagaki, A. Schilling, M. Shimozono,
A uniform model for Kirillov-Reshetikhin crystals. Extended abstract.
DMTCS proc, to appear ( {{{:arXiv:`1211.6019`}}} )
.. NOTE::
In the dual-of-untwisted case the parabolic quantum Bruhat graph that is used is obtained by
exchanging the roles of roots and coroots. Moreover, in the computation of the
pairing the short roots must be doubled (or tripled for type `G`). This factor
is determined by the translation factor of the corresponding root.
Type `BC` is viewed as untwisted type, whereas the dual of `BC` is viewed as twisted.
Except for the untwisted cases, these formulas are currently still conjectural.
EXAMPLES::
sage: R = RootSystem(['C',3,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(La[1]+La[3])
sage: b = LS.module_generators[0]
sage: c = b.f(1).f(3).f(2)
sage: c.energy_function()
0
sage: c=b.e(0)
sage: c.energy_function()
1
sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(2*La[1])
sage: b = LS.module_generators[0]
sage: c = b.e(0)
sage: c.energy_function()
1
sage: [c.energy_function() for c in sorted(LS.list())]
[0, 1, 0, 0, 0, 1, 0, 1, 0]
The next test checks that the energy function is constant on classically connected components::
sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(2*La[1]+La[2])
sage: G = LS.digraph(index_set=[1,2])
sage: C = G.connected_components()
sage: [all(c[0].energy_function()==a.energy_function() for a in c) for c in C]
[True, True, True, True]
sage: R = RootSystem(['D',4,2])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(La[2])
sage: J = R.cartan_type().classical().index_set()
sage: hw = [x for x in LS if x.is_highest_weight(J)]
sage: [(x.weight(), x.energy_function()) for x in hw]
[(-2*Lambda[0] + Lambda[2], 0), (-2*Lambda[0] + Lambda[1], 1), (0, 2)]
sage: G = LS.digraph(index_set=J)
sage: C = G.connected_components()
sage: [all(c[0].energy_function()==a.energy_function() for a in c) for c in C]
#.........这里部分代码省略.........
示例3: energy_function
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import sum [as 别名]
def energy_function(self):
r"""
Returns the energy function of ``self`` for untwisted types.
For level zero LS paths `\pi \in \mathbb{B}_\mathrm{cl}(\lambda)`, the energy function is defined as follows:
.. MATH::
D(\pi)=-\sum_{u=1}^{s-1} (1-\sigma_{u}) \langle \lambda,\mathrm{wt}(b_{u}) \rangle
To make sense of this equation, we first need some definitions.
Let us write the LS path (or ``self``) as a piecewise linear map
.. MATH::
\pi(t)=\sum_{u'=1}^{u-1} (\sigma_{u'}-\sigma_{u'-1})x_{u'}+(t-\sigma_{u-1})x_{u}
for `\sigma_{u-1} \le t \le \sigma_{u}` and `1 \le u \le s`.
Here `b_{u}` is a shortest directed path from `x_{u+1}` to `x_{u}` in the parabolic quantum
Bruhat graph.
For any `x,y\in W/W_J`, where `W_J` is a parabolic subgroup of `W` (the stabilizer of the weight `\lambda`), let
.. MATH::
d: x= w_{0} \stackrel{\beta_{1}}{\leftarrow}
w_{1} \stackrel{\beta_{2}}{\leftarrow} \cdots
\stackrel{\beta_{n}}{\leftarrow} w_{n}=y
be a shortest path in the parabolic quantum Bruhat graph. The weight is defined as
.. MATH::
\mathrm{wt}(d):=\sum_{ \begin{subarray}{c}
1 \le k \le n \text{ such that } \\
w_{k-1} \stackrel{\beta_{k}}{\leftarrow} w_{k}
\text{ is a down arrow}
\end{subarray}
}
\beta_{k}^{\vee}.
For more information, see [LNSSS2013]_.
REFERENCES:
.. [LNSSS2013] C. Lenart, S. Naito, D. Sagaki, A. Schilling, M. Shimozono,
A uniform model for Kirillov-Reshetikhin crystals. Extended abstract.
DMTCS proc, to appear ( {{{:arXiv:`1211.6019`}}} )
.. WARNING::
The energy function for LS paths is currently only implemented for
untwisted types!
EXAMPLES::
sage: R = RootSystem(['C',3,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(La[1]+La[3])
sage: b = LS.module_generators[0]
sage: c = b.f(1).f(3).f(2)
sage: c.energy_function()
0
sage: c=b.e(0)
sage: c.energy_function()
1
sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(2*La[1])
sage: b = LS.module_generators[0]
sage: c = b.e(0)
sage: c.energy_function()
1
sage: [c.energy_function() for c in sorted(LS.list())]
[0, 1, 0, 0, 0, 1, 0, 1, 0]
The next test checks that the energy function is constant on classically connected components::
sage: R = RootSystem(['A',2,1])
sage: La = R.weight_space().basis()
sage: LS = CrystalOfProjectedLevelZeroLSPaths(2*La[1]+La[2])
sage: G = LS.digraph(index_set=[1,2])
sage: C = G.connected_components()
sage: [all(c[0].energy_function()==a.energy_function() for a in c) for c in C]
[True, True, True, True]
"""
weight = self.parent().weight
c_weight = weight.parent().classical()(weight)
cartan = weight.parent().cartan_type().classical()
W = WeylGroup(cartan, prefix="s")
R = RootSystem(cartan).coroot_lattice()
G = W.quantum_bruhat_graph(tuple(weight.weyl_stabilizer()))
L = self.weyl_group_representation()
paths = [G.shortest_path(L[i + 1], L[i]) for i in range(len(L) - 1)]
paths_labels = [
[G.edge_label(p[i], p[i + 1]) for i in range(len(p) - 1) if p[i].length() + 1 != p[i + 1].length()]
for p in paths
]
#.........这里部分代码省略.........