The ontological proof for the existence of God (really "proofs" or perhaps "arguments," as there are various versions) has popped up in the blogs a few times recently: e.g. Ophelia Benson, Josh Rosenau, Jerry Coyne. You've probably heard this one; it was most famously formulated by Saint Anselm, and most famously trashed by Immanuel "Existence is not a predicate" Kant. A cartoon version of it would be something like

God is by definition a perfect being.

It is more perfect to exist than to not exist.

Therefore, God exists.

Now, this is a really cartoonish version of the argument -- it's not meant to be taken seriously. This kind of ontological proof is a favorite whipping-argument for atheists, just because it seems so prima facie silly. Just ask Jesus and Mo.

This kind of mockery is a little unfair (although only a little). What's important to realize is that the ontological proof is perfectly logical -- that is, the conclusions follow inevitably from the premises. It's the premises that are a bit loopy. It's instructive and fun to see this in terms of formal logic, especially because the proof requires modal logic -- an extension of standard logic that classifies propositions not only as "true" or "false," but also as "necessarily true/false" and "possibly true/false." That is, it's a logic of hypotheticals. So here is one formalization of the ontological argument, taken from a very nice exposition by Peter Suber. First we have to define some notation to deal with our modalities. We denote possibility and necessity via:

Just given these simple ideas, a few axioms, and a fondness for pushing around abstract symbols, we're ready to go. Remember that "~" means "not," a "v" means "or," and the sideways U means "implies." Take "p" to be the proposition "something perfect exists," and we're off:

There is something beautiful here, even if it's somewhat silly as a proof for the existence of God. It's silly in an illuminating way! As Suber says, the argument is "valid but unsound." He pinpoints three premises with which reasonable people might disagree: 1 ("if perfection exists, it necessarily exists"), 2 ("perfection possibly exists"), and 5 ("if something is necessarily true, then it is necessarily necessarily true"). That last one is not a typo. For me, the crucial mistake is some mixture of 1 and 2, mostly 2. The basic problem is that our vague notion of "perfection" isn't really coherent. Anselm assumes that perfection is possible, and that to exist necessarily is more perfect than to exist contingently. While superficially reasonable, these assumptions don't really hold up to scrutiny. What exactly is this "perfection" whose existence and necessity we are debating? For example, is perfection blue? You might think not, since perfection doesn't have any particular color. But aren't colors good, and therefore the property of being colorless is an imperfection? Likewise, and somewhat more seriously, for questions about whether perfection is timeless, or unchanging, or symmetrical, and so on. Any good-sounding quality that we might be tempted to attribute to "perfection" requires the denial of some other good-sounding quality. At some point a Zen monk will come along and suggest that not existing is a higher perfection than existing. We have an informal notion of one thing being "better" than another, and so we unthinkingly extrapolate to believe in something that is "the best," or "perfect." That's about as logical as using the fact that there exist larger and larger real numbers to conclude that there must be some largest possible number. In fact the case of perfection is much worse, since there is not single ordering on the set of all possible qualities that might culminate in "perfection." (Is perfection sweet, or savory?) The very first step in the ontological argument rests on a naive construal of ordinary language, and the chain is no stronger than its weakest link.