本文整理汇总了Python中sage.matrix.constructor.Matrix.nullity方法的典型用法代码示例。如果您正苦于以下问题:Python Matrix.nullity方法的具体用法?Python Matrix.nullity怎么用?Python Matrix.nullity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.matrix.constructor.Matrix
的用法示例。
在下文中一共展示了Matrix.nullity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GL_irreducible_character
# 需要导入模块: from sage.matrix.constructor import Matrix [as 别名]
# 或者: from sage.matrix.constructor.Matrix import nullity [as 别名]
#.........这里部分代码省略.........
sage: from sage.algebras.schur_algebra import GL_irreducible_character
sage: GL_irreducible_character(2, [7], GF(3))
m[4, 3] + m[6, 1] + m[7]
"""
mbasis = SymmetricFunctions(QQ).m()
r = sum(mu)
M = SchurTensorModule(KK, n, r)
A = M._schur
SGA = M._sga
# make ST the superstandard tableau of shape mu
from sage.combinat.tableau import from_shape_and_word
ST = from_shape_and_word(mu, range(1, r + 1), convention="English")
# make ell the reading word of the highest weight tableau of shape mu
ell = [i + 1 for i, l in enumerate(mu) for dummy in range(l)]
e = M.basis()[tuple(ell)] # the element e_l
# This is the notation `\{X\}` from just before (5.3a) of [GreenPoly]_.
S = SGA._indices
BracC = SGA._from_dict({S(x.tuple()): x.sign() for x in ST.column_stabilizer()}, remove_zeros=False)
f = e * BracC # M.action_by_symmetric_group_algebra(e, BracC)
# [Green, Theorem 5.3b] says that a basis of the Carter-Lusztig
# module V_\mu is given by taking this f, and multiplying by all
# xi_{i,ell} with ell as above and i semistandard.
carter_lusztig = []
for T in SemistandardTableaux(mu, max_entry=n):
i = tuple(flatten(T))
schur_rep = schur_representative_from_index(i, tuple(ell))
y = A.basis()[schur_rep] * e # M.action_by_Schur_alg(A.basis()[schur_rep], e)
carter_lusztig.append(y.to_vector())
# Therefore, we now have carter_lusztig as a list giving the basis
# of `V_\mu`
# We want to think of expressing this character as a sum of monomial
# symmetric functions.
# We will determine a basis element for each m_\lambda in the
# character, and we want to keep track of them by \lambda.
# That means that we only want to pick out the basis elements above for
# those semistandard words whose content is a partition.
contents = Partitions(r, max_length=n).list()
# all partitions of r, length at most n
# JJ will consist of a list for each element of `contents`,
# recording the list
# of semistandard tableaux words with that content
# graded_basis will consist of the a corresponding basis element
graded_basis = []
JJ = []
for i in range(len(contents)):
graded_basis.append([])
JJ.append([])
for T in SemistandardTableaux(mu, max_entry=n):
i = tuple(flatten(T))
# Get the content of T
con = [0] * n
for a in i:
con[a - 1] += 1
try:
P = Partition(con)
P_index = contents.index(P)
JJ[P_index].append(i)
schur_rep = schur_representative_from_index(i, tuple(ell))
x = A.basis()[schur_rep] * f # M.action_by_Schur_alg(A.basis()[schur_rep], f)
graded_basis[P_index].append(x.to_vector())
except ValueError:
pass
# There is an inner product on the Carter-Lusztig module V_\mu; its
# maximal submodule is exactly the kernel of the inner product.
# Now, for each possible partition content, we look at the graded piece of
# that degree, and we record how these elements pair with each of the
# elements of carter_lusztig.
# The kernel of this pairing is the part of this graded piece which is
# not in the irreducible module for \mu.
length = len(carter_lusztig)
phi = mbasis.zero()
for aa in range(len(contents)):
mat = []
for kk in range(len(JJ[aa])):
temp = []
for j in range(length):
temp.append(graded_basis[aa][kk].inner_product(carter_lusztig[j]))
mat.append(temp)
angle = Matrix(mat)
phi += (len(JJ[aa]) - angle.nullity()) * mbasis(contents[aa])
return phi