Two scientists have published a paper that links the reason that puns are funny (and they are, shut up) to an effect of quantum physics called "superposition."
Physicist Kirsty Kitto of Australia and psychologist Liane Gabora of Canada examined what the brain does when we hear a pun or similar kind of wordplay-based joke. As most folks know, the humor of a pun (it is so there, shut up) comes in when words that sound exactly alike or maybe just similar are used in two different and incongruous settings.
Well, Kitto explained that a superposition, a central feature of quantum mechanics, says a single particle can be in two states at one time and it doesn't "make up its mind," so to speak, until it is measured. Austrian physicist Erwin Schrödinger found this so weird he created his famous thought experiment involving a cat that was technically dead and alive at the same time, with its demise coming at the hands of a random quantum fluctuation that either poisoned it or didn't.
Puns, Kitto and Gabora said, work like that. They are based on a single set of sounds that works one way in one sentence and another way in another sentence.
The paper doesn't create an actual equation to gauge the funniness of a particular pun, since humor has a strong subjective element to it. So all of the people who don't want to think puns are funny can continue to do so and not feel like they're trying to deny science. After all, the cats probably didn't think Schrödinger was all that funny either.