The Ontological Proof of God Explained through Object Oriented Approach

Logic

Christianity, Islam, and Judaism are all monotheistic religions that believe in one God who created the world. It is said that roughly half of the world’s population belongs to one of these monotheistic religions. For believers of these religions, the existence of God is a very important religious premise (equivalent to a principle or axiom in academics) and it cannot be wrong. Therefore, the problem of wanting to prove the existence of God mathematically or scientifically (typically physical) has been around for quite some time.

 A well-known mathematical proof is the Ontological Proof of God, devised by mathematical logician Kurt Gödel (known as the mathematician who proved the incompleteness theorem). The subject of this article is to understand Gödel’s proof of the existence of God from an object-oriented perspective. The following is a quotation from Gödel’s proof of the existence of God (with some parts omitted):


\[ \begin{array}{ll} P(\varphi) & \varphi \; \text{is positive} \; (\text{or} \;\varphi \in P). \\ \text{Axiom 1.} & P(\varphi).P(\psi) \supset P(\varphi.\psi). \\ \text{Axiom 2.} & P(\varphi) \vee P(\sim \varphi). \\ \text{Definition 1.} & G(x) \equiv (\varphi) [P(\varphi) \supset\varphi(x)] \;\;(\text{God}) \\ \text{Definition 2.} & \varphi \text{Ess.}x \equiv (\psi) [\psi(x) \supset N(y)[\varphi(y) \supset \psi(y)]]. \;\;(\text{Essence of }x) \\ & p \supset_N q = N(p \supset q)\quad \text{Nessecity} \\ \text{Axiom 3.} & P(\varphi) \supset NP(\varphi) \\ & \sim P(\varphi) \supset N\sim P(\varphi) \\ \text{Theorem} & G(x) \supset G\; \text{Ess}.x. \\ \text{Definition.} & E(x) \equiv (\varphi) [\varphi\; \text{Ess}.x \supset N(\exists x)\varphi(x)]. \;\;(\text{Necessary Existence}) \\ \text{Axiom 4.} & P(E). \\ \text{Theorem} & G(x) \supset N(\exists y)G(y). \end{array} \]


Even if you just look at the formula, it doesn’t seem easy to understand. However, readers who understand object-oriented programming will be able to understand the meaning and logic of the above proof relatively easily, so let us explain it.

 In object-oriented programming, the subject (concept of a thing) that one is trying to describe is called an object. Objects are divided into classes that can create instances in memory and interfaces that cannot (Here, the term “interface” includes abstract classes, which are classes that do not generate instances.). In Gödel’s proof, being positive means having reality, and a statement that an object \(\small \varphi\) is positive, i.e. \(\small \varphi \in P \), can be interpreted as representing that the object \(\small \varphi\) is a class. Conversely, \(\small \sim(\varphi \in P)=P(\sim \varphi)=\sim P(\varphi)\) represents that the object \(\small \varphi\) is an interface (\(\small P(\sim \varphi) \) is an unclear formula, but is assumed to have the same meaning as \(\small \sim P(\varphi)\).). Interpreted in this way, Axioms 1 to 3 can be expressed as follows:

  • Axiom1. An object that inherits from two classes is a class. (An interface cannot inherit from a class.)
  • Axiom2. An object is either a class or an interface.
  • Axiom3. A class can be instantiated (can exist). An interface cannot be instantiated (cannot exist).

 Next let us give the definition of God, \(\small G(x)\). Gödel defines God as an entity that possesses the properties and functions of all existing classes (the omnipotent and omniscient God), and by definition is a subclass that inherits from all existing classes. \(\small (\varphi)[x] \) represents the set \(\small \{\varphi \; \text{such that} \;x \} \), which means the set of classes to which all existing instances \(\small x \) belong. In Definition 2, a essence of \(\small x \) refers to the set of classes (including parent classes) to which the instance \(\small x \) belongs. The theorem that appears immediately afterwards means:

  • Theorem. The essence \(\small \text{Ess.}x \) of an instance \(\small x \) of God \(\small G \) is God \(\small G \).

This means that the God class inherits all from all existing classes as a subclass, which is obvious from the definition of God.

 Gödel’s proof of the existence of God first proves that it is possible for God to exist, and then goes on to show that if it is possible for God to exist, then his existence is necessary. Let us prove the first part from the axioms. The following lemma holds from Axiom 1, Axiom 2, and the definition of God.

  • Lemma 1. God is a class.

In addition, since Axiom 3 allows to create instances of class objects,

  • Lemma 2. It is possible for God to exist (create instances).

can be obtained. This is what we wanted to prove in the first step.

 Now that we have shown that it is possible for God to exist, let us show that his existence is necessary. Let \(\small E(x)\) denote the set of objects that have the property that an instance \(\small x\) necessarily exists. A class that is a class but does not belong to \(\small E(x)\) would be a class whose instances can be created, but whose instances do not necessarily exist. A class belonging to \(\small E(x)\) would be equivalent to a class whose instance is automatically generated in a global variable in a program. If we write it like programming code, it would look something like:

static object global[];

object E {
   static auto { global[classname] = new classname(); };
   new(self);
}

This can be understood by thinking of it as an object whose instance is automatically created when the main routine is launched and a reference is added to a global variable. \(\small E\) may not necessarily be a class (it may be an abstract class), but Gödel adds the following as an axiom:

  • Axiom 4. A necessarily existing object \(\small E\) is a class.

According to Axiom 4, all objects that necessarily exist are classes, so it would follow that God inherits the function of “necessarily existing” (the auto function mentioned above), i.e. \(\small G \in E \). Therefore, the following theorem is finally proven.

  • Theorem. God (an instance of God) necessarily exists.

This was the final theorem in Gödel’s ontological proof of God.

 If we understand it this way, it could seem as though the proof of the existence of God is based on a unexpectedly plausible premise. Axiom 1 seems quite dubious (for example, just because birds and horses exist does not mean that Pegasus also exists), but Axioms 2 and 3 are the basis of object-oriented programming and do not seem to be easily doubted. Axiom 4 is perhaps most questionable. It is assumed that \(\small E(x)\) is not the empty set, and if we assume that “there is nothing that must exist in this world”, i.e., \(\small \phi \in E(x)\), this proof would fail. In fact, it is well known that the religious premise of Buddhism is the impermanence of all things (there is nothing in this world that is unchanging (that must exist)), and based on this premise, it denies the existence of God. If a Buddhist were to make a claim about this proof, it would be Axiom 4.

 The above is Gödel’s consideration of the ontological proof of God. By the way, I have no connection to religion whatsoever, and I doubt I will have any in the future. So I don’t really care whether God exists or not, and I feel like he probably doesn’t exist. However, I don’t think I’m interested enough in it to go out of my way to deny it. Well, does God really exist? I might get in trouble with religious people if I write something unnecessary, so I’ll end it by presenting a self-contradictory proposition: “Only God knows whether God exists or not.”

Reference

[1] Gödel, Kurt. 1995. “Ontological Proof ”. In Kurt Gödel Collected Works, vol. III, ed. S. Feferman et al., 403-4. Oxford University Press.

Comments