Lecture No 3
Lecture No 3
Lecture No 3
Lecture No: 03
First Order Logic / Predicate Logic
Instructor: Muhammad Ramzan
Email Address: [email protected]
Lecture Agenda
In the topic of Propositional logic, we have seen that how to represent statements using propositional logic.
Propositional logic only deals with “facts”, statements that are either true or false
The propositional logic has very limited expressive power. Consider the following sentence, which we cannot
Philosophers have developed First Order Logic to overcome the limitations of propositional logic.
First Order Logic allows reasoning about properties that are shared by many objects through the use of
variables.
Building Blocks of First-Order Logic
1) constant
2) Variables
3) predicates
3) Predicates describe properties of objects or relationships between objects Examples: Fly, Eat, Run, Beautiful . . .
Building Blocks of First-Order Logic
function
Variable
For example
The constant object here is “Wings”, the variable object here is either “Ostrich” or “Eagle” and the function
here is “Fly”
Building Blocks of First-Order Logic
For example
Predicate
Quantifiers
Predicate
Example: an expression with one or more blanks such that Whenever the blanks are filled by noun
• Formal Definition : A predicates are the statements or sentences that contain one or more variables
• A predicate is Neither True or False until or unless the values of the variables are specified.
• Predicate become Proposition when we specified the value of variable. This means that we will need to change the predicate logic into
proposition logic.
Example
These statements are neither True nor false because the are not propositions.
• x is an animal
Consider the statement : “x is an animal ”
• x is greater than 3
Here x is a subject (something we are discussing about)
• x is less than 4 “is an animal ” is a predicate (refers to a property that the subject).
• x+y=7
Predicate
Predicate
Predicate
Predicate : Symbolization Convention
For example
Add(x, y)
Many mathematical statements assert that a property is true for all values of a variable in a particular domain, called
the domain of discourse (or the universe of discourse), often just referred to as the domain.
A set is defined by a property P(x) that is common to the elements of the set.
A sentence P(x) is called a predicate because in English the property is grammatically a predicate
Quantifiers are words or phrases that refer to quantities such as ”some” or ”all” and tell for how many elements a
In English, the words all, some, many, none, and few are used in quantifications
1. Universal quantifier
2. Existential quantifier
Types of Quantifiers
1. Universal quantifier which tells us that a predicate is true for every element under consideration
The universal quantification of a predicate P(x) is the statement “For all values of x, P(x) is true.”
Universal quantification can also be stated in English as “for every x,” “every x,” or “for any x.”
Note that the domain specifies the possible values of the variable x. The meaning of the universal quantification of P
1. Universal quantifier which tells us that a predicate is true for every element under consideration
EXAMPLE Let P (x) be the statement “x + 1 > x.” What is the truth value of the quantification ∀x P(x), where the
Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the domain consists
Solution: Q(x) is not true for every real number x, because, for instance, Q(3) is false. That is, x = 3 is a counter-
In some situations we only require that there be at least one value for which the predicate is true
2. Existential quantifier, which tells us that there is one or more element under consideration for which the predicate
is true.
In English ∃x can also be read “there is an x,” “there is some x,” “there exists an x,” or “there is at least one x.”
2. Existential quantifier, there is one or more elements under consideration for which the predicate is true.
Let P (x) denote the statement “x > 3.” What is the truth value of the quantification ∃xP (x), where the
Solution: Because “x > 3” is sometimes true—for instance, when x = 4 -- the existential quantification of P (x),
2. Existential quantifier, there is one or more elements under consideration for which the predicate is true.
Let Q(x) denote the statement “x = x + 1.” What is the truth value of the quantification ∃xQ(x), where the
Solution: Because Q(x) is false for every real number x, the existential quantification of Q(x), which is ∃xQ(x), is
false.
Types of Quantifiers
Tautology , Contradiction and Contingency