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.
Permutation Statistics, Inversions and Eulerian Numbers
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Formal Power Series
- Foundations of the Real Numbers for Analysis
- Group Actions, Orbits, Stabilisers and Cayley's Theorem
- Polynomial Rings, the Division Algorithm and Roots
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Symmetric Groups, Cycle Decomposition and the Sign Homomorphism
- The ZFC Axioms and the Basic Set Constructions
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, -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
This page uses the published inversion number and the shifted Eulerian indexing
This page keeps the published inversion convention of Inversions, inversion number, the sign , and even and odd permutations exactly as written: permutations act on , and an inversion is a pair with and . Nothing here reverses that orientation or silently shifts to a 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 . Thus a descent at the zero-based position contributes to .
The Eulerian number counts permutations of with exactly descents, so ranges from to when . We also set , and the Eulerian polynomial is for with .
Descent sets, major index, excedances and fixed points of a permutation
Definition
Let and let .
The descent set of is
and the descent number is
Its major index is
The shift by is the convention fixed in This page uses the published inversion number and the shifted Eulerian indexing .
The excedance set of is
and the excedance number is
For later use, the anti-excedance set is
and the fixed-point set is
Eulerian numbers and Eulerian polynomials
Definition
For and , the Eulerian number is the number of permutations of with exactly descents:
Thus unless when , and we set .
The Eulerian polynomial is
with .
The -integer, -factorial and -multinomial coefficients
Definition
For , the -integer is
with .
The -factorial is
so .
If satisfy , the -multinomial coefficient is
These are polynomials in once the integrality theorems of the page are proved; at this point they are formal expressions to be identified by their counting roles.
The Lehmer code of a permutation
Definition
Let . Its Lehmer code is the tuple
where
So counts how many entries to the right of position are smaller than the entry in that position. This is the usual inversion table read from right to left, which is why the -th component ranges from to .
For , the Lehmer code is the unique element of the empty product.
The Lehmer code is a bijection
Statement
For every , the Lehmer-code map
is a bijection.
Facts & Assumptions
Given: A natural number and the Lehmer code map .
A function is bijective if it is both injective and surjective (Injection, surjection, bijection).
Proof
For , the component counts entries to the right of position , and there are exactly such positions, so . Thus lies in the stated codomain.
Conversely, let lie in the codomain. Begin with the increasing list of unused values. For , put in position the value of having exactly smaller elements in , and delete that value from . This choice exists and is unique because has elements and . Call the resulting permutation .
The permutation has Lehmer code . At the stage for , all values then left in will occupy the positions to the right of position . The chosen value has exactly smaller values in , so exactly later entries of are smaller than it. This is the defining equality .
The construction is unique. At position , all values are unused and the code coordinate requires the entry with exactly smaller unused values. After deleting it, coordinate uniquely determines the next entry among the remaining values, and so on. Thus any permutation with code is exactly . Step 2.1 gives surjectivity and this uniqueness gives injectivity.
Therefore is a bijection. The case is included: both sides are the singleton empty object.
The Lehmer code gives again
Statement
For every ,
Facts & Assumptions
Given: The Lehmer-code bijection .
The Lehmer code is a bijection (The Lehmer code is a bijection ).
If and are finite then (The product rule: , and ).
Proof
By [L1], equals the cardinality of . The -th factor has cardinality , so repeated use of [L2] shows that the whole product has cardinality .
Therefore . For , both sides equal because the codomain is the empty product.
The inversion generating function of is
Statement
For every ,
Facts & Assumptions
Given: A natural number .
The Lehmer code is a bijection (The Lehmer code is a bijection ).
The inversion number is (Inversions, inversion number, the sign , and even and odd permutations).
Proof
For with Lehmer code , the inversion number is : the component counts exactly the inversions whose left entry is the position .
By [L1] and step 1.1, .
This is the claimed generating function identity. At , both sides are .
Foata's recursive transformation on permutations
Definition
Write a permutation in one-line form as a word of distinct integers.
Let be such a word and let be an integer not appearing in . Define a word as follows.
If is empty, put . Otherwise inspect the last letter of .
- If the last letter of is , cut immediately after each letter .
- If the last letter of is , cut immediately after each letter .
This factors into nonempty blocks . For each block with last letter , move the last letter to the front and write . Then set
Now define Foata's transformation recursively by
where is the empty word and is the last letter of the word .
This recursively transforms one-line words of permutations, hence permutations.
Foata's transformation is a bijection of
Statement
For every , Foata's transformation is a bijection .
Facts & Assumptions
Given: The recursive Foata transformation of Foata's recursive transformation on permutations.
A function is bijective if it is both injective and surjective (Injection, surjection, bijection).
Proof
For a word and a letter , define by the inverse block rule: if the first letter of is , cut immediately before each later letter ; if the first letter is , cut immediately before each later letter ; in each block move the first letter to the end. This undoes , because and use the same distinguished letters to recover the same blocks and then reverse the same cyclic move within each block.
Define a recursive map by and , where is the last letter. Induction on word length, using step 1.1 at the last recursive step, gives for every permutation word . Hence is a two-sided inverse to .
A map with a two-sided inverse is bijective by [L1], so is a bijection on for every .
Foata's transformation sends major index to inversion number
Statement
For every permutation ,
Facts & Assumptions
Given: A permutation word , where is the last letter and has length .
The major index is the sum of the descents of a permutation (Descent sets, major index, excedances and fixed points of a permutation).
Proof
For the empty word and for a one-letter word, both the major index and the inversion number are . Assume inductively that for a word of length , and write . By definition, .
Suppose the last letter of is ; equivalently, the last letter of is . Then the blocks of have the form with every letter of strictly greater than and . Moving to the front removes exactly inversions inside that block, while appending at the end creates exactly inversions with those same letters and no others. So . In this case no new descent is created at the end of , so .
Suppose instead that the last letter of is . Then the blocks of have the form with every letter of at most and . Moving to the front creates exactly new inversions inside that block, and appending at the end creates one more inversion with each terminal letter . Summing over all blocks gives , because the block lengths add up to . In this case appending creates a new descent at the last position of , so .
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 .
By induction on word length, for every permutation .
The major-index generating function of is
Statement
For every ,
Facts & Assumptions
Given: Foata's transformation and the inversion generating function of .
Foata's transformation is a bijection of (Foata's transformation is a bijection of ).
Foata's transformation sends major index to inversion number (Foata's transformation sends major index to inversion number).
The inversion generating function of is (The inversion generating function of is ).
Proof
By [L0], Foata's transformation is a bijection of , so reindexing the sum over by and using [L1] gives .
Apply [L2] to the right-hand side.
Standard cycle form and Foata's fundamental transformation
Definition
Let . 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 whose entries are each once. The corresponding permutation in one-line notation is Foata's fundamental transformation .
Example: if , then the standard cycle form is and .
Under Foata's fundamental transformation, anti-excedances become descents
Statement
Let and let be Foata's fundamental transformation. Then a position is a descent of if and only if the entry is an anti-excedance of . In particular,
Facts & Assumptions
Given: A permutation , its standard cycle form
with each first entry the largest in its cycle and , and the one-line word obtained by deleting the parentheses.
Proof
For every cycle and every , the cycle notation means . Therefore is an anti-excedance of exactly when , which is exactly the condition that the adjacent pair contributes a descent in the stripped word .
Across cycle boundaries, the stripped word has no descent: the last entry of cycle is followed by the first entry of cycle , and the standard cycle form orders these first entries increasingly, so .
The last entry of a cycle is never an anti-excedance, because and is the largest element of the cycle.
By steps 1.1, 2.1 and 1.2, the descents of occur exactly at the entries of that are anti-excedances of . Counting them gives .
Descents and excedances are equidistributed on
Statement
For every and every , the number of permutations of with exactly descents equals the number with exactly excedances.
Facts & Assumptions
Given: A natural number , the order-reversing permutation of , and the fundamental transformation .
Under Foata's fundamental transformation, anti-excedances become descents (Under Foata's fundamental transformation, anti-excedances become descents).
Proof
Define . Then, for every , if and only if , which is equivalent to . Thus is an anti-excedance of exactly when is an excedance of , so .
The map is a bijection of , because conjugation by a permutation has inverse itself. Also 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.
By [L1], , which equals by step 1.1. Since step 1.2 makes a bijection of , the statistics and are equidistributed.
The Eulerian numbers satisfy
Statement
For and ,
Facts & Assumptions
Given: A natural number and the value-complement map on .
Proof
For every , one has exactly when . Thus the descent set of is the complement of the descent set of in , and .
The map is a bijection of , since applying it twice returns the original permutation. Therefore the number of permutations with descents equals the number with descents, which is exactly the displayed symmetry of the Eulerian numbers.
The Eulerian numbers satisfy
Statement
For and every natural number ,
where the Eulerian numbers are extended by for or , except for the defining value .
Facts & Assumptions
Given: A natural number .
Proof
Take a permutation and insert the new largest letter into one of the 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.
If has exactly descents, step 1.1 gives exactly insertion slots producing a permutation of with descents. If has exactly descents, the remaining slots produce a permutation with descents. These two cases are disjoint and exhaust the permutations of with descents.
Counting the two cases of step 2.1 gives . The out-of-range convention makes the same formula correct at the boundary values of .
Worpitzky's identity for
Statement
For every with ,
Facts & Assumptions
Given: Naturals and .
The Eulerian numbers satisfy (The Eulerian numbers satisfy ).
Binomial coefficients satisfy for (The set of -element subsets and the binomial coefficient ), Pascal's rule (Pascal's rule , and the hockey-stick identity ), and for the closed formula rearranges to ( for ; hence , the quotient is a natural number, and ).
by the definition of Eulerian numbers (Eulerian numbers and Eulerian polynomials).
Proof
For , [L3] makes the right-hand side .
Assume the identity at , where , and write .
Using [L1] and shifting the second sum, .
Fix from step 2.1 and put . If , then [L2] gives , so the bracket in step 2.1 is . If , then , , and , so the same bracket is . Finally, if , then Pascal's rule from [L2] gives , and the closed-form identity from [L2] gives . Substituting into the bracket of step 2.1 yields . So in every case that bracket simplifies to .
Steps 2.1 and 3.1 give , and the inductive hypothesis of step 1.2 makes this .
This is the required identity.
The Eulerian-polynomial exponential generating function in
Statement
In the formal power series ring , where is an indeterminate,
Facts & Assumptions
Given: The Eulerian recurrence, the Eulerian polynomials , and the formal series ring .
The Eulerian numbers satisfy (The Eulerian numbers satisfy ).
Formal and are inverse homomorphisms and obey the expected derivative rules (Formal and are inverse homomorphisms and formal binomial powers obey the expected addition laws, Formal differentiation is linear and satisfies product, power, quotient, chain, and coefficient-recovery laws).
Proof
Summing [L1] against gives the polynomial recurrence .
Let . Differentiating termwise in and using step 1.1 yields , with initial condition .
Put ; this is well defined because the denominator has nonzero constant term in the coefficient field . Direct formal differentiation shows that satisfies the same differential equation and the same initial condition as . Since the recurrence of step 1.1 determines the coefficient of from lower degrees uniquely, the formal solution is unique, so .
Therefore .
The weak order on by inversion-set inclusion
Definition
For , write
where the inversion sets are those of Inversions, inversion number, the sign , and even and odd permutations.
This is the weak order on used later on the combinatorics pathway.
The Bruhat order on by rank inequalities
Definition
For and , define the rank number
For , write
This is the rank-inequality form of the Bruhat order.
5 · Examples, counterexamples and false statements
The permutations of tabulated by inversions, descents, major index and excedances
Example
For , the four statistics take the following values.
| permutation | inv | des | maj | exc |
|---|---|---|---|---|
| 0 1 2 3 | 0 | 0 | 0 | 0 |
| 0 1 3 2 | 1 | 1 | 3 | 1 |
| 0 2 1 3 | 1 | 1 | 2 | 1 |
| 0 2 3 1 | 2 | 1 | 3 | 2 |
| 0 3 1 2 | 2 | 1 | 2 | 1 |
| 0 3 2 1 | 3 | 2 | 5 | 1 |
| 1 0 2 3 | 1 | 1 | 1 | 1 |
| 1 0 3 2 | 2 | 2 | 4 | 2 |
| 1 2 0 3 | 2 | 1 | 2 | 2 |
| 1 2 3 0 | 3 | 1 | 3 | 3 |
| 1 3 0 2 | 3 | 1 | 2 | 2 |
| 1 3 2 0 | 4 | 2 | 5 | 2 |
| 2 0 1 3 | 2 | 1 | 1 | 1 |
| 2 0 3 1 | 3 | 2 | 4 | 2 |
| 2 1 0 3 | 3 | 2 | 3 | 1 |
| 2 1 3 0 | 4 | 2 | 4 | 2 |
| 2 3 0 1 | 4 | 1 | 2 | 2 |
| 2 3 1 0 | 5 | 2 | 5 | 2 |
| 3 0 1 2 | 3 | 1 | 1 | 1 |
| 3 0 2 1 | 4 | 2 | 4 | 1 |
| 3 1 0 2 | 4 | 2 | 3 | 1 |
| 3 1 2 0 | 5 | 2 | 4 | 1 |
| 3 2 0 1 | 5 | 2 | 3 | 2 |
| 3 2 1 0 | 6 | 3 | 6 | 2 |
Facts & Assumptions
Given: The inversion generating function, the major-index generating function, and the equidistribution of descents and excedances on (The inversion generating function of is , The major-index generating function of is , Descents and excedances are equidistributed on ).
Verification
The table is an exhaustive enumeration of the one-line permutations of , with each statistic computed directly from its definition.
Reading off the distributions from the table gives for inversions, the same polynomial for the major index, and for both descents and excedances. This matches the three cited theorems.
The Lehmer codes of recover
Example
For , the Lehmer-code codomain is
Grouping these code vectors by the sum of their coordinates gives
which is .
Facts & Assumptions
Given: The Lehmer code is a bijection (The Lehmer code is a bijection ).
The inversion generating function of is (The inversion generating function of is ).
Verification
Every code vector has the form with , , and , so there are of them. Counting by the sum gives the coefficient sequence .
Therefore , which matches [L1].
Foata's transformation on the permutation
Example
Foata's transformation sends the permutation to .
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
Applying the recursion step by step gives , then , then , and finally .
The original permutation has descents at positions and , so . The image has inversions , , , and , so . This matches the theorem.
by the recurrence, by Worpitzky's identity and by excedances
Example
The Eulerian number equals , and three different routes produce the same value.
Facts & Assumptions
Given: The Eulerian recurrence, Worpitzky's identity, and the equidistribution of descents and excedances (The Eulerian numbers satisfy , Worpitzky's identity for , Descents and excedances are equidistributed on ).
Verification
The recurrence gives .
Worpitzky's identity with and gives , because the terms vanish. Since , this reads , so again .
By descents/excedances equidistribution, also counts permutations of with exactly two excedances, and the table on this companion page contains exactly such permutations.
The weak and Bruhat orders on
Example
On , the weak-order cover relations are
while the Bruhat-order cover relations are
So the Bruhat order is strictly finer than the weak order already on .
Facts & Assumptions
Given: The weak order by inversion inclusion and the Bruhat order by rank inequalities (The weak order on by inversion-set inclusion, The Bruhat order on by rank inequalities).
Verification
Computing inversion sets gives the six weak-order covers displayed above. In particular, and are incomparable in weak order because their inversion sets are and respectively.
Computing the rank inequalities shows that and in Bruhat order, producing the two extra cover relations listed above. Thus Bruhat order is strictly finer than weak order on .
Two permutations can have the same descent set and different inversion numbers
Counterexample
The permutations and have the same descent set , but their inversion numbers are and respectively.
Facts & Assumptions
Given: Descents and inversion numbers are defined by Descent sets, major index, excedances and fixed points of a permutation and Inversions, inversion number, the sign , and even and odd permutations.
Verification
For both permutations, the only descent is at position : in each case the first entry exceeds the second, while the second does not exceed the third.
The permutation has one inversion, namely , while has two inversions, namely and . So the inversion numbers differ even though the descent sets agree.
The number of excedances is Eulerian but not Mahonian
Counterexample
The statistic is Eulerian, because it is equidistributed with descents, but it is not Mahonian: on its distribution is , while the inversion distribution is .
Facts & Assumptions
Given: Descents and excedances are equidistributed (Descents and excedances are equidistributed on ), while the major-index generating function is and so agrees with the inversion distribution (The major-index generating function of is ).
Verification
On , the excedance counts are distributed as : there is one permutation with excedances, four with , and one with .
On , the inversion numbers are distributed as over . Since these two distributions are different, is not Mahonian.
FALSE: the major index equals the inversion number for every permutation
Statement
False claim: for every permutation , one has
What is true is the weaker distributional statement of The major-index generating function of is .
Facts & Assumptions
Given: Major index and inversion number are defined by Descent sets, major index, excedances and fixed points of a permutation and Inversions, inversion number, the sign , and even and odd permutations.
Refutation
Take . Its only descent is at position , so .
The same permutation has two inversions, namely and , so . Therefore , and the claim is false.
Sources
- Richard P. Stanley, Enumerative Combinatorics, Volume 1, second edition
- Andrew Lin, MIT 18.212 Algebraic Combinatorics, Lecture 10
- Felix Gotti, MIT 18.211 Combinatorial Analysis, Lecture 13
- Andrew Lin, MIT 18.212 Algebraic Combinatorics, Lecture 9
- Felix Gotti, MIT 18.211 Combinatorial Analysis, Lecture 5
- Andrew Lin, MIT 18.212 Algebraic Combinatorics, Lecture 12
- Manytamaris notes, Permutations
- Arun Ram, Notes on Schubert Polynomials, Chapter 1: Permutations