I'd like to write a formula for a correlation coefficient that involves sorting continuous observations, both within a variable and by another variable. For example, I'd like to say that $r$ is computed between $X$ sorted by $-Y$, and $Z$ sorted by itself, all ascending. My naïve notation for these terms is $sort(X|-Y)$ and $sort(Z)$, specifying separately that both sorts are in ascending order. But, is there a standard statistical or mathematical notation I can use?
For what it's worth, I've considered using the ranks of variables as indices in the actual correlation formula. That seems awkward, though, and still wouldn't let me refer to each variable, individually and symbolically, in the text. Thanks!