Recall the grammar for predicate logic:
phi ::= P(t,t,...,t) |where P is from a set of predicate symbols and t is a term generated by the grammarphi | phi
phi | phi
phi | phi
phi |
x phi |
x phi,
t ::= c | x | f(t,t,...,t)where c is from a set of constant symbols, x is any variable (x,y,z, etc), and f is a function symbol. An example term is
+(1,*(y,+(1,x)))where 1 is a constant symbol and + and * are function symbols requiring two arguments. An example of an expression of the form P(t,t,...,t) is
<(+(1,*(y,+(1,x))),1)where < is a predicate sybmbol requiring two arguments. Often we write such predicate expression in infix notation, so the above reads as
1 + y * (1 + x) < 1.
over the "standard" model, N, of all natural numbers (excluding zero), such that all constant, function, and predicate symbols have the meanings that you would expect: 1N is the number "one", +N and *N are the "addition" and "multiplication" of natural numbers, respectively, and <N is the relation "strictly less than".x
y (1 + y * (1 + x) < 1)
Mholds. Our aim is to define this satisfaction relation in an algorithmic way, by structural induction over the parse tree of phi. Returning to our example, to decide whetherphi
Nholds, we mean to decide whether![]()
x
y (1 + y * (1 + x) < 1)
Nholds for all choices of x; that is to say, this should hold no matter what value we choose for x. Evidently, we need a tool for binding x to a value k (here: some natural number). We write [x --> k] for such a binding. Therefore, we need to refine our satisfaction relation with such bindings:![]()
y (1 + y * (1 + x) < 1)
MThe dots indicate that a binding may bind more than one variable. In our example, we need to determine whether[x --> a]... phi
Nholds for all natural numbers k. Let us consider an instance of k, say, 4. Then the relationship[x --> k]
y (1 + y * (1 + x) < 1)
Nholds if, and only if, we can finds some natural number m, such that[x --> 4]
y (1 + y * (1 + x) < 1)
Nholds. At this point, we can settle the latter question by consulting the meaning of 1, +, and *; the left hand side, 1 + y * (1 + x), of the inequality evaluates to a number bigger than one, as it adds at least five to one (since x evaluates to four and y has to be at least one). Thus,[x --> 4][y --> m] (1 + y * (1 + x) < 1)
Ncannot hold for any value m whatsoever. Therefore, we conclude that[x --> 4][y --> m] (1 + y * (1 + x) < 1)
Ndoes not hold. But since 4 is an instance of x, this leads to the conclusion that[x --> 4]
y (1 + y * (1 + x) < 1)
Ndoes not hold either, since it is false for at least one choice of x (namely "four"). Note that this formula is not so hard to evaluate, for any value for x would defeat this formula.![]()
x
y (1 + y * (1 + x) < 1)
Nholds.![]()
x
y (1 + y * (1 + x) < (x + x) + y)
Mif phi is of the form P(t,t,...,t), orphi
x phi, or
x phi. Inspecting the grammar for predicate logic, we realize that
the only other cases are negation, disjunction, conjunction, and
implication. But for these we define the satisfaction relation
in accordance with their semantics from chapter 1.
For example,
Mholds if, and only if,![]()
phi
Mdoes not hold. Similary,phi
Mholds if, and only if,phi
psi
Mphi and
Mpsi hold. Can you define the satisfaction relation for disjunctions and implications?