0

In SPARQL (wikidata) 'instance of' is a transitive or intransitive property? And 'subclass of'?

if A is an instance of B and B is an instance of c it is correct to say that A is an instance C? I thought so, but some data confused me.

Wrong Example: Stoneman (Q33150983) is an instance of serial killer (Q484188) and serial killer (Q484188) is instance of occupation (Q12737077). But it is not correct to say that Stoneman (Q33150983) is instance occupation (Q12737077).

So 'instance of' is not transitive or is the described sequence wrong?

Rob
  • 14,746
  • 28
  • 47
  • 65
Amedeo
  • 105
  • 1
  • 9
  • subClassOf is transitive. Instance of is not transitive. PartOf is not transitive. you can also check this directly online: SubClassOf: https://www.wikidata.org/wiki/Property:P279 InstanceOf: https://www.wikidata.org/wiki/Property:P31 – UninformedUser Jul 01 '19 at 02:59
  • you can also think of subClassOf as subset relation of two sets whereas instanceOf denotes an individual being a member of a set. It's obvious that the latter shouldn't be transitive – UninformedUser Jul 01 '19 at 03:03
  • **So this is TRUE?** (1) A subClassOf B, B subClassOf C => A subClassOf C. (2) A subClassOf B, B instanceOf C => A instanceOf C. **And this is FALSE?** (3) A instanceOf B, B instanceOf C => A instanceOf C. (4) A instanceOf B, B subClassOf C => A subClassOf C. - In the 'Stoneman' example I thought it was a mistake, if 'serial killer' instanceOf 'occupation', the right association is 'Stoneman' occupation = 'serial killer'. If I think 'instanceOf' as 'IS A' ,then LABRADOR is a DOG, DOG is a ANIMAL => LABRADOR ‘is a’ ANIMAL. Can I have a real example where this is not true? – Amedeo Jul 01 '19 at 13:00
  • Not sure what you're asking. 1. those properties are custom properties of the Wikidata dataset. And they decided to explicitly declare their subClassOf relation being transitive. Please click on https://www.wikidata.org/wiki/Property:P279 . and yes, by OWL semantics this means `A subClassOf B, B subClassOf C => A subClassOf C.` - makes sense, or not? By the way, the same holds for the built-in RDFS relations `rdfs:subClassOf` which isn't used in Wikidata though – UninformedUser Jul 01 '19 at 13:35
  • 1
    Regarding (2): no, that doesn't make sense. At least that can't be inferred by RDFS nor OWL reasoning. And again, Wikidata uses it's own predicate for subClassOf and instanceOf, so any standard reasoner wouldn't infer something based on triples containing both properties. And in RDFS the only and obvious inference is `A subClassOf B, c instanceOf A => c instanceOf B.` (3) and (4) also don't make sense, as I already told you. Neither is instanceOf transitive (3), nor does your inferecne in (4) make any sense. – UninformedUser Jul 01 '19 at 13:38
  • And the whole thing is simple, just think of sets, subset relation and membership relation. That's all and answers what makes sense and what not – UninformedUser Jul 01 '19 at 13:40
  • Thanks I think what I was looking for was just right `c instanceOf A , A subClassOf B, => c instanceOf B` :) – Amedeo Jul 01 '19 at 14:48

0 Answers0