%this is a comment, there are only line comments
% anything on a line after a single % will no show up in the document

%This file is proof.tex
%turn it into a pdf using:
%  pdflatex proof.tex

%then view it using Document Viewer:
%  evince proof.pdf

%if you get an error, the easiest thing to do is hit x to get out of
%LaTeX. The error messages may or may not be immediately helpful.

%BEGIN Preamble
%tell LaTeX that this document is an article
%   with an 11pt font on letter paper
\documentclass[letterpaper, 11pt]{article}
%make relatively normal margins
\usepackage{fullpage}


%title and author information
%this information will show up where \maketitle appears in the text
\title{Induction Proof}
\author{Dr. Presser}
%END Preamble

%document is below
\begin{document}

%make a title section
\maketitle

%To use math symbols and equations, use math mode: put the math stuff you need 
%in between $ and $.
%To put the equations on lines by themselves use $$ and $$


%create sections and subsections
\section{Theorem}
For all integers $n \geq 1$,
$$
%use ^ for superscript, _ for subscript on anything not just \sum
\sum_{i=1}^n{i} = \frac{n(n+1)}{2}
$$

\section{Proof (by mathematical induction)}

Let the property $P(n)$ be the equation $1 + 2 + \cdots + n = n(n+1)/2$.

\subsection{Basis}

Show that the property $P(n)$ is true for $n=1$.
%Use a blank line to indicate a new paragraph.

We must show that $1 = \frac{1(1+1)}{2}$. The right hand side of the 
equation is $\frac{1(1+1)}{2} = \frac{2}{2} = 1$, which is the same 
as the left hand side. So the property is true for $n=1$.

\subsection{Induction}

Show that for all integers $n=k$, if $P(k)$ is true, then so is $P(k+1)$.

For the induction hypothesis, suppose $1+2+ \cdots + k = \frac{k(k+1)}{2}$, 
for some integer $k \geq 1$. From this we must show that 
$1+2+ \cdots + (k+1) = \frac{(k+1)(k+2)}{2}$.

The left hand side of the equation can be expanded to:
$ (1 + 2 + \cdots + k) + (k+1) $. Substituting using the induction hypothesis, this is:
$$
\frac{k(k+1)}{2} + (k+1)
$$
Finding a common denominator and simplifying, we have:
%an equation array helps line things up. Use th & to split sections 
%of the equations. Lines end with \\.
%eqnarray also numbers each line of the equation.

\begin{eqnarray}
\frac{k(k+1)}{2} + (k+1) & = & \frac{k(k+1)}{2} + \frac{(k+1) \cdot 2}{2} \\
  & = & \frac{(k+1)(k+2)}{2} 
\end{eqnarray}
which is what we were trying to show. QED.

%end of document.
\end{document}
