Is a torsion-free abelian group finitely generated, if all of its localizations at primes $p$ are finitely generated over $\mathbb{Z}_p$? Background: When proving that the group of $k$-isogenies $\mathrm{Hom}_k(A,B)$ between two abelian varieties is finitely generated, one first shows that the Tate map $$\mathbb{Z}_\ell\otimes_{\mathbb{Z}} M \to \mathrm{Hom}_{\mathbb{Z}_\ell}(T_\ell A,T_\ell B)$$ is injective. Since each Tate module is free of finite rank over $\mathbb{Z}_\ell$, it follows that the localization $M_\ell$ is $\mathbb{Z}_\ell$-finite. One then uses a little trick to deduce the $\mathbb{Z}$-finiteness of $M$ itself. (See Silverman I, for example.)
The above proof needs only a single prime $\ell$,
but disregarding issues of the characteristic of the field (which are apparently surmountable) we actually have an injective Tate map at every prime. Thus...
Question: Can the $\mathbb{Z}$-finiteness of $M$ be deduced directly from the $\mathbb{Z}_\ell$-finiteness of  $M_\ell$ for all primes $\ell$?
One can consider this a question about general torsion-free abelian groups $M$. A non-counterexample to keep in mind is $M=\mathbb{Z}[1/p]$,
for which $M_\ell$ is $\mathbb{Z}_\ell$-finite for all $\ell\neq p$.
(A google search shows that there is actually quite a body of literature on torsion-free abelian groups, so perhaps the answer to this question is well-known, but I'm not sure where to look...)
 A: The question is confusing. Presumably, by finite you mean finitely generated, but it's not clear what you mean by localization at l --- you seem to mean tensor with Zl. If M is torsion free and becomes finitely generated when tensored with Zl for one l, then obviously it is finitely generated (linearly independent elements will remain linearly independent). However, when you prove that Hom(A,B) is finitely generated, the first step is to show that Hom(A,B) injects into Hom(TlA,TlB). The harder step is to show that Hom(A,B) tensor Zl injects into it.
A: I don't think so. Consider the $\mathbb{Z}$-module $M$ be the additive subgroup of the rationals consisting of rationals with square-free denominator.
A: I was reading Milne's ``Abelian Varieties'' notes this week and had almost this exact same question regarding the proof that Hom(A,B) is a free $\mathbb{Z}$-module.  An internet search revealed this post and I felt that I have a thought to contribute.  In particular, I believe that the proofs found in {Silverman 1, Milne, Mumford} that Hom(A,B) is a free $\mathbb{Z}$-module may be omiting a small and subtle but important step.  
For instance, Sam Lichtenstein originally posted above that in Silverman's Arithmetic of Elliptic Curves, ``one then uses a little trick to deduce the $\mathbb{Z}$-finiteness of $M$ itself'', where $M$ is Hom(A,B).  The little trick is quoted here for those who do not have Silverman in front of them:
Begin Silverman:
Since Hom($E_1$,$E_2$) is torsion-free, it follows that
$$\mbox{rank}_\mathbb{Z} \mbox{Hom}(E_1,E_2) = \mbox{rank}_{\mathbb{Z}_l} \mbox{Hom}(E_1,E_2)\otimes \mathbb{Z}_l,$$
in the sense that if one is finite, then they both are and they are equal.
End Silverman
My complaint is that the left-hand side does not make sense because we have not established much about Hom($E_1$,$E_2$).  All we know is that Hom($E_1$,$E_2$) is torsion free abelian group.  This does not seem sufficient to define $\mathbb{Z}$-rank.  For example, what is the $\mathbb{Z}$-rank of $\mathbb{Q}$?  Any two nonzero rational numbers are linearly dependent over $\mathbb{Z}$, and since $\mathbb{Q}$ is torsion-free we must conclude that $\mathbb{Q}$ has $\mathbb{Z}$-rank 1, so $\mathbb{Q} \simeq \mathbb{Z}$ (?!?!).
In Mumford, the proof that Hom(A,B) is a finitely generated free $\mathbb{Z}$-module appears to be the following progression of steps, each with its own detailed proof except for step 4:


*

*Hom(A,B) is torsion-free

*If $M$ is a finitely generated submodule of Hom(A,B), then $(M\otimes\mathbb{Q}) \cap \mbox{Hom}(A,B)$ is finitely generated.

*$\mbox{Hom}(A,B) \otimes \mathbb{Z}_l$ is a free $\mathbb{Z}_l$-module for all $l \neq p$, where $p$ is the characteristic of the field

*Steps 1-3 obviously now imply that Hom(A,B) is a free $\mathbb{Z}$-module
Step 4 is the step I was unable to follow at first.  This is because step 2 holds the key to step 4 in a way that is somewhat subtle.  For example, consider the torsion-free abelian group $N \subset \mathbb{Q}$ consisting of all rational numbers with denominators with $l$-adic valuation 0 or 1 for all primes $l$.  That is, $N$ is the set of all $a/b$ where gcd$(a,b) = 1$ and the prime factorization of $b$ is $b = p_1p_2\cdots p_t$, $p_i \neq p_j$ for $i \neq j$.  $N \otimes \mathbb{Z}_l$ is isomorphic to the principal fractional ideal $(1/l)\mathbb{Z}_l$.  Since we only care about the $\mathbb{Z}_l$-module structure of $N \otimes \mathbb{Z}_l$, we see that $(1/l)\mathbb{Z}_l$ is a free $\mathbb{Z}_l$-module of rank 1, where the isomorphism $(1/l)\mathbb{Z}_l \rightarrow \mathbb{Z}_l$ is given by multiplication by $l$.  $N$ is not finitely generated and thus would provide a counterexample if step 2 were not important because $N$ satisfies step 1 and 3.  However, it fails step 2.  If $M$ is a nonzero finitely generated submodule of $N$, then 
$$(M \otimes \mathbb{Q}) \cap N = \mathbb{Q} \cap N = N$$
and $N$ is not finitely generated.  Mumford pays lipservice to the use of step 2 to prove step 4, but he does not fully explain.
What I think is missing is something like the following proposition:  ``If $N \subseteq \mathbb{Q}$ is a subgroup satisfying axiom 2, then $N$ is finitely generated''.  Prove this by contradiction similar to the previous paragraph.  Let $M \subseteq N$ be a finitely-generated submodule and observe that $M \otimes \mathbb{Q} = \mathbb{Q}$, hence $M$ is finitely generated if and only if $N$ is finitely generated.
A: I had the same question when reading Silverman, and want to follow up on Jeremy's answer and explain "Step 4" of his proof in more detail. Corollary 1.6 in these notes was also very helpful.
So let's prove that if $N$ is a $\mathbb{Z}$-module such that

*

*$N$ is torsion-free,

*For every finitely generated $\mathbb{Z}$-submodule $M$ of $N$, the set $M^{\text{div}} := \{n \in N ~|~ \exists k \in \mathbb{Z} \text{ such that } kn\in M\}$ is a finitely generated $\mathbb{Z}$-module,

*For one prime $\ell$ the $\mathbb{Z}_\ell$-module $N \otimes_{\mathbb{Z}} \mathbb{Z}_\ell$ is finitely generated,

then $N$ is finitely generated. (The rank estimate for $N=\text{Hom}(E_1,E_2)$ follows then precisely as in Silverman, Cor. III.7.5)
By 3. we know that $N\otimes_{\mathbb{Z}} \mathbb{Q}_\ell = (N\otimes_{\mathbb{Z}} \mathbb{Z}_\ell) \otimes_{\mathbb{Z}_\ell} \mathbb{Q}_\ell$ is a finite-dimensional $\mathbb{Q}_\ell$-vector space. But also $N\otimes_{\mathbb{Z}} \mathbb{Q}_\ell = (N\otimes_{\mathbb{Z}} \mathbb{Q}) \otimes_{\mathbb{Q}} \mathbb{Q}_\ell$, thus the $\mathbb{Q}$-vector space $N\otimes_{\mathbb{Z}} \mathbb{Q}$ is finite-dimensional as well. Let $n_1,\dots,n_d$ be a basis of the vector space $N\otimes_{\mathbb{Z}} \mathbb{Q}$. By clearing denominators we may assume that $n_i \in N$ for all $i$. Let $M$ be the $\mathbb{Z}$-submodule of $N$ generated by $n_1,\dots,n_d$. We claim that $M^{\text{div}} = N$, which by 2. completes the proof.
Clearly $M^{\text{div}} \subset N$, so take $n \in N$. Then $n = \sum_i n_i \otimes \lambda_i$ for $\lambda_i \in \mathbb{Q}$. By clearing denominators of the $\lambda_i$ we see that some $\mathbb{Z}$-multiple of $n$ is a $\mathbb{Z}$-linear combination of the $n_i$ and thus lives in $M$, i.e. $n \in M^{\text{div}}$.
