I was great at Geometry. If I wanted to train someone as a comedian, I would make them do lots of proofs. That's what comedy is: a kind of bogus proof. You set up a fallacious premise and then prove it with rigorous logic. It just makes people laugh. You'll find that most of my stuff is based on that system ... You must think rationally on a completely absurd plane.I doubt that many comedians have seen lots of proofs though they may have an intuitive sense of logic for their routines. And not all comedians use this style.
I know of one theoretical computer scientist who is a comedy writer. Jeff Westbrook got his PhD in 1989 with Robert Tarjan on Algorithms and Data Structures for Dynamic Graph Algorithms. He was faculty at Yale, and then a researcher at AT+T before working on the TV shows Futurama and The Simpsons. I actually met him in 1989- he didn't seem that funny at the time.
Are there other theorists or mathematicians that are also professional comedians or comedy writers? I doubt there are many. If you define theorist or mathematician as having a PhD then I assume its very very few. If you defining it as majored in math or CS there would probably be some.