0% found this document useful (0 votes)
19 views41 pages

04c. RDF Logic

The document discusses entailment in RDF(S), focusing on simple entailment, RDF entailment, and RDFS entailment, along with their respective rules and examples. It outlines how URIs are treated in these contexts and presents axiomatic triples that are always RDFS-entailed. Theorems related to simple and RDF entailment are also provided, illustrating the relationships between different graphs.

Uploaded by

fpx82038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views41 pages

04c. RDF Logic

The document discusses entailment in RDF(S), focusing on simple entailment, RDF entailment, and RDFS entailment, along with their respective rules and examples. It outlines how URIs are treated in these contexts and presents axiomatic triples that are always RDFS-entailed. Theorems related to simple and RDF entailment are also provided, illustrating the relationships between different graphs.

Uploaded by

fpx82038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

Module 3, Part 3

Resource Description
Framework and Logic
Plaban Kumar Bhowmick
Assistant Professor
Centre of Excellence in Artificial Intelligence
Indian Institute of Technology Kharagpur
Entailment in RDF(S)

 Simple Entailment

 RDF Entailment

 RDFS-Entailment
Convention of Variable Names

Blank
Predicate Subject Object Literal
Node

𝑎,𝑏 ¿:𝑛 𝑢,𝑣 𝑥, 𝑦 𝑙


URI URI URI Litera
Blank Node l
Litera
l
Rules for Simple Entailment

 In simple entailment all URIs are treated equally

 Entailmentis decided based on structural


considerations
𝑢𝑎 𝑥. Novelty Condition:
𝑠𝑒 1 1. If the blank node identified by is not
𝑢 𝑎: 𝑛 . contained in the graph

𝑢𝑎 𝑥 . 2. If is already contained
𝑠𝑒 2 • Rule is applicable if has been
¿:𝑛𝑎 𝑥. introduced by weakening the same
URI, literal or blank node
Examples of Simple Entailment
Virat is the captain of Indian
Cricket Team
⊨ Indian
captain
Cricket Team has a

𝑒𝑥 : 𝑣𝑖𝑟𝑎𝑡 𝑒𝑥 : 𝑐𝑎𝑝𝑡𝑎𝑖𝑛𝑂𝑓 𝑒𝑥 : 𝐼𝑛𝑑𝑖𝑎𝑛𝑇𝑒𝑎𝑚


𝑠𝑒 2
¿ : 𝑖𝑑 1 𝑒𝑥 : 𝑐𝑎𝑝𝑡𝑎𝑖𝑛𝑂𝑓 𝑒𝑥 : 𝐼𝑛𝑑𝑖𝑎𝑛𝑇𝑒𝑎𝑚

Ravi Shastri is the mentor of


Virat

Ravi Shastri mentors
𝑒𝑥 : 𝑟𝑎𝑣𝑖 𝑒𝑥 : 𝑚𝑒𝑛𝑡𝑜𝑟𝑠someone
𝑒𝑥 : 𝑣𝑖𝑟𝑎𝑡
𝑠𝑒 1
𝑒𝑥 : 𝑟𝑎𝑣𝑖 𝑒𝑥 : 𝑚𝑒𝑛𝑡𝑜𝑟𝑠: 𝑖𝑑 1

