Set Theory in KIF 3.0

Regarding Russell Paradox, KIF 3.0 set up a special set theory that is based on von Neumann-Bernays-Gödel (NBG). The 7th chapter of the reference manual, which is titled “Sets” starts with the description as follows.

“In many applications, it is helpful to talk about sets of objects as objects in their own right, e.g. to specify their cardinality, to talk about subset relationships, and so forth.
The formalization of sets of simple objects is a simple matter; but, when we begin to talk about sets of sets, the job becomes difficult due to the threat of paradoxes (like Russell’s hypothesized set of all sets that do not contain themselves).”

So, it is obvious that the KIF Group were worried about the paradox in set theories in making the KIF specification. Then, what is NBG theory? And how is it different from Zermelo-Fraenkel (ZF) set theory? As I mentioned in the previous blog page, ZF set theory does not fit to discuss the foundation of ontology, because it does not include any individuals except the empty set. NBG allows us to make sets that include individuals. The axioms in NBG is divided into two parts; one is for sets, in which a set is expressed using variables without capital letters, and another is for classes, in which a class is expressed using variables with capital letters.

Here, I would like to give you a discussion on wording of ‘class’ in set theories. Some people do not discriminate between set and class, but ZF uses the least terminology ‘class’. Russell Paradox shows that we cannot define a set without any paradox in case of the unrestricted comprehension principle as an attribute of a set. In ZF class is called as a thing such that is obtained as ultimate results in operations of cumulative procedures (a class is not a set in ZF). As shown in earlier blog pages, we cannot define a set using abstract sets. We cannot construct a set using any abstract sets. When mathematicians name ‘the set-theoretic universe V’ (see the previous page), the total universe V that is obtained as a result by infinite cumulative procedures is a class in ZF, and it is just used as a representative of the universe of discourse or the totallity of sets.

More complicated, in NBG, the class in ZF is called ‘a proper class’ and the set and the proper class are called class. Willard van Orman Quine noted the following on proper class.

“Basically ‘set’ is simply a synonym of ‘class’ that happens to have more currency than ‘class’ in mathematical contexts. But this excess terminology is often used also to mark a technical distinction. As will emerge, there are advantages (and disadvantages) in holding with von Neumann and perhaps Cantor that not all classes are capable of being members of classes. In theories that hold this, the excess vocabulary has come in handy for marking the distinction; classes capable of being members are called sets. The other have lamely been called ‘proper classes’, on the analogy of ‘Boston proper’ or ‘proper part’; I prefer to call them ultimate classes, in allusion to their not being members in turn of further classes.” (Set Theory and its Logic, Introduction, Quine (1963))

So, I would like to say that the universe of discourse in RDF, RI, is not a set and it is just a device for the discussion of RDF semantics.

KIF, which is based on NBG, took notice of ‘proper class’ as follows.

“An important word of warning for mathematicians. In KIF, certain words are used nontraditionally. Specifically, the standard notion of class is here called a set; the standard notion of set is replaced by the notion of bounded set; and the standard notion of proper class is replaced by unbounded set.”

KIF discriminates between bounded set and unbounded set. A bounded set can be a member of a set, but an unbounded set cannot be a member of set. A bounded set is finite. A finite set is bounded, but an infinite set is unbounded. KIF contains one more notation, that is, individuals.

“In KIF, a fundamental distinction is drawn between individuals and sets. A set is a collection of objects. An individual is any object that is not a set.
A distinction is also drawn between objects that are bounded and those that are unbounded. This distinction is orthogonal to the distinction between individuals and sets. There are bounded individuals and unbounded individuals. There are bounded sets and unbounded sets.
The fundamental relationship among these various types of entities is that of membership. Sets can have members, but individuals cannot. Bounded objects can be members of sets, but unbounded objects cannot. (It is this condition that allows us to avoid the traditional paradoxes of set theory.)” (KIF 3.0, §7.1 Basic Concepts)

I am personally interested in ‘unbounded individuals’. However, there is no explanation about ‘unbounded individuals’ in KIF theory. Does an unbounded individual really exist? If so, what is it? It should perhaps be infinity or uncountable thing. How should we treat uncountable things in ontology construction? Anyway, we can avoid Russell Paradox by the principle of restricted set abstraction, in which a set is restricted to bounded sets.

Russell Paradox is described in KIF as follows.

