Ken Keeler, the Futurama writer behind the theorem, actually has a PhD in math, so this was probably just a walk in the park for him. But for the rest of us non math geniuses, his theorem was used to explain a problem with an invention that let characters switch bodies. In the show, you can only switch bodies once with the same pair of people, so they needed an equation to prove that with enough switching bodies around, everyone will eventually end up as who they really are. Insert: funny jokes, robot humour and black comedy and mix accordingly.
Keeler’s theory would mathematically put everybody in the right place so that all could be right in the Futurama world. Without Keeler’s work, Bender’s brain might have ended up in Amy’s body forever! Which, to think about, actually might not be such a bad thing. I’m no Keeler so I can’t explain his theory but you can check out the proof in full here. [TheInfosphere.org via Geekosystem]