本文整理汇总了Python中cartan_type.CartanType.rank方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.rank方法的具体用法?Python CartanType.rank怎么用?Python CartanType.rank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cartan_type.CartanType
的用法示例。
在下文中一共展示了CartanType.rank方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WeylDim
# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import rank [as 别名]
def WeylDim(ct, coeffs):
"""
The Weyl Dimension Formula.
INPUT:
- ``type`` - a Cartan type
- ``coeffs`` - a list of nonnegative integers
The length of the list must equal the rank type[1]. A dominant
weight hwv is constructed by summing the fundamental weights with
coefficients from this list. The dimension of the irreducible
representation of the semisimple complex Lie algebra with highest
weight vector hwv is returned.
EXAMPLES:
For `SO(7)`, the Cartan type is `B_3`, so::
sage: WeylDim(['B',3],[1,0,0]) # standard representation of SO(7)
7
sage: WeylDim(['B',3],[0,1,0]) # exterior square
21
sage: WeylDim(['B',3],[0,0,1]) # spin representation of spin(7)
8
sage: WeylDim(['B',3],[1,0,1]) # sum of the first and third fundamental weights
48
sage: [WeylDim(['F',4],x) for x in [1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
[52, 1274, 273, 26]
sage: [WeylDim(['E', 6], x) for x in [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0]]
[1, 78, 27, 351, 351, 351, 27, 650, 351]
"""
ct = CartanType(ct)
lattice = RootSystem(ct).ambient_space()
rank = ct.rank()
fw = lattice.fundamental_weights()
hwv = lattice.sum(coeffs[i]*fw[i+1] for i in range(min(rank, len(coeffs))))
return lattice.weyl_dimension(hwv)