Discrete Mathematics : Predicate Logic
Contents
- Predicates and quantified statements
- Statements with multiple quantifiers
- Arguments with quantified statements
What is a propositional function or predicate?
A propositional function or predicate is a sentence
that contains one or more variables.
A predicate is neither true nor false.
A predicate becomes a proposition when the variables are substituted with specific values.
The
domain of a predicate variable is the set of all values that may be
substituted for the variable.
Examples:
| Symbol |
Predicate |
Domain |
Propositions |
| $p(x)$ |
$x > 5$ |
$x \in \mathbb{R}$ |
$p(6), p(-3.6), p(0), \ldots$ |
| $p(x, y)$ |
$x+y$ is odd |
$x \in \mathbb{Z}, y \in \mathbb{Z}$ |
$p(4,5), p(-4,-4), \ldots$ |
| $p(x, y)$ |
$x^2 + y^2 = 4$ |
$x \in \mathbb{R}, y \in \mathbb{R}$ |
$p(-1.7,8.9), p(-\sqrt{3},-1), \ldots$ |
What is a truth set?
Definition: A truth set of a predicate is the set of all values of the predicate that makes
the predicate true
If $p(x)$ is a predicate and $x$ has domain $D$, then the truth set of $p(x)$ is the set of all elements
of $D$ that makes $p(x)$ true when the values are substituted for $x$.
Truth set of $p(x) = \{ x \in D ~|~ p(x) \}$
Examples:
| Symbol |
Predicate |
Domain |
Truth set |
| $p(x)$ |
$x > 5$ |
$x \in \mathbb{R}$ |
$\{ p(6), p(13.6), p(5.001), \ldots \}$ |
| $p(x, y)$ |
$x+y$ is odd |
$x \in \mathbb{Z}, y \in \mathbb{Z}$ |
$\{ p(4,5), p(-4,-3), \ldots \}$ |
| $p(x, y)$ |
$x^2 + y^2 = 4$ |
$x \in \mathbb{R}, y \in \mathbb{R}$ |
$\{ p(-2,2), p(-\sqrt{3},-1), \ldots \}$ |
Predicates to propositions
There are two methods to obtain propositions from predicates
- Assign specific values to variables
- Add quantifiers
What are quantifiers?
Quantifiers are words that refer to quantities such as "all" or "some" and they
tell for how many elements a given predicate is true
Two types of quantifiers:
- Universal quantifier $(\forall)$
- Existential quantifier $(\exists)$
Universal quantifier $(\forall)$
Definition: Let $p(x)$ be a predicate and $D$ be the domain of $x$.
A universal statement is a statement of the form
$\forall x \in D, p(x)$
Forms:
- "$p(x)$ is true for all values of $x$"
- "For all $x$, $p(x)$"
- "For each $x$, $p(x)$"
- "For every $x$, $p(x)$"
- "Given any $x$, $p(x)$"
It is true if $p(x)$ is true for each $x$ in $D$; It is false if $p(x)$ is false for at least one $x$ in
$D$
A counterexample to the universal statement is the value of $x$ for which
$p(x)$ is false
| Universal statements |
Domain |
Truth value |
Method |
| $\forall x \in D, x^2 \ge x$ |
$D = \{ 1,2,3 \}$ |
True |
Method of exhaustion |
| $\forall x \in \mathbb{R}, x^2 \ge x$ |
$\mathbb{R}$ |
False |
Counterexample $x = 0.1$ |
Note that method of exhaustion cannot be used to prove universal statements for infinite sets
Existential quantifier $(\exists)$
Definition: Let $p(x)$ be a predicate and $D$ be the domain of $x$. An existential statement is a statement of the form
$\exists x \in D, p(x)$
Forms:
- "There exists an $x$ such that $p(x)$"
- "For some $x$, $p(x)$"
- "We can find an $x$, such that $p(x)$"
- "There is some $x$ such that $p(x)$"
- "There is at least one $x$ such that $p(x)$"
It is true if $p(x)$ is true for at least one $x$ in $D$;
It is false if $p(x)$ is false for all $x$ in
$D$
A counterproof to the existential statement is the proof to show that $p(x)$ is
true is for no $x$
| Universal statements |
Domain |
Truth value |
Method |
| $\exists x \in D, x^2 \ge x$ |
$D = \{ 1,2,3 \}$ |
True |
Method of exhaust. |
| $\exists x \in \mathbb{R}, x^2 \ge x$ |
$\mathbb{R}$ |
True |
Example |
| $\exists x \in \mathbb{Z}, x + 1 \le x$ |
$\mathbb{Z}$ |
False |
How? |
Formal and informal languages
Formal language statement = Mathematical statement using mathematical symbols and variables.
Example: $\forall x \in \mathbb{R}, x^2 \ge 0$
Informal language statement = English statement equivalent to a mathematical statement.
Examples:
- Every real number has a nonnegative square
- All real numbers have nonnegative squares
- Any real number has a nonnegative square
- The square of each real number is nonnegative
- No real numbers have negative squares
- $x^2$ is nonnegative for every real $x$
- $x^2$ is not less than zero for each real number $x$
Universal conditional statement $(\forall, \rightarrow)$
A universal conditional statement is of the form
$\forall x, \text{ if } p(x) \text{ then } q(x)$
Examples:
- $\forall x \in \mathbb{R}$, if $x > 2$ then $x^2 > 4$
- $\forall$ real number $x$, if $x$ is an integer then $x$ is rational
$\equiv \forall$ integer $x$, $x$ is rational
- $\forall x$, if $x$ is a square then $x$ is a rectangle
$\equiv \forall$ square $x$, $x$ is a rectangle
- $\forall x \in U$, if $p(x)$ then $q(x)$
$\equiv \forall x \in D$, $q(x)$
(where, $D = \{ x \in U ~|~ p(x) \text{ is true}\}$)
Similarly, we can define existential conditional statement $(\exists, \rightarrow)$
Implicit quantification $(\Rightarrow, \Leftrightarrow)$
Definition: Let $p(x)$ and $q(x)$ be predicates and $D$ be the common domain of $x$.
Then implicit quantification symbols
$\Rightarrow, \Leftrightarrow$ are defined as:
$p(x) \Rightarrow q(x) \equiv \forall x, p(x) \rightarrow q(x)$
$p(x) \Leftrightarrow q(x) \equiv \forall x, p(x) \leftrightarrow q(x)$
Examples:
- If a number is an integer, then it is a rational number
$\equiv \forall$ number $x$, if $x$ is an integer, $x$ is rational
- The number 10 can be written as a sum of two prime numbers
$\equiv \exists$ prime numbers $p$ and $q$ such that $10 = p + q$
- If $x > 2$, then $x^2 > 4$
$\equiv \forall$ real $x$, if $x > 2$, then $x^2 > 4$
Problem: Consider the following predicates.
$q(n)$: $n$ is a factor of 8; $r(n)$: $n$ is a factor of 4; and $s(n)$: $n < 5$ and $n \ne 3$. Domain of $n$ is $\mathbb{Z}^{+}$ (i.e., positive integers). What are the relationships between $q(n)$, $r(n)$, and $s(n)$ using symbols $\Rightarrow$ and
$\Leftrightarrow$?
Solution:
- Truth set of $q(n) = \{ 1, 2, 4, 8 \} $
Truth set of $r(n) = \{ 1, 2, 4 \} $
Truth set of $s(n) = \{
1, 2, 4 \} $
- $\forall n$ in $\mathbb{Z}^{+}, r(n) \rightarrow q(n)$
$\equiv r(n) \Rightarrow q(n)$
$\equiv$ "$n$ is a factor of 4" $\Rightarrow$ "$n$ is a factor of 8"
- $\forall n$ in $\mathbb{Z}^{+}, r(n) \leftrightarrow s(n)$
$\equiv r(n) \Leftrightarrow s(n)$
$\equiv$ "$n$ is a factor of 4" $\Leftrightarrow$ "$n < 5$ and $n \ne 3$"
- $\forall n$ in $\mathbb{Z}^{+}, s(n) \rightarrow q(n)$
$\equiv s(n) \Rightarrow q(n)$
$\equiv$ "$n < 5$ and $n \ne 3$" $\Rightarrow$ "$n$ is a factor of 8"
Negation of quantified statements $(\sim)$
Definition: Universal statement and existential statement are negations of each other.
$\sim (\forall x \in D, p(x)) \equiv \exists x \in D, \sim p(x)$
$\sim (\exists x \in D, p(x)) \equiv \forall x \in D, \sim p(x)$
Examples:
- All mathematicians wear glasses
Negation (incorrect): No mathematician wears glasses
Negation (incorrect + ambiguous): All mathematicians do not wear glasses
Negation (correct): There is at least one mathematician who does not wear
glasses
- Some snowflakes are the same
Negation (incorrect):: Some snowflakes are different
Negation (correct):: All snowflakes are different
- $\forall$ primes $p$, $p$ is odd
Negation: $\exists$ primes $p$, $p$ is even
- $\exists$ triangle $T$, sum of angles of $T$ equals $200^{\circ}$
$\forall$ triangles $T$, sum of angles of $T$ does not equal $200^{\circ}$
- No politicians are honest
Formal statement: $\forall$ politicians $x$, $x$ is not honest
Formal negation: $\exists$ politician $x$, $x$ is honest
Informal negation: Some politicians are honest
- 1357 is not divisible by any integer between 1 and 37
Formal statement: $\forall n \in [1, 37]$, 1357 is not divisible by $n$
Formal negation: $\exists n \in [1, 37]$, 1357 is divisible by $n$
Informal negation: 1357 is divisible by some integer between 1 and 37
Negation of universal conditional statements
Definition:
$\sim (\forall x, p(x) \rightarrow q(x)) \equiv \exists x, (p(x) \land \sim q(x))$
Examples:
- $\forall$ real $x$, if $x > 10$, then $x^2 > 100$.
Negation: $\exists$ real $x$ such that $x > 10$ and $x^2 \le 100$.
- If a computer program has more than 100,000 lines, then it contains a bug.
Negation: There is at least one computer program that has more than 100,000 lines and does not contain a
bug.
Relation between quantifiers $(\forall, \exists)$ and $(\land, \lor)$
Universal statements are generalizations of and statements
Existential statements are generalizations of or statements
If $p(x)$ is a predicate and $D = \{x_1, x_2, \ldots, x_n\}$ is the domain of $x$, then
$\forall x \in D, p(x) \equiv p(x_1) \land p(x_2) \land \cdots \land p(x_n)$
$\exists x \in D, p(x) \equiv p(x_1) \lor p(x_2) \lor \cdots \lor p(x_n)$
Vacuous truth of universal statements