prof. jürgen dix nils bulling michael köster - informatik an …€¦ ·  · 2009-01-20prof....

401
Modal Logics Prof. Jürgen Dix Nils Bulling Michael Köster Computational Intelligence Group Clausthal University of Technology Germany Clausthal, WS 2008/09 Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 1

Upload: tranthuan

Post on 18-May-2018

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

Modal LogicsProf. Jürgen Dix

Nils BullingMichael Köster

Computational Intelligence GroupClausthal University of Technology

GermanyClausthal, WS 2008/09

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 1

Page 2: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

Outline

1 Introduction

2 Languages and Semantics

3 Basic Modal Logics

4 Applications

5 Advanced Topics

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 2

Page 3: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

AcknowledgementParts of this course (in particular parts of Chapters 2 and 5)were inspired by the course given by Carlos Areces andPatrick Blackburn at ESSLLI 2008.

We would like to thank Hans van Ditmarsch, who providedus with his slides from a lecture at ESSLLI 2008.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 3

Page 4: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

What is this lecture about? (1)We give an overview on modal logics, which can be used inmany areas of computer science. Emphasis is ontheoretical-logical aspects, not on applications.After a recap of propositional and predicate logic inChapter 1, we introduce modal languages and the maintechnical notion, Kripke frames in Chapter 2. Theimportant idea is to relate properties of the accessibilityrelation in frames to axioms in the modal language. Wealso discuss the relationship between modal logic andpredicate logic (basic hybrid logic and the standardtranslation). In Chapter 3, we introduce the basic modallogics (normal modal logics) as axiomatic calculi, we statesound- and completeness results (using canonicalmodels), and discuss the finite model property for modalsystems.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 4

Page 5: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

What is this lecture about? (2)In Chapter 4, we apply our theories to epistemic logics (toreason about knowledge), and introduce publicannouncement logic (where common knowledge can bedescribed). We also investigate MSPASS, a modal logictheorem prover.We consider in more advanced topics. While we have seenbefore that many properties can be expressed as modalformulae, we show in Chapter 5 that even more cannot beexpressed. To this end, we consider w1 ! w2, the notionof modally equivalent worlds, and its relation tobisimulation, which leads to the Hennessy-Milnertheorem and van Benthem’s characterization of standardtranslation of basic modal formulae. Finally, we touch onsatisfiability and decidability issues.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 5

Page 6: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

Blackburn, P., de Rijke, M. and Venema, Y. (2001).Modal LogicCambridge Tracts in Theoretical Computer Science 53Cambridge University Press.

Boolos, G. (1979)The Unprovability of Consistency.Cambridge University Press.

van Ditmarsch, H., van der Hoek, W. and Kooi, B. (2008)Dynamic Epistemic Logic.Springer.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 6

Page 7: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction

1. Introduction1 Introduction

OverviewPropositional LogicInferencesPredicate Logic

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 7

Page 8: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction

Content of this ChapterWe present a modern view to modal logic. After a shortoverview about important historical events, we define whata logic is. Then, we introduce the semantical perspectiveon logic and show that there is more than one logic. Afterdemonstrating the use of relational structures we specifyour first logic, propositional logic, and describe a calculusto do inferences. We end with an introduction to predicatelogic (also called first-order logic).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 8

Page 9: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

1.1 Overview

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 9

Page 10: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

The Journey to Modal logicThe first to invent a modal logic was Aristotle.

Figure: Aristotle(384 BC - 322 BC)

He developed the syllogisms andthe idea of necessity andpossibility:

Example 1.1p is possible if ¬p is not necessary.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 10

Page 11: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Birth of Modal LogicsIn 1918 Clarence Irving Lewis published his Survey ofSymbolic Logic.

Figure: C.I. Lewis (1883 - 1964)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 11

Page 12: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Improvements by Kurt GödelHowever, Kurt Gödel first proposed the standard system forclassical propositional logic with the rule of generalization.He also proved the completeness of logic, solving a famousproblem of Hilbert.

Figure: Kurt Gödel (1906 - 1978)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 12

Page 13: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

What is a Logic?We present a framework for thinking about logics as:

languages for describing a problem,ways of talking about relational structures andmodels.

These are the two key components in the way we willapproach logic:

1 Logic:fairly simple, precisely defined, formal languages

2 Model: or relational structuresimple “world” that the logic talks about

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 13

Page 14: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Semantical PerspectiveOur perspective on logic is fundamentally semantical, i.e.the meaning of an expression.

Figure: Alfred Tarski (1902-1983)

This perspective is oftencalled model-theoreticperspective or Tarskianperspective.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 14

Page 15: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Modal Logic FundamentalsSaul Aaron Kripke’s works A Completeness Theorem inModal Logic and Semantical Considerations on ModalLogic was a breakthrough in the 60ies.

“Londres est jolie.”

Figure: Saul Aaron Kripke (1940 - )

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 15

Page 16: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Logic or Logics

The semantical perspective leads us to the followingquestion:How many logics are there?

1 The Monotheistic ApproachChoose one of all possible logical languages as the onlyone.

2 The Polytheistic ApproachInvestigate different logical languages.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 16

Page 17: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Monotheism in the 20th CenturyLogical monotheism was a powerful force for much of thetwentieth century.

Figure: Willard van OrmanQuine (1908-2000)

First-order classical logic isthe one and only logic weneed.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 17

Page 18: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Polytheism in the 21st Century

Polytheism gradually became the dominant thread astime went by.Logic found its way into:

computer science,artificial intelligence,economics andcognitive science as well asnatural language semantics.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 18

Page 19: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Polytheism and Semantics

The semantical perspective gives us an natural way to lookat polytheism:

Once we have fixed the model or relational structures(our “world”) it becomes natural to play with differentways of talking about it.Indeed one can talk about relational structures withoutbothering too much about the logic at all.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 19

Page 20: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

What are Relational Structures?Example 1.2 (UML Class Diagram)

Diagram

StructureDiagram

BehaviourDiagram

Class DiagramComponent

DiagramObject

DiagramActivityDiagram

Use CaseDiagram

State MachineDiagram

CompositeStructureDiagram

DeploymentDiagram

PackageDiagram

InteractionDiagram

SequenceDiagram

InteractionOverviewDiagram

CommunicationDiagram

TimingDiagram

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 20

Page 21: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Example 1.3 (South Park Relational Structure)

Kenny Cartman

Kyle Stan Wendy

loves

detestsfriends

friendsfriends

annoys

annoys annoys annoys

loves

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 21

Page 22: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Example 1.4 (Finite State Automaton for anbm)Given the formal language anbm with n,m > 0. Therelational structure is then:

r s ta

a

b

b

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 22

Page 23: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Three Big Topics

In this course we use the model-theoretic perspective toprovide a window on the following issues:Inference: The methods for deriving new information by

working with the logic.Expressivity: What can be described using this logic?Computation: Which price do we have to pay for this

expressivity?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 23

Page 24: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.1 Overview

Muddy ChildrenExample 1.5 (Muddy Children)

A group of playing children is called back by their father. Theygather around him.

Some of them have become dirty:

1 they may have mud on their forehead,2 children can only see whether others are muddy,3 and not if there is any mud on their own forehead.

All this is commonly known, and the children are perfectlogicians.

Father: “At least one of you has mud on his or her forehead.”

Father: “Will those who know whether they are muddy please stepforward.”

If nobody steps forward, father keeps repeating the request.Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 24

Page 25: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

1.2 Propositional Logic

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 25

Page 26: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

SyntaxThe propositional language is built upon

Propositional symbols: p, q, r, . . . , p1, p2, p3, . . .

Logical connectives: ¬ and ∨Grouping symbols: (, )

Often we consider only a finite, nonempty set ofpropositional symbols and refer to it as Prop.

Logical connectives are used to construct formulae from thepropositional symbols.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 26

Page 27: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Definition 1.6 (Propositional Language LPL)The propositional language LPL(Prop) (over the set ofpropositions Prop) is given by the following formulae

ϕ ::= p | ¬ϕ | ϕ ∨ ϕ

where p ∈ Prop.

Example 1.7Blackboard.

In the following we assume that Prop is fixed and omit it.

What about the other connectives? They are defined asmacros.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 27

Page 28: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Definition 1.8 (Macros)We define the following syntactic constructs as macros(p ∈ Prop):

⊥ := p ∧ ¬p

> := ¬⊥ϕ ∧ ψ := ¬(¬ϕ ∨ ¬ψ)

ϕ→ ψ := ¬ϕ ∨ ψϕ↔ ψ := (ϕ→ ψ) ∧ (ψ → ϕ)

Example 1.9Blackboard.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 28

Page 29: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

SemanticsHow to determine whether a propositional logic formulais true?Intuitively, we have: (t stands for true, f for false)

> is t⊥ is f

¬ϕ is t iff ϕ is fϕ ∨ ψ is t iff ϕ or ψ (or both) are tϕ ∧ ψ is t iff ϕ and ψ are tϕ→ ψ is t iff either ϕ is f or ψ is tϕ↔ ψ is t iff ϕ and ψ are both t , or both f

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 29

Page 30: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Firstly, we fix the truth value of propositional symbols.

Definition 1.10 (Valuation)A valuation (or truth assignment) v : Prop → {t, f} for alanguage LPL(Prop) is a mapping from the set ofpropositional constants defined by Prop into the set {t, f}.

A valuation fixes the value of individual propositionalvariables.

But we are particularly interested in the truth of formulaelike (p ∨ q) ∧ r.

So, it remains to define the semantics of the Booleanconnectives.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 30

Page 31: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Again, we do only give the semantics for the basicconnectives. The semantics for the macros is derived fromthese basic cases.

Definition 1.11 (Semantics v |= ϕ)Let v be a valuation. Inductively, we define the notion of aformula ϕ being true or satisfied by v (notation: v |= ϕ):

v |= p iff v(p) = t and p ∈ Prop,v |= ¬ϕ iff not v |= ϕ,v |= ϕ ∨ ψ iff v |= ϕ or v |= ψ

Given a set Σ ⊆ LPL we write v |= Σ iff v |= ϕ for all ϕ ∈ Σ.We use v 6|= ϕ instead of not v |= ϕ.

Exercise: Write down the appropriate clauses for the otherconnectives previously defined as macros.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 31

Page 32: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Truth Tables

Truth tables are a conceptually simple way of working withPL (invented by Wittgenstein in 1918).

p q ¬p p ∨ q p ∧ q p→ q p↔ qt t f t t t tf t t t f t ft f f t f f ff f t f f t t

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 32

Page 33: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Fundamental Semantical Concepts

If it is possible to find some valuation v that makes ϕtrue, then we say ϕ is satisfiable.If ϕ is true for all valuations v then we say that ϕ is validand write |= ϕ. ϕ is also called tautology.A theory is a set of formulae: T ⊆ LPL.A theory T is called consistent if there is a valuation vwith v |= T ; or, analogously, if for all valuations v wehave that v 6|= T .

How do these definitions relate to truth tables?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 33

Page 34: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Example 1.12 (Satisfiability)Is p ∧ ¬b satisfiable?

Example 1.13 (Validity (Tautology))a ∨ ¬a

Definition 1.14 (Propositional Tautologies)

The set of all tautologies of propositional logic is denotedby TautPL.

The latter will be important in Section 2.4 where we showhow new formulae can be derived from old ones in themodal calculus.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 34

Page 35: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

ModelRemember: The valuation fixes the truth values of theindividual propositional variables. By doing this thevaluation describes our “world”: The state we want tomodel.Taking the truth table into account we can say, eachrow is a possible state or a possible world. Speaking inmodel-theoretic terms, each row is a possible model.

Therefore we can interpret a valuation v as a modelM anduse them synonymously.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 35

Page 36: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Models Are Complete!An extremely important property of a model (valuation) isthat it makes each formula either true or false.

Lemma 1.15 (Models Are Complete)

For any model (valuation) v and any formula φ over any Prop,the following holds

Either v |= φ or v |= ¬φ

Proof.Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 36

Page 37: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Semantical Consequence (1)Given a theory T we are interested in the followingquestion: Which facts can be derived from T? We candistinguish two approaches:

1 semantical consequences, and2 syntactical inference.

In this section we are mainly concerned with the first notion.

Definition 1.16Let T be a theory and ϕ be a formula. We say that ϕ is asemantical consequence of T if for all valuations v:

v |= T implies v |= ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 37

Page 38: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Semantical Consequence (2)

The analogue of Lemma 1.15 on Slide 36 is not true fortheories T . In fact, for most theories we have

neither T |= φ

nor T |= ¬φ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 38

Page 39: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Syntactical ConsequenceIf new facts can be derived from old ones in an algorithmicfashion, we say that such a fact is syntactically derivable.

What do we need to provide? How to derive new facts?

We need inference rules which allow to derive new factsfrom old ones.

Consider the follwing example:

Example 1.17We know that Bill is drunk and that if Bill is drunk he shouldnot drive.

Can we derive that Bill should not drive?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 39

Page 40: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

In the latter example we used the modus ponens rule:

(MP )ϕ ϕ→ψ

ψ

where ϕ, ψ are arbitrarily complex formulae.

On top of the line are the preconditions; below the line theconclusion. If the preconditions are fulfilled the conclusioncan be derived.

ϕ and ψ are not formulae of the language, but schemata.They can be replaced by any well-formed formula of theunderlying language. In Definition 3.10 we will be moreprecise about that.

Example 1.18Blackboard.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 40

Page 41: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Expressiveness

What can we express with this language?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 41

Page 42: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

The Tweety and Friends ProblemExample 1.19You want to throw a party for Tweety, his friend Gentoo andTux. Unfortunately, they have different circles of friends anddislike different penguins. Therefore, Tweety tells you thathe would like to invite either his friend the King or toexclude Gentoo’s Adelie. But Gentoo proposes to inviteAdelie or Humboldt or both. Tux, however, does not likeHumboldt and The King too much, so he suggests toexclude at least one of them.

Can we model this using propositional logic?What do we gain by doing that?What kind of questions can we “ask” our model?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 42

Page 43: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Propositional Symbols

K := invite The KingA := invite AdelieH := invite Humboldt

¬K := exclude The King¬A := exclude Adelie¬H := exclude Humboldt

Problem FormalizedTweety: K ∨ ¬A := invite The King or exclude Adelie, but

not both: ¬(K ∧ ¬A),Gentoo: A ∨H := invite Adelie or Humboldt or both,Tux: ¬H ∨ ¬K := exclude Humboldt or The King or both.

Resulting Formula

ϕ = (K ∨ ¬A) ∧ ¬(K ∧ ¬A) ∧ (A ∨H) ∧ (¬H ∨ ¬K)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 43

Page 44: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

K A H K ∨ ¬A ¬(K ∧ ¬A) A ∨H ¬H ∨ ¬K ϕ

t t t t t t f ft t f t t t t tt f t f t t f ft f f t f f t ff t t f t t t ff t f f t t t ff f t t t t t tf f f t t f t f

ProblemTruth tables have 2n rows in the number n of propositionalsymbols.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 44

Page 45: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Graph Coloring ProblemProblemGiven a fixed number k of colors and a graph G = (N,E),where N is the set of nodes and E the set of edges.

QuestionCan we color each node so that

we only use the k colors, andno two adjacent vertices have the same color?

Can we express this problem as a set of formulae?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 45

Page 46: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Figure: Petersen Graph

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 46

Page 47: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Propositional Symbols: PropG,kGiven a graph G = (N,E) and a k ∈ N, we consider |N | × kpropositional symbols that we write pij.Meaning: Node i has color j

Problem Formalized: TG1 Each node has one color: pi1 ∨ . . . ∨ pik for 1 ≤ i ≤ |N |2 Each node has no more than one color: ¬pil ∨ ¬pim for

1 ≤ i ≤ |N | and 1 ≤ l � m ≤ k

3 Adjacent nodes have different colors: ¬pil ∨ ¬pjl for iand j adjacent and 1 ≤ l ≤ k

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 47

Page 48: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.2 Propositional Logic

Relating Graphs and Sets of Formulae

Lemma 1.20 (Formalizing Graphs)For each graph G = (N,E) and k ∈ N, we consider thelanguage PropG,k and the set of formulae TG,k. Then thek-colorings of G = (N,E) are in one-to-one correspondencewith the models of TG,k over the set of propositionsPropG,k.In particular: there is no k-coloring of G = (N,E) if and only ifthe set TG,k is not satisfiable.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 48

Page 49: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

1.3 Inferences

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 49

Page 50: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Inference tasks: The Three QuestionsGiven a certain logical description ϕ. The semanticalperspective allows us to think about the followinginference tasks:

Inference TasksModel Checking: Given ϕ and a modelM, does the

formula correctly describe this model?

Satisfiability Checking: Given ϕ, does there exist amodel in which the formula is true?

Validity Checking: Given ϕ, is it true in all models?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 50

Page 51: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Model Checking

This is the simplest of the three tasks.Nevertheless it is useful, e.g. for hardware verification.

Example 1.21Think of a modelM as a mathematical picture of a chip. Alogical description ϕ might define some security issues. IfM fulfills ϕ, then this means that the chip will be securewrt. these issues.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 51

Page 52: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Model checking for PLGiven a valuation v and a description ϕ. Is v |= ϕ true?

Example 1.22Given a model v in which a is t and b is f.Is ϕ := (a ∨ ¬b)→ b true?

(> ∨ ¬⊥)→ ⊥(> ∨>)→ ⊥> → ⊥⊥

ComplexityExercise.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 52

Page 53: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Satisfiability CheckingOne can interpret the description as a constraint.Is there anything that matches this description?We have to create model after model until we find onethat satisfies ϕ.In the worst case we have to generate all models.

Example 1.23Given a sudoku. Is there a solution and how does it looklike?One has to describe (maybe not actually build) all models,i.e. all possible configurations, until one is found that fulfillsall constraints.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 53

Page 54: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Satisfiability Checking for PLGiven a description ϕ. Is there a valuation v s.t. v |= ϕ istrue?

ComplexityHow complex is that?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 54

Page 55: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Validity Checking

The intuitive idea is that we write down a set of all ourfundamental and indisputable axioms.Then, with this theory, we derive new formulae.

Example 1.24Mathematics: We are usually given a set of axioms.E.g. Euclid’s axioms for geometry. We want to provewhether a certain statement follows from this set, or canbe derived from them.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 55

Page 56: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Validity Checking for PLGiven a description ϕ. Does v |= ϕ hold for all valuations v?

ComplexityHow complex is that?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 56

Page 57: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Satisfiability Checking With theTableaux Method

A tableau is a tree-like structure to visualize attemptsto create a model.For building a tableau there exist some rules tosystematically split the input formula into subformulae.Each branch of this tree represents a way of trying tobuild a model:

closed branches don’t lead to models,open branches do.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 57

Page 58: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

RulesFor splitting the input formula into subformulae we needthe following rules:

∧ ϕ∧ψϕψ

∨ ϕ∨ψϕ|ψ

¬1 ϕ¬¬ϕ

¬2 ¬¬ϕϕ

Rules for→,↔Exercise.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 58

Page 59: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Example 1.25 (Satisfiability Checking)Given the input formula (a ∧ c) ∧ (¬a ∨ b). Is there avaluation v s.t. this formula holds?

∧ ϕ∧ψϕψ

∨ ϕ∨ψϕ|ψ

¬1 ϕ¬¬ϕ

¬2 ¬¬ϕϕ

(a ∧ c) ∧ (¬a ∨ b)

a ∧ c

¬a ∨ b

¬a b

a

c

a

c

Contradiction!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 59

Page 60: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Validity Checking

Theorem 1.26 (Satisfiability, Validity are Dual)A formula ϕ is valid iff ¬ϕ is not satisfiable.

We can use the tableaux method for checking validity.

ProofBlackboard.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 60

Page 61: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Example 1.27Given formula (a ∧ b)→ a. Is this formula valid?

formula: (a ∧ b)→ a ≡ ¬(a ∧ b) ∨ a

negated: ¬(¬(a ∧ b) ∨ a) ≡ ¬¬(a ∧ b) ∧ ¬a

¬2 and ∧: a ∧ b and ¬a

∧: a and b

Contradiction! ⇒ ¬(a ∧ b) ∨ a is valid!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 61

Page 62: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

SPASS

an Automated TheoremProver for First-OrderLogic with Equality,from MPI, Saarbrücken

www.spass-prover.org

“If you are interested in sex, drugs, rock’n roll or fish [...],you may be disappointed by the performance of SPASS. Ifyou are interested in first-order logic theorem proving, theformal analysis of software, [...] modal logic theoremproving, SPASS may offer you the right functionality.”

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 62