“The paradoxes appear only when we try to define set primitives that are too powerful. We have defined the sentence (member ) to be true in exactly those cases when the object denoted by  is a member of the set denoted by , and we might consider defining the term (setofall ) to mean simply the set of all objects denoted by  for any assignment of the free variables of  that satisfies . Unfortunately, these two definitions quickly lead to paradoxes.
Let  be the result of substituting term  for all free occurrences of  in sentence . Provided that  is a term not containing any free variables captured in , then the following schema follows from our informal definition. This schema is called the principle of unrestricted set abstraction.

(<=> (member  (setofall  )) )”

Note this form is equivalent to Cantor’s unrestricted comprehension principle and it causes Russell Paradox. Instead of this principle, KIF adopts the following principle.

“In the von-Neuman-Gödel-Bernays version of set theory, these paradoxes are avoided by replacing the principle of unrestricted set abstraction with the principle of restricted set abstraction given above.
(<=> (member  (setofall  )) (and (bounded ) ))

That’s it! Please compare this formula with the separation (aussonderung) principle in ZF (see my blog page titled ‘What is Russell paradox?’). A bounded object is used instead of ‘( x ∈ B )’.

However, in order to understand the framework for meta-modeling of ontology and the higher order structure in CLOS, Phython, and RDF, Russell’s ramified type theory is much suitable to explain how these languages can avoid Russell Paradox.

Posted in RDF | Tagged , , , , , | Leave a comment

Axiom of Foundation in Zermelo Fraenkel Set Theory

Portrait of Ernst ZermeloI pointed out, in the earlier page of my blog, that Pat and Brian said in RDF Semantics, “Such ‘membership loops’ might seem to violate the axiom of foundation, one of the axioms of standard (Zermelo-Fraenkel) set theory, which forbids infinitely descending chains of membership”.

However, what is the axiom of foundation? And how it is related to ‘membership loop’? We cannot but step into Zermelo Fraenkel (ZF) set theory in order to understand RDF Semantics.

There are eight or nine numbers of axioms in ZF theory. The numbers depends on authors of books and texts. Please see ones listed in the bottom in this page, if you are interested in those axioms and ZF theory.

The axiom of foundation is expressed in logical expression as follows [1].

A [A≠Ø ⇒ ∃xA (xA = Ø)]

It means that with respect to any set A such that is not the empty set (Ø) there is an element set of A that do not share members with A. For example, x = {a} is a case in A = {{ }, {a}}, but not in the case of A = {a, {a}}. For A = {b, {a}}, there is x = {a} if ba.

This axiom actually appears as another representation of statement that every set is procedurally generated from the empty set by cumulative procedures [1].

Nowadays, the usual picture of the set-theoretic universe V is provided by the cumulative hierarchy. V is approximated by the partial universes V0, V1, V2,. . . , which are built by iterating the notion “subset of”, as follows. V0 is any set of basic objects that are not sets (numbers, lines,. . . ); a next partial universe Vα+1 is constructed from the previous one Vα by adding all its subsets (P(A) := { x | x A}):

        Vα+1 = VαP (Vα).                               (H.C. Doets, 2002)

Although the axiom of foundation is properly applicable for individuals and sets whose members are individuals and sets, only sets that include the empty set but not individuals are entities in the universe of ZF theory. In ZF theory, we start at V0 = { } = Ø to make the cumulative hierarchy. Then, we iteratively obtain V1 = Ø∪{Ø} = {Ø}, V2 = {Ø}∪{Ø,{Ø}} = {Ø,{Ø}}, V3 = {Ø,{Ø},{Ø,{Ø}}}, …, . For these cumulative sets, the following two important theorems hold.

x ∈ V ⇒ (xx)
xy ∈ V ⇒ xy

Thus, if we pick up any Vn, then Vn−1 ∈ Vn , Vn−2 ∈ Vn−1, Vn−3 ∈ Vn−2, …, and finally we reach V0. Therefore, “descending chains of membership” is always terminated at V0 in the ZF system.

I slightly shifted the point and introduced a new concept in the above discussion for the purpose of easy understanding the axiom. In the generative and cumulative hierarchy, sets at upper level are constructed with lower level sets. So, the direction is bottom up here from the bottom upward. However, note that the axiom of foundation does not explicitly mandate such constructive premise. Some of mathematicians strictly think that every set should be constructive. In fact, a = {a} is refused by this underlying attitude because we have no way to construct such self recursive abstruct sets before we obtain the members of set.

