Modal logic Benzm uller/Rojas, 2014 Artificial Intelligence 2 - - PowerPoint PPT Presentation

modal logic
SMART_READER_LITE
LIVE PREVIEW

Modal logic Benzm uller/Rojas, 2014 Artificial Intelligence 2 - - PowerPoint PPT Presentation

Modal logic Benzm uller/Rojas, 2014 Artificial Intelligence 2 What is Modal Logic? Narrowly, traditionally: modal logic studies reasoning that involves the use of the expressions necessarily and possibly . More widely: modal logic


slide-1
SLIDE 1

Modal logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 2

slide-2
SLIDE 2

What is Modal Logic? Narrowly, traditionally: modal logic studies reasoning that involves the use of the expressions necessarily and possibly. More widely: modal logic covers a family of logics with similar rules and a variety of different symbols. Logic Symbols Expressions Symbolized Modal Logic ✷ It is necessary that ...

  • It is possible that ...

Deontic Logic O It is obligatory that ... P It is permitted that ... F It is forbidden that ... Temporal Logic G It will always be the case that ... F It will be the case that ... H It has always been the case that ... P It was the case that ... Doxastic Logic Bx x believes that ...

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 3

slide-3
SLIDE 3

History

◮ Aristotles (356-323 BCE): developed a modal syllogistic in

book I of his Prior Analytics, which Theophrastus attempted to improve

◮ Avicenna (980-1037): developed earliest formal system of

modal logic

◮ William of Ockham (1287-1347) and John Duns Scotus

(1266-1308): informal modal reasoning (about essence)

◮ C.I. Lewis (1883-1964): founded modern modal logic ◮ Ruth C. Barcan (1921-2012): first axiomatic systems of

quantified modal logic

◮ Saul Kripke: Kripke semantics for modal logics; possible

worldsßemantics

◮ A.N. Prior: created modern temporal logic in 1957 ◮ Vaughan Pratt: introduced dynamic logic in 1976.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 4

slide-4
SLIDE 4

Further Reading

Garson, James, Modal Logic, The Stanford Encyclopedia of Philosophy (Spring 2013 Edition), Edward N. Zalta (ed.),

<http://plato.stanford.edu/archives/spr2013/entries/logic-modal/>.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 5

slide-5
SLIDE 5

Modal Logic: Applications Modal logics have been used in artificial intelligence applications to model

◮ Knowledge (including common knowledge) ◮ Belief (including common knowledge) ◮ Actions, goals, and intentions ◮ Ability and Obligations ◮ Time ◮ . . .

There are many further applications, also in other disciplines, including philosophy, linguistics, mathematics, computer science, . . . arts, poetry (Here are some nice slides for further reading; see also the slides of Andreas Herzig)

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 6

slide-6
SLIDE 6

Modal Logic: Motivation Material implication seems actually quite unintuitive: ϕ ⇒ ψ iff ¬ϕ ∨ ψ Problem with material implication in many applications: see e.g. Dorothy Edgington’s Proof of the Existence of God:

◮ If God does not exist, then it’s not the case that if I pray, my

prayers will be answered. ¬G ⇒ ¬(P ⇒ A)

◮ I do not pray:

¬P

◮ It follows: God exists.

G

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 7

slide-7
SLIDE 7

Modal Logic: Motivation

◮ If God does not exist, then it’s not the case that if I pray, my

prayers will be answered. ¬g ⇒ ¬(p ⇒ a)

◮ I do not pray:

¬p

◮ It follows: God exists.

g In TPTP syntax: fof(ax1,axiom,((~ g) => ~ (p => a))). fof(ax2,axiom,(~ p)). fof(c,conjecture,(g)).

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 8

slide-8
SLIDE 8

Modal Logic: Motivation

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 9

slide-9
SLIDE 9

Modal Logic: Motivation Lewis instead proposed the use of strict implication: ϕ ⇒ ψ iff ¬✸(ϕ ∧ ¬ψ) ϕ implies ψ iff it is not possible that ϕ and ¬ψ are true.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 10

