foundations of description logics
TRANSCRIPT
Foundations of Description Logics
Arina Britz
ISAO, Cape Town 2018
Origins
Logic in the East – Buddhist and Islamic traditions
Logic in the West – Aristotle (300s BC)
Logicism – Boole, Frege (late 1800s), Russell (early 1900s)
Symbolic logic – Godel and Tarski (1930s)
Computation and IT – Von Neumann and Turing (1940s)
Classical logic – Idealist modelling and reasoning
Non-classical logics
Logic engineering
Among all the liberal arts, the first is logic – John of Salisbury
Syllogisms
Logical argument forms
Statements made about predicates / subjects / categories:I All A are BI No A are BI Some A are BI Not all A are B
Let’s write ¬ whenever we mean ‘not’:I All A are BI All A are ¬BI Some A are BI Some A are ¬B
Let’s write v for ‘all ... are’, and 6v instead of ‘not all ... are’:I A v BI A v ¬BI A 6v ¬BI A 6v B
Syllogisms
Logical argument forms
Statements made about predicates / subjects / categories:I All A are BI No A are BI Some A are BI Not all A are B
Let’s write ¬ whenever we mean ‘not’:I All A are BI All A are ¬BI Some A are BI Some A are ¬B
Let’s write v for ‘all ... are’, and 6v instead of ‘not all ... are’:I A v BI A v ¬BI A 6v ¬BI A 6v B
Syllogisms
Logical argument forms
Statements made about predicates / subjects / categories:I All A are BI No A are BI Some A are BI Not all A are B
Let’s write ¬ whenever we mean ‘not’:I All A are BI All A are ¬BI Some A are BI Some A are ¬B
Let’s write v for ‘all ... are’, and 6v instead of ‘not all ... are’:I A v BI A v ¬BI A 6v ¬BI A 6v B
From traditional to modern logic
Predicates, argument forms, limited negation, concept inclusion,assertions 3
Fully symbolic language with compositional semantics 7
Boolean connectives:I and: ∧I or: ∨I not: ¬I only if: →I ... but, unless, if and only if, ...
Objects:I Named objects (constant symbols): a, b, c , . . .I Placeholders for unnamed objects (variables): x , y , z , . . .
Predicates: A,B, . . . (unary, binary, ..., n-ary)
Quantifiers:I all: ∀I some: ∃
From traditional to modern logic
Predicates, argument forms, limited negation, concept inclusion,assertions 3
Fully symbolic language with compositional semantics 7
Boolean connectives:I and: ∧I or: ∨I not: ¬I only if: →I ... but, unless, if and only if, ...
Objects:I Named objects (constant symbols): a, b, c , . . .I Placeholders for unnamed objects (variables): x , y , z , . . .
Predicates: A,B, . . . (unary, binary, ..., n-ary)
Quantifiers:I all: ∀I some: ∃
From traditional to modern logic
Predicates, argument forms, limited negation, concept inclusion,assertions 3
Fully symbolic language with compositional semantics 7
Boolean connectives:I and: ∧I or: ∨I not: ¬I only if: →I ... but, unless, if and only if, ...
Objects:I Named objects (constant symbols): a, b, c , . . .I Placeholders for unnamed objects (variables): x , y , z , . . .
Predicates: A,B, . . . (unary, binary, ..., n-ary)
Quantifiers:I all: ∀I some: ∃
From traditional to modern logic
Predicates, argument forms, limited negation, concept inclusion,assertions 3
Fully symbolic language with compositional semantics 7
Boolean connectives:I and: ∧I or: ∨I not: ¬I only if: →I ... but, unless, if and only if, ...
Objects:I Named objects (constant symbols): a, b, c , . . .I Placeholders for unnamed objects (variables): x , y , z , . . .
Predicates: A,B, . . . (unary, binary, ..., n-ary)
Quantifiers:I all: ∀I some: ∃
Translating sentences to predicate logic
Simple statements:I All A are B: ∀x(A(x)→ B(x))I No A are B: ¬∃x(A(x) ∧ B(x))I Some A are B: ∃x(A(x) ∧ B(x))I Not all A are B: ¬∀x(A(x)→ B(x))
Sentences with multiple quantifiers and binary predicates:I Every boy loves a girl:
∀x(B(x)→ ∃y(G (y) ∧ L(x , y)))
I No girl who loves a boy is not loved by some boy:
¬∃x(G (x) ∧ ∃y(B(y) ∧ L(x , y)) ∧ ¬∃z(B(z) ∧ L(z , x)))
I There is a cycle of n alternating boys and girls holding hands.
Translating sentences to predicate logic
Simple statements:I All A are B: ∀x(A(x)→ B(x))I No A are B: ¬∃x(A(x) ∧ B(x))I Some A are B: ∃x(A(x) ∧ B(x))I Not all A are B: ¬∀x(A(x)→ B(x))
Sentences with multiple quantifiers and binary predicates:I Every boy loves a girl:
∀x(B(x)→ ∃y(G (y) ∧ L(x , y)))
I No girl who loves a boy is not loved by some boy:
¬∃x(G (x) ∧ ∃y(B(y) ∧ L(x , y)) ∧ ¬∃z(B(z) ∧ L(z , x)))
I There is a cycle of n alternating boys and girls holding hands.
Building complex formulas
Definition (The language of predicate logic1)
An atomic formula is an n-ary predicate symbol A followed by narguments, which can be constants or variables
An atomic formula is a formula
If φ and ψ are formulas, then so are: ¬φ, φ ∧ ψ, φ ∨ ψ, and φ→ ψ
If φ is a formula and x is a variable, then ∀x(φ) and ∃x(φ) areformulas
A sentence is a formula in which there are no free variables
Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt –Wittgenstein
1without function symbols
Exercise
Which of the following are predicate formulas?
¬A(c)
∀x(P(x) ∨ R(x , y , z))
R(x , y) ∧ R(x , y , z)
∃y∀x(P(x) ∨ Q(x , y))
∃P(P(x))
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z))
R(x , y) ∧ R(x , y , z)
∃y∀x(P(x) ∨ Q(x , y))
∃P(P(x))
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z)) 3
R(x , y) ∧ R(x , y , z)
∃y∀x(P(x) ∨ Q(x , y))
∃P(P(x))
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z)) 3
R(x , y) ∧ R(x , y , z) 7
∃y∀x(P(x) ∨ Q(x , y))
∃P(P(x))
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z)) 3
R(x , y) ∧ R(x , y , z) 7
∃y∀x(P(x) ∨ Q(x , y)) 3
∃P(P(x))
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z)) 3
R(x , y) ∧ R(x , y , z) 7
∃y∀x(P(x) ∨ Q(x , y)) 3
∃P(P(x)) 7
∃x(R(x ,A(c))→ A(x))
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Which of the following are predicate formulas?
¬A(c) 3
∀x(P(x) ∨ R(x , y , z)) 3
R(x , y) ∧ R(x , y , z) 7
∃y∀x(P(x) ∨ Q(x , y)) 3
∃P(P(x)) 7
∃x(R(x ,A(c))→ A(x)) 7
A mind all logic is like a knife all blade; it makes the hand bleed that usesit – Rabindranath Tagore
Exercise
Translate to predicate logic:
Every small dog travelling with its owner is happy.
Tintin owns a small, happy dog.
Milou is a small dog who travels with Tintin.
Does it follow that Milou is happy?
∀x∀y((Small(x) ∧ Dog(x) ∧ TravelsWith(x , y) ∧ Owns(y , x))→Happy(x))
∃x(Small(x) ∧ Dog(x) ∧ Happy(x) ∧ Owns(tintin, x))
Dog(milou) ∧ Small(milou) ∧ TravelsWith(milou, tintin)
Exercise
Translate to predicate logic:
Every small dog travelling with its owner is happy.
Tintin owns a small, happy dog.
Milou is a small dog who travels with Tintin.
Does it follow that Milou is happy?
∀x∀y((Small(x) ∧ Dog(x) ∧ TravelsWith(x , y) ∧ Owns(y , x))→Happy(x))
∃x(Small(x) ∧ Dog(x) ∧ Happy(x) ∧ Owns(tintin, x))
Dog(milou) ∧ Small(milou) ∧ TravelsWith(milou, tintin)
Exercise
Translate to predicate logic:
Every small dog travelling with its owner is happy.
Tintin owns a small, happy dog.
Milou is a small dog who travels with Tintin.
Does it follow that Milou is happy?
∀x∀y((Small(x) ∧ Dog(x) ∧ TravelsWith(x , y) ∧ Owns(y , x))→Happy(x))
∃x(Small(x) ∧ Dog(x) ∧ Happy(x) ∧ Owns(tintin, x))
Dog(milou) ∧ Small(milou) ∧ TravelsWith(milou, tintin)
Exercise
Translate to predicate logic:
Every small dog travelling with its owner is happy.
Tintin owns a small, happy dog.
Milou is a small dog who travels with Tintin.
Does it follow that Milou is happy?
∀x∀y((Small(x) ∧ Dog(x) ∧ TravelsWith(x , y) ∧ Owns(y , x))→Happy(x))
∃x(Small(x) ∧ Dog(x) ∧ Happy(x) ∧ Owns(tintin, x))
Dog(milou) ∧ Small(milou) ∧ TravelsWith(milou, tintin)
Semantic intuition
Dog
Happy
Small
x1
emo
tintin
nemo
jane
laika
milou
Owns
Owns
Owns
TravelsWith
Semantic intuition
Dog
Happy
Small
x1
emo
tintin
nemo
jane
milou
laika
Owns
Owns
Owns
TravelsWith
Semantics
A sentence is either true or false in any given interpretation
The truth of a complex sentence in an interpretation is determinedonly by the truth of its components
Semantic entailment
Formalisation of valid argument forms
φ1, . . . , φk |= ψ:I From premises φ1, . . . , φk the conclusion ψ followsI In each interpretation where all the premises φ1, . . . , φk are true, so is
the conclusion ψI Every model of φ1, . . . , φk is a model of ψ
The sentence ‘snow is white’ is true if, and only if, snow is white – AlfredTarski
Validity Problem
Check if if φ is valid, written |= φ
Look for a counterexample
Predicate logic is semi-decidable – there is no guaranteed method totest validity, if the answer is ‘No’ the method may not terminate
Predicate logic is axiomatisable
Predicate logic has many useful decidable fragments:I Monadic predicate logic – adding a single binary predicate makes it
undecidableI Two-variable fragmentI Guarded fragment – closed under Boolean composition and guarded
quantification
Example
∀y(G (x , y)→ C (y))
∃y(G (x , y) ∧ C (y))
∀x(G (x)→ C (x))
Validity Problem
Check if if φ is valid, written |= φ
Look for a counterexample
Predicate logic is semi-decidable – there is no guaranteed method totest validity, if the answer is ‘No’ the method may not terminate
Predicate logic is axiomatisablePredicate logic has many useful decidable fragments:
I Monadic predicate logic – adding a single binary predicate makes itundecidable
I Two-variable fragmentI Guarded fragment – closed under Boolean composition and guarded
quantification
Example
∀y(G (x , y)→ C (y))
∃y(G (x , y) ∧ C (y))
∀x(G (x)→ C (x))
Guarded Fragment
Definition (The guarded fragment GF of predicate logic)
> and ⊥ are in GF
If φ is an atomic formula, then φ is in GF
GF is closed under Boolean composition ∧, ∨, ¬ and →If φ is in GF and A(x) is an atomic formula for which every freevariable of φ is among the arguments of A, then ∀y(A(x)→ φ) and∃y(A(x) ∧ φ) are in GF for any sequence y of variables
Example
∀x∀y(R(x , y)→ ¬R(y , x)) (asymmetry) 3
∀x∀y(MWC (x , y)→ M(x , y) ∧ ∃z(C (z , x) ∧ C (z , y))) 7
Exercise
Translate the following statements to predicate logic:
Anyone’s aunt is a sister of their parent.Jane’s aunts are her parents’ sisters.
Which of these are in the 2-variable fragment of predicate logic?
Which are in the guarded fragment?
∀x∀y(A(x , y)→ ∃z(S(x , z) ∧ P(z , y)))
∀x(A(x , jane)→ ∃z(S(x , z) ∧ P(z , jane)))
Next up – Choosing a fragment of predicate logic to work with
Exercise
Translate the following statements to predicate logic:
Anyone’s aunt is a sister of their parent.Jane’s aunts are her parents’ sisters.
Which of these are in the 2-variable fragment of predicate logic?
Which are in the guarded fragment?
∀x∀y(A(x , y)→ ∃z(S(x , z) ∧ P(z , y)))
∀x(A(x , jane)→ ∃z(S(x , z) ∧ P(z , jane)))
Next up – Choosing a fragment of predicate logic to work with
Exercise
Translate the following statements to predicate logic:
Anyone’s aunt is a sister of their parent.Jane’s aunts are her parents’ sisters.
Which of these are in the 2-variable fragment of predicate logic?
Which are in the guarded fragment?
∀x∀y(A(x , y)→ ∃z(S(x , z) ∧ P(z , y)))
∀x(A(x , jane)→ ∃z(S(x , z) ∧ P(z , jane)))
Next up – Choosing a fragment of predicate logic to work with
Exercise
Translate the following statements to predicate logic:
Anyone’s aunt is a sister of their parent.Jane’s aunts are her parents’ sisters.
Which of these are in the 2-variable fragment of predicate logic?
Which are in the guarded fragment?
∀x∀y(A(x , y)→ ∃z(S(x , z) ∧ P(z , y)))
∀x(A(x , jane)→ ∃z(S(x , z) ∧ P(z , jane)))
Next up – Choosing a fragment of predicate logic to work with
Description Logics
Family of knowledge representation languages for authoring ontologies
Designed to represent knowledge about things, categories of things,and relationships between things and categories
Foundation for the Web Ontology Language (OWL), built on W3CResource Description Framework (RDF) standard for objects
Good tradeoff between expressiveness and complexity of reasoning
Amenable to implementation
From predicate to description logic
Description Logics are syntactic variants of (usually) decidable fragmentsof predicate logic:
Only unary and binary predicates
All variables are hidden from the syntax
No free variables
Restricted use of quantifiers, mostly within GF
Only universal sentences as terminological axioms
Concept building blocks
Atomic building blocks:I Individual names I (objects), e.g. tintin, tibetI Concept names C (classes), e.g. Dog, CountryI Role names R (relations), e.g. owns, travelsTo
Boolean constructors:I conjunction: u (class intersection)I disjunction: t (class union)I negation: ¬ (class complement)
Role restrictions:I existential restriction: ∃ (some)I universal restriction: ∀ (only)
and more: cardinality constraints, inverse roles, role composition, ...
Concept building blocks
Atomic building blocks:I Individual names I (objects), e.g. tintin, tibetI Concept names C (classes), e.g. Dog, CountryI Role names R (relations), e.g. owns, travelsTo
Boolean constructors:I conjunction: u (class intersection)I disjunction: t (class union)I negation: ¬ (class complement)
Role restrictions:I existential restriction: ∃ (some)I universal restriction: ∀ (only)
and more: cardinality constraints, inverse roles, role composition, ...
Concept building blocks
Atomic building blocks:I Individual names I (objects), e.g. tintin, tibetI Concept names C (classes), e.g. Dog, CountryI Role names R (relations), e.g. owns, travelsTo
Boolean constructors:I conjunction: u (class intersection)I disjunction: t (class union)I negation: ¬ (class complement)
Role restrictions:I existential restriction: ∃ (some)I universal restriction: ∀ (only)
and more: cardinality constraints, inverse roles, role composition, ...
Concept building blocks
Atomic building blocks:I Individual names I (objects), e.g. tintin, tibetI Concept names C (classes), e.g. Dog, CountryI Role names R (relations), e.g. owns, travelsTo
Boolean constructors:I conjunction: u (class intersection)I disjunction: t (class union)I negation: ¬ (class complement)
Role restrictions:I existential restriction: ∃ (some)I universal restriction: ∀ (only)
and more: cardinality constraints, inverse roles, role composition, ...
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .>
∃r .>
C t ¬¬∃D
∃r .∀s.C u D
∀r .(C u ¬D)
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .> 7
∃r .>
C t ¬¬∃D
∃r .∀s.C u D
∀r .(C u ¬D)
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .> 7
∃r .> 3
C t ¬¬∃D
∃r .∀s.C u D
∀r .(C u ¬D)
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .> 7
∃r .> 3
C t ¬¬∃D 7
∃r .∀s.C u D
∀r .(C u ¬D)
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .> 7
∃r .> 3
C t ¬¬∃D 7
∃r .∀s.C u D 3
∀r .(C u ¬D)
Building complex concepts
Definition (Concept language of ALC)
Every concept name A ∈ C is a concept
> and ⊥ are concepts
If C and D are concepts, then so are ¬C , C u D, C t D
If r ∈ R and C is a concept, then ∀r .C and ∃r .C are concepts
Which of the following are concepts?
> u r .> 7
∃r .> 3
C t ¬¬∃D 7
∃r .∀s.C u D 3
∀r .(C u ¬D) 3
Concept language semantics
Definition (Interpretation)
An ALC interpretation I consists of a nonempty domain ∆, and aninterpretation function ·I such that:
for each individual name a ∈ I, aI ∈ ∆
for each concept name A ∈ C, AI ⊆ ∆
for each role name r ∈ R, rI ⊆ ∆×∆
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
Concept language semantics
Extend interpretations to complex concept expressions:
>I = ∆
⊥I = ∅(¬C )I = ∆\CI
(C u D)I = CI ∩ DI
(C t D)I = CI ∪ DI
(∃r .C )I = {x ∈ ∆ | x is related by rI to some element in CI}= {x ∈ ∆ | ∃y(rI(x , y) ∧ CI(y))}
(∀r .C )I = {x ∈ ∆ | x is related by rI only to elements in CI}= {x ∈ ∆ | ∀y(rI(x , y)→ CI(y))}
Concept language semantics
Arbitrary concept
A class in the domain
CI ⊆ ∆I
∆I
CI
Concept negation
The complement of a class
(¬C )I = ∆I \ CI
∆I
CI
Concept language semantics
Arbitrary concept
A class in the domain
CI ⊆ ∆I
∆I
CI
Concept negation
The complement of a class
(¬C )I = ∆I \ CI
∆I
CI
Concept language semantics
Concept conjunction
The intersection of two classes
(C u D)I = CI ∩ DI
∆I
CI DI
Concept disjunction
The union of two classes
(C t D)I = CI ∪ DI
∆I
CI DI
Concept language semantics
Concept conjunction
The intersection of two classes
(C u D)I = CI ∩ DI
∆I
CI DI
Concept disjunction
The union of two classes
(C t D)I = CI ∪ DI
∆I
CI DI
Concept language semantics
Existential restriction
(∃r .C )I = {x ∈ ∆ | ∃y(rI(x , y) ∧ CI(y))}
∆I
(∃r .C )I CI
rI
Universal restriction
(∀r .C )I = {x ∈ ∆ | ∀y(rI(x , y)→ CI(y))}
∆I
(∀r .C )I CI
rI
Concept language semantics
Existential restriction
(∃r .C )I = {x ∈ ∆ | ∃y(rI(x , y) ∧ CI(y))}
∆I
(∃r .C )I CI
rI
Universal restriction
(∀r .C )I = {x ∈ ∆ | ∀y(rI(x , y)→ CI(y))}
∆I
(∀r .C )I CI
rI
Example
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
(Canine uMale)I = {. . .}(∃owns.(Canine uMale))I = {. . .}(¬Canine u ∀owns.¬(Male u Canine))I = {. . .}
Mapping to predicate logic
Same notion of domain of interpretation
Individual names mapped to constant symbols
Concept names mapped to unary atomic formulas
Role names mapped to binary atomic formulas
Complex concepts mapped to predicate formulas with a single freevariable
Some unanswered questions – how to
relate or compare complex concepts?
bind the hidden free variable in complex concepts?
assert knowledge about individuals?
determine the veracity of statements?
Mapping to predicate logic
Same notion of domain of interpretation
Individual names mapped to constant symbols
Concept names mapped to unary atomic formulas
Role names mapped to binary atomic formulas
Complex concepts mapped to predicate formulas with a single freevariable
Some unanswered questions – how to
relate or compare complex concepts?
bind the hidden free variable in complex concepts?
assert knowledge about individuals?
determine the veracity of statements?
Making statements
Terminological axioms (TBox axioms):I All owners of a male dog are maleI In predicate logic:
∀x(∃y(Owns(x , y) ∧Male(y) ∧ Dog(y))→ Male(x))
I This is a sentence in predicate logic, so no free variables !
Assertions (ABox assertions):I assert categories to which individuals or pairs of individuals belongI Nemo is a dogI Emo owns NemoI In predicate logic:
Dog(nemo) ∧ Owns(emo, nemo)
Making statements
Terminological axioms (TBox axioms):I All owners of a male dog are maleI In predicate logic:
∀x(∃y(Owns(x , y) ∧Male(y) ∧ Dog(y))→ Male(x))
I This is a sentence in predicate logic, so no free variables !
Assertions (ABox assertions):I assert categories to which individuals or pairs of individuals belongI Nemo is a dogI Emo owns NemoI In predicate logic:
Dog(nemo) ∧ Owns(emo, nemo)
Axioms
C v D
Concept inclusion / subsumption:I C is subsumed by DI C is more specific than DI D generalises CI All C are DI Every C is a D
Formalises the syllogism “All ... are ...”
Predicate logic translation:I Binds the free variable in C and in DI ∀x(C (x)→ D(x))
Example
∃owns.(Dog uMale) v Male
Assertions
a : C ; (a, b) : r
Concept and role assertions:I a is an instance of CI a and b are related by r
Predicate logic translation:I No free variablesI C (a)I r(a, b)
Example
nemo : Dognemo : ¬Male(emo, nemo) : owns
Truth in an interpretation
Recall – An interpretation I is a tuple 〈∆, ·I〉 with domain ∆ of objectsand interpretation function ·I such that:
for each individual name a ∈ I, aI ∈ ∆
for each concept name A ∈ C, AI ⊆ ∆
for each role name r ∈ R, rI ⊆ ∆×∆
Definition (Satisfaction)
I C v D if CI ⊆ DI (read: I satisfies C v D)
I a : C if aI ∈ CI
I (a, b) : r if (aI , bI) ∈ rI
Truth in an interpretation
Recall – An interpretation I is a tuple 〈∆, ·I〉 with domain ∆ of objectsand interpretation function ·I such that:
for each individual name a ∈ I, aI ∈ ∆
for each concept name A ∈ C, AI ⊆ ∆
for each role name r ∈ R, rI ⊆ ∆×∆
Definition (Satisfaction)
I C v D if CI ⊆ DI (read: I satisfies C v D)
I a : C if aI ∈ CI
I (a, b) : r if (aI , bI) ∈ rI
Truth in an interpretation
I C v D if CI ⊆ DI
∆I
CI
DI
I a : C if aI ∈ CI
∆I
aI
CI
I (a, b) : r if (aI , bI) ∈ rI
∆I
aI bI
rI
Truth in an interpretation
I C v D if CI ⊆ DI
∆I
CI
DI
I a : C if aI ∈ CI
∆I
aI
CI
I (a, b) : r if (aI , bI) ∈ rI
∆I
aI bI
rI
Truth in an interpretation
I C v D if CI ⊆ DI
∆I
CI
DI
I a : C if aI ∈ CI
∆I
aI
CI
I (a, b) : r if (aI , bI) ∈ rI
∆I
aI bI
rI
Example
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
I |= laika : Canine ?
I |= > v Canine t ∃owns.Canine ?
I |= ∃owns.(Male u Canine) v Male ?
Example
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
I |= laika : Canine ? 3
I |= > v Canine t ∃owns.Canine ?
I |= ∃owns.(Male u Canine) v Male ?
Example
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
I |= laika : Canine ? 3
I |= > v Canine t ∃owns.Canine ? 3
I |= ∃owns.(Male u Canine) v Male ?
Example
∆ICanineI
MaleI
DogI
x
emoI
tintinI
nemoI
janeI
laikaI
milouI
ownsI
ownsI
ownsI
ownsI
I |= laika : Canine ? 3
I |= > v Canine t ∃owns.Canine ? 3
I |= ∃owns.(Male u Canine) v Male ? 3
Satisfiability
A knowledge base is a tuple K := 〈T ,A〉, for some TBox T andABox ACaptures both structural knowledge about the domain and explicitknowledge about individuals
Definition (Satisfaction extended)
I T if I C v D for each C v D ∈ TI A if I a : C for each a : C ∈ A and I (a, b) : r for each(a, b) : r ∈ A
If I T ∪ A, we say I is a model of K := 〈T ,A〉K is consistent if it has a model
Reasoning
Each TBox axiom C v D is either true or false in IEach assertion a : C and (a, b) : r is either true or false in IEach I is a complete description of what is true and false in I
But ...
There are infinitely many different interpretations
The domain of interpretation ∆I can itself be infinite
See first, think later, then test. But always see first. Otherwise you willonly see what you were expecting – Douglas Adams
Reasoning
Each TBox axiom C v D is either true or false in IEach assertion a : C and (a, b) : r is either true or false in IEach I is a complete description of what is true and false in I
But ...
There are infinitely many different interpretations
The domain of interpretation ∆I can itself be infinite
See first, think later, then test. But always see first. Otherwise you willonly see what you were expecting – Douglas Adams
Reasoning
Open World AssumptionI “lack of knowledge to the contrary does not imply falsity”I reasoning across all interpretations of a knowledge base
Definition (Entailment)
An axiom or assertion α follows from a knowledge base K, written K |= α,if every model of K is also a model of α.
Consistency – does K have a model?
Entailment – does the axiom α follow from K?
Instance checking – does the assertion α follow from K?
Entailment
Example
What follows from K = 〈T ,A〉2?
T =
EmployedStudent ≡ Student u Employee,
Student u ¬Employee v ¬∃pays.Tax,
EmployedStudent u ¬Parent v ∃pays.Tax,
EmployedStudent u Parent v ¬∃pays.Tax,
∃worksFor.Company v Employee
A =
ibm : Company,
mary : Parent,
john : Student,
(john, ibm) : worksFor
T |= Student u ∃worksFor.Company v EmployedStudent
T 6|= Employee v ∃worksFor.Company
K |= john : EmployedStudent
K 6|= mary : ¬∃pays.Tax
2Example adapted from ESLLI 2018 tutorial by Ivan Varzinczak
Query Answering
For which individuals does the query answer α follow from K?
q(x) := EmployedStudent(x) ∧ ¬Parent(x)
Conjunctive queries
q(x , y) := EmployedStudent(x) ∧ worksFor(x , y) ∧ Company(y)
q(x) := ∃y(EmployedStudent(x) ∧ worksFor(x , y) ∧ Company(y))
First-order queries
q(x , y) := EmployedStudent(x) ∧ worksFor(x , y) ∧ Company(y)