How do you discover mathematic proofs and algorithms?

No.11066413 ViewReplyOriginalReport
I recently read this:
https://www.cs.princeton.edu/~chazelle/pubs/polygon-triang.pdf

It's 40 pages long, not a single line of code, and yet the dude manages to solve polygon triangulation in linear time. But how do these people do it? I see these proofs in graph theory, information theory, and other computational science (and general mathematic) fields and yet I can't even comprehend how you'd drive such a thing. Do I basically have to be an autistic savant to do any of this stuff?