Definition (shortlex order)
The shortlex ordering on $\N^m$ is the total order defined by $(n_1, \ldots, n_m) < (n_1', \ldots, n_{m}')$ iff either
-
$\sum_{i=1}^{m} n_i < \sum_{i=1}^{m} n_i'$, or
-
$\sum_{i=1}^{m} n_i = \sum_{i=1}^{m} n_i'$ and there exists $j$ such that $n_1 = n_1', \ldots, n_{j-1} = n_{j-1}'$ and $n_j < n_j'$.