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

[Handout] Predicate Logic_240123_212401

The document covers the fundamentals of Predicate Logic, focusing on predicates and quantifiers. It defines predicates, discusses their properties, and explains universal and existential quantifiers with examples. Additionally, it addresses free and bound variables, logical equivalences, negations of quantifiers, and the truth values of nested quantifiers.

Uploaded by

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

[Handout] Predicate Logic_240123_212401

The document covers the fundamentals of Predicate Logic, focusing on predicates and quantifiers. It defines predicates, discusses their properties, and explains universal and existential quantifiers with examples. Additionally, it addresses free and bound variables, logical equivalences, negations of quantifiers, and the truth values of nested quantifiers.

Uploaded by

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

CSM 165: Predicate Logic

Kwame Atta Gyamfi (PhD)

Dept. of Mathematics
KNUST

January 16, 2024


Summary of topics

1 Predicates

2 Quantifiers
Predicates Quantifiers

Summary of topics

1 Predicates

2 Quantifiers

1 / 20
Predicates Quantifiers

Predicates I

Definition 1 (Predicate)
A predicate refers to the part of a sentence that attributes a
property of the subject.

Example 2

Ghana is rich in natural resources.


x represents the world population.
...

2 / 20
Predicates Quantifiers

Some key concepts

1 A predicate contains a finite number of variables.


2 A predicate becomes a propositional statement when
specific values are substituted for the variables.

Illustration
1 A predicate that just involves only one variable x may be
denoted by P(x).
2 Here, P is the notation for the propositional function and
x is the variable mostly for the subject.
3 The statement P(x) is said to be the value of the
propositional function P defined at x.
4 A propositional function is neither True nor False, unless a
value of the variable has been assigned from its Domain.
3 / 20
Predicates Quantifiers

Domain of discourse
Domain of discourse: Is the set of all values of a variable that
can replace it.

4 / 20
Predicates Quantifiers

Exercises

Example 3
Discuss the following statements in the context of predicate
logic.
(a) The statement x > 2, for x = 0 and x = 7.2, where the
domain for the variable consists of all real numbers.
(b) x 2 + y 2 = z 2 , for x = 3, y = 4, z = 5 and for
x = 5, y = 6 , z = 7, where the domain for each of the
three variables consists of all positive variables.

5 / 20
Predicates Quantifiers

Summary of topics

1 Predicates

2 Quantifiers

6 / 20
Predicates Quantifiers

Quantifiers

Any type of logic with quantifiers is called Predicate logic.

proposition logic Predicate logic

1 Some people in this class 1 There exists a person in this


have red eyes. room that has red eyes.
2 All cats like to chase all 2 For each cat x, and each
mice. mouse y , cat x likes to chase
3 Every person has a mouse y .
mother. 3 For each person A, there
exists a woman B such that B
is the mother of A.

7 / 20
Predicates Quantifiers

Universal quantifier I
Let P(x) be an expression with a free variable x. Let U be the
collection of all possible values of x.
Definition 4 (Universal quantifier)
A universal quantifier applied to P(x) is the statement,
denoted (∀x in U)P(x), which is true for all possible value x in
U.
Statements with the universal quantifiers can also be stated as:
For all values of x in U, the statement P(x) is true.
For each x in U, the statement P(x) is true;
The statement P(x) is true for all x in U.
All values of x in U satisfy the P(x).
A value for x for which P(x) is false is called a
counterexample to the universal statement ∀xP(x).
8 / 20
Predicates Quantifiers

Unviversal quantifier II

Example 5
Determine
√ the truth values of the universal statement
∀x(x ≥ x) for the following domains.
(a) All positive integers less than or equal to 3.
(b) All positive real numbers less than or equal to 3.

9 / 20
Predicates Quantifiers

Existential quantifier
Let P(x) be an expression with a free variable x.
Let U be the collection of all possible values of x.

Definition 6 (Existential quantifier)


A existential quantifier applied to P(x) is the statement,
denoted (∃x in U)P(x), which is true for at least one of x in U.

Different ways of saying


There exists some x in U such that P(x) holds;
There is x in U such that P(x) holds;
There exists at least one x in U such that P(x) holds;
For some value of x in U, the condition P(x) holds;
It is the case that P(x) is true for some x in U.
10 / 20
Predicates Quantifiers

Example 7
Determine
√ the truth values of the universal statement
∃x(x < x) for the following domains.
(a) All positive integers less than or equal to 3.
(b) All positive real numbers less than or equal to 3.

Example 8

1 ”Some integers are even and prime”


”There exists x such that x is even and x is prime”
E(x) = ”x is an even number” M(x) = ”x is a prime
number”
2 (∃x ∈ Z) [E(x) ∧ M(x)]

11 / 20
Predicates Quantifiers

Free and bound variables


Let P(x) and Q(x, y ) be predicates.
A variable x is called a free variable of P(x) if the set of
possible values is not limited (or specified).
A variable x is called a bound variable of P(x) if the set
of possible values is limited (or specified).

Example 9

P(x, y ) = ”x + y > 0.” Here x, y are free variables.


