本文整理汇总了Python中sage.combinat.root_system.root_system.RootSystem.from_reduced_word方法的典型用法代码示例。如果您正苦于以下问题:Python RootSystem.from_reduced_word方法的具体用法?Python RootSystem.from_reduced_word怎么用?Python RootSystem.from_reduced_word使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.root_system.RootSystem
的用法示例。
在下文中一共展示了RootSystem.from_reduced_word方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RationalCherednikAlgebra
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import from_reduced_word [as 别名]
#.........这里部分代码省略.........
The key we create is the tuple in the following order:
- overall degree
- length of the Weyl group element
- the Weyl group element
- the element of `\mathfrak{h}`
- the element of `\mathfrak{h}^*`
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: R.an_element()**2 # indirect doctest
9*ac1^2 + 10*I + 6*a1*ac1 + 6*s1 + 3/2*s2 + 3/2*s1*s2*s1 + a1^2
"""
return (self.degree_on_basis(t), t[1].length(), t[1], str(t[0]), str(t[2]))
@lazy_attribute
def _reflections(self):
"""
A dictionary of reflections to a pair of the associated root
and coroot.
EXAMPLES::
sage: R = algebras.RationalCherednik(['B',2], [1,2], 1, QQ)
sage: [R._reflections[k] for k in sorted(R._reflections, key=str)]
[(alpha[1], alphacheck[1], 1),
(alpha[1] + alpha[2], 2*alphacheck[1] + alphacheck[2], 2),
(alpha[2], alphacheck[2], 2),
(alpha[1] + 2*alpha[2], alphacheck[1] + alphacheck[2], 1)]
"""
d = {}
for r in RootSystem(self._cartan_type).root_lattice().positive_roots():
s = self._weyl.from_reduced_word(r.associated_reflection())
if r.is_short_root():
c = self._c[1]
else:
c = self._c[0]
d[s] = (r, r.associated_coroot(), c)
return d
def _repr_(self):
r"""
Return a string representation of ``self``.
EXAMPLES ::
sage: RationalCherednikAlgebra(['A',4], 2, 1, QQ)
Rational Cherednik Algebra of type ['A', 4] with c=2 and t=1
over Rational Field
sage: algebras.RationalCherednik(['B',2], [1,2], 1, QQ)
Rational Cherednik Algebra of type ['B', 2] with c_L=1 and c_S=2
and t=1 over Rational Field
"""
ret = "Rational Cherednik Algebra of type {} with ".format(self._cartan_type)
if self._cartan_type.is_simply_laced():
ret += "c={}".format(self._c[0])
else:
ret += "c_L={} and c_S={}".format(*self._c)
return ret + " and t={} over {}".format(self._t, self.base_ring())
def _repr_term(self, t):
"""
Return a string representation of the term indexed by ``t``.
EXAMPLES::