V. Lifschitz, L. Morgenstern, D. Plaisted 11
constant and every predicate constant its argument sorts s
1
,...,s
n
; to every func-
tion constant we assign also its value sort s
n+1
. For instance, in the situation calculus
(Section 16.1), the symbols situation and action are sorts; do is a binary function sym-
bol with the argument sorts action and situation, and the value sort situation.
For every sort s, we assume a separate infinite sequence of variables of that sort.
The recursive definition of a term assigns a sort to every term. Atomic formulas are
expressions of the form P(t
1
,...,t
n
), where the sorts of the terms t
1
,...,t
n
are the
argument sorts of P , and also expressions t
1
= t
2
where t
1
and t
2
are terms of the
same sort.
An interpretation, in the many-sorted setting, includes a separate nonempty uni-
verse |I |
s
for each sort s. Otherwise, extending the definition of the semantics to
many-sorted languages is straightforward.
A further extension of the syntax and semantics of first-order formulas allows one
sort to be a “subsort” of another. For instance, when we talk about the blocks world,
it may be convenient to treat the sort block as a subsort of the sort location.Letb
1
and b
2
be object constants of the sort block,lettable be an object constant of the sort
location, and let on be a binary function constant with the argument sorts block and
location. Not only on(b
1
, table) will be counted as a term, but also on(b
1
,b
2
), because
the sort of b
2
is a subsort of the second argument sort of on.
Generally, a subsort relation is an order (reflexive, transitive and anti-symmetric
relation) on the set of sorts. In the recursive definition of a term, f(t
1
,...,t
n
) is a term
if the sort of each t
i
is a subsort of the ith argument sort of f . The condition on sorts
in the definition of atomic formulas P(t
1
,...,t
n
) is similar. An expression t
1
= t
2
is
considered an atomic formula if the sorts of t
1
and t
2
have a common supersort. In the
definition of an interpretation, |I |
s
1
is required to be a subset of |I |
s
2
whenever s
1
is a
subsort of s
2
.
In the rest of this chapter we often assume for simplicity that the underlying signa-
ture is nonsorted.
Uniqueness of names
To talk about Paul, Quentin and Robert from Section 1.2.1 in a first-order language,
we can introduce the signature consisting of the object constants Paul, Quentin, Robert
and the unary predicate constant in, and then use the atomic sentences
(1.4)in(Paul), in(Quentin), in(Robert)
instead of the atoms p, q, r from the propositional representation.
However some interpretations of this signature are unintuitive and do not corre-
spond to any of the 8 interpretations of the propositional signature {p, q, r}. Those are
the intepretations that map two, or even all three, object constants to the same element
of the universe. (The definition of an interpretation in first-order logic does not require
that c
I
1
be different from c
I
2
for distinct object constants c
1
, c
2
.) We can express that
Paul
I
, Quentin
I
and Robert
I
are pairwise distinct by saying that I satisfies the “unique
name conditions”
(1.5)Paul = Quentin, Paul = Robert, Quentin = Robert.