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

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

-----------------------------------------------------------------------------
Description: The size of a smallest Eulerian poset which does not appear as an interval in the Bruhat order of the Weyl group.

A bounded and graded poset is Eulerian if every non-trivial interval has the same number of elements of even and odd rank.

It is known that every interval of a Bruhat order is Eulerian.  This statistic yields the minimal cardinality of an Eulerian poset not appearing in the Bruhat order.

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

-----------------------------------------------------------------------------
Code:
def statistic(ct):
    W = WeylGroup(ct)
    P = W.bruhat_poset()
    intervals = set(P.subposet(P.interval(x, y)).canonical_label()
                    for x, y in P.relations_iterator())
    sizes = [i.cardinality() for i in intervals]
    sizes_counts = [sizes.count(i) for i in range(2, max(sizes) + 3, 2)]
    for i, c in enumerate(sizes_counts, 1):
        if c < len(eulerian_posets(2*i)):
            return 2*i


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

['A',1] => 4
['A',2] => 8
['B',2] => 8
['G',2] => 8
['A',3] => 8
['B',3] => 10
['C',3] => 10
['A',4] => 8
['B',4] => 10
['C',4] => 10

-----------------------------------------------------------------------------
Created: Mar 29, 2023 at 11:51 by Martin Rubey

-----------------------------------------------------------------------------
Last Updated: Mar 29, 2023 at 11:51 by Martin Rubey