First Order Predicate Logic
First Order Predicate Logic
a. Syntax
b. Semantics
Variables x, y, z, a, b,....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
Atomic sentences:
o Atomic sentences are the most basic sentences of first-order logic. These
sentences are formed from a predicate symbol followed by a parenthesis
with a sequence of terms.
o We can represent atomic sentences as Predicate (term1, term2, ......, term
n).
Complex Sentences:
o Complex sentences are made by combining atomic sentences using
connectives.
First-order logic statements can be divided into two parts:
Consider the statement: "x is an integer.", it consists of two parts, the first part
x is the subject of the statement and second part "is an integer," is known as a
predicate.
Universal Quantifier:
Example:
Let a variable x which refers to a cat so all x can be represented in UOD as below:
It will be read as: There are all x where x is a man who drink coffee.
Existential Quantifier:
Existential quantifiers are the type of quantifiers, which express that the statement
within its scope is true for at least one instance of something.
Example:
It will be read as: There are some x where x is a boy who is intelligent.
Points to remember:
o
Properties of Quantifiers:
∀x bird(x) →fly(x).
And since there are all birds who fly so it will be represented as follows.
Since there is every man so will use ∀, and it will be represented as follows:
In this question, the predicate is "respect(x, y)," where x=man, and y= parent.
there are some boys so we will use ∃, and it will be represented as:
In this question, the predicate is "play(x, y)," where x= boys, and y= game. Since
Since there are not all students, so we will use ∀ with negation, so following
In this question, the predicate is "like(x, y)," where x= student, and y= subject.
The quantifiers interact with variables which appear in a suitable way. There are
two types of variables in First-order logic which are given below:
Free Variable: A variable is said to be a free variable in a formula if it occurs
outside the scope of the quantifier.