Professional Documents
Culture Documents
ioc.pdf
4 Examples
ioc.pdf
4 Examples
ioc.pdf
Classical example
From the propositions
Socrates is a man.
Socrates is mortal.
ioc.pdf
Classical example
From the propositions
Socrates is a man.
Socrates is mortal.
ioc.pdf
ioc.pdf
ioc.pdf
for a given n ∈ {0, 1, . . .}, a predicate is a n-ary function (=a function with n arguments)
of type
P : D1 × . . . × Dn → {T , F }
U = D1 × . . . × Dn is the domain (or the universe) of the predicate P;
the statement P(x1 , . . . , xn ), becomes a proposition (representing a property of its
arguments) if either x1 ∈ D1 , . . . , xn ∈ Dn or all variables x1 , . . . , xn are bound by quantiers
(see next slides).
Example 1
Let P(x) denote x > 2 and U = Z. Then
P(5) is true;
P(2) is false.
Example 2
Let R(x, y , z) denote the statement x + y = z and U = Z. Then
R(1, 2, 3) is true;
for a given n ∈ {0, 1, . . .}, a predicate is a n-ary function (=a function with n arguments)
of type
P : D1 × . . . × Dn → {T , F }
U = D1 × . . . × Dn is the domain (or the universe) of the predicate P;
the statement P(x1 , . . . , xn ), becomes a proposition (representing a property of its
arguments) if either x1 ∈ D1 , . . . , xn ∈ Dn or all variables x1 , . . . , xn are bound by quantiers
(see next slides).
Example 1
Let P(x) denote x > 2 and U = Z. Then
P(5) is true;
P(2) is false.
Example 2
Let R(x, y , z) denote the statement x + y = z and U = Z. Then
R(1, 2, 3) is true;
for a given n ∈ {0, 1, . . .}, a predicate is a n-ary function (=a function with n arguments)
of type
P : D1 × . . . × Dn → {T , F }
U = D1 × . . . × Dn is the domain (or the universe) of the predicate P;
the statement P(x1 , . . . , xn ), becomes a proposition (representing a property of its
arguments) if either x1 ∈ D1 , . . . , xn ∈ Dn or all variables x1 , . . . , xn are bound by quantiers
(see next slides).
Example 1
Let P(x) denote x > 2 and U = Z. Then
P(5) is true;
P(2) is false.
Example 2
Let R(x, y , z) denote the statement x + y = z and U = Z. Then
R(1, 2, 3) is true;
Denition
The universal quantication of P(x) is the statement
The notation ∀xP(x) denotes the universal quantication of P(x). Here ∀ is called the universal
quantier. We read ∀xP(x) as for all x P(x) or for every x P(x). An element for which P(x)
is false is called a counterexample of ∀xP(x).
ioc.pdf
Denition
The universal quantication of P(x) is the statement
The notation ∀xP(x) denotes the universal quantication of P(x). Here ∀ is called the universal
quantier. We read ∀xP(x) as for all x P(x) or for every x P(x). An element for which P(x)
is false is called a counterexample of ∀xP(x).
Examples
Let P(x) be the statement x + 1 > x and domain is Z. Then the quantication ∀xP(x)
is true.
Let Q(x) be the statement x < 2 and domain is Z. Then the quantication ∀xQ(x) is
false.
2
Let R(x) be the statement x > 0 and domain is R. Then the quantication ∀xR(x) is
false. A counterexample here is x = 0.
ioc.pdf
Denition
The universal quantication of P(x) is the statement
The notation ∀xP(x) denotes the universal quantication of P(x). Here ∀ is called the universal
quantier. We read ∀xP(x) as for all x P(x) or for every x P(x). An element for which P(x)
is false is called a counterexample of ∀xP(x).
Aanother example
2
Let P(x) be the statement x > x and domain is R. Then the quantication ∀xP(x) is
1
false. A counterexample is x= 2
.
ioc.pdf
Denition
The existential quantication of P(x) is the statement
We use the notation notation ∃xP(x) for the existential quantication of P(x). Here ∃ is called
the existential quantier.
Remark: The meaning of ∃xP(x) changes when the domain changes. Without
specifying the domain, the statement ∃xP(x) has no meaning.
Examples
Let P(x) be the statement x > 3 and domain is R. Then the quantication ∃xP(x) is
true.
Let Q(x) be the statement x = x + 1 and domain is R. Then the quantication ∃xQ(x)
is false.
ioc.pdf
Denition
The existential quantication of P(x) is the statement
We use the notation notation ∃xP(x) for the existential quantication of P(x). Here ∃ is called
the existential quantier.
Remark: The meaning of ∃xP(x) changes when the domain changes. Without
specifying the domain, the statement ∃xP(x) has no meaning.
Examples
Let P(x) be the statement x > 3 and domain is R. Then the quantication ∃xP(x) is
true.
Let Q(x) be the statement x = x + 1 and domain is R. Then the quantication ∃xQ(x)
is false.
ioc.pdf
The quantiers are said to bind the variable x in the expressions ∀xP(x) and ∃xP(x).
Variables in the scope of some quantier are called bound variables. All other variables in
the expression are called free variables.
A propositional function that does not contain any free variables is a proposition and has
a truth value.
ioc.pdf
The quantiers are said to bind the variable x in the expressions ∀xP(x) and ∃xP(x).
Variables in the scope of some quantier are called bound variables. All other variables in
the expression are called free variables.
A propositional function that does not contain any free variables is a proposition and has
a truth value.
ioc.pdf
The quantiers are said to bind the variable x in the expressions ∀xP(x) and ∃xP(x).
Variables in the scope of some quantier are called bound variables. All other variables in
the expression are called free variables.
A propositional function that does not contain any free variables is a proposition and has
a truth value.
Examples
In the statement ∃x(x + y = 1), the variable x is bound, but the variable y is free;
ioc.pdf
Even if the domains are innite, you can still think of the quantiers in this fashion, but
the equivalent expressions without quantiers will be innitely long.
ioc.pdf
Even if the domains are innite, you can still think of the quantiers in this fashion, but
the equivalent expressions without quantiers will be innitely long.
ioc.pdf
Even if the domains are innite, you can still think of the quantiers in this fashion, but
the equivalent expressions without quantiers will be innitely long.
Example
Let P(x) be the statement x
2
< 10. Then it is true for the domain U1 = {1, 2, 3}, but it is
false for the domain U2 = {1, 2, 3, 4}.
ioc.pdf
Example 1
Statement: Every real number has an inverse w.r.t. addition
Domain U = R. The property is expressed by
∀x∃y (x + y = 0)
ioc.pdf
Example 1
Statement: Every real number has an inverse w.r.t. addition
Domain U = R. The property is expressed by
∀x∃y (x + y = 0)
Example 2
Statement: Every real number except zero has a multiplicative inverse.
Domain U = R. The property is expressed by
ioc.pdf
∀x < 0.(x 2 > 0) is another way of expressing ∀x(x < 0 → x 2 > 0).
√ √
∀x ∈ A.(0 < x 6 5) is another way of expressing ∀x(x ∈ A → (0 < x) ∧ (x 6 5)).
2 2
∃z > 0.(z = 2) is another way of expressing ∃z(z > 0 ∧ z = 2).
ioc.pdf
The quantiers ∀ and ∃ have higher precedence than all logical operators
from propositional calculus
For example
∀xP(x) ∨ Q(x) means (∀xP(x)) ∨ Q(x) rather than ∀x(P(x) ∨ Q(x)).
ioc.pdf
4 Examples
ioc.pdf
Examples
∀x.¬¬S(x) ≡ ∀x.S(x)
∀x.(P(x) ∧ Q(x)) ≡ ∀x.P(x) ∧ ∀x.Q(x)
∀x.∀y .P(x, y ) ≡ ∀y .∀x.P(x, y )
∀x.∃y .P(x, y ) 6≡ ∃y .∀x.P(x, y )
ioc.pdf
Examples
∀x.¬¬S(x) ≡ ∀x.S(x)
∀x.(P(x) ∧ Q(x)) ≡ ∀x.P(x) ∧ ∀x.Q(x)
∀x.∀y .P(x, y ) ≡ ∀y .∀x.P(x, y )
∀x.∃y .P(x, y ) 6≡ ∃y .∀x.P(x, y )
ioc.pdf
Examples
∀x.¬¬S(x) ≡ ∀x.S(x)
∀x.(P(x) ∧ Q(x)) ≡ ∀x.P(x) ∧ ∀x.Q(x)
∀x.∀y .P(x, y ) ≡ ∀y .∀x.P(x, y )
∀x.∃y .P(x, y ) 6≡ ∃y .∀x.P(x, y )
ioc.pdf
Examples
∀x.¬¬S(x) ≡ ∀x.S(x)
∀x.(P(x) ∧ Q(x)) ≡ ∀x.P(x) ∧ ∀x.Q(x)
∀x.∀y .P(x, y ) ≡ ∀y .∀x.P(x, y )
∀x.∃y .P(x, y ) 6≡ ∃y .∀x.P(x, y )
ioc.pdf
Examples
∀x.¬¬S(x) ≡ ∀x.S(x)
∀x.(P(x) ∧ Q(x)) ≡ ∀x.P(x) ∧ ∀x.Q(x)
∀x.∀y .P(x, y ) ≡ ∀y .∀x.P(x, y )
∀x.∃y .P(x, y ) 6≡ ∃y .∀x.P(x, y )
ioc.pdf
ioc.pdf
ioc.pdf
ioc.pdf
4 Examples
ioc.pdf
An assertion in predicate calculus is logically valid (or simply valid) if it is true in every
interpretation, that is i it is true
for every propositional functions substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic.
Example
∀x.(P(x) ∨ ¬P(x))
ioc.pdf
An assertion in predicate calculus is logically valid (or simply valid) if it is true in every
interpretation, that is i it is true
for every propositional functions substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic.
Example
∀x.(P(x) ∨ ¬P(x))
ioc.pdf
for some propositional functions that can be substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic.
Examples
∀x.∃y .P(x, y ) is satisable
The domain N, and the propositional function 6 satisfy this assertion.
ioc.pdf
for some propositional functions that can be substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic.
Examples
∀x.∃y .P(x, y ) is satisable
The domain N, and the propositional function 6 satisfy this assertion.
ioc.pdf
4 Examples
ioc.pdf
Proposition
√
∀x ∈ R+ . Irrational(x) → Irrational( x)
Proof. Let x be positive real number. We will show the contrapositive, i.e.
√
∀x ∈ R+ . Rational( x) → Rational(x)
√
In other words we prove that if x is rational then so is x.
√
Assume that x is a rational number. Then, by denition, there must exists
√
two natural numbers m and n such that x = m/n. But then x = m2 /n2 and,
2 2
since m and n are natural numbers, which by denition implies that x is a
rational number as required.
ioc.pdf
Let Even(x) denote the propositional function x is even, and Odd(x) = ¬Even(x)
Proposition
∀n ∈ Z. Even(n) ↔ Even(n2 )
ioc.pdf
Proposition
∀k ∈ N. ∃i ∈ N. ∃j ∈ N. 4k = i 2 − j 2
ioc.pdf
Remark: Formula a ≡ b (mod 4) stands for the proposition b is the remainder after
division of a by 4.
Proposition
∀n ∈ Z. n2 ≡ 0 (mod 4) ∨ n2 ≡ 1 (mod 4)
(1). Assume n is even. Then there exists m such that n = 2m. But then
n2 = 4m2 ≡ 0 (mod 4).
(2). Assume n is odd. Then there exists m such that n = 2m + 1. But then
n2 = 4m2 + 4m + 1 = 4(m2 + m) + 1 ≡ 1 (mod 4).
ioc.pdf