𝑒𝑥 :𝑚𝑒𝑛𝑡𝑜𝑟𝑠 𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
𝑒𝑥 : 𝑟𝑎𝑣𝑖 ¿ :𝑖𝑑 1 𝑒𝑥 : 𝐼𝑛𝑑𝑖𝑎𝑛𝑇𝑒𝑎𝑚
Ravi mentors the captain of Indian
Team
Example of Simple
Entailment
𝑒𝑥 :𝑚𝑒𝑛𝑡𝑜𝑟𝑠 𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
𝑒𝑥 : 𝑟𝑎𝑣𝑖 ¿ :𝑖𝑑 1 𝑒𝑥 : 𝐼𝑛𝑑𝑖𝑎𝑛𝑇𝑒𝑎𝑚
Ravi mentors the captain of Indian
Team
𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
𝑒𝑥 :𝑚𝑜𝑟𝑔𝑎𝑛 𝑒𝑥 : 𝐸𝑛𝑔𝑙𝑎𝑛𝑑𝑇𝑒𝑎𝑚
𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
¿ :𝑖𝑑 1 𝑒𝑥 : 𝐸𝑛𝑔𝑙𝑎𝑛𝑑𝑇𝑒𝑎𝑚
𝑒𝑥 :𝑚𝑒𝑛𝑡𝑜𝑟𝑠 𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
𝑒𝑥 : 𝑟𝑎𝑣𝑖 ¿ :𝑖𝑑 1 𝑒𝑥 : 𝐼𝑛𝑑𝑖𝑎𝑛𝑇𝑒𝑎𝑚
𝑒𝑥 :𝑐𝑎𝑝𝑡𝑎𝑖𝑛 𝑂𝑓
𝑒𝑥 : 𝐸𝑛𝑔𝑙𝑎𝑛𝑑𝑇𝑒𝑎𝑚
Theorem: Simple Entailment
A graph simply entails a graph , if can be
extended to a graph by virtue of the rules and
such that is contained in

G1 ⊨ G2
𝒔𝒆 𝟏

𝒔𝒆 𝟐
⊆ ❑
𝐺 ={〈 𝑠 2 𝑖 , 𝑝2 𝑖 , 𝑜2 𝑖 〉 }
2

G’1

𝐺 ={〈 𝑠 1𝑖 ,𝑝 1 𝑖 , 𝑜1 𝑖 〉 }
1
Example: Simple Entailment
Theorem
Ronaldo is a Portuguese footballer who has played in Manchester
United having head coach as Alex Ferguson and won the Ballon
d’Or
wikidata:Q11571 wikidata_prop:P166
G1
wikidata:Q166177
wikidata:Q11571
wikidata_prop:P735

wikidata_prop:P1532
wikidata_prop:P735 wikip:P54 wiki:Q18656
wikip:P286

Ronaldo Portugal wiki:Q18656


Example: Simple Entailment
Theorem
Ronaldo is a Portuguese footballer who has played in Manchester
United having head coach as Alex Ferguson and won the Ballon
d’Or
wiki:football_player wikip:award
G1
wiki:Ballon d'Or
wiki:ronaldo
wikip:occupation

wikip:citizenship wikip:member wiki:Alex Ferguson


wikip:given_name
wikip:head_coach

Ronaldo Portugal wiki:Manchester United


Example: Simple Entailment
Theorem

(wiki:ronaldo wikip:given_name “Ronaldo”)

𝐺1 =¿ (wiki:ronaldo
“Portugal”)
(wiki:ronaldo
wikip:citizenship

wikip:occupation
wiki:football_player)
(wiki:ronaldo wikip:award wiki:Ballon
d’Or)
(wiki:ronaldo wikip:member
wiki:Manchester United)
(wiki:Manchester United wikip:head_coach wiki:Alex
Ferguson)
Example: Simple
Entailment
G2
wiki:football_player wikip:award

wiki:Ballon d'Or

wikip:occupation

wikip:member wiki:Alex Ferguson

wikip:head_coach

Ballon d’Or winning Footballer who is a member of a team headed by


Alex Ferguson
Example: Simple Entailment
Theorem

(_:id1 wikip:occupation

𝐺 2=¿ wiki:football_player)
(_:id1
(_:id1
wikip:award
wikip:member
wiki:Ballon d’Or)
_:id2)
(_:id2 wikip:head_coach wiki:Alex Ferguson)
Example: Simple Entailment
Theorem
𝑢𝑎 𝑥 𝑢𝑎 𝑥
𝑠𝑒 1
𝑠𝑒 2 𝑢 𝑎: 𝑛
¿:𝑛𝑎 𝑦
(wiki:ronaldo wikip:given_name

𝐺 =¿
1
“Ronaldo”)
(wiki:ronaldo
“Portugal”)
wikip:citizenship

(wiki:ronaldo wikip:occupation
wiki:football_player)
(wiki:ronaldo wikip:award
wiki:Ballon d’Or)

