*****************************************************************************
*       www.FindStat.org - The Combinatorial Statistic Finder               *
*                                                                           *
*       Copyright (C) 2019 The FindStatCrew <info@findstat.org>             *
*                                                                           *
*    This information is distributed in the hope that it will be useful,    *
*    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   *
*****************************************************************************

-----------------------------------------------------------------------------
Statistic identifier: St001173

-----------------------------------------------------------------------------
Collection: Finite Cartan types

-----------------------------------------------------------------------------
Description: The number of commutative positive roots in the root system of the given finite Cartan type.

An upper ideal $I$ in the root poset $\Phi^+$ is called '''abelian''' if $\alpha,\beta \in I$ implies that $\alpha+\beta \notin \Phi^+$. A positive root is called '''commutative''' if the upper ideal it generates is abelian.

The numbers are then given in [1, Theorem 4.4].

-----------------------------------------------------------------------------
References: [1]   Panyushev, D. I. The poset of positive roots and its relatives [[MathSciNet:2218851]] [[arXiv:math/0502385]]

-----------------------------------------------------------------------------
Code:
def statistic(cartan_type):
    n = cartan_type.rank()
    if cartan_type.letter in ["A","B","C","F","G"]:
        n1,n2,n3 = 0,0,0
    elif cartan_type.letter == "D":
        n1,n2,n3 = 1,1,n-3
    elif cartan_type.letter == "E":
        n1,n2,n3 = 1,2,n-4
    return binomial(n+1,2) + n1*n2*n3


-----------------------------------------------------------------------------
Statistic values:

['A',1]  => 1
['A',2]  => 3
['B',2]  => 3
['G',2]  => 3
['A',3]  => 6
['B',3]  => 6
['C',3]  => 6
['A',4]  => 10
['B',4]  => 10
['C',4]  => 10
['D',4]  => 11
['F',4]  => 10
['A',5]  => 15
['B',5]  => 15
['C',5]  => 15
['D',5]  => 17
['A',6]  => 21
['B',6]  => 21
['C',6]  => 21
['D',6]  => 24
['E',6]  => 25
['A',7]  => 28
['B',7]  => 28
['C',7]  => 28
['D',7]  => 32
['E',7]  => 34
['A',8]  => 36
['B',8]  => 36
['C',8]  => 36
['D',8]  => 41
['E',8]  => 44
['A',9]  => 45
['B',9]  => 45
['C',9]  => 45
['D',9]  => 51
['A',10] => 55
['B',10] => 55
['C',10] => 55
['D',10] => 62

-----------------------------------------------------------------------------
Created: May 02, 2018 at 16:59 by Christian Stump

-----------------------------------------------------------------------------
Last Updated: May 02, 2018 at 16:59 by Christian Stump