Page 63: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Example 1.28 (TweetyGentooTux (1))begin_problem(TweetyGentooTux).

list_of_descriptions.

name({* TweetyGentooTux *}).

author({* Michael Koester *}).

status(unsatisfiable).

description({* - Tweety and Friends - *}).

end_of_list.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 63

Page 64: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Example 1.29 (TweetyGentooTux (2))list_of_symbols.

predicates[(Adelie,0), (Humboldt,0), (King,0)].

end_of_list.

list_of_formulae(axioms).

formula(or(King,not(Adelie))).

formula(or(Adelie,Humboldt)).

formula(or(not(Humboldt),not(King))).

end_of_list.

list_of_formulae(conjectures).

formula(and(Adelie,King)).

end_of_list.

end_problem.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 64

Page 65: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.3 Inferences

Example 1.30 (TweetyGentooTux (3))--------------------------SPASS-START-------

SPASS beiseite: Completion found.

The saturated set of worked-off clauses is :

7[0:MRR:3.1,6.0] || King*+ -> .

5[0:MRR:4.0,2.1] || Adelie*+ -> .

6[0:MRR:1.1,5.0] || -> Humboldt*.

--------------------------SPASS-STOP--------

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 65

Page 66: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

1.4 Predicate Logic

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 66

Page 67: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

MotivationFor the formal description of a problem we often need ahigher expressiveness than what the propositionallanguage offers.

Example 1.31 (Continuity)For the definition of the continuity we need:

Variables,functions,relations, andquantifiers.

ϕ := ∀ε > 0 ∃δ > 0 (∀x (| x− x0 |< δ)→| f(x)− f(x0) |< ε)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 67

Page 68: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Predicate logicIn addition to the propositional language (on which themodal language is built as well), the first-order language(FOL) contains variables, function-, and predicatesymbols.

Definition 1.32 (Variable)A variable is a symbol of the set Var . Typically, we denotevariables by x0, x1, . . ..

Example 1.33

ϕ := ∃x0∀x1(P 20 (f 1

0 (x0), x1) ∧ P 12 (f 0

1 ))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 68

Page 69: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

FunctionsDefinition 1.34 (Function Symbols)Let k ∈ N0. The set of k-ary function symbols is denoted byFunck. Elements of Funck are given by fk1 , f

k2 . . . . Such a

symbol takes k arguments. The set of all function symbols isdefined as

Func :=⋃k

Funck

An 0-ary function symbol is called constant.

ϕ := ∃x0∀x1(P 20 (f 1

0 (x0), x1) ∧ P 12 (f 0

1 ))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 69

Page 70: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

PredicatesDefinition 1.35 (Predicate Symbols)Let k ∈ N0. The set of k-ary predicate symbols (or relationsymbols) is given by Predk. Elements of Predk are denotedby P k

1 , Pk2 . . . . Such a symbol takes k arguments. The set of

predicate symbols is defined as

Pred :=⋃k

Predk

An 0-ary predicate symbol is called (atomic) proposition.

ϕ := ∃x0∀x1(P 20 (f 1

0 (x0), x1) ∧ P 12 (f 0

1 ))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 70

Page 71: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

SyntaxThe first-order language with equality LFOL is built fromterms and formulae.

In the following we fix a set of variables, function-, andpredicate symbols.

Definition 1.36 (Term)A term over Func and Var is inductively defined as follows:

1 Each variable from Var is a term.2 If t1, . . . tk are terms then fk(t1, . . . , tk) is a term as well,

where fk is an k-ary function symbol from Funck.

ϕ := ∃x0∀x1(P 20 (f 1

0 (x0), x1) ∧ P 12 (f 0

1 ))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 71

Page 72: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Definition 1.37 (Language)The first-order language with equalityLFOL(Var ,Func,Pred) is given by the following formulas:

ϕ ::= P k(t1, . . . , tk) | ¬ϕ | ϕ ∨ ϕ | ∃x(ϕ) | t = r

where P k ∈ Predk is a k-ary predicate symbol and t1, . . . , tkand t, r are terms over Var and Func.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 72

Page 73: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Definition 1.38 (Macros)We define the following syntactic constructs as macros(P ∈ Pred0):

⊥ := P ∧ ¬P> := ¬⊥

ϕ ∧ ψ := ¬(¬ϕ ∨ ψ)

ϕ→ ψ := ¬ϕ ∨ ψϕ↔ ψ := (ϕ→ ψ) ∧ (ψ → ϕ)