slide-10
SLIDE 10

Modal Logic Modal Logic: Syntax

◮ any basic propositional symbol p ∈ P is a modal logic formula ◮ if ϕ and ψ are modal logic formulas, then so are ¬ϕ, ϕ ∨ ψ,

ϕ ∧ ψ, and ϕ ⇒ ψ

◮ if ϕ is a modal logic formula, then so are ✷ϕ and ✸ϕ

Prominent modal logics are constructed from a weak logic called K (after Saul Kripke). Theorems of Basic Modal Logic K

◮ if ϕ is a theorem of propositional logic, then ϕ is also a

theorem of K

◮ Necessitation Rule: If ϕ is a theorem of K, then so is ✷ϕ ◮ Distribution Axiom: ✷(ϕ ⇒ ψ) ⇒ (✷ϕ ⇒ ✷ψ)

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 11

slide-11
SLIDE 11

Modal Logics beyond K From base logic K we can derive at other modal logics by adding further axioms Name Axioms K ✷(ϕ ⇒ ψ) ⇒ (✷ϕ ⇒ ✷ψ) M(orT) ✷ϕ ⇒ ϕ D ✷ϕ ⇒ ✸ϕ B ϕ ⇒ ✷✸ϕ 4 ✷ϕ ⇒ ✷✷ϕ 5 ✸ϕ ⇒ ✷✸ϕ A variety of logics may be developed using K as a foundation by adding combinations of the above axioms.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 12

slide-12
SLIDE 12

Modal Logics beyond K Many philosophers consider logic S5 (K+M+4+5) an adequate choice for necessity. In S5, **. . . ✷ = ✷ and **. . . ✸ = ✸, where each * is either ✷ or ✸. This amounts to the idea that strings containing both boxes and diamonds are equivalent to the last operator in the sequence. Saying that it is possible that A is necessary is the same as saying that A is necessary. Modal logic can be extended to multi-modal logic, where the ✷ and ✸ operators are annotated with the identifier of the agent who has that knowledge; see wise men puzzle above.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 13

slide-13
SLIDE 13

Modal Logic Cube K KB M B

= MB

S4 S5 = M5 ≡ MB5 ≡ M4B5

≡ M45 ≡ M4B ≡ D4B ≡ D4B5 ≡ DB5

K4 KB5 ≡ K4B5 ≡ K4B D D4 K45 D45 DB K5 D5 K M 4 5 B

modal cube reproduced from J. Garson, Modal Logic, SEP 2009 Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 14

slide-14
SLIDE 14

Can you represent and solve the following problem?

Wise Men Puzzle Once upon a time, a king wanted to find the wisest

  • ut of his three wisest men.

He arranged them in a circle and told them that he would put a white

  • r

a black spot on their foreheads and that one of the three spots would certainly be white. The three wise men could see and hear each other but,

  • f course, they could not

see their faces reflected any-

  • where. The king, then, as-

ked to each of them to find

  • ut the color of his own
  • spot. After a while, the wi-

sest correctly answered that his spot was white. How could he know that?

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 15

slide-15
SLIDE 15

Can you represent and solve the following problem?

Wise Men Puzzle Once upon a time, a king wanted to find the wisest

  • ut of his three wisest men.

He arranged them in a circle and told them that he would put a white

  • r

a black spot on their foreheads and that one of the three spots would certainly be white. The three wise men could see and hear each other but,

  • f course, they could not

see their faces reflected any-

  • where. The king, then, as-

ked to each of them to find

  • ut the color of his own
  • spot. After a while, the wi-

sest correctly answered that his spot was white. How could he know that?

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 15

slide-16
SLIDE 16

Can you represent and solve the following problem?

Wise Men Puzzle Once upon a time, a king wanted to find the wisest

  • ut of his three wisest men.

He arranged them in a circle and told them that he would put a white

  • r

