I am looking for a way to prove that this function $(f: \mathbb{N}^k \to \mathbb{N})$ is bijective \begin{align*} f((x_1, \dots, x_k)) &= 2+ \sum^k_{i=1} \binom{x_{k-i+1} + i -2}{i} \end{align*} If conditioned by the fact that $x_1 \geq x_2 \geq \dots \geq x_k$ (also $k, x_j \in \mathbb{N}$ for all $j$). I will add here a picture of the $k=4$ case so that you can visualize what I mean by this. (the function $f$ gives the ranking of the trees in the sequence. I already know the function works but I am unable to prove it.
Sequence of 4-furcating trees using the Colijin-Plazzota ranking
I've tried induction but it doesn't seem to exactly work (this is my attempt at backwards induction, I got very confused in the end): Let us prove this by backwards induction. Note that for our base case, when $x_k \ne y_k$ (and $x_1 = y+1, \dots, x_{k-1}=y_{k-1}$), the two expressions $2+ \sum^k_{i=1} \binom{x_{k-i+1} + i -2}{i}$ are identical, except for the term $i=1$ that yields \begin{align*} \binom{x_k - 1}{1} &= x_k - 1\\ &\ne y_k - 1\\ &\ne \binom{y_k - 1}{1} \end{align*} Thus our base case holds and $f(x) \ne f(y)$. Now assume that $f(x) \ne f(y)$ for $x_j \ne y_j$ and that for any $x_i,y_i$ where $i < j$, $x_i = y_i$. Now let us prove that for $x_{j-1} \ne y_{j-1}$ (and that for any $x_i,y_i$ where $i < j-1$, $x_i = y_i$), $f(x) \ne f(y)$. \begin{align*} f((x_1, \dots, x_k)) &= 2+ \binom{x_{k} + 1 -2}{1} + \binom{x_{k-1} + 2 -2}{2} + \dots \binom{x_{k-k+1} + i -k}{k} \end{align*} $$=2+ \binom{x_{k} + 1 -2}{1} + \dots + \binom{x_{j} + (k+1-j) -2}{(k+1-j)} + \binom{x_{j-1} + (k+2-j) -2}{(k+2-j)} + \dots + \binom{x_{k-k+1} + i -k}{k}$$