\documentstyle[12pt,twoside,amsfonts,amstex]{article}
\input{macros-course-lectures}

\parskip1.5ex
\parindent0pt
\newcommand{\alaw}[1]{\parbox[t]{1in}{
\begin{tabular}{l}
#1
\end{tabular}}}

\begin{document}

\lecture{notes2}{Class Notes for Lecture 2}{February 6, 1997}

\setcounter{section}{2}

\section{Logical Proof Systems}

Recall: a logical proof system consists of:
\begin{itemize}
\item A {\bf language} for stating propositions (propositional/predicate calculus)
\item {\bf Axioms:} Propositions accepted as true
\item {\bf Rules of inference:} Acceptable ways of combining
  propositions 

(all propositional tautologies)
for example:
\[
\neg(\forall x)\neg S(x) \equiv (\exists x)S(x)
\]
(This particular one is rejected by constructivists, since it lets you prove 
something exists
without actually saying what it is).
\item {\bf Theorems:} Propositions that can be derived by applying the
inference rules to the axioms.
\end{itemize}

Note: we must always have some axioms: there are no ``self evident''
propositions.  

\subsection{Example: equality}

Axioms:
\begin{itemize}
\item (E1) $(\forall x) (x=x)$
\item (E2) For any formula $F$ with free variable x,
\[
(\forall xyz\ldots)(x=y \Rightarrow (F \rightarrow F[x/y])
\]
where $F[x/y]$ denotes substituting $y$ for some or all occurrences of
$x$.  
\end{itemize}
Actually (E2) is an {\bf axiom scheme} describing an infinite number of
axioms.

Inference Rules: propositional logic (e.g. modus ponens)

How can we prove $(\forall ab)(a=b \Rightarrow b=a)$?

\begin{itemize}
\item fix $a,b$
\item Let $F$ be $(x=z)$ in E2: $(\forall xyz)(x=y \Rightarrow
  ((x=z)\Rightarrow(y=z))$
\item Thus in particular, $(a=b)\Rightarrow (a=a \Rightarrow b=a)$
\item By hypothesis, $a=b$
\item Modus ponens: $(a=a) \Rightarrow (b=a)$
\item E1: $a=a$
\item MP: $b=a$
\item we proved for fixed $a,b$, so by universal generalization, holds
  for all.
\end{itemize}

This is incredibly torturous.  Why do we care?
\begin{itemize}
\item Each step is justified by reference to previous steps.
\item Justification is mechanical
\item A {\bf machine} can check the work
\end{itemize}

A true proof can be verified by purely mechanical (algorithmic)
means.  No creativity, common sense, or outside knowledge needed.

The mathematician Hilbert suggested that in any proof we must be able to
substitute the words  ``points, lines, planes'' with  ``tables, chairs, 
beer mugs'' and arrive at the same conclusions (i.e. our method of proof should
not depend on a particular representation of our mathematical objects).



\subsection{Completeness/Consistency}


If proofs are mechanical, where is the creativity  in {\bf
  finding} the proof?   Well, you might have noticed that proving something is
much harder than verifying it. Actually some statements are impossible to 
prove!

Hilbert posed (as one of his 23 famous problems) the problem of
finding a rote method for proving any true theorem.  One of the great
accomplishments of 20th century math is the proof that no such method
exists.  There are actually several different kinds of obstacles.

A logical proof system is 
\begin{itemize}
\item {\bf consistent} if no statement and its complement can both be
derived.
\item {\bf complete} if it can be used to prove or disprove every proposition.
\end{itemize}

Russell and Whitehead, in {\em Principia Mathematica}, tried to completely
axiomatize mathematics but failed.

G\"odel's Theorems:
\begin{itemize}
\item no axiomatization of arithmetic is complete and consistent.
\item ``arithmetic is consistent'' is a proposition that cannot be
proved in arithmetic.
\item Gensen: ``arithmetic is consistent'' can be proved by adding
some reasonable-sounding axioms, but these axioms can't be proved
consistent.
\end{itemize}

There are true facts in math that cannot be proven! (Goldbach?)

We'll try to keep these off the homework.

Even if we limit ourselves to things that can be proven, computers
won't be much help.  Finding a proof---even, say, just a proof that a
given propositional logic statement is a tautology---is {\bf
  NP-complete}, meaning that it is untractable in a certain formal
sense you will learn about in 6.045 or 6.046.

So we will always rely on human intuition to find the proofs, although
we will be using computers more and more to check if they are right.

\section{How To Prove Things}

Now we discuss how proofs are actually done in practice.
Sketches that it's supposed to be possible to complete.
Then we'll say what we actually expect in this course, and finally
we'll start going through a catalog of practical proof methods.



There are lots of ways to prove things. We now give some examples.

\subsection{Direct Proof}

Direct proofs are the most straightforward: we mix together previous
axioms and theorems until the desired claim is inferred.

For natural numbers $a$ and $b$, where $a \neq 0$,
we say $a$ {\em divides} $b$ if there exists a natural number $t$ such that
$at = b$.  We write $a \mid b$.
\begin{itemize}
\item $3 \mid 6$
\item $3\not |~7$
\end{itemize}

\begin{theorem}
If $a \mid b$ and $a \mid c$, then $a \mid b+c$.
\end{theorem}
\begin{proof}
By definition of divisibility, $(\exists t) b = at$ and $(\exists s) c
= as$.\\  Therefore, $b+c = at+as = a(t+s)$.\\  Therefore, by definition,
$a \mid b+c$.
\end{proof}

Note: distributivity was assumed without mention.

\subsection{Proof by Contradiction}

\alaw{$p \implies FALSE$ \\ \hline $\neg p$}

Proofs can go ``backwards'':
\begin{itemize}
\item Begin by assuming the desired theorem is false.
\item Using inference rules, conclude something known false.
\item Conclude that the assumption is wrong.
\end{itemize}

\begin{theorem} $\sqrt{2}$ is an irrational number.
\end{theorem}
\begin{proof} (By contradiction).  Assume $\sqrt{2}$ is rational.  

Conclude $\sqrt{2}$ can be written as a fraction $a/b$ in lowest
terms. {\bf big assumption!}\\ Then $2b^2 = a^2$.\\ In other words, $a^2$ is even (since
$2b^2$ is even).\\ Therefore, $a$ is even (the square of an odd number
is odd) (needs proof).\\ Therefore, $a^2$ is divisible by 4.\\ But $b$ is odd (since
$a/b$ is in lowest terms and $a$ is even).\\ Thus $2b^2$ is not
divisible by 4.\\ Thus $4$ divides $a^2$, but not $2b^2 = a^2$,
contradiction.

Since our assumption leads to a false conclusion, it must be false.
Thus, $\sqrt{2}$ is not rational.
\end{proof}

Note: this process is based on the assumption that math is consistent,
since otherwise it would be possible to prove something false.

We freely used lots of basic facts about divisibility, lowest terms
for fractions, definitions of square, all without reference or proof.

Pythagoras and his followers knew this proof, but suppressed it because
they axiomatically denied the existence of irrational numbers (so
their system was not consistent, because they also had an axiom that
every line had a numeric length).

\subsection{A Nonconstructive Existence Proof}

\begin{theorem}
For any number $n$, there is a prime number greater than $n$.
\end{theorem}
\begin{proof}
Fix $n$, and consider $n!+1=(1\cdot2\cdot3\cdots(n-1)\cdot n)+1$.  If
$n!+1$ is prime, we are done.  Otherwise, $n!+1$ has a prime factor
$x$ (relies on the prime number theorem).  By definition, $n!+1$ is
divisible by $x$ (without leaving a remainder).  But if $n!+1$ is
divided by a number less than $n$, the remainder is 1.  Therefore,
$x>n$.
\end{proof}

(Note: $n!+1$ need not be prime.  $5!+1 = 11^2$.)

We don't know what $x$ is, only that it exists.

Constructivists would deny this is a proof.

\subsection{Proof by Cases}

Proof by cases: 
    \begin{itemize}
    \item show $p\implies (a \vee b)$
    \item show $a \implies q$ and $b \implies q$
    \item deduce $p \implies q$
    \end{itemize}

\begin{theorem} for some irrational number $\alpha$ and $\beta$,
  $\alpha^{\beta}$ is rational.
\end{theorem}

\begin{proof}

Consider the number ${\sqrt{2}}^{\sqrt{2}}$.  If it is rational, we are done!

If not, then it is irrational.  We also know that $\sqrt{2}$ is
irrational (previous proof).  But then we have,

${\sqrt{2}}^{{\sqrt{2}}^{\sqrt{2}}} = {\sqrt{2}}^{2} = 2$, which is rational!

\end{proof}

This is a wierd proof!  
We proved that it exists, but we didn't construct it!
It's easy to follows, but hard to imagine.  How
did we know?

{\bf Practice}.  Seeing proofs develops a feeling for finding proofs.

\subsection{Other Proof Methods}

\begin{itemize}
\item Indirect proof: from $\neg q \implies \neg p$, deduce $p
\implies q$ (similar to proof by contradiction).
\item Vacuous proof: if $p$ is false, then $p\implies q$ is true.
\begin{itemize}
\item if $x$ is an even prime greater than 2, then $x$ is a perfect
square.
\end{itemize}
Boring, but often arises as one case of a proof by cases.
\end{itemize}

\subsection{Fallacies}

There are several ways to generate an incorrect proof.

\begin{eqnarray*}
\sqrt{-1} &= &\sqrt{-1}\\
\sqrt{\frac{1}{-1}} &= &\sqrt{\frac{-1}{1}}\\
\frac{\sqrt{1}}{\sqrt{-1}} &= &\frac{\sqrt{-1}}{\sqrt{1}}\\
\sqrt{1}\cdot\sqrt{1} &= &\sqrt{-1}\cdot\sqrt{-1}\\
1 &= &-1\\
\end{eqnarray*}

Where's the bug?

There are several common fallacies:
\begin{description}
\item[Affirming the conclusion:]\mbox{ }
\begin{itemize}
\item If you are tired, you will fall asleep
\item You fall asleep
\item therefore, you are tired
\end{itemize}
The fact that the conclusion is true does not make the hypothesis
true.  Maybe you are just bored.

\item[Denying the hypothesis:]\mbox{ }
\begin{itemize}
\item If you work hard, you will pass the course
\item You don't work hard
\item therefore, you will fail the course.
\end{itemize}
Even if the hypothesis is false, the conclusion can be true.  Maybe
you are smart enough to pass without working.

\item[Circular reasoning:] proposition: If $n^2$ is not divisible by 3,
then $n$ is not divisible by 3.
\begin{itemize}
\item If $n^2$ is not divisible by 3, then $n^2$ is not
equal to $3k$ for any integer  $k$.
\item therefore, $n$ does not equal $3l$ for any integer $l$.
\item therefore, $n$ is not divisible by $3$.
\end{itemize}

\end{description}

If you assume (or prove) something FALSE, you can prove anything!

\end{document}
% Local Variables: 
% mode: latex
% TeX-master: t
% End: 
