The Ontological Argument is a strange little argument that rears its head periodically in the history of philosophy.
One traditional version goes like this:
P2. Existence is a perfection
C. Therefore, God exists
P1 is taken as the definition of our notion of God, P2 is supported by the claim that to exist is better than not exist. C clearly follows from premises one and two by modus ponens. It seems to be a valid construction, yet the argument is obviously nonsense, since it is immediately clear that it isn't possible to conjure entities into existence on the basis of definitions.
When you formalize the proof, however, taking the letter P to stand for the predicate “is maximally perfect”, % for the existential quantifier so that “%(x)” means “x exists” and take the letter “g” as the constant to name the individual “God” you get:
P2a. ∀x(P(x) →∃(x)) (For any x, if x is perfect, x exists)
Ca. ∃(g) (God exists)
But, by the rules of logic, the first premise already asserts the existence of the constant. Asserting any predicate of an individual entails its existence. You could replace the predicate “perfect” with the predicate “evil” and the argument is still valid, because to possess any predicate whatsoever an entity must exist. The conclusion follows, but not in such a way that the perfection of God is relevant.
In order to structure the argument so that the perfection of God is deployed in the way the argument intends, you have to do it by making “is God” a predicate that can attach to any variable that meets specific conditions.
P2b. ∀x(P(x) → ∃y(y = x)) (for any x, if x is perfect, then some y exists
that is identical to x)
Cb. ∃(x)G(x) (there is some x such that x is God)
But Cb does not follow from P1b and P2b by the rules of logical inference. You can’t move from a set of conditional premises to posit an existential conclusion. The best you could get would be:
which means "for any x, if x is God, then there is some y such that y is God and y is identical to x"; this is conclusion follows, but doesn’t tell us anything about whether there is actually a constant that satisfies these conditions.
Thus, depending on how it is formalized, this traditional version of the ontological argument is either is valid for the wrong reason, invalid, or uninformative.