a black spot on their foreheads and that one of the three spots would certainly be white. The three wise men could see and hear each other but,

  • f course, they could not

see their faces reflected any-

  • where. The king, then, as-

ked to each of them to find

  • ut the color of his own
  • spot. After a while, the wi-

sest correctly answered that his spot was white. How could he know that?

✷fool ws a ∨ ws b ∨ ws c ✷fool ϕ ⇒ ✷a ϕ ✷fool ϕ ⇒ ✷b ϕ . . . ¬ ✷a ws a ¬ ✷b ws b Query: ✷c ws c

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 15

slide-17
SLIDE 17

Kripke Style Semantics

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 16

slide-18
SLIDE 18

Kripke Style Semantics A Modal Frame F = ⟨W , R, v⟩ . . . consists of set of possible worlds W , a binary accessibility relation R between worlds, and an evaluation function v for assigning truth values to the basic propositional symbols (v : PropSym × W − → {T, F}). Truth of a modal formula ϕ for a frame F and a world w F, w | = p iff v(p, w) F, w | = ¬ϕ iff F, w ̸| = ϕ F, w | = ϕ ∨ ψ iff F, w | = ϕ or F, w | = ψ F, w | = ϕ ∧ ψ iff F, w | = ϕ and F, w | = ψ F, w | = ϕ ⇒ ψ iff F, w ̸| = ϕ or F, w | = ψ F, w | = ✷ϕ iff F, w′ | = ϕ for all w′ with wRw′ F, w | = ✸ϕ iff there exists w′ with wRw′ s.t. F, w′ | = ϕ

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 17

slide-19
SLIDE 19

Kripke Style Semantics

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 18

slide-20
SLIDE 20

Kripke Style Semantics Truth of a modal formula (in base modal logic K) A modal formula ϕ is true (or valid) iff it is true for all frames F and all worlds w. Exercises:

◮ Show that the Distribution axiom ✷(ϕ ⇒ ψ) ⇒ (✷ϕ ⇒ ✷ψ)

is valid in logic K.

◮ Show that axiom T ✷ϕ ⇒ ϕ is valid iff the accessibility

relation R is reflexive.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 19

slide-21
SLIDE 21

Kripke Style Semantics We have the following correspondences Name Axioms Condition on R K ✷(ϕ ⇒ ψ) ⇒ (✷ϕ ⇒ ✷ψ) none M(orT) ✷ϕ ⇒ ϕ reflexive D ✷ϕ ⇒ ✸ϕ serial B ϕ ⇒ ✷✸ϕ symmetric 4 ✷ϕ ⇒ ✷✷ϕ transitive 5 ✸ϕ ⇒ ✷✸ϕ euclidean

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 20

slide-22
SLIDE 22

Theorem Proving in Propositional Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 21

slide-23
SLIDE 23

Theorem Proving in Propositional Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 22

slide-24
SLIDE 24

Theorem Proving in Propositional Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 23

slide-25
SLIDE 25

Theorem Proving in Propositional Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 24

slide-26
SLIDE 26

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 25

slide-27
SLIDE 27

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 26

slide-28
SLIDE 28

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 27

slide-29
SLIDE 29

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 28

slide-30
SLIDE 30

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 29

slide-31
SLIDE 31

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 30

slide-32
SLIDE 32

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 31

slide-33
SLIDE 33

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 32

slide-34
SLIDE 34

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 33

slide-35
SLIDE 35

Theorem Proving in Propositional Modal Logic

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 34

slide-36
SLIDE 36

Exercise Once upon a time, a king wanted to find the wisest out of his two wisest men. He told them that he would put a white or a black spot on their foreheads and that one of the two spots would certainly be white. The two wise men could see and hear each

  • ther but, of course, they could not see their faces reflected
  • anywhere. The king, then, asked to each of them to find out the

color of his own spot. After a while, the wisest correctly answered that his spot was white. Exercise: Encode this situation in propositional modal logic.

Benzm¨ uller/Rojas, 2014 —– Artificial Intelligence 35