Language L Theory T: Semantic GAP
Language L Theory T: Semantic GAP
expresses
Language Theory
L T
Causes
Mental
World
Model
Represents
grounds
Domain Model
D M
SEMANTIC
GAP 1/61
Logical Model
expresses
Language Theory
L T
Interpretation
Causes
Entailment
Logical
World
Model
Represents
grounds
Domain Model
D M
SEMANTIC
GAP 2/61
Logical Model
D: {1, 2, 3}
2 I: “I(AboveTree) = 1, I(NearBanana) = 2, I(GetBanana)
NearBanana = 3”
SEMANTIC
*Where G informally means “Monkey gets banana”
GAP *Where #3 stands for “Monkey actually gets Banana”. 3/61
What is Modality?
7
What is Modality?
Example
The fact that John is able to drive a Ferrari may be true
independently from the fact that John is actually driving a Ferrari.
The fact that it is obligatory that everybody pays taxes is typically
true, and this is independent from the fact that everybody actually
pays taxes.
Note: ¬ is not a modal operator since the truth value of ¬φ is a function of the truth value
of φ.
8
Modalities
9
Modalities
Modality Symbol Expression Symbolised
□φ it is necessary that φ
Alethic
◊φ it is possible that φ
Deontic Oφ it is obligatory that φ
Pφ it is permitted that φ
Fφ it is forbidden that φ
Temporal Gφ it will always be the case that φ
Fφ it will eventually be the case that φ
Ba φ agent a believes that φ
Epistemic Ka φ agent a knows that φ
Contextual ist(c,φ) φ is true in the context c
Dynamic [α]φ φ must be true after the execution of program α
(α)φ φ can be true after the execution of program α
Computational AXφ φ is true for every immediate successor state
AGφ φ is true for every successor state
AFφ φ will eventually be true in all the possible evolutions
AφUθ φ is true until θ becomes true
EXφ φ is true in at least one immediate successor state
10
Relational structures in FOL
15
Relational structures in first order and modal logic
16
Relational structures in first order and modal logic
Relational structures in first order and R(b,c)
modal
logic ~R(a,c)
R(a,b) R(b,b)
17
Relational structures in first order and modal logic
In modal logics, relational structures are described from an internal
perspective there is no way to mention points of W and the relation R.
18
The Language of a basic modal logic
If P is a set of primitive proposition, the set of formulas of the
basic modal logic is defined as follows:
each p ∈ P is a formula (atomic formula);
if A and B are formulas then ¬A, A ∧ B, A ∨ B, A ⊃ B and
A ≡ B are formulas
if A is a formula □A and ◊A are formulas.
20
Intuitive interpretation of the basic modal logic
The formula □φ can be intuitively interpreted in many ways
φ is necessarily true (classical modal logic)
φ is known/believed to be true (epistemic logic)
φ is provable in a theory (provability logic)
φ will be always true (temporal logic)
...
In all these cases ◊φ is interpreted as ¬ □¬φ.
In other words, ◊φ, stands for ¬φ is not necessarily true, that is, φ
is possibly true.
21
Semantics for the basic modal logic
A basic frame (or simply a frame) is an algebraic structure
F = ‹W , R›
where R ⊆ W × W .
An interpretation I (or assignment) of a modal language in a
frame F, is a function
I : P → 2W
Intuitively w ∈ I(p) means that p is true in w, or that w is of type p.
A model M is a pair (frame, interpretation). I.e.:
M = ‹F, I›
22
Satisfiability of modal formulas
Truth is relative to a world, so we define that relation of ⊨
between a world in a model and a formula
M, w ⊨ p iff w ∈ I(p)
M, w ⊨ φ ∧ ψ iff M, w ⊨ φ and M, w ⊨ ψ
M, w ⊨ φ ∨ ψ iff M, w ⊨ φ or M, w ⊨ ψ
M, w ⊨ φ ⊃ ψ iff M, w ⊨ φ =⇒ implies M, w ⊨ ψ
M, w ⊨ φ ≡ ψ iff M, w ⊨ φ iff M, w ⊨ ψ
M, w ⊨ ¬φ iff not M, w ⊨ φ
M, w ⊨ □φ iff for all w / s.t. wRw /, M, w / ⊨ φ
M, w ⊨ ◊φ iff there is a w / s.t. wRw / and M, w / ⊨ φ
M, w ⊨ φ for all w ∈ W
23
Satisfiability example
p,q w1 w2 w3 p,¬q
w4 w5 □p,◊q
w6
24
Validity relation on frames
A formula φ is valid in a world w of a frame F, in symbols
F, w ⊨ φ iff
F, w ⊨ φ for all w ∈ W
F ⊨ φ for all F ∈ C
M, w ⊨ Γ implies that M, w ⊨ φ
M, w ⊨ Γ implies that M, w ⊨ φ
26
Hilbert axioms for normal modal logic
A1 φ ⊃ (ψ ⊃ φ)
A2 (φ ⊃ (ψ ⊃ θ)) ⊃ ((φ ⊃ ψ) ⊃ (φ ⊃
A3 θ)) (¬ψ ⊃ ¬φ) ⊃ ((¬ψ ⊃ φ) ⊃ φ)
φφ⊃ψ
MP
ψ
K □(φ ⊃ ψ) ⊃ (□φ ⊃ □ψ)
φ
Nec the necessitation rule
□φ
The above set of axioms and rules is called K, and every modal
logic with a validity relation closed under the rules of K is a
Normal Modal Logic.
27
Remark on Nec
Notice that Nec rule is not the same as
φ⊃□φ (3)
28
Satisfiability – exercises
Exercise
Show that each of the following formulas is not valid by
constructing a frame F = (W , R) that contains a world that does
not satisfy them.
1 □⊥
2 ◊φ ⊃ □φ
3 ◊□φ ⊃ □◊φ
29
Multi-Modal Logics
All the definitions given for basic modal logic can be generalized in the case
in which we have n □-operators □1, . . . , □n (and also ◊1, . . . , ◊n), which are
interpreted in the frame
F = (W ,R1,...R n )
30
Exercises
Exercise
Let F = (W , R1, . . . , Rn) be a frame for the modal language with n
modal operator □1, . . . , □n. Show that the following properties
holds:
1 F⊨ Ki (where Ki is obtained by replacing □ with □i in the
axiom K)
2 If Ri ⊆ Rj then F ⊨ ◊iφ ⊃ ◊jφ
3 If Ri ⊆ Rj then F ⊨ □jφ ⊃ □iφ
4 F⊭ □ip ⊃ □jp for any primitive proposition p
5 If Ri ⊆ Rj ◦ Rk , thena F ⊨ ◊iφ ⊃ ◊j ◊kφ
aGiven two binary relations R and S on the set W ,
31
Other exercises
Exercise
Prove that the following formulae are valid:
⊨ □(φ ∧ ψ) ≡ □φ ∧ □ψ
⊨ ◊(φ ∨ ψ) ≡ ◊φ ∨ ◊ψ
⊨ ¬◊φ ≡ □¬φ
¬□◊◊□□◊□φ ≡ ◊□□◊◊□◊¬φ (i.e., pushing in ¬ changes
□ into ◊ and ◊ into □)
Suggestion: keep in mind the analogy □/∀ and ◊/∃.
32
Exercise
Exercise
Consider the frame F = (W , R) with
W = {0, 1, . . . n − 1}
R = {(0, 1), (1, 2), . . . , (n − 1, 0)}
Show that the following formulas are valid in F
1 □φ ≡ ◊φ
2 φ ≡ □ . . . □φ
n
Answers also the following questions:
3 can you explain which property of the frame R is formalized
by formula 1 and 2?
4 Can you imagine another frame F/, different from F that
33
Expressing properties on structures
formula true at w property of w
◊T w has a successor point
w has a successor point with a successor
◊◊T
point
◊...◊T
there is a path of length n starting at w
n
□⊥ w does not have any successor point
every successor of w does not have a suc-
□□⊥
cessor point
□. . . □⊥ every path starting form w haslength
n less then n
34
Expressing properties on structures
formula true at w property of w
◊p w has a successor point which is p
◊◊p w has a successor point with a successor
point which is p
◊...◊p there is a path of length n starting at w
n and ending at a point which is p
□p every successor of w are p
□□p all the successors of the successors of w
are p
□ . . .□ p all the paths of length n starting form w
n ends in a point which is p
35
Properties of accessibility relation
Formulas can be used to shape the “form” of the structure, as in the
examples expressed before or to impose properties on the accessibility
relation R .
Temporal logic: if the accessibility relation is supposed to represent a
temporal relation, and wRwl means that w l is a future world w.r.t. w,
then R must be a transitive relation. That is if w l is a future world of w,
then any future world of w l is also a future world of w .
Logic of knowledge: if the accessibility relation is used to represent the
knowledge of an agent A, and wRwl represents the fact that w l is a possible
situation coherent with its actual situation w , then R must be reflexive,
since w is always coherent with itself.
1
Typical Properties of R
The following table summarizes the most relevant properties of the
accessibility relation, which have been studied in modal logic, and
for which it has been provided a sound and complete
axiomatization
Properties of R
R is reflexive ∀w.R (w, w )
R is transitive ∀w v u.(R (w, v ) ∧ R (v , u) ⊃ R (w, u))
R is symmetric ∀w v .(R (w, v ) ⊃ R (v , w ))
R is Euclidean ∀w v u.(R (w, v ) ∧ R (w, u) ⊃ R (v , u))
R is serial ∀w.∃vR (w, v )
R is weakly dense ∀w v .R (w, v ) ⊃ ∃u.(R (w, u) ∧ R (u, v ))
R is partly functional ∀w v u.(R (w, v ) ∧ R (v , u) ⊃ v = u)
R is functional ∀w ∃!v.R (w, v )
R is weakly connected ∀u v w.(R (u, v ) ∧ R (u, w ) ⊃
R (v , w ) ∨ v = w ∨ R (w, v ))
R is weakly directed ∀u v w.(R (u, v ) ∧ R (u, w ) ⊃
∃t(R (v , t) ∧ R (w, t)))
2
We will investigate only the ones in red color.
R is reflexive
The axiom T
If a frame is reflexive (we say that a frame has a property, when the
relation R has such a property) then the formulas
T □φ ⊃ φ
3
R is reflexive - soundness
Let M be a model on a reflexive frame F = (W , R ) and w any
world in W . We prove that M , w ⊨ □φ ⊃ φ.
1 Since R is reflexive then wRw
2 Suppose that M , w ⊨ □φ (Hypothesis)
3 From the satisfiability condition of □, M , w ⊨ □φ, and wRw imply
that
4 M , w ⊨ φ (Thesis)
Since from (Hypothesis) we have derived (Thesis), we can conclude
that
M , w ⊨ □φ ⊃ φ.
4
R is reflexive - completeness
Suppose that a frame F = (W , R ) is not
reflexive.
1 If R is not reflexive then there is a w ∈ W which does not access to
w ⊨ □p.
5 since M , w ⊨ p, we have that M , w ⊨ □p ⊃ p.
5
R is symmetric
The axiom B
If a frame is symmetric then the formula
B φ ⊃ □◊φ
holds.
6
R is symmetric - soundness
Let M be a model on a symmetric frame F = (W , R ) and w any world
in W . We prove that M , w ⊨ φ ⊃ □◊φ.
1 Suppose that M , w ⊨ φ (Hypothesis)
6 From the satisfiability condition of ◊, from the fact that w l Rw and that
M , w ⊨ φ, we have that M , w l ⊨ ◊φ.
7 so for every world w l accessible from w , we have that M , w l ⊨ ◊φ.
9
Since from (Hypothesis) we have derived (Thesis), we can conclude that
M , w ⊨ φ ⊃ □◊φ.
7
R is symmetric - completeness
Suppose that a frame F = (W , R ) is not
Symmetric.
1
If R is not symmetric then there are two worlds w, wl ∈ W such that
wRwl and not wlRw
2 Let M be any model on F, and let φ be the propositional formula p. Let V
the set p false in all the worlds of W but w where p is set to be true.
3 From the fact that wl does not access to w , it means that in all the
worlds accessible from wl, p is false,
4 i.e. there is no world wll accessible from wl wuch that M, wll ⊨ p.
5 by the satisfiability conditions of ◊, we have that M, wl ⊭ ◊p.
6 Since there is a world wl accessible from w , with M, w ⊭ ◊p, form
the satisfiability condition of □ we have that M, w ⊭ □◊p.
7 since M, w ⊨ p, and M, w ⊭ □◊p. we have that M, w ⊭ p ⊃ □◊p.
8
R is serial
The axiom D
If a frame is serial then the formula
D □φ ⊃ ◊φ
holds.
9
R is serial - soundness
Let M be a model on a serial frame F = (W , R ) and w any world in W .
We prove that M, w ⊨ □φ ⊃ ◊φ.
1 Since R is serial there is a world wl ∈ W with wRwl
2 Suppose that M, w ⊨ □φ (Hypothesis)
3 From the satisfiability condition of □, M, w ⊨ □φ implies that M, wl ⊨ φ
4 Since there is a world wl accessible from w that satisfies φ, from the
satisfiability conditions of ◊ we have that M, w ⊨ ◊φ (Thesis) .
5 Since from (Hypothesis) we have derived (Thesis), we can conclude
that
M, w ⊨ □φ ⊃ ◊φ.
10
R is serial - completeness
Suppose that a frame F = (W , R ) is not
Serial.
1 If R is not serial then there is a w ∈ W which does not have any
accessible world. I.e., for all w l it does not hold that wRwl.
2 Let M be any model on F .
3 Form the satisfiability condition of □ and from the fact that w does
not have any accessible world, we have that M , w ⊨ □φ.
4 Form the satisfiability condition of ◊ and from the fact that w does
not have any accessible world, we have that M , w ⊨ ◊φ.
5 this implies that M , w ⊨ □φ ⊃ ◊φ
11
R is transitive
The axiom 4
If a frame is transitive then the formula
4 □φ ⊃ □□φ
holds.
12
R is transitive - soundness
Let M be a model on a transitive frame F = (W , R ) and w any world
in W. We prove that M , w ⊨ □φ ⊃ □□φ.
1 Suppose that M , w ⊨ □φ (Hypothesis).
6 From the facts wRw l and w l Rw ll and the fact that R is transitive, we have
that
wRwll.
7 Since M , w ⊨ □φ, from the satisfiability conditions of □ we have that
M , w ll ⊨ φ.
8 Since M , w ll ⊨ φ for every world w ll accessible from w l , then M , w l ⊨ □φ. and
9 therefore M , w ⊨ □□φ. (Thesis)
14
R is euclidean
The axiom 5
If a frame is euclidean then the formula
5 ◊φ ⊃ □◊φ
holds.
15
R is euclidean - soundness
Let M be a model on a euclidean frame F = (W , R ) and w any world in W . We prove
that M , w ⊨ ◊φ ⊃ □◊φ.
1 Suppose that M , w ⊨ ◊φ (Hypothesis).
16
R is euclidean - completeness
Suppose that a frame F = (W , R ) is not euclidean.
1 If R is not euclidean then there are three worlds w, wl, wll ∈ W , such that
wRwl, wRwll but not wlRwll.
2 Let M be any model on F, and let φ be the propositional formula p. Let V the set p false
in all the worlds of W but wl where p is set to be true.
3
From the fact that wll does not access to wl, and in all the other worlds p is false, we
have that wll ⊭ ◊p
4
this implies that M, w ⊭ □◊p.
5 On the other hand, we have that wRwl, and wl ⊨ p, and therefore
M, w ⊨ ◊p. M, w ⊭ □p ⊃ □□p.
6 In summary: M, w ⊭ □◊p, and M, w ⊨ ◊P; from which we have that
M, w ⊭ ◊p ⊃ □◊p.
17
Soundness and completeness
18
Multi-Modal Logics
All the definitions given for basic modal logic can be generalized in the case
in which we have n □-operators □1, . . . , □n (and also ◊1, . . . , ◊n),
which are interpreted in theframe
F = (W , R1, . . . Rn)
19
Exercises
Exercise
Let F = (W , R1, . . . , Rn) be a frame for the modal language with n modal
operator □1, . . . , □n. Show that the following properties holds:
20
Modal logics and agents. What is an agent?
Definition
In artificial intelligence, an intelligent agent (IA) is an autonomous entity
which observes and acts upon an environment (i.e. it is an agent) and
directs its activity towards achieving goals (i.e. it is rational). Intelligent
agents may also learn or use knowledge to achieve their goals. [Russell,
Stuart J.; Norvig, Peter (2003), Artificial Intelligence: A Modern
Approach (2nd ed.)]
21
Modal logics and agents. What is an agent?
Definition
In artificial intelligence, an intelligent agent (IA) is an autonomous entity
which observes and acts upon an environment (i.e. it is an agent) and
directs its activity towards achieving goals (i.e. it is rational). Intelligent
agents may also learn or use knowledge to achieve their goals. [Russell,
Stuart J.; Norvig, Peter (2003), Artificial Intelligence: A Modern
Approach (2nd ed.)]
22
What is an agent?
Definition
An agent is a computer system capable of autonomous action in some
environment, in order to achieve its delegated goals.[Wooldridge, Mike
(2009), An Introduction to MultiAgent Systems (2nd ed.)]
23
What is an agent?
Definition
An agent is a computer system capable of autonomous action in some
environment, in order to achieve its delegated goals.[Wooldridge, Mike
(2009), An Introduction to MultiAgent Systems (2nd ed.)]
24
Main building blocks
Agents act;
Agents are able to achieve goals (often complex).
⇓
Agents are in a close-coupled, continual interaction with their
environment:
sense - decide - act - sense - decide - . . .
25
Simple (Uninteresting) Agents
Thermostat
delegated goal is maintain room temperature
actions are heat on/off
UNIX biff program
delegated goal is monitor for incoming email and flag it
actions are GUI actions.
They are trivial because the decision making they do is trivial.
26
Intelligent Agents as Intentional systems
When explaining human activity, we use statements like the
following:
Janine took her umbrella because she believed it was raining and
she wanted to stay dry.
27
Mental attitudes
(Intelligent) agents are usually described in terms of:
Informational attitudes:
Knowledge
Belief
Motivational-attitudes:
Desire
Intention
Obligation
Commitment
Choice
...
28
Logical agent theories:
(Intelligent) agents are usually described in terms of:
Informational attitudes (modal logic):
Motivational-attitudes (modal logic):
Dynamic component (temporal or dynamic logic).
29
Informational attitudes via Epistemic Logic
Logic to reason about knowledge (and belief).
Seminal book: Jaakko Hintikka, “Knowledge and Belief - An
Introduction to the Logic of the Two Notions” (1962).
□φ is used to express “an agent knows that φ” (Kφ) or “an agent
believes that φ” (Bφ).
The multi-modal version used to represent knowledge (beliefs) of
several agents
Example: “Alice does not know that Bob knows its her Birthday”:
30
Examples
“Ann knows that P implies Q”
KAnn(P ⊃ Q)
“either Ann does or does not know P”
KAnnP ∨ KAnn¬P
“P is possible for Ann”
LAnnP (where L is a shorthand for ¬K ¬)
“Ann knows that she thinks P is possible”
KAnn (LAnn P)
31
A characterization of knowledge
Axioms for modal K;
T: Kφ ⊃ φ (axiom ofNecessity)
“If an agent knows that φ, then φ must be true”. Or, . . . an
agent cannot have wrong knowledge.
4: Kφ ⊃ KKφ (axiom of Positive Introspection)
“If an agent knows that φ, then (s)he knows that s(he) knows that φ”.
Or, . . . an agent knows that s(he) knows.
The logic KT4 (better known as S4), provides a minimal
characterization of knowledge, and corresponds to the set of
reflexive and transitive frames.
But, what about ignorance? We also know what we do not know!
32
A characterization of knowledge
5: ¬Kφ ⊃ K ¬Kφ (axiom of Negative Introspection)
“If an agent does not know that φ, then (s)he knows that s(he)
does not know knows that φ”. Or, . . . an agent knows that s(he)
does not know.
The logic KT45 (better known as S5), provides the standard
characterization of knowledge, and corresponds to the set of
reflexive, symmetric and transitive relations (that is, all the
equivalence relations).
33
A characterization of belief
Axioms for modal K;
Agents can have false beliefs. Therefore T does not hold.
Bφ ⊃ BBφ (axiom of Positive Introspection)
“If an agent believes that φ, then (s)he believes that s(he) believes that φ”.
34
A characterization of belief
Are beliefs mutually consistent? If yes then ¬B(φ ∧ ¬φ)
holds. (Axiom of Consistency)
“an agent does not believe that” φ and ¬φ.
An alternative formulation of this property is via the axiom D:
□φ ⊃ ◊φ. (that is, Bφ ⊃ ¬B¬φ)
“If an agent believes that φ then s(he) does not believe that not φ”.
The logic KD45 provides an alternative characterization of belief, and
corresponds to the set of transitive, euclidean and serial relations
35