;; Demonstration of overlaps relation encoding in OWL (with-ontology overlaps-probe () ((class !R2 :partial) (object-property !part_of (inverse-of !has_part)) (class !R1 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R2))))) (class !R2 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R1))))) (individual !r1 (type !R1)) (class !probe :partial (intersection-of !R1 (complement-of (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R2)))))))) (check overlaps-probe t) (write-rdfxml overlaps-probe)) (with-ontology overlaps-inconsisent () ((object-property !part_of (inverse-of !has_part)) (class !R1 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R2))))) (class !R2 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R1))))) (individual !r1 (type !R1)) (equivalent-classes (intersection-of (restriction !part_of (some-values-from !R1)) (restriction !part_of (some-values-from !R2))) !owl:Nothing) ) (consistent overlaps-inconsisent) (write-rdfxml overlaps-inconsisent) ) #| ;; Subject [Obo-relations] overlap On Jan 30, 2008, at 10:40 AM, David Sutherland wrote: Hi all, The relations ontology paper includes an instance level relation called 'overlap': r1 overlap r2 = [definition] for some r, r part_of r1 and r part_of r2. I would like to be able to capture part relations from parts of neurons of a particular type (sometimes from parts of their axons) to particular axon tracts. Rather than making new terms for these neuron parts, wouldn't it be easier to capture this with type-level version(s) of 'overlap'? Three things to note: 1) The definition states that there exists some part r, st. r part_of r1 and r part_of r2. This does not mean that we need to know or name r. Here's how you would encode that two individuals overlap in the OWL abstract syntax, without knowing what part they have in common. Individual(r1 value(has_part Individual( value(part_of Individual(r2))))) Note that the middle individual is not named (a so-called anonymous individual). The same thing can be done at the class level. (see below) 2) The type level relations are always defined in terms of instance level relations. Usually(but not always) this involves an ALL-SOME pattern. e.g. type-level R1 overlap R2 => for ALL r1 in R1 there exists an r2 in R2, and an r in Entity such that r part_of r1 and r part_of r2 Is this the type level relation you were looking for? (or if you want it symmetric then it has to be a conjunction, going both ways) 3) In OWL, we don't have any type level relations other than the built in ones: is_a(subClassOf), disjointClasses, and equivalentClasses. We express all the type level relations as restrictions on the "ALL" class. Bottom line: I'm guessing you're fine with the instance level relation if you are using OWL. Here's a definition using the ALL-SOME (with symmetry) pattern. Hopefully you can squint and see this as OWL abstract syntax, but in any case I've attached an OWL file. (with-ontology overlaps () ((object-property !part_of (inverse-of !has_part)) (class !R1 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R2))))) (class !R2 :partial (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R1))))) (individual !r1 (type !R1)) (class !probe :partial (intersection-of !R1 (complement-of (restriction !has_part (some-values-from (restriction !part_of (some-values-from !R2))))))) ) (check overlaps t) ) The probe class asks for all things that are an R1 and which doesn't have a part that is part of some R2 and prints: Unsatisfiable: !owl:Nothing, ! i.e. there are none. If you want to check it another way you can instead add (equivalent-classes (intersection-of (restriction !part_of (some-values-from !R1)) (restriction !part_of (some-values-from !R2))) !owl:Nothing) ) Which says "there are no things that are part of an R1 and part of an R2". To which the reasoner (pellet) says: "There is an anonymous individual X, identified by this path (http://example.com/r1 http://example.com/has_part X), which is forced to belong to class all(http://example.com/part_of,not(http://example.com/R2)) and its complement" In other words, it is inconsistent to say this. -Alan Note - this appears to be symmetric and is not transitive. for x overlaps y y overlaps z we don't know whether the part y which overlaps with z also overlaps with x, so we cannot conclude x overlaps z. Another possible example of usage: recording part relations between joints and the ends of bones which are part of them (thanks to Wasila for discussion of this). Cheers, David |#