𝐺2⊆ 𝐺
(wiki:ronaldo wikip:member
wiki:Manchester United)
1 (wiki:Manchester United wikip:head_coach
wiki:Alex Ferguson)
(_:id1 wikip:occupation
wiki:football_player)
RDF Entailment

 Some URIs have special meanings


 Simple intrepretation does not semantically distinguish
between ex:publishedBy and rdf:type

 Special URIs in vocabulary


 rdf:type, rdf:Property, rdf:XMLLiteral, rdf:nil …..
RDF Entailment Rules
RDF Axiomatic Triples

❑ 𝑟𝑑𝑓𝑎𝑥
𝑢𝑎 𝑥
RDF Entailment Rules

𝑢𝑎 𝑙.
Literal 𝑙𝑔
Generalization 𝑢 𝑎: 𝑛 .

𝑢𝑎 𝑦 .
Property Rule 𝑟𝑑𝑓 1
𝑎𝑟𝑑𝑓 : 𝑡𝑦𝑝𝑒 𝑟𝑑𝑓 : 𝑃𝑟𝑜𝑝𝑒𝑟𝑡𝑦 .

𝑢𝑎𝑙 .
Literal Rule 𝑟𝑑𝑓 2
¿ :𝑛𝑟𝑑𝑓 :𝑡𝑦𝑝𝑒 𝑟𝑑𝑓 : 𝑋𝑀𝐿𝐿𝑖𝑡𝑒𝑟𝑎𝑙 .
Theorem: RDF
Entailment
A graph RDF entails a graph , if can be
extended to a graph by virtue of the rules ,
and such that simply entails

𝒍𝒈
G1 ⊨ G2
𝒓𝒅𝒇𝒂𝒙
𝒓𝒅𝒇 𝟏 t ails
En
𝒓𝒅𝒇 𝟐
G’1 Si ⊨
m
pl
e
Rules for RDFS
Entailment
 RDFS axiomatic triple

 Entailment
rule
❑ 𝑟𝑑𝑓𝑠𝑎𝑥
𝑢𝑎 𝑥
Axiomatic RDFS Triples (1/3)
 The following triples are always RDFS-entailed:

 rdf:type rdfs:domain rdfs:Resource.


 rdfs:domain rdfs:domain rdf:Property.
 rdfs:range rdfs:domain rdf:Property.
 rdfs:subPropertyOf rdfs:domain rdf:Property.
 rdfs:subClassOf rdfs:domain rdf:Class.
 rdf:subject rdfs:domain rdf:Statement.
 rdf:predicate rdfs:domain rdf:Statement.
 rdf:object rdfs:domain rdf:Statement.
 rdfs:member rdfs:domain rdfs:Resource.
 rdf:first rdfs:domain rdf:List.
 rdf:rest rdfs:domain rdf:List.
 rdfs:seeAlso rdfs:domain rdfs:Resource .
 rdfs:isDefinedBy rdfs:domain rdfs:Resource.
 rdfs:comment rdfs:domain rdfs:Resource.
 rdfs:label rdfs:domain rdfs:Resource.
 rdf:value rdfs:domain rdfs:Resource.
Axiomatic RDFS Triples (2/3)
 The following triples are always RDFS-entailed:

 rdf:type rdfs:range rdfs:Class.


 rdfs:domain rdfs:range rdfs:Class.
 rdfs:range rdfs:range rdfs:Class.
 rdfs:subPropertyOf rdfs:range rdf:Property.
 rdfs:subClassOf rdfs:range rdfs:Class.
 rdf:subject rdfs:range rdfs:Resource.
 rdf:predicate rdfs:range rdfs:Resource.
 rdf:object rdfs:range rdfs:Resrouce.
 rdfs:member rdfs:range rdfs:Resource.
 rdf:first rdfs:range rdfs:Resource.
 rdf:rest rdfs:range rdf:List.
 rdfs:seeAlso rdfs:range rdfs:Resource .
 rdfs:isDefinedBy rdfs:range rdfs:Resource.
 rdfs:comment rdfs:range rdfs:Literal.
 rdfs:label rdfs:range rdfs:Literal.
 rdf:value rdfs:range rdfs:Resource.
Axiomatic RDFS Triples (3/3)
 The following triples are always RDFS-entailed:

 rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property.


 rdf:Alt rdfs:subClassOf rdfs:Container.
 rdf:Bag rdfs:subClassOf rdfs:Container.
 rdf:Seq rdfs:subClassOf rdfs:Container.

 rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso.

 rdf:XMLLiteral rdf:type rdfs:Datatype.


 rdf:XMLLiteral rdfs:subClassOf rdfs:Literal.
 rdfs:Datatype rdfs:subClassOf rdfs:Class.

 rdf:_1 rdf:type rdfs:ContainerMembershipProperty.


 rdf:_1 rdfs:domain rdfs:Resource.
 rdf:_1 rdfs:range rdfs:Resource.
 rdf:_2 rdf:type rdfs:ContainerMembershipProperty.
 rdf:_2 rdfs:domain rdfs:Resource.
 rdf:_2 rdfs:range rdfs:Resource.
 …
Rules for RDFS
Entailment
 Rule for Literal

 Property restriction
 (domain restr)

 (range restr)
Rules for RDFS
Entailment
 Everything is a resource
Rules for RDFS
Entailment
 Subproperty rule
 Subproperty is transitive

 Subproperty is reflexive

 Inheritance in property hierarchy


Rules for RDFS
Entailment
 Subclasses
 Every class is a subclass of rdfs:Resource

 Inheritance in class hierarchy

 Subclass is reflexive

 Subclass is transitive (same as


subproperty case)
▪ rdfs11
Rules for RDFS
Entailment
 Container
 rdfs:member is a superproperty of all
properties contained in
rdfs:ContainerMembershipProperty
12
rdfs:ContainerMembershipPr
operty
rdf:Property

rdfs:subClassO
f
rdfs:ContainerMembershipProperty

rdf:type

pe
e
yp

ty
t

:
f:

rdf
rd

rdf:_1 rdf:type
rdf:_2 rdf:_n

rdfs:subPropertyOf

rdfs:member
Theorem: RDFS
Entailment
A graph RDFS entails a graph , if can be
extended to a graph by virtue of the rules , as
well as to and such that simply entails

𝒈𝒍
𝒍𝒈 G1 ⊨ G2
𝒓𝒅𝒇𝒂𝒙
𝒓𝒅𝒇 𝟏 t ails
En
𝒓𝒅𝒇 𝟐
𝒓𝒅𝒇 𝟏−𝟏𝟑 G’1 Si ⊨
m
pl
e
RDFS Deduction
Example
rdfs:ContainerMembershipProperty

rdf:type

:CricketTeam :hasTeamMember :AllRounder

rdfs:subPropertyOf
rdfs:domain rdfs:range

:SmartPhoneCompany :hasAllrounderMember

RDF
S
rdf:type RDF

:Sponsors :hasAllrounderMember
:Oppo :IndianCricketTeam :Hardik
Input Graph ()

:Oppo rdf:type :Company.

:Oppo :Sponsors :IndianCricketTeam

:IndianCricketTeam :hasAllrounderMember :Hardik.

:hasAllrounderMember rdfs:subPropertyOf :hasTeamMember.

:hasAllrounderMember rdfs:domain :CricketTeam.

:hasAllrounderMember rdfs:range :AllRounder.

:hasTeamMember rdf:type rdfs:ContainerMembershipProperty.


Query Graph ()

:SmartPhoneCompany :AllRounder

rdf:type rdf:type

:Sponsors rdfs:member

Is there a smartphone company that sponsors something that has


an allrounder in the team?
RDFS Entailment
Deduction

:IndianCricketTeam :hasAllrounderMember :Hardik.


:hasAllrounderMember rdfs:range :AllRounder.

:Hardik rdf:type :AllRounder.


RDFS Entailment
Deduction

:hasTeamMember rdf:type rdfs:ContainerMembershipProperty.

:hasTeamMember rdfs:subPropertyOf rdfs:member.

12
RDFS Entailment
Deduction

:hasAllRounderMember rdfs:subPropertyOf :hasTeamMember.


:hasTeamMember rdfs:subPropertyOf rdfs:member.

:hasAllRounderMember rdfs:subPropertyOf rdfs:member.


RDFS Entailment
Deduction

:hasAllRoundMember rdfs:subPropertyOf rdfs:member.


:IndianCricketTeam :hasAllronderMember :Hardik.

:IndianCricketTeam rdfs:member :Hardik.

𝑎 𝑟𝑑𝑓𝑠 : 𝑠𝑢𝑏𝑃𝑟𝑜𝑝𝑒𝑟𝑡𝑦𝑂𝑓 𝑏 . 𝑢 𝑎 𝑦 .
𝑟𝑑𝑓𝑠 7
𝑢𝑏 𝑦 .
RDFS Entailment Deduction

:SmartPhoneCompany

rdf:type

:Sponsors
_:n _:n1
RDFS Entailment
Deduction
:IndianCricketTeam :h𝑎𝑠𝐴𝑙𝑙𝑅𝑜𝑢𝑛𝑑𝑒𝑟𝑀𝑒𝑚𝑏𝑒𝑟 : 𝐻𝑎𝑟𝑑𝑖𝑘
_ :n 1 :h𝑎𝑠𝐴𝑙𝑙𝑅𝑜𝑢𝑛𝑑𝑒𝑟𝑀𝑒𝑚𝑏𝑒𝑟 : 𝐻𝑎𝑟𝑑𝑖𝑘 se2

:IndianCricketTeam 𝑟𝑑𝑓𝑠 :𝑚𝑒𝑚𝑏𝑒𝑟 : 𝐻𝑎𝑟𝑑𝑖𝑘


¿
¿ 𝑛 1 :𝑟𝑑𝑓𝑠 :𝑚𝑒𝑚𝑏𝑒𝑟 : 𝐻𝑎𝑟𝑑𝑖𝑘
¿ se2

¿ 𝑛 1:𝑟𝑑𝑓𝑠 :𝑚𝑒𝑚𝑏𝑒𝑟 : 𝐻𝑎𝑟𝑑𝑖𝑘


¿ :𝑛 1 𝑟𝑑𝑓𝑠 :𝑚𝑒𝑚𝑏𝑒𝑟 : 𝑛 2 se1

: 𝐻𝑎𝑟𝑑𝑖𝑘 𝑟𝑑𝑓 :𝑡𝑦𝑝𝑒 : 𝐴𝑙𝑙𝑟𝑜𝑢𝑛𝑑𝑒𝑟


¿ :𝑛 2 𝑟𝑑𝑓 :𝑡𝑦𝑝𝑒 : 𝐴𝑙𝑙𝑟𝑜𝑢𝑛𝑑𝑒𝑟
se2
RDFS Entailment Deduction

:SmartPhoneCompany :AllRounder

rdf:type rdf:type

:Sponsors rdfs:member
:hasAllrounderMember
_:n _:n1 :Hardik
_:n2
RDFS Entailment
Deduction
:Oppo rdf:type :Company.
:Oppo :Sponsors :IndianCricketTeam.
:IndianCricketTeam :hasAllrounderMember :Hardik.
:hasAllrounderMember rdfs:subPropertyOf :hasTeamMember.
:hasAllrounderMember rdfs:domain :CricketTeam.
:hasAllrounderMember rdfs:range :AllRounder.
:hasTeamMember rdf:type rdfs:ContainerMembershipProperty.
_:n rdf:type :SmartPhoneCompany
_:n :sponsors :IndianCricketTeam
_:n :sponsors _:n1
_:n1 rdfs:member :Hardik
_:n1 :hasAllroundMember :Hardik
:Hardik rdf:type :Allrounder
_:n1 rdfs:member _:n2
_:n2 rdf:type :Allrounder ′
𝐺 1
RDFS Entailment
Deduction
_:n rdf:type :SmartPhoneCompany
_:n :sponsors _:n1
_:n1 rdfs:member _:n2 𝐺2
_:n2 rdf:type :Allrounder


𝐺2⊆ 𝐺 1
Coming Up Next…..

SPARQL
SPARQL Protocol and RDF Query
Language

You might also like