Esempio n. 1
0
    def stanley_symm_poly_weight(self, w):
        r"""
        Returns the weight of a Pieri factor to be used in the definition of Stanley
        symmetric functions.  For type C, this weight is the number of connected
        components of the support (the indices appearing in a reduced word) of
        an element.

        EXAMPLES::

            sage: W = WeylGroup(['C',5,1])
            sage: PF = W.pieri_factors()
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([1,3]))
            2
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([1,3,2,0]))
            1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([5,3,0]))
            3
            sage: PF.stanley_symm_poly_weight(W.one())
            0
        """
        # The algorithm="delete" is a workaround when the set of
        # vertices is empty, in which case subgraph tries another
        # method which turns out to currently fail with Dynkin diagrams
        return DiGraph(DynkinDiagram(w.parent().cartan_type())).subgraph(
            set(w.reduced_word()),
            algorithm="delete").connected_components_number()
Esempio n. 2
0
    def dynkin_diagram(self):
        """
        Return the Dynkin diagram corresponding to ``self``.

        EXAMPLES::

            sage: C = CartanMatrix(['A',2])
            sage: C.dynkin_diagram()
            O---O
            1   2
            A2
            sage: C = CartanMatrix(['F',4,1])
            sage: C.dynkin_diagram()
            O---O---O=>=O---O
            0   1   2   3   4
            F4~
            sage: C = CartanMatrix([[2,-4],[-4,2]])
            sage: C.dynkin_diagram()
            Dynkin diagram of rank 2
        """
        from sage.combinat.root_system.dynkin_diagram import DynkinDiagram
        if self._cartan_type is not None:
            return DynkinDiagram(self._cartan_type)

        from dynkin_diagram import DynkinDiagram_class
        n = self.nrows()
        g = DynkinDiagram_class(self)
        for i in range(n):
            for j in range(n):
                if self[i, j] == -1:
                    g.add_edge(i, j)
                elif self[i, j] < -1:
                    g.add_edge(i, j, -self[i, j])
        return g
Esempio n. 3
0
    def stanley_symm_poly_weight(self, w):
        r"""
        Return the weight of `w`, to be used in the definition of
        Stanley symmetric functions.

        INPUT:

        - ``w`` -- a Pieri factor for this type

        For type `D`, this weight involves
        the number of components of the complement of the support of
        an element, where we consider `0` and `1` to be one node -- if `1`
        is in the support, then we pretend `0` in the support, and vice
        versa.  Similarly with `n-1` and `n`.  We also consider `0` and
        `1`, `n-1` and `n` to be one node for the purpose of counting
        components of the complement (as if the Dynkin diagram were
        that of type `C`).

        Type D Stanley symmetric polynomial weights are still
        conjectural.  The given weight comes from conditions on
        elements of the affine Fomin-Stanley subalgebra, but work is
        needed to show this weight is correct for affine Stanley
        symmetric functions -- see [LSS2009, Pon2010]_ for details.

        EXAMPLES::

            sage: W = WeylGroup(['D', 5, 1])
            sage: PF = W.pieri_factors()
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([5,2,1]))
            0
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([5,2,1,0]))
            0
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([5,2]))
            1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([]))
            0

            sage: W = WeylGroup(['D',7,1])
            sage: PF = W.pieri_factors()
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([2,4,6]))
            2
        """
        ct = w.parent().cartan_type()
        support = set(w.reduced_word())
        n = w.parent().n
        if 1 in support or 0 in support:
            support = support.union(set([1])).difference(set([0]))
        if n in support or n - 1 in support:
            support = support.union(set([n - 2])).difference(set([n - 1]))
        support_complement = set(range(1, n - 1)).difference(support)
        return DiGraph(DynkinDiagram(ct)).subgraph(
            support_complement).connected_components_number() - 1
Esempio n. 4
0
    def stanley_symm_poly_weight(self, w):
        r"""
        Return the weight of a Pieri factor to be used in the definition of
        Stanley symmetric functions.

        For type B, this weight involves the number of components of
        the complement of the support of an element, where we consider
        0 and 1 to be one node -- if 1 is in the support, then we
        pretend 0 in the support, and vice versa.  We also consider 0
        and 1 to be one node for the purpose of counting components of
        the complement (as if the Dynkin diagram were that of type C).
        Let n be the rank of the affine Weyl group in question (if
        type ``['B',k,1]`` then we have n = k+1).  Let ``chi(v.length() < n-1)``
        be the indicator function that is 1 if the length of v is
        smaller than n-1, and 0 if the length of v is greater than or
        equal to n-1.  If we call ``c'(v)`` the number of components of
        the complement of the support of v, then the type B weight is
        given by ``weight = c'(v) - chi(v.length() < n-1)``.

        EXAMPLES::

            sage: W = WeylGroup(['B',5,1])
            sage: PF = W.pieri_factors()
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([0,3]))
            1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([0,1,3]))
            1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([2,3]))
            1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([2,3,4,5]))
            0
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([0,5]))
            0
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([2,4,5,4,3,0]))
            -1
            sage: PF.stanley_symm_poly_weight(W.from_reduced_word([4,5,4,3,0]))
            0
        """
        ct = w.parent().cartan_type()
        support = set(w.reduced_word())
        if 1 in support or 0 in support:
            support_complement = set(
                ct.index_set()).difference(support).difference(set([0, 1]))
        else:
            support_complement = set(
                ct.index_set()).difference(support).difference(set([0]))
        return DiGraph(DynkinDiagram(ct)).subgraph(
            support_complement,
            algorithm="delete").connected_components_number() - 1
Esempio n. 5
0
    def dynkin_diagram(self):
        """
        Return the Dynkin diagram corresponding to ``self``.

        EXAMPLES::

            sage: C = CartanMatrix(['A',2])
            sage: C.dynkin_diagram()
            O---O
            1   2
            A2
            sage: C = CartanMatrix(['F',4,1])
            sage: C.dynkin_diagram()
            O---O---O=>=O---O
            0   1   2   3   4
            F4~
            sage: C = CartanMatrix([[2,-4],[-4,2]])
            sage: C.dynkin_diagram()
            Dynkin diagram of rank 2
        """
        from sage.combinat.root_system.dynkin_diagram import DynkinDiagram
        if self._cartan_type is not None:
            return DynkinDiagram(self._cartan_type)
        return DynkinDiagram(self)