本文整理汇总了Python中tableau.Tableau.column_stabilizer方法的典型用法代码示例。如果您正苦于以下问题:Python Tableau.column_stabilizer方法的具体用法?Python Tableau.column_stabilizer怎么用?Python Tableau.column_stabilizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tableau.Tableau
的用法示例。
在下文中一共展示了Tableau.column_stabilizer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: b
# 需要导入模块: from tableau import Tableau [as 别名]
# 或者: from tableau.Tableau import column_stabilizer [as 别名]
def b(tableau, star=0):
r"""
The column projection operator corresponding to the Young tableau
``tableau`` (which is supposed to contain every integer from
`1` to its size precisely once, but may and may not be standard).
This is the signed sum (in the group algebra of the relevant
symmetric group over `\QQ`) of all the permutations which
preserve the column of ``tableau`` (where the signs are the usual
signs of the permutations). It is called `b_{\text{tableau}}` in
[EtRT]_, Section 4.2.
EXAMPLES::
sage: from sage.combinat.symmetric_group_algebra import b
sage: b([[1,2]])
[1, 2]
sage: b([[1],[2]])
[1, 2] - [2, 1]
sage: b([])
[]
sage: b([[1, 2, 4], [5, 3]])
[1, 2, 3, 4, 5] - [1, 3, 2, 4, 5] - [5, 2, 3, 4, 1] + [5, 3, 2, 4, 1]
With the `l2r` setting for multiplication, the unnormalized
Young symmetrizer ``e(tableau)`` should be the product
``b(tableau) * a(tableau)`` for every ``tableau``. Let us check
this on the standard tableaux of size 5::
sage: from sage.combinat.symmetric_group_algebra import a, b, e
sage: all( e(t) == b(t) * a(t) for t in StandardTableaux(5) )
True
"""
t = Tableau(tableau)
if star:
t = t.restrict(t.size()-star)
cs = t.column_stabilizer().list()
n = t.size()
# This all should be over ZZ, not over QQ, but symmetric group
# algebras don't seem to preserve coercion (the one over ZZ
# doesn't coerce into the one over QQ even for the same n),
# and the QQ version of this method is more important, so let
# me stay with QQ.
# TODO: Fix this.
sgalg = SymmetricGroupAlgebra(QQ, n)
one = QQ.one()
P = permutation.Permutation
# Ugly hack for the case of an empty tableau, due to the
# annoyance of Permutation(Tableau([]).row_stabilizer()[0])
# being [1] rather than [] (which seems to have its origins in
# permutation group code).
# TODO: Fix this.
if len(tableau) == 0:
return sgalg.one()
cd = dict((P(v), v.sign()*one) for v in cs)
return sgalg._from_dict(cd)
示例2: e
# 需要导入模块: from tableau import Tableau [as 别名]
# 或者: from tableau.Tableau import column_stabilizer [as 别名]
def e(tableau, star=0):
"""
The unnormalized Young projection operator.
EXAMPLES::
sage: from sage.combinat.symmetric_group_algebra import e
sage: e([[1,2]])
[1, 2] + [2, 1]
sage: e([[1],[2]])
[1, 2] - [2, 1]
There are differing conventions for the order of the symmetrizers
and antisymmetrizers. This example illustrates our conventions::
sage: e([[1,2],[3]])
[1, 2, 3] + [2, 1, 3] - [3, 1, 2] - [3, 2, 1]
"""
t = Tableau(tableau)
if star:
t = t.restrict(t.size()-star)
mult = permutation_options['mult']
permutation_options['mult'] = 'l2r'
if t in e_cache:
res = e_cache[t]
else:
rs = t.row_stabilizer().list()
cs = t.column_stabilizer().list()
n = t.size()
QSn = SymmetricGroupAlgebra(QQ, n)
one = QQ(1)
P = permutation.Permutation
rd = dict((P(h), one) for h in rs)
sym = QSn._from_dict(rd)
cd = dict((P(v), v.sign()*one) for v in cs)
antisym = QSn._from_dict(cd)
res = antisym*sym
e_cache[t] = res
permutation_options['mult'] = mult
return res
示例3: e
# 需要导入模块: from tableau import Tableau [as 别名]
# 或者: from tableau.Tableau import column_stabilizer [as 别名]
def e(tableau, star=0):
"""
The unnormalized Young projection operator corresponding to
the Young tableau ``tableau`` (which is supposed to contain
every integer from `1` to its size precisely once, but may
and may not be standard).
EXAMPLES::
sage: from sage.combinat.symmetric_group_algebra import e
sage: e([[1,2]])
[1, 2] + [2, 1]
sage: e([[1],[2]])
[1, 2] - [2, 1]
sage: e([])
[]
There are differing conventions for the order of the symmetrizers
and antisymmetrizers. This example illustrates our conventions::
sage: e([[1,2],[3]])
[1, 2, 3] + [2, 1, 3] - [3, 1, 2] - [3, 2, 1]
"""
t = Tableau(tableau)
if star:
t = t.restrict(t.size()-star)
mult = permutation_options['mult']
permutation_options['mult'] = 'l2r'
if t in e_cache:
res = e_cache[t]
else:
rs = t.row_stabilizer().list()
cs = t.column_stabilizer().list()
n = t.size()
QSn = SymmetricGroupAlgebra(QQ, n)
one = QQ.one()
P = permutation.Permutation
rd = dict((P(h), one) for h in rs)
sym = QSn._from_dict(rd)
cd = dict((P(v), v.sign()*one) for v in cs)
antisym = QSn._from_dict(cd)
res = antisym*sym
# Ugly hack for the case of an empty tableau, due to the
# annoyance of Permutation(Tableau([]).row_stabilizer()[0])
# being [1] rather than [] (which seems to have its origins in
# permutation group code).
# TODO: Fix this.
if len(tableau) == 0:
res = QSn.one()
e_cache[t] = res
permutation_options['mult'] = mult
return res