Lecture No 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

Discrete Structures

Lecture No: 03
First Order Logic / Predicate Logic
Instructor: Muhammad Ramzan
Email Address: [email protected]
Lecture Agenda

 Limitation of Propositional Logic


 First Order Logic
 Building Blocks of First-Order Logic
 Predicate
 Quantifiers
 Types of Quantifiers
Limitations of Propositional Logic

 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

 PL is not sufficient to represent complex sentences or natural language statements.

 The propositional logic has very limited expressive power. Consider the following sentence, which we cannot

represent using PL logic.

 “All students are interested in the Artificial Intelligence course ”

 “Some students are interested in the Artificial Intelligence course


First Order Logic / Predicate Logic

 Philosophers have developed First Order Logic to overcome the limitations of propositional logic.

 Actually First Order Logic is an advanced form of propositional logic.

 Definition: A logic on quantified statements is called Predicate 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

 In first-order logic, there are three kinds of basic building blocks:

1) constant

2) Variables

3) predicates

1) Constants: refer to specific objects. Such as Pakistan, 6, Ramzan, CS311, . . .

2) Variables: range over objects. Such as : x,y,z, . . .

3) Predicates describe properties of objects or relationships between objects Examples: Fly, Eat, Run, Beautiful . . .
Building Blocks of First-Order Logic

 To use a predicate there must at least two (2) elements;

 function

 Variable

 For example

 An ostrich has wings that can fly

 An eagle has wings that can fly

 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

 An ostrich has wings that can fly

 An eagle has wings that can fly


Building Blocks of First-Order Logic

 Everyone who enrolled in the university lives in a hostel.

 Mr. Jonson has never lived in a hostel.

 Reason: Mr. Jonson is not enrolled in the university

 Our target is to determine whether the above-mentioned argument is correct or not.

 For this, we should understand ‘ Predicate Logic / First Order Logic’

 In order to understand Predicate Logic, we must understand the following

 Predicate

 Quantifiers
Predicate

 A predicate is an ‘incomplete’ expression.

 Example: an expression with one or more blanks such that Whenever the blanks are filled by noun

phrases, the resulting expression is a sentence.

Example: ____ students are not enrolled in ______.

Ans : Some Students are not enrolled in the discrete class.

Ans: Few Students are not enrolled in the discrete class.


Predicate

• 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

1. Predicates are symbolized by Upper case Letters.

2. Subjects are symbolized by lower case Letters

3. Predicates are Placed first

4. Subject are placed second

For example

 Add(x, y)

 Add denotes predicate

 x , y denotes the subject or variable


Quantifiers

 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.

 P(x) is also called a propositional function.

 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

given predicate is true.


Quantifiers
Quantifiers

 In English, the words all, some, many, none, and few are used in quantifications

 “All students are very intelligent“

 "Some transporter companies provide the best services to passengers."


Types of Quantifiers

 Quantifiers are mainly divided into two types

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.”

 The universal quantification of P(x) is denoted ∀x P(x).

 The symbol ∀ is called the universal quantifier.

 Note that the domain specifies the possible values of the variable x. The meaning of the universal quantification of P

(x) changes when we change the domain.


Types of Quantifiers

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

domain consists of all real numbers?

 Solution: Because P (x) is true for all real numbers x,

 The quantification ∀xP (x) is true.


Types of Quantifiers

 Let Q(x) be the statement “x < 2.” What is the truth value of the quantification ∀xQ(x), where the domain consists

of all real numbers?

 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-

example for the statement ∀xQ(x).

 Thus ∀xQ(x) is false.


Types of Quantifiers

 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.

 The existential quantification of P(x) is denoted ∃x P(x).

 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.”

 The symbol ∃ is called the existential quantifier.


Types of Quantifiers

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

domain consists of all real numbers?

 Solution: Because “x > 3” is sometimes true—for instance, when x = 4 -- the existential quantification of P (x),

which is ∃xP (x), is true.


Types of Quantifiers

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

domain consists of all real numbers?

 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

You might also like