2 Syntax 1
5.1 Herbrand’sTheorem .................................... 4
5.2 Herbrand’sMethod ..................................... 5
In propositional logic, there is no concise method of encoding similar statements, such as: Amy loves her mother; Carolyn loves her mother; Michele loves her mother. These statements must be encoded asdistinctpropositions. Moreover, inpropositionallogic thereis not even an awkward way of encoding statements of the form: everyone loves his/her mother; someone loves his/her mother. This lecture, which is concerned with predicate calculus 1 —first-order logic without quantifiers or variables—addresses the first of these concerns. The next lecture on first-order logic (with quantifiers and variables) addresses the second.
The ontological basis of propositional logic is the proposition. The ontological bases of predicate calculus are objects and their attributes. Some examples of objects are people, animals, plants, andbaseballgames. Therearetwotypes of attributes ofparticular relevancetopredicate calculus: (i)functions, such as amy, whichis a constant (i.e., a0-placefunction), and mother
of(amy), whichis a1-placefunction; and(ii) relations, such as female(amy), which is a property (i.e., 1-place relation), and loves(mother of(amy),amy), which is a 2-place relation. Note that propositions are 0-place relations.
Predicate calculus generalizes propositional logic with terms, which represent objects, and predicates, which represent propositions, properties, and relations. The predicate calculus alphabet includes a set of constant symbols {a, b, c, . . .}(i.e.,0-ary function symbols), a set of n-aryfunction
1 InCS141,wereferto first-orderlogicwith onlyground terms(novariablesorquantifiers) aspredicatecalculus. This is not necessarily standard nomenclature. First-order logic and predicate calculus are usually synonymous.
symbols {f, g, h, . . .}for n> 0, a set of n-arypredicate symbols {P, Q, R, . . .}for n ≥ 0, two select 0-ary predicates {⊤, ⊥}, and a set of logical connectives {¬, ∨, ∧, →}. Given this alphabet, the syntactic rules of the predicate calculus govern the construction of terms and formulas.
The following inductive definition describes the terms of predicate calculus:
– f(t1 ,...,tn)is a term
The following inductive definition describes the formulas of predicate calculus:
• if t1 ,...,tn are terms and P is an n-ary predicate symbol
– P (t1 ,...,tn)is a(n atomic) formula
•⊤ and ⊥ are(atomic) formulas
• if φ and ψ areformulas,thenthefollowing are(complex) formulas:
As in the case of propositional logic, complex formulas involve one or more of the connectives; atomic formulas do not.
Example: Given the alphabet A = {0, 1, succ, add,<}, where 0 and 1 are constant symbols, function symbol succ has arity 1, function symbol add has arity 2, and predicate symbol < has arity 2, the following are sample terms of predicate calculus:
0, succ(0), succ(succ(0)),..., add(0, 0), add(0, 1), add(1, 0), add(1, 1),...
and the following are sample formulas:
< (0, 0),< (0, 1),< (1, 0),< (1, 1),< (succ(0), 0),< (0, succ(0)),...
Semantics
The semantics of predicate calculus give meaning to its formulas. This meaning is derived from aninterpretation of terms andpredicates,the syntactic units usedinthe construction offormulas. Terms are interpreted as objects and predicates as relations. An interpretation I is a tuple �D, M� where the domain D is a(non-empty) set of objects and the map M is defined s.t.
M
Example: Continuingour example,given alphabet Adefinedabove,in the standardinterpretation I = �D, M� with domain D = N, the constant symbols 0 and 1 would map to themselves, the function symbol succ would map to the function n �→ n +1, the function symbol add would map to the addition function, and the predicate symbol < would map to the less-than relation (i.e., {(0, 1), (0, 2),..., (1, 2), (1, 3),..., (2, 3), (2, 4),...}).
The terms of predicate calculus are interpreted under I as follows:
M
– I[f(t1 ,...,tn)]= fM (I[t1 ],..., I[tn])
As in propositional logic, I|= φ is defined inductively. Only in the base case does the definition for predicate calculus differ from that of propositional logic:
I|= P (t1 ,...,tn)iff(I[t1 ],..., I[tn])∈ P M
The notions of satisfiability, validity, and unsatisfiability extendimmediately topredicate calculus.
Example: Continuing our example yet again, given alphabet A defined above, in the standard interpretation withdomainN, the term succ(0)isinterpretedas succM (0M ), whichis1. Similarly, the term add(0, succ(0))is interpreted as addM (0M , succM (0M )), which is also 1.
Given constant symbols {amy, tish, merrie, michael}; function symbols {instructor of(·)}; predicate symbols {older(·, ·)}. Is the formula older(instructor of(merrie),merrie)satisfiable? What about the formula older(instructor of(michael),michael)?
Construct an interpretation I = �D, M� as follows:
M
– olderM = {(Michael, Amy),(Michael, Tish),(Michael, Merrie), (Amy, Tish),(Amy, Merrie),(Tish, Merrie)}
I satisfies the formula older(instructor of(merrie),merrie).
I|= older(instructor of(merrie),merrie) iff (I[instructor of(merrie)], I[merrie])∈ olderM iff (instructor ofM (merrieM ), merrieM )∈ olderM iff (Amy, Merrie)∈ olderM
I does not satisfy older(instructor of(michael),michael), however.
I|= older(instructor of(michael),michael) iff (I[instructor of(michael)], I[michael])∈ olderM iff (instructor ofM (michaelM ), michaelM )∈ olderM iff (Amy, Michael)∈ olderM
But older(instructor of(michael),michael)is not unsatisfiable, even though it is not satisfied by I.
′
Exercise: Modify the interpretation I to produce an alternative interpretation Ithat satisfies older(instructor of(michael),michael).
Recall that the logical entailment problem is the following: given knowledge base KB and formula φ, does the knowledge base KB semantically entail φ: i.e., KB |= φ? In other words, is it the case that all models of KB are also models of φ? In propositional logic, this question can be answered via the truth-table method. The Herbrand method is an analogous procedure that is applicable to knowledge bases of predicate calculus in normal form.
Given an alphabetA, the Herbrand universe A is the set of allgroundterms, and the Herbrand base B istheset of allgroundformulas. For example,if A= {a, b, P (·)}, then A = {a, b}and B = {P (a),P (b)}. Note that if an alphabet A contains any function symbols, then both the Herbrand universe and the Herbrand base are infinite: e.g., if A = {a, f, P }, then A = {a, f(a),f(f(a)),...} and B = {P (a),P (f(a)),P (f(f(a))),...}.
A Herbrand interpretation, or Herbrand model, H = �D, M�, is one in which the domain
M
is theHerbrand universe(i.e., D = A) and M maps termsinto themselves(i.e., c= c, for all constant symbols c, and fM = {(a, f(a)) | a ∈ A}, for all function symbols f). For example, if A = {a, f, g}, so that A = {a, f(a),g(a),f(f(a)),f(g(aa)),g(f(a)),g(g(a)),...}, then
fM = {(a, f(a)), (f(a),f(f(a))), (g(a),f(g(a))), (f(f(a)),f(f(f(a)))), (g(f(a)),f(g(f(a)))),...}
and
M
g = {(a, g(a)), (f(a),g(f(a))), (g(a),g(g(a))), (f(f(a)),g(f(f(a)))), (g(f(a)),g(g(f(a)))),...}
Herbrand interpretations do not restrict the interpretation of predicates. Thus, each Herbrand interpretation is identified with some subset of the Herbrand base. If A = {a, b, P (·)}, then in
M
every Herbrand interpretation D = {a, b}, a= a and bM = b, and P M ∈{{}, {a}, {b}, {a, b}}. In otherwords,thefourpossibleinterpretationsare: theempty set, {P (a)}, {P (b)}, and {P (a),P (b)}.
Theorem: A predicate calculus formula has a model iff it has a Herbrand model.
Proof: Let φ denote a formula of predicate calculus. Clearly, if φ has a Herbrand model, then φ has a model. Thus,it suffices to show thatif φ has a model, then φ has aHerbrandmodel. Suppose I|= φ.Given an(Herbrand)interpretation H = �D ′ ,M ′ �, with D ′ equal to the Herbrandbase and
′′
M mapping terms into themselves, extend the mapping M as follows: for all n-ary predicates P ,
P M ′ = {(H[t1 ],..., I[tn])|I|= P (t1 ,...,tn)}
If φ is an atomic formula, then by construction, I|= φ iff H|= φ. Otherwise(i.e., if φ is a complex formula), the proof follows by induction on the structure of φ. ⋄
Example: Continuing with the above example, assume A= {a, b, P (·)}.
M
An interpretation I with D = {1, 2} with a= 1, bM = 2, and P M = {1}, corresponds to
′′ ′
M
Herbrand interpretation H = �D ′ ,M ′ � with D ′ = D and a= a, bM = b, and P M = {a}.
M
But an interpretation I with D = {1, 2} with a= 1, bM = 1, and P M = {1}, corresponds to
′′ ′
M
Herbrand interpretation H = �D ′ ,M ′ � with D ′ = D and a= a, bM = b, and P M = {a, b}.
Corollary: [Herbrand’s Theorem] A set of predicate calculus formulas has a model iff it has a Herbrand model.
Assuming a finite number of constant and predicate symbols, it is theoretically possible to solve the logical entailment problem for predicate calculus via brute force by enumerating all Herbrand interpretations. For example, we can determine whether or not P (a)∨Q(b)and ¬P (a)entail Q(b) by enumerating all Herbrand interpretations in which P (a)∨Q(b)and ¬P (a)hold, and checking whether or not Q(b) also holds in these interpretations. The Herbrand interpretations in which P (a)∨Q(b)and ¬P (a)hold are listed in Table 1. Indeed, in all such interpretations in which both these formulas hold,(namely P M = ∅,QM = {b}; P M = ∅,QM = {a, b}; P M = {b},QM = {b}; P M = {b},QM = {a, b})so too does Q(b). This procedure is called Herbrand’s method.
However, Herbrand’s method can be exceedingly expensive. Assuming n constants(i.e., objects in the domain), and one predicate of arity k, there are 2n k Herbrand interpretations. Worse, if the number of constant symbolsisinfinite(e.g., N), or if the alphabet contains anyfunction symbols, thenthismethodisnot effective,becausetheHerbrand universeisinfinite. Consequently, weresort to proof theory to solve the logical entailment problem for predicate calculus and first-order logic.
P M QM P (a)∨Q(b) ¬P (a) ∅∅ –– ∅∅ ∅{a} –– ∅{a} ∅{b}∅{b} ∅{b} ∅{a, b}∅ {a, b}∅ {a, b}
{a}∅{a}∅ ––
{a}{a}{a}{a} ––
{a}{b}{a}{b} ––
{a}{a, b}{a}{a, b} ––
{b}∅ –– {b}∅
{b}{a} –– {b}{a}
{b}{b}{b}{b}{b}{b}
{b}{a, b}{b}{a, b}{b}{a, b} {a, b}∅ {a, b}∅ –– {a, b}{a}{a, b}{a} –– {a, b}{b}{a, b}{b} –– {a, b}{a, b}{a, b}{a, b} ––
Table 1: Herbrand’s Method: An Example