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

-----------------------------------------------------------------------------
Collection: Permutations

-----------------------------------------------------------------------------
Description: The product of the cardinalities of the lower order ideal and upper order ideal generated by a permutation in weak order.

Let $a(\pi)$ denote this statistic, then $a(\pi)$ is the product of [1] and [2].  A result of Sidorenko [3] implies that $a(\pi) \geq n!$ when $\pi$ is a permutation of $n$, with equality if and only if $\pi$ avoids the patterns $2413$ and $3142$.  See [4] for a combinatorial proof and refinement.  Upper bounds for $a(\pi)$ are given in [5].

-----------------------------------------------------------------------------
References: [1]   [[St000100oMp00065oMp00064]]
[2]   [[St000100oMp00065]]
[3]   Sidorenko, A. Inequalities for the number of linear extensions [[DOI:10.1007/BF00571183]]
[4]   Gaetz, C., Gao, Y. Separable elements and splittings of Weyl groups [[arXiv:1911.11172]]
[5]   Bollobás, Béla, Brightwell, G., Sidorenko, A. Geometrical Techniques for Estimating Numbers of Linear Extensions [[DOI:10.1006/eujc.1999.0299]]

-----------------------------------------------------------------------------
Code:
def statistic(pi):
    a1=pi.permutation_poset().linear_extensions().cardinality()
    a2=pi.reverse().permutation_poset().linear_extensions().cardinality()
    return a1*a2


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

[1,2]       => 2
[2,1]       => 2
[1,2,3]     => 6
[1,3,2]     => 6
[2,1,3]     => 6
[2,3,1]     => 6
[3,1,2]     => 6
[3,2,1]     => 6
[1,2,3,4]   => 24
[1,2,4,3]   => 24
[1,3,2,4]   => 24
[1,3,4,2]   => 24
[1,4,2,3]   => 24
[1,4,3,2]   => 24
[2,1,3,4]   => 24
[2,1,4,3]   => 24
[2,3,1,4]   => 24
[2,3,4,1]   => 24
[2,4,1,3]   => 25
[2,4,3,1]   => 24
[3,1,2,4]   => 24
[3,1,4,2]   => 25
[3,2,1,4]   => 24
[3,2,4,1]   => 24
[3,4,1,2]   => 24
[3,4,2,1]   => 24
[4,1,2,3]   => 24
[4,1,3,2]   => 24
[4,2,1,3]   => 24
[4,2,3,1]   => 24
[4,3,1,2]   => 24
[4,3,2,1]   => 24
[1,2,3,4,5] => 120
[1,2,3,5,4] => 120
[1,2,4,3,5] => 120
[1,2,4,5,3] => 120
[1,2,5,3,4] => 120
[1,2,5,4,3] => 120
[1,3,2,4,5] => 120
[1,3,2,5,4] => 120
[1,3,4,2,5] => 120
[1,3,4,5,2] => 120
[1,3,5,2,4] => 125
[1,3,5,4,2] => 120
[1,4,2,3,5] => 120
[1,4,2,5,3] => 125
[1,4,3,2,5] => 120
[1,4,3,5,2] => 120
[1,4,5,2,3] => 120
[1,4,5,3,2] => 120
[1,5,2,3,4] => 120
[1,5,2,4,3] => 120
[1,5,3,2,4] => 120
[1,5,3,4,2] => 120
[1,5,4,2,3] => 120
[1,5,4,3,2] => 120
[2,1,3,4,5] => 120
[2,1,3,5,4] => 120
[2,1,4,3,5] => 120
[2,1,4,5,3] => 120
[2,1,5,3,4] => 120
[2,1,5,4,3] => 120
[2,3,1,4,5] => 120
[2,3,1,5,4] => 120
[2,3,4,1,5] => 120
[2,3,4,5,1] => 120
[2,3,5,1,4] => 126
[2,3,5,4,1] => 120
[2,4,1,3,5] => 125
[2,4,1,5,3] => 128
[2,4,3,1,5] => 120
[2,4,3,5,1] => 120
[2,4,5,1,3] => 126
[2,4,5,3,1] => 120
[2,5,1,3,4] => 126
[2,5,1,4,3] => 126
[2,5,3,1,4] => 121
[2,5,3,4,1] => 120
[2,5,4,1,3] => 126
[2,5,4,3,1] => 120
[3,1,2,4,5] => 120
[3,1,2,5,4] => 120
[3,1,4,2,5] => 125
[3,1,4,5,2] => 126
[3,1,5,2,4] => 128
[3,1,5,4,2] => 126
[3,2,1,4,5] => 120
[3,2,1,5,4] => 120
[3,2,4,1,5] => 120
[3,2,4,5,1] => 120
[3,2,5,1,4] => 126
[3,2,5,4,1] => 120
[3,4,1,2,5] => 120
[3,4,1,5,2] => 126
[3,4,2,1,5] => 120
[3,4,2,5,1] => 120
[3,4,5,1,2] => 120
[3,4,5,2,1] => 120
[3,5,1,2,4] => 126
[3,5,1,4,2] => 128
[3,5,2,1,4] => 126
[3,5,2,4,1] => 125
[3,5,4,1,2] => 120
[3,5,4,2,1] => 120
[4,1,2,3,5] => 120
[4,1,2,5,3] => 126
[4,1,3,2,5] => 120
[4,1,3,5,2] => 121
[4,1,5,2,3] => 126
[4,1,5,3,2] => 126
[4,2,1,3,5] => 120
[4,2,1,5,3] => 126
[4,2,3,1,5] => 120
[4,2,3,5,1] => 120
[4,2,5,1,3] => 128
[4,2,5,3,1] => 125
[4,3,1,2,5] => 120
[4,3,1,5,2] => 126
[4,3,2,1,5] => 120
[4,3,2,5,1] => 120
[4,3,5,1,2] => 120
[4,3,5,2,1] => 120
[4,5,1,2,3] => 120
[4,5,1,3,2] => 120
[4,5,2,1,3] => 120
[4,5,2,3,1] => 120
[4,5,3,1,2] => 120
[4,5,3,2,1] => 120
[5,1,2,3,4] => 120
[5,1,2,4,3] => 120
[5,1,3,2,4] => 120
[5,1,3,4,2] => 120
[5,1,4,2,3] => 120
[5,1,4,3,2] => 120
[5,2,1,3,4] => 120
[5,2,1,4,3] => 120
[5,2,3,1,4] => 120
[5,2,3,4,1] => 120
[5,2,4,1,3] => 125
[5,2,4,3,1] => 120
[5,3,1,2,4] => 120
[5,3,1,4,2] => 125
[5,3,2,1,4] => 120
[5,3,2,4,1] => 120
[5,3,4,1,2] => 120
[5,3,4,2,1] => 120
[5,4,1,2,3] => 120
[5,4,1,3,2] => 120
[5,4,2,1,3] => 120
[5,4,2,3,1] => 120
[5,4,3,1,2] => 120
[5,4,3,2,1] => 120

-----------------------------------------------------------------------------
Created: Jul 09, 2020 at 14:21 by Christian Gaetz

-----------------------------------------------------------------------------
Last Updated: Jul 09, 2020 at 15:42 by Christian Stump