\documentclass{article}
\input{preamble.tex}
\usepackage{url}
\title{Day 4}
\date{Thursday May 24, 2012}
\newcommand{\df}{\textbf}
\def\Display{\@empty}
\newcommand{\Hide}[2]{\ifx \Display\undefined \strut \\ \vspace{#1} \\ \strut \else {\color{blue} #2} \fi }
\begin{document}
\maketitle
Objectives:
\begin{itemize}
\item Learn and practice the indirect proofs using the law of the excluded middle and proofs by contradiction.
\item Understand and Practice taking and using the contrapositive of an implication to prove a statement.
\item Understand and Practice translating an implication to a disjunction to prove a statement.
\item Learn algebraic properties of formulas (eg. DeMorgan's) and practice using those and negation properties to ``simplify'' a formula.
\item Learn how to find the truth table of a formula.
\end{itemize}
\section{Implications}
We begin by talking about implications. Almost all the statements we prove in mathematics will involve implications of some kind.
\subsection{Wording}
There is a lot of ways to word the state ``If $A$ then $B$'' in day to day language. Let's go over some of these words:
\begin{itemize}
\item $A$ is sufficient for $B$
\item $B$ is necessary for $A$
\item $A$ implies $B$
\item $B$ whenever $A$
\item $B$ if $A$
\item $A$ only if $B$
\end{itemize}
All of these are used in day to day language. It's important to understand what exactly each one means.
\begin{eg}
Change the following to ``if \ldots then \ldots''
\begin{itemize}
\item $x^3 > 0$ whenever $x>0$
\Hide{1cm}{If $x>0$ then $x^3 > 0$}
\item $n$ is odd only if $n^2$ is odd
\Hide{1cm}{If $n$ is odd then $n^2$ is odd}
\end{itemize}
\end{eg}
\subsection{Converses}
Consider the statement ``If $A$ then $B$.'' This is true if we can know if $A$ is true then $B$ is also true. We might also be interested on if we can conclude $A$ from $B$. We call this the converse!
\begin{dfn}
The \df{converse} of $A\to B$ is $B\to A$.
\end{dfn}
It is natural to ask: does knowing the truth of the converse of a statement tell you anything about the truth of the statement itself? The answer is no, but we will talk a lot about this soon enough.
\subsection{Contrapositive}
So, recall that if you knew $A\to B$ were true, one would be able to decide that $B$ were true given that $A$ was true.
What can you conclude if $B$ is false? Well, if $B$ is false, one would not have been able to do that step by proving $A$ and $A\to B$. As we know $A\to B$ is true, we must not be able to prove $A$. Therefore, $\neg A$ is true.
So, it seems if you know $A\to B$ then we know $\neg B \to \neg A$. This is called the contrapositive.
\begin{dfn}
The contrapositive of the statement $A\to B$ is
\[
\neg B \to \neg A
\]
\end{dfn}
As seen above, we gave an informal reason why an implication implies it's contrapositive. In fact, it is equivalent in a way we will discuss next.
In order to prove this formally, we need indirect methods we will soon see. This equivalence will be proved by you for the second homework!
\begin{eg}
For example, the English statement, ``If it is raining, then the ground is wet'' is a conditional (ie. an implication). What is its contrapositive?
\Hide{1cm}{When the ground isn't wet then it is not raining}
\end{eg}
\subsection{Bi-implication}
We chatted a bit about bi-implication at the end of last class. Recall that the implication $A\bimp B$ is short hand for
\[
(A \to B) \oand (B\to A)
\]
That is, $A\bimp B$ means that knowing that $A$ is true yields that $B$ is true, and conversely, knowing that $B$ is true yields that $A$ is true. Because of this we often call this \df{logical equivalence}, or just \df{equivalence}.
The word bi-implication is often very long. Therefore, instead of $A\bimp B$ we say ``$A$ if and only if $B$'' or ``$A$ is necessary and sufficient for $B$'' or even ``$A$ is equivalent to $B$.
\begin{rmk}
A proof of $A\bimp B$ is done just as you'd imagine; You prove $A\to B$ and you prove $B\to A$.
There are two directions to the proof. The first is the forward direction, corresponding to $A\to B$. The next is the backwards direction, corresponding to the converse $B\to A$.
\end{rmk}
\section{Indirect Proofs}
Last time, we talked about direct proofs. Let's take a minute to recall, in particular, how to prove a statement like $A\oor B$ or $A\to B$ directly.
To prove $A\oor B$ directly one must prove $A$ or prove $B$. This is often impossible. The example that we have used thus far is: it is raining outside or it is not raining outside. Another example is we would like to be able to prove $(x>1)\oor(x<2)$ without knowing what $x$ is exactly is!
How could we possible do this?
\subsection{The Law of the Excluded Middle}
\begin{dfn}[The Law of the Excluded Middle]
The law of the excluded middle allows us to add $A\oor \neg A$ into our current context, for any statement $A$ you desire.
To say it another way, we are permitted to do cases on whether a statement is true or it's negation is true.
\end{dfn}
\begin{rmk}
This is often undesirable. We've talked about proofs by ``magic'' before, where something comes out of nowhere. The statements that you do cases on using the law of the excluded middle often has this property. This can be a little harder for readers. In the end, it's fine if it's necessary, but one should at least try to do a direct proof.
\end{rmk}
\begin{eg}
$(\neg B \to A) \to (\neg A \to B)$
\begin{proof}
\Hide{1in}{
Since we are proving and implication, we assume $\neg B \to A$ and try to prove $\neg A \to B$. Similarly, we assume $\neg A$ and prove $B$.
So currently, in our context is $\neg B\to A$ and $\neg A$. Here, we are a bit stuc, since in order to use $\neg B\to A$ we need to have $\neg B$ in our context. So, it is natural to do cases on whether $B$ or $\neg B$ is true.
If $B$ is true, we can add that to our context. Then we have $B$ outright, since that is what we are trying to prove.
If $\neg B$ is true, we can add that to our context. Then, we see that $\neg B \to A$ and $\neg B$ makes $A$. We already have $\neg A$ in our context, so we get a contradiction, which allows us to conclude $B$.
}
\end{proof}
\end{eg}
\begin{eg}
$\neg B\oor (A\to (A\oand B))$
\Hide{2in}{
We do cases on $B$.
Case 1: $\neg B$.
Then we are done, as from $\neg B$ we can weaken the statement to $\neg B \oor (A\to (A\oand B))$
Case 2: $B$.
Let us try to prove $A\to (A\oand B)$. Well, we assume $A$, and then we have $A$ and $B$ in our current context, so we get $A\oand B$. Thus, we have $A\to (A\oand B)$, which we can weaken and make $\neg B \oor (A\to (A\oand B))$, which is what we wanted.
}
\end{eg}
Now, we can finally resolve why the statement ``It is raining outside or not raining outside'' is true, without checking the whether. It is, itself, an instance of the law of the excluded middle!
\subsection{Proofs by Contraposition}
We have already seen what the contrapositive of an implication is; to remind you, the contrapositive of $A\to B$ is $\neg B \to \neg A$.
On the homework we will prove that the contrapositive is equivalent to the original implication. Therefore can prove the contrapositive rather than the statement itself.
\begin{dfn}[Proof by Contrapositive]
To prove a statement $A\to B$ by contrapositive one adds $\neg B$ to the current context and proves $\neg A$.
\end{dfn}
We will do examples in a bit. For now note that it will be nice to be able to write the negation of a statement in a simpler way. We will soon learn how to do this.
\subsection{Proofs by Contradiction}
We've already seen some practical examples of a proof by contradiction. Let's formalize these a little bit.
\begin{dfn}[Proof by Contradiction]
The prove a statement $A$ by contradiction, one adds $\neg A$ to their context and gets a contradiction (like $C$ and $\neg C$ for some $C$). From this, one can conclude $A$.
\end{dfn}
\begin{rmk}
Can you see where the ``magic'' is in these types of proofs?
\Hide{1cm}{The magic is in the formula $C$, ie. the contradiction. How do we know what to get a contradiction on? This is the hard part of indirect proofs!}
\end{rmk}
We will also do some examples of this in a bit. Once again, being able to negate a sentence seems fairly important!
\section{Proof Algebra}
We talked about some equivalences earlier. In particular, there is the contrapositive:
\[
(A\to B) \bimp (\neg B \to \neg A)
\]
The benefit of having equivalences is that if two statements are equivalent we can use one instead of the other. For example, if $A$ is in our context and we know $A\bimp B$ then we might as well have $B$ in our context too. Similarly, if we are trying to prove $A$ and we know $A\bimp B$ then we can prove $B$ instead of $A$.
In this section, we will talk about a lot of these equivalences which behave rather ``algebraically.'' Let's start with some simple ones.
\subsection{Associativity}
Let's recall the associativity principle for arithmetic:
\begin{align*}
(a+b)+c = a+(b+c) && (a\cdot b)\cdot c = a\cdot(b\cdot c)
\end{align*}
In a similar way, we have associativity for $\oand$ and $\oor$.
\begin{thm}[Associativity]
$\oand$ and $\oor$ are associative; ie, for any statements $A$, $B$, and $C$
\begin{align*}
(A\oor B)\oor C \bimp A\oor (B\oor C) && (A\oand B)\oand C \bimp A\oand (B\oand C)
\end{align*}
\end{thm}
\begin{proof}
Both proofs are very similar, so we only prove the left.
\Hide{1in}{
We want to prove $(A\oor B)\oor C \bimp A\oor (B\oor C)$. This is the same to showing $(A\oor B)\oor C \to A\oor (B\oor C)$ and $A\oor (B\oor C)\to (A\oor B)\oor C $
First, to show $(A\oor B)\oor C \to A\oor (B\oor C)$. Assume $(A\oor B)\oor C$. Want to show $A\oor (B\oor C)$. We do cases on $(A\oor B)\oor C$. Assuming $C$, we have $B\oor C$, and then we have $A\oor (B\oor C)$. If we have $(A\oor B)$ then we further do cases. If $A$, then we have $A\oor (B\oor C)$ immediately. If $C$ then we have $B\oor C$, and thus we have $A\oor (B\oor C)$.
The reverse direction is similar.
}
\end{proof}
\begin{question}
Is $\to$ associative?
\end{question}
\begin{ans}
\Hide{2cm}{
No! for example, $A\to(A\to A)$ but not $(A\to A)\to A$
}
\end{ans}
\subsection{Communitivity}
Let's recall the communitivity principle for arithemtic
\begin{align*}
a+b = b+a && a\cdot b = b\cdot a
\end{align*}
\begin{thm}[Communitivity]
$\oor$ and $\oand$ are communitive; ie, for any statements $A$ and $B$
\begin{align*}
A\oand B \bimp B\oand A && A\oor B \bimp B\oor A
\end{align*}
\end{thm}
\begin{proof}
Straightforward! Do it as an exercise if you wish.
\end{proof}
\begin{question}
If $\to$ communitive?
\end{question}
\begin{ans}
\Hide{2cm}{
No! For example, $A\to (A\oor B)$ but not $(A\oor B)\to A$.
}
\end{ans}
\subsection{Double Negation Elimination}
Let's recall the double negation elimination principle for arithmetic
\begin{align*}
-(-x) = x && ( (x)^{-1} )^{-1} = x
\end{align*}
\begin{thm}[Double Negation Elimination]
If $A$ is a statement then
\[
\neg(\neg A) \bimp A
\]
\begin{proof}
This is on the second homework! It's useful to note that the $\to$ direction of the proof cannot be done directly, and requires some indirect technique (eg. proof by contradiction or use of law of the excluded middle)
\end{proof}
\end{thm}
\subsection{Rephrasing Implications}
How do we negate an implication?
Suppose we are trying to prove $A\to B$. Then we assume $A$ and try to prove $B$.
\begin{itemize}
\item If $\neg A$ is true then we are done right away as $A$ is in out current context, and we get a contradiction.
\item If $B$ is true, then we are done right away, as we are trying to prove $B$.
\end{itemize}
Thus, we know that $(\neg A \oor B) \to (A \to B)$. The remarkable thing is that the converse is also true!
\begin{thm}
\[
(A\to B) \to (\neg A \oor B)
\]
\end{thm}
\begin{proof}
\Hide{1in}{
Assume $(A\to B)$. Want to prove $(\neg A \oor B)$. We do cases bases on whether $A$ or $\neg A$ is true.
If $\neg A$ is true, then we are done, as $\neg A \oor B$ is true.
If $A$ is true, then we have $A$ and $(A\to B)$ thus we have $B$. Thus we have $\neg A \oor B$.
Thus, in either case, we have $\neg A \oor B$, and we are done!
}
\end{proof}
\begin{rmk}
This tells us a rather remarkable fact: implications are just superfluous! You can rephase implications in terms of a disjunction.
\[
(A\to B) \bimp (\neg A \oor B)
\]
\end{rmk}
\subsection{DeMorgan's Laws}
DeMorgan's Laws are statements that tell you how to negate disjunctions and conjunctions. It doesn't have an exact analog in arithmetic.
\begin{thm}[DeMorgan's Laws]
Let $A$ and $B$ are statements then
\[
\neg(A\oand B) \bimp (\neg A \oor \neg B)
\]
and
\[
\neg(A\oor B) \bimp (\neg A \oand \neg B)
\]
\begin{proof}
We will just prove the first one.
\Hide{1.5in}{
We need to show two directions. We start with the ``left to right'' direction.
\noindent ($\Rightarrow$) We assume $\neg (A\oand B)$ and we want to prove $\neg A \oor \neg B$. We do cases on whether $A$ or $\neg A$ is true.
Case 1: $\neg A$ is true. Then we are done, as then we have $\neg A \oor \neg B$.
Case 2: $A$ is true. Now, our context has $\neg (A\oand B)$ and $A$. We do more cases based on $B$ or $\neg B$
\begin{quotation}
Case 2a: $\neg B$ is true. Then we have $\neg A \oor \neg B$ immediately!
Case 2b: $B$ is true. Now, our context contains $A$ and $B$, and thus we can conclude $A\oand B$. But then we have $A\oand B$ and $\neg(A\oand B)$
\end{quotation}
\noindent ($\Leftarrow$) We assume $\neg A\oor \neg B$. And we want to prove $\neg(A\oand B)$. Well, then we assume $A\oand B$ and try to prove a contradiction. As we have $A\oand B$ we have $A$ and $B$. We do cases based on $\neg A$ or $\neg B$.
Case 1: $\neg A$ is true. Since we have $A$, we have a contradiction.
Case 2: $\neg B$ is true. Since we have $B$, we have contradiction.
}
\end{proof}
\end{thm}
Now we can finally answer the question of what the negation of an implication is:
\begin{thm}[Negating Implications]
\[
\neg (A\to B) \bimp (A\oand \neg B)
\]
\end{thm}
\begin{proof}
This proof we will just use the algebraic results above.
\Hide{1in}{
\begin{alignat*}
\neg (A\to B) &\iff \neg (\neg A\oor B) & \qquad\qquad\mbox{Rephrasing implications}\\
&\iff \neg (\neg A) \oand \neg B & \qquad\qquad\mbox{DeMorgan's Laws} \\
&\iff A \oand \neg B & \qquad\qquad\mbox{Double Negation Elimination}
\end{alignat*}
}
\end{proof}
\subsection{Negations}
Give a statement, we often have to think about what the negation of this statement would be. This is because if we suspect a statement is false we might be better off proving the negation to show that it is false. Using double negation elimination, DeMorgan's Laws, and rephrasing implications we can also express a statement in a \df{negated form} where the only negations in a statement appear before atomics.
\begin{eg}
Negate the following statements:
\begin{itemize}
\item $A \to (B\oand C)$
\Hide{1cm}{ $A \oand (\neg B \oor \neg C)$}
\item $(A\oand B) \oor (A\oor B)$
\Hide{1cm}{ $ (\neg A \oor \neg B) \oand (\neg A \oand \neg B)$ }
\item $(A\oand B) \bimp (\neg A \oor \neg B)$
\Hide{1cm}{ $ ((A\oand B) \oand (A \oand B)) \oor ((\neg A \oor \neg B) \oand (\neg A\oor \neg B))$ }
\item $(A\to B) \to (\neg C \to (B\to A))$
\Hide{1cm}{ $(A \to B) \oand ( \neg C \oand ( B \oand \neg A) )$ }
\end{itemize}
\end{eg}
\subsection{More Examples}
\begin{eg}
$A \oor (B\to \neg A)$
\Hide{1in}{
We can eliminate the implication we have:
\[
A\oor (\neg B\oor \neg A)
\]
Using properties of communitivity and associativity of $\oor$, we have this is equivalent to
\[
(A\oor \neg A) \oor \neg B
\]
But the first part of the above disjunction is an instance of the law of the excluded middle, so it is true!
}
\end{eg}
\begin{eg}
$\neg A \to \neg (A\oand B)$
\Hide{1in}{
Contrapositive is $(A\oand B) \to A$, which is easy to prove! Assume $A\oand B$. Then we have $A$, which is what we want.
}
\end{eg}
\begin{eg}
$((A\oand B)\to C) \to ( \neg C \to ( B \to \neg A) )$
\Hide{1in}{
Suppose $(A\oand B) \to C$. Further, assume $\neg C$ and $B$ and we want to prove $\neg A$. We do this by contradiction.
Suppose $\neg \neg A$, ie. suppose $A$ for sake of contradiction. Then we have $A$ and $B$, so we have $A\oand B$. So we have $C$ as we have $(A\oand B)\to C$. But then we have $C$ and $\neg C$, which is a contradiction.
}
\end{eg}
\section{Truth Tables}
{
\newcommand{\T}{$\top$}
\newcommand{\F}{$\false$}
Recall that atoms can only be true or false. If we have a statement in terms of atomic variables then we can check to see if that statement if valid just by running through all the possible valuables for the atomic variables.
We call this procedure writing the \df{truth table} for a statement.
\begin{dfn}
The following are the truth tables for the standard connectives.
\end{dfn}
\begin{tabular}{c c c c}
\begin{minipage}{1.25in}
\begin{tabular}{c c || c}
\multicolumn{3}{c}{Truth Table For $\oand$}\\ \hline
$A$ & $B$ & $A\oand B$ \\
\T & \T & \T \\
\T & \F & \F \\
\F & \T & \F \\
\F & \F & \F
\end{tabular}
\end{minipage}
&
\begin{minipage}{1.25in}
\begin{tabular}{c c || c}
\multicolumn{3}{c}{Truth Table For $\oor$}\\ \hline
$A$ & $B$ & $A\oor B$ \\
\T & \T & \T \\
\T & \F & \T \\
\F & \T & \T \\
\F & \F & \F
\end{tabular}
\end{minipage}
&
\begin{minipage}{1.25in}
\begin{tabular}{c || c}
\multicolumn{2}{c}{Truth Table For $\neg$}\\ \hline
$A$ & $\neg A$ \\
\T & \F \\
\F & \T \\
\\
\\
\end{tabular}
\end{minipage}
&
\begin{minipage}{1.25in}
\begin{tabular}{c c || c}
\multicolumn{3}{c}{Truth Table For $\to$}\\ \hline
$A$ & $B$ & $A\to B$ \\
\T & \T & \T \\
\T & \F & \F \\
\F & \T & \T \\
\F & \F & \T
\end{tabular}
\end{minipage}
\end{tabular}
\vspace{1cm}
Let's write a few more!
\begin{itemize}
\item $(A\oand B) \to B$
\item $(\neg A \oor \neg B) \oand (\neg A \oand \neg B)$
\item $(A\oand B) \bimp (\neg A \oor \neg B)$
\end{itemize}
}
\end{document}