Alphabeta Math
Session-authored (Fable 5 assisted)
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

20 results · all verified · 11 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 9 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Permutation Statistics, Inversions and Eulerian Numbers

1 · Prerequisites

2 · Summary

Finite symmetric groups, one-line notation, inversions, cycle decomposition, binomial coefficients, factorials, and the symbolic-method page provide the background for this development. Those items fix the inversion convention, give the product counts behind Lehmer codes, supply the cycle-form seam used by Foata's fundamental transformation, and provide the formal power-series language used when the Eulerian-polynomial exponential generating function is written.

The page defines descents, major index, excedances, Eulerian numbers, q-factorials, Lehmer codes, and the weak and Bruhat orders. It then proves the Lehmer-code bijection and MacMahon's inversion enumerator, constructs Foata's transformations to compare major index, descents, and excedances with inversions, and closes with the Eulerian recurrence, Worpitzky's identity, and the Eulerian-polynomial exponential generating function.

3 · Logical flowchart

4 · Definitions, theorems and proofs

RemarkRemark: AI-adaptedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

This page uses the published inversion number and the shifted Eulerian indexing A(n,k)

This page keeps the published inversion convention of Inversions, inversion number, the sign sgn(σ)=(1)inv(σ), and even and odd permutations exactly as written: permutations act on n={0,1,,n1}, and an inversion is a pair (i,j) with i<j<n and σ(i)>σ(j). Nothing here reverses that orientation or silently shifts to a 1,,n indexing set.

The same zero-based convention is used for descents and excedances, but the major index is still the classical sum of descent positions counted from 1. Thus a descent at the zero-based position i contributes i+1 to maj(σ).

The Eulerian number A(n,k) counts permutations of Sn with exactly k descents, so k ranges from 0 to n1 when n1. We also set A(0,0)=1, and the Eulerian polynomial is An(t)=k=0n1A(n,k)tk for n1 with A0(t)=1.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Descent sets, major index, excedances and fixed points of a permutation

Definition

Let nN and let σ=[σ(0),,σ(n1)]Sn.

The descent set of σ is

Des(σ):={i{0,,n2}:σ(i)>σ(i+1)},

and the descent number is

des(σ):=Des(σ).

Its major index is

maj(σ):=iDes(σ)(i+1).

The shift by 1 is the convention fixed in This page uses the published inversion number and the shifted Eulerian indexing A(n,k).

The excedance set of σ is

Exc(σ):={in:σ(i)>i},

and the excedance number is

exc(σ):=Exc(σ).

For later use, the anti-excedance set is

AExc(σ):={in:σ(i)<i},

and the fixed-point set is

Fix(σ):={in:σ(i)=i}.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Eulerian numbers and Eulerian polynomials

Definition

For nN and kN, the Eulerian number A(n,k) is the number of permutations of Sn with exactly k descents:

A(n,k):={σSn:des(σ)=k}.

Thus A(n,k)=0 unless 0kn1 when n1, and we set A(0,0)=1.

The Eulerian polynomial is

An(t):=k=0n1A(n,k)tk(n1),

with A0(t):=1.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The q-integer, q-factorial and q-multinomial coefficients

Definition

For nN, the q-integer is

[n]q:=1+q++qn1,

with [0]q:=0.

The q-factorial is

[n]q!:=i=1n[i]q,

so [0]q!:=1.

If k1,,krN satisfy k1++kr=n, the q-multinomial coefficient is

(nk1,,kr)q:=[n]q![k1]q![kr]q!.

These are polynomials in Z[q] once the integrality theorems of the page are proved; at this point they are formal expressions to be identified by their counting roles.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The Lehmer code of a permutation

Definition

Let σ=[σ(0),,σ(n1)]Sn. Its Lehmer code is the tuple

L(σ)=(1(σ),,n(σ))i=1n{0,,i1},

where

i(σ):={qn:ni<q<n and σ(q)<σ(ni)}.

So i(σ) counts how many entries to the right of position ni are smaller than the entry in that position. This is the usual inversion table read from right to left, which is why the i-th component ranges from 0 to i1.

