 Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Logic and CS / Huth, Ryan. Logic in Computer Science, 2004 (Cambridge).pdf
Скачиваний:
80
Добавлен:
10.08.2013
Размер:
2.23 Mб
Скачать
 326 5 Modal logics and agents

# 5.3.4 Some modal logics

The logic engineering approach of this section encourages us to design logics by picking and choosing a set L of formula schemes, according to the application at hand. Some examples of formula schemes that we may wish to consider for a given application are those in Tables 5.7 and 5.12.

Deﬁnition 5.15 Let L be a set of formula schemes of modal logic and Γ {ψ} a set of formulas of basic modal logic.

1.The set Γ is closed under substitution instances i whenever φ Γ, then any substitution instance of φ is also in Γ.

2.Let Lc be the smallest set containing all instances of L.

3.Γ semantically entails ψ in L i Γ Lc semantically entails ψ in basic modal logic. In that case, we say that Γ L ψ holds.

Thus, we have Γ L ψ if every Kripke model and every world x satisfying Γ Lc therein also satisﬁes ψ. Note that for L = this deﬁnition is consistent with the one of Deﬁnition 5.7, since we then have Γ Lc = Γ. For logic engineering, we require that L be

closed under substitution instances; otherwise, we won’t be able to characterize Lc in terms of properties of the accessibility relation; and

consistent in that there is a frame F such that F φ holds for all φ L; otherwise, Γ L ψ holds for all Γ and ψ! In most applications of logic engineering, consistency is easy to establish.

We now study a few important modal logics that extend basic modal logic with a consistent set of formula schemes L.

The modal logic K The weakest modal logic doesn’t have any chosen formula schemes, like those of Tables 5.7 and 5.12. So L = and this modal logic is called K as it satisﬁes all instances of the formula scheme K; modal logics with this property are called normal and all modal logics we study in this text are normal.

The modal logic KT45 A well-known modal logic is KT45 – also called S5 in the technical literature – where L = {T, 4, 5} with T, 4 and 5 from Table 5.12. This logic is used to reason about knowledge; φ means that the agent Q knows φ. Table 5.12 tell us, respectively, that

T. Truth: the agent Q knows only true things.

4.Positive introspection: if the agent Q knows something, then she knows that she knows it.

5.Negative introspection: if the agent Q doesn’t know something, then she knows that she doesn’t know it.

 5.3 Logic engineering 327

In this application, the formula scheme K means logical omniscience: the agent’s knowledge is closed under logical consequence. Note that these properties represent idealisations of knowledge. Human knowledge has none of these properties! Even computer agents may not have them all. There are several attempts in the literature to deﬁne logics of knowledge that are more realistic, but we will not consider them here.

The semantics of the logic KT45 must consider only relations R which are: reﬂexive (T), transitive (4) and Euclidean (5).

Fact 5.16 A relation is reﬂexive, transitive and Euclidean i it is reﬂexive, transitive and symmetric, i.e. if it is an equivalence relation.

KT45 is simpler than K in the sense that it has few essentially di erent ways of composing modalities.

Theorem 5.17 Any sequence of modal operators and negations in KT45 is equivalent to one of the following: , , , ¬, ¬ and ¬ , where indicates the absence of any negation or modality.

The modal logic KT4 The modal logic KT4, that is L equals {T, 4}, is also called S4 in the literature. Correspondence theory tells us that its models are precisely the Kripke models M = (W, R, L), where R is reﬂexive and transitive. Such structures are often very useful in computer science. For example, if φ stands for the type of a piece of code – φ could be int × int bool, indicating some code which expects a pair of integers as input and outputs a boolean value – then φ could stand for residual code of type φ. Thus, in the current world x this code would not have to be executed, but could be saved (= residualised) for execution at a later computation stage. The formula scheme φ → φ, the axiom T, then means that code may be executed right away, whereas the formula scheme φ → φ, the axiom 4, allows that residual code remain residual, i.e. we can repeatedly postpone its execution in future computation stages. Such type systems have important applications in the specialisation and partial evaluation of code. We refer the interested reader to the bibliographic notes at the end of the chapter.

Theorem 5.18 Any sequence of modal operators and negations in KT4 is equivalent to one of the following: , , , , , , , ¬, ¬ ,

¬ , ¬ , ¬ , ¬ and ¬ .

Intuitionistic propositional logic In Chapter 1, we gave a natural deduction system for propositional logic which was sound and complete with