Skip to content

Same vs Equivalent

GCHQDeveloper81 edited this page Jul 18, 2024 · 2 revisions

There is often confusion about the intention of certain axioms within the owl vocabulary that relate to equivalency / sameness - specifically these ones.

  • owl:equivalentClass
  • owl:equivalentProperty
  • owl:sameAs

What is the difference between saying two classes are the same vs saying they are equivalent to each other?

The distinction is subtle but vitally important.

  • The owl:sameAs axoim is meant to represent the fact that two IRIs refer to the exact same real world entity, meaning that everything true about one of them is also true about the other.
  • owl:equivalentClass says that the two classes have the same members - nothing more.

To demonstrate the difference, consider the following example from the Dublin Core ontology representing the class of "file format":

dcterms:FileFormat
    dcterms:issued "2008-01-14"^^<http://www.w3.org/2001/XMLSchema#date> ;
    a rdfs:Class ;
    rdfs:comment "A digital resource format."@en ;
    rdfs:isDefinedBy <http://purl.org/dc/terms/> ;
    rdfs:label "File Format"@en ;
    rdfs:subClassOf dcterms:MediaType .

If you were to create your own class of file format and indicate it was the owl:sameAs the DC one...

my:FileFormat a rdfs:Class .
my:fileFormat owl:sameAs dcterms:Fileformat .

Then a reasoner would infer, among other things, that...

my:FileFormat rdfs:isDefinedBy <http://purl.org/dc/terms/> ;

Which is, of course, not true! If instead you'd just said these classes had an owl:equivalentClass relationship then the reasoner would instead just infer that these two classes contained the same members.

As a general rule, owl:sameAs should really only be applied to individuals/instances.

Clone this wiki locally