Search code examples
rdfowlturtle-rdf

Is there a way to express disjunctive object property assertions in OWL?


I am wondering if there is a way to express logically complex object property assertions in OWL. For example, how might I express "John likes oranges or Mary likes oranges"? In a language like first-order predicate logic, this might be translated like this:

Ljo v Lmo

Is there an equally simple way to express this kind of object property statement in OWL?

Note: I am aware that general axioms containing logical disjunction (e.g., "All legal entities are either corporations or persons") can be expressed using the notion of set union. For present purposes, I am more interested in assertions that involve particular individuals/instances, like in my example above.

Thanks for any help!


Solution

  • Strictly speaking this cannot be done in OWL exactly as you want because in OWL disjunction is defined between classes, not individuals. Indeed, the name Description Logics was chosen to emphasise that this family of knowledge representation formalisms is used to describe a domain of interest in terms of concept descriptions - that is classes, not individuals. See this paper for example. Hence, to be honest, I do not think specifying relations between individuals in the absence of classes is the intended use of OWL.

    However, what you require can be achieved in a convoluted way:

    1. Define mary and john as individuals.
    2. Define mary_or_john as individual and set its type to {john} or {mary}.
    3. Now you can state that mary_or_john likes oranges.

    Here {mary} refers to the class consisting of the single individual mary. Similar for {john}.

    Here is the bit of OWL to define this:

    <owl:ObjectProperty rdf:about="likes"/>
    
    <owl:NamedIndividual rdf:about="john"/>
    <owl:NamedIndividual rdf:about="mary"/>
    <owl:NamedIndividual rdf:about="oranges"/>
    
    <owl:NamedIndividual rdf:about="john_or_mary">
        <rdf:type>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <owl:Class>
                        <owl:oneOf rdf:parseType="Collection">
                            <rdf:Description rdf:about="john"/>
                        </owl:oneOf>
                    </owl:Class>
                    <owl:Class>
                        <owl:oneOf rdf:parseType="Collection">
                            <rdf:Description rdf:about="mary"/>
                        </owl:oneOf>
                    </owl:Class>
                </owl:unionOf>
            </owl:Class>
        </rdf:type>
        <likes rdf:resource="oranges"/>
    </owl:NamedIndividual>
    

    Update 2021/10/07 As @AntoineZimmermann pointed out, you can do this using a blanknode rather than introducing the individual john_or_mary. For some reason I was fixated on how to do this in Protege and since Protege does not support blanknodes, you need to introduce an individual.