Section 2. Predicate Logic: Discussion
Section 2. Predicate Logic: Discussion
Predicate Logic
Discussion:
Definition: Predicate
Definition: Domain
WUCT121 Logic 60
Definition: Truth Set
Examples:
8 = 1 8, 8 = 2 4
{n + :" n is a factor of 8"} = {1, 2, 4, 8}
WUCT121 Logic 61
Exercises:
WUCT121 Logic 62
2.1. Quantifiers
Examples:
WUCT121 Logic 63
Consider A = { x1 , x2 , x3 } . With x A, P( x ) , the
Exercises:
WUCT121 Logic 64
Exercises:
x , x
x , x 2 1.
WUCT121 Logic 65
2.1.2. Existential Quantifier
Examples:
WUCT121 Logic 66
Exercises:
WUCT121 Logic 67
Exercises:
m , m 2 = m
x , x 2 = 1.
1
x ,
x
WUCT121 Logic 68
2.1.3. Negation of Universal Statements
Symbolically ~ (x D, P( x )) x D, ~ P( x )
Example:
x , x 2 + 1 2 x
Negation:
~ (x , x 2 + 1 2 x )
x , ~ ( x 2 + 1 2 x )
x , x 2 + 1 < 2 x
False.
WUCT121 Logic 69
Exercises:
x , x 2 0
WUCT121 Logic 70
Example:
WUCT121 Logic 71
Exercises:
WUCT121 Logic 72
2.1.4. Negation of Existential Quantifiers
Symbolically ~ (x D, P( x )) x D , ~ P( x )
Example:
x , x 2 = 2
Negation:
~ (x , x 2 = 2)
x , ~ ( x 2 = 2)
x , x 2 2
The negation is true.
WUCT121 Logic 73
Exercises:
WUCT121 Logic 74
Example:
Exercises:
WUCT121 Logic 75
Write the following statement using quantifiers. Find
the negation.
Some computer hackers are over 40.
WUCT121 Logic 76
2.1.5. Multiple Quantifiers
Examples:
WUCT121 Logic 77
Exercises:
WUCT121 Logic 78
Examples:
x ,, y , x + y = 0
Statement: Given any real number, you can find a real
number so that the sum of the two is zero. Alternatively:
Every real number has an additive inverse.
x ,, y , x + y = y
Statement: There is a real number, which added to any
other real number results in the other number.
Alternatively: Every real number has an additive identity.
Exercises:
WUCT121 Logic 79
2.1.6. Interpreting Statements with Multiple
Quantifiers
predicate P( x, y ) .
WUCT121 Logic 80
For x A, y B, P( x, y ) to be true, the following
must hold:
P( x1 , y1 ) P( x1 , y 2 )
P( x 2 , y1 ) P( x 2 , y 2 )
P( x3 , y1 ) P( x3 , y 2 )
WUCT121 Logic 81
For x A, y B, P( x, y ) to be true, the following
must hold:
P( x1 , y1 ) P( x1 , y 2 )
P( x 2 , y1 ) P( x 2 , y 2 )
P( x3 , y1 ) P( x3 , y 2 )
Summary:
WUCT121 Logic 82
2.1.7. Negation of Statements with Multiple
Quantifiers.
To negate x A, y B, P( x, y )
~ (x A, y B, P( x, y ) ) x A, y B, ~ P( x, y )
To negate x A, y B, P( x, y )
~ (x A, y B, P( x, y ) ) x A, y B, ~ P( x, y )
To negate x A, y B, P( x, y )
~ (x A, y B, P( x, y ) ) x A, y B, ~ P( x, y )
To negate x A, y B, P( x, y )
~ (x A, y B, P( x, y ) ) x A, y B, ~ P( x, y )
Examples:
Statement: x ,, y , x + y = 0
Negation:
~ (x ,, y , x + y = 0 )
x ,, y , x + y 0
False: Take y = x , then x + y = x x = 0
WUCT121 Logic 83
Statement: x ,, y , xy = 1
Negation:
~ (x ,, y , xy = 1)
x ,, y , xy 1
True : Take y = x, then xy = x 2 1
Exercises:
WUCT121 Logic 84