本文整理匯總了Python中sage.combinat.sf.sf.SymmetricFunctions.m方法的典型用法代碼示例。如果您正苦於以下問題:Python SymmetricFunctions.m方法的具體用法?Python SymmetricFunctions.m怎麽用?Python SymmetricFunctions.m使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sage.combinat.sf.sf.SymmetricFunctions
的用法示例。
在下文中一共展示了SymmetricFunctions.m方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from sage.combinat.sf.sf import SymmetricFunctions [as 別名]
# 或者: from sage.combinat.sf.sf.SymmetricFunctions import m [as 別名]
def __init__(self, R):
"""
The Hopf algebra of quasi-symmetric functions.
See ``QuasiSymmetricFunctions`` for full documentation.
EXAMPLES::
sage: QuasiSymmetricFunctions(QQ)
Quasisymmetric functions over the Rational Field
sage: TestSuite(QuasiSymmetricFunctions(QQ)).run()
"""
assert R in Rings()
self._base = R # Won't be needed once CategoryObject won't override base_ring
category = GradedHopfAlgebras(R) # TODO: .Commutative()
Parent.__init__(self, category = category.WithRealizations())
# Bases
Monomial = self.Monomial()
Fundamental = self.Fundamental()
dualImmaculate = self.dualImmaculate()
# Change of bases
Fundamental.module_morphism(Monomial.sum_of_finer_compositions,
codomain=Monomial, category=category
).register_as_coercion()
Monomial .module_morphism(Fundamental.alternating_sum_of_finer_compositions,
codomain=Fundamental, category=category
).register_as_coercion()
#This changes dualImmaculate into Monomial
dualImmaculate.module_morphism(dualImmaculate._to_Monomial_on_basis,
codomain = Monomial, category = category
).register_as_coercion()
#This changes Monomial into dualImmaculate
Monomial.module_morphism(dualImmaculate._from_Monomial_on_basis,
codomain = dualImmaculate, category = category
).register_as_coercion()
# Embedding of Sym into QSym in the monomial bases
Sym = SymmetricFunctions(self.base_ring())
Sym_m_to_M = Sym.m().module_morphism(Monomial.sum_of_partition_rearrangements,
triangular='upper', inverse_on_support=Monomial._comp_to_par,
codomain=Monomial, category=category)
Sym_m_to_M.register_as_coercion()
self.to_symmetric_function = Sym_m_to_M.section()