Abstract
The first order predicate logic (FOPL) is backbone of AI, as well a method of formal representation of Natural Language (NL) text. The Prolog language for AI programming has its foundations in FOPL. The chapter demonstrates how to translate NL to FOPL in the form of facts and rules, use of quantifiers and variables, syntax and semantics of FOPL, and conversion of predicate expressions to clause forms. This is followed with unification of predicate expressions using instantiations and substitutions, compositions of substitutions, unification algorithm and its analysis. The resolution principle is extended to FOPL, a simple algorithm of resolution is presented, and use of resolution is demonstrated for theorem proving. The interpretation and inferences of FOPL expressions are briefly discussed, along with the use of Herbrand’s universe and Herbrand’s theorem. At the end, the most general unifier (mgu) and its algorithms are presented, and chapter is concluded with summary.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
A string of quantifiers followed by a quantifier-free part, e.g., \(\forall x_1 \dots \forall x_n \psi (x_1 \ldots , x_n)\).
References
Chowdhary KR (2015) Fundamentals of discrete mathematical structures, 3rd edn. EEE, PHI India
Davis M, Putnam H (1960) A computing procedure for quantification theory. J ACM 7(3):201–215. https://doi.org/10.1145/321033.321034
Emden V, Kowalki RA (1976) The semantics of predicate logic as a programming language. J ACM 23(4):733–742
Av Gelder et al (1991) The well-founded semantics for general logic programs. J ACM 38(3):620–650
Luckham D, Nilsson NJ (1971) Extracting information from resolution trees. Artif Intell 2:27–54
Nilsson NJ (1980) Principles of artificial intelligence, 3rd edn. Narosa, New Delhi
Robinson JA (1963) Theorem-proving on the computer. J ACM 10(2):163–174
Robinson JA (1965) A machine-oriented logic, based on the resolution principle. J ACM 12(1):23–41
Stickel ME (1981) A unification algorithm for associative-commutative functions. J ACM 28(3):423–434
Author information
Authors and Affiliations
Corresponding author
Exercises
Exercises
-
1.
Apply the Resolution theorem to prove:
-
“Socrates is mortal”, given that
-
All men are mortal, and
-
Socrates is man.
-
-
2.
What are the other methods for automated theorem proving? Explain any three in brief.
-
3.
Convert the following into clause form:
$$\begin{aligned} \forall x[p(x) \wedge q(x)] \Rightarrow [R(x, I) \wedge \exists y (\exists z~r(y,z) \end{aligned}$$$$\begin{aligned} \Rightarrow S(x,y))] \vee \forall x~T(x). \end{aligned}$$ -
4.
Show that a formula in CNF is valid if and only if each of its disjunctions contains a pair of complementary literals P and \(\lnot P\).
-
5.
Prove or disprove the followings:
-
a.
If S is a first-order formula, then S is valid iff \( S \rightarrow \bot \) is contradiction.
-
b.
If S is a first-order formula and x is a variable, then S is contradiction iff \(\exists x S\) is a contradiction.
-
a.
-
6.
Using the resolution principle prove the validity of following formula:
$$\begin{aligned}&\forall x \exists y (p(f(f(x)), y) \wedge \forall z (p(f(x), z) \\&\rightarrow p(x, g(x, z)))) \rightarrow \forall x \forall y~p(x, y). \end{aligned}$$ -
7.
Is the predicate logic deterministic or nondetermnistic programming language? justify for yes / no.
-
8.
Consider a set of statements of FOPL that uses two 1-place predicates: Large and Small. The set of object constants are a, b. Find out all possible models for this program. For each of the following sentences find out the models in which each of the sentence becomes true.
-
a.
\(\forall x~Large(x)\).
-
b.
\(\forall x~\lnot Large(x)\).
-
c.
\(\exists x~Large(x)\).
-
d.
\(\exists x~\lnot Large(x)\).
-
e.
\(Large(a) \wedge Large(b)\).
-
f.
\(Large(a) \vee Large(b)\).
-
g.
\(\forall x~[Large(x) \wedge Small(x)]\).
-
h.
\(\forall x~[Large(x) \vee Small(x)]\).
-
i.
\(\forall x~[Large(x) \Rightarrow \lnot Small(x)]\).
-
a.
-
9.
Find out the clauses for the following FOPL formulas.
-
a.
\(\exists x \forall y \exists z (P(x) \Rightarrow (Q(y) \Rightarrow R(z)))\).
-
b.
\(\forall x \forall y ((P(x) \wedge Q(y)) \Rightarrow \exists z R(x, y, z))\).
-
a.
-
10.
Define the required predicates and represent the following sentences in FOPL.
-
a.
Some students opted Sanskrit in fall 2015.
-
b.
Every student who opts Sanskrit passes it.
-
c.
Only one student opted Tamil in fall 2015.
-
d.
The best score in Sanskrit is always higher than the best score in Tamil.
-
e.
There is a barber in a village who shaves every one in the village who does not shave himself / herself.
-
f.
A person born in country X, each of whose parents is a citizen of X or a resident of X, is also a resident of X.
-
a.
-
11.
Determine whether the expression p and q unify with each other in each of the following cases. If so, give the mgu, if not justify it. The lowercase letters are variables, and upper are predicate, functions, and literals.
-
a.
\(p = f(x_1, g(x_2, x_3), x_2, b);~q = f(g(h(a, x_5), x_2), x_1,\) h(a, \(x_4), x_4)\).
-
b.
\(p = f(x, f(u, x));~ q= f(f(y, a), f(z, f(b, z)))\).
-
c.
\(p = f(g(v), h(u, v));~q = f(w, j(x, y))\).
-
a.
-
12.
What can be the strategies for combination of clauses in resolution proof? For example, if there are N clauses, in how many ways they can be combined?
-
13.
Why resolution based inference is more efficient compared modus-ponens?
-
14.
Let \(\varGamma \) is knowledge base and \(\alpha \) is inference from \(\varGamma \). Give a comparison among the following inferences, in terms of their performances:
-
a.
Proof by Resolution, i.e., \(\varGamma \vdash \alpha \),
-
b.
Proof by Modus poenes, i.e., \(\varGamma \vdash \alpha \),
-
c.
Proof by Resolution Refutation, i.e., \(\varGamma \cup \{\lnot \alpha \} \vdash \phi \).
-
a.
-
15.
Given n number of clauses, draw a resolution proof tree to demonstrate combining them. Suggest any two strategies.
-
16.
Given the knowledge base in clausal form, is it possible to extract answers from that making use of resolution principle? For example, finding an answer like, “Where is Tajmahal located?”
-
17.
Represent the following set of statements in predicate logic, convert them to clause from, then apply the resolution proof to answer the question : Did Ranjana kill Lekhi?
“Rajan owns a pat. Every pat owner is an animal lover. No animal lover ever kills an animal. Either Rajan or Ranjana killed a pat, called Lekhi.”
-
18.
Explain:
-
a.
Unification
-
b.
Skolemization
-
c.
Resolution principle versus resolution theorem proving.
-
a.
-
19.
Use resolution to show that the following set of clauses is unsatisfiable.
$$\begin{aligned} \{p(a, z), \lnot p(f(f(a)), a), \lnot p(x, g(y)) \vee p(f (x), y)\}. \end{aligned}$$ -
20.
Derive \(\bot \) from the following set of clauses using the resolution principle.
$$\begin{aligned} \{p(a) \vee p(b), \lnot p(a) \vee p(b), p(a) \vee \lnot p(b), \lnot p(a) \vee \lnot p(b)\}. \end{aligned}$$ -
21.
Give resolution proofs for the inconsistency \(\forall x shaves(Barber, x) \rightarrow \lnot shaves(x, x)\), where Barber is a constant.
-
22.
Consider ab locks-world described by facts and rules:
Facts:
-
ontable(a), ontable(c), on(d, c), on(b, a), heavy(b),
-
cleartop(e), cleartop(d), heavy(d), wooden(b), on(e, b).
Rules:
-
All blocks with clear top are black.
-
All wooden blocks are black.
-
Every heavy and wooden block is big.
-
Every big and black block is on a green block.
Making use of resolution theorem find out the block that is on the green block.
-
-
23.
Given the following knowledge base:
-
If x is on top of y then y supports x.
-
If x is above y and they are touching each other then x is on top of y.
-
A phone is above a book.
-
A phone is touching a book.
Translate the above knowledge base into clause form, and use resolution to show that the predicate “supports(book, phone)” is true.
-
-
24.
How resolution can be used to show that a sentence is:
-
a.
Valid?
-
b.
Unsatisfiable?
-
a.
-
25.
“The application of resolution principle for theorem proving is a non-deterministic approach.” justify this statement.
-
26.
-
a.
Use Herbrand’s method to show that formula,
$$\begin{aligned} \forall x shaves(barber, x) \rightarrow \lnot shaves(x, x) \end{aligned}$$is unsatisfiable?
-
b.
What is Herband’s universe for \(S=\{P(a), \lnot P(f(x)) \vee P(g(x))\}\)?
-
a.
-
27.
Prove that \(\forall x \lnot p(x)\) and \(\lnot \exists x~p(x)\) are equivalent statements.
-
28.
Let S and T be unification problems. Also, let \(\sigma \) be a most general unifier for S and \(\theta \) be a most general unifier for \(\sigma (T)\). Show that \(\theta \sigma \) is a most general unifier for \(S \cup T\).
-
29.
Write the axioms describing predicates: grandchild, grandfather, grandmother, soninlaw, fatherinlaw, brother, daughter, aunt, uncle, brotherinlaw, and firstcousin.
-
30.
For each pair of atomic sentences in the following, find out the most general unifier.
-
a.
knows(father(y), y) and knows(x, x).
-
b.
\(\{f(x, g(x)) = y, h(y) = h(v), v = f(g(z), w)\}\).
-
c.
p(a, b, b) and p(x, y, z).
-
d.
q(y, g(a, b)) and q(g(x, x), y).
-
e.
older(father(y), y) and older(father(x), ram).
-
a.
-
31.
Explain what is wrong with the below given definition of set membership predicate \(\in \):
$$\begin{aligned}&\forall x, s: x \in \{ x \mid s \}\\&\forall x, s: x \in s \Rightarrow \forall y: x \in \{ y \mid s \}. \end{aligned}$$ -
32.
Consider the following riddle: “Brothers and sisters have I none, but that man’s father is my father’s son”. Use the rules of kinship relations to show who that man is?
-
33.
Let the following be a set of facts and rules:
Rita, Sat, Bill, and Eden are the only members of a club.
Rita is married to Sat.
Bill is Eden’s brother.
Spouse of every married person in the club is also in the club.
-
a.
Represent the above facts and rules using predicate logic.
-
b.
Show that they do not conclude “Eden is not married.”
-
c.
Add some some more facts, and show that now the augmented set conclude that Eden is not married.
-
a.
Rights and permissions
Copyright information
© 2020 Springer Nature India Private Limited
About this chapter
Cite this chapter
Chowdhary, K.R. (2020). First Order Predicate Logic. In: Fundamentals of Artificial Intelligence. Springer, New Delhi. https://doi.org/10.1007/978-81-322-3972-7_3
Download citation
DOI: https://doi.org/10.1007/978-81-322-3972-7_3
Published:
Publisher Name: Springer, New Delhi
Print ISBN: 978-81-322-3970-3
Online ISBN: 978-81-322-3972-7
eBook Packages: Computer ScienceComputer Science (R0)