Q(y ) = ”For all positive real numbers x, the inequality
x + y > 0 holds.” Here y is a free variable and x is a bound
variable.
P = ”For all positive real numbers x and all real numbers
y, the inequality x + y > 0 holds.”
12 / 20
Predicates Quantifiers

Logical equivalences

13 / 20
Predicates Quantifiers

Bound and free variables II: Examples


Example 10
Identify the bound and free variables and the scopes of the
quantifiers in the following statement.

(∃x(x − y + z = 2)) ∨ (∀y(x − y − z = 1)) .

Show that ∃x(P(x) ∨ Q(x)) and ∃xP(x) ∨ ∃xQ(x) are


logically equivalent.
Show that ∀xP(x) ∨ ∀xQ(x) and ∀x(P(x) ∨ Q(x)) are not
logically equivalent.
Show that ∃xP(x) ∧ ∃xQ(x) and ∃x(P(x) ∧ xQ(x)) are not
logically equivalent.
14 / 20
Predicates Quantifiers

Negations of quantifiers
The rules for negations of quantified statements, which are
called De Morgan’s laws for quantifiers, are as follows:
(
∀xP(x) ≡ ∃xP(x)
∃xP(x) ≡ ∀xP(x)

Example 11
Determine the negations of the following statements:
All prime numbers are odd.
There is an honest politician.
Rich people do not have empathy.
Some people do not live to be 100 years old.
Every person who is a vegetarian is healthy.
Some people weigh more than 100 kg and are not healthy. 15 / 20
Predicates Quantifiers

Nested Quantifiers
1 We can form statements with more than one quantifier, as
long as different quantifiers involve different variables.
Suppose P(x, y) = ”x + y 2 = 3” where x, y ∈ R.
(∀y )(∃x)P(x, y) is a valid statement.
For all y , there exists x such that x + y 2 = 3.
For each y, there is some x such that x + y 2 = 3.
Statement is true since x = 3 − y 2 .
2 The order of appearance of the quantifiers is important.
(∃y )(∀x)P(x, y) is different from (∀y )(∃x)P(x, y ).
There exists some x such that for all y , the equation
x + y 2 = 3 holds. FALSE.
A very important occurrence of the importance of the order
of multiple quantifiers is in the “ϵ-δ” proofs treated in real
analysis
 courses.

lim f (x) = L ⇔ ∀ϵ > 0 : ∃δ > 0 : ∀x : (|x − a| < δ) →
x→a
(|f (x) − L| < ϵ)
16 / 20
Predicates Quantifiers

Statement When true? When false?


(∀x)(∀y )P(x, y) P(x, y) is true There exist a pair x, y
(∀y )(∀x)P(x, y) for every pair (x, y). for which P(x, y ) is false.
(∀x)(∃y )P(x, y) For every x there There exist x such
is a y for which that P(x, y) is false
P(x, y) is true. for every y.
(∀y )(∃x)P(x, y) For every y there is There exist y such
an x for which that P(x, y) is
P(x, y) is true. false for every x.
(∃x)(∀y )P(x, y) There exist x for For every x there
which P(x, y) is a y for which
is true for every y. P(x, y ) is false.
(∃y )(∀x)P(x, y) There exist y for For every y there
which P(x, y) is is an x for
true for every x. which P(x, y ) is false.
(∃x)(∃y )P(x, y) There exist a pair x, y P(x, y ) is false
(∃y )(∃x)P(x, y) for which P(x, y) for every pair x, y .
17 / 20
Predicates Quantifiers

Truth value of nested qantifiers

Example 12

1 The statement ”∃x ∈ R such that x + 2 = 7” is true.


Because, we can choose x = 5
2 The statement ”x + 2 = 7 ∀x ∈ R” is false.
Because x + 2 ̸= 7 when x ̸= 5.
3 The statement ”∀y ∈ R ∃x ∈ R such that x + y = 4” is true.
Because no matter what value of x is chosen, we can
choose y = 4 − x. Furthermore, we have
x + y = x + (4 − x) = 4.
4 The statement ”∃y ∈ R such that ∀x ∈ R, x + y = 4” is
false.

18 / 20
Predicates Quantifiers

Guidelines for Truth value of nested quantifiers


Think of it in terms of a competitive game to conclude
whether a proposition with nested quantifiers is true.
1 The game has two players, both with the same
knowledge but different roles:
- Verifier: Wants to demonstrate that the proposition is true.
- Falsifier: Wants to demonstrate that the proposition is
false.
The Rules of the Game ”Verify or Falsify”:
2 Read the quantifiers from left to right, choosing values of
variables.
- When you see ∀, then falsifier gets to select the value.
- When you see ∃, then verifier gets to select the value.
3 If the verifier can always win, then the proposition is true.
4 If the falsifier can always win, then it is false.
19 / 20
Predicates Quantifiers

Example 13

1 Attempt to play the game with Example 12.


Sometimes helpful to use parentheses: ”∃y ∈ R (such that
∀x ∈ R, (x + y = 4))”.
2 Play the game: Let B(x, y) := “x’s birthday is followed
within 7 days by y ′ s birthday.”
Suppose I claim that among you: ∃x ∀y B(x, y ).
What about ∀x ∃y B(x, y)?

20 / 20

You might also like