本文整理汇总了Python中sage.combinat.root_system.root_system.RootSystem.cardinality方法的典型用法代码示例。如果您正苦于以下问题:Python RootSystem.cardinality方法的具体用法?Python RootSystem.cardinality怎么用?Python RootSystem.cardinality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.combinat.root_system.root_system.RootSystem
的用法示例。
在下文中一共展示了RootSystem.cardinality方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RationalCherednikAlgebra
# 需要导入模块: from sage.combinat.root_system.root_system import RootSystem [as 别名]
# 或者: from sage.combinat.root_system.root_system.RootSystem import cardinality [as 别名]
#.........这里部分代码省略.........
sage: R._product_coroot_root(1, 3)
((1, 0), (s1*s2*s3*s2*s1, 1/2*c), (s2*s3*s2, -1/2*c),
(s1*s2*s1, -1/2*c), (s1, 0), (s3, 0), (s2, 1/2*c))
"""
Q = RootSystem(self._cartan_type).root_lattice()
ac = Q.simple_coroot(i)
al = Q.simple_root(j)
R = self.base_ring()
terms = [( self._weyl.one(), self._t * R(ac.scalar(al)) )]
for s in self._reflections:
# p[0] is the root, p[1] is the coroot, p[2] the value c_s
pr, pc, c = self._reflections[s]
terms.append(( s, c * R(ac.scalar(pr) * pc.scalar(al)
/ pc.scalar(pr)) ))
return tuple(terms)
def degree_on_basis(self, m):
"""
Return the degree on the monomial indexed by ``m``.
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: [R.degree_on_basis(g.leading_support())
....: for g in R.algebra_generators()]
[1, 1, 0, 0, -1, -1]
"""
return m[0].length() - m[2].length()
@cached_method
def trivial_idempotent(self):
"""
Return the trivial idempotent of ``self``.
Let `e = |W|^{-1} \sum_{w \in W} w` is the trivial idempotent.
Thus `e^2 = e` and `eW = We`. The trivial idempotent is used
in the construction of the spherical Cherednik algebra from
the rational Cherednik algebra by `U_{c,t}(W) = e H_{c,t}(W) e`.
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: R.trivial_idempotent()
1/6*I + 1/6*s1 + 1/6*s2 + 1/6*s2*s1 + 1/6*s1*s2 + 1/6*s1*s2*s1
"""
coeff = self.base_ring()(~self._weyl.cardinality())
hd_one = self._hd.one() # root - a
h_one = self._h.one() # coroot - ac
return self._from_dict({(hd_one, w, h_one): coeff for w in self._weyl},
remove_zeros=False)
@cached_method
def deformed_euler(self):
"""
Return the element `eu_k`.
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: R.deformed_euler()
2*I + 2/3*a1*ac1 + 1/3*a1*ac2 + 1/3*a2*ac1 + 2/3*a2*ac2
+ s1 + s2 + s1*s2*s1
"""
I = self._cartan_type.index_set()
G = self.algebra_generators()
cm = ~CartanMatrix(self._cartan_type)
n = len(I)
ac = [G['ac'+str(i)] for i in I]
la = [sum(cm[i,j]*G['a'+str(I[i])] for i in range(n)) for j in range(n)]
return self.sum(ac[i]*la[i] for i in range(n))
@cached_method
def an_element(self):
"""
Return an element of ``self``.
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: R.an_element()
3*ac1 + 2*s1 + a1
"""
G = self.algebra_generators()
i = str(self._cartan_type.index_set()[0])
return G['a'+i] + 2*G['s'+i] + 3*G['ac'+i]
def some_elements(self):
"""
Return some elements of ``self``.
EXAMPLES::
sage: R = algebras.RationalCherednik(['A',2], 1, 1, QQ)
sage: R.some_elements()
[0, I, 3*ac1 + 2*s1 + a1, a1, a2, s1, s2, ac1, ac2]
"""
ret = [self.zero(), self.one(), self.an_element()]
ret += list(self.algebra_generators())
return ret