Ken Levasseur, Al Doerr, Michiel Smid, Oscar Levin, Charles M. Grinstead, J. Laurie Snell, Eric Lehman, F. Thomson Leighton, Albert R Meyer, Jeff Erickson, Kenneth P. Bogart, Carol Chritchlow, David Eck, OpenDSA Project, L.J. Miller
Formal proofs of quantified expressions can use all the techniques presented in sections Section 5.1 - Section 5.2 , plus some specialized forms.
Subsection5.3.1Proofs With Quantifiers
Proving quantified statements often requires invoking one or more the following inference rules.
Table5.3.1.Inference Rules for Quantified Statements
Existential Instantiation
\((\exists x)(p(x)) \Rightarrow p(c)\)
\(c \in U\)
Existential Generalization
\(p(c) \Rightarrow (\exists x)(p(x)) \)
\(c \in U\)
Universal Instantiation
\((\forall x)(p(x)) \Rightarrow p(c) \)
\(c\) is any arbitrary element of \(U\)
Universal Generalization
\(p(c) \Rightarrow (\forall x)(p(x)) \)
\(c\) is any arbitrary element of \(U\)
The instantiation rules are used to fix a variable in a proposition over a universe to a single (but perhaps unspecified) value in order to apply the rules of propositional logic. The generalization rules are used to expand results from a fixed variable to the entire universe. Commonly in less formal proofs, such as those in mathematics, these are implied but not directly stated in the proof.
Definition5.3.2.Constructive Proof.
Constructive proofs are used to prove theorems of the form: \((\exists n)(p(n))\text{.}\) All that is needed is to find one value \(c\) for which \(p(c)\) is true and then invoke the Existential Generalization Rule.
Example5.3.3.A constructive proof.
Show that there is a positive integer that can be written as the sum of cubes of positive integers in two different ways:
Therefore by Existential Generalization it is true, there is a positive integer that can be written as the sum of cubes of positive integers in two different ways.
Definition5.3.4.Non-Constructive Proof.
Non-constructive proofs are also used to prove theorems of the form: \((\exists n)(p(n))\text{.}\) Assume no \(c\) exists for which \(p(c)\) is true and show this leads to a contradiction.
Example5.3.5.A non-constructive proof.
Show that there exist irrational numbers \(x\) and \(y\) such that \(x^y\) is rational.
Take the negation of the conclusion: no such \(x, y\) exist.
We know that \(\sqrt{2}\) is irrational.
Let both \(x, y = \sqrt{2}.\)
Then, \(x^y = \sqrt{2}^{\sqrt{2}}.\)
There are two possibilities, \(\sqrt{2}^{\sqrt{2}}\) is either rational or irrational.
If it is rational, we have two irrational numbers \(x\) and \(y\) with \(x^y\) rational.
If it is irrational:
Let \(x = \sqrt{2}^{\sqrt{2}}\) and \(y = \sqrt{2}\text{.}\)
In either case, we have a rational result, which contradicts our negated conclusion.\(\square\)
.
Definition5.3.6.Proof of Non-Existence.
Non-Existence proofs are used to prove theorems of the form: \(\neg (\exists n)(p(n))\text{.}\) Using the equivalent form \((\forall n) \neg(p(n)) )\) show that \((p(n))\) is never true.
Example5.3.7.A non-existence proof..
Show that there is no number \(x\) such that \(x^2 + 1 \lt 0\text{.}\)
Let \(p(x)\) be \(x^2 + 1 \lt 0\)
Then the whole statement can be written as: \(\neg (\exists x)(p(x))\)
Equivalently: \((\forall x) (\neg(p(x)))\)
We have three cases:
Case 1: \(x \lt 0\text{.}\) Since multiplying two negatives, gives a positive, \(x^2\) is positive. Thus, \(x^2 + 1\) is also positive. Hence \(\neg(p(x))\) holds.
Case 2: \(x = 0\text{.}\) Here \(x^2 = 0 \text{.}\) Thus, \(x^2 + 1 = 1\) is also positive. Hence \(\neg(p(x))\) holds.
Case 3: \(x \gt 0\text{.}\) Since multiplying two positives, gives a positive, \(x^2\) is positive.. Thus, \(x^2 + 1\) is also positive. Hence \(\neg(p(x))\) holds.
Therefore, by Universal Instantiation \((\forall x) \neg(p(x)) )\square\)
Definition5.3.8.Proof by Counterexample.
Counterexamples are used to show theorems of the form \((\forall n)(p(n))\) are false. All that is needed is to find one value \(c\) for which \(p(c)\) is false. That value is called a counterexample. \((\forall n)(p(n))\) is then false by Universal Instantiation. Counterexamples can also be used to prove statements with a negated universal quantifier \(\neg (\forall n)(p(n))\) are true. This is done using the counterexample in a proof by contradiction on \((\forall n)(p(n))\)
.
Example5.3.9.A counterexample proof..
Show that every positive integer is the sum of the squares of 3 integers.
This can be rewritten as \((\forall x)(p(x))\text{,}\) where \(p(x)\) is the statement "\(x\) is the sum of the squares of 3 integers" and \(x \in \mathbb{P}\text{.}\)
Enumerating out from 1, we see that 7 cannot be made in this way:
\(\displaystyle 1 = 1^2 + 0^2 + 0^2\)
\(\displaystyle 2 = 1^2 + 1^2 + 0^2\)
\(\displaystyle 3 = 1^2 + 1^2 + 1^2\)
\(\displaystyle 4 = 2^2 + 0^2 + 0^2\)
\(\displaystyle 5 = 2^2 + 1^2 + 0^2\)
\(\displaystyle 6 = 2^2 + 1^2 + 1^2\)
\(\displaystyle 8 = 2^2 + 2^2 + 0^2\)
Therefore, 7 is a counterexample and \((\forall x)(p(x))\) is false.
Definition5.3.10.Proof by Universal Generalization.
Universal Generalization is used for many proofs of mathematical formulas, but most less formal proofs don’t state that it is used. In a proof using Universal Generalization, we pick an arbitrary value from the universe and show that the statement is true. The catch is the value must be arbitrary, showing a formula works for a particular value cannot be generalized to all values in the universe.
Example5.3.11.A proof using Universal Generalization..
Prove if an integer \(x\) is even then \(x^2\) is even.
The statement to be proven can be rewritten more formally as \((\forall x)(p(x) \rightarrow p(x^2))\text{,}\) where \(p(x)\) is the statement \(x\) is even. A formal proof would proceed as follows:
\((\forall x)(p(x) \rightarrow p(x^2)) \) Premise
\((p(c) \rightarrow p(c^2))\) Universal Instantiation to arbitrary integer \(c\)
\(p(c)\) Assume hypothesis is true.
\(c = 2k\text{,}\) for some integer \(k\text{.}\) Definition of even integer.
Prove that \((\exists x)(\forall y)(p(x, y)) \Rightarrow (\forall y)(\exists x)(p(x, y))\text{,}\) but that converse is not true.
3.
Given the following argument:
"If students study hard in courses, then they do well in them." "For students to do well in courses it is necessary that they do not skip classes for those courses." "Students doing well in discrete math follows from them studying hard in discrete math." "Therefore, students who do well in a discrete math course do not skip discrete math class."
Define propositional functions and the compound proposition for each statement over the universe of courses.
Answer.
First, define propositions over the universe of all courses:
Let \(W(x)\) be: Students do well in course \(x\text{.}\)
Let \(H(x)\) be: Students study hard in course \(x\text{.}\)
Let \(S(x)\) be: Students skip class for course \(x\text{.}\)
Now define the compound propositions given to us:
"If students study hard in courses, then they do well in them."
\begin{equation*}
\forall x H(x) \rightarrow W(x)
\end{equation*}
"For students to do well in courses it is necessary that they do not skip classes for those courses."
\begin{equation*}
\forall x W(x) \rightarrow \neg S(x)
\end{equation*}
"Students doing well in discrete math, follows from them studying hard in discrete math." translates to: "If students study hard in their discrete math course, then they do well in the course." from the List 4.1.11. So we have:
We’re asked to show: "students who do well in a discrete math course do not skip discrete math class." This translates to: "If students do well in discrete math, then they do not skip discrete math class."