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

2.4 Semantics of predicate logic

129

Does the model M satisfy this formula? Well, it does not; for we may choose

a for x and b for y. Since (a, a)

is in the set lovesM and (b, a) is in the

set lovesM, we would need that

the latter does not hold since it is the

interpretation of loves(y, alma); this cannot be.

And what changes if we modify

M

to

M

, where we keep A and almaM,

 

 

 

def

{(b, a), (c, b)}? Well,

but redefine the interpretation of loves as lovesM

=

now there is exactly one lover of Alma’s lovers, namely c; but c is not one of Alma’s lovers. Thus, the formula in (2.8) holds in the model M .

2.4.2 Semantic entailment

In propositional logic, the semantic entailment φ1, φ2, . . . , φn ψ holds i : whenever all φ1, φ2, . . . , φn evaluate to T, the formula ψ evaluates to T as well. How can we define such a notion for formulas in predicate logic, considering that M l φ is indexed with an environment?

Definition 2.20 Let Γ be a (possibly infinite) set of formulas in predicate logic and ψ a formula of predicate logic.

1.Semantic entailment Γ ψ holds i for all models M and look-up tables l, whenever M l φ holds for all φ Γ, then M l ψ holds as well.

2.Formula ψ is satisfiable i there is some model M and some environment l such that M l ψ holds.

3.Formula ψ is valid i M l ψ holds for all models M and environments l in which we can check ψ.

4.The set Γ is consistent or satisfiable i there is a model M and a look-up table l such that M l φ holds for all φ Γ.

In predicate logic, the symbol is overloaded: it denotes model checks ‘M φ’ and semantic entailment ‘φ1, φ2, . . . , φn ψ.’ Computationally, each of these notions means trouble. First, establishing M φ will cause problems, if done on a machine, as soon as the universe of values A of M is infinite. In that case, checking the sentence x ψ, where x is free in ψ, amounts to verifying M [x →a] ψ for infinitely many elements a.

Second, and much more seriously, in trying to verify that φ1, φ2, . . . , φn ψ holds, we have to check things out for all possible models, all models which are equipped with the right structure (i.e. they have functions and predicates with the matching number of arguments). This task is impossible to perform mechanically. This should be contrasted to the situation in propositional logic, where the computation of the truth tables for the propositions involved was the basis for computing this relationship successfully.

130

2 Predicate logic

However, we can sometimes reason that certain semantic entailments are valid. We do this by providing an argument that does not depend on the actual model at hand. Of course, this works only for a very limited number of cases. The most prominent ones are the quantiÞer equivalences which we already encountered in the section on natural deduction. Let us look at a couple of examples of semantic entailment.

Example 2.21 The justification of the semantic entailment

x (P (x) → Q(x)) x P (x) → x Q(x)

is as follows. Let M be a model satisfying x (P (x) → Q(x)). We need to show that M satisfies x P (x) → x Q(x) as well. On inspecting the definition of M ψ1 → ψ2, we see that we are done if not every element of our model satisfies P . Otherwise, every element does satisfy P . But since M satisfies x (P (x) → Q(x)), the latter fact forces every element of our model to satisfy Q as well. By combining these two cases (i.e. either all elements of M satisfy P , or not) we have shown that M satisfies x P (x) → x Q(x).

What about the converse of the above? Is

x P (x) → x Q(x) x (P (x) → Q(x))

valid as well? Hardly! Suppose that M is a model satisfying x P (x) →x Q(x). If A is its underlying set and P M and QM are the corresponding interpretations of P and Q, then M x P (x) → x Q(x) simply says that, if P M equals A , then QM must equal A as well. However, if P M does not equal A , then this implication is vacuously true (remember that F → · = T no matter what · actually is). In this case we do not get any additional

constraints on our model

M

. After these observations, it is now easy to

 

def

{a, b}, P M

def

{a} and QM

def

construct a counter-example model. Let A =

=

=

{b}. Then M x P (x) → x Q(x) holds, but M x (P (x) → Q(x)) does not.

2.4.3 The semantics of equality

We have already pointed out the open-ended nature of the semantics of predicate logic. Given a predicate logic over a set of function symbols F and a set of predicate symbols P, we need only a non-empty set A equipped with concrete functions or elements f M (for f F) and concrete predicates P M (for P P) in A which have the right arities agreed upon in our specification. Of course, we also stressed that most models have natural interpretations of

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