When I wrote VB, ASP and VBA scrips my error handling statement was always:
On Error Goto Hell
And then the last part of the routine has a block labeled "Hell:". One could use any label, but this seemed best to me -- when not using On Error Resume Next
They probably knew enough to know that it wouldn't be a valid program, but it's the best compromise, being recognizable and still funny for the lay person. Any modification to it would make it distinctly less funny.
Because the theorem itself isn't funny. The context is. If the theorem was funny but not accurate, I'd be defending that too. The show is a comedy first and foremost.
"He gave two yesses!"
"Look, he's emphatically blinking more yesses!"
Edit: The internet delivers again!
https://morbotron.com/caption/S04E12/70553