# countTLexMon -- give the cardinality of the smallest initial t-lex segment containing a given monomial

## Synopsis

• Usage:
countTLexMon(u,t)
• Inputs:
• u, a t-spread monomial of a polynomial ring
• t, a positive integer that idenfies the t-spread contest
• Optional inputs:
• FixedMax => ..., default value false, optional boolean argument for tNextMon
• Outputs:
• an integer, the number of all the t-spread monomials greater than u, with respect to lexcografic order

## Description

the function countTLexMon(u,t) gives the cardinality of $L_t\{u\}$, the initial t-lex segment defined by u, that is, the number of all the t-spread monomials greater than u, with respect to $>_\mathrm{slex}.$
If FixedMax is true the function countTLexMon(u,t,FixedMax=>true) gives the number of all the t-spread monomials having maximum of the support equal to $\max\textrm{supp}(u)$ and greater than u, with respect to $>_\mathrm{slex}.$
Given a $t$-spread monomial $u=x_{i_1}x_{i_2}\cdots x_{i_d}$, we define $\textrm{supp}(u)=\{i_1,i_2,\ldots, i_d\}$.
This method is not constructive. It uses a theoretical result to obtain the cardinality as the sum of suitable binomial coefficients. The procedure only concerns $\textrm{supp}(\texttt{u}),$ that is, the set $\{i_1,i_2,\ldots, i_d\}$, when $u=x_{i_1}x_{i_2}\cdots x_{i_d}$ is a $t$-spread monomial.

Examples:

 i1 : S=QQ[x_1..x_9] o1 = S o1 : PolynomialRing i2 : countTLexMon(x_2*x_5*x_8,2) o2 = 21 i3 : countTLexMon(x_2*x_5*x_8,3) o3 = 7