On exactness of the functors $M \mapsto \hat{M}$ and $M \mapsto \hat{A}\otimes_{A}M$

If $A$ is a Noetherian ring, $M$ is a finitely generated module, $I$ is an ideal of $A$, and $\hat{A}$ is the $I-adic$ completion of $A$, then we know that $\hat{A}\otimes_{A}M\cong\hat{M}$.

Also in Atiyah&Macdonald, there is a remark on Page 109 that the functor $M \mapsto \hat{M}$ is not exact without assuming $M$ finitely generated. but the functor $M \mapsto \hat{A}\otimes_{A}M$ is always exact.

How to prove this assertion?

And what is an example of the breakdown of exactness of $M \mapsto \hat{M}$ when $M$ is not finitely generated?

(This is not a homework problem)

• For the counterexample, $A =\mathbb Z$, $I=p$, $M= \mathbb Q$. Nov 7 '13 at 4:23
• I don't understand the counterexample. A counterexample should consist of an exact sequence, not just a module. Nov 7 '13 at 14:18
• In Will Sawin's setup, the injection $\mathbb{Z}\hookrightarrow \mathbb{Q}$ of $\mathbb{Z}$-modules does not remain injective after taking $p$-adic completions. Nov 7 '13 at 18:16
• Also, if you look closely on page 109 of A-M, there is actually a proof of the flatness of $\hat{A}$ as an $A$-algebra. Nov 7 '13 at 18:23
• You don't even have to look closely on page 109 of AM: the remark immediately follows the proposition that $\hat A$ is a flat $A$-algebra. Furthermore, the very first exercise in the section is a counterexample to exactness for non-finitely generated modules. Nov 7 '13 at 18:48

Let $k$ be a field, $A=k[[t]]$, $I=(t)$. In http://arxiv.org/pdf/0902.4378v4.pdf example 3.20, there is an example of a short exact sequence of $A$-modules $0 \to P \to Q \to M \to 0$, such that after completion, the resulting sequence $0 \to \hat{P} \to \hat{Q} \to \hat{M} \to 0$ is not even exact at $\hat{Q}$. Thus, completion is no even exact at the middle!
As for tensoring with the completion ring, this is of course a question of flatness. It is know clasically that if $A$ is noetherian then the completion map is flat.
More generally, the completion map does not have to be flat. If $A$ is a ring which is not coherent, then taking $B=A[x]$ and $I=(x)$ will give you an example of a ring with non-flat completion. Note however that in this case, not only your ring is non-noetherian, but also its completion is non-noetherian. It is an open question to me if there is a ring with noetherian completion such that the completion map is not flat.