# Document class not recognized and an issue with the theorem and proof

What am I doing wrong?

\documentclass{amsart}
\usepackage{amssymb,amsmath,latexsym,times,color}

\newtheorem*{theorem*}{Theorem}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}

Question Number 3
\begin{theorem*}
Since a and b are positive numbers, then $$\frac{a}{b}$$ and $$\frac{a+2b}{a}$$ are positive integers.
\end{theorem*}
\begin{proof}
Case 1: If $$\frac{a}{b}\leq 2$$ then $$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a}{b}\leq 2$$
Thus $$min{\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2$$Case 1: If$$\frac{a}{b}\leq 2$$then$$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a}{b}\leq 2$$Thus min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2 Case 2: If$$\frac{a}{b}>2$$then$$\frac{b}{a}<(1/2)$$Since$$\frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}$$which also means it is < 1+2*(1/2) Thus$$\frac{a+2b}{a}<2$$so$$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a+2b}{a}<2$$Hence from both sides we have min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2 If you do this again with opposite inequalities you will get: Case 1: If$$\frac{a}{b}\leq2$$then \frac{b}{a}\geq (1/2) Since$$\frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2*(1/2)= 2$$so \frac{a+2b}{a}\geq 2 thus$$max{\frac{a}{b},\frac{a+2b}{a}}\geq \frac{a+2b}{a}\geq 2$$which simplifies to:$$max{\frac{a}{b},\frac{a+2b}{a}}\geq 2$$Case 2: If$$\frac{a}{b}>2$$then$$max{\frac{a}{b},\frac{a+2b}{a}}\geq \frac{a}{b}>2$$This means:$$max{\frac{a}{b},\frac{a+2b}{a}}>2$$From both cases we get:$$max{\frac{a}{b},\frac{a+2b}{a}}\geq 2$$Since both sets of inequalities are true, we obtain:$$min{\frac{a}{b},\frac{a+2b}{a}}\leq 2\leq max{\frac{a}{b},\frac{a+2b}{a}}$$\end{proof} \end{document}  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – CarLaTeX Sep 11 '17 at 5:02 • You are missing \begin{document} and \end{document}. – TeXnician Sep 11 '17 at 5:02 • And you miss some math mode (for < sign). – TeXnician Sep 11 '17 at 5:03 • – CarLaTeX Sep 11 '17 at 5:05 • make sure you are using pdflatex and not pdftex otherwise \documentclass will be undefined. – David Carlisle Sep 11 '17 at 6:34 ## 2 Answers The following is a working example, I'm sure some mathematician here would improve it. If it doesn't work on your computer, you have some problems with your TeX distribution. I highly recommend to you to read What are good learning resources for a LaTeX beginner? \documentclass{amsart} \usepackage{amssymb,amsmath,newtxtext,newtxmath} \newtheorem*{theorem*}{Theorem} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \begin{document} Question Number 3 \begin{theorem*} Since a and b are positive numbers, then $\frac{a}{b}$ and $\frac{a+2b}{a}$ are positive integers. \end{theorem*} \begin{proof} Case 1: If $\frac{a}{b}\leq 2$ then $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a}{b}\leq 2$ Thus $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2$ Case 1: If $\frac{a}{b}\leq 2$ then $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a}{b}\leq 2$ Thus $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2$ Case 2: If $\frac{a}{b}>2$ then $\frac{b}{a}<(1/2)$ Since $\frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}$ which also means it is $$< 1+2*(1/2)$$. Thus $\frac{a+2b}{a}<2$ so $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a+2b}{a}<2$ Hence from both sides we have $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2$ If you do this again with opposite inequalities you will get: Case 1: If $\frac{a}{b}\leq2$ then $\frac{b}{a}\geq (1/2)$ Since $\frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2*(1/2)= 2$ so $\frac{a+2b}{a}\geq 2$ thus $\max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq \frac{a+2b}{a}\geq 2$ which simplifies to: $\max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq 2$ Case 2: If $\frac{a}{b}>2$ then $\max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq \frac{a}{b}>2$ This means: $\max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}>2$ From both cases we get: $\max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq 2$ Since both sets of inequalities are true, we obtain: $\min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2\leq \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}$ \end{proof} \end{document}  • thank you! it doesn't work on my computer but i used an online editor to get the pdf version of my work in progress. but this is super helpful. – Britney Sep 11 '17 at 6:05 • @Britney I would guess you are using the incorrect command on your local installation (tex rather than latex) – David Carlisle Sep 11 '17 at 6:36 Code such as Thus min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2 ... so$$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a+2b}{a}<2$$ is simply incorrect. I suspect that what you really want is Thus \min(\frac{a}{b},\frac{a+2b}{a})\leq 2 ... so \min(\frac{a}{b},\frac{a+2b}{a})\leq\frac{a+2b}{a}<2  Note that ... serves to enter and exit inline math, whereas $$...$$ serves to enter and exit display-style math. In fact, $$...$$ shouldn't even be used in a LaTeX document; see the posting Why is $…$ preferable to $$ … ? for more information on this particular subject.

The times package is deprecated; I suggest you load the newtxtext and newtxmath packages.

\min and \max do not take arguments. If you want to delimit their scope, use (...), [...], or \{...\} -- not {...}.

Assuming that you mostly want inline math in the proof environment, except maybe for the very last equation, the following may be of use to you. (By the way, I haven't checked the math itself!!)

\documentclass{amsart}
\usepackage{amssymb,amsmath,newtxtext,newtxmath}

\newtheorem*{theorem*}{Theorem}
\begin{document}

\begin{theorem*}
If $a$ and $b$ are positive numbers, then $\frac{a}{b}$ and $\frac{a+2b}{a}$ are positive integers.
\end{theorem*}
\begin{proof}
Case 1: If $\frac{a}{b}\leq 2$ then $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq\frac{a}{b}\leq 2$.
Thus $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq 2$.

Case 2: If $\frac{a}{b}>2$ then $\frac{b}{a}<(1/2)$.
Since $\frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}$ which also means it is less than $1+2(1/2)$.
Thus $\frac{a+2b}{a}<2$
so $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq\frac{a+2b}{a}<2$.

Hence from both sides we have $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq 2$.

If you do this again with opposite inequalities you will get:

Case 1: If $\frac{a}{b}\leq2$ then $\frac{b}{a}\geq (1/2)$.
Since $\frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2(1/2)= 2$ so $\frac{a+2b}{a}\geq 2$
thus $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq \frac{a+2b}{a}\geq 2$ which simplifies to
$\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq 2$

Case 2: If $\frac{a}{b}>2$ then $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq \frac{a}{b}>2$.
This means:
$\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)>2$.

From both cases we get: $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq 2$.

Since both sets of inequalities are true, we obtain:
$\min\Bigl(\frac{a}{b},\frac{a+2b}{a}\Bigr)\leq 2\leq \max\Bigl(\frac{a}{b},\frac{a+2b}{a}\Bigr) \qedhere$
\end{proof}
\end{document}