Skip to content

Instantly share code, notes, and snippets.

@niklasl
Last active July 13, 2024 19:52
Show Gist options
  • Save niklasl/69428b043be6f1d33fd45f89cbe52632 to your computer and use it in GitHub Desktop.
Save niklasl/69428b043be6f1d33fd45f89cbe52632 to your computer and use it in GitHub Desktop.
Entailments on reifiers
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <http://example.org/ns#> .
@base <http://example.org/> .
<purchase1> a :Purchase ;
:date "2014-12-15"^^xsd:date ;
:seller <ComputerStore> ;
:cost 2500 ;
:currency :USD ;
rdf:reifies [ rdf:subject <Alice> ; rdf:predicate :bought ; rdf:object <SomeComputer> ] .
_:boughtRelation rdfs:subPropertyOf rdf:reifies ;
owl:propertyChainAxiom (_:RolifiedPurchase rdf:reifies _:RolifiedBoughtRelationship) .
_:BoughtRelationship owl:equivalentClass [ owl:onProperty rdf:predicate ; owl:hasValue :bought ] ;
rdfs:subClassOf [ owl:onProperty _:RolifiedBoughtRelationship ; owl:hasSelf true ] .
:Purchase rdfs:subClassOf [ owl:onProperty _:RolifiedPurchase ; owl:hasSelf true ] .
:buyer rdfs:domain :Purchase ;
owl:propertyChainAxiom (_:boughtRelation rdf:subject) .
:item rdfs:domain :Purchase ;
owl:propertyChainAxiom (_:boughtRelation rdf:object) .
:bought owl:propertyChainAxiom ( [ owl:inverseOf :buyer ] :item ) .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <http://example.org/ns#> .
@base <http://example.org/> .
<purchase1> a :Purchase ;
:date "2014-12-15"^^xsd:date ;
:cost 2500 ;
:currency :USD ;
rdf:reifies [ rdf:subject <Alice> ; rdf:predicate :bought ; rdf:object <SomeComputer> ] ;
rdf:reifies [ rdf:subject <Alice> ; rdf:predicate :shoppedAt ; rdf:object <ComputerStore> ] .
:Purchase rdfs:subClassOf [ owl:onProperty _:RolifiedPurchase ; owl:hasSelf true ] .
_:BoughtRelationship owl:equivalentClass [ owl:onProperty rdf:predicate ; owl:hasValue :bought ] ;
rdfs:subClassOf [ owl:onProperty _:RolifiedBoughtRelationship ; owl:hasSelf true ] .
_:boughtRelation rdfs:subPropertyOf rdf:reifies ;
owl:propertyChainAxiom (_:RolifiedPurchase rdf:reifies _:RolifiedBoughtRelationship) .
_:ShoppedAtRelationship owl:equivalentClass [ owl:onProperty rdf:predicate ; owl:hasValue :shoppedAt ] ;
rdfs:subClassOf [ owl:onProperty _:RolifiedShoppedAtRelationship ; owl:hasSelf true ] .
_:shoppedAtRelation rdfs:subPropertyOf rdf:reifies ;
owl:propertyChainAxiom (_:RolifiedPurchase rdf:reifies _:RolifiedShoppedAtRelationship) .
:buyer rdfs:domain :Purchase ;
owl:propertyChainAxiom (_:boughtRelation rdf:subject) ;
owl:propertyChainAxiom (_:shoppedAtRelation rdf:subject) .
:item rdfs:domain :Purchase ;
owl:propertyChainAxiom (_:boughtRelation rdf:object) .
:seller rdfs:domain :Purchase ;
owl:propertyChainAxiom (_:shoppedAtRelation rdf:object) .
:bought owl:propertyChainAxiom ( [ owl:inverseOf :buyer ] :item ) .
:shoppedAt owl:propertyChainAxiom ( [ owl:inverseOf :buyer ] :seller ) .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <http://example.org/ns#> .
@base <http://example.org/> .
<stmt1> a rdf:Statement ;
:date "2014-12-15"^^xsd:date ;
:source <SomeDatabase> ;
:trust 0.8 ;
#rdf:reifies <<( <Alice> :bought <SomeComputer> )>> ;
rdf:reifies [ rdf:subject <Alice> ; rdf:predicate :bought ; rdf:object <SomeComputer> ] .
rdf:Statement rdfs:subClassOf [ owl:onProperty _:selfOfTypeStatement ; owl:hasSelf true ] .
[] rdfs:subPropertyOf rdf:subject ; owl:propertyChainAxiom (_:selfOfTypeStatement rdf:reifies rdf:subject) .
[] rdfs:subPropertyOf rdf:predicate ; owl:propertyChainAxiom (_:selfOfTypeStatement rdf:reifies rdf:predicate) .
[] rdfs:subPropertyOf rdf:object ; owl:propertyChainAxiom (_:selfOfTypeStatement rdf:reifies rdf:object) .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment