0% found this document useful (0 votes)
9 views28 pages

Predicate Logic

The document discusses the limitations of propositional logic and introduces predicate logic as a more expressive alternative. It explains the concepts of propositional functions, predicates, and quantification, including universal and existential quantifiers, along with their truth conditions. Additionally, it covers the negation of quantified expressions and provides examples to illustrate these concepts.

Uploaded by

Ch Ahtasham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views28 pages

Predicate Logic

The document discusses the limitations of propositional logic and introduces predicate logic as a more expressive alternative. It explains the concepts of propositional functions, predicates, and quantification, including universal and existential quantifiers, along with their truth conditions. Additionally, it covers the negation of quantified expressions and provides examples to illustrate these concepts.

Uploaded by

Ch Ahtasham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Discrete Structures

Why Predicate Logic?


• Propositional Logic is not expressive enough
• It cannot adequately express the meaning of statements in
mathematics and in natural language

Example 1:
“Every computer connected to the university
network is functioning properly.”
• No rules of propositional logic allow us to
conclude the truth of the statement.
Why Predicate Logic?

Example 2:
• “There is a computer on the university network that is
under attack by an intruder.”

Predicate Logic is more expressive


and powerful
Predicate Logic
• Proposition, YES or NO?

•3+2=5 Yes

•X+2=5 No

• X + 2 = 5 for any choice of X in {1, 2, 3} Yes

• X + 4 = 5 for some X in {1, 2, 3} Yes

• Computer X is under attack by an intruder No


Propositional Functions(Example)
• “x is greater than 3” or (x > 3)
• The variable x: subject of the statement
• “is greater than 3”: predicate
• P(x): propositional function P at x

• Let P(x) = x > 3


• P(x) has no truth values (x is not given a value)
• P(10) is true: The proposition 10 > 3 is true.
• P(1) is false: The proposition 1 > 3 is false.
• P(x) will create a proposition when given a value
Propositional Functions
• Functions with multiple variables:
• P(x,y) = x + y == 0
• P(1,2) is false, P(1,-1) is true
• P(x,y,z) = x + y == z
• P(3,4,5) is false, P(1,2,3) is true
• P(x1,x2,x3 … xn) = …
• Anatomy of a propositional function
• P(x) = x + 5 > x

variable predicate
Predicates

• A predicate is a declarative statement with at least


one variable (i.e. unknown value).
• A predicate, or propositional function, is a function that
takes some variable(s) as arguments and returns True
or False.
Predicates
• Suppose Q(x,y) = “x > y”

Proposition, YES or NO?


Q(x,y) No

Q(3,4) Yes

Q(x,9) No
Predicate, YES or NO?
Q(x,y) Yes

Q(3,4) No

Q(x,9) Yes
Quantification
• Quantification expresses the extent to which a predicate is
true over a range of elements.
• In English, the words all, some, many, none, and few are
used in quantifications.
• The area of logic that deals with predicates and
quantifiers is called the predicate calculus.
Types of Quantifiers
• A quantifier is “an operator that limits the
variables of a proposition”.

• Two types:
• Universal
• Existential
Universal Quantifiers
• Represented by an upside-down A: 
• It means “for all”
• Let P(x) = x+1 > x
• We can state the following:
• x P(x)
• English translation: “for all values of x, P(x) is
true”
• English translation: “for all values of x, x+1>x is
true”
Besides “for all”, universal quantification can be expressed
in many other ways: “for every”, “all of”, “for each”, “given
any”, “for arbitrary”, “for each” and “for any”
Universal Quantifiers

Universal Quantifiers
• Let the universe of discourse be the real numbers.
• Let P(x) = x/2 < x
• Not true for the negative numbers!
• Thus, x P(x) is false, When the domain is all the real numbers

• In order to prove that a universal quantification is true, it


must be shown for ALL cases

• In order to prove that a universal quantification is false, it


must be shown to be false for only ONE case
Universal Quantifiers

Universal Quantification
• Given some propositional function P(x) And values in the
universe x1 .. xn

• The universal quantification x P(x) implies:

• P(x1)  P(x2)  …  P(xn)


Question

Question

Existential Quantification
• Represented by an backwards E: 
• It means “there exists”, there is”, “for some”, etc.
• Let P(x) = x+1 > x

• We can state the following:


• x P(x)
• English translation: “there exists (a value of) x such
that P(x) is true”
• English translation: “for at least one value of x, x+1>x
is true”
• English translation: “for some x, P(x)”
Existential Quantification
• The existential quantifier of P(x) is the
proposition:
• “P(x) is true for some x in the universe of discourse.”

• x P(x) is TRUE if there is an x for which P(x) is


true.
• x P(x) is FALSE if P(x) is false for every single
x.
Existential Quantification
• Note that you still have to specify your universe

• Let P(x) = x+1 < x


• There is no numerical value x for which
x+1<x
• Thus, x P(x) is false
Existential Quantification

• Let P(x) = x+1 > x


• There is a numerical value for which x+1>x
• In fact, it’s true for all of the values of x. Thus,  x
P(x) is true

• In order to show an existential quantification is true, you


only have to find ONE value

• In order to show an existential quantification is false, you


have to show it’s false for ALL values
Existential Quantification

• Example: 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.
Existential Quantification

• Example: 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.
Existential Quantification
• Given some propositional function P(x) And values in the
universe x1 .. xn

• The existential quantification x P(x) implies:

• P(x1)  P(x2)  …  P(xn)


Summary

Statement When True? When False?


xP(x) P(x) is true for every x. There is an x for which
P(x) is false.
∃x P(x) There is an x for which P(x) is false for every x.
P(x) is true.
A note on quantifiers
• Recall that P(x) is a propositional function
• Let P(x) be “x == 0”
• Recall that a proposition is a statement that is either
true or false
• P(x) is not a proposition
• There are two ways to make a propositional function
into a proposition:
• Supply it with a value
• For example, P(5) is false, P(0) is true
• Provide a quantification
• For example, x P(x) is false and x P(x) is true
• Let the universe of discourse be the real numbers
Negating Quantified Expressions
• Consider the statement
“Every student in this class has studied calculus.”
• This statement is a universal quantification, namely,
∀xC(x),
• C(x) is the statement “x has studied calculus”
• Domain consists of the students in the class.
• The negation of this statement is
• “It is not the case that every student in this class has studied
calculus.”
• This is equivalent to “There is a student in this class who has not
studied calculus.”
• This is simply the existential quantification of the negation
of the original propositional function, namely, ∃x ¬ C(x).
De Morgan’s Laws for Quantifiers

You might also like