Beispiel #1
0
    def _s_to_sp_on_basis(self, lam):
        r"""
        Return the Schur symmetric function ``s[lam]`` expanded in
        the symplectic basis, where ``lam`` is a partition.

        INPUT:

        - ``lam`` -- a partition

        OUTPUT:

        - the expansion of ``s[lam]`` in the symplectic basis ``self``

        EXAMPLES::

            sage: Sym = SymmetricFunctions(QQ)
            sage: s = Sym.schur()
            sage: sp = Sym.symplectic()
            sage: sp._s_to_sp_on_basis(Partition([]))
            sp[]
            sage: sp._s_to_sp_on_basis(Partition([4,2,1]))
            sp[2, 1] + sp[3] + sp[3, 1, 1] + sp[3, 2] + sp[4, 1] + sp[4, 2, 1]
            sage: s(sp._s_to_sp_on_basis(Partition([3,1]))) == s[3,1]
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._from_dict({ mu: R.sum( lrcalc.lrcoef_unsafe(lam, mu, sum([[x,x] for x in nu], []))
                                            for nu in Partitions(j) )
                                 for j in range(n//2+1) # // 2 for vertical dominoes
                                 for mu in Partitions(n-2*j) })
Beispiel #2
0
    def _sp_to_s_on_basis(self, lam):
        r"""
        Return the symplectic symmetric function ``sp[lam]`` expanded in
        the Schur basis, where ``lam`` is a partition.

        TESTS:

        Check that this is the inverse::

            sage: sp = SymmetricFunctions(QQ).sp()
            sage: s = SymmetricFunctions(QQ).s()
            sage: all(sp(s(sp[la])) == sp[la] for i in range(5) for la in Partitions(i))
            True
            sage: all(s(sp(s[la])) == s[la] for i in range(5) for la in Partitions(i))
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._s._from_dict({ mu: R.sum( (-1)**j * lrcalc.lrcoef_unsafe(lam, mu, nu)
                                               for nu in Partitions(2*j)
                                                   if all(nu.leg_length(i,i) == nu.arm_length(i,i)+1
                                                          for i in range(nu.frobenius_rank()))
                                             )
                                    for j in range(n//2+1) # // 2 for horizontal dominoes
                                    for mu in Partitions(n-2*j) })
Beispiel #3
0
    def _s_to_o_on_basis(self, lam):
        r"""
        Return the Schur symmetric function ``s[lam]`` expanded in
        the orthogonal basis, where ``lam`` is a partition.

        INPUT:

        - ``lam`` -- a partition

        OUTPUT:

        - the expansion of ``s[lam]`` in the orthogonal basis ``self``

        EXAMPLES::

            sage: Sym = SymmetricFunctions(QQ)
            sage: s = Sym.schur()
            sage: o = Sym.orthogonal()
            sage: o._s_to_o_on_basis(Partition([]))
            o[]
            sage: o._s_to_o_on_basis(Partition([4,2,1]))
            o[1] + 2*o[2, 1] + o[2, 2, 1] + o[3]
             + o[3, 1, 1] + o[3, 2] + o[4, 1] + o[4, 2, 1]
            sage: s(o._s_to_o_on_basis(Partition([3,1]))) == s[3,1]
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._from_dict({
            mu: R.sum(
                lrcalc.lrcoef_unsafe(lam, mu, [2 * x for x in nu])
                for nu in Partitions(j))
            for j in range(n // 2 + 1)  # // 2 for horizontal dominoes
            for mu in Partitions(n - 2 * j)
        })
Beispiel #4
0
    def _o_to_s_on_basis(self, lam):
        r"""
        Return the orthogonal symmetric function ``o[lam]`` expanded in
        the Schur basis, where ``lam`` is a partition.

        TESTS:

        Check that this is the inverse::

            sage: o = SymmetricFunctions(QQ).o()
            sage: s = SymmetricFunctions(QQ).s()
            sage: all(o(s(o[la])) == o[la] for i in range(5) for la in Partitions(i))
            True
            sage: all(s(o(s[la])) == s[la] for i in range(5) for la in Partitions(i))
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._s._from_dict({
            mu: R.sum((-1)**j * lrcalc.lrcoef_unsafe(lam, mu, nu)
                      for nu in Partitions(2 * j) if all(
                          nu.arm_length(i, i) == nu.leg_length(i, i) + 1
                          for i in range(nu.frobenius_rank())))
            for j in range(n // 2 + 1)  # // 2 for horizontal dominoes
            for mu in Partitions(n - 2 * j)
        })
Beispiel #5
0
    def _s_to_o_on_basis(self, lam):
        r"""
        Return the Schur symmetric function ``s[lam]`` expanded in
        the orthogonal basis, where ``lam`` is a partition.

        INPUT:

        - ``lam`` -- a partition

        OUTPUT:

        - the expansion of ``s[lam]`` in the orthogonal basis ``self``

        EXAMPLES::

            sage: Sym = SymmetricFunctions(QQ)
            sage: s = Sym.schur()
            sage: o = Sym.orthogonal()
            sage: o._s_to_o_on_basis(Partition([]))
            o[]
            sage: o._s_to_o_on_basis(Partition([4,2,1]))
            o[1] + 2*o[2, 1] + o[2, 2, 1] + o[3]
             + o[3, 1, 1] + o[3, 2] + o[4, 1] + o[4, 2, 1]
            sage: s(o._s_to_o_on_basis(Partition([3,1]))) == s[3,1]
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._from_dict({ mu: R.sum( lrcalc.lrcoef_unsafe(lam, mu, [2*x for x in nu])
                                            for nu in Partitions(j) )
                                 for j in range(n//2+1) # // 2 for horizontal dominoes
                                 for mu in Partitions(n-2*j) })
Beispiel #6
0
    def _s_to_sp_on_basis(self, lam):
        r"""
        Return the Schur symmetric function ``s[lam]`` expanded in
        the symplectic basis, where ``lam`` is a partition.

        INPUT:

        - ``lam`` -- a partition

        OUTPUT:

        - the expansion of ``s[lam]`` in the symplectic basis ``self``

        EXAMPLES::

            sage: Sym = SymmetricFunctions(QQ)
            sage: s = Sym.schur()
            sage: sp = Sym.symplectic()
            sage: sp._s_to_sp_on_basis(Partition([]))
            sp[]
            sage: sp._s_to_sp_on_basis(Partition([4,2,1]))
            sp[2, 1] + sp[3] + sp[3, 1, 1] + sp[3, 2] + sp[4, 1] + sp[4, 2, 1]
            sage: s(sp._s_to_sp_on_basis(Partition([3,1]))) == s[3,1]
            True
        """
        R = self.base_ring()
        n = sum(lam)
        return self._from_dict({
            mu: R.sum(
                lrcalc.lrcoef_unsafe(lam, mu, sum([[x, x] for x in nu], []))
                for nu in Partitions(j))
            for j in range(n // 2 + 1)  # // 2 for vertical dominoes
            for mu in Partitions(n - 2 * j)
        })