For n=0, the Lehmer code is the unique element of the empty product.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The Lehmer code is a bijection Sni=1n{0,,i1}

Statement

For every nN, the Lehmer-code map

L:Sni=1n{0,,i1}

is a bijection.

Facts & Assumptions

Given: A natural number n and the Lehmer code map L:Sni=1n{0,,i1}.

[L1]

A function is bijective if it is both injective and surjective (Injection, surjection, bijection).

Proof

technique · constructive
1.1

For σSn, the component i(σ) counts entries to the right of position ni, and there are exactly i1 such positions, so 0i(σ)i1. Thus L(σ) lies in the stated codomain.

given
1.2

Conversely, let (c1,,cn) lie in the codomain. Begin with the increasing list R=[0,1,,n1] of unused values. For i=n,n1,,1, put in position ni the value of R having exactly ci smaller elements in R, and delete that value from R. This choice exists and is unique because R has i elements and 0ci<i. Call the resulting permutation σc.

construct
2.1

The permutation σc has Lehmer code (c1,,cn). At the stage for i, all values then left in R will occupy the i1 positions to the right of position ni. The chosen value has exactly ci smaller values in R, so exactly ci later entries of σc are smaller than it. This is the defining equality i(σc)=ci.

step 1.2algebra
3.1

The construction is unique. At position 0, all n values are unused and the code coordinate cn requires the entry with exactly cn smaller unused values. After deleting it, coordinate cn1 uniquely determines the next entry among the remaining values, and so on. Thus any permutation with code c is exactly σc. Step 2.1 gives surjectivity and this uniqueness gives injectivity.

step 1.2step 2.1L1
4.1

Therefore L is a bijection. The case n=0 is included: both sides are the singleton empty object.

step 3.1L1discharge-construct
CorollaryStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The Lehmer code gives Sn=n! again

Statement

For every nN,

Sn=n!.

Facts & Assumptions

Given: The Lehmer-code bijection Sni=1n{0,,i1}.

Proof

technique · direct
1.1

By [L1], Sn equals the cardinality of i=1n{0,,i1}. The i-th factor has cardinality i, so repeated use of [L2] shows that the whole product has cardinality 12n=n!.

L1L2algebra
2.1

Therefore Sn=n!. For n=0, both sides equal 1 because the codomain is the empty product.

step 1.1
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

The inversion generating function of Sn is [n]q!

Statement

For every nN,

σSnqinv(σ)=[n]q!.

Facts & Assumptions

Given: A natural number n.

[L1]

The Lehmer code is a bijection Sni=1n{0,,i1} (The Lehmer code is a bijection Sni=1n{0,,i1}).

[L2]

Proof

technique · constructive
1.1

For σSn with Lehmer code L(σ)=(1,,n), the inversion number is inv(σ)=1++n: the component i counts exactly the inversions whose left entry is the position ni.

L2algebra
2.1

By [L1] and step 1.1, σSnqinv(σ)=(1,,n)q1++n=i=1nj=0i1qj=i=1n[i]q=[n]q!.

step 1.1L1algebra
3.1

This is the claimed generating function identity. At n=0, both sides are 1.

step 2.1
DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Foata's recursive transformation on permutations

Definition

Write a permutation in one-line form as a word of distinct integers.

Let w be such a word and let x be an integer not appearing in w. Define a word γx(w) as follows.

If w is empty, put γx(w):=w. Otherwise inspect the last letter of w.

  • If the last letter of w is x, cut w immediately after each letter x.
  • If the last letter of w is >x, cut w immediately after each letter >x.

This factors w into nonempty blocks w=w1wr. For each block wj=ujyj with last letter yj, move the last letter to the front and write β(wj):=yjuj. Then set

γx(w):=β(w1)β(wr).

Now define Foata's transformation Φ recursively by

Φ(ϵ):=ϵ,Φ(wx):=γx(Φ(w))x,

where ϵ is the empty word and x is the last letter of the word wx.

This recursively transforms one-line words of permutations, hence permutations.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Foata's transformation is a bijection of Sn

Statement

For every nN, Foata's transformation Φ is a bijection SnSn.

