Intensional and Extensional in OWL

In an earlier post I was making the case for being more intentional about the difference between intensionally and extensionally defined sets.  Let’s get a bit more specific. 


In OWL if you create a class (and say nothing further about its definition), you have a concept that will only ever result in extensional sets.  That is the only way for an instance to become a member of this class, and therefore the set of things of that type, is if someone asserts membership in the class. 
For instance in the famous pizza ontology ( and the excellent tutorial that accompanies it:  there are concepts, such as DeepPanBase, ThinAndCrispyBase and most of the Toppings, that have no formal definition.  Something will be an instance of DeepPanBase if someone asserts that it is.  The set of all DeepPanBases is an extensionally defined set.  This isn’t a critique, every ontology has to have some extensional sets.  We can’t build everything out of each other, there is some ground beneath our feet. 

But it’s very easy for designers of traditional (relational and object oriented) systems to lapse into designs where all sets are extensional (because in traditional they are all extensional).  And a great deal of the power in a semantic system comes from its ability to make inferences, and in particular to infer members into an intensional set.

In the pizza ontology tutorial they distinguish between “primitive” classes (named classes that have only necessary conditions) and “defined” classes that have necessary and sufficient classes.  But this is not quite the same distinction between intensional and extensional. 

Because, for instance, if we make a necessary and sufficient (equivalent) condition that contains an allValues restriction (and nothing else) we will never infer any members into that class.  It really makes it an extensional set.  For instance the VegetarianPizzaEquivalent1 class in the tutorial defines a vegetarian pizza as a Pizza and hasTopping allValuesFrom VegetarianTopping.  This is a reasonable definition, and it can even help with TBox reasoning, but it’s not an intensional set.  Because of the open world assumption, we can not infer any pizza to be a vegetarianPizza this way, we can only assert them.  (There are some tricks to closing the open world, but they are subtle edge cases relative to what we’re talking about here)

If you work through this you come to these conclusions:

A class/set is intensional if it has :

·        Any subclasses (this is the sort of trivial intensional set, if A is a superclass of B, then if you can infer or assert membership in B than you infer membership in A), or

·        Is Equivalent to a union or an intersection, or

·        Has sufficient existential restrictions (that is a someValues restriction either in the equivalentClass or a subclass) or

·        Sufficient min cardinality restrictions

It’s extensional if

·        There are no sub classes, and

·        There are any sufficient Universal restrictions, or

·        There are any sufficient Maximum cardinality, or 

·        There are any Complements


I realize as I write this I didn’t express this very rigorously, but I wanted to get the thought out there because as more people start adopting semantic technologies there are going to be dismayed when things don’t work they way they expect, and this is a big part of it.

If you work through this thought process, on the Pizza ontology, or any other ontology you look at you’ll see the ontology differently.  In the pizza ontology the only classes that are intensional, beyond the simple asserted superclasses, are the meatyPizza, the cheesyeyPizza, the interestingPizza, the spicyPizza and the RealItalianPizza.  All the rest, including all the named pizzas, and the vegetarian and nonVegetarian pizzas are extensional sets.

This is not meant as a criticism, the pizza ontology is correct and useful, but I think many students don’t follow this subtlety and design ontologies that aren’t working the way they expect. 

If, as you design your ontology, you give some thought to which classes will you require your users to assert membership into and which classes the reasoner will infer membership, you’ll go a long way toward building ontologies that are useful. 

Your rating: None Average: 3 (2 votes)


Let me try again….

Pat, let me try again.

I’m using “intensional and extensional” I think, pretty much as common usage which seems to be consistent with this definition from the philosophy dictionary at

I’m not a student of extensional logic and intensional logic, so I can’t really comment on that, if you could point me to a good synopsis, I’d appreciate it, most of what I’ve found by searching is quite opaque. This is the first reference I’ve seen to suggest that the distinction between OWL/DL and OWL/Full is the difference between use of extensional and intensional logic. Indeed I can’t find any reference in the spec.

I think my use of the term extensional is consistent with the OWL spec where they say “Like RDF classes, every OWL class is associated with a set of individuals, called the class extension. The individuals in the class extension are called the instances of the class.” (and since RDF doesn’t have anything equivalent to the owl:oneOf, I don’t see how they could be referring to an enumeration.)

What I’ve said about OWL is accurate (at least from the practical standpoint of taking these examples and executing them with an OWL compliant reasoner (in my case Pellet)). In your example of knowing two classes have the same members, I think you’re describing an OWL enumeration, and yes two classes with the same enumeration are provably the same class. But if you’re suggesting that two classes with the same instances (what the spec above referred to as a “class extension”), that are not an enumeration, are the same, then no, I don’t agree, and Pellet doesn’t agree. I just tried it.

On your comments about the vegetarian pizza. Yes I’m familiar with a technique for closing a portion of the world in order to infer that a pizza is in fact a vegetarian pizza, Tim Swanson covered it at the conference last year but as I said in my original post, I think this is quite an edge case. If you put a series of provably vegetarian toppings on a pizza, and do not put any non vegetarian toppings on the pizza, it will still not infer that it is a vegetarian pizza (it’s the open world again).

The reason I put this post out there, is that my experience has been that many people believe that you can infer membership into a class, like the vegetarian pizza, and become frustrated and confused when it doesn’t work.

All the best,


not exactly…

Hey. Im not sure what YOU mean by intensional and extensional, but you aren’t using these words in the way they are standardly used, and so what you say about OWL isn’t accurate. Its nothing to do with asserting versus inferring. What is does have to do with is identity, specifically the identity of classes. Extensional classes are just sets: they are defined by their membership. So in an extensional logic (like OWL-DL), if you know that classes A and B have exactly the same members, then you know that A is the same class as B. In an intensional logic (like OWL-Full or RDFS) you don’t know this, and it might not be true. In those logiocs, two classes can have exactly the same members and still be different classes. The only way, in an intensional lgic, for two classes to be the same is if they are asserted to be the same, using sameClass or sameAs or whatever the logic uses to express identity between classes.
So: your division of the pizza example classes into two categories is nonsense: there aren’t two kinds of class in any ontology. If the ontology is written in an extensional logic (like he pizza example is, in OWL-DL) then ALL the classes in it are extensional.
You say that the vegetarian pizza definition doesn’t allow one to infer that something is a vegetarian pizza. Wrong. For example, if you know that all its toppings are in a subclass of vegetables, you can infer that it is a vegetarian pizza. If you know that the class of its toppings is a subclass of some class of known vegetables, you can conclude this. And so on: there are many ways to can draw this conclusion. What you cannot do, indeed, because of the open world assumption, is infer that something is a vegetarian pizza *solely* from facts about some of its particular toppings, because you don’t know, just from that, that there might not be some others. But this has nothing to do with the class being intensional or extensional.

Best wishes.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <strike> <caption> <iframe>
  • Lines and paragraphs break automatically.
  • HTML tags will be transformed to conform to HTML standards.
  • Images can be added to this post.
  • You may insert videos with [video:URL]

More information about formatting options

This process helps prevent spam.
Copy the characters (respecting upper/lower case) from the image.