def scalar(self, x): r""" Returns the standard scalar product of self and x. Note that the power-sum symmetric functions are orthogonal under this scalar product. The value of `\langle p_\lambda, p_\lambda \rangle` is given by the size of the centralizer in `S_n` of a permutation of cycle type `\lambda`. EXAMPLES:: sage: p = SFAPower(QQ) sage: p4 = Partitions(4) sage: matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4]) [ 4 0 0 0 0] [ 0 3 0 0 0] [ 0 0 8 0 0] [ 0 0 0 4 0] [ 0 0 0 0 24] """ parent = self.parent() R = parent.base_ring() x = parent(x) f = lambda part1, part2: sfa.zee(part1) return parent._apply_multi_module_morphism(self, x, f, orthogonal=True)
def scalar(self, x, zee=None): r""" Return the standard scalar product of ``self`` and ``x``. INPUT: - ``x`` -- a power sum symmetric function - ``zee`` -- (default: uses standard ``zee`` function) optional input specifying the scalar product on the power sum basis with normalization `\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)`. ``zee`` should be a function on partitions. Note that the power-sum symmetric functions are orthogonal under this scalar product. With the default value of ``zee``, the value of `\langle p_{\lambda}, p_{\lambda} \rangle` is given by the size of the centralizer in `S_n` of a permutation of cycle type `\lambda`. OUTPUT: - the standard scalar product between ``self`` and ``x``, or, if the optional parameter ``zee`` is specified, then the scalar product with respect to the normalization `\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)` with the power sum basis elements being orthogonal EXAMPLES:: sage: p = SymmetricFunctions(QQ).p() sage: p4 = Partitions(4) sage: matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4]) [ 4 0 0 0 0] [ 0 3 0 0 0] [ 0 0 8 0 0] [ 0 0 0 4 0] [ 0 0 0 0 24] sage: p(0).scalar(p(1)) 0 sage: p(1).scalar(p(2)) 2 sage: zee = lambda x : 1 sage: matrix( [[p[la].scalar(p[mu], zee) for la in Partitions(3)] for mu in Partitions(3)]) [1 0 0] [0 1 0] [0 0 1] """ parent = self.parent() x = parent(x) if zee is None: f = lambda part1, part2: sfa.zee(part1) else: f = lambda part1, part2: zee(part1) return parent._apply_multi_module_morphism(self, x, f, orthogonal=True)
def scalar(self, x, zee=None): r""" Return the standard scalar product of ``self`` and ``x``. INPUT: - ``x`` -- an power sum symmetric function - ``zee`` -- (default: uses standard ``zee`` function) optional input specifying the scalar product on the power sum basis with normalization `\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)`. ``zee`` should be a function on partitions. Note that the power-sum symmetric functions are orthogonal under this scalar product. With the default value of ``zee``, the value of `\langle p_{\lambda}, p_{\lambda} \rangle` is given by the size of the centralizer in `S_n` of a permutation of cycle type `\lambda`. OUTPUT: - the standard scalar product between ``self`` and ``x``, or, if the optional parameter ``zee`` is specified, then the scalar product with respect to the normalization `\langle p_{\mu}, p_{\mu} \rangle = \mathrm{zee}(\mu)` with the power sum basis elements being orthogonal EXAMPLES:: sage: p = SymmetricFunctions(QQ).p() sage: p4 = Partitions(4) sage: matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4]) [ 4 0 0 0 0] [ 0 3 0 0 0] [ 0 0 8 0 0] [ 0 0 0 4 0] [ 0 0 0 0 24] sage: p(0).scalar(p(1)) 0 sage: p(1).scalar(p(2)) 2 sage: zee = lambda x : 1 sage: matrix( [[p[la].scalar(p[mu], zee) for la in Partitions(3)] for mu in Partitions(3)]) [1 0 0] [0 1 0] [0 0 1] """ parent = self.parent() x = parent(x) if zee is None: f = lambda part1, part2: sfa.zee(part1) else: f = lambda part1, part2: zee(part1) return parent._apply_multi_module_morphism(self, x, f, orthogonal=True)