# File ended while scanning use of \align

I have seen this question posted before and the answer was to eliminate blank space before \end. However I did this and I am still getting an error. Here is my code for this portion:

Lemma 1: Let $f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}$.
Let $n \in \mathbb{Z}_{>0}$. Let $\sum\limits_{d|n} f(d)$ be the sum over all divisors of $n$. Then $F(n)=\sum\limits_{d|n} f(d)$ is also a multiplicative function.
\bigskip
$Proof.$ Let $F(n)=\sum\limits_{d|n} f(d).$ Let $m,n \in \mathbb{Z}_{>0}, gcd(m,n)=1$. Additionally, let $d=rs$, where $r$ and $s$ are divisors of $m$ and $n$ respectively.

\begin{align}
F(mn)=\sum\limits_{d|mn} f(d) \\
F(mn)=\sum\limits_{r|m,s|n} f(rs) \\
F(mn)=\sum\limits_{r|m,s|n} f(r)f(s) \\
F(m)F(n)=(\sum\limits_{r|m)f(r))(\sum\limits_{s|n)f(s))
\end{align}


You have no closing }'s (2 times) in the line:

F(m)F(n)=(\sum\limits_{r|m)f(r))(\sum\limits_{s|n)f(s))


$Proof.$ Let $F(n)=\sum\limits_{d|n} f(d).$ Let $m,n \in \mathbb{Z}_{>0}, gcd(m,n)=1$.

It would be better to use (amsthm) \begin{proof} ... \end{proof}. Additionally, we have macro \gcd and we should write $., not .$, even if the difference is invisible, because it shows a structure: some words, which may be math formulas, and a fullstop, which ends the sentence.
• And \limits is useless here. Commented Sep 19, 2015 at 6:35
• i changed the package name from amsmath to amsthm. although amsmath does a lot of useful things, defining proof is not one of them. Commented Sep 19, 2015 at 13:20