Cain, A. J., A. Malheiro, and F. M. Silva. "The monoids of the patience sorting algorithm." International Journal of Algebra and Computation. 29.01 (2019): 85-125.