It is true that the axiom of foundation in ZF forbids infinitely descending chains of membership. Then, is the statement in RDF Semantics true such that “the semantic model given here distinguishes […] classes considered as objects from their extensions – […] things that are ‘in’ the class – thereby allowing the extension of a […] class to contain the […] class itself without violating the axiom of foundation” ? I think this statement in RDF Semantics is not valid, or if it is too severe, not enough to validate the statement. First, ZF theory does not include individuals. Second, although Pat and Brian claim that the paradox is avoided since aCEXTI (a), which means an entity in the universe is not equal to its class extention, the universal class rdfs:Resource and the universal metaclass rdfs:Class are included their extensions, namely rdfs:ResourceI = CEXTI (rdfs:ResourceI) and rdfs:ClassI = CEXTI (rdfs:ClassI) . We need further discussion to state RDF can avoid Russell paradox. I claim that we need to distinguish orders of these classes in the same way as ramified type theory, which is introduced by Russell in Principia Mathematica.

However, before we go to the discussion of ramified type theory, I would like to watch the set theory in KIF 3.0, in which sets include individuals as set members, and would like to see how Russell paradox is avoided in KIF later on.

[1] Doets, H.C.: Zermelo-Fraenkel Set Theory, http://staff.science.uva.nl/~vervoort/AST/ast.pdf (2002).
[2] Potter, M.: Set Theory and its Philosophy, Oxford Univ. (2004).
[3] Aczel, A.D.: The Mystery of the Aleph, Four Walls Eight Windows (2000).
[4] Tiles, M.: The Philosophy of Set Theory, Dover (1989).
[5] Quine, W. van Orman: Set Theory and its Logic, Harvard Univ. (1963, 1969).

Posted in RDF, Semantic Web | Tagged , , , , , | 2 Comments

What is Russell paradox?

Bertrand Russell portraitEven if we restrict ourselves to select only sets that do not include the membership loop, we cannot avoid a paradox on a kind of naive formal systems such that contains inside the infinity or the totality. See the following formula, unrestricted comprehension principle.

Ax [ ( xA ) ⇔ φ(x) ][1]
   where φ(x) has free x and no free A

This principle states that there is a set that satisfies any attribute φ(x) . Suppose we settle the attribute of set φ(x) such that inhibits the membership loop, or xx. Then, the formula is

Ax [ ( xA ) ⇔ ( xx ) ].

In case of a particular A for any x, this formula turns to

( AA ) ⇔ ( AA ) .

It contradicts. Namely, if we suppose that a set s is not a member of s itself (ss ), this s should be a member of s, because it satisfies the set attribute condition. Oppositely, if we suppose that a set s is a member of s itself, this s should not be a member of s, because it does not satisfy the condition. This is called Russell paradox.

“Bertrand Russell discovered what became known as the Russell paradox in June 1901 […]. In the letter [to Frege], written more than a year later and hitherto unpublished, he communicates the paradox to Frege[2]. The paradox shook the logicians’ world, and the rumbles are still felt today.” (Letter to Frege, From Frege to Gödel, Jean van Heijenoort, 1967)

Russell paradox is deeply related to the infinity of set or the totality of system, whereas it is not explicitly observed. To work around this paradox, Ernst Zermelo placed separation (aussonderung) principle as the foundation of set theory instead of Cantor’s unrestricted comprehension principle. See the following.

B Ax [ ( xA ) ⇔ ( xB ) ⋀ φ(x) ]   where A does not occur in φ(x)

In this formula, another set B is introduced in order to make a set A, so that a member of A should be a member of B, beforehand or afterward. It might be said that the solution of paradox is left on the shelf and postponed with introducing a set B somewhat uncertain. However, based on this separation principle and other several basic axioms, Zermelo modernized the set theory that is opened by Georg Cantor. It is today called Zermelo Fraenkel (ZF) set theory.

On the other hand, Russell himself tried to solve the paradox with other many paradoxes by capturing it as a variation of notorious ‘vicious circle’. He invented the first type theory in the epoc-making three-volume books Principia Mathematica. So, I would like next to see the infinity in Zermelo Fraenkel set theory, and after that I would like to go to Russell’s ramified type theory later on.

[1] These modern logical expression of formulae are from the lecture of set theory at University of Amsterdam “Zermelo-Fraenkel Set Theory” (H.C. Doets 2002).
[2] Russell pointed the paradox by Frege in the expression of functions rather than sets, whereas it is equivalent the paradox in sets.

Posted in LOD, OWL, RDF, Semantic Web | Tagged , , , , | 1 Comment

Metaclass Framework of CLOS, Python, and RDF(S)

All entities in RDF and RDFSAs shown in the RDF Schema file, rdfs:Resource is a superclass of all classes including rdfs:Class, and rdfs:Class is a class of all classes including rdfs:Resource. Surprisingly, two object oriented languages,
Common Lisp Object System (CLOS) and Python3.x show the same relation between cl:standard-object and cl:standard-class in CLOS and object and type in Python. See the following demonstrations. In the case of CLOS:

