A partition of $n$ is a weakly decreasing sequence of natural numbers $\lambda = (\lambda\_1, \lambda\_2, \dots)$ such that $\sum \lambda\_i = n$. Its length $l(\lambda)$ is the number of positive summands $\lambda\_i$.


In exercise 3.19 of his book "The $q, t$-Catalan Numbers and the Space of Diagonal Harmonics" James Haglund defines a dinv-statistic on partitions as the number of cells $x$ in the Young diagram of $\lambda$ such that $leg(x) \leq arm(x) \leq leg(x) + 1$.


During my work on my master's thesis I discovered that
$$ \sum\_{\lambda} q^{dinv(\lambda)} = \sum\_{\lambda} q^{l(\lambda)} $$
where the sum is taken over all partitions of $n$. My only way of proving this result uses the symmetry of the $q, t$-Catalan numbers, i.e., $C\_n(q, t) = C\_n(t, q)$.


I would like to know:


Is this result known to anyone else?


If so, is there a bijective proof, i. e., does anyone know a bijection mapping the partitions of $n$ with $dinv(\lambda) = k$ to partitions of $n$ with length $k$?



Why are the dinv-statistic and the partition length equidistributed?
This formula appears in Exercise 1.103 of *Enumerative Combinatorics*, vol. 1, second ed. It was first proved by K. Liu, C. H. F. Yan, and J. Zhou, *Sci. China, Ser. A* **45** (2002), 420-431. A combinatorial proof was given by G. Warrington, *J. Combinatorial Theory Ser. A* **116** (2009), 379-403.


