本文整理汇总了Python中cartan_type.CartanType.dual方法的典型用法代码示例。如果您正苦于以下问题:Python CartanType.dual方法的具体用法?Python CartanType.dual怎么用?Python CartanType.dual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cartan_type.CartanType
的用法示例。
在下文中一共展示了CartanType.dual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RootSystem
# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import dual [as 别名]
class RootSystem(UniqueRepresentation, SageObject):
r"""
A class for root systems.
EXAMPLES:
We construct the root system for type `B_3`::
sage: R=RootSystem(['B',3]); R
Root system of type ['B', 3]
``R`` models the root system abstractly. It comes equipped with various
realizations of the root and weight lattices, where all computations
take place. Let us play first with the root lattice::
sage: space = R.root_lattice()
sage: space
Root lattice of the Root system of type ['B', 3]
This is the free `\ZZ`-module `\bigoplus_i \ZZ.\alpha_i` spanned
by the simple roots::
sage: space.base_ring()
Integer Ring
sage: list(space.basis())
[alpha[1], alpha[2], alpha[3]]
Let us do some computations with the simple roots::
sage: alpha = space.simple_roots()
sage: alpha[1] + alpha[2]
alpha[1] + alpha[2]
There is a canonical pairing between the root lattice and the
coroot lattice::
sage: R.coroot_lattice()
Coroot lattice of the Root system of type ['B', 3]
We construct the simple coroots, and do some computations (see
comments about duality below for some caveat)::
sage: alphacheck = space.simple_coroots()
sage: list(alphacheck)
[alphacheck[1], alphacheck[2], alphacheck[3]]
We can carry over the same computations in any of the other
realizations of the root lattice, like the root space
`\bigoplus_i \QQ.\alpha_i`, the weight lattice
`\bigoplus_i \ZZ.\Lambda_i`, the weight
space `\bigoplus_i \QQ.\Lambda_i`. For example::
sage: space = R.weight_space()
sage: space
Weight space over the Rational Field of the Root system of type ['B', 3]
::
sage: space.base_ring()
Rational Field
sage: list(space.basis())
[Lambda[1], Lambda[2], Lambda[3]]
::
sage: alpha = space.simple_roots()
sage: alpha[1] + alpha[2]
Lambda[1] + Lambda[2] - 2*Lambda[3]
The fundamental weights are the dual basis of the coroots::
sage: Lambda = space.fundamental_weights()
sage: Lambda[1]
Lambda[1]
::
sage: alphacheck = space.simple_coroots()
sage: list(alphacheck)
[alphacheck[1], alphacheck[2], alphacheck[3]]
::
sage: [Lambda[i].scalar(alphacheck[1]) for i in space.index_set()]
[1, 0, 0]
sage: [Lambda[i].scalar(alphacheck[2]) for i in space.index_set()]
[0, 1, 0]
sage: [Lambda[i].scalar(alphacheck[3]) for i in space.index_set()]
[0, 0, 1]
Let us use the simple reflections. In the weight space, they
work as in the *number game*: firing the node `i` on an
element `x` adds `c` times the simple root
`\alpha_i`, where `c` is the coefficient of
`i` in `x`::
sage: s = space.simple_reflections()
sage: Lambda[1].simple_reflection(1)
-Lambda[1] + Lambda[2]
sage: Lambda[2].simple_reflection(1)
#.........这里部分代码省略.........
示例2: RootSystem
# 需要导入模块: from cartan_type import CartanType [as 别名]
# 或者: from cartan_type.CartanType import dual [as 别名]
class RootSystem(UniqueRepresentation, SageObject):
r"""
A class for root systems.
EXAMPLES:
We construct the root system for type `B_3`::
sage: R=RootSystem(['B',3]); R
Root system of type ['B', 3]
``R`` models the root system abstractly. It comes equipped with various
realizations of the root and weight lattices, where all computation
take place. Let us play first with the root lattice::
sage: space = R.root_lattice()
sage: space
Root lattice of the Root system of type ['B', 3]
It is the free `\ZZ`-module
`\bigoplus_i \ZZ.\alpha_i` spanned by the simple
roots::
sage: space.base_ring()
Integer Ring
sage: list(space.basis())
[alpha[1], alpha[2], alpha[3]]
Let us do some computations with the simple roots::
sage: alpha = space.simple_roots()
sage: alpha[1] + alpha[2]
alpha[1] + alpha[2]
There is a canonical pairing between the root lattice and the
coroot lattice::
sage: R.coroot_lattice()
Coroot lattice of the Root system of type ['B', 3]
We construct the simple coroots, and do some computations (see
comments about duality below for some caveat)::
sage: alphacheck = space.simple_coroots()
sage: list(alphacheck)
[alphacheck[1], alphacheck[2], alphacheck[3]]
We can carry over the same computations in any of the other
realizations of the root lattice, like the root space
`\bigoplus_i \QQ.\alpha_i`, the weight lattice
`\bigoplus_i \ZZ.\Lambda_i`, the weight
space `\bigoplus_i \QQ.\Lambda_i`. For example::
sage: space = R.weight_space()
sage: space
Weight space over the Rational Field of the Root system of type ['B', 3]
::
sage: space.base_ring()
Rational Field
sage: list(space.basis())
[Lambda[1], Lambda[2], Lambda[3]]
::
sage: alpha = space.simple_roots()
sage: alpha[1] + alpha[2]
Lambda[1] + Lambda[2] - 2*Lambda[3]
The fundamental weights are the dual basis of the coroots::
sage: Lambda = space.fundamental_weights()
sage: Lambda[1]
Lambda[1]
::
sage: alphacheck = space.simple_coroots()
sage: list(alphacheck)
[alphacheck[1], alphacheck[2], alphacheck[3]]
::
sage: [Lambda[i].scalar(alphacheck[1]) for i in space.index_set()]
[1, 0, 0]
sage: [Lambda[i].scalar(alphacheck[2]) for i in space.index_set()]
[0, 1, 0]
sage: [Lambda[i].scalar(alphacheck[3]) for i in space.index_set()]
[0, 0, 1]
Let us use the simple reflections. In the weight space, they
work as in the *number game*: firing the node `i` on an
element `x` adds `c` times the simple root
`\alpha_i`, where `c` is the coefficient of
`i` in `x`::
sage: s = space.simple_reflections()
sage: Lambda[1].simple_reflection(1)
-Lambda[1] + Lambda[2]
#.........这里部分代码省略.........