∀x(ϕ) := ¬∃x(¬ϕ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 73

Page 74: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Notations

We will often leave out the index k in fki and P ki

indicating the arity and just write fi and Pi.Variables are also denoted by u, v, w, . . .Function symbols are also denoted by f, g, h, . . .Constants are also denoted by a, b, c, . . . , c0, c1, . . .

Predicate symbols are also denoted by P,Q,R, . . .We will use our standard notation p for 0-ary predicatesymbols and also call them (atomic) propositions.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 74

Page 75: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.39Let d be a constant, g ∈ Func2, and f ∈ Func3, andP ∈ Pred2.Which of the following strings are terms?

1 g(d, d)

2 P (d)

3 f(x, g(y, z), d)

4 g(x, f(y, z), d)

5 f(x, g(y, z), d)

6 g(f(g(d, x), g(f(x, a, z), y), f(x, y, g(x, y))), a)

7 d ∧ f(x)

8 ¬f(x, y)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 75

Page 76: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Binding StrengthWe assume an order between the binding strength ofBoolean connectives. The order is as follows:

1 ¬,∀x,∀y bind most tightly;2 then ∧ and ∨;3 then→.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 76

Page 77: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.40 (From Semigroups to Rings)We consider LFOL({x, y, z}, {0, 1,+, ·}, {≤}}, where 0, 1 areconstants, +, · are binary function symbols and ≤ a binaryrelation. What can one express in this language?

Ax 1: ∀x∀y∀z x+ (y + z) = (x+ y) + zAx 2: ∀x (x+ 0 = 0 + x) ∧ (0 + x = x)Ax 3: ∀x∃y (x+ y = 0) ∧ (y + x = 0)Ax 4: ∀x∀y x+ y = y + xAx 5: ∀x∀y∀z x · (y · z) = (x · y) · zAx 6: ∀x∀y∀z x · (y + z) = x · y + x · zAx 7: ∀x∀y∀z (y + z) · x = y · x+ z · x

Axiom 1 describes a semigroup, the axioms 1-2 describe amonoid, the axioms 1-3 a group, and the axioms 1-7 a ring.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 77

Page 78: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.41Formalize the following sentence:

Every student x is younger than some teacher y.

S(x): x is a studentT (x): x is a teacherY (x, y): x is younger than y

∀x(S(x)→ (∃y(T (y) ∧ Y (x, y))))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 78

Page 79: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.42Formalize the following sentence:

Not all birds can fly.

B(x): x is a birdF (x): x can fly

¬(∀x(B(x)→ F (x)))

Can we do it without negation?

∃x(B(x) ∧ ¬F (x))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 79

Page 80: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.43Formalize the following sentence:

Andy and Paul have the same maternal grandmother.

a: Andyp: PaulM(x, y): x is y’s mother

∀x∀y∀u∀v(M(x, y) ∧M(y, a) ∧M(u, v) ∧M(v, p)→ x = u)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 80

Page 81: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

SemanticsDefinition 1.44 (Model, Structure)A model or structure for FOL over Var ,Func and Pred isgiven byM = (U, I) where

1 U is a non-empty set of elements, called universe ordomain and

2 I is called interpretation. It assigns to each functionsymbol fk ∈ Funck a function I(fk) : Uk → U , to eachpredicate symbol P k ∈ Predk a relation I(P k) ⊆ Uk; andto each variable x ∈ Var an element I(x) ∈ U .

We write:1 M(P k) for I(P k),2 M(fk) for I(fk), and3 M(x) for I(x).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 81

Page 82: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Note that a structure comes with an interpretation I, whichis based on functions and predicate symbols andassignments of the variables. But these are also defined inthe notion of a language. Thus we assume from now onthat the structures are compatible with the underlyinglanguage: The arities of the functions and predicates mustcorrespond to the associated symbols.

Example 1.45ϕ := Q(x) ∨ ∀z(P (x, g(z))) ∨ ∃x(∀y(P (f(x), y) ∧Q(a)))

U = RI(a) : {∅} → R, ∅ 7→ π constant functions,I(f) : I(f) = sin : R→ R and I(g) = cos : R→ R,I(P ) = {(r, s) ∈ R2 : r ≤ s} and I(Q) = [3,∞) ⊆ R,I(x) = π

2, I(y) = 1 and I(z) = 3.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 82

Page 83: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Definition 1.46 (Value of a Term)Let t be a term andM = (U, I) be a model. We defineinductively the value of t wrtM, written asM(t), asfollows:

M(x) := I(x) for a variable t = x,M(t) := I(fk)(M(t1), . . . ,M(tk)) if t = fk(t1, . . . , tk).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 83

Page 84: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Definition 1.47 (Semantics)LetM = (U, I) be a model and ϕ ∈ LFOL. ϕ is said to betrue inM, written asM |= ϕ, if the following holds:M |= P k(t1, . . . tk) iff (M(t1), . . . ,M(tk)) ∈M(P k)

M |= ¬ϕ iff notM |= ϕ

M |= ϕ ∨ ψ iffM |= ϕ orM |= ψ

M |= ∃x(ϕ) iffM[x/a]|= ϕ for some a ∈ U whereM[x/a]

denotes the model equal toM butM[x/a](x) = a.M |= t = r iffM(t) =M(r)

Given a set Σ ⊆ LFOL we writeM |= Σ iffM |= ϕ for allϕ ∈ Σ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 84

Page 85: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.48ϕ := Q(x) ∨ ∀z(P (x, g(z))) ∨ ∃x(∀y(P (f(x), y) ∧Q(a)))

U = RI(a) : {∅} → R, ∅ 7→ π constant functions,I(f) : I(f) = sin : R→ R and I(g) = cos : R→ R,I(P ) = {(r, s) ∈ R2 : r ≤ s} and I(Q) = [3,∞) ⊆ R,I(x) = π

2, I(y) = 1 and I(z) = 3.

Is ϕ true inM = (U, I)?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 85

Page 86: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

M 6|= Q(x) becauseM(Q) = [3,∞) andM(x) = π

26∈ [3,∞),

M 6|= ∀z(P (x, g(z))) because (M(x),M(g)(M(z))) =(π

2, cos(u)) 6∈ M(P ) = {(r, s) ∈ R2 : r ≤ s} and

cos(u) < π2

for all u.M |= Q(a) becauseM(a) = π ∈M(Q) = [3,∞) issatisfied.M |= ∃x(∀y(P (f(x), y))) because not for all u′ ∈ R existsa u ∈ R such that(M(f)(M(x)),M(y)) = (sin(u), u′) ∈M(P ) = {(r, s) ∈R2 | r ≤ s} is fulfilled (e.g. u′ = −2).

⇒M 6|= ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 86

Page 87: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

FOL without function symbols

In the next chapter we extend ML such that it will be asexpressive as FOL.

In order to give a clear presentation of the translation it isbeneficial to first syntactically restrict FOL as much aspossible without losing expressiveness.

We will show that it is enough to consider a FOL languagewithout function symbols but constants.

How do we simulate function symbols?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 87

Page 88: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Let T ⊆ LFOL(Var ,Pred ,Func) be a first-order theory (set offormulae).

We encode function symbols as predicate symbols. Thisseems to be straightforward as functions can be seen as aspecial case of relations.

Example 1.49 (Function + as Relation ⊕)We consider the binary function + : N2 → N, 〈n, n′〉 7→ n+n′.We can easily write this as a ternary relation ⊕ ⊆ N3:

⊕(n,m, l) iff n+m = l.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 88

Page 89: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Let fk ∈ Funck be a function symbol of arity k > 0 occuringin some predicate symbol P l ∈ Pred l:

P l(t1, . . . , ti−1, fk(t′1, . . . , t

′k), ti+1, . . . , tl)

where 1 ≤ i ≤ l. Now, we replace P l(. . . ) by the followingconjunction:

∀y(P l(t1, . . . , ti−1, y, ti+1, . . . , tl) ∧ F (t′1, . . . , t′k, y))

where y 6∈ Var is a new variable and F 6∈ Pred is a newpredicate symbol.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 89

Page 90: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Assume that there are n occurrences of fk in T . If we applythe previous procedure to each of these n function symbolsin which language can T be formulated?

This procedure allows to express the theory T over

LFOL(Var∪{y1, . . . , yn},Pred∪{F},Func\{fk})

What did we achieve?1 Removal of fk

2 Tradeoff: n new variables and one new predicatesymbol

We did not yet address the soundness of the translation!

By now, there is no formal relation between F and fk!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 90

Page 91: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Firstly, we need to specify that F represents a function. So,we have to add the following “function axiom”:

∀x1 . . . ∀xk∃!yF (x1, . . . , xk, y)

Note that such an axiom is added to a given theory for eachnewly introduced predicate symbol F .

Remark 1.50∃!xQ denotes that there is exactly one x; i.e.

∃!xϕ := ∃x∀y(Q(x) ∧ (Q(y)→ x = y))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 91

Page 92: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Following this procedure recursively allows to translate thetheory T over LFOL(Var ,Pred ,Func) to a new theory T ′ overLFOL(Var ′,Pred ′,Func0) where

1 Var ′:= Var∪Var 1 ∪ · · · ∪ Vark where

Var i :=⋃

f ij∈Funci∩T

{yij,1, . . . , yij,nfij

}

and nf ij denotes the number of occurences of f ij in T .

2 Pred ′:= Pred∪{F j+1i | f ji ∈ Funcj ∩ T} for 1 ≤ j ≤ k.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 92

Page 93: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

We formally define the translations given of the previousslides.

Definition 1.51 (Translations trvars, trpreds)Let T be a theory over LFOL(Var ,Pred ,Func). We define thefollowing functions:

trvars(T,Var) = Var∪Var 1 ∪ · · · ∪ Vark where

Var i :=⋃

f ij∈Funci∩T

{yij,1, . . . , yij,nfij

}

and nf ij denotes the number of occurences of f ij in T .

trpreds(T,Pred) = Pred∪{F j+1i | f ji ∈ Funcj ∩ T} for

1 ≤ j ≤ k.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 93

Page 94: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Definition 1.52 (Translation function trtheory)Let T be a theory over LFOL(Var ,Pred ,Func). Then,trtheory(T ) denotes the theory over

LFOL(trvars(T,Var), trpreds(T,Pred),Func0)

which is constructed by recursively replacing functionsymbols by the procedure described above.

Definition 1.53 (Ax(T ))Let T be a theory over LFOL(Var ,Pred ,Func). By Ax(T ) wedenote the set of all “function axiom” (as desribed above),one for each for each (new) predicate symbol inPred ∩ trpreds(T,Pred).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 94

Page 95: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.54Consider the theory T = {P (f(r(x))} overLFOL({x}, {P}, {f, r}).Firstly, we remove function symbol f yielding the theory T ′

consisting of the following formulae:1 ∀y1(P (y1) ∧ F (r(x), y1)

2 ∀x1∃!y1(F (x, y1))

Secondly, we remove the function symbol r yielding theoryT ′′:

1 ∀y1(P (y1) ∧ ∀y2(F (y2, y1) ∧R(x, y2)))

2 ∀x1∃!y1(F (x, y1))

3 ∀x1∃!y2(R(x, y2))

Now, we have that T ′′ ⊆ LFOL({x, y1, y2}, {P, F,R}, ∅).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 95

Page 96: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Before we prove the main result of this section we state alemma which is essential for its proof.

Definition 1.55 (Model Update trmodel)Let T be a theory, andM a model over Var , Pred , Func.According to the previous construction we modifyM to amodelM′ = trmodel(M) over trvars(T,Var), trpreds(T,Pred),and Func0 such thatM′ interprets each new predicatesymbol F arisen from a function symbol f ∈ Funck asfollows:

M′(F ) = {(u1, . . . , uk+1) | uk+1 = I(f)(u1, . . . , uk)}

The interpretation of the new variables can be any element:It does not matter as each occurence is bound.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 96

Page 97: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Lemma 1.56 (Functions Can Be Eliminated)Let T ⊆ LFOL(Var ,Pred ,Func) be a theory andM be acompatible model. Then, trtheory(T ) is a theory over

LFOL(trvars(T,Var), trpreds(T,Pred),Func0)

and it holds that

M |= T iff trmodel(M) |= trtheory(T ) ∪ Ax(T )

Note, that the new theory does not contain any functionsymbols but constants.

This theorem shows that function symbols are notnecessary. Everything can equivalently be encoded bypredicate symbols.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 97

Page 98: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Example 1.57Again, consider the theory T = {P (f(r(x))} overLFOL({x}, {P}, {f, r}) and modelM = (N, I) whereM(f) : N→ N,M(f)(x) = x+ 1

M(r) : N→ N,M(r)(x) = 2x

M(P ) = {2x+ 1 | x ∈ N}M(x) = 2

Then, the new modelM′ := trmodel(M) is given as follows:M′(F ) = {(x, x+ 1) | x ∈ N} ⊆ N2,M′(R) = {(x, 2x) | x ∈ N} ⊆ N2,M′(P ) =M(P )

M(x) = 2, andM(y1),M(y2) arbitrary.It holds thatM |= T iff M′ |= T ′′.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 98

Page 99: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Theorem 1.58 (Function Free FOL)Let T ∪ {ϕ} ⊆ LFOL(Var ,Pred ,Func) be a theory. Then,trtheory(T ∪ {ϕ}) is a theory over

LFOL(trvars(T,Var), trpreds(T,Pred),Func0)

and it holds that

T |= ϕ iff trtheory(T ) ∪ Ax(T ∪ {ϕ}) |= trtheory({ϕ})

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 99

Page 100: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Proof sketch (1).We have to show the following

∀M(M |= T ⇒M |= ϕ)iff

∀M′(M′ |= trtheory(T )∪Ax(T ∪{ϕ}) ⇒M′ |= trtheory({ϕ}))

where modelsM range over models over Var ,Pred , andFunc and modelsM′ over trvars(T,Var),trpreds(T,Pred), andFunc0.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 100

Page 101: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

1 Introduction1.4 Predicate Logic

Proof sketch (2).“⇒”: AssumeM′ |= trtheory(T ) ∪ Ax(T ∪ {ϕ}) andM′ 6|= trtheory({ϕ}).

LetM be a model with trmodel(M) =M′. (Such a model hasto exist because of the function axioms!.) According to theprevious lemma, we have thatM |= T andM 6|= ϕ.

“⇐”: Assume that the right direction holds and that there isa modelM withM |= T andM 6|= ϕ. According to theprevious lemma we also have thattrmodel(M) |= trtheory(T ) ∪ Ax(T ∪ {ϕ}) andtrmodel(M) 6|= trtheory({ϕ})) which contradicts theassumption.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 101

Page 102: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics

2. Languages and Semantics2 Languages and Semantics

The LanguageFrames and ModelsExtending ML to FOLThe Standard Translation

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 102

Page 103: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics

Content of this ChapterFirstly, we talk about relational structures in detail andintroduce the diamond language. Secondly, we extend ourdiamond language with multiple relations: This leads us tothe modal languages. If we extend the modal logic further,we get a new logic equivalent to first order logic: Basichybrid logic. But to which class of first-order formulae doesthe basic modal logic correspond? This is determined by thestandard translation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 103

Page 104: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

2.1 The Language

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 104

Page 105: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Relational Structures

Definition 2.1 (Relational Structure)A relational structure is given by (W, {R1, . . . ,Rn}) andconsists of:

A non-empty set W , the elements of which are ourobjects of interest. They are called points, states,nodes, worlds, times, instants or situations.A non-empty set {R1, . . . ,Rn} of relations on W .

For now we only consider binary relations: R ⊆ W ×W .

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 105

Page 106: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.2 (Southpark relational structure)

Kenny Cartman

Kyle Stan Wendy

loves

detestsfriends

friendsfriends

annoys

annoys annoys annoys

loves

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 106

Page 107: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

F = (W, {loves, friends, . . . }),W = {Kyle,Kenny, Cartman, Stan,Wendy}loves = {(Stan,Wendy), (Cartman,Cartman)}detests = {(Wendy, Stan)}annoys = {(Cartman,Kyle), (Cartman,Kenny),(Cartman, Stan), (Cartman,Wendy)}friends = {(Kyle, Stan), (Stan,Kyle), (Kenny,Kyle),(Kyle,Kenny), (Stan, Cartman)}

Restriction: For this subsection we focus on a singlerelation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 107

Page 108: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.3 (Colored Graph I)Imagine standing in a node of a colored graph. What canwe see?

see blue

see blue

♦ black♦ blue♦ red

We write ♦ instead of “see”.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 108

Page 109: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.4 (Colored Graph II)We imagine standing in a node of a colored graph. Whatcan we see?

♦ (black ∧ red) ∧♦ ♦ green

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 109

Page 110: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

The Basic Modal Language

Propositional logic is a one-point relationalstructure.But relational structures can describe much more. Wecan talk about points, lines etc.Therefore, we introduce the basic modal language.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 110

Page 111: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

ExtensionWe build the basic modal language on top ofpropositional logic by extending LPL(Prop) with two newoperators:

Possibility and necessity♦ ϕ: ϕ is possible

(We see one or more states where ϕ holds.)

� ϕ: ϕ is necessary(In all reachable states ϕ holds.)

Remember: We interpret the relational structure as a areachability graph starting in a certain node.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 111

Page 112: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

A Language for Relational StructuresWe can talk about attributes by adding labels to nodes(painting them in a particular color).

Definition 2.5 (Basic Modal Language LBML)Let Prop be a set of propositions. The basic modallanguage LBML(Prop) consists of all formulae defined by thefollowing grammar:

ϕ ::= p | ¬ϕ | ϕ ∨ ϕ | ♦ ϕ

where p ∈ Prop.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 112

Page 113: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Definition 2.6 (Macros)We define the following syntactic constructs as macros(p ∈ Prop):

⊥ := p ∧ ¬p

> := ¬⊥ϕ ∧ ψ := ¬(¬ϕ ∨ ¬ψ)

ϕ→ ψ := ¬ϕ ∨ ψϕ↔ ψ := (ϕ→ ψ) ∧ (ψ → ϕ)

�ϕ := ¬♦ ¬ϕ

� is called the dual of ♦ and vice versa.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 113

Page 114: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Colored Graph IIExample 2.7

blue→ �black

green→ �blackyellow→ ♦ yellow

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 114

Page 115: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Multiple Relations

The last section introduced two basic modalities:

♦ (there exists a successor) and � (for all successors).

How many different relations can we describe?

We define a very general logic for talking about relationalstructures with multiple relations.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 115

Page 116: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.8 (South Park Relational Structure)

Kenny Cartman

Kyle Stan Wendy

loves

detestsfriends

friendsfriends

annoys

annoys annoys annoys

loves

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 116

Page 117: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.9 (Finite State Automaton for anbm)Given the formal language anbm with n,m > 0. Therelational structure is then:

r s ta

a

b

b

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 117

Page 118: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Multiple Modal OperatorsA graph contains multiple relations:

R1,R2,R3, . . . ,Rlikes,Rdislikes, . . .

and for each relation we need a diamond operator

〈1〉, 〈2〉, 〈3〉, . . . , 〈likes〉, 〈dislikes〉, . . .Sometimes we also write 〈Ri〉 for 〈i〉.Set of modalities: Op

〈m〉ϕ : There is a m-sucessor in which ϕ holds.[m]ϕ : Every m-sucessor satisfies ϕ.

m ∈ Op

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 118

Page 119: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

SyntaxUp to now we considered binary relations: R ⊆ W ×WWe generalize this to arbitrary arities. Let Op be a set ofmodalities.

Can you think about a sensible ternary relation?

Definition 2.10 (Modal Similarity Type)A modal similarity type is given by τ = (Op, ρ) where Op isa non-empty set and ρ is a function ρ : Op→ N.We also write m ∈ τ instead of m ∈ Op.

Remark 2.11If the arity is clear from context we omit the function.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 119

Page 120: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.12 (Southpark Relations)Kenny, Kyle and Stan stick together 〈st〉.Kenny, Kyle, Stan and Cartman know each other 〈keo〉.

Formalized:Op = {st, keo}ρ(st) = 3

ρ(keo) = 4

τ = (Op, ρ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 120

Page 121: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Definition 2.13 (Modal Language LML)Let τ = (Op, ρ) be a modal similarity type and Prop be a setof propositions. The modal language LML(τ,Prop) is givenby all formulae defined by the following grammar:

ϕ ::= p | ¬ϕ | ϕ ∨ ϕ | 〈m〉(ϕ, . . . , ϕ︸ ︷︷ ︸ρ(m)-times

)

where p ∈ Prop and m ∈ Op.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 121

Page 122: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Definition 2.14 (Macros)We define the following syntactic constructs as macros(p ∈ Prop):

⊥ := p ∧ ¬p

> := ¬⊥ϕ ∧ ψ := ¬(¬ϕ ∨ ¬ψ)

ϕ→ ψ := ¬ϕ ∨ ψϕ↔ ψ := (ϕ→ ψ) ∧ (ψ → ϕ)

[m](ϕ1, . . . , ϕn) := ¬〈m〉(¬ϕ1, . . . ,¬ϕn)

[m] is called the dual of 〈m〉 and vice versa.What can we model with this language?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 122

Page 123: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.15ϕ = 〈keo〉(kyle, cartman, kenny, stan)

ϕ = 〈st〉(kyle, kenny, stan)

ϕ = stan ∧ 〈loves〉wendy

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 123

Page 124: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Two Example LanguagesReasoning about time:

Example 2.16 (The Basic Temporal Language)Two unary operators: Op = {F, P}.Modal similarity type: τ = ({F, P}, {(F, 1), (P, 1)}).

〈F 〉ϕ : ϕ will be true at some Future time point.〈P 〉ϕ : There is a Past time point, where ϕ is true.[F ]ϕ : ϕ will always be true.

It is common to use ♦ for 〈F 〉, � for [F ], and ♦ −1 for 〈P 〉.What does the following formula express?♦ −1ϕ→ � ♦ −1ϕ : Whatever has happened will always

have happened.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 124

Page 125: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Verification of programs:

Example 2.17 (Program π)> → ψwhile true do

if ψ thenµ→ φψ → µ

end ifif φ then exitend if

end while

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 125

Page 126: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

Example 2.18 (Propositional Dynamic Logic)Infinite collection of diamonds: Op = {π | π is a program}

What do the following operators express?〈π〉ϕ : Some terminating execution of π leads to a

state with information ϕ

[π]ϕ : Each terminating execution of π leads to astate with information ϕ

It would be nice if we could combine simple programs tocomplex ones:

π ∪ π′ : Nondeterministic choiceπ; π′ : Sequential compositionπ∗ : Iterative execution

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 126

Page 127: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.1 The Language

What do the following statements express?〈π∗〉ϕ↔ ϕ ∨ 〈π; π∗〉ϕ : A state with information ϕ is reached

by executing π a finite number of times iff thecurrent state satisfies ϕ or we can execute πonce and reach a state in which ϕ holds byexecuting π a finite number of times.

[π∗](ϕ→ [π]ϕ)→ (ϕ→ [π∗]ϕ) : Exercise.

Do these formulae always hold?

How can we actually use this logic?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 127

Page 128: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

2.2 Frames and Models

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 128

Page 129: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Models & Frames

We informally talked about the truth of formulae. But wedid not introduce a precise meaning as we did inpropositional logic where we defined valuations (ormodels). The equivalent to valuations are Kripke models.But before introducing them, we need frames, a notion thathas no equivalent in propositional logic.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 129

Page 130: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Definition 2.19 (Kripke Frame)A τ -(Kripke) frame is given by F = (W, {Rm | m ∈ τ})where

W is a non-empty set, called set of domains or worlds,Rm ⊆ W τ(m)+1 are (τ(m)+1)-ary relations for m ∈ τ .

τ is a modal similarity type.τ(m) + 1 corresponds to the reachable states τ(m) with 〈m〉and the current state (+1).

Frames are mainly used to talk about validities: They standfor a whole set of models.

Kripke frames are simply relational structures!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 130

Page 131: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.20

Rmw0 . . . wτ(m):w0

w1 . . .

wτ(m)

m m

m

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 131

Page 132: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

We extend frames by valuations for propositionalvariables.

Definition 2.21 (Kripke Model)A τ -(Kripke) model is given byM = (W, {Rm | m ∈ τ}, V )where

(W, {Rm | m ∈ Op}) is τ -frameV : Prop → P(W ) is called labeling function orvaluation

Kripke models are simply relational structure with labels.

Remark 2.22Sometimes we use an analogous definition of valuations:V : W → P(Prop).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 132

Page 133: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.23Consider the frame F = ({w1, w2, w3, w4, w5},R) whereRwiwj iff j = i+ 1 and V (p) = {w2, w3},V (q) = {w1, w2, w3, w4, w5}, V (r) = ∅.

w1

qw2

q, pw3

q, pw4

qw5

q

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 133

Page 134: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Frames vs. Models?FramesMathematical pictures of ontologies that we findinteresting. That is, frames define the fundamentalstructure of the domain of interest.

For example, we model time as a collection of pointsordered by a strict partial order.

ModelsFrames are extended by contingent information. That is,models extend the mathematical structure provided byframes by additional information.

Can Kripke models be used to interpret thepropositional language?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 134

Page 135: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Formal semantics of LML.

Definition 2.24 (SemanticsM, w |= ϕ)LetM be a Kripke model, w ∈ WM, and ϕ ∈ LML. ϕ is said tobe locally true or satisfied inM and world w, written asM, w |= ϕ, if the following holds:M, w |= p iff w ∈ VM(p) and p ∈ Prop,M, w |= ¬ϕ iff notM, w |= ϕ

M, w |= ϕ ∨ ψ iffM, w |= ϕ orM, w |= ψ

M, w |= 〈m〉(ϕ1, . . . , ϕn) iff there are worldsw1, . . . , wτ(m) ∈ W such that Rmww1 . . . wτ andM, wi |= ϕifor all i = 1, . . . , τ(m)

Given a set Σ ⊆ LML we writeM, w |= Σ iffM, w |= ϕ for allϕ ∈ Σ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 135

Page 136: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Internal and LocalSatisfaction of formulae is internal and local!

Internal: Formulae are evaluated inside models at somegiven world.

Local: Given a world it is only possible to refer to directsucessors of this world.

How does first-order logic compare to that?

Exercise: Write down the semantic clause for [m].

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 136

Page 137: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Validity and (Global) SatisfactionWe take on a global point of view.

Given a specification like ϕ := � ¬crash. In which statesshould it be true?

Definition 2.25 (Validity)A formula ϕ is called valid or globally true in a modelM iffM, w |= ϕ for all w ∈ WM. We writeM |= ϕ.

ϕ is satisfiable inM ifM, w |= ϕ for some w ∈ WM.

Analogously, we say that a set Σ of formulae is valid (resp.satisfiable) inM iff all formulae in Σ are valid (resp.satisfiable) inM.

Validity and Satisfiability are dual concepts!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 137

Page 138: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Syntax & Semantics: ConventionTo make life simpler we assume the following:

1 We have one unary modality (|Op| = 1, say Op = {m},with arity 1)

2 We use ♦ (resp. �) for 〈m〉 (resp. [m]).

3 We do not explicitly mention the modal similarity typeand drop τ from all Definitions, if it is clear fromcontext.

4 We use R for the binary relation between worlds. Weuse both notations Rw1w2 and w1Rw2 to denote thatworld w2 is reachable from world w1.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 138

Page 139: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Some ExamplesExample 2.26F = ({w1, w2, w3, w4, w5},R) where Rwiwj iff j = i+ 1 andV (p) = {w2, w3}, V (q) = {w1, w2, w3, w4, w5}, V (r) = ∅.

w1

qw2

q, pw3

q, pw4

qw5

q

1 M, w1 |= ♦ � p

2 M, w1 6|= ♦ � p→ p

3 M, w2 |= ♦ (p ∧ ¬r)

4 M, w1 |= q ∧ ♦ (q ∧ ♦ (q ∧ ♦ (q ∧ ♦ q))))

5 M |= � q

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 139

Page 140: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.27

Three unary operators: 〈a〉, 〈b〉, 〈c〉Three relations: Ra,Rb,Rc

w1 w2 w3 w4a b c

What can be said about 〈a〉p→ 〈b〉p?

It does not depend on the valuation!

Assume V (p) = {w2, w3}?What can be said about 〈a〉p→ 〈a〉〈b〉p?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 140

Page 141: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.28Binary operator: 〈bin〉 Ternary operator: 〈ter〉Relations: Rbin = {(w1, w2, w3)},Rter = {(w1, w2, w3, w4)}

w1 w2 p0

w3 p1 w4 p2

bin, ter

bin,ter

ter

What about 〈bin〉(p0, p1)→ 〈ter〉(p0, p1, p2)?

Each triangle starting in w is part of a rectangle starting in it.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 141

Page 142: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.29 (Bidirectional Frames, Models)Recall the basic temporal logic. How many relations do weneed?RF and RP should satisfy the following property:

∀xy(RFxy ↔ RPyx)

Given one, the other is fixed! We call this kind of framebidirectional.

What other conditions should be fulfilled?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 142

Page 143: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.30 (Regular Frames and Models (1))How should models for PDL look like? A relation for eachprogram?We can create new relations by existing ones:

Rπ1∪π2 = Rπ1 ∪Rπ2

Rπ1;π2 = Rπ1 ◦ Rπ2

Rπ∗ = (Rπ)∗

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 143

Page 144: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.31 (Regular Frames and Models (2))Let Π be the smallest set of programs containing the basicprograms and which is closed under ∪, ;, and ∗. Then aregular frame for Π is a labeled transition system(W, {Rπ | π ∈ Π}) such that:Ra is an arbitrary binary relation for each basic programa, andfor all complex programs π, Rπ is the binary relationinductively constructed with the rules above.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 144

Page 145: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Frames and ValidityIn Example 2.27 we have seen that a formula can betrue/false for all valuations. We can speak about structuralproperties ignoring contingent information.

Definition 2.32 (Frame Validity: F |= ϕ)Let F be a frame and ϕ ∈ LBML.

1 ϕ is valid in F and w ∈ WF , written F , w |= ϕ, ifM, w |= ϕ for all modelsM based on F .

2 ϕ is valid in F , written F |= ϕ, if F , w |= ϕ for allw ∈ WF .

3 Let K be class of frames. ϕ is said to be valid in K, if ϕ isvalid in each frame F ∈ K.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 145

Page 146: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.33Validity differs from truth in many ways:

When ϕ ∨ ψ is true at point w this means: Either ϕ or ψis true at w.If ϕ ∨ ψ is valid on a frame F this does not mean: Eitherϕ or ψ is valid on F .Counterexample: q ∨ ¬q.

Note that the last counterexample is similar to the exampleon Slide 14.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 146

Page 147: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.34In which frame is ♦ (p ∨ q)→ (♦ p ∨ ♦ q) valid?In all Kripke frames!Let F be a frame, w ∈ WF , and V be any valuation whereM = (F , V ). We have to show that

M, w |= ♦ (p ∨ q) implies M, w |= ♦ p ∨ ♦ q

Assume that the antecedent holds. Then, there is a state w′

with Rww′ andM, w′ |= p ∨ q. Hence, we haveM, w |= ♦ p ∨ ♦ q.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 147

Page 148: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Lemma 2.35 (Distribution Axioms)

The two formulae

♦ (p ∨ q)→ (♦ p ∨ ♦ q)� (p→ q)→ (� p→ � q)

are both valid in all Kripke frames F . The last formula is alsocalled axiom K.

Proof.We have seen the proof of the first formula in the lastexample. The second formula can be proved along thesame lines.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 148

Page 149: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.36Is ♦ ♦ p→ ♦ p valid in all frames?

w1 w2

p

w3

p

In which class is the formula valid?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 149

Page 150: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Modal Consequence RelationUp to now we verified formulae in a given model and state.Often, it is interesting to know whether a property followsfrom a given set of formulae.

Definition 2.37 (Local Consequence Relation)Let M be a class of models, Σ be a set of formulae and ϕ bea formula.

ϕ is a (local) semantic consequence of Σ over M,written Σ |=M ϕ, if for allM∈M and all w ∈ WM itholds thatM, w |= Σ impliesM, w |= ϕ.If M is the class of all models we just say that ϕ is a(local) consequence of Σ and write Σ |= ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 150

Page 151: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.38Let M be the class of transitive models. Then:

1 ♦ ♦ p |=M ♦ p,2 � p |=M � � p,3 but ��p |=M �p does not hold.

Is there a class of models M for which ♦ ♦ p |=M ♦ p holds,but no model in M is transitive?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 151

Page 152: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Definition 2.39 (Global Consequence Relation)Let M be a class of models, Σ be a set of formulae and ϕ bea formula.

Recall that forM∈M, we denote byM |= Σ that for allw ∈M : M, w |= Σ.ϕ is a global semantic consequence of Σ over M

(written as Σ |=gM ϕ) if for allM∈M it holds that

M |= Σ impliesM |= ϕ.If M is the set of all models we just say that ϕ is a globalconsequence of Σ and write Σ |=g ϕ.A formula is globally true, or valid in M, if it is true inall models in M.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 152

Page 153: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.2 Frames and Models

Example 2.40Consider the formulae p and �p and the class M of allmodels.

1 p does not locally imply �p in M.2 p does globally imply �p in M.

Note that global validity of a formula φ is difficult to achieve:

φ has to be true in all modelsM in M. And truth inMmeans truth in allM, w for all w.

In the next chapter, we will describe such formulae in muchmore detail.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 153

Page 154: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

2.3 Extending ML to FOL

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 154

Page 155: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Modal vs. First-Order Language?What are the main differences between the languages?

First-order logic1 contains constants.2 contains predicate and function symbols.3 allows global quantification.

On the other hand, modal logic1 has modal operators.2 is only local.

How can we extend our current modal language to FOL?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 155

Page 156: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Modal Language vs. First-Order Logic

Function symbols and k-ary relation symbols for k > 2 canbe encoded as relations as shown in the previous chapter.Therefore, we restrict ourselves to FOL without functionsymbols but constants.

The main idea is that we identify elements from thefirst-order domain (constants) with worlds in the Kripkemodel.

In the following we introduce syntactic means to refer tothese worlds.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 156

Page 157: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Basic Hybrid Language

Modal logics does not allow to name worlds. We cannot saythat some formula holds at a particular world.

For example, we cannot say that a specific state is blue andblack.

We introduce the basic hybrid language which has thedescribed feature.

What does a unique name for a point correspond to?

Constants!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 157

Page 158: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

We add a second sort of propositional symbols to ourmodal language.

The new symbols Nom = {i, j, k, l, . . . } are called nominalsand are used as labels for points. We require that they aredisjunct from the propositional symbols, i.e.Nom ∩ Prop = ∅. In the models nominals are interpreted assingleton sets, i.e. there are true at exactly one world.

In the language we treat nominals as ordinary propositions!

What can you say about the validity of the followingformulae?

1 ♦ (r ∧ p) ∧ ♦ (r ∧ q)→ ♦ (p ∧ q)2 ♦ (i ∧ p) ∧ ♦ (i ∧ q)→ ♦ (p ∧ q)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 158

Page 159: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

What do we have to ensure with respect to the labelingof nodes by nominals?

Each nominal has to be true at exactly one world!

Given a Kripke modelM we call V (i) the denotation of iwhere i ∈ Nom.

In order to capture FOL, we must be able to “jump to aspecific world”. Therefore we use the satisfactionoperators @i:

@iϕ iff ϕ holds at the world labeled with i.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 159

Page 160: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Syntax of the hybrid languageDefinition 2.41 (Basic Hybrid Language LBHL)Let Prop be a set of propositions, Nom be a set of nominals,and τ = (Op, ρ) be a modal similarity type. The basichybrid language LBHL(τ,Prop,Nom) is given by all formulaedefined by the following grammar:

ϕ ::= p | i | ¬ϕ | ϕ ∨ ϕ | 〈m〉(ϕ, . . . , ϕ︸ ︷︷ ︸ρ(m)-times

) | @iϕ

where m ∈ τ , p ∈ Prop and i ∈ Nom.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 160

Page 161: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

SemanticsWe say that a Kripke model is hybrid if, and only if,V : Prop ∪Nom → P(W ) and each nominal is true at exactlyone world, i.e. |V (i)| = 1 for all i ∈ Nom.

In the following, when considering the hybrid language weimplicitly assume that the models are hybrid.

Definition 2.42 (Semantics of LBHL)LetM be a (hybrid) Kripke model, w ∈ WM, Nom a set ofnominals and ϕ ∈ LBHL.The semantics of the basic hybrid language extends thesemantics of modal logic by the following two clauses:

M, w |= i iff V (i) = {w} and i ∈ Nom

M, w |= @iϕ iffM, w′ |= ϕ where V (i) = {w′}

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 161

Page 162: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Comparing NodesExample 2.43 (Colored Graph II)How to say: “We can come back to the same node”?

i@i♦ ♦ ♦ ♦ ♦ i

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 162

Page 163: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Example 2.44In ML we have seen how to describe frame properties bymodal formulae. It turns out that the hybrid language ismuch more expressive in that respect. Consider a frame(W,R) and give the corresponding property of R to each ofthe following formulae:

1 i→ ♦ i (reflexivity)2 ♦ ♦ i→ ♦ i (transitivity)3 ♦ i→ ♦ ♦ i (density)4 i→ ¬♦ i (irreflexivity)5 ♦ ♦ i→ ¬♦ i (intransitivity)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 163

Page 164: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Simulating FOL: 1. Attempt

We construct the following two translationsTR: Transformation of FOL models to Kripke modelstr : Transformation of FOL formulas to Modal

formulassuch that for a given FOL modelMFOL and all FOL formulasϕ it holds that

MFOL |= ϕ iff TR(MFOL), w |= tr(ϕ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 164

Page 165: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Translations of ModelsLetM = (U, I) be a FOL model over Pred without functionsymbols (constants are allowed).

We constructM′ := TR(M) = (W,R, V ) as follows:1 W := U ∪ {w0} where w0 is a new world not occurring

in U .2 For each c ∈ Func0 ∪ Var label the world I(c) with c, i.e.V (c) := {I(c)}. We set Nom = Func0 ∪ Var .

3 For each P ∈ Pred1 we label each world w ∈M(P ) withP .

4 For each P ∈ Predk we add a k-ary relation RP to R(resp. to Op) such that RPw1w2 . . . wk iff(w1, w2, . . . , wk) ∈M(P ).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 165

Page 166: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Example 2.45Consider the follwing FOL model: M = ({1, 2, 3}, I) overFunc0 = {a, b}, Var = {x}, Pred1 = {P 1}, and Pred2 = {P 2}with

1 I(P 1) = {1, 3}2 I(P 2) = {(1, 2), (1, 3)}3 I(a) = 2

4 I(b) = 1

5 I(x) = 2.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 166

Page 167: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Translation tr : LFOL → LBHL

Equality: tr(s = t) := @st

Unary predicates: tr(P (x)) := @xP

Predicates: tr(R(x1, . . . , xk)) := @x1〈R〉(x2, . . . , xk)

Negation: tr(¬ϕ) := ¬tr(ϕ)

Or: tr(ϕ ∨ ψ) := tr(ϕ) ∨ tr(ψ)

Quantification: tr(∃xϕ) := ?

We cannot yet say: There exists a world such that...!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 167

Page 168: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Renaming worlds

Recall the semantics of FOL:

M |= ∃xϕ iff M[x/a] |= ϕ

for some a ∈ U whereM[x/a] denotes the model equal toMbutM[x/a](x) = a

We need a model update similar to the first-order case.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 168

Page 169: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Definition 2.46 (Model UpdateM[i/w])LetM be a hybrid Kripke model, w ∈ WM, and i ∈ NomThe defineM[i/w] to be the model equal toM but thedenotation of i is set to w, i.e. VM[i/w](i) = {w}.

Note that we use the same notation as for FOL.

Example 2.47

w1i iw2

MM[i/w2]

We still lack a syntactic counterpart!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 169

Page 170: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Extended syntaxDefinition 2.48 (HL With Renaming LHLR)Let τ = (Op, ρ) be a modal similarity type and Prop be a setof propositions, and Nom be a set of nominals. The hybridlanguage with renaming LHLR(τ,Prop,Nom) is given by allformulae defined by the following grammar:

ϕ ::= i | p | ¬ϕ | ϕ ∨ ϕ | 〈m〉(ϕ, . . . , ϕ︸ ︷︷ ︸ρ(m)-times

) | @iϕ | riϕ

where m ∈ τ , p ∈ Prop and i ∈ Nom.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 170

Page 171: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Semantics

Definition 2.49 (Semantics of LHLR)LetM be a (hybrid) Kripke model, w ∈ WM and ϕ ∈ LBHL.The semantics of the basic hybrid language withrenaming extends the semantics of the hybrid language bythe following clause:

M, w |= riϕ iffM[i/w′], w |= ϕ for some w′ ∈ W .

Consider the analogy: ∃xϕ(x) vs. riϕ(i)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 171

Page 172: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Simulating first-order logicDefinition 2.50 (tr : LFOL → LHLR)Equality: tr(s = t) := @st

Unary predicates: tr(P (x)) := @xP

Predicates: tr(R(x1, . . . , xk)) := @x1〈R〉(x2, . . . , xk)

Negation: tr(¬ϕ) := ¬tr(ϕ)

Or: tr(ϕ ∨ ψ) := tr(ϕ) ∨ tr(ψ)

Quantification: tr(∃xϕ) := rxtr(ϕ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 172

Page 173: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Example 2.51Let ϕ := ∃x(banker(x)→ ∃y(customer(y) ∧ spoofs(x, y))). Wetranslate ϕ to a ML formula.

tr(∃x(banker(x)→ ∃y(customer(y) ∧ spoofs(x, y))))

rx(tr(banker(x)→ ∃y(customer(y) ∧ spoofs(x, y))))

rx((tr(banker(x))→ tr(∃y(customer(y) ∧ spoofs(x, y)))))

rx(@xbanker → tr(∃y(customer(y) ∧ spoofs(x, y))))

rx(@xbanker → ry(tr(customer(y) ∧ spoofs(x, y))))

rx(@xbanker → ry(tr(customer(y)) ∧ tr(spoofs(x, y))))

rx(@xbanker → ry(@ycustomer ∧@x〈spoofs〉y))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 173

Page 174: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Translation: The Other DirectionHave a closer look at the semantic clause of the hybridmodal language:

M, w |= 〈R〉ϕ iff there is an w′ ∈ R s.t. Rww′ andM, w′ |= ϕ

In which formal language can this be expressed?

In FOL! The translation is immediate:

trw(〈R〉ϕ) = ∃w′ (R(w,w′) ∧ trw′(ϕ))

We need w′ in trw′ to keep track of the current world.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 174

Page 175: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.3 Extending ML to FOL

Definition 2.52 (trx : LHLR → LFOL)We define the translation recursively as follows:Atomic Propositions: trx(P ) :=

Nominals: trx(i) :=

Negation: trx(¬ϕ) :=

Disjunction: trx(ϕ ∨ ψ) :=

Modality: trx(〈R〉(ϕ1, . . . , ϕk)) :=

Satisfaction operator: trx(@iϕ) :=

Renaming: trx(riϕ) :=

Exercise: Specify the complete translation functions forformulae and models trx and TR.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 175

Page 176: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.4 The Standard Translation

2.4 The Standard Translation

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 176

Page 177: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.4 The Standard Translation

The function trx : LHLR → LFOL is a mapping from LHLR toLFOL given a world w of the Kripke model. Here, we wouldlike to define the correspondent language of the (basic)modal logic.

We would like to identify to which sublanguage offirst-order logic the (basic) modal logic corresponds to. Ofcourse, this should be a strict subclass of LFOL.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 177

Page 178: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.4 The Standard Translation

Definition 2.53 (Correspondence Language L1τ)

Let LML(τ,Prop) be given. The first-order languagecorresponding to LML(τ,Prop), L1

τ (Prop), is built over theunary prediactes

Pred1 = {Pi | pi ∈ Prop}

and the following n+ 1 ary predicates

Predn+1 = {Pm | m ∈ τ and τ(m) = n}.

That is, for each n-ary modal operator m a n+ 1 arypredicate symbol is defined.ϕ(x) denotes a first-order formula with one free variable,that is, a variable which is not bound by any quantifier.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 178

Page 179: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.4 The Standard Translation

We define the standard translation ST x as the restriction oftrx to LML(τ,Prop).

Definition 2.54 (Standard Translation ST x)Let x be a FOL variable. The standard translation

ST x : LML(τ,Prop)→ L1τ (Prop)

is defined as follows:

ST x(p) = P (x)

ST x(¬ϕ) = ¬ST x(ϕ)

ST x(ϕ ∨ ψ) = ST x(ϕ) ∨ ST x(ψ)

ST x(〈m〉(ϕ1, . . . , ϕn)) = ∃y1 . . . ∃yn(Pm(x, y1, . . . , yn)∧ST y1(ϕ1) ∧ · · · ∧ ST yn(ϕn))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 179

Page 180: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

2 Languages and Semantics2.4 The Standard Translation

Theorem 2.55 (Standard Translation = ML)LetM be a τ -model and M the FOL interpretation ofM.Then, the following holds

1 M, w |= ϕ iff M[x/w] |= ST x(ϕ)

2 M |= ϕ iff M |= ∀xST x(ϕ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 180

Page 181: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics

3. Basic Modal Logics3 Basic Modal Logics

Inferences and PropertiesNormal Modal LogicsSound- and CompletenessFinite Models via Filtration

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 181

Page 182: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics

Content of this Chapter (1)In this chapter we introduce the most important modallogics: normal modal logics. We define them, by givingappropriate axiom systems. To this end, we have tointroduce proofs in modal logics (Definition 3.13). Thenwe link these axioms to properties of the transitionrelation between worlds. It is much easier to work withthese semantical notions, than with proof-theoreticalmeans.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 182

Page 183: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics

Content of this Chapter (2)After stating and discussing the implications of the sound-and completeness results, we formally prove them using theidea of canonical models: Any modal logic is stronglycomplete wrt its canonical model. Most completenessresults for modal logics (wrt. a particular class of frames)are instances of this theorem. We end this chapter with adiscussion of the finite model property and a method, thefiltration theorem, to obtain finite models. Using thismethod, many modal logics can be shown to be decidable.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 183

Page 184: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

3.1 Inferences and Properties

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 184

Page 185: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

The Story So Far . . .We have introduced several languages: e.g, the

propositional language,basic modal language,modal language,first-order language.

Truth of formulae in these languages were defined bymodels: in a semantic way. Using this notion, we purelysemantically defined when a formula follows from a set offormulae:

Σ |=g ϕ iff for all modelsM: M |= Σ⇒M |= ϕ

In modal logic, we also distinguished between local andglobal consequences: Truth inM, w and truth inM.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 185

Page 186: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Syntactic Inferences

First QuestionGiven a class F of frames (or models). Which formulae arevalid in all these frames?

Note that there might be classes of frames, where thisproblem is undecidable: We can not find an algorithm todetermine whether a given formula is valid or not.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 186

Page 187: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Second QuestionCan we define a calculus (like the Tableaux-method) tosystematically produce all valid formulae?

We will indeed define several systems of axioms, whichproduce exactly the valid formulae in particular classes offrames (see Theorem 3.26).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 187

Page 188: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Valid Formulae in an Arbitrary FrameWhich formulae are true in the class of all frames F?

Axioms: Which formulae from propositional logic arevalid in it?Certainly the tautologies of propositional logic.And the axiom K:

� (p→ q)→ (� p→ � q)

Closure: What about Modus Ponens?What about substitution? We know that p ∨ ¬pis a tautology. Then so should φ ∨ ¬φ be, whereφ is any modal logic formula.

Necessitation: Suppose the formula φ is true in the frameF . Then so is �φ.

We take a closer look at these (inference) rules soon.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 188

Page 189: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in a Particular Frame (1)Suppose we do know something about a particular frame.

Serial: Frames where the relation R is serial:For all w there is a w′ with wRw′.

Reflexive: Frames where the relation R is reflexive:For all w: wRw.

Transitive: Frames where the relation R is transitive:For all w,w′, w′′: wRw′ and w′Rw′′ implieswRw′′.

Euclidean: Frames where the relation R is euclidean:For all w,w′, w′′: wRw′ and wRw′′ impliesw′Rw′′.

Symmetric: Frames where the relation R is symmetric:For all w,w′: wRw′ implies w′Rw.

Remember Slide 151 where we discussed transitivity.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 189

Page 190: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in a Particular Frame (2)Definition 3.1 (Important Formulae)We define the following formulae, that will play animportant role later for defining various modal logics.

K �(p→ q)→ (� p→ � q)D ¬�(p ∧ ¬p)T �p→ p4 �p→ � � p5 ¬�p→ � ¬� pB p→ � ♦ p

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 190

Page 191: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in Several Frames (3)

Lemma 3.2 (Appropriate Frames)

Let (W,R) be a Kripke frame. Then the following holds:1 (W,R) |= � (p→ q)→ (� p→ � q).2 (W,R) |= ¬� (p ∧ ¬p) iff R is serial.3 (W,R) |= � p→ p iff R is reflexive.4 (W,R) |= � p→ � � p iff R is transitive.5 (W,R) |= ¬� p→ � ¬� p iff R is euclidean.6 (W,R) |= p→ � ♦ p iff R is symmetric.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 191

Page 192: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in Several Frames (4)

Proof.The first fact has been proved in Lemma 2.35.We identify in Kripke models (W,R, V ) the mapping V withsubsets S of W : V (p) = S (note that we only need toconsider V that make p true or not).Then (W,R) |= ¬� (p ∧ ¬p) iff

∀S ⊆ W∀w ∈ W (∃x(wRx ∧ (x ∈ S ∨ x 6∈ S)))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 192

Page 193: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in Several Frames (5)Proof: (continued).(W,R) |= � p→ p iff ∀S ⊆W∀w ∈W :

∀x(wRx→ x ∈ S)→ w ∈ S.

(W,R) |= � p→ � � p iff ∀S ⊆W∀w ∈W :

∀x(wRx→ x ∈ S)→∀x(wRx→∀y(xRy→y ∈ S)).

(W,R) |= ¬� p→ � ¬� p iff ∀S ⊆W∀w ∈W :

(w ∈ S)→ ∀x(wRx→ ∀y(xRy → y ∈ S)).

(W,R) |= p→ � ♦ p iff ∀S ⊆W∀w ∈W :

∃x(wRx ∧ wx ∈ S)→∀x(wRx→∀y(xRy→y ∈ S)).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 193

Page 194: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Validity in Several Frames (6)

Proof: (continued).The proof is now simple. The “⇐” is trivial. The otherdirection is by choosing the right Kripke model (resp. theright set S ⊆ W ). For reflexivity and transitivity, we chooseS := {x : wRx}. For euclidean, we set S := {w′′}. Forsymmetry we set S := {w}.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 194

Page 195: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Recall thata binary relation R is irreflexive, if there is no x withxRx,a preorder R is a binary relation that is reflexive, andtransitive,a partial order R is a preorder that is antisymmetric(i.e. ∀x∀y((xRy ∧ yRy)→ x = y)),a finite partial order R is a partial order defined on afinite set,an equivalence relation R is a preorder that issymmetric (i.e. ∀x∀y(xRy → yRx)).

Lemma 3.3 (Characterising Equivalences)A binary relation is an equivalence relation if and only if it isreflexive and euclidean.

ExerciseProf. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 195

Page 196: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Preserving Truth/ValidityDefinition 3.4 (Preserving Frame Validity)An inference rule ϕ1,...ϕn

ψis called frame validity preserving,

if given a frame F with F |= ϕ1 ∧ . . . ∧ ϕn, then F |= ψ aswell.

Similarly, a rule is called locally truth preserving for a classof models M, if whenever forM∈M and all w ∈ WM itholds thatM, w |= ϕ1 ∧ . . . ∧ ϕn impliesM, w |= ψ.

Analogously, a rule is called globally truth preserving for aclass of models M, if whenever forM∈M it holds thatM |= ϕ1 ∧ . . . ∧ ϕn impliesM |= ψ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 196

Page 197: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Modus Ponens

This rule was already introduced on Slide 40.

Definition 3.5 (Modus Ponens)Let ϕ, ψ ∈ LML. Modus ponens denotes the inference rulewhich allows to derive ψ from ϕ and ϕ→ ψ:

ϕ ϕ→ ψ

ψ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 197

Page 198: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Example 3.6We consider the set T = {�p,♦ ¬p ∨ ♦ q}. At first sight,Modus Ponens does not seem to be applicable. However

♦ ¬p ∨ ♦ q is equivalent to �p→ ♦ q

Therefore we can derive from T the formula ♦ q.

Note that if we look at it from a semantical perspective, thederivation is trivial: If p is true in all reachable worlds, thenit is also true in at least one reachable world.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 198

Page 199: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Lemma 3.7 (MP is Locally Truth Preserving)The Modus Ponens rule is locally truth preserving andtherefore also preserving frame validity.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 199

Page 200: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Generalization (Necessitation)There is another important rule: The generalization ornecessitation rule.

Definition 3.8 (Necessitation (N))The necessitation rule says that whenever ϕ is valid then sois � ϕ:

ϕ

� ϕ

It is easy to see that necessitation preserves frame validity.But differently from the modus ponens rule, it is not locallytruth preserving! Exercise: Prove that the rule is frame validity preserving,but not locally truth preserving!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 200

Page 201: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

A first Application of Necessitation

We are using the necessitation rule to prove the following

Lemma 3.9 (An (In-)Formal Proof)

The formula � (φ ∧ φ′)→ (� φ ∧� φ′) is valid in all frames.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 201

Page 202: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Proof.We could show this directly, as in Lemma 2.35. However, inview of the formal calculi to come, we choose a moresyntactical method.

1 (φ ∧ φ′)→ φ and (φ ∧ φ′)→ φ′ are propositionaltautologies.

2 Using necessitation, we have � ((φ ∧ φ′)→ φ) and� ((φ ∧ φ′)→ φ′).

3 Using the Distribution axiom from Lemma 2.35, we get� (φ ∧ φ′)→ � φ and � (φ ∧ φ′)→ � φ′.

4 The last step follows by using the propositionalcalculus: If we have ψ and ψ′ then we also have ψ ∧ ψ′.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 202

Page 203: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Inference Rules versus Implications

What about the following deduction?

What Went Wrong?Let us assume that p is true (although it is obviously notvalid on all frames). Then we use necessitation and obtain� p. So, we have proven that p→ � p!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 203

Page 204: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Uniform Substitution

The last method to obtain new formulae from old ones iscalled uniform substitution. This is the formalization offormula schemata.

Let us consider the tautology p→ ¬p. It is easy to see that itdoes not depend on the particular proposition p. We shouldbe able to substitute any formula for p. The notion ofUniform substitution formalizes this observation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 204

Page 205: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Definition 3.10 (Uniform Substitution)

A basic substitution is a mapping σ : Prop → LML(Prop). Abasic substitution induces a (uniform) substitution

(·)σ∗ : LML(Prop)→ LML(Prop)

over formulae as follows:

(⊥)σ∗ := ⊥(p)σ∗ := σ(p)

(¬ϕ)σ∗ := ¬(ϕ)σ∗

(ϕ ∨ ψ)σ∗ := (ϕ)σ∗ ∨ (ψ)σ∗

(♦ ϕ)σ∗ := ♦ (ϕ)σ∗

We identify σ∗ with σand omit the parentheses.Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 205

Page 206: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Definition 3.11 (Substitution Rule (Subst))We say that ψ is a substitution instance of ϕ if there is someuniform substitution σ∗ such that ψ = ϕσ∗.The uniform substitution inference rule is as follows:

ϕ

ϕσ∗

where σ∗ is some uniform substitution.

Example 3.12The formula �ϕ ∨ ¬�ϕ is a substitution instance of p ∨ ¬p.

And so is the formula �♦ ¬ϕ ∨ ¬�♦ ¬ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 206

Page 207: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

ProvabilityDefinition 3.13 (Σ-Proof, Σ)

Let Σ be a set of modal formulae and Rul a set of inference rules. AΣRul-proof for ϕ is a finite sequence of formulae ϕ1, . . . , ϕn s.t.

1 ϕ = ϕn, and

2 ϕi is either from Σ, or a propositional tautology or obtainedby applying the rules in Rul to some formulae ϕj (j < i).

We consider Rul = {MP, Subst} and, for normal modal logics,Rul = {MP, Subst,N}. When clear from context, we write Σ forthe calculus based on Rul. Formulae ϕ ∈ Σ are called axioms of Σ.We write `Σ ϕ. For a set Γ of formulae, we also write Γ `Σ ϕ for`Σ∪Γ ϕ: ϕ can be proved from Γ in the system Σ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 207

Page 208: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

We have already seen an informal proof of the statement inLemma 3.9. The reverse implication is also true and we givea formal proof of it. The only axiom we need is the formulaK introduced on Slide 188.

Lemma 3.14 (Consequence of Axiom K)

`{K} (� φ ∧� φ′)→ � (φ ∧ φ′)

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 208

Page 209: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Theorem 3.15 (A Proof from {K})`{K} � (ϕ1 ∧ . . . ∧ ϕn)↔ (� ϕ1 ∧ . . . ∧� ϕn).

Proof.Using Lemmas on Slide 188 and Lemma 3.14, we have theequivalence of the formulae for n = 2. Then we use thisequivalence n− 1 times and get the result.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 209

Page 210: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Finally, a modal logic is a set of formulae with the followingproperties

Definition 3.16 (Modal Logics)

A modal logic Λ is a set of modal formulas that1 contains all propositional tautologies,2 is closed under modus ponens, and3 is closed under uniform substitution.

Elements of ϕ ∈ Λ are called theorems of Λ , we write `Λ ϕ.

How many formulae does a modal logic contain?

Can a modal logic be represented by a finite set?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 210

Page 211: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

The following result is obvious: A set of formulae Λ is amodal logic iff Λ is closed under all Λ-provable formulae.

Definition 3.17 (Axiomatization)Let Λ be a modal logic and Σ be a proof system over Σ suchthat Λ and the set of all Σ-provable formulae coincide.Then, we say that Σ is an axiomatization of Λ. If Σ is finitewe call it a finite axiomatization.

Note that we do not require an axiomatization for theunderlying propositional tautologies: We simply took all ofthem (in part 2 of Definition 3.13).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 211

Page 212: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Sound & CompletenessDefinition 3.18 (Semantic Set ΛS)Let S be a class of frames (or models). We define ΛS to bethe set of all valid formulae over S, i.e.

ΛS = {ϕ | S |= ϕ for all S ∈ S}

Is ΛS a modal logic?

In the following we are interested in the following question:

Are there syntactic mechanisms for generating ΛS?

( S is a class of frames)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 212

Page 213: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Definition 3.19 (Soundness)Let S be a class of frames or models. A modal logic Λ issound with respect to S if for all formulae ϕ

`Λ ϕ implies |=S ϕ.

Recall that |=S ϕ means for all S ∈ S : S |= ϕ.Recall also that in case S is a frame, S |= ϕ means that ϕ istrue in all models that can be built on S.

Exercise: Show that this definition is equivalent to thefollowing: Λ is sound wrt. S iff Λ ⊆ ΛS.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 213

Page 214: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

Definition 3.20 (Completeness)

Let S be a class of frames or models.A logic Λ is strongly complete with respect to S if for anyset of formulae Γ ∪ {ϕ} it holds that

Γ |=S ϕ implies Γ `Λ ϕ.

A logic Λ is weakly complete with respect to S if for anyformula ϕ,

|=S ϕ implies `Λ ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 214

Page 215: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.1 Inferences and Properties

All the logics that we consider in this lecture arestrongly complete wrt. a certain class of frames. Andthus they are also weakly complete.But there are also logics that are only weakly completewrt a class of frames and not strongly complete (seeExample 3.53).

Exercise: Show that weak completeness1 is a special case of strong completeness.2 is equivalent to the following:

Λ is weakly complete wrt. S iff ΛS ⊆ Λ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 215

Page 216: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

3.2 Normal Modal Logics

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 216

Page 217: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Normal Modal LogicsWe have already defined modal logics inDefinition 3.16.We noticed that Axiom K: � (p→ q)→ (� p→ � q) istrue in all Kripke frames.We also showed that necessitation is a valid rule forKripke frames.

Definition 3.21 (Normal Modal Logic)

A modal logic Λ is called normal if it contains the formula(K) �(p→ q)→ (�p→ �q)

and is closed under necessitation.

This is how we defined a modal proof in Definition 3.13:With Σ containing K and all three rules of inference.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 217

Page 218: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Lemma 3.22 (K)The intersection of normal modal logics is again a normalmodal logic. There is therefore a smallest normal modallogic. We call it K, in honor of Saul Kripke.

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 218

Page 219: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Lemma 3.23For any normal modal logic Λ the following implicationholds:

`Λ ϕ↔ ψ implies `Λ ♦ ϕ↔ ♦ ψ

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 219

Page 220: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

In fact, the proof of the last lemma shows the following.

Lemma 3.24For any normal modal logic Λ, the following holds. Let Ψ bea formula containing the constant p, let φ, φ′ be two arbitrarysentences and let σ1, σ2 be two substitutions withσ1(p) = ϕ, σ2(p) = ϕ′. Then

If `Λ ϕ↔ ϕ′, then `Λ ψσ1 ↔ ψσ2.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 220

Page 221: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Formalizing in K4In fact, the proof of the last lemma can be formalizedwithin the modal logic K4.

Theorem 3.25 (Formalization Within K4)Let Ψ be a formula containing the constant p, let φ, φ′ be twoarbitrary sentences and let σ1, σ2 be two substitutions withσ1(p) = ϕ, σ2(p) = ϕ′. Then:

`{K4} � (ϕ↔ ϕ′) → � (ψσ1 ↔ ψσ2)

This shows that modal logics can be used to formalizestatements about modal logics. This is in particularinteresting, when we formalize statements about provabilityof certain statements in Peano arithmetic.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 221

Page 222: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

How does K look like?Are there other sensible logics?

Theorem 3.26 (Completeness of System K)

System K is sound and complete with respect to arbitraryKripke frames.

The proof follows later.

How can we use this important result to show that theformula � p→ p can not be proved from K?

Blackboard: we have to construct a countermodel.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 222

Page 223: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

We can define various normal modal logics by appropriateaxioms.

Definition 3.27 (K, KT, B, K4, S4, S5, G)We define the following normal modal logics by statingtheir axioms:

K: � (p→ q)→ (� p→ � q).KT: K and T: � p→ p.

B=KTB: K, T and B: p→ � ♦ p.K4: K and 4: � p→ � � p.

S4=KT4: K, T, and 4.S5=KT5: K, T, and 5: ♦ p→ � ♦ p.

G: K and � (� p→ p)→ � p.

B stands for Brouwer, the famous dutch mathematician.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 223

Page 224: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Characterisation of GWhat are appropriate frames for G , i.e. analogousproperties to Lemma 3.2?

It is easy to see that(W,R) |= � (� p→ p)→ � p iff ∀S ⊆W∀w ∈W∀x(wRx→ (∀y(xRy → y ∈ S)→ x ∈ S))→ ∀x(wRx→ x ∈ S).

Lemma 3.28 (Appropriate Frames for G)

(W,R) |= � (� p→ p)→ � p iff R is transitive and there isno infinite sequence w0, w1, . . . such that w0Rw1, w1Rw2, . . ..

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 224

Page 225: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Proof (of Lemma 3.28).⇒:

1 R is transitive. LetSw := {a : aRw} ∩ {a : ∀b(aRb→ wRb} for w ∈ W . Itsuffices to show that for every a such that wRa anda ∈ Sw and for every b with aRb we have wRb.

2 The second condition. Exercise.

⇐: Let S ⊆ W , w ∈ W , wRx′ and x′ 6∈ S. We have to show:There is an x with wRx, and ∀y(xRy → y ∈ S), and x 6∈ S.We consider the set S ′ := (W \ S) ∩ {z : wRz}.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 225

Page 226: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Theorem 3.29 (Subsystems of KDT45B)

Let X be any subset of {D,T,4,5,B} and let X be any subsetof {serial, reflexive, transitive, euclidean, symmetric}corresponding to X.Then K ∪X is sound and complete with respect to Kripkeframes the accessibility relation of which satisfies X .

Proof. Will be done later on Slide 247.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 226

Page 227: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Corollary 3.30 (Completeness of KT45 (S5))

System S5=KT5 is sound and complete with respect to Kripkeframes (W,R) where R is an equivalence relation.

Corollary 3.31 (Completeness of KT4 (S4))

System S4=KT4 is sound and complete with respect to Kripkeframes (W,R) where R is a preorder.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 227

Page 228: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

The Case of System GTheorem 3.32 (Completeness of G)

System G is sound and complete with respect to Kripke framesthat are transitive and well-capped: there is no infinitesequence w0, w1, . . . such that w0Rw1, w1Rw2, . . ..

Proof. Will be done later on Slide 250.

Note: GT is inconsistent.The system GT consisting of axioms K, T and G isinconsistent.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 228

Page 229: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

S4GrzThe following axiom plays a role in the next theorem

Grz : � (� (p→ � p)→ p)→ p

The proof of the following theorem will be given in the nextsection.

Theorem 3.33 (Completeness of S4Grz)

System S4Grz=KT4Grz is sound and complete with respect toKripke frames (W,R) where R is a finite partial order.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 229

Page 230: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Soundness of S4Grz

1 We only have to show that the axiom Grz holds in anyfinite partial ordering (why?).

2 We assume a transitive, reflexive relation on a finite setW of worlds, and a w ∈ W such that Grz does not holdinM, w. Then we show that R is not antisymmetric.

3 We define a sequence w0, w1, wi, . . . of worlds s.t. for alli: wi 6= wi+1 and Rwiwi+1.

Then we are done: As W is finite, there must be j, i withwi = wj, i 6= j and Rwiwj. Thus R is not antisymmetric.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 230

Page 231: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Construction of the Sequence1 w0 := w. Thus p does not hold in w0, but� (� (p→ � p)→ p) does.

2 We want to make sure that this is true in all even worldsw2i and do this by induction.

3 By reflexivity, in these even worlds also holds� (p→ � p)→ p and thus � (p→ � p) does not hold.

4 So for some w2i+1 with Rw2iw2i+1, w2i+1 6|= p→ � p,thus w2i+1 |= p and w2i+1 6|= � p and w2i+1 6= w2i.

5 As w2i+1 6|= � p, there is some w2i+2 with Rw2i+1w2i+2

and w2i+2 6|= p, thus w2i+1 6= w2i+2.6 By transitivity, the formula � (� (p→ � p)→ p) holds

in w2i+2 and this completes the construction of thesequence.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 231

Page 232: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Theorem 3.34 (Some Normal Modal Logics)We have the following strict relationships between theintroduced logics.

K $ K4 $ G$ $

KT $ S4 $ S4Grz$ $ $B $ S5 $ S5Grz

Proof. Blackboard. Most relationships are obvious. Thefollowing require some thinking: (1) S4 $ S5, (2) K4 $ G,(3) S4 $ S4Grz, (4) S5 $ S5Grz, (5) B $ S5, (6) S4Grz $S5Grz: Find appropriate models.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 232

Page 233: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Lemma 3.35 (Some Properties of S5)1 The axiom D follows from KT5: `KT5 D.2 The formula ♦ p does not follow from KT5.3 KD5 is not equivalent to K5. Axiom D does not follow

from K5: 6`K5 D.

Exercise

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 233

Page 234: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Lewis’ System S4In Lewis system, the modality can be interpreted as isprovable.S4 has the finite model property: If a formula φ is notderivable, then there is a finite countermodel.It is therefore decidable (why?).The formula �(�(p→ �p)→ �p)→ (♦�p→ �p) (fromDummett) is not derivable in S4.Consider S4 and the McKinsey axiom �♦p→ ♦�p.Then the binary relation in the corresponding framessatisfies: ∀x∃y(xRy ∧ ∀z(yRz → y = z)).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 234

Page 235: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.2 Normal Modal Logics

Density and Axiom 4We consider the set of all frames (W,R) where R is a linearordering.

In which of these frames is � p→ � � p true?In all frames where R is a dense linear ordering:

∀x∀y∃z : (xRy ∧ x 6= y) → (xRz ∧ zRy ∧ x 6= z ∧ z 6= y)

Blackboard

Idea: Assume a linear, non-dense order, i.e. between w andw′ (Rww′) there are no other worlds. Then construct anappropriate Kripke model where the formula is false: Makep true only in w′ and nowhere else. Then the formula isfalse in world w in the Kripke model.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 235

Page 236: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

3.3 Sound- andCompleteness

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 236

Page 237: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Proofs of the TheoremsIn this section we introduce the machinery to prove ourcompleteness theorems for normal modal logics(developed by Scott and Makinson in the 60ies).It is based on Definition 3.40 and the generalTheorem 3.44.We only have to check whether the canonical modelsatisfies the required properties.This method gives completeness proofs for systems K,K4, KT, S4, B, S5.The systems G and S4Grz need separate treatment. Weprove slightly stronger completeness theorems.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 237

Page 238: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Remember Definition 3.20. Here are two simplecharacterizations that we use in the following.

Lemma 3.36 (Strongly, Weakly Complete)

A logic Λ is strongly complete with respect to a class ofstructures S if and only if, every Λ-consistent set of formulaeis satisfiable on some S ∈ S.Λ is weakly complete with respect to a class of structures S ifand only if, every Λ-consistent formula is satisfiable on someS ∈ S.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 238

Page 239: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

We only show the proof for strong completeness (weakcompleteness follows).

Proof.“⇐”: Suppose Λ is not strongly complete wrt S. Thus,there is Γ ∪ {ϕ} such that Γ |=S ϕ and Γ 6`Λ ϕ. Then,Γ ∪ {¬ϕ} is Λ-consistent but not satisfiable on S.“⇒”: trivial

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 239

Page 240: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Canonical ModelsDefinition 3.37 (Λ-MCS’s)A set Γ of formulae is maximal Λ-consistent (short: Λ-MCS)if Γ is Λ-consistent and any set of formulae properlycontaining Γ is Λ-inconsistent.

Proposition 3.38 (Properties of MCS’s)

Let Λ be a logic and Γ a Λ-MCS. Then:1 Γ is closed under modus ponens.2 Λ ⊆ Γ.3 Γ is a complete theory.4 For all formulae φ, ψ: φ ∨ ψ ∈ Γ iff φ ∈ Γ or ψ ∈ Γ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 240

Page 241: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Proof.1 If not, it were not maximal.2 If not, it were not maximal.3 If not, it were not maximal.4 If not, it were not maximal.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 241

Page 242: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Theorem 3.39 (Lindenbaum’s Lemma)

If Γ is a Λ-consistent set of formulae then there is a Λ-MCS Γ+

such that Γ ⊆ Γ+.

Proof.We enumerate all formulae φ1, . . . , φi, . . . and define Σ0 = Σ,

Σn+1 :=

{Σn ∪ {Φn}, if this theory is Λ-consistent;Σn ∪ {¬Φn}, else.

and Σ+ :=⋃n≥0 Σn. Rest on Blackboard.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 242

Page 243: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Definition 3.40 (Canonical Model)

The canonical modelMΛ = (WΛ,RΛ, V Λ) for a modal logicΛ is defined as follows:

1 WΛ is the set of all Λ-MCS’s;2 RΛ ⊆ WΛ ×WΛ such that RΛww′ if ϕ ∈ w′ implies♦ ϕ ∈ w for all ϕ. RΛ is called canonical relation;

3 V Λ(p) := {w ∈ WΛ | p ∈ w}. V Λ is the canonicalrelation.

FΛ = (WΛ,RΛ) is the canonical frame of Λ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 243

Page 244: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Lemma 3.41For any normal logic Λ:

RΛww′ if, and only if �ϕ ∈ w implies ϕ ∈ w′ for all ϕ ∈ Λ.

Lemma 3.42 (Existence Lemma)

For any normal logic Λ and any state w ∈ WΛ, ♦ ϕ ∈ wimplies that there is a state w′ ∈ WΛ such that RΛww′ andϕ ∈ w′.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 244

Page 245: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Lemma 3.43 (Truth Lemma)

For any normal logic Λ and any formula ϕ,

MΛ, w |= ϕ iff ϕ ∈ w

Proof.By induction on the formula ϕ. Base cases and booleancombinations are trivial (see Proposition 3.38). We considerthe case ♦ ϕ. This is true inMΛ, w iff there is a v with RΛwvandMΛ, v |= ϕ iff there is a v with RΛwv and ϕ ∈ v(Induction Hypothesis) only if ♦ ϕ ∈ w.For right to left we apply Lemma 3.42.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 245

Page 246: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Theorem 3.44 (Canonical Model Theorem)

Any modal logic is strongly complete with respect to itscanonical model.

Proof.Let Σ be a consistent set of the logic Λ. Extend it to a MCSΣ+ (Theorem 3.39). But then (using Lemma 3.43)

MΛ,Σ+ |= Σ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 246

Page 247: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for Systems K, . . . , S5Theorem 3.44 does not seem to be too powerful: It onlyspeaks about one single model, whereas we want to provecompleteness with respect to a class of frames, not asingle model.

Lemma 3.45 (Strong Completeness wrt F)

Consider any subset S of {K,D, T,B, 4, 5} and let us denotethe corresponding normal modallogic by S. We also denote byFS the corresponding class of frames (see Lemma 3.2).Assume that for any S-consistent set of formulae Γ, thecanonical frame (W S,RS) is contained in FS.Then S is strongly complete wrt. the class of frames FS.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 247

Page 248: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Proof.According to Lemma 3.36, we have to find a model for Γ.We just take the canonical model M and any S-MCSextending Γ: Γ+. By Theorem 3.44, this model satisfiesΓ.

We now prove Theorem 3.29 by applying Lemma 3.45. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 248

Page 249: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

The previous proofs show that: the canonical frame ofeach normal logic containing axiom T is reflexive.And appropriate statements for all other axioms.Unfortunately, this does not work for axioms G or Grz.The canonical model of G is not well capped. Therelation in the canonical model of Grz is not a finitepartial order.But we can still use the canonical models: We just needto transform them!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 249

Page 250: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System GWe prove the following theorem, that is stronger thanTheorem 3.32

Theorem 3.46 (Completeness of G, 2. Version)

System G is sound and complete with respect to Kripke framesthat are finite, transitive, and well-capped: There is noinfinite sequence w0, w1, . . . such that w0Rw1, w1Rw2, . . ..

Note that a relation is called irreflexive, when there is no wwith wRw. The existence of such a w would immediatelyresult in an infinite sequence falsifying the well-cappedproperty.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 250

Page 251: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Lemma 3.47 (Finite Transitive Relations)Let R be a binary, transitive relation on a finite set. Then thefollowing are equivalent:R is irreflexive,R is well-capped.

Theorem 3.48 (Completeness of G, 3. Version)

System G is sound and complete with respect to Kripke framesthat are finite, transitive, and irreflexive.

Soundness follows trivially from Lemma 3.28 on Slide 224.

Are the two theorems also equivalent when we removefinite?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 251

Page 252: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System G: M1

We prove Corollary 3.48 through a series of lemmas andmodels Mi.We start with the canonical modelMG = (WG,RG, V G).Suppose that ϕ is not a theorem of G. Then there is a worldt s.t.MG, t 6|= ϕ.Ultimately, we have to find a model M3 which is finite,transitive and irreflexive.

M1: We define M1 = (W1,R1, V1) with:W1 := {t} ∪ {x : RGtx}, and R1, V1 are just therestrictions of RG, V G to W1.

Unfortunately, M1 is in general not finite.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 252

Page 253: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System G: M2

We are now making M1 finite, by identifying manyworlds. We define an equivalence relation on M1 as follows:w and x are equivalent iff for every subformula ϕ′ of ϕ:ϕ′ ∈ w iff ϕ′ ∈ x. We denote the equivalence class of w by w.We define M2 = (W2,R2, V2) with: W2 = {w : w ∈ W1},R2 = {〈w, x〉 : for every subformula � ψ of ϕ, if � ψ ∈ w then � ψ ∈ x and ψ ∈ x}

Finally, V2(w, p) = V1(w, p) if p is a subformula of ϕ, and letV2(w, p) = f otherwise.Clearly, M2 is transitive and finite. And if R1wx then R2wx.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 253

Page 254: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System G: M3

Lemma 3.49For all combinations ψ of subformulae from ϕ and eachw ∈ W1:

M1, w |= ψ iff M2, w |= ψ

Proof is by induction on φ.M3: The problem with M2 is that it is not irreflexive.

We will define a subrelation R3 that isirreflexive. Our model is then defined as

M3 = (W2,R3, V2).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 254

Page 255: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System G: M3

R3: In order to define R3, we need the following:

w ∼ x if{

if w ∼ x; orif R2wx and R2xw.

∼ is an equivalence relation because R2 istransitive.

LS: Given S ⊆ W such that for some w ∈ W1

S = {y : w ∼ y}, we fix a strict, linear orderingLS of S.

R3: R3 consists of all pairs 〈w, x〉 such thateither (1) w 6∼ x and R2w, x, or (2) w ∼ x andwLSx, where S = {y : w ∼ y}.

Properties: R3 is a subrelation of R2 because R2 istransitive. R3 is also transitive and irreflexive.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 255

Page 256: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Putting It All TogetherLemma 3.50For all combinations ψ of subformulae from ϕ and eachw ∈ W1:

M2, w |= ψ iff M3, w |= ψ

Proof is by induction on φ.

FiltrationsWhat we have done on the last few slides is a generalmethod that can be applied very often: the filtrationmethod. It requires the equivalence of models wrt.subformulae of a given formula. In the last section of thischapter, we’ll have a closer look at this method.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 256

Page 257: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Completeness for System S4Grz

Theorem 3.51 (Completeness of S4Grz)System S4Grz=KT4Grz is sound and complete with respect toKripke frames (W,R) where R is a finite partial order.

The proof of this theorem follows the proof ofTheorem 3.46. It is not trivial.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 257

Page 258: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

There is a strong relation between systems G and S4Grz. Wedefine a translation t from modal formulae to modalformulae as follows:

tp := pt¬φ := ¬ tφt(φ ∨ ψ) := tφ ∨ tψt� φ := � tφ ∧ tφ

Theorem 3.52 (Relation between S4Grz and G)`S4Grz φ iff `G

tφ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 258

Page 259: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

Example 3.53

We consider the axiom

L : � (� p→ p) → � p

and the system KL. Obviously, this defines a normal logic.This logic is easily shown to be sound with respect to theclass of all frames, where R is a transitive tree.It is also weakly complete wrt this class. However, there isno class of frames whatsoever, that this logic is stronglycomplete to.

Exercise: Show that KL is weakly complete wrt. the class ofall transitive trees. Sketch the most important steps usingthe canonical model.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 259

Page 260: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.3 Sound- and Completeness

A Few Final RemarksWhile we have defined many logics and appropriateclasses of frames, this is not always possible.There are axioms (and therefore logics) that are notcomplete wrt any set of frames.Canonical models is a powerful method, but it does notalways work.Most of our axioms (except Grz and G) are canonical.A formula is ϕ canonical wrt to a property P of a classof frames F, if (1) ϕ is valid in all frames satisfying P ,and (2) the canonical frame of any normal modal logiccontaining ϕ has property P .The problem “Is a formula ϕ canonical?” isundecidable.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 260

Page 261: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

3.4 Finite Models viaFiltration

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 261

Page 262: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Let Σ be a set of modal formulae and Λ be a modal logic.Consider the problem: Is Σ satisfiable in Λ?

We can not just enumerate all Kripke models, as thereare infinitely many of them (uncountably many: 2ℵ0).Suppose we know that “if it is satisfiable, then thereis a finite model”. Then the problem above isrecursively enumerable (just enumerate all finitemodels).If we know in addition an upper bound on the size ofthe finite model, we can come up with a decisionalgorithm: The problem is then recursive.If the logic Λ is given by a recursive set of axioms (as allour normal logics in this chapter), then the problem isrecursive (also called decidable) (why?).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 262

Page 263: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Definition 3.54 (Finite Model Property)Let M be a class of τ -models. We say that τ has the finitemodel property with respect to M if every τ -formula ϕsatisfiable in M is also satisfiable in a finite model in M.

Such a property is important for the decidability of thesatisfaction problem. But note, that in the above definitionwe talk about one single formula.

Is this property true for predicate logic? Or can youconstruct a formula that is only satisfiable in infiniteuniverses?

The following results are for the basic modal language; thatis, we consider only one accessibility relation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 263

Page 264: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Definition 3.55 (Subformula)Let ϕ ∈ LBML. Each formula ψ ∈ LBML which occurs in ϕ iscalled a subformula of ϕ.

Note that ϕ is a subformula of ϕ itself.

Definition 3.56 (Closure under Subformulae)Let Σ ⊆ LBML be a set of formulae. The closure of Σ undersubformulae, Sub(Σ), is defined as the set of allsubformulae of the formulae in Σ, i.e.

Sub(Σ) = {ψ | ∃ϕ ∈ Σ s.t. ψ is a subformula of ϕ}

If Σ = Sub(Σ) then we say that Σ is subformula closed.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 264

Page 265: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Definition 3.57 (Filtration Relation)LetM be a Kripke model and Σ ⊆ LBML a subformulaclosed set. The filtration relation overM and Σ is therelation !Σ,M ⊆ W ×W which is defined as follows:

w!Σ,M w′ iff ∀ϕ ∈ Σ (M, w |= ϕ iffM, w′ |= ϕ)

Exercise: Show that !Σ,M is an equivalence relation.

We use [x]Σ,M to denote the equivalence class of x wrt. to!Σ,M , i.e.

[x]Σ,M := {y ∈ WM | x!Σ,M y}We omit Σ andM if they are clear from context.We identify worlds in which the same formulae wrt. Σhold.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 265

Page 266: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Definition 3.58 (Filtration)LetM be a Kripke model and Σ ⊆ LBML subformula closed.A filtration ofM through Σ, iMf

Σ,M = (W f ,Rf , V f ), is amodel which satisfies:

1 W f := {[w]Σ,M | w ∈ WM},2 RMww′ implies Rf [w]Σ,M[w′]Σ,M,3 Rf [w]Σ,M[w′]Σ,M implies that for all ♦ ϕ ∈ Σ it holds thatM, w′ |= ϕ impliesM, w |= ♦ ϕ, and

4 V f (p) := {[w]Σ,M | M, w |= ϕ} for every p ∈ Σ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 266

Page 267: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

A filtration has only worlds which differ concerningthe truth of formulae in Σ.Note that the accessibility relation is not unique, weonly require 2) and 3).Conditions 2) and 3) are needed to proveTheorem 3.60.Note that condition 3) is very similar to the appropriatecondition in the canonical model (Definition 3.40).However, we do not know yet whether filtrations existat all.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 267

Page 268: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Proposition 3.59 (Filtrations Are Finite)LetM be a Kripke model and Σ ⊆ LBML be a finitesubformula closed set. For any filtrationMf

Σ,M overMthrough Σ, the number of worlds inMf

Σ,M is bounded by2|Σ|, i.e. |WMf

Σ,M| ≤ 2|Σ|.

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 268

Page 269: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

The filtration model was constructed in such a way, that thesame formulae hold.

Theorem 3.60 (Filtration Theorem)

LetM be a Kripke model, Σ ⊆ LBML be a subformula closedset, andMf

Σ,M a filtration ofM. Then, it holds that

M, w |= ϕ iff MfΣ,M, [w] |= ϕ

for all ϕ ∈ Σ and w ∈ WM.

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 269

Page 270: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Given a model there are various filtrations of this model.This is, because the relation Rf can be defined in manyways. We present two of them:

1 The second item in the definition of a filtration leads tothe following, weakest possible condition:

Rs[w][v] iff ∃w′ ∈ [w]∃v′ ∈ [v] (Rw′v′)

2 The third item in the definition of a filtration leads to thefollowing, strongest possible condition:

Rl[w][v] iff ∀♦ ϕ ∈ Σ (M, v |= ϕ⇒M, w |= ♦ ϕ)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 270

Page 271: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Lemma 3.61LetM be a Kripke model and Σ ⊆ LBML be a subformulaclosed set. Then, both (WΣ,M,Rs, V f ) and (WΣ,M,Rl, V f ) arefiltrations ofM through Σ. Moreover:

Rs ⊆ Rf ⊆ Rl

for any filtrationMfM,Σ ofM through Σ.

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 271

Page 272: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

Theorem 3.62 (Finite Model Property)Let ϕ ∈ LBML. If ϕ is satisfiable on some Kripke model, then itis also satisfiable on a finite Kripke model which has at most2m worlds where m = |Sub({ϕ})|.

Proof. Blackboard

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 272

Page 273: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

3 Basic Modal Logics3.4 Finite Models via Filtration

One important question remains: Which properties doesthe relation Rf inherit from R?For example, if R is transitive, is Rf transitive as well?

Proposition 3.63LetM be a Kripke model and Σ ⊆ LBML be a subformulaclosed set. Let Rt be defined as follows:

Rt[w][v]iff

∀ϕ ∈ LBML ((♦ ϕ ∈ Σ andM, v |= ϕ ∨ ♦ ϕ)⇒M, w |= ♦ ϕ)

Then, (WΣ,M,Rt, V f ) is a filtration ofM through Σ and Rt istransitive if R was transitive.

However, there is no general method to ensure propertiesof Rf .

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 273

Page 274: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications

4. Applications4 Applications

Epistemic LanguagePublic Announcement LanguageMSPASS

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 274

Page 275: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications

Content of this ChapterIn this chapter we come back to the muddy children puzzlefrom the first chapter. Epistemic logic is a multi modallogic allowing to talk about knowledge within thelanguage. We define a logic of common knowledge S5C.We also introduce a public announcement language andconsider some of its properties. We end this chapter with anoverview of MSPASS, a modal logic theorem prover.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 275

Page 276: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

4.1 Epistemic Language

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 276

Page 277: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Epistemic Logic allows us to reason about knowledge.It is a concrete instance of the modal language. But insteadof [i] we write Ki.

Then, for every agent i, Kiϕ is interpreted as “agent i knows(that) ϕ”.

Example 4.1p ∧ ¬Kap: “p is true but agent a does not know it.”¬KbKcp ∧ ¬Kb¬Kcp: “Agent b does not know wether agentc knows p.”

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 277

Page 278: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Example: Alternating Bit Protocol

Example 4.2We have two agents:

Agent a reads a tape X = 〈x0, x1, . . .〉 and sends all theinputs to agent b, andAgent b writes down everything it receives on an outputtape Y .

The communication is not trustworthy, i.e, there is noguarantee that all messages arrive.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 278

Page 279: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Possible properties:Fairness: If you repeat sending a certain message long

enough, it will eventually arrive,Safety: At any moment, Y is a prefix of X, i.e. b will

only write a correct initial part of X into Y .Liveness: Every xi will eventually be written as yi on Y .

Assume that fairness holds. Can we write a protocol (orprogram) that satisfies the two constraints, safety andliveness?

Safety can be easily achieved by allowing b to never writeanything. But then, the liveness property enforces thatevery bit of X should eventually appear in Y .

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 279

Page 280: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Protocol for a Protocol for b

i := 0while true do

read xirepeat

send xiuntil KaKb(xi)repeat

send KaKb(xi)until KaKbKaKb(xi)i := i+ 1

end while

if Kb(x0) theni := 0while true do

write xirepeat

send Kb(xi)until KbKaKb(xi)repeat

send KbKaKb(xi)until Kb(xi + 1)i := i+ 1

end whileend if

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 280

Page 281: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Example 4.3 (Byzantine Generals)Imagine two allied generals, a and b, standing on twomountains, with their enemy in the valley between them. Itis generally known that a and b together can defeat theenemy, but if only one of them attacks, he will lose thebattle.

General a sends a messenger to b with the message mabout the exact time when the battle starts.However, it is not guaranteed that the messenger willarrive.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 281

Page 282: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Suppose, the messenger does reach the other side:Kbm and KaKbm

Will it be a good idea to attack? No.Because a wants to know for certain that b will attack aswell.Therefore b sends a messenger with an okay-messagem′:KaKbKam

Will it be a good idea to attack? No.Because b does not know whether his m′ arrived.We can do this forever,. . . common knowledge will never be established!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 282

Page 283: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Common Knowledge

Common knowledge of p in a group of agents B meansthat:When all the agents in B know p, they all know that theyknow p, they all know that they all know that they know p,. . . ad infinitum.

Till now, we have no way to express common knowledgein our language, e.g. we cannot define a well formedformula that describes that for all n ∈ N should hold(KaKb)

n where (KaKb)n = KaKb(KaKb)

n−1.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 283

Page 284: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Group Notions of KnowledgeWhat about knowledge of groups? For this, we present thecommon knowledge operator:

Definition 4.4 (Common Knowledge LCL)

Let Prop be a set of propositions and Ag a finite set of(names for) agents. The basic epistemic language withcommon knowledge LCL(Prop,Ag) consists of all formulaedefined by the following grammar:

ϕ ::= p | ¬ϕ | ϕ ∨ ϕ | CBϕ

where p ∈ Prop and B ⊆ Ag .

CB: “Agents in B have common knowledge that ϕ”

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 284

Page 285: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Definition 4.5 (Macros)

We define the following syntactic constructs as macros(p ∈ Prop, i ∈ Ag):

⊥ := p ∧ ¬p

> := ¬⊥ϕ ∧ ψ := ¬(¬ϕ ∨ ¬ψ)

ϕ→ ψ := ¬ϕ ∨ ψϕ↔ ψ := (ϕ→ ψ) ∧ (ψ → ϕ)

Kiϕ := C{i}ϕ

Kiϕ := ¬Ki¬ϕ

Note: The Ki operator is defined by the C{i} operator.Ki: “Agent i considers it possible that ϕ”.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 285

Page 286: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Definition 4.6 (Macros for Groups of Agents)For any group B ⊆ Ag of agents Ag we define:

EBϕ :=∧b∈B

Kbϕ

EBϕ := ¬EB¬ϕ :=∨b∈B

Kbϕ

EB: “Everybody in B knows ϕ”EB: “At least one individual in B considers ϕ a possibility”

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 286

Page 287: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Example 4.7 (Albert in Berlin)Albert is one of a group B of visitors at a conference inBerlin, where at a certain point during the talks he becomesbored and decides to go shopping. Meanwhile, animportant announcement ϕ is made at the conference.

CBϕ does not hold.EBϕ does not hold.

But because Albert is such an important guy, the organizersdecided to send him an email about the newannouncement.

EBϕ does hold.CBϕ does not hold.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 287

Page 288: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

SemanticsThe semantics for our modal language LCL can be obtainedwithout adding additional features to our epistemic models.We only have to define the semantics of the commonknowledge operator. For this we need the transitiveclosure: see also Slide 195 .

Definition 4.8 ((Reflexive) Transitive Closure)Let S be a set and Rb (b ∈ B) be a set of relations on it. Thetransitive closure of a relation R is the smallest relation R+

such that:1 R ⊆ R+,2 R+ is transitive.

If we require in addition, that for all x, R+xx holds, weobtain the reflexive transitive closure, denoted by R∗.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 288

Page 289: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Remark 4.91 If R is reflexive, then R+ = R∗.2 R+xy iff either x = y and Rxy or else for some n > 1

there is a sequence x1, x2, . . . , xn such that x1 = x, xn = yand for all i < n, Rxixi+1.

Example 4.10R = {(a, b), (b, c)}R+ = {(a, b), (b, c), (a, c)}R∗ = {(a, b), (b, c), (a, c), (a, a), (b, b), (c, c)}

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 289

Page 290: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Note: For the epistemic logic we only have equivalencerelations ∼i, i.e. Ri is transitive, reflexive and symmetric.

Also, we write:∼i instead of Ri,∼+i instead of Ri

+,∼∗i instead of Ri

∗, and∼∗EB instead of REB

∗.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 290

Page 291: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Definition 4.11 (SemanticsM, w |= CBϕ)LetM = (W, {∼i | i ∈ Ag}, V ) be a Kripke model, w ∈ WM,and ϕ ∈ LCL. ϕ is said to be true or satisfied inM andworld w, written asM, w |= ϕ, if the semantics of LML isextended by the following clause:M, w |= CBϕ iff for all worlds w′ ∈ W with ∼∗EBww

′ suchthatM, w′ |= ϕ,

where ∼EB =⋃b∈B ∼b.

Remark 4.12 (SemanticsM, w |= EBϕ)The semantics for the EB operator can be defined as follows:M, w |= EBϕ iff for all worlds w′ ∈ W with ∼EBww′ such thatM, w′ |= ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 291

Page 292: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Example 4.13 (Consecutive Numbers)Assume two agents a and b. They see a number on eachother’s head, and those numbers are consecutivenumbers n and n+ 1 for a certain n ∈ N. They bothknow this, and they know that they know it, etc.an and bm with n,m ∈ N means that the number on thehead of a is n, on the head of b is m.Suppose a3 and b2 are true.It is common knowledge that the numbers areconsecutive.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 292

Page 293: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Let for all w = 〈i, j〉 with i, j ∈ N be V (ai) = {〈i, j〉} andV (bj) = {〈i, j〉}.

〈1, 2〉 〈3, 2〉 〈3, 4〉 〈5, 4〉 〈5, 6〉

〈2, 1〉 〈2, 3〉 〈4, 3〉 〈4, 5〉 〈6, 5〉

a b a b a

b a b a b

M, 〈3, 2〉 |= ¬b4 ∧ E{a,b}b4

M, 〈3, 2〉 |= E{a,b}¬a5 ∧ ¬E{a,b}E{a,b}¬a5

M, 〈3, 2〉 |= E{a,b}E{a,b}¬b6 ∧ ¬E{a,b}E{a,b}E{a,b}¬b6

M |= (a3 ∧ b2 → (¬C{a,b}¬a123 ∧ C{a,b}¬b123)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 293

Page 294: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Recall the basic modal system S5:

Modal System S5K: Ka(ϕ→ ψ)→ (Kaϕ→ Kaψ)

(distribution of Ka over→)T: Kaϕ→ ϕ (truth)4: Kaϕ→ KaKaϕ (positive introspection)5: ¬Kaϕ→ Ka¬Kaϕ (negative introspection)

MP: ϕ,ϕ→ψψ

(modus ponens)NEC: ϕ

Kaϕ(necessitation of Ka)

Remember Corollary 3.30: System S5 is sound andcomplete with respect to Kripke frames (W,R) where R isan equivalence relation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 294

Page 295: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Definition 4.14 (Modal System S5C)The basic modal system S5C is defined by the followingaxioms and the inference rules together with S5:

C1: CB(ϕ→ ψ)→ (CBϕ→ CBψ)(distribution of CB over→)

C2: CBϕ→ (ϕ ∧ EBCBϕ) (mix)C3: CB(ϕ→ EBϕ)→ (ϕ→ CBϕ) (induction of

common knowledge)C4: ϕ

CBϕ(necessitation of CB)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 295

Page 296: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Theorem 4.15 ( Soundness and Completeness)System S5C is sound and complete with respect to Kripkeframes (W, R) where R is an equivalence relation.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 296

Page 297: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.1 Epistemic Language

Other Important Modal Logics?

knowledge→ epistemic logic,beliefs→ doxastic logic,obligations→ deontic logic,actions→ dynamic logic,time→ temporal logic,and combinations of the above:most famous multimodal logics:BDI logics of beliefs, desires, intentions (and time).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 297

Page 298: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

4.2 Public AnnouncementLanguage

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 298

Page 299: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Introduction

Example 4.16 (Buy or Sell)Consider two stockbrokers a and b sitting together. a gets amessage, which informs her of the fact that the companylehman brothers is doing well, such that she intends to buy aportfolio of stocks of that company, immediately.

a now says to b: “Guess you don’t know it yet, but lehmanbrothers is doing well.”

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 299

Page 300: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Even if we assume that a only speaks the truth, and that herassumption about b is correct, a is in fact saying two things:

“It is true that lehman brothers is doing well”“It is true that b does not know that lehman brothersis doing well”

b now knows that lehman brothers is doing well. He istherefore no longer ignorant of that fact.

“b does not know that lehman brothers is doing well”is now false.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 300

Page 301: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

In other words: a has announced something whichbecomes false because of the announcement. This iscalled an unsuccessful update.Announcements refer to a specific moment in time, to aspecific information state that may change because ofthe announcement that makes an obversation about it.

p := “lehman brothers is doing well”0 := is the name of the state where p is false1 := is the name of the state where p is true

0 1b

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 301

Page 302: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

We assume that a only makes truthful, publicannouncements:

Truthful: The formula of the announcement must betrue in the actual state while the statementis made.

Public: b can hear what a is saying, that a knowsthat b can hear her, etc., . . .. It is commonknowledge that a is making theannouncement.

From truthful and public it follows that states wherethe announcement formula is false are excluded.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 302

Page 303: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

1 ¬Kbp

2 Announcement: p ∧ ¬Kbp

3 C{a,b}p

4 Kbp

1

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 303

Page 304: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Example 4.17 (Three Player Card Game)a, b and c have each drawn one card from a stack of threecards {0, 1, 2}. This is commonly known. V (ai) = {〈ijk〉},V (bj) = {〈ijk〉}, V (ck) = {〈ijk〉} where ai expresses that aholds the card i etc. Assume the actual world w = 〈012〉.

〈012〉 〈021〉〈102〉 〈120〉

〈201〉 〈210〉

a

a

a

b

b

bc

c

c

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 304

Page 305: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

〈012〉 〈021〉〈102〉 〈120〉

〈201〉 〈210〉

a

a

a

b

b

bc

c

c

M, 〈012〉 |= Ka¬(Kba0 ∨Kba1 ∨Kba2) a knows that b doesnot know her card.

M, 〈012〉 |= b1 ∧ Kab2 a considers it possible that b holdscard 2 although b1 is true.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 305

Page 306: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

〈012〉 〈021〉

〈201〉 〈210〉

a

a

bc

1. Announcement of a “I do not have card 1”: ¬a1.M, 〈012〉 |= Kca0 ∧ ¬KaKca0 ∧ ¬(Kba0 ∨Kba1 ∨Kba2)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 306

Page 307: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

〈012〉

〈210〉

b

2. Announcement of b “I do not know the card of a”:¬(Kba0 ∨Kba1 ∨Kba2)

M, 〈012〉 |= ¬(Kba0 ∨Kba1 ∨Kba2)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 307

Page 308: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

〈012〉

3. Announcement of a “the card deal is 012”: a0 ∧ b1 ∧ c2

M |= a0 ∧ b1 ∧ c2

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 308

Page 309: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Muddy Children Revisited

We now take a look at the Muddy children problem and tryto formalise it.

We consider the case where two kids are muddy.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 309

Page 310: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

cc

c

cc

c

mc

c

mc

c1

2

mm

m

mm

m1

2

cm

m

cm

m

cc

m

cc

m

mc

m1

2

3

33

m1 ∈ π(w) iff w = 〈mxx〉m2 ∈ π(w) iff w = 〈xmx〉m3 ∈ π(w) iff w = 〈xxm〉

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 310

Page 311: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

cc

c

cc

c

mc

c

mc

c1

2

mm

m

mm

m1

2

cm

m

cm

m

cc

m

cc

m

mc

m1

2

3

33

m1 ∈ π(w) iff w = 〈mxx〉m2 ∈ π(w) iff w = 〈xmx〉m3 ∈ π(w) iff w = 〈xxm〉

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 311

Page 312: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

mm

c

mm

c

M, 〈mmc〉 |= m1 ∧m2 ∧ ¬m3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 312

Page 313: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

mc

c

mc

c

mm

m

mm

m

M, 〈mmc〉 |= m1 ∧m2 ∧ ¬m3

M, 〈mmc〉 |= ¬K1m1 ∧K1m2

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 313

Page 314: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

cc

c

cc

c

mc

c

mc

c1

2

mm

m

mm

m1

2cm

m

cm

m

mc

m

3

3

M, 〈mmc〉 |= m1 ∧m2 ∧ ¬m3

M, 〈mmc〉 |= ¬K1m1 ∧K1m2

M, 〈mmc〉 |= K1K3m2 ∧K1¬K2m2

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 314

Page 315: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

cc

c

cc

c

mc

c

mc

c1

2

mm

m

mm

m1

2cm

m

cm

m

cc

m

cc

m

mc

m1

2

3

33

M, 〈mmc〉 |= m1 ∧m2 ∧ ¬m3

M, 〈mmc〉 |= ¬K1m1 ∧K1m2

M, 〈mmc〉 |= K1K3m2 ∧K1¬K2m2

. . .

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 315

Page 316: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

mc

c

mc

c1

2

mm

m

mm

m1

2

cm

m

cm

m

cc

m

cc

m

mc

m1

2

3

33

Father: “At least one is muddy”¬K1m1 ∧ ¬K2m2 ∧ ¬K3m3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 316

Page 317: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

cm

c

cm

c

mc

c

mc

c

mm

m

mm

m1

2

cm

m

cm

m

cc

m

cc

m

mc

m1

2

3

3

Father: “If you know that you’remuddy, raise your hand”

Nothing happens

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 317

Page 318: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

1

2

mm

c

mm

c

mm

m

mm

m1

2

cm

m

cm

m

mc

m1

2

3

3

Father: “If you know that you’remuddy, raise your hand”

Nothing happensK1m1 ∧K2m2 ∧ ¬K3m3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 318

Page 319: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

mm

c

mm

c

mm

m

mm

m1

2

cm

m

cm

m

mc

m

Father: “If you know that you’remuddy, raise your hand”

Nothing happensK1m1 ∧K2m2 ∧ ¬K3m3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 319

Page 320: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

3

mm

c

mm

c

mm

m

mm

m1

2

cm

m

cm

m

mc

m

Father: “If you know that you’remuddy, raise your hand”

1 and 2 raise their hands!K3m3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 320

Page 321: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Syntax

Definition 4.18 (Public Announcements LCPAL)Let Prop be a set of propositions and Ag a finite set of(names for) agents. The epistemic language with publicannouncements and common knowledgeLCPAL(Prop,Ag) consists of all formulae defined by thefollowing grammar:

ϕ ::= p | ¬ϕ | ϕ ∨ ϕ | CBϕ | [ϕ]ϕ

where p ∈ Prop and B ⊆ Ag .

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 321

Page 322: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Example 4.19 (Buy and Sell)Announcement of p ∧ ¬Kbp := 〈p ∧ ¬Kbp〉¬(p ∧ ¬Kbp)

The ♦ operator is used to express that an unsuccessfulupdate can indeed be truthfully announced.

The � operator would enforce that p ∧ ¬Kbp is true after theannouncement.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 322

Page 323: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Example 4.20 (Three Player Card Game)

〈012〉 〈021〉〈102〉 〈120〉

〈201〉 〈210〉

a

a

a

b

b

bc

c

c

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 323

Page 324: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

1. Announcement of a “I do not have card 1”.2. Announcement of b “I do not know the card of a”.

3a. Announcement of a “the card deal is 012”.3b. Alternative announcement of a “I now know b’s card”:

Kab0 ∨Kab1 ∨Kab2

b knows a’s card:[¬a1][¬(Kba0 ∨Kba1 ∨Kba2)][a0 ∧ b1 ∧ c2](Kba0∨Kba1∨Kba2)

b does not know a’s card:[¬a1][¬(Kab0 ∨Kab1 ∨Kab2)][Kab0 ∨Kab1 ∨Kab2]¬(Kba0 ∨Kba1 ∨Kba2)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 324

Page 325: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

SemanticsDefinition 4.21 (SemanticsM, w |= [ψ]ϕ)LetM = (W, {∼i | i ∈ Ag}, V ) be a Kripke model, w ∈ WM,and ϕ ∈ LCPAL. ϕ is said to be true or satisfied inM andworld w, written asM, w |= ϕ, if the semantics of LCL isextended by the following clause:M, w |= [ψ]ϕ iffM, w |= ψ impliesM|ψ,w |= ϕ

whereM|ψ = (W ′, {∼′i | i ∈ Ag}, V ′) :

[[ψ]]M := {w ∈ W | M, w |= ψ}W ′ := [[ψ]]M

∼′i := ∼i ∩ ([[ψ]]M × [[ψ]]M)

V ′ := V ∩ [[ψ]]M

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 325

Page 326: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Remark 4.22The semantics for the dual is defined as follows:M, w |= 〈ψ〉ϕ iff M, w |= ψ andM|ψ,w |= ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 326

Page 327: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Example 4.23 (Three Player Card Game)

〈012〉 〈021〉〈102〉 〈120〉

〈201〉 〈210〉

a

a

a

b

b

bc

c

c

1. Announcement of a “I do not have card 1”M, 〈012〉 |= [¬a1]Kca0

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 327

Page 328: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof.M, 〈012〉 |= [¬a1]Kca0 iff (M, 〈012〉 |= ¬a1 impliesM|¬a1, 〈012〉 |= Kca0)

Consider the former. M, 〈012〉 |= ¬a1 iffM, 〈012〉 6|= a1.Due to 〈012〉 6∈ V (a1) = {〈102〉, 〈120〉} this is true.Consider the latter. M|¬a1, 〈012〉 |= Kca0 is equivalentto∀w ∈ WM|¬a1: 〈012〉∼cw impliesM|¬a1, w |= a0. Becauseof the fact that only 〈012〉 is c-accessible from 〈012〉 and〈012〉 ∈ V (a0) = {〈012〉, 〈021〉} the condition is fulfilled.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 328

Page 329: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Properties of Public AnnouncementsAnnouncements are partial functions, i.e. if anannouncement can be executed, there is only one way todo it. Also, it cannot always be executed.

Proposition 4.24 (Functional)In all Kripke frames, the following holds:

〈ϕ〉ψ → [ϕ]ψ

Proof.LetM and w be arbitrary. ThenM, w |= 〈ϕ〉ψ holds iff(M, w |= ϕ andM|ϕ,w |= ψ). The last implies (M, w |= ϕimpliesM|ϕ,w |= ψ). That is by definitionM, w |= [ϕ]ψ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 329

Page 330: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Truthful public announcements can only be made if theyare indeed true:

Proposition 4.25 (Partial)The schema 〈ψ〉> is not valid.

Proof.Consider a world w where ψ is false. Due toM, w |= 〈ψ〉> iffM, w |= ψ andM|ψ,w |= >andM, w 6|= ψ, 〈ψ〉> is false as well.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 330

Page 331: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proposition 4.26 (Negation)In all Kripke frames: [ψ]¬ϕ↔ (ψ → ¬[ψ]ϕ) holds.

[ψ]¬ϕ can be true for two reasons:1 the formula ψ cannot be announced.2 After the announcement of ψ, the formula ϕ is false.

Proof.Exercise. Note: ¬[ψ]ϕ := 〈ψ〉¬ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 331

Page 332: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proposition 4.27All of the following are equivalent in all Kripke frames:

ψ → [ψ]ϕ

ψ → 〈ψ〉ϕ[ψ]ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 332

Page 333: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof ψ → [ψ]ϕ⇔ [ψ]ϕ.

M, w |= ψ → [ψ]ϕ

⇔ M, w |= ψ impliesM, w |= [ψ]ϕ

⇔ M, w |= ψ implies (M, w |= ψ impliesM|ψ,w |= ϕ)

⇔ (M, w |= ψ andM, w |= ψ) impliesM|ψ,w |= ϕ

⇔ M, w |= ψ impliesM|ψ,w |= ϕ

⇔ M, w |= [ψ]ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 333

Page 334: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proposition 4.28All of the following are equivalent in all Kripke frames:〈ψ〉ϕψ ∧ 〈ψ〉ϕψ ∧ [ψ]ϕ

Proof.Exercise.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 334

Page 335: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Reducing the number of announcements in a formula:

Proposition 4.29 (Composition)[ψ ∧ [ψ]ϕ]χ is equivalent to [ψ][ϕ]χ

Proof.For arbitraryM and w:

w ∈M|(ψ ∧ [ψ]ϕ)

⇔ M, w |= ψ ∧ [ψ]ϕ

⇔ M, w |= ψ and (M, w |= ψ impliesM|ψ,w |= ϕ)

⇔ w ∈M|ψ andM|ψ,w |= ϕ

⇔ w ∈ (M|ψ)|ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 335

Page 336: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

But how does the knowledge change after anannouncement? Firstly, we analyse individual knowledge.

Proposition 4.30 ([ψ]Kaϕ 6⇔ Ka[ψ]ϕ)[ψ]Kaϕ is not equivalent to Ka[ψ]ϕ.

Proof.Counterexample. Consider the Three Player CardGame-Example:

M, 〈012〉 |= [a1]Kca0

(because the announcement cannot take place in 〈012〉)but

M, 〈012〉 6|= Kc[a1]a0

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 336

Page 337: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proposition 4.31 ([ψ]Kaϕ⇔ ψ → Ka[ψ]ϕ)[ψ]Kaϕ is equivalent to ψ → Ka[ψ]ϕ.

Proof.For arbitraryM and w:

M, w |= ψ → Ka[ψ]ϕ

⇔ M, w |= ψ impliesM, w |= Ka[ψ]ϕ

⇔ M, w |= ψ implies(∀w′ ∈M : ∼aww′ impliesM, w′ |= [ψ]ϕ)

⇔ M, w |= ψ implies (∀w′ ∈M : ∼aww′

implies (M, w′ |= ψ impliesM|ψ,w′ |= ϕ))

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 337

Page 338: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof. (Cont.)

⇔ M, w |= ψ implies (∀w′ ∈M :M, w′ |= ψ and∼aww′ impliesM|ψ,w′ |= ϕ)

⇔ M, w |= ψ implies (∀w′ ∈M|ψ,∼aww′ impliesM|ψ,w′ |= ϕ)

⇔ M, w |= ψ impliesM|ψ,w |= Kaϕ)

⇔ M, w |= [ψ]Kaϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 338

Page 339: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proposition 4.32 (Rewrite System)

[ψ]p ↔ (ψ → p)

[ψ](χ ∨ ϕ) ↔ ([ψ]χ ∨ [ψ]ϕ)

[ψ](χ→ ϕ) ↔ ([ψ]χ→ [ψ]ϕ)

[ψ]¬ϕ ↔ (ψ → ¬[ψ]ϕ)

[ψ]Kaϕ ↔ (ϕ→ Ka[ψ]ϕ)

[ψ][ϕ]χ ↔ [ψ ∧ [ψ]ϕ]χ

These validities provide us with “rewrite rules” that allowsus to eliminate announcements if we only use individualknowledge (i.e. the operator Ki).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 339

Page 340: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

PA and Common Knowledge

As we have already seen the relation between commonknowledge and public announcement cannot beexpressed in an equivalence, because announcement of ψdoes not make it common knowledge.

Proposition 4.33 ([ψ]CAϕ 6⇔ ψ → CA[ψ]ϕ)[ψ]CAϕ is not equivalent to ψ → CA[ψ]ϕ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 340

Page 341: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof.Counterexample. Consider a modelM withW = {〈00〉, 〈01〉, 〈10〉, 〈11〉}, V (p) = {〈10〉, 〈11〉} andV (q) = {〈01〉, 〈11〉} together with the following instance:

[p]C{a,b}q↔ (p→ C{a,b}[p]q).

〈11〉 〈01〉 〈10〉a b

We show that the left side of this equivalence is true and theright side is false in state 〈11〉.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 341

Page 342: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof. (Cont.)

〈11〉M 〈01〉 〈10〉

〈11〉M|p 〈10〉

a b

M, 〈11〉 |= [p]C{a,b}q becauseM|p, 〈11〉 |= C{a,b}q

M, 〈11〉 6|= p→ C{a,b}[p]q althoughM, 〈11〉 |= p butM, 〈11〉 6|= C{a,b}q because 〈11〉∼{a,b}〈10〉 andM, 〈10〉 6|= [p]q:When evaluating q inM|p we are in its otherdisconnected part, where q is false: M|p, 〈10〉 6|= q

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 342

Page 343: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Fortunately there is a way to get common knowledge afteran announcement:

Proposition 4.34 (PA and CK)

if χ→ [ϕ]ψ and (χ ∧ ϕ)→ EBχ are valid, then χ→ [ϕ]CBψ isvalid.

Proof.LetM and w be arbitrary and suppose thatM, w |= χ. Wehave to proof thatM, w |= [ϕ]CBψ.Therefore, supposeM, w |= ϕ and let be w′ ∈ WM|ϕ suchthat ∼Bww′, i.e. we have a path of arbitrary finite lengthfrom w to w′ for agents in B.We now have to prove thatM|ϕ,w′ |= ψ. We prove this byinduction on the length of the path.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 343

Page 344: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Proof. (Cont.)Path = 0: Then w = w′, andM|ϕ,w |= ψ follows from the

assumptionM, w |= χ and the validity ofχ→ [ϕ]ψ.

Path = n+ 1 for n ∈ N: Suppose the path is n+ 1 withw∼aw′′∼Bw′ for a ∈ B and w′′ ∈M|ϕ.FromM, w |= χ andM, w |= ϕ, from the validityof (χ ∧ ϕ)→ EBχ , and from ∼aww′′ (becausew′′ ∈ WM|ϕ and therefore w′′ ∈ WM) it followsthatM, w′′ |= χ. Because of w′′ ∈M|ϕ we haveM, w′′ |= ϕ.We now apply the induction hypothesis on thelength n path such that ∼Bw′′w′. ThereforeM|ϕ,w′ |= ψ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 344

Page 345: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Corollary 4.35[ϕ]ψ is valid iff [ϕ]CBψ is valid.

Proof.From right to left is obvious. From left to right follows whentaking χ = > in Proposition 4.34.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 345

Page 346: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Unsuccessful Updates

Formulae that always become common knowledge afterbeing announced, will be called successful.

After announcement of ϕ, ϕ sometimes remains true andsometimes becomes false. This depends on the formula andon the epistemic state.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 346

Page 347: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Consider the Buy and Sell-Example:

Example 4.36 (Buy and Sell)LetM be the model, W = {0, 1}, V (p) = {1},∼a = {(0, 0), (1, 1)} and ∼b = {(0, 0), (0, 1), (1, 0), (1, 1)}.

Kap: “I know that Lehman Brothers is doing well”.After this announcement it remains true thatKap.

M, 1 |= [Kap]Kap

M, 1 |= Kap→ [Kap]C{a,b}Kap

|= Kap→ [Kap]C{a,b}Kap

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 347

Page 348: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Ka(p ∧ ¬Kbp): “You don’t know that Lehman Brothers isdoing well”. After this announcement it is nolonger true that Ka(p ∧ ¬Kbp).

M, 1 |= [Ka(p ∧ ¬Kbp)]¬Ka(p ∧ ¬Kbp)

6|= [Ka(p ∧ ¬Kbp)]C{a,b}Ka(p ∧ ¬Kbp)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 348

Page 349: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Definition 4.37 (Successful and Unsuccessful)Given a formula ϕ ∈ LCPAL, a epistemic model M and aworld w ∈ WM.

ϕ is a successful formula iff [ϕ]ϕ is valid.ϕ is an unsuccessful formula iff it is not successful.ϕ is a successful update inM and w iffM, w |= 〈ϕ〉ϕ.ϕ is an unsuccessful update inM andw iffM, w |= 〈ϕ〉¬ϕ.

Updates with true successful formulae are always (in allworlds) successful, but sometimes (in some worlds)updates with unsuccessful formulae are successful.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 349

Page 350: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Example 4.38Formula p ∧ ¬Kap is unsuccessful, but both p and ¬Kap aresuccessful.

Proof.Exercise.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 350

Page 351: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Public Announcement LogicThe axiomatization for public announcement logic withcommon knowledge is a combination of System S5C andthe following rules:

Definition 4.39 (System CPAL)

[ϕ]p↔ (ϕ→ p) Atomic Permanence[ϕ]¬ψ ↔ (ϕ→ ¬[ϕ]ψ) PA and Negation

[ϕ](ψ ∧ χ)↔ ([ϕ]ψ ∧ [ϕ]χ) PA and Conjunction[ϕ][ψ]χ↔ ([ϕ ∧ [ϕ]ψ]χ) PA Composition

ϕ[ψ]ϕ

Necessitation of [ψ]

χ→[ϕ]ψ and χ∧ϕ→EBχχ→[ϕ]CBψ

PA and common knowledge

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 351

Page 352: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.2 Public Announcement Language

Theorem 4.40 ( Soundness and Completeness)System CPAL is sound and complete with respect to Kripkeframes (W, R) where R is an equivalence relation.

Proof Soundness.For soundness we have to show that the PA and commonknowledge-rule is validity preserving. This is alreadyproven, cf. Proposition 4.34.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 352

Page 353: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.3 MSPASS

4.3 MSPASS

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 353

Page 354: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.3 MSPASS

Remember SPASS?

SPASS is a fully automated theorem prover for numerouslogics. MSPASS is an extension of it. It is a prover fornumerous description logics, modal logics and therelational calculus.

Nowadays it is incorporated into SPASS.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 354

Page 355: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.3 MSPASS

Propositional Dynamic Logic in SPASSExample 4.41 (Vacuum Cleaner)

1 2

3 4

5 6

7 8

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 355

Page 356: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.3 MSPASS

Formalized:Rr - moveRight, Rl - moveLeft, Rs - suck, Rc - charge,br1 - believes that in room1, br2 - in room2, bb -battery charged,bc1 - believes room1 clean, bc2 - room2 clean,gc1 - goal to clean room1, gc2 - clean room2.

Task:We want to prove a formula which says that if the vacuumcleaner agent starts in room 1 with charged battery and itsgoal is to clean room 1 and room 2, then it will achive itsgoals:

gc1 ∧ gc2 ∧ br1 ∧ bb→ [vac][vac][vac](bc1 ∧ bc2)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 356

Page 357: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

4 Applications4.3 MSPASS

vac is the vacuum cleaner’s program:

(gc1?; bb?; (br1?; s) ∪ ((¬br1)?; l; s)) ∪(gc2?; bb?; (br2?; s) ∪ ((¬br2)?; r; s)) ∪

((¬bb)?; (br2?; c) ∪ ((¬br2)?; r; c)))

The complete source code can be found at http://www.cs.man.ac.uk/~schmidt/mspass/pdl_vacuum2.dfg

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 357

Page 358: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics

5. Advanced Topics5 Advanced Topics

Invariance Results

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 358

Page 359: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics

We have introduced what it means for a formula to besatisfied or valid in a model. We also showed how todescribe structural properties of frames. For example, weintroduced formulae which were valid on transitive, serial,or Euclidean frames.

In the following we consider properties which cannot beexpressed within the modal language and analyse whentwo models are not distinguishable by modal formulae.

In the following we assume that all models are of the samesimilarity type! And restrict ourself to the basic modallanguage if the general case is obtained in the same way.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 359

Page 360: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

5.1 Invariance Results

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 360

Page 361: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

In this section we consider invariance properties ofmodels. That is, we would like to modify models withoutchanging the set of satisfiable and unsatisfiable formulae.

Firstly, we need to specify a criterion to compare differentmodels.

How can such criteria look like?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 361

Page 362: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.1 (Theory)LetM be a Kripke model and w ∈ WM. The theory of w(with respect toM), denoted by ThM(w) is given by allmodal formulae satisfied inM, w, i.e.

ThM(w) = {ϕ | M, w |= ϕ}

We will also write Th (w) whenever the model is clear fromthe context.

The theory ofM, denoted by Th (M), is given by allglobally true formulae inM, i.e.

Th (M) = {ϕ | M |= ϕ}

Note: A theory is given with repsect to a set of propositions.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 362

Page 363: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Example 5.2Consider Prop = {p, q}. What is the theory of the followingmodel?

w0

p

w1

p

t, p, p ∧ p,. . . , p ∧ ¬q,. . . , K, 4,. . . , ¬q, ¬¬¬q,. . .

Intuitively, models are considered “equal” if they have thesame theory.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 363

Page 364: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.3 ((Modally) Equivalence)LetM1 andM2 be two Kripke models of the same similaritytype, w1 ∈ WM1 and w2 ∈ WM2.

We say that w1 and w2 are (modally) equivalent (withrespect toM1 andM2), denoted by w1 !M1,M2 w2, iff

ThM1(w1) = ThM2(w2)

We will also write w1 ! w2 whenever the models are clearfrom the context.

We say thatM1 andM2 are (modally) equivalent, denotedbyM1 !M2 iff

Th (M1) = Th (M2)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 364

Page 365: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

In the following we describe operations on models suchthat the satisfiability of formulae is invariant under theseoperations. That is, if such a satisfiability preservingoperation is applied on a model the resulting model shouldbe modally equivalent to the original one.

We discuss the following invariance operations:1 Disjoint unions2 Generated submodels3 Bounded morphisms4 Bisimulations, and5 Ultrafiler extensions.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 365

Page 366: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Disjoint UnionsDisjoint unions are used to construct bigger models fromsmaller ones.

M1: M2:w w1 w2 w3

M1 ]M2: w w1 w2 w3

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 366

Page 367: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.4 (Disjoint Models, - Union)Two modelsM1 andM2 are said to be disjoint iffWM1 ∩WM2 = ∅; i.e. if they have no worlds in common.

Let allMi be disjoint models for i ∈ I ⊆ N. The disjointunion of the modelsMi is defined as

⊎i∈IMi := (W,R, V )

whereW :=

⋃i∈IWi,

R :=⋃i∈I Ri, and

V (p) :=⋃i∈I Vi(p).

What can we say about the satisfaction inMi and⊎Mi?

Note, that every set of models can be made disjoint bysimply renaming worlds.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 367

Page 368: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proposition 5.5 (Invariance under Disjoint U.)

Let allMi be disjoint Kripke models of the same similarity typefor i ∈ I. Then, for each formula ϕ, for each i ∈ I, and eachworld w ∈ WMi

it holds that

Miw |= ϕ iff⊎i∈I

Mi, w |= ϕ

This result is about satisfaction! Does it also hold for globaltruth? No! Why not?

Proof.Structural induction on ϕ. Exercise

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 368

Page 369: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

By means of this result we can show that some operators arenot defineable in the modal language!

Example 5.6The global universal modality A is defined as as follows:

M, w |= Aφ iff ∀w ∈ WM (M, w |= φ)

Is this modality definable in the modal language?

Assume that a(p) is a basic modal formula such thatM, w |= a(p) iffM, w |= Ap. That is, a(p) defines A.LetM1 be a model with VM1(p) = WM1 andM2 be a modelwith VM2(p) = ∅. SinceM1, w |= a(p) alsoM1 ]M2, w |= a(p) and thus alsoM2, w |= a(p) byProposition 5.5. Contradiction! So, a(p) is not definable inthe ML.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 369

Page 370: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Generated SubmodelsNow, we present a way to obtain smaller models frombigger ones.

The idea is to remove points starting from a given modelwithout affecting the satisfiability of formulae.

Example 5.7Consider the following frames: F1 = (Z, <), F2 = (Z−, <)and F3 = (N, <) where Z− := {x ∈ Z | x ≤ 0}

Is there a modal formula which can distinguish F1 from F2?Yes, consider ♦ >!

What about a formula which can distinguish F1 from F3?Why does such a formula not exist?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 370

Page 371: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.8 (Submodel)LetM1 = (W1,R1, V1) andM2 = (W2,R2, V2) be two Kripkemodels. M2 = (W2,R2, V2) is called a submodel ofM1 = (W1,R1, V1) iff

1 WM2 ⊆ WM1,2 RM2 = RM1 ∩ (WM2 ×WM2) (i.e. RM2 is the restriction

of RM1 to WM2,3 VM2(p) = VM1(p) ∩WM2 (i.e. VM2 is the restriction ofVM1 to WM2.

That is, some points are just removed and the accessibilityrelations and the valuation function are restrictedaccordingly. (Compare the modal update of publicannouncements.)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 371

Page 372: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

In the following we formalize the observation made in theprevious example.

Definition 5.9 (Generated Submodel)LetM1 = (W1,R1, V1) andM2 = (W2,R2, V2) be two Kripkemodels. M2 = (W2,R2, V2) is called a generated submodelofM1 = (W1,R1, V1), denoted byM2 �M1, iff

1 M2 is a submodel ofM1 and2 if w2 ∈ WM2 and w2RM1w1 for some w1 ∈ WM1 then

also w1 ∈ WM2.

Let X ⊆ WM1. The submodel generated by X is defined asthe smallest submodel ofM1 whose set of worlds containsX.

Exercise: Proof that the “submodel generated by X” doesalways exist!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 372

Page 373: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Selecting a point w in some model. Then, the generatedsubmodel generated by w must contain all reachable points!

Example 5.10Recall the frames from the previous example extended bysome valuation: M1 = (Z, <, V1),M2 = (Z−, <, V1) andM3 = (N, <, V1).

It is easy to see thatM3 is the {1}-generated submodel ofM1 butM2 6�M1.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 373

Page 374: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proposition 5.11 (Invariance under G.S.)

LetM1 andM2 be two models such thatM2 is a generatedsubmodel ofM1. Then, for each modal formula ϕ and eachworld w2 ∈ WM2 it holds that

M1, w2 |= ϕ iff M2, w2 |= ϕ

Proof.By structural induction on ϕ Exercise

This result is easy to see: All reachable points (wrt. w2) arecontained in both models.

How does the generated submodel look like for a model inwhich all points are reachable from each other?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 374

Page 375: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Remark 5.12Note that Proposition 5.5 is a special case of Proposition 5.11.Why? Exercise

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 375

Page 376: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Bounded Morphisms

In the previous section we showed that models can becombined and that worlds can “carefully” be removedwithout affecting the satisfiability of formulae.

Now, we present a more general tool: Functions thatpreserve the structure of models.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 376

Page 377: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

HomomorphismsWe define the basic mathematical notion of ahomomorphism for models. It is simply a mapping betweenstates respecting relational properties and valuations.

Definition 5.13 (Homomorphism)LetM1 andM2 be two models of the same similarity type.A homomorphism f fromM1 toM2, f :M1 →M2, is afunction f : WM1 → WM2 with the following properties:

1 ∀p ∈ Prop ∀w ∈ WM1 (w ∈ VM1(p)⇒ f(w) ∈ VM2(p))

2 ∀w,w′ ∈ WM1 (RM1ww′ ⇒ RM2f(w)f(w′))

(homomorphic condition)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 377

Page 378: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Does a homomorphism ensure invariance undersatisfiability?

No! The structure ofM2 is not reflected back toM1.

Exercise: Give a counterexample.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 378

Page 379: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

IsomorphismsWe have to strengthen the definition of homomorphisms inorder to obtain modally equivalence.

Definition 5.14 (Strong Homomorphism)LetM1 andM2 be two models of the same similarity type.A strong homomorphism f fromM1 toM2 is ahomomorphism f :M1 →M2 with the followingproperties:

1 ∀p ∈ Prop ∀w ∈ WM1 (w ∈ VM1(p)⇔f(w) ∈ VM2(p))

2 ∀w,w′ ∈ WM1 (RM1ww′⇔RM2f(w)f(w′)) (strong

homomorphic condition)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 379

Page 380: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.15 (Isomorphism)An isomorphism is a bijective strong homomorphism. Wesay that two modelsM1 andM2 are isomorphic,M1 wM2, if there is an isomorphism fromM1 toM2.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 380

Page 381: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proposition 5.16 (Invariance)

LetM1 andM2 be two models of the same similarity type.1 Let w (resp. w2) ofM1 (resp. M2). If there is a surjective

strong homomorphism f :M1 →M2 with f(w1) = w2

then w1 !M1,M2 w2.

2 IfM1 wM2 thenM1 !M2

Proof.2. follows from 1. 1. is shown by induction on formulae Blackboard

These results are not very surprising since isomorphismsusually describe identical entities (apart from renaming).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 381

Page 382: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

It is also not surprising that we cannot strengthen the resultto an equivalence: There are morphisms which implymodally equivalence but which are not strong! In particular,isomorphic models have the same number of worlds.

Example 5.17Obviously, both models are modally equivalent but notisomorphic:

w0

p

w1

p

w0

p

Exercise: Construct a model and a morphism which is notstrong but which ensures invariance under satisfiability.

The following definition refines the approach.Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 382

Page 383: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Bounded MorphismDefinition 5.18 (Bounded Morphism)LetM1 andM2 be two models of the same similarity type.A bounded morphism f betweenM1 andM2,f :M1

b→M2, is a homomorphism f :M1 →M2 such thatthe following conditions are satisfied:

1 For all w ∈ WM1 it holds that w and f(w) satisfy thesame propositions,

2 if RM1ww′ then also RM2f(w)f(w′),

3 If RM2f(w)v′ then there is a v ∈ WM1 such that RM1wvand f(v) = v′ (back condition).

If the underlying homomorphism is surjective we say that

M2 is a bounded homomorphic image ofM1,M1

b�M2.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 383

Page 384: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Example 5.19 (B.M. in the Basic Modal Logic)Consider the modelsM1 = (N,R1, V1) andM2 = ({e, o},R2, V2) where

1 R1mn iff n = m+ 1

2 V1(p) = {2n | n ∈ N}3 R2 = {(e, o), (o, e)}4 V2(p) = {e}

We define f : WM1 → WM2 as follows:

f(n) =

{e if n is eveno if n is odd

f is a surjective bounded morphism but not strong! Exercise.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 384

Page 385: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proposition 5.20 (Invariance)

LetM1 andM2 be two models of the same similarity typesuch that f :M1

b→M2. Then, for each modal formula ϕ andeach w ∈ WM1 it holds that

M1, w |= ϕ iff M2, f(w) |= ϕ

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 385

Page 386: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proof.The proof is done by induction on ϕ. We just consider thecase where ϕ = ♦ ψ.

“⇒“: AssumeM1, w |= ♦ ψ. So, there is a w′ withM1, w

′ |= ψ andRM1ww′. Hence, alsoRM2f(w)f(w′) and by

induction hypothesisM2, f(w′) |= ψ; hence,M2, f(w) |= ♦ ψ.

”⇐“: AssumeM2, f(w) |= ♦ ψ. So, there is a v′ withM2, v

′ |= ψ and RM2f(w)v′. Hence, also RM1wv for some vwith f(v) = v′ and by induction hypothesisM1, v |= ψ;hence,M1, w |= ♦ ψ.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 386

Page 387: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

ApplicationOften, one is interested in models with a special structure;e.g. tree-like models. These are models which have theshape of a tree: They have a root node and are acyclic.

Proposition 5.21 (Tree Model Property)LetM1 = (W1,R1, V1) be a {w}-generated Kripke submodelwhere w ∈ W1.Then, there is a tree-like modelM2 = (W2,R2, V2) such that

M2

b�M1. This means that any satisfiable formula is

satisfiable on a tree-like model.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 387

Page 388: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proof.W2 consists of all finite sequences (w,w1, . . . , wn) such that

R1ww1,R1w1w2,R1w2w3, . . . ,R1wn−1wn

Let v, v′ ∈ W2 we define R2 as follows: R2vv′ iff

v = (w,w1, . . . , wn), v′ = (w,w1, . . . , wn, wn+1), andR1wnwn+1

We set (w,w1, . . . , wn) ∈ V2(p) iff wn ∈ V1(p).Finally, the function f(w,w1, . . . , wn) := wn is a surjectivebounded morphism fromM1 toM2 ( Why? Exercise!).

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 388

Page 389: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

BisimulationsUp to now, we introduced special kinds of relationsbetween models:

Submodels: Identity relation.Homomorphisms: Functions.

They have two things in common:Related states satisfied the same propositions, andtransitions where preserved.

Here, we introduce a more general relation between modelssuch that related models are modally equivalent.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 389

Page 390: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.22 (Bisimulation)

LetM1 = (W1,R1, V1) andM2 = (W2,R2, V2) be two Kripkemodels. A bisimulation betweenM1 andM2,B :M1 �M2, is a non-empty binary relation B ⊆ W1 ×W2

such that whenever w1Bw2 the following hold:1 V1(w1) = V2(w2) (atomic harmony)2 if w1R1v1 then there is an v2 ∈ W2 such that v1Bv2 andw2R2v2 (force condition)

3 if w2R2v2 then there is an v1 ∈ W1 such that v1Bv2 andw1R2v1 (back condition)

If there is a bisimulation between two states w1 ∈ W1 andw2 ∈ W2 we writeM1, w1 �M2, w2 or just w1 � w2 if themodels are clear from the context. If there is a bisimulationbetweenM1 andM2 we writeM1 �M2.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 390

Page 391: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Example 5.23The following modelsM andM′ are bisimular:

w1

p

w2

q

w3

pw4

q

w5

qw′1

pw′2

q

w′3

qw′4

p

w′5

q

We define the following bisimulation between the models:B := {(w1, w

′1), (w2, w

′2), (w2, w

′3), (w3, w

′4), (w4, w

′5), (w5, w

′5)}.

It is easy to verify the bisimulation conditions. Note thatboth models are neither a generated submodel nor abounded homomorphic image of the other.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 391

Page 392: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

How do we have to adopt the definition of bisimulation inorder to suit the general case for arbitrary similarity types?

Definition 5.24 (Bisimulation - General Case)LetM1 andM2 be τ -models. A bisimulation is defined as inDefinition 5.22 but the back and force condition aremodified as follows: w1Bw2 iff

V1(w1) = V2(w2) (atomic harmony)if R1

mw1v1 . . . vn then there are v′1, . . . , v′n ∈ W2 such that

viBv′i for all i = 1, . . .n and R2mw2v

′1 . . . v

′n (force

condition)if R2

mw2v′1 . . . v

′n then there are v1, . . . , vn ∈ W1 such that

viBv′i for all i = 1, . . .n and R1mw1v1 . . . vn (back

condition)

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 392

Page 393: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

All constructions of the previous section are bisimulations.

Proposition 5.25LetM,M′, andMi for i ∈ I ⊆ N be models of the samesimilarity type.

1 IfM wM′ thenM�M′

2 For all i ∈ I and w ∈ WMiit holds that

Mi, w �⊎iMi, w

3 IfM′�M thenM′, w �M, w for all w ∈ WM′

4 If f :M b→M′ thenM, w �M′, f(w) for all w ∈M.

So proofs are quite easy.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 393

Page 394: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proof.1 Define B as {(w, f(w)) | w ∈ WM} where f is an

isomorphism betweenM andM′. Then, it is easy tocheck that B is a bisimulation betweenM andM′.

2 Define B as {(w,w) | w ∈ WMi}. Then, it is easy to check

that B is a bisimulation betweenMi and⊎iMi.

3 Define B as {(w,w) | w ∈ WM′}. Then, it is easy to checkthat B is a bisimulation betweenM′ andM.

4 Define B as {(w, f(w)) | w ∈ WM} where f is a boundedmorphism betweenM andM′. Then, it is easy to checkthat B is a bisimulation betweenM andM′.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 394

Page 395: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Theorem 5.26 (Bisimulation Invariance T.)

LetM andM′ be models of the same similarity type. Then,for every (w,w′) ∈ WM ×WM′ it holds that

w � w′ implies that w! w′.

The proof is done by structural induction of formulae.What about the reverse? It does not hold in general!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 395

Page 396: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Proof.If ϕ is a proposition it is obvious, as well as for booleanconnectives. Now let ϕ = ♦ ψ.

Let w � w′. SinceM, w |= ♦ ψ we have that∃v(Rwv andM, v |= ψ). Then, there is anv′ (Rw′v′ and v � v′) by the bisimulation force property. Byinduction hypothesis we getM′, v′ |= ψ. So, we have thatM′, w′ |= ♦ ψ.

The reverse direction is done analogously by using the backcondition.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 396

Page 397: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Example 5.27

Consider the following two models:

w

. . .

w′

. . . . . .

Left modelM: All branches of finite length.Right modelM′: As the left one but plus one infinite path.We assume that at each state the proposition p is true. Bothmodels are modally equivalent in w and w′ But, there is nobisimulation!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 397

Page 398: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Let’s prove that a bisimulation cannot exist. Suppose thecontrary.

Let v1 be the state of the infinite path with R2w′v1, and w1 a

point inM bisimular with v1. Let the path corresponding tow1 has length n+ 1, say ww1 . . . wn. Since both models arebisimular wn has to be bisimular with the (n+ 1)th state vnon the infinite path as well. However, now vn has asuccessor but wn does not. Contradiction!

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 398

Page 399: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Definition 5.28 (Image-finite Model)LetM = (W,R1, . . . ,Rk, V ) be a Kripke model of modalsimilarity type τ . The modelM is called image-finite iff foreach relation Rm in the model the set

{(x1, . . . , xn) | Rixx1 . . . xn}

is finite where τ(m) = n− 1 (i.e. Rm is a n+ 1-ary relation).

This definition says that the branching factor of each relationmust be finite.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 399

Page 400: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

Theorem 5.29 (Hennessy-Milner Theorem)

LetM andM′ be image-finite models. Then, for every(w,w′) ∈ WM ×WM′ it holds that

w � w′ if, and only if, w! w′.

Proof.“⇒”: Theorem 5.26“⇐”: We show that w! w′ itself is a bisimulation.Therefore, we have to verify the three properties.

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 400

Page 401: Prof. Jürgen Dix Nils Bulling Michael Köster - Informatik an …€¦ ·  · 2009-01-20Prof. Jürgen Dix Nils Bulling Michael Köster ... also discuss the relationship between

5 Advanced Topics5.1 Invariance Results

1 Clearly, w and w′ satisfy the same proposition letters.2 Forth condition: Assume Rwv and that there is no v′

with R′w′v′ and v! v′. Let S ′ := {u′ | R′w′u′}. The setit non-empty! Why? The image-finiteness implies thatS ′ = {w′1, . . . w′n} is finite! By assumption there is aformula φi for each w′i ∈ S ′ such thatM, v |= φi andM′, w′i 6|= φi. Hence

M, w |= ♦ (φ1∧· · ·∧φn) and M′, w′ 6|= ♦ (φ1∧· · ·∧φn)

which contradicts w! w′.3 Analogously to the previous point.

Where do we need the image finiteness?

Prof. J. Dix, N. Bulling, M. Köster · Clausthal, WS 08/09 401