Text this: The Mathematical Theory of Optimal Processes