cl-user(1): (subtypep (find-class 'standard-class)
                      (find-class 'standard-object))
t
t
cl-user(2): (typep (find-class 'standard-object)
                   (find-class 'standard-class))
t

In the case of Python:

>>> issubclass(type,object)
True
>>> isinstance(object,type)
True

Furthermore, the type or class of rdfs:Class, cl:standard-class, and type in Python is itself, respectively.

cl-user(3): (type-of (find-class 'standard-class))
standard-class
cl-user(4): (typep (find-class 'standard-class)
                   (find-class 'standard-class))
t

In Python:

>>> type(type)
<class 'type'>
>>> isinstance(type,type)
True

Then, since rdfs:Resource is simultaneously an instance and a superclass of rdfs:Class, it is found that rdfs:Resource becomes an instance of rdfs:Resource itself through rdfs:Class by subsumption entailment, as cl:standard-object does.

cl-user(5): (typep (find-class 'standard-object)
                   (find-class 'standard-class))
t
cl-user(6): (typep (find-class 'standard-object)
                   (find-class 'standard-object))
t

And object in Python does.

>>> isinstance(object,type)
True
>>> isinstance(object,object)
True

Thus, this relation between rdfs:Resource and rdfs:Class is critical to establish the framework of the universe of discourse and enable meta-classing of RDF(S), as cl:standard-object/object in Python and cl-standard-class/type in Python are so. I would like to call this relation twisted relation. See the schematic relation between rdfs:Resource and rdfs:Class in the above figure. Note that rdfs:Class, which is a class of all classes in the universe, is a metaclass. So, I would like to call rdfs:Class universal metaclass.

rdfs:Class has the direct membership loop, whereby rdfs:Resource has the indirect membership loop as cl:standard-class and type in Python do. So, how RDF(S), CLOS, and Python can avoid paradoxes from vicious circle? No, no! To begin with, who and on what authority says RDF(S) has a paradox? I claim that there is no paradox in RDF(S) to begin with, and I will clear the misunderstanding from RDF(S).

Posted in OOP, RDF | Tagged , , , , , | Leave a comment

Universal Class

In the document of RDF Semantics, the term “universal class” appears only once in the discussion on membership loop.

When classes are introduced in RDFS, they may contain themselves. … In particular, this use of a class extension mapping allows classes to contain themselves. For example, it is quite OK for (the extension of) a ‘universalclass to contain the class itself as a member, a convention that is often adopted at the top of a classification hierarchy.

However, there is no explanation of what is the universal class in the document. It seems to be assumed that readers know about it, but what is the universal class? Is it rdfs:Resource, or rdfs:Class, or something else?

Pat Hayes mentioned it in his reply email to Tim Berners-Lee, responding to a query by TBL irritated at Pat’s wording of ‘resource entity’,

The class of which all classes are subclasses is the universal class, which contains everything. Also called the ‘universe’, also sometimes called the ‘domain of discourse’, which draws attention to the fact that ‘anything’ here means anything that can be referred to or talked about, whether it is real or imaginary: any possible topic of any kind of meaningful discourse.

So, it is obvious that the universal class is rdfs:Resource, which is a superclass of every class in the universe of discourse and the class of every individual in the universe of discourse at RDF Semantics. As I mentioned at my previous blog page, Tarski said,

…, it is sometimes more convenient to specify exactly what is considered an individual thing within the framework of this theory; the class of all those things will then be denoted again by RI and will be called the universe of discourse of the theory.

This class of all those things IS the universal class.

Still, I would like to emphasize that RDF Semantics discriminates a word, which is a URL reference in RDF, from what a word denotes, as denotational semantics does. Thus, rdfs:Resource or http://www.w3.org/2000/01/rdf-schema#Resource denotes a node named rdfs:Resource (I symbolize it as rdfs:ResourceI) in RDF graph. Furthermore, the class extension of rdfs:ResourceI (a set of individuals that classified to rdfs:ResourceI) is RI or the universe of discourse, all of things in RDF graph.

You should notice that rdfs:ResourceI exists in the RDF graph of RI or the universe of discourse. Namely, rdfs:ResourceI exists in the extension of itself. Oops! Isn’t it notorious vicious circle that causes many paradoxes that are raised from the Ancient Greek era. Pat and Brian say that “it is quite OK”, because “Such ‘membership loops’ might seem to violate the axiom of foundation, one of the axioms of standard (Zermelo-Fraenkel) set theory, which forbids infinitely descending chains of membership. However, the semantic model given here distinguishes … classes considered as objects from their extensions – … things that are ‘in’ the class – thereby allowing the extension of a … class to contain the … class itself without violating the axiom of foundation.”

Zermelo-Fraenkel set theory? Axiom of foundation? You need some basic knowledge about set theory in order to understand what they mean. I will put forward this discussion, but I would like to enlighten the framework in some object oriented programming languages that allow us meta-programming, e.g., Common Lisp Object System and Python3.0. They have the same framework of RDF(S).

Posted in OOP, RDF, Semantic Web | Tagged , , , , , , , | Leave a comment

Universe of Discourse

"The Linking Open Data cloud"

What is the universe of discourse? Pat and Brian say, “The semantics treats all RDF names as expressions which denote. The things denoted are called ‘resources’, following [RFC 2396], … ; ‘resource’ is treated here as synonymous with ‘entity’, i.e. as a generic term for anything in the universe of discourse.” The universe of discourse represents all of things as resource in RDF, and it is expressed by symbol RI.

The notion of universe of discourse was emerged from the development of logic theory, which is started by Gottlob Frege, along with establishing classical set theory, which is started by Georg Cantor. Today, it has become the most important notion as one of basic foundations of formal theory for computer languages, or denotational semantics.

In mathematics, there is no doubt on what a number means, and consequently what number operations mean. For example, nobody doubts the truth of “1 + 2 = 3”. However, when someone says that the wine of which color is red is red wine ‘(Wine and (Wine’s_color is Red)) = RedWine’, is it true or not? If it is true, how can you prove it? How can you let machines calculate it? We had here faced the problem to establish the meanings of terms in logical expressions in order to clarify meanings of logical expressions for human beings and let machines compute the validity of expressions.

The foundation of formal language or denotational semantics is laid by Alfred Tarski. In 1941, Tarski explained the concept of universe of discourse in his book [1] for a particular mathematical theory. If we may, today, rephrase it by substituting the mathematical theory with RDF theory, it is turned to “Instead of using the general logical concept of individual within RDF theory, it is sometimes more convenient to specify exactly what is considered an individual thing within the framework of this theory; the class of all those things will then be denoted again by RI and will be called the universe of discourse of the theory.”

The framework of one theory for logical computation is called a model. In the integer model, we agree the meanings of number and operations in the framework of integer theory. However, we must set up a framework of theory, if we want to treat semantically Webs, or to let machines compute the meanings of the Webs. That is RDF theory, in which the world is captured as directed labeled graph as a model, and then the discourse of universe is a set of all of nodes and edges in the graph or resources and relations in the Webs.

Do you think the number of entities in the universe of discourse is infinite or finite? Do you think the universe of discourse is open or close? Do you think THE universe of discourse or UNIVERSES of discourse? I would like to discuss about these questions in the following talk.

[1] Tarski, Alfred: Introduction to Logic and to the Methodology of Deductive Sciences, Oxford (1941), Dover (1995)

Posted in RDF, Semantic Web | Tagged , , , | Leave a comment

Hello Semantic Web Universe!

PlatoI have been posting articles on Semantic Webs to my weblog in Japanese from 2005. Recently, I had a feeling of desire for publishing the same things worldwide in English and more updated and refined contents, as the reflection of the advance of technology and my thought of Semantic Webs.

The articles will be unlimited many issues around Semantic Webs, RDF, RDFS, OWL, and LOD, but mainly they will be focused in the perspective from Object-Oriented Programming and semantics among the languages for Semantic Webs. I had my long life as mechanical engineer, earlier, and AI researcher, later, at a private company in Japan. At the last decade, I dedicated my life to progress Semantic Webs in Japan, as a practitioner at the company and a researcher at National Institute of Informatics (NII). So, I could define my position as the bridge of achademia (theory) and the real world (practice). This blog will watch the two sides of Semantic Web technology.

I would like to start my articles from the semantics of RDF. Many people use RDF today, but without deep understandings of the semantics, although the semantics of RDF was cleary described by Pat Hayes and Brian McBride in 2004. Many people feel it is hard to read and understand the recommendation from W3C. I had also felt it at first, and once on a day, suddenly I became to be able to understand the description. So, I translated it from English to Japanese for Semantic Webs in Japan. After that, I had several experiences around this issue in theory and practice. I am going to start with my talk on RDF theory and practice.

Hopefully, I should start my work in good expectation of audience.

Seiji Koide

Posted in OOP, Semantic Web | Tagged , | 2 Comments