Sorting itself is a mathematical operation. It's part of set theory, specifically order theory. The entire algorithm is a mathematical expression.
Expressed as a mathematical expression. Given a problem that arrives at timsort with galloping mode as the solution, how would you hear the initial problem, and then express the solution as timsort in order theory?
It feels like it would be awesome to do but also doesn’t feel like the logic of the algorithm would quickly be found simply by knowing order theory.