Facts & Assumptions

Given: The recursive Foata transformation Φ of Foata's recursive transformation on permutations.

[L1]

A function is bijective if it is both injective and surjective (Injection, surjection, bijection).

Proof

technique · constructive
1.1

For a word v and a letter x, define δx(v) by the inverse block rule: if the first letter of v is x, cut v immediately before each later letter x; if the first letter is >x, cut immediately before each later letter >x; in each block move the first letter to the end. This undoes γx, because γx and δx use the same distinguished letters to recover the same blocks and then reverse the same cyclic move within each block.

construct
2.1

Define a recursive map Ψ by Ψ(ϵ)=ϵ and Ψ(vx)=Ψ(δx(v))x, where x is the last letter. Induction on word length, using step 1.1 at the last recursive step, gives Ψ(Φ(w))=w=Φ(Ψ(w)) for every permutation word w. Hence Ψ is a two-sided inverse to Φ.

step 1.1construct
3.1

A map with a two-sided inverse is bijective by [L1], so Φ is a bijection on Sn for every n.

step 2.1L1discharge-construct
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

Foata's transformation sends major index to inversion number

Statement

For every permutation σSn,

inv(Φ(σ))=maj(σ).

Facts & Assumptions

Given: A permutation word wx, where x is the last letter and w has length m.

[L1]

The major index is the sum of the descents of a permutation (Descent sets, major index, excedances and fixed points of a permutation).

Proof

technique · direct
1.1

For the empty word and for a one-letter word, both the major index and the inversion number are 0. Assume inductively that inv(Φ(w))=maj(w) for a word w of length m, and write r:=Φ(w). By definition, Φ(wx)=γx(r)x.

given
2.1

Suppose the last letter of w is x; equivalently, the last letter of r is x. Then the blocks of γx(r) have the form Ujyj with every letter of Uj strictly greater than x and yjx. Moving yj to the front removes exactly Uj inversions inside that block, while appending x at the end creates exactly Uj inversions with those same letters and no others. So inv(Φ(wx))=inv(r). In this case no new descent is created at the end of w, so maj(wx)=maj(w).

step 1.1L1algebra
2.2

Suppose instead that the last letter of w is >x. Then the blocks of γx(r) have the form Ujyj with every letter of Uj at most x and yj>x. Moving yj to the front creates exactly Uj new inversions inside that block, and appending x at the end creates one more inversion with each terminal letter yj. Summing over all blocks gives inv(Φ(wx))=inv(r)+m, because the block lengths add up to m. In this case appending x creates a new descent at the last position of w, so maj(wx)=maj(w)+m.

step 1.1L1algebra
3.1

The two cases of steps 2.1 and 2.2 are exhaustive, and in each one the change in inversion number equals the change in major index. The inductive hypothesis from step 1.1 therefore gives inv(Φ(wx))=maj(wx).

step 1.1step 2.1step 2.2
4.1

By induction on word length, inv(Φ(σ))=maj(σ) for every permutation σ.

step 3.1
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The major-index generating function of Sn is [n]q!

Statement

For every nN,

σSnqmaj(σ)=[n]q!.

Facts & Assumptions

Given: Foata's transformation and the inversion generating function of Sn.

[L0]

Foata's transformation is a bijection of Sn (Foata's transformation is a bijection of Sn).

[L1]

Foata's transformation sends major index to inversion number (Foata's transformation sends major index to inversion number).

[L2]

The inversion generating function of Sn is [n]q! (The inversion generating function of Sn is [n]q!).

Proof

technique · direct
1.1

By [L0], Foata's transformation is a bijection of Sn, so reindexing the sum over Sn by Φ and using [L1] gives σSnqmaj(σ)=σSnqinv(σ).

L0L1
2.1

Apply [L2] to the right-hand side.

step 1.1L2
DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Standard cycle form and Foata's fundamental transformation

Definition

Let σSn. Write its disjoint-cycle decomposition (Every permutation of a finite set is a product of pairwise disjoint cycles, uniquely up to reordering and cyclic rotation) and insert each omitted fixed point as a one-cycle, as permitted by the cycle-type convention of Support, fixed points, disjoint cycles, cycle length, disjoint-cycle decompositions, and cycle type. Then rewrite each cycle so that its largest entry appears first and order the cycles by increasing first entry. The result is the standard cycle form of σ.

