Modal Logic CS 621 Seminar Group no.: 10 Kiran Sawant (114057001) Joe Cheri Ross (114050001) Sudha Bhingardive (114050002)
Jan 14, 2016
Modal Logic
CS 621Seminar
Group no.: 10Kiran Sawant (114057001)
Joe Cheri Ross (114050001) Sudha Bhingardive (114050002)
Modes of Truth
• Propositional logic is decidable but too restrictive.• FOL and HOL have high expressivity but are not decidable.• Modal logic extends PL to add expressivity without losing
decidability.
Consider the following:• Either it rains or it does not rain.• It may rain today.• Dr. Manmohan Singh is Prime Minister of India.• I believe that Ram believes that I know that he did it.
The truth value of some of these sentences depends on the place, time and judgement of the person who uttered it.
What is Modal Logic?
Study of modal propositions and logic relationships
Modal propositions are propositions about what is necessarily the case and what is possibly the case
Ex: It is possible for humans to travel to Mars It is necessary that either it is raining or it is not raining
Modal Operators: □ and ◊ □ is read as “necessarily”
◊ is read as “possibly”
p: It will rain tomorrow
□p: It is necessary that it will rain tomorrow◊p: It is possible that it will rain tomorrow
□p ↔ ¬◊¬p
Syntax
The formulas of basic modal logic φ are defined by the following Backus Naur form (BNF):
φ := p | | ⊥ ¬φ | φ ∧ ψ | φ ∨ ψ | φ → ψ | φ ↔ ψ | □φ | ◊φ where "p" is any atomic formula
Example: □p →□ □ p p ∧ ◊(p → □¬r) □((◊q ∧ ¬r) → □p)
Meanings of the Modal Operators
□
◊
Alethic logicp is necessarily true
p is possibly true
Deontic logic p is obligatory p is permitted
Temporal logic p will always be true p will become true Sometime in future
Epistemic logic p knows that P believes that
Semantics
Kripke structures (possible worlds structures) are models ofbasic modal logic.
A Kripke structure is a tuple M = (W,R,L) where
W is a non-empty set (possible Worlds)
R W⊆ ΧW is an accessibility relation (wRv)
L : W →P, {true, false} is a labelling function
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Truth of Modal Formulas
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Example of Kripke Structure
Inference RuleslUS – Rule of Uniform Substitution: The result of uniformly replacing any variables p1, …, pn in a theorem by any WFF φ1, …, φn respectively, is itself a theorem
lMP – Modus Ponens
lNR – Rule of Necessitation: If φ is a theorem, so is □φ
Axioms and their Corresponding Properties on Accessibility Relations
Axiom Formula Scheme Property on R
K □ (φ → ψ) → (□φ → □ψ )
T □φ → φ Reflexive
B φ → □◊φ Symmetric
D □φ → ◊φ Serial
4 □φ → □□φ Transitive
5 ◊φ → □◊φ Euclidean
□φ ↔ ◊φ Functional
Some modal logic systems take only a subset of this set
All general, problem independent theorems can be derived from only these axioms and some additional, problem specific axioms describing the research problem
Which Formula Schemes Should Hold for these Readings of □?
□φ K T D 4 5
It is necessarily true that φ Y Y Y Y Y
It will always be true that φ Y Y
It ought to be that φ Y Y
Agent Q believes that φ Y Y Y Y
Agent Q knows that φ Y Y Y Y Y
Axiomatic SystemsSystems:
K := K + NT := K + TS4 := T + 4S5 := S4 + 5D := K + D
Example of Inference in Modal Logic
Given: □(p → q) and □pInfer: □qwhere, p: It rained. q: Grass is wet.
1.□(p → q) [Given]2.□p [Given]3.□p → □q [K, 1]4.□q [MP, 3 and 2]
Muddy Children Problem Statement
Two children a and b coming to mother after playing
Mother says “Atleast one of you has dirty forehead”
She asks each one “Do you know whether your forehead is dirty ? “
If b says “yes”: a's forehead is not muddyIf b says “no”: both foreheads are muddy
Muddy Children Kripke Structure
(0 0)W1
W2 W3 (1 0)(0 1)
W4(1 1)
(A,B)
b
ba
a
Muddy Children Formalization A: a's forehead is dirtyB: b's forehead is dirtyKi : Child i knows Initial: Ka Kb (A ∨ B)
After first query: Ka ¬Kb B
Final: Ka A
Muddy Children Proof
1. Ka Kb(¬A → B) Premise (Mother said)2. Ka (Kb ¬A → Kb B) K- Axiom3. Ka¬KbB → Ka¬Kb¬A (p→q)(¬q → ¬p), K-
Axiom4. Ka¬KbB After 1st query 1. Ka¬Kb¬A 3,4- MP
6. Ka(¬Kb¬A → KbA) Premise(Init)7. Ka Kb A 5,6- Axiom K and MP8. Ka A 7- Axiom T
Conclusion
• Modal logic forms the basis for other kinds of logic.
• Modal logic extends the expressivity propositional logic.
• Modal logic is a non-numeric alternative to different logics like fuzzy logic, probabilistic logic, multiple-valued logic.
• Fuzzy logic operations on uncertainties derive uncertainties (better or worse), whereas in modal logic one can derive certainties from uncertainties.
• Relevant in various fields such as knowledge representation[6], linguistics[5], verification.
References
1.P. Blackburn, et. al., Modal Logic, Cambridge: Cambridge University Press, 2001
2.P. Blackburn, et. al., Handbook of Modal Logic, New York: Elsevier Science Inc, 2006
3.S. A. Kripke, "A Completeness Theorem in Modal Logic", The Journal of Symbolic Logic, vol. 24, no. 1, 1-14, Mar. 1959
4.J. Doyle, "A Truth Maintenance System", Artificial Intelligence, vol. 12, no. 3, 231-272, 1979
5.L. S. Moss and H. Tiede, "Applications of Modal Logic in Linguistics", Elsevier Science. Linguistics, 1031-1077, 2006
6.R. Rosati, "Multi-modal Nonmonotonic Logics of Minimal Knowledge", Annals of Mathematics and Artificial Intelligence, vol. 48, no. 3-4, 169-185, Dec. 2006
BACKUP
Example 1:
Example 1:
Example 1:
Example 1:
Example 2:
Example 2:
Example 2:
Cards game: Kripke structure
Wise Men PuzzleProblem description
3 Wise men There are 3 Red hats and 2 white hats The King puts a hat on each of them and
ask sequentially the color of their hat on their head
1st man and 2nd man say he doesn't know We have to prove whether 3rd man now
knows his hat is red
Wise Men PuzzleSolution Method
Initially:- R R R R R W R W R R W W
W R R W R W W W R WWW
After 1st man says he doesn't know:-
R R R R R W R W R W R R W R W
W W R R W W
After 2nd man says he doesn't know:-
R R R R R W R W R W R R W R W
W W R R W W
Now 3rd man knows that the hat he wears is Red
Wise Men PuzzleInitial Knowledge
Pi means man i has red hat.
¬Pi means man i has white hat.
Kj Pi means agent/man j knows that man i has a red hat.
Let Γ be set of formulas:- {C(p1 ∨ p2 ∨ p3),C(p1 → K2 p1), C(¬p1 → K2 ¬p1),C(p1 → K3 p1), C(¬p1 → K3 ¬p1),C(p2 → K1 p2), C(¬p2 → K1 ¬p2),C(p2 → K3 p2), C(¬p2 → K3 ¬p2),C(p3 → K1 p3), C(¬p3 → K1 ¬p3),C(p3 → K2 p3), C(¬p3 → K2 ¬p3)}.
Wise Men PuzzleFormalisation
Naive approach
Γ, C(¬K1 p1 ¬K1 ¬p1), C(¬K2 p2 ∧ ¬K2 ¬p2) |− K3 p3∧
This doesn't capture time between events(2nd man answers after 1st)
To formalise correctly this has to be broken into 2 entailments, corresponding to each announcement
Wise Men Puzzle Correct Formalisation
1. Γ, C(¬K1 p1 ¬K1 ¬p1) |− ∧C(p2 p3).∨
2. Γ, C(p2 p3), C(¬K2 p2, ¬K2 ∨ ∧¬p2) |− K3 p3.
Wise Men PuzzleProof of Entailment 1
1 C(p1 p2 p3) ∨ ∨ premise
2 C(pi → Kj pi) premise, (i= j)
3 C(¬pi → Kj ¬pi) premise, (i = j)
4 C¬K1 p1 premise
5 C¬K1 ¬p1 premise 6 C 7 ¬p2 ¬p3 ∧
assumption 8 ¬p2 → K1 ¬p2 Ce 3 (i, j) =
(2, 1) 9 ¬p3 → K1 ¬p3 Ce 3 (i, j) =
(3, 1) 10 K1 ¬p2 K1 ¬p3 prop 7, 8, 9∧ 11 K1 ¬p2 e1 10∧ 12 K1 ¬p3 e2 10∧
13 K1 14 ¬p2 K1e 11 15 ¬p3 K1e 12 16 ¬p2 ∧ ¬p3 i 14, 15∧ 17 p1 ∨ p2 ∨ p3 Ce 1 18 p1 prop 16, 17 19 K1 p1 K1i 13−18 20 ¬K1 p1 Ce 4 21 ⊥ ¬e 19, 20 22 ¬(¬p2 ∧¬p3) ¬i 7−21 23 p2 ∨ p3 prop 22 24 C(p2 ∨ p3) Ci 6−23
Wise Men PuzzleProof of Entailment 2
1 C(p1 ∨ p2 ∨ p3) premise 2 C(pi → Kj pi) premise, (i = j) 3 C(¬pi → Kj ¬pi) premise, (i = j) 4 C¬K2 p2 premise 5 C¬K2 ¬p2 premise 6 C(p2 ∨ p3) premise 7 K3 8 ¬p3 assumption 9 ¬p3 → K2 ¬p3 CK 3 (i, j) = (3, 2) 10 K2 ¬p3 →e 9, 8
11 K2 12 ¬p3 K2e 10 13 p2 ∨ p3 Ce 6 14 p2 prop 12, 13 15 K2 p2 K2i 11−14 16 Ki ¬K2 p2 CK 4, for each i 17 ¬K2 p2 KT 16 18 ⊥ ¬e 15, 17 19 p3 PBC 8−18 20 K3 p3 K3i 7−19