mathematical logics description logic: introduction
TRANSCRIPT
![Page 1: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/1.jpg)
Mathematical LogicsDescription Logic: Introduction
1
Fausto Giunchiglia and Mattia FumagallliUniversity of Trento
*Originally by Luciano Serafini and Chiara GhidiniModified by Fausto Giunchiglia and Mattia Fumagalli
![Page 2: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/2.jpg)
Mental Model
2/61
World
LanguageL
TheoryT
DomainD
ModelM
MentalModel
SEMANTICGAP
Causes
Represents
expresses
grounds
![Page 3: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/3.jpg)
Logical Model
3/61
SEMANTICGAP
World
LanguageL
TheoryT
DomainD
ModelM
expresses
LogicalModel
groundsInterpretation
Entailment
Causes
Represents
![Page 4: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/4.jpg)
*Where G informally means “Monkey gets banana”*Where #3 stands for “Monkey actually gets Banana”.
Logical Model
4/61
LogicalModel
ModelM
TheoryT
LanguageL
DomainD
L = “Monkey, Above, Banana, Near, Get, monkey#1, banana#2, tree, ⊓, ⊔, ¬, ⊑, ∃, ∀…”
TBOX = “MonkeyGetBanana ≡ Monkey ⊓∀Get.Banana”
D: {monkey#1, banana#2}
ABOX: “MonkeyGetBanana(monkey#1), Banana(banana#2)”
T, A ⊨ ∀Get.Banana
World
SEMANTICGAP
/ Get
monkey#1 banana#2
MONKEY
/ Get--
banana#2 monkey#2
BANANA
![Page 5: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/5.jpg)
qThe syntax of ClassL is similar to PLqAlphabet of symbols Σ0
5
Σ0
Descriptive Logical
⊓, ⊔, ¬
Constantsone proposition only
A, B, C …
Variablesthey can be substituted by any
proposition or formulaP, Q, ψ …
NOTE: not only characters but also words (composed by several characters) like “monkey” are descriptive symbols
Language (Syntax)
![Page 6: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/6.jpg)
Overview
Description Logics (DLs) is a family of KR formalisms
TBox
ABox
Representation Reasoning
Alphabet of symbols with two new symbols w.r.t. ClassL:∀R (value restriction)
∃R (existential quantification)
R are atomic role names
6
![Page 7: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/7.jpg)
Origins of Description Logics
Description Logics stem from early days knowledge representation formalisms (late ‘70s, early ‘80s):Semantic Networks: graph-based formalism, used to represent the meaning of sentences.
Frame Systems: frames used to represent prototypical situations, antecedents of object-oriented formalisms.
Problems: no clear semantics, reasoning not well understood. Description Logics (a.k.a. Concept Languages, Terminological Languages) developed starting in the mid ’80s, with the aim of providing semantics and inference techniques to knowledge representation system
7
![Page 8: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/8.jpg)
What are Description Logics today?
In the modern view, description logics are a family of logics that allow to speak about a domain composed of a set of generic (pointwise) objects, organized in classes, and related one another via various binary relations. Abstractly, description logics allows to predicate about labeled directed graphsvertexes represents real world objectsvertexes’ labels represents qualities of objectsedges represents relations between (pairs of) objectsvertexes’ labels represents the types of relations between objects.
Every piece of world that can be abstractly represented in terms of a labeled directed graph is a good candidate for being formalized by a DL.
8
![Page 9: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/9.jpg)
What are Description Logics about?
ExerciseRepresent Metro lines in Milan in a labelled directed graph
9
![Page 10: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/10.jpg)
What are Description Logics about?
ExerciseRepresent some aspects of Facebook as a labelled directed graph
10
![Page 11: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/11.jpg)
What are Description Logics about?
ExerciseRepresent some aspects of human anatomy as a labelled directed graph
11
![Page 12: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/12.jpg)
What are Description Logics about?
ExerciseRepresent some aspects of everyday life as a labelled directed graph
12
![Page 13: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/13.jpg)
The everyday life example as a graph - intuition
Family of logics designed for knowledge representation
Allow to encode general knowledge (as above) as well as specific properties about objects (with individuals, e.g., Mary).
13
![Page 14: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/14.jpg)
Ingredients of a Description LogicA DL is characterized by:
A description language: how to form concepts and roles
Human ⊓ Male ⊓ ∃hasChild. T ⊓ ∀hasChild.(Doctor ⊔ Lawyer)
A mechanism to specify knowledge about concepts and roles (i.e., a TBox)
Father ≡ Human ⊓ Male ⊓ ∃hasChild.TT = HappyFather ⊑ Father ⊓ ∀hasChild.(Doctor ⊔ Lawyer)
hasFather ⊑ hasParent
A mechanism to specify properties of objects (i.e., an ABox)
A = {HappyFather (john), hasChild (john, mary )}
A set of inference services that allow to infer new properties on concepts, roles andobjects, which are logical consequences of those explicitly asserted in the T-box and inthe A-box
(T , A) ⊨HappyFather ⊑ ∃hasChild.(Doctor ⊔ Lawyer )Doctor ⊔ Lawyer (mary )
14
![Page 15: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/15.jpg)
Architecture of a Description Logic system
15
![Page 16: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/16.jpg)
Many description logics
16
![Page 17: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/17.jpg)
Syntax – ALC (AL with full concept negation)qFormation rules:
<Atomic> ::= A | B | ... | P | Q | ... | ⊥ | ⊤
<wff> ::= <Atomic> | ¬ <wff> | <wff> ⊓ <wff> | <wff> ⊔ <wff> | ∀R.C | ∃R.C
17
q¬ (Mother ⊓ Father)
“it cannot be both a mother and father”
qPerson ⊓ Female
“persons that are female”
qPerson ⊓ ∃hasChild. ⊤
“(all those) persons that have a child”
qPerson ⊓ ∀hasChild. ⊥
“(all those) persons without a child”
qPerson ⊓ ∀hasChild.Female
“persons all of whose children are female”
![Page 18: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/18.jpg)
Syntax – ClassL as DL-language
qIntroduction of the ⊔ and elimination of roles ∀R.C and ∃R.C
qFormation rules:<Atomic> ::= A | B | ... | P | Q | ... | ⊥ | ⊤<wff> ::= <Atomic> | ¬ <wff> | <wff> ⊓ <wff> | <wff> ⊔ <wff>
qThe new language is a description language without roles which is ClassL (also called propositional DL)
NOTE: So far, we are considering DL without TBOX and ABox.
18
![Page 19: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/19.jpg)
Syntax - AL* Interpretation (∆,I)
qI(⊥) =∅ and I(⊤) = ∆ (full domain, “Universe”)qFor every concept name A of L, I(A) ⊆ ∆qI(¬C) = ∆ \ I(C)qI(C ⊓ D) = I(C) ∩ I(D)qI(C ⊔ D) = I(C) ∪ I(D)
qFor every role name R of L, I(R) ⊆ ∆ × ∆qI(∀R.C) = {a ∈ ∆ | for all b, if (a,b)∈I(R) then b∈I(C)}qI(∃R.⊤) = {a ∈ ∆ | exists b s.t. (a,b) ∈ I(R)}qI(∃R.C) = {a ∈ ∆ | exists b s.t. (a,b) ∈ I(R), b ∈ I(C)}qI(≥nR) = {a ∈ ∆ | |{b | (a, b) ∈ I(R)}| ≥ n}qI(≤nR) = {a ∈ ∆ | |{b | (a, b) ∈ I(R)}| ≤ n}
19
TheSAME as in ClassL
![Page 20: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/20.jpg)
qBy regarding propositions as classes, it is very convenient to use Venn diagrams
qVenn diagrams are used to represent extensional semantics of propositions in analogy of how truth-tables are used to represent intentional semantics
qVenn diagrams allow to compute a class valuation σ’s value in polynomial time
qIn Venn diagrams we use intersecting circles to represent the extension of a proposition, in particular of each atomic proposition
qThe key idea is to use Venn diagrams to symbolize the extension of a proposition P by the device of shading the region corresponding to the proposition, as to indicate that P has a meaning (i.e., the extension of P is not empty).
20
Semantics -Venn Diagrams and Class-Values
![Page 21: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/21.jpg)
21
Venn diagrams are built starting from a “main box” which is used to represent the Universe U.
P
σ(P)
σ(⊥)
⊥
The falsehood symbol corresponds to the empty set.
Semantics -Venn Diagram of P, ⊥
![Page 22: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/22.jpg)
22
¬P corresponds to the complement of P w.r.t. the universe U.P
The truth symbol corresponds to the universe U.
σ(¬P)
σ(⊤)
Semantics -Venn Diagram of ¬P, ⊤
![Page 23: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/23.jpg)
23
The intersection of P and Q
23
P
The union of P and Q
Q
P Q
σ(P ⊓ Q)
σ(P ⊔ Q)
Semantics -Venn Diagram of P ⊓ Q and P ⊔ Q
![Page 24: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/24.jpg)
24
q Prove by Venn diagrams that σ(P) = σ(¬¬P)
q Case σ(P) = ∅
⊥ σ(P)
σ(¬P)
⊥ σ(¬¬P)
How to use Venn diagrams - exercise 1
![Page 25: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/25.jpg)
2525
q Prove by Venn diagrams that σ(P) = σ(¬¬P)
q Case σ(P) = U
σ(P)
σ(¬P)
σ(¬¬P)
⊥
How to use Venn diagrams - exercise 1
![Page 26: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/26.jpg)
26
q Prove by Venn diagrams that σ(P) = σ(¬¬P)
q Case σ(P) not empty and different from U
σ(P)
σ(¬P)
σ(¬¬P)
P
P
P
How to use Venn diagrams - exercise 1
![Page 27: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/27.jpg)
2727
q Prove by Venn diagrams that σ(¬(A ⊔ B)) = σ(¬ A ⊓ ¬ B)
q Case σ(A) and σ(B) not empty (other cases as homework)
σ(¬(A ⊔ B))
σ(¬ A ⊓ ¬ B)
A B
A B
σ(A ⊔ B)
σ(¬ A)
A B
A B
σ(¬ B)A B
How to use Venn diagrams - exercise 2
![Page 28: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/28.jpg)
qLet σ be a class-valuation on language L, we define the truth-relation (or class-satisfaction relation) ⊨ and write
σ ⊨ P
(read: σ satisfies P) iff σ(P) ≠ ∅
qGiven a set of propositions Γ, we define
σ ⊨ Γ
iff σ ⊨ θ for all formulas θ∈ Γ
28
Semantics - Truth Relation (Satisfaction Relation)
![Page 29: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/29.jpg)
qLet σ be a class valuation on language L. σ is a model of a proposition P (set of propositions Γ) iff σ satisfies P (Γ).
qP (Γ) is class-satisfiable if there is a class valuation σ such that σ ⊨ P (σ ⊨ Γ).
29
Semantics - Model and Satisfiability
![Page 30: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/30.jpg)
qIs the formula P = ¬(A ⊓ B) satisfiable?In other words, there exist a σ that satisfies P? YES!
In order to prove it we use Venn diagrams and it is enough to find one.
σ is a model for P
30
A B
Semantics - Satisfiability, an example
![Page 31: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/31.jpg)
qLetσ beaclassvaluationonlanguageL.
qPistrueunder σ ifPissatisfiable(σ⊨ P)
qPisvalid ifσ⊨ Pforallσ (notation:⊨ P)
qInthiscase,Piscalledatautology(alwaystrue)
qNOTE:thenotionsof‘true’and‘false’arerelativetosometruthvaluation.
31
Semantics - Truth, satisfiability and validity
![Page 32: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/32.jpg)
• Is the formula P = A ⊔ ¬A valid?In other words, is P true for all σ? YES!
In order to prove it we use Venn diagrams, but we need to discuss all cases.
32
A
Case σ(A) empty: if σ(A) is empty, then σ(¬A) is the universe U
Case σ(A) not empty:if σ(A) is not empty, σ(¬A) covers all the other elements of U
⊥
Semantics -Validity, an example
![Page 33: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/33.jpg)
Semantics - Interpretation of Existential Quantifier
qI(∃R.C) = {a ∈ ∆ | exists b s.t. (a,b) ∈ I(R), b ∈ I(C)}
qThose a that have some value b in C with role R.
b I(C)
a (a,b)∈I(R)
33
![Page 34: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/34.jpg)
Semantics - Interpretation of Value Restriction
qI(∀R.C) = {a ∈ ∆ | for all b, if (a,b)∈I(R) then b∈I(C)}
qThose a that have only values b in C with role R.
b I(C)
a if (a,b) ∈I(R)
b'b''
if (a,b') ∈I(R)if (a,b'') ∈I(R)
34
![Page 35: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/35.jpg)
Semantics - Interpretation of Number Restriction
qI(≥nR) = {a∈∆ | |{b | (a, b) ∈ I(R)}|≥ n}
qThose a that have relation R to at least n individuals.
∆
a
bb'…
|{b | (a, b) ∈ I(R)}| ≥ n
35
![Page 36: Mathematical Logics Description Logic: Introduction](https://reader033.vdocuments.mx/reader033/viewer/2022050612/6274237a4817f4779252d03d/html5/thumbnails/36.jpg)
Given a class-propositions P we want to reason about the following:
qModel checking Does σ satisfy P? (σ ⊨ P?)
qSatisfiability Is there any σ such that σ ⊨ P?
qUnsatisfiability Is it true that there are no σ satisfying P?
qValidity Is P a tautology? (true for all σ)
36
Reasoning on Class-Propositions