Deleting the parentheses from that ordered list of cycles produces a word of length n whose entries are 0,,n1 each once. The corresponding permutation in one-line notation is Foata's fundamental transformation F(σ).

Example: if σ=(031)(2)(45), then the standard cycle form is (2)(310)(54) and F(σ)=[2,3,1,0,5,4].

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Under Foata's fundamental transformation, anti-excedances become descents

Statement

Let σSn and let w=F(σ) be Foata's fundamental transformation. Then a position j is a descent of w if and only if the entry w(j) is an anti-excedance of σ. In particular,

des(w)=AExc(σ).

Facts & Assumptions

Given: A permutation σSn, its standard cycle form

(a1,0a1,1a1,r11)(as,0as,1as,rs1),

with each first entry at,0 the largest in its cycle and a1,0<<as,0, and the one-line word w=F(σ) obtained by deleting the parentheses.

Proof

technique · direct
1.1

For every cycle and every 0j<rt1, the cycle notation means σ(at,j)=at,j+1. Therefore at,j is an anti-excedance of σ exactly when at,j+1<at,j, which is exactly the condition that the adjacent pair (at,j,at,j+1) contributes a descent in the stripped word w.

given
1.2

Across cycle boundaries, the stripped word has no descent: the last entry of cycle t is followed by the first entry at+1,0 of cycle t+1, and the standard cycle form orders these first entries increasingly, so at,rt1<at+1,0.

given
2.1

The last entry at,rt1 of a cycle is never an anti-excedance, because σ(at,rt1)=at,0 and at,0 is the largest element of the cycle.

step 1.1given
3.1

By steps 1.1, 2.1 and 1.2, the descents of w occur exactly at the entries of w that are anti-excedances of σ. Counting them gives des(w)=AExc(σ).

step 1.1step 2.1step 1.2
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Descents and excedances are equidistributed on Sn

Statement

For every nN and every kN, the number of permutations of Sn with exactly k descents equals the number with exactly k excedances.

Facts & Assumptions

Given: A natural number n, the order-reversing permutation c(i):=n1i of n, and the fundamental transformation F:SnSn.

[L1]

Under Foata's fundamental transformation, anti-excedances become descents (Under Foata's fundamental transformation, anti-excedances become descents).

Proof

technique · constructive
1.1

Define τ:=cσc. Then, for every in, τ(i)<i if and only if c(σ(c(i)))<i, which is equivalent to σ(c(i))>c(i). Thus i is an anti-excedance of τ exactly when c(i) is an excedance of σ, so AExc(τ)=exc(σ).

givenalgebra
1.2

The map στ=cσc is a bijection of Sn, because conjugation by a permutation has inverse itself. Also F is a bijection: from a one-line word, insert a left parenthesis before each left-to-right maximum and a closing parenthesis just before the next such maximum, or at the end, to recover the standard cycle form.

givenconstruct
2.1

By [L1], des(F(τ))=AExc(τ), which equals exc(σ) by step 1.1. Since step 1.2 makes σF(cσc) a bijection of Sn, the statistics des and exc are equidistributed.

step 1.1step 1.2L1discharge-construct
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

The Eulerian numbers satisfy A(n,k)=A(n,n1k)

Statement

For n1 and 0kn1,

A(n,k)=A(n,n1k).

Facts & Assumptions

Given: A natural number n1 and the value-complement map R(σ)(i):=n1σ(i) on Sn.

Proof

technique · direct
1.1

For every 0in2, one has R(σ)(i)>R(σ)(i+1) exactly when σ(i)<σ(i+1). Thus the descent set of R(σ) is the complement of the descent set of σ in {0,,n2}, and des(R(σ))=n1des(σ).

givenalgebra
2.1

The map R is a bijection of Sn, since applying it twice returns the original permutation. Therefore the number of permutations with k descents equals the number with n1k descents, which is exactly the displayed symmetry of the Eulerian numbers.

