\documentclass[10pt]{article}
\usepackage{amssymb, amsthm, amsmath, graphics}

\theoremstyle{plain}
\newtheorem*{theorem}{Theorem}
\newtheorem*{proposition}{Proposition}
\newtheorem*{lemma}{Lemma}

\theoremstyle{definition}
\newtheorem*{definition}{Definition}

\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\newtheorem*{notation}{Notation}


\pagestyle{plain}
\textwidth=450pt
\textheight=650pt
\footskip=30pt
\voffset= -.7in
\hoffset=-.7in

%No paragraph with a ``%" in front of it will affect the output file, so we can make comments this way.

%Tex is a markup language with commands that tell the compiler how to typeset your stuff.  Every command is preceded by "\".  This is a special symbol, so you cannot use it in your text, just for commands.  Other special symbols are "%" (which tells Latex not to include what follows, as we have seen), "&", which is used as a column marker in tables, and curly brackets, "{ }", which are used to input arguments into commands and enclose sections of text that are in a different style.  So what if you want to type a percentage sign?  You have to type "\%" instead:  when you do this you are commanding Latex to type a percentage sign.  Same with "\&".  If you want brackets around a set, you have to type "\{" and "\}".


\begin{document}

%Everything above this command is called the `"preamble."  The preamble sets up the type of document you are creating (article, book, etc.), the style and type size, and the "environments" you want to use.  You needn't worry about any of this at this point, but if you're interested, consider, for example, the command "\newtheorem*{theorem}{Theorem}."  This creates a theorem environment.  When you want to state a theorem you type "\begin{theorem}," then you type your statement, and then you type "\end{theorem}."  Latex automatically puts the word "Theorem" in bold type in front of your statement, puts your statement in italics, and so forth.  The "*" tells the compiler not to number the theorems;  if you remove it, they will be automatically numbered.  Pretty cool, isn't it?  I put these in the template so you can nicely state theorems, lemmas, and so forth if you want to later in the course.  (Each environment has a counter with the same label, which you can reset to skip numbers.  For example, if you want the first definition in this document to be number 5, you can insert the command ``\setcounter{definition}{4}".  The counter will then behave as if the previous definition was number 4, so the next one that appears will be number 5.  This procedure works for all environments, including sections, lists, etc.)

\textbf{\Large Assignment N \hfill Charles Delman}

%This line prints the assignment number and your name in boldfaced, very large type;  the "\hfill" command makes a stretchable space so that your name is at the right margin.  Put in your name instead of mine!   Replace "N" with the appropriate number.

%Now you type the solutions to the exercises for this problem set.

\begin{enumerate}

%This creates an environment that automatically numbers your solutions.  Precede each solution with the "\item" command.

\item My solution to problem 1 from whatever chapter we are in, the first exercise in this assignment.  

%Math symbols are typed in the math environment.  Since we use it so often, there is a shortcut;  no "\begin" and "\end" commands, just dollar signs, like this:  

Here is how we type math:  $\{x \in \mathbb{R}: x^2 = 4\} = \{-2, 2\}$. 

%Make sure you don't forget the dollar sign at the end, or you will get an error message when you compile!  Any environment that you start,  you must finish!  

%If you want your formula centered and displayed nice and large and on its own, use double dollar signs, like this: 

This is called a \emph{displayed formula}: $$\{x \in \mathbb{R}: x^2 = 4\} = \{-2, 2\}$$

%Notice the backslashes before the brackets, as noted above.  And notice the commands that typeset some common symbols and fonts.  In particular, the "\mathbb" command gives you double-bar letters for anything enclosed in the brackets.  Don't worry about spacing;  Tex does all of that for you.  Note that you have to hit "return" twice to start a new paragraph;  Tex ignores single returns.  

%To get emphasized text (italic if the normal text is plain) , use the "\emph" command, inserting the text to be emphasized as an argument between brackets.  Superscripts are created using a caret ("^").  If you want more than one character in an exponent, you have to use brackets, like this:

The function defined by $f(x) = 2^{kx+1}$ is an exponential function.

%To get upside-down quotation marks at the beginning of a quote, use the single quote key at upper right of your keyboard twice, like this: 

Here is the first line of Moby Dick:  ``Call me Ishmael."

Here is how you make a fraction:  

$$\frac{10 \pi}{3}$$.

Oops!  The period is on the next line, since it is after the double dollar sign. 

%Put it inside if you want a period when you use double dollar signs.   For single dollar signs, the spacing before and after the dollar signs determines how things will be spaced in the document, so don't leave a space between a dollar sign and a comma or period, but do leave a space before the next word.  Leaving a space before the dollar sign won't have any effect.  The spacing inside doesn't matter:  Tex decides what looks good. 

%Notice that you can put a displayed formula on its own line to make it easer to read your .tex file;  the spacing won't change.

%Here is a little subtlety about parentheses.  If you just type them in, the size is fixed, which might not look good:  

These parentheses look bad:  $(\frac{x}{y})(\frac{10 \pi}{3})$  

%To get Tex to size them to suit what they enclose, do the following:  

This is better:  $\left(\frac{x}{y}\right)\left(\frac{10 \pi}{3}\right).$

%This trick works with all delimiters (such as brackets of all kinds).

In logic, we sometimes want quantifier symbols:  $\exists$, $\forall$.

And of course we will need set membership:  $a \in A$.

Here is how you make a square root:  $\sqrt{3} < \sqrt{2x+3}$, if $x > 0$.  Here is how you make a seventh root:  $\sqrt[7]{3}$.  

%Note that the extra input requires square brackets instead of curly ones.

Here is how you make a forward implication arrow:  $x > 2 \Rightarrow x+1 > 3$.  Here is how you make a backwards implication arrow (if you ever want one):  $x > 2 \Leftarrow x+1 > 3$.  Here is how you make a bi-conditional implication arrow (you guessed it):   $x > 2 \Leftrightarrow x+1 > 3$.  See, this is easy!

\item My solution to the problem 2, the second exercise in this section.  I have a picture for this one that I made using a graphics application and saved in a .pdf file.  You can insert any .pdf file, and you can change the size, too!  Here's how:

\scalebox{.4}{\includegraphics{penguin.pdf}}

\scalebox{.2}{\includegraphics{penguin.pdf}}

%Tex puts your .pdf  file in a "box", which acts as a single symbol, so you can scale it.  (If you leave off the "\scalebox" command, it will be full size, which is usually too big.)  Note the double brackets:  an inner set to input your file to the ``includegraphics" command, making your picture into a symbol, and an outer set to put it into the "\scalebox" command.  Make sure your .pdf file is in the same folder as your .tex file, so Latex can find it.  

%Make sure you close all brackets that you open, or you will get a ``runaway argument" error message.  If that happens, trash your .aux files after you fix it, or your .tex file may not compile, even if there is nothing wrong with it.  (Just a quirk of the application.  It is highly stressful to find out about it late at night the day before your homework is due, so I warn you in advance!)

%If desired, you can make numbered figures with captions, but that's probably fancier than we want to get just yet!

If you don't know how to make illustrations electronically, attach hand-drawn illustrations at the end with references and labels, so I know which exercise they go with.  You could leave space and draw or paste them in, but then you would have to put them in again if you revised your paper.  If you staple them at the end, you can reuse them.

For this (pretend) assignment, problems 4, 5, and 6 were not assigned, so I need to reset the counter to get the correct number.  The enumeration counter is called ``enumi".  This is how to reset it so it acts as if it just listed item 6, so item 7 will be next:

\setcounter{enumi}{6}

\item This is my solution to the next exercise, which is number 7.

%Etc.  You can do the problems in any order, just insert them in the right order in the end and they will be automatically numbered correctly.

\end{enumerate}

%This closes the enumeration environment.  The cardinal rule of Latex:  everything that begins must end!  Every environment that begins must end, every "{" must have a corresponding "}", etc.


{\Large O.K. So now download a free Latex application to your computer, or go to one of the Mathematics \& Computer Science Department Computer labs (which have one installed), download the template from the course Web page, and you're ready to roll!  You will also find references linked on the course Web page, and there is lot's of other information on the Web, too.}

\end{document}

%This closes the document environment.
