*****************************************************************************
*       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: St001788

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

-----------------------------------------------------------------------------
Description: The number of types of parabolic subgroups of the associated Weyl group.
Let $W$ be a Weyl group with simple generators $\mathcal{S} \subseteq W$. A subgroup of $W$ generated by a subset $X \subseteq \mathcal{S}$ is called standard parabolic subgroup. A parabolic subgroup is a subgroup of $W$ that is conjugate to a standard parabolic subgroup.
This is the number of all pairwise different types of subgroups of $W$ obtained as (standard) parabolic subgroups (including type $A_0$).

-----------------------------------------------------------------------------
References: 

-----------------------------------------------------------------------------
Code:
def statistic(cartanType):
    from sage.graphs.independent_sets import IndependentSets
    W = WeylGroup(cartanType)
    P = [item.reflection_to_root().to_ambient() for item in W.simple_reflections()]
    n = len(P)
    
    # realize generating sets of parabolic subgroups and angles between them as graph
    V = list(range(n))
    E = []
    for i in range(n):
        for j in range(i):
            if P[i].inner_product(P[j]) <= 0:
                x = (P[i].inner_product(P[j]))^2
                y = P[i].inner_product(P[i]) * P[j].inner_product(P[j])
                E.append([i, j, x/y])
    G = Graph([V, E], weighted=True)
    C = IndependentSets(G, maximal=False, complement=True)
    
    # count different Cartan types
    Types = []
    for c in C:
        g = G.subgraph(c).canonical_label(edge_labels=True)
        if g not in Types:
            Types.append(g)
    return len(Types)

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

['A',1] => 2
['A',2] => 3
['B',2] => 3
['G',2] => 3
['A',3] => 5
['B',3] => 6
['C',3] => 6
['A',4] => 7
['B',4] => 10
['C',4] => 10
['D',4] => 7
['F',4] => 8
['A',5] => 11
['B',5] => 16
['C',5] => 16
['D',5] => 12
['A',6] => 15
['B',6] => 25
['C',6] => 25
['D',6] => 19
['E',6] => 17
['A',7] => 22
['B',7] => 38
['C',7] => 38
['D',7] => 27
['E',7] => 29
['A',8] => 30
['B',8] => 56
['C',8] => 56
['D',8] => 42
['E',8] => 41
['C',2] => 3

-----------------------------------------------------------------------------
Created: May 03, 2022 at 14:54 by Dennis Jahn

-----------------------------------------------------------------------------
Last Updated: Feb 21, 2024 at 16:29 by Martin Rubey