l ogics for d ata and k nowledge r epresentation
DESCRIPTION
L ogics for D ata and K nowledge R epresentation. Modal Logic. Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese. Outline. Introduction Syntax Semantics Satisfiability and Validity Kinds of frames - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/1.jpg)
LLogics for DData and KKnowledgeRRepresentation
Modal Logic
Originally by Alessandro Agostini and Fausto GiunchigliaModified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese
![Page 2: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/2.jpg)
2
Outline Introduction Syntax Semantics Satisfiability and Validity Kinds of frames Reasoning services Theorem of equivalence with FOL Theorem of equivalence with DL Tableau calculus
2
![Page 3: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/3.jpg)
Introduction We want to model situations like this one:
1. “Fausto is always happy”
2. “Fausto is happy under certain circumstances”
In PL/ClassL we could have: HappyFausto
In modal logic we have:
1. □ HappyFausto
2. ◊ HappyFausto
As we will see, this is captured through the notion of “possible words” and of “accessibility relation”
3
![Page 4: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/4.jpg)
Syntax We extend PL with two logical modal operators:
□ (box) and ◊ (diamond)
□P : “Box P” or “necessarily P” or “P is necessary true”
◊P : “Diamond P” or “possibly P” or “P is possible”
Note that we define □P = ◊P, i.e. □ is a primitive symbol
The grammar is extended as follows:
<Atomic Formula> ::= A | B | ... | P | Q | ... | ⊥ | ⊤ |
<wff> ::= <Atomic Formula> | ¬<wff> | <wff>∧ <wff> | <wff>∨ <wff> |
<wff> <wff> | <wff> <wff> | □ <wff> | ◊ <wff>
4
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 5: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/5.jpg)
Different interpretations
5
Philosophy □P : “P is necessary”
◊P : “P is possible”
Epistemic □aP : “Agent a believes P ” or “Agent a knows P”
Temporal logics □P : “P is always true”
◊P : “P is sometimes true”
Dynamic logics or logics of programs
□aP : “P holds after the program a is executed”
Description logics
□HASCHILDMALE ∀HASCHILD.MALE
◊HASCHILDMALE ∃HASCHILD.MALE
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 6: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/6.jpg)
Semantics: Kripke Model A Kripke Model is a triple M = <W, R, I> where:
W is a non empty set of worlds R ⊆ W x W is a binary relation called the accessibility relation I is an interpretation function I: L pow(W) such that to each
proposition P we associate a set of possible worlds I(P) in which P holds
Each w ∈ W is said to be a world, point, state, event, situation, class … according to the problem we model
For "world" we mean a PL model. Focusing on this definition, we can see a Kripke Model as a set of different PL models related by an "evolutionary" relation R; in such a way we are able to represent formally - for example - the evolution of a model in time.
In a Kripke model, <W, R> is called frame and is a relational structure.
6
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 7: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/7.jpg)
Semantics: Kripke Model Consider the following situation:
M = <W, R, I>
W = {1, 2, 3, 4}
R = {<1, 2>, <1, 3>, <1, 4>, <3, 2>, <4, 2>}
I(BeingHappy) = {2} I(BeingSad) = {1} I(BeingNormal) = {3, 4}
7
1 2 3
4
BeingHappy
BeingSad
BeingNormal
BeingNormal
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 8: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/8.jpg)
Truth relation (true in a world) Given a Kripke Model M = <W, R, I>, a proposition P ∈ LML and a
possible world w ∈ W, we say that “w satisfies P in M” or that “P is satisfied by w in M” or “P is true in M via w”, in symbols:
M, w ⊨ P in the following cases:
1. P atomic w ∈ I(P)
2. P = Q M, w ⊭ Q
3. P = Q T M, w ⊨ Q and M, w ⊨ T
4. P = Q T M, w ⊨ Q or M, w ⊨ T
5. P = Q T M, w ⊭ Q or M, w ⊨ T
6. P = □Q for every w’∈W such that wRw’ then M, w’ ⊨ Q
7. P = ◊Q for some w’∈W such that wRw’ then M, w’ ⊨ Q
NOTE: wRw’ can be read as “w’ is accessible from w via R”
8
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 9: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/9.jpg)
Semantics: Kripke Model Consider the following situation:
M = <W, R, I>
W = {1, 2, 3, 4}
R = {<1, 2>, <1, 3>, <1, 4>, <3, 2>, <4, 2>}
I(BeingHappy) = {2} I(BeingSad) = {1} I(BeingNeutral) = {3, 4}
M, 2 ⊨ BeingHappy M, 2 ⊨ BeingSad
M, 4 ⊨ □BeingHappy M, 1 ⊨ ◊BeingHappy M, 1 ⊨ ◊BeingSad
9
1 2 3
4
BeingHappy
BeingSad
BeingNormal
BeingNormal
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 10: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/10.jpg)
Satisfiability and Validity Satisfiability
A proposition P ∈ LML is satisfiable in a Kripke model M = <W, R, I> if
M, w ⊨ P for all worlds w ∈ W.
We can then write M ⊨ P
Validity
A proposition P ∈ LML is valid if P is satisfiable for all models M (and by varying the frame <W, R>).
We can write ⊨ P
10
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 11: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/11.jpg)
Satisfiability Consider the following situation:
M = <W, R, I>
W = {1, 2, 3, 4}
R = {<1, 2>, <2, 2>, <3, 2>, <4, 2>}
I(BeingHappy) = {2} I(BeingSad) = {1} I(BeingNormal) = {3, 4}
M, w ⊨ □BeingHappy for all w ∈ W, therefore □BeingHappy is satisfiable in M.
11
1 2 3
4
BeingHappy
BeingSad
BeingNormal
BeingNormal
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 12: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/12.jpg)
Kinds of frames Serial: for every w ∈ W, there exists w’ ∈ W s.t. wRw’
Reflexive: for every w ∈ W, wRw
Symmetric: for every w, w’ ∈ W, if wRw’ then w’Rw
12
1 2 3
1 2
1 2 3
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 13: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/13.jpg)
Kinds of frames Transitive: for every w, w’, w’’ ∈ W, if wRw’ and w’Rw’’ then
wRw’’
Euclidian: for every w, w’, w’’ ∈ W, if wRw’ and wRw’’ then w’Rw’’
We call a frame F = <W, R> serial, reflexive, symmetric or transitive according to the properties of the relation R
13
1 2 3
1 2
3
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 14: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/14.jpg)
Valid schemas A schema is a formula where I can change the variables THEOREM. The following schemas are valid in the class of
indicated frames:
D: □A ◊A valid for serial frames
T: □A A valid for reflexive frames
B: A □◊A valid for symmetric frames
4: □A □□A valid for transitive frames
5: ◊A □◊A valid for Euclidian frames
NOTE: if we apply T, B and 4 we have an equivalence relation
THEOREM. The following schema is valid:
K: □(A B) (□A □B) Distributivity of □ w.r.t.
14
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 15: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/15.jpg)
Proof for D: □A ◊A valid for serial frames In all serial frames M = <W, R>, we have that if (1) then (2)
(1) □A means that for every w∈W such that wRw’ then M, w’ ⊨ A
(2) ◊A means that for some w∈W such that wRw’ then M, w’ ⊨ A
15
1 2
3
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
□A, ◊A
□A, ◊A, A
![Page 16: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/16.jpg)
Proof for T: □ A A valid for reflexive frames
Assuming M, w ⊨ □A, we want to prove that M, w ⊨ A.
From the assumption M, w ⊨ □A, we have that for every w’∈W such that wRw’ we have that M, w’ ⊨ A (1).
Since R is reflexive we also have w’Rw, we then imply that M, w ⊨ A (by substituting w to w’ in (1))
16
□A, A
1 2
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 17: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/17.jpg)
Proof for B: A □◊A valid for symmetric frames
Assume M, w ⊨ A. To prove that M, w ⊨ □◊A we need to show that for every accessible world w’ ∈ W, i.e. such that wRw’, then M, w ⊨ ◊A.
M, w ⊨ ◊A is that for some w’’∈W such that w’Rw’’ then M, w’’ ⊨ A. Therefore we need to prove that for every w’∈W such that wRw’ and for some w’’∈W such that w’Rw’’ then M, w’’ ⊨ A
Since R is symmetric, from wRw’ it follows that w’Rw. For w’’∈W such that w’’ = w, we have that w’Rw’’ and M, w’’ ⊨ A.
Hence M, w ⊨ A.
17
1 2 3
A, □◊A ◊A
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 18: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/18.jpg)
Reasoning services: EVAL Model Checking (EVAL)
Given a (finite) model M = <W, R, I> and a proposition P ∈ LML we want to check whether M, w ⊨ P for all w ∈ W
M, w ⊨ P for all w ?
18
EVALM, PYes
No
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 19: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/19.jpg)
Reasoning services: SAT Satisfiability (SAT)
Given a proposition P ∈ LML we want to check whether there exists a (finite) model M = <W, R, I> such that M, w ⊨ P for all w ∈ W
Find M such that M, w ⊨ P for all w
19
SATPM
No
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 20: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/20.jpg)
Reasoning services: UNSAT Unsatisfiability (unSAT)
Given a (finite) model M = <W, R, I> and a proposition P ∈ LML we want to check that does not exist any world w such that M, w ⊨ P
Verify that does not exist w such that M, w ⊨ P
20
VALM, Pw
No
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 21: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/21.jpg)
Reasoning services: VAL Validity (VAL)
Given a a proposition P ∈ LML we want to check that M, w ⊨ P for all (finite) models M = <W, R, I> and w ∈ W
Verify that M, w ⊨ P for all M and w
21
VALPYes
No
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 22: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/22.jpg)
Equivalence Modal logics – First Order Logic We can define a translation function : LML LFO as
follows:
(P) = P(x) for all propositions P in LML
(P) = (P) for all propositions P
(P * Q) = (P) * (Q) for all propositions P, Q and *∈{,,}
(□P) = ∀x (P) for all propositions P
5(◊P) = ∃x (P) for all propositions P
THEOREM:
For all propositions P in LML, P is modally valid iff (P) is valid in FOL.
22
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 23: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/23.jpg)
Equivalence Modal logics – Description logics Take ALCEU:
<Atomic> ::= A | B | ... | P | Q | ... | ⊥ | ⊤
<wff> ::= <Atomic> | ¬ <wff> | <wff> ⊓ <wff> | <wff> ⊔ <wff> | ∀R.C | ∃R.C
We can define an equivalent multi-modal logic with a mapping function as follows:
(A) = A for A atomic
(¬C) = ¬ (C)
(C ⊓ D) = (C) (D)
(C ⊔ D) = (C) (D)
(∃R.C) = ◊R (C)
(∀R.C) = □R (C)
THEOREM: For all propositions P in LML, P is modally valid iff (P) is valid in DL.
23
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 24: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/24.jpg)
Modal logics Tableau: introduction
24
Recall modal logics semantics:P = □Q for every w’∈W such that wRw’ then M, w’ ⊨ Q
P = ◊Q for some w’∈W such that wRw’ then M, w’ ⊨ Q
Each time we use □ or ◊ we state something about accessible worlds!
Recall satisfiability:
A proposition P ∈ LML is satisfiable if there exist a Kripke model in which it is true.
Therefore the key idea in the modal logics tableau is:If M, w ⊨ □Q then Q must be present in all w’ accessible from w
If M, w ⊨ ◊Q then Q must be present in some w’ trees accessible from w
For all other formulas follow the rules of PL tableau
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 25: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/25.jpg)
Modal logics Tableau: rules
25
We indicate with , i the fact that must be true in world i ∈W
Given the formula in input we apply the rules below by verifying that not all branches are closed:
() (P Q), i | P, i and Q, i
() (P Q), i | P, i or Q, i (two branches)
(◊) ◊P, i | iRj P, j given any (i,j)∈R to denote that P is true | in j given that it is accessible from i
(□) iRj □P, i | P, j
(duality) □P, i | ◊P, i
(duality) ◊P, i | □P, i
We start by convention with , 0
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 26: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/26.jpg)
Modal logics Tableau Example (I)
26
( A B) B satisfiable?
() ( A B) B , 0
/ \
() ( A B) , 0 B , 0
| (open)
A , 0
|
B , 0
(open)
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 27: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/27.jpg)
Modal logics Tableau Example (II)
27
◊A satisfiable?
(duality) ◊A , 0
|
(□) □P , 0
0R1
|
P , 1
(open)
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 28: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/28.jpg)
Modal logics Tableau Example (III)
28
□A □A valid? We negate and check whether ALL branches are closed.
The negation is: (□A □A) □A □A
() □A □A , 0
|
(duality) □A , 0
|
(□) □A , 0
0R1
|
(◊) ◊A , 0
|
A , 1
|
0R1 A , 1
(closed)
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 29: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/29.jpg)
Modal logics Tableau: additional rules
29
We have extra rules to convey frame properties:
(reflexivity) * | iRi
(symmetry) iRj | jRi
(transitivity) iRj jRk | iRk
(seriality) * | iRj
Euclidian properties can be given as a combination of the first three.
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU
![Page 30: L ogics for D ata and K nowledge R epresentation](https://reader034.vdocument.in/reader034/viewer/2022051517/5681599b550346895dc6e559/html5/thumbnails/30.jpg)
Modal logics Tableau Example (IV)
30
□A A valid in reflexive frames?
The negation is: (□A A) (□A A) □A A
() □A A , 0
|
A , 0
|
(□) (reflexive) □A , 0
0R1
|
A , 1
|
0R0 A , 0
(closed)
SYNTAX :: SEMANTICS :: SATISFIABILITY AND VALIDITY :: FRAMES :: REASONING SERVICES :: THEOREMS :: TABLEAU