Moved Proof techniques
This commit is contained in:
203
Misc/Proof Techniques/parts/0 intro.tex
Normal file
203
Misc/Proof Techniques/parts/0 intro.tex
Normal file
@ -0,0 +1,203 @@
|
||||
\section{Introduction}
|
||||
|
||||
|
||||
\definition{}
|
||||
A \textit{proof} is a mathematical argument that irrefutably
|
||||
demonstrates the truth of a given proposition.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Every proof involves some sort of \textit{implication}, denoted $\implies$. \par
|
||||
The statement \say{$A$ implies $B$} (written $A \implies B$), means that $B$ is true whenever $A$ is true.
|
||||
|
||||
\problem{}<trueimplies>
|
||||
Which of the following are true? \par
|
||||
\note{You don't need to provide a proof.}
|
||||
|
||||
\begin{itemize}
|
||||
\item $x$ is prime $\implies$ $x$ is odd.
|
||||
\item $x$ is real $\implies$ $x$ is rational.
|
||||
\item $x$ is odd $\implies$ $x$ is prime.
|
||||
\end{itemize}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
As you saw above, $A \implies B$ does not guarantee that $B \implies A$. \par
|
||||
Find two new statements $A$ and $B$ so that $A \implies B$ but $B \notimplies A$. \par
|
||||
\hint{\say{new} as in \say{not from \ref{trueimplies}}}
|
||||
|
||||
\begin{solution}
|
||||
A fairly trite example is below. \par
|
||||
Note that \say{$X$ is a square} is a subset of the statement \say{$X$ is a rectangle.}
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
$X$ is a square $\implies$ $X$ is a rectangle, but $X$ is a rectangle $\notimplies$ $X$ is a square.
|
||||
\end{solution}
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
\definition{}<iffdef>
|
||||
As we just saw, implication is one-directional. \par
|
||||
The statements $A \implies B$ and $B \implies A$ are independent of one another. \par
|
||||
|
||||
\vspace{1mm}
|
||||
|
||||
If both are true, we write $A \iff B$. This can be read as \say{$A$ if and only if $B$.} \par
|
||||
In text, \say{if and only if} is often abbreviated as iff. \par
|
||||
|
||||
\vspace{1mm}
|
||||
|
||||
Bidirectional implication is the strongest relationship we can have between two statements: \par
|
||||
If $A \iff B$, $A$ and $B$ are \textit{equivalent.} They are always either both true or both false.
|
||||
|
||||
\definition{}
|
||||
The \textit{floor} of $x$ is the largest integer $a$ so that $a \leq x$. This is denoted $\lfloor x \rfloor$. \par
|
||||
The \textit{ceiling} of $x$ is the largest integer $a$ so that $a \geq x$. This is denoted $\lceil x \rceil$.
|
||||
|
||||
|
||||
\generic{Property:}
|
||||
If $b_1 \leq a \leq b_2$ and $b_1 = b_2$, we must have that $b_1 = a = b_2$. \par
|
||||
|
||||
\vspace{1mm}
|
||||
|
||||
Also, if $a \leq b$ and $a \geq b$, we must have that $a = b$. \par
|
||||
This is a trick we often use when showing that two quantities are equal.
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Although $A \iff B$ looks like a single statement, we often need to prove each direction separately. \par
|
||||
Show that $x \in \mathbb{Z}$ iff $\lfloor x \rfloor = \lceil x \rceil$
|
||||
|
||||
\begin{solution}
|
||||
\textbf{Forwards:} $x \in \mathbb{Z} ~\implies~ \lfloor x \rfloor = \lceil x \rceil$ \par
|
||||
If $x \in \mathbb{Z}$, by definition we have that $\lfloor x \rfloor = x$ and $\lceil x \rceil = x$ \par
|
||||
So, $\lfloor x \rfloor = \lceil x \rceil$
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
\textbf{Backwards:} $x \in \mathbb{Z} ~\rimplies~ \lfloor x \rfloor = \lceil x \rceil$ \par
|
||||
Assume that $\lfloor x \rfloor = \lceil x \rceil$, and show that $x$ is an integer. \par
|
||||
Note that $\lfloor x \rfloor \leq x \leq \lceil x \rceil$ (by definition) \par
|
||||
Since $\lfloor x \rfloor = \lceil x \rceil$, we must have that $\lfloor x \rfloor = x = \lceil x \rceil$. \par
|
||||
$\lfloor x \rfloor$ is an integer, so $x$ must be an integer.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
We don't always need to prove each direction of an iff statement separately. \par
|
||||
|
||||
\begin{itemize}[itemsep = 1mm]
|
||||
\item Convince yourself that we can \say{chain} iffs together: \par
|
||||
If we show that $A \iff B \iff C \iff D$, do we know that $A \iff D$?
|
||||
|
||||
\item Does this still work if $A \iff B \implies C \iff D$?
|
||||
|
||||
\item Show that $x^2 - 6x - 6 = 3 \iff x = 3$ by building a chain of iffs. \par
|
||||
\hint{You remember how to factor quadratics, right?}
|
||||
\end{itemize}
|
||||
|
||||
\begin{solution}
|
||||
Does this still work if $A \iff B \implies C \iff D$? \par
|
||||
Of course not. $D \notimplies A$ since $C \notimplies B$.
|
||||
We can only conclude that $A \implies D$.
|
||||
|
||||
\linehack{}
|
||||
|
||||
$x^2 - 6x - 6 = 3$ \par
|
||||
$\iff x^2 - 6x - 9 = 0$ \par
|
||||
$\iff (x-3)^2 = 0$ \par
|
||||
$\iff x-3 = 0$ \par
|
||||
$\iff x = 0$
|
||||
|
||||
Note that this is a well-defined argument. Every step is an iff statement we can rigorously justify.
|
||||
We're not hand-wavily \say{rearranging} one equation into another,
|
||||
we're building a chain of implications that eventually bring us to our result.
|
||||
This is the logic behind most algebraic proofs.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Another trick you may find useful is the \say{implication cycle.} \par
|
||||
Convince yourself that if $A \implies B \implies C \implies D \implies A$, \par
|
||||
we can conclude that $A$, $B$, $C$, and $D$ are equivalent. \par
|
||||
\note{$A \iff B$ means that $A$ and $B$ are equivalent. See \ref{iffdef}.}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{Bonus}
|
||||
Use an implication cycle to show that the following definitions of a \textit{squarefree integer} are equivalent.
|
||||
%\hint{Show that $A \implies B \implies C \implies D \implies A$}
|
||||
\begin{enumerate}
|
||||
\item $n^2$ does not divide $q$ for any $n \in \mathbb{Z}^+$, $n \neq 1$
|
||||
\item $p^2$ does not divide $q$ for any prime $p$
|
||||
\item $q$ is a product of distinct primes
|
||||
\item $q ~|~ n^k \implies q ~|~ n$ for all $n, k \in \mathbb{Z}^+$
|
||||
\end{enumerate}
|
||||
|
||||
\begin{solution}
|
||||
Assume $q$ has a square factor, so that $q = an^2$ for some $a, n \in \mathbb{Z}^+$ \par
|
||||
By D, we know that $q ~|~ (an)^2 \implies q ~|~ an$ \par
|
||||
But $q ~|~ an \implies an^2 ~|~ an$ \par
|
||||
$\implies n = 1$
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
So, $q$ cannot have a square factor that isn`t 1.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
Often enough, proving a statement is simply a matter of \say{definition chasing,}
|
||||
where we expand the symbols used in the statement we're proving, and then do a bit of
|
||||
rearranging to arrive at the result we want.
|
||||
|
||||
|
||||
\definition{}
|
||||
Let $n, x \in \mathbb{Z}$. \par
|
||||
We say \say{$n$ divides $x$} if $x = kn$ for some $k \in \mathbb{Z}$
|
||||
|
||||
\definition{}
|
||||
Let $a, b \in \mathbb{Z}$ and $n \in \mathbb{Z}^+$. \par
|
||||
We say \say{$a$ is congruent to $b$ modulo $n$} (and write $a \equiv_{n} b$) if $n$ divides $a - b$. \par
|
||||
|
||||
\definition{}
|
||||
Let $a, b \in \mathbb{Z}$. We define $a ~\%~ b$ as the remainder of $a \div b$.
|
||||
|
||||
\problem{}
|
||||
Let $a, b, n$ be positive integers. \par
|
||||
Show that $a + b ~\equiv_n (a ~\%~ n) + (b ~\%~ n)$
|
||||
|
||||
\begin{solution}
|
||||
$a + b ~\equiv_n (a ~\%~ n) + (b ~\%~ n)$ \par
|
||||
|
||||
\vspace{2mm}
|
||||
...can be rewritten as... \par
|
||||
$n$ divides $a + b - (a ~\%~ n) - (b ~\%~ n)$ \par
|
||||
|
||||
\vspace{2mm}
|
||||
...which can be rearranged to... \par
|
||||
$n$ divides $(a - (a ~\%~ n)) + (b - (b ~\%~ n))$
|
||||
|
||||
\vspace{2mm}
|
||||
...which is clearly true, if you think about the meaning of \say{$n$ divides $x$} and \say{$a ~\%~ b$}.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
63
Misc/Proof Techniques/parts/1 contradiction.tex
Normal file
63
Misc/Proof Techniques/parts/1 contradiction.tex
Normal file
@ -0,0 +1,63 @@
|
||||
\section{Proofs by Contradiction}
|
||||
|
||||
\definition{}
|
||||
A very common proof technique is \textit{proof by contradiction}.
|
||||
It works as follows:
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Say we want to prove a statement $P$. Assume that $P$ is false, and show that this implies a false statement.
|
||||
In other words, we show that $P$ can't \textit{not} be true. \par
|
||||
If it's false, we either get a known impossibility ($1 = 2$, pigs fly, et cetera), \par
|
||||
or we find that (not $P$) $\implies$ (not (not $P$)), which is a contradiction in itself.
|
||||
|
||||
|
||||
\problem{}
|
||||
Show that the set of integers has no maximum using a proof by contradiction.
|
||||
|
||||
\begin{solution}
|
||||
Assume there is a maximal integer $x$. \par
|
||||
$x + 1$ is also an integer. \par
|
||||
$x + 1$ is larger than $x$, which contradicts our original assumption!
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
This is a \textit{proof by infinite descent}, a special type of proof by contradiction.\par
|
||||
Such proofs have the following structure:
|
||||
\begin{itemize}
|
||||
\item Assume there is a smallest (or largest) object with property $X$.
|
||||
\item Show that we have an even smaller object that has the same property $X$.
|
||||
\end{itemize}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
\definition{}
|
||||
We say a number $x \in \mathbb{R}$ is \textit{rational} if we can write $x$ as $\nicefrac{p}{q}$, \par
|
||||
where $p, q$ are integers with no common factors.
|
||||
|
||||
\problem{}
|
||||
Show that $\sqrt{2}$ is irrational. \par
|
||||
\hint{Start by chasing definitions. \say{Not irrational} $=$ \say{rational.}}
|
||||
|
||||
\begin{solution}
|
||||
Suppose $\sqrt{2}$ is rational. Then, there exist $p, q$ so that $\sqrt{2} = \frac{p}{q}$.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Multiply by $q$ and square to find that $2q^2 = p^2$, which implies that $p^2$ is even. \par
|
||||
This then implies that $p$ is even, \par
|
||||
which implies that $p^2$ is divisible by 4, \par
|
||||
which implies that $q^2$ is divisible by 2, \par
|
||||
and thus we see that $q$ is also even.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
$p$ and $q$ are both even, so they cannot be coprime. \par
|
||||
Therefore, we cannot write $\sqrt{2}$ as $\nicefrac{p}{q}$ for comprime $p, q$, \par
|
||||
and $\sqrt{2}$ is therefore irrational.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
243
Misc/Proof Techniques/parts/2 induction.tex
Normal file
243
Misc/Proof Techniques/parts/2 induction.tex
Normal file
@ -0,0 +1,243 @@
|
||||
\section{Proofs by Induction}
|
||||
|
||||
\definition{}
|
||||
The last proof technique we'll discuss in this handout is \textit{induction.} \par
|
||||
This is particularly useful when we have a \say{countable} variable, usually an integer. \par
|
||||
Let's say we're proving a statement $A$ for all positive integers $n$. \par
|
||||
We'll write the special case \say{$A$ holds for $n$} as $A_n$.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
A proof by induction consists of two parts: a \textit{base case} and a \textit{inductive step}. \par
|
||||
The base case is usually fairly simple: we show that our statement holds for $n = 0$. \par
|
||||
In other words, the base case shows that $A_0$ is true.
|
||||
|
||||
The inductive step is a bit more confusing: we show that if our statement holds for
|
||||
$n$, it must hold for $n = 1$. In other words, we show that $A_n \implies A_{n + 1}$.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
In this way, we build an infinite implication chain: \par
|
||||
The base case proves that $A_0$. By the inductive step,
|
||||
$A_0 \implies A_1$, $A_1 \implies A_2$, and so on. \par
|
||||
We can thus conclude that $A_n$ is true for all $n \in \{0, 1, 2, 3, ...\}$
|
||||
|
||||
\problem{}
|
||||
Proof by induction will make a bit more sense with an example. \par
|
||||
Read and understand the following proof.
|
||||
|
||||
\begin{examplesolution}
|
||||
Show that $1 + 2 + ... + n = \frac{n(n+1)}{2}$
|
||||
|
||||
\linehack{}
|
||||
|
||||
\textbf{Base case:} $n = 1$ \par
|
||||
Substitute $n = 1$ into the hypothesis:
|
||||
$1 \qe \frac{1(1 + 1)}{2}$ \par
|
||||
|
||||
but we have that
|
||||
$\frac{1(1 + 1)}{2} = \frac{2}{2} = 1$,
|
||||
so this is of course true.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
\textbf{Inductive step:} \par
|
||||
Now, we assume our hypothesis is true for $n$, \par
|
||||
and show it is true for $n + 1$.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Write the hypothesis for $n + 1$:
|
||||
$$
|
||||
1 + 2 + ... + n + (n + 1) \qe \frac{(n+1)(n+2)}{2}
|
||||
$$
|
||||
We know that $1 + 2 + ... + n = \frac{n(n+1)}{2}$, so:
|
||||
$$
|
||||
1 + 2 + ... + n + (n + 1) = \frac{n(n+1)}{2} + (n+1)
|
||||
$$
|
||||
now we can complete the proof with some algebra:
|
||||
$$
|
||||
\frac{n(n+1)}{2} + (n+1) = \frac{n(n+1) + 2(n+1)}{2} = \frac{(n + 2)(n+1)}{2}
|
||||
$$
|
||||
So, we've shown that the $n^\text{th}$ case implies the $(n+1)^\text{th}$ case.\par
|
||||
We're therefore done, the hypothesis is true for $n \in \{1, 2, 3, ...\}$
|
||||
\end{examplesolution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
Why do we need a base case when constructing a proof by induction? \par
|
||||
\hint{Try to prove that $n = n + 1$ for all $n \in \mathbb{Z}^+$}
|
||||
|
||||
\begin{solution}
|
||||
Consider the following example: \par
|
||||
Say we want to prove that $n = n + 1$ for all $n \in \mathbb{Z}^+$.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
\textbf{Inductive step:}
|
||||
Assume our hypothesis is true for $n$ (that is $n = n + 1$). Is this true for $n + 1$? \par
|
||||
Adding 1 to both sides, we get $n+1=n+1+1$, which means that $(n+1)=(n+1)+1$,
|
||||
which is the statement we wanted to prove. We've thus completed the inductive step!
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Our problem is as follows: we've shown that $A_1 \implies A_2 \implies ...$,
|
||||
but we have no reason to believe that $A_1$ is true. If it was, our hypothesis
|
||||
would be correct---but since it isn't, this is not a complete proof.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Show that $1^2 + 2^2 + 3^3 + ... + n^2 = \frac{1}{6}(n)(n+1)(2n+1)$.
|
||||
|
||||
\begin{solution}
|
||||
\textbf{Base case:}\par
|
||||
$1^2 = \frac{1}{6}(1)(1+1)(2 + 1) = 1$, which is true.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
\textbf{Induction:}\par
|
||||
Assume $1^2 + ... + n^2$ satisfies the equation above. \par
|
||||
$$
|
||||
1^2 + 2^2 + ... + n^2 + (n+1)^2 =
|
||||
\frac{(n)(n+1)(2n+1)}{6} + (n + 1)^2
|
||||
$$
|
||||
which is equal to
|
||||
$$
|
||||
\frac{(n)(n+1)(2n+1) + 6(n+1)^2}{6}
|
||||
$$
|
||||
now expand and factor to get
|
||||
$$
|
||||
\frac{(n+1)(n+2)(2(n+1)+1)}{6}
|
||||
$$
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Show that $2^n - 1$ is divisible by 3 for all odd $n$ \par
|
||||
\hint{If $n$ is odd, the next odd number is $n + 2$.}
|
||||
|
||||
\begin{solution}
|
||||
\textbf{Base case:} \par
|
||||
$2^2 - 1 = 3$, which is divisible by 3..
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
\textbf{Induction:}\par
|
||||
Assume $2^n - 1$ is divisible by 3. \par
|
||||
$2^{(n+2)} - 1 = 4(2^n) - 1 = 4(2^n - 1) + 3$ \par
|
||||
By our induction hypothesis, $(2^n - 1)$ has a factor of 3. \par
|
||||
Therefore, $4(2^n - 1) + 3$ must also have a factor of 3.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\definition{}
|
||||
As you may already know, \say{n choose k} is defined as follows: \par
|
||||
$$
|
||||
\binom{n}{k} = \frac{n!}{k!(n-k)!}
|
||||
$$
|
||||
This counts the number of ways to choose $k$ things from a set of $n$,
|
||||
disregarding the order of the chosen items.
|
||||
|
||||
\theorem{Pascal's Identity}
|
||||
The binomial coefficient defined above satisfies the following equality:
|
||||
$$
|
||||
\binom{n+1}{k} = \binom{n}{k-1} \times \binom{n}{k}
|
||||
$$
|
||||
|
||||
\problem{}<binomsum>
|
||||
Using induction, show that
|
||||
$$
|
||||
\binom{n}{0} + \binom{n}{1} + ... + \binom{n}{n} = 2^n.
|
||||
$$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
Note that although induction is a powerful proof technique, it usually leads to uninteresting results. \par
|
||||
If we prove a statement using induction, we conclude that it is true---but we get very little insight on
|
||||
\textit{why} it is true.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Alternative proofs are take a bit more work than inductive proofs, but they are much more valuable. \par
|
||||
For example, see the proof of the statement in \ref{binomsum} on the next page.
|
||||
|
||||
\pagebreak
|
||||
|
||||
\makeatletter
|
||||
\@makeORMCbox{tmpbox}{Alternative Proof}{ogrape!10!white}{ogrape}
|
||||
\makeatother
|
||||
|
||||
\begin{tmpbox}
|
||||
Consider the following problem: \par
|
||||
How many ways are there to write a number $x$ as an ordered sum of positive integers? \par
|
||||
\note{
|
||||
An \say{ordered sum} means that the order of numbers in the sum matters. \\
|
||||
For example, if $x = 5$, we will consider $4 + 1$ and $1 + 4$ as distinct sums.
|
||||
}
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
First, we'll think of $x$ as an array of $1$s which we want to group
|
||||
into positive integers. If $x = 3$, We have $x = 1~1~1$, which we can
|
||||
group as $1+1+1$,~ $(1+1) + 1$,~ $1 + (1+1)$,~ and $(1+1+1)$.
|
||||
|
||||
|
||||
\linehack{}
|
||||
|
||||
\textbf{Solution 1:}\par
|
||||
One way to solve this is to use the usual \say{stars and bars} method, \par
|
||||
where we count the number of ways we can place $n$ \say{bars} between
|
||||
$x$ \say{stars}. Each bar corresponds to a \say{$+$} in the array of ones. \par
|
||||
\note[Note]{Convince yourself that there are $\binom{x-1}{n}$ ways to place $n$ bars
|
||||
between $x$ objects.}
|
||||
|
||||
If we add the number of ways to write $x$ as a sum of $n \in \{1, 2, ..., x\}$ integers, we get:
|
||||
|
||||
$$
|
||||
\sum_{n = 1}^{x-1} \binom{x-1}{n} = \binom{x-1}{0} + \binom{n}{1} + ... + \binom{x-1}{x-1}
|
||||
$$
|
||||
|
||||
|
||||
\linehack{}
|
||||
|
||||
\textbf{Solution 2:}\par
|
||||
We could also observe that there are $x - 1$ places to put a \say{bar} in
|
||||
the array of ones. This corresponds to $x - 1$ binary positions, and thus
|
||||
$2^{x-1}$ ways to separate our array of $1$s with bars.
|
||||
|
||||
\linehack{}
|
||||
|
||||
\textbf{Conclusion:}\par
|
||||
We've found that the number of ways to split $x$ can be written as either
|
||||
$\sum_{n = 1}^{x-1} \binom{x-1}{n}$ or $2^{x-1}$,
|
||||
and therefore $\sum_{n = 1}^{x-1} \binom{x-1}{n} = 2^{x-1}$.
|
||||
\end{tmpbox}
|
||||
|
||||
|
||||
\pagebreak
|
Reference in New Issue
Block a user