step 1.1given
TheoremStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

The Eulerian numbers satisfy A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1)

Statement

For n1 and every natural number k,

A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1),

where the Eulerian numbers are extended by A(m,j)=0 for j<0 or jm, except for the defining value A(0,0)=1.

Facts & Assumptions

Given: A natural number n1.

Proof

technique · direct
1.1

Take a permutation πSn1 and insert the new largest letter n1 into one of the n slots of its one-line notation. If a slot lies after a descent of π, or is the final slot, then the insertion preserves the number of descents: one old descent is replaced by one new descent, or no descent is created at the end. Every other slot creates one new descent.

given
2.1

If π has exactly k descents, step 1.1 gives exactly k+1 insertion slots producing a permutation of Sn with k descents. If π has exactly k1 descents, the remaining nk slots produce a permutation with k descents. These two cases are disjoint and exhaust the permutations of Sn with k descents.

step 1.1
3.1

Counting the two cases of step 2.1 gives A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1). The out-of-range convention makes the same formula correct at the boundary values of k.

step 2.1
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

Worpitzky's identity for n1

Statement

For every n,mN with n1,

mn=k=0n1A(n,k)(m+kn).

Facts & Assumptions

Given: Naturals n and m.

[L1]

The Eulerian numbers satisfy A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1) (The Eulerian numbers satisfy A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1)).

[L3]

A(1,0)=1 by the definition of Eulerian numbers (Eulerian numbers and Eulerian polynomials).

Proof

technique · induction
1.1

For n=1, [L3] makes the right-hand side (m1)=m=m1.

baseL3given
1.2

Assume the identity at n1, where n2, and write Wn(m):=k=0n1A(n,k)(m+kn).

ih
2.1

Using [L1] and shifting the second sum, Wn(m)=k=0n2A(n1,k)((k+1)(m+kn)+(nk1)(m+k+1n)).

step 1.2L1algebra
3.1

Fix k from step 2.1 and put M:=m+k. If n>M+1, then [L2] gives (Mn)=(M+1n)=(Mn1)=0, so the bracket in step 2.1 is 0=m(Mn1). If n=M+1, then (Mn)=0, (M+1n)=1, and (Mn1)=1, so the same bracket is (nk1)=m=m(Mn1). Finally, if nM, then Pascal's rule from [L2] gives (nk1)(M+1n)=(nk1)(Mn)+(nk1)(Mn1), and the closed-form identity from [L2] gives n(Mn)=(M+1n)(Mn1)=(m+k+1n)(Mn1). Substituting into the bracket of step 2.1 yields m(Mn1). So in every case that bracket simplifies to m(m+kn1).

step 2.1L2algebra
4.1

Steps 2.1 and 3.1 give Wn(m)=mk=0n2A(n1,k)(m+kn1), and the inductive hypothesis of step 1.2 makes this mmn1=mn.

step 1.2step 2.1step 3.1
5.1

This is the required identity.

step 4.1discharge-induction
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-26Open item page →

The Eulerian-polynomial exponential generating function in Q(t)x

Statement

In the formal power series ring Q(t)x, where t is an indeterminate,

n0An(t)xnn!=t1te(t1)x.

Facts & Assumptions

Given: The Eulerian recurrence, the Eulerian polynomials An(t)=k=0n1A(n,k)tk, and the formal series ring Q(t)x.

[L1]

The Eulerian numbers satisfy A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1) (The Eulerian numbers satisfy A(n,k)=(k+1)A(n1,k)+(nk)A(n1,k1)).

Proof

technique · direct
1.1

Summing [L1] against tk gives the polynomial recurrence An(t)=(1+(n1)t)An1(t)+t(1t)An1(t).

L1algebra
2.1

Let F(x,t):=n0An(t)xn/n!Q(t)x. Differentiating termwise in x and using step 1.1 yields (1tx)xF=F+t(1t)tF, with initial condition F(0,t)=1.

step 1.1algebra
3.1

