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

140 2 Predicate logic

Example 2.27 Let P φ be the formula in (2.12) and consider the model M of Example 2.23 and Figure 2.5. Let l be a look-up table with l(u) = s0 and l(v) = s3. Does M l P φ hold? For that, we need an interpretation T A × A of P such that MT l x y x (C1 C2 C3 C4) holds. That

is, we need to find a reflexive and transitive

relation T

 

A

×

A that con-

def

 

 

tains RM but not (s0, s3). Please verify that T = {(s, s ) A × A | s =s3}{(s3, s3)} is such a T . Therefore, M l P φ holds.

In the exercises you are asked to show that the formula in (2.12) holds in a directed graph i there isn’t a finite path from node l(u) to node l(v) in that graph. Therefore, this formula specifies unreachability.

2.6.2 Universal second-order logic

Of course, we can negate (2.12) and obtain

P x y z (¬C1 ¬C2 ¬C3 ¬C4)

(2.14)

by relying on the familiar de Morgan laws. This is a formula of universal second-order logic. This formula expresses reachability.

Theorem 2.28 Let M = (A, RM) be any model. Then the formula in (2.14) holds under look-up table l in M i l(v) is R-reachable from l(u) in M.

PROOF:

1.First, assume that MT l x y z (¬C1 ¬C2 ¬C3 ¬C4) holds for all interpretations T of P . Then it also holds for the interpretation which is the re-

flexive, transitive closure of RM. But for that T , MT l x y z (¬C1 ¬C2 ¬C3 ¬C4) can hold only if MT l ¬C3 holds, as all other clauses Ci (i = 3) are false. But this means that MT l P (u, v) has to hold. So (l(u), l(v)) T follows, meaning that there is a finite path from l(u) to l(v).

2.Conversely, let l(v) be R-reachable from l(u) in M.

For any interpretation T of P which is not reflexive, not transitive or does not contain RM the relation MT l x y z (¬C1 ¬C2 ¬C3 ¬C4) holds, since T makes one of the clauses ¬C1, ¬C2 or ¬C4 true.

The other possibility is that T be a reflexive, transitive relation containing RM. Then T contains the reflexive, transitive closure of RM. But (l(u), l(v)) is

in that closure by assumption. Therefore, ¬C3 is made true in the interpretation T under look-up table l, and so MT l x y z (¬C1 ¬C2 ¬C3 ¬C4) holds.

Соседние файлы в папке Logic and CS