Trust me, I am not one to enjoy deeply nested case distinctions in a mathematical proof. In fact, I'd rather there were no case distinctions necessary at all. However, to quote the famous mathematician Nikolai Nowaczyk:
> Some theorems have beautiful proof - and some theorems are worth fighting for.
Anyway. If you have to do it, you should do it in beautiful $\KaTeX$. <a href="https://blag.nullteilerfrei.de/2013/03/07/nested-case-distinctions-in-latex/#more-1565" class="more-link">Do you want to know more?</a>