Put G(x,t):=(t1)/(te(t1)x)Q(t)x; this is well defined because the denominator has nonzero constant term t1 in the coefficient field Q(t). Direct formal differentiation shows that G satisfies the same differential equation and the same initial condition as F. Since the recurrence of step 1.1 determines the coefficient of xn from lower degrees uniquely, the formal solution is unique, so F=G.

step 2.1L2algebra
4.1

Therefore n0An(t)xn/n!=(t1)/(te(t1)x).

step 3.1
DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The weak order on Sn by inversion-set inclusion

Definition

For σ,τSn, write

σweakτ:Inv(σ)Inv(τ),

where the inversion sets are those of Inversions, inversion number, the sign sgn(σ)=(1)inv(σ), and even and odd permutations.

This is the weak order on Sn used later on the combinatorics pathway.

DefinitionDefinition: AI-adaptedProof: Not applicablejudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The Bruhat order on Sn by rank inequalities

Definition

For σSn and 0p,q<n, define the rank number

rσ(p,q):={in:ip and σ(i)q}.

For σ,τSn, write

σBruhatτ:rσ(p,q)rτ(p,q) for every 0p,q<n.

This is the rank-inequality form of the Bruhat order.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The permutations of S4 tabulated by inversions, descents, major index and excedances

Example

For S4, the four statistics take the following values.

permutationinvdesmajexc
0 1 2 30000
0 1 3 21131
0 2 1 31121
0 2 3 12132
0 3 1 22121
0 3 2 13251
1 0 2 31111
1 0 3 22242
1 2 0 32122
1 2 3 03133
1 3 0 23122
1 3 2 04252
2 0 1 32111
2 0 3 13242
2 1 0 33231
2 1 3 04242
2 3 0 14122
2 3 1 05252
3 0 1 23111
3 0 2 14241
3 1 0 24231
3 1 2 05241
3 2 0 15232
3 2 1 06362

Facts & Assumptions

Given: The inversion generating function, the major-index generating function, and the equidistribution of descents and excedances on S4 (The inversion generating function of Sn is [n]q!, The major-index generating function of Sn is [n]q!, Descents and excedances are equidistributed on Sn).

Verification

technique · direct
1.1

The table is an exhaustive enumeration of the 24 one-line permutations of S4, with each statistic computed directly from its definition.

given
2.1

Reading off the distributions from the table gives 1+3q+5q2+6q3+5q4+3q5+q6 for inversions, the same polynomial for the major index, and (1,11,11,1) for both descents and excedances. This matches the three cited theorems.

step 1.1given
ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The Lehmer codes of S4 recover [4]q!

Example

For S4, the Lehmer-code codomain is

{0}×{0,1}×{0,1,2}×{0,1,2,3}.

Grouping these 24 code vectors by the sum of their coordinates gives

1+3q+5q2+6q3+5q4+3q5+q6,

which is [4]q!.

Facts & Assumptions

Given: The Lehmer code is a bijection S4{0}×{0,1}×{0,1,2}×{0,1,2,3} (The Lehmer code is a bijection Sni=1n{0,,i1}).

[L1]

The inversion generating function of S4 is [4]q! (The inversion generating function of Sn is [n]q!).

Verification

technique · direct
1.1

Every code vector has the form (0,a,b,c) with a{0,1}, b{0,1,2}, and c{0,1,2,3}, so there are 24 of them. Counting by the sum a+b+c gives the coefficient sequence 1,3,5,6,5,3,1.

givenalgebra
2.1

Therefore σS4qinv(σ)=1+3q+5q2+6q3+5q4+3q5+q6, which matches [L1].

step 1.1L1
ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

Foata's transformation on the permutation 2031

Example

Foata's transformation sends the permutation [2,0,3,1] to [2,3,0,1].

Facts & Assumptions

Given: Foata's recursive transformation and the major-index/inversion identity (Foata's recursive transformation on permutations, Foata's transformation sends major index to inversion number).

Verification

technique · constructive
1.1

Applying the recursion step by step gives Φ([2])=[2], then Φ([2,0])=[2,0], then Φ([2,0,3])=[2,0,3], and finally Φ([2,0,3,1])=[2,3,0,1].

construct
2.1

The original permutation has descents at positions 0 and 2, so maj([2,0,3,1])=1+3=4. The image [2,3,0,1] has inversions (2,0), (2,1), (3,0), and (3,1), so inv([2,3,0,1])=4. This matches the theorem.

step 1.1givendischarge-construct
ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passaudited 2026-08-26Open item page →

A(4,2)=11 by the recurrence, by Worpitzky's identity and by excedances

Example

The Eulerian number A(4,2) equals 11, and three different routes produce the same value.

Verification

technique · direct
1.1

The recurrence gives A(4,2)=3A(3,2)+2A(3,1)=31+24=11.

givenalgebra
1.2

Worpitzky's identity with n=4 and m=2 gives 24=A(4,2)(44)+A(4,3)(54), because the k=0,1 terms vanish. Since A(4,3)=1, this reads 16=A(4,2)+5, so again A(4,2)=11.

givenalgebra
2.1

By descents/excedances equidistribution, A(4,2) also counts permutations of S4 with exactly two excedances, and the S4 table on this companion page contains exactly 11 such permutations.

step 1.1given
ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The weak and Bruhat orders on S3

Example

On S3, the weak-order cover relations are

012021,012102,021120,102201,120210,201210,

while the Bruhat-order cover relations are

012021,012102,021120,021201,102120,102201,120210,201210.

So the Bruhat order is strictly finer than the weak order already on S3.

Facts & Assumptions

Given: The weak order by inversion inclusion and the Bruhat order by rank inequalities (The weak order on Sn by inversion-set inclusion, The Bruhat order on Sn by rank inequalities).

Verification

technique · direct
1.1

Computing inversion sets gives the six weak-order covers displayed above. In particular, 021 and 201 are incomparable in weak order because their inversion sets are {(1,2)} and {(0,1),(0,2)} respectively.

given
2.1

Computing the rank inequalities shows that 021<201 and 102<120 in Bruhat order, producing the two extra cover relations listed above. Thus Bruhat order is strictly finer than weak order on S3.

step 1.1given
CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passaudited 2026-08-26Open item page →

Two permutations can have the same descent set and different inversion numbers

Counterexample

The permutations [1,0,2] and [2,0,1] have the same descent set {0}, but their inversion numbers are 1 and 2 respectively.

Verification

technique · direct
1.1

For both permutations, the only descent is at position 0: in each case the first entry exceeds the second, while the second does not exceed the third.

given
2.1

The permutation [1,0,2] has one inversion, namely (1,0), while [2,0,1] has two inversions, namely (2,0) and (2,1). So the inversion numbers differ even though the descent sets agree.

step 1.1given
CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-5.6-terra)audited 2026-08-26Open item page →

The number of excedances is Eulerian but not Mahonian

Counterexample

The statistic exc is Eulerian, because it is equidistributed with descents, but it is not Mahonian: on S3 its distribution is 1,4,1, while the inversion distribution is 1,2,2,1.

Facts & Assumptions

Given: Descents and excedances are equidistributed (Descents and excedances are equidistributed on Sn), while the major-index generating function is [n]q! and so agrees with the inversion distribution (The major-index generating function of Sn is [n]q!).

Verification

technique · direct
1.1

On S3, the excedance counts are distributed as 1,4,1: there is one permutation with 0 excedances, four with 1, and one with 2.

given
2.1

On S3, the inversion numbers are distributed as 1,2,2,1 over 0,1,2,3. Since these two distributions are different, exc is not Mahonian.

step 1.1given
False statementConstruction: AI-adaptedVerification: AI-generatedprecheck passaudited 2026-08-26Open item page →

FALSE: the major index equals the inversion number for every permutation

Statement

False claim: for every permutation σ, one has

maj(σ)=inv(σ).

What is true is the weaker distributional statement of The major-index generating function of Sn is [n]q!.

Refutation

technique · direct
1.1

Take σ=[2,0,1]. Its only descent is at position 0, so maj(σ)=1.

given
2.1

The same permutation has two inversions, namely (2,0) and (2,1), so inv(σ)=2. Therefore maj(σ)inv(σ), and the claim is false.

step 1.1given

Sources