TITLE: reference for p-local and p-complete integers
QUESTION [6 upvotes]: Can anyone suggest a good thorough reference for $p$-localization and $p$-completion of the integers?  I'm an algebraic topologist who's found himself washed up without any intuition.
In particular, here are the two questions I'm trying to answer right now:
Question 1: what is $\mathbb{Q}/\mathbb{Z}_p$ tensored with itself?
I mean $\mathbb{Z}_p$ to be the $p$-local integers.  The tensor is over $\mathbb{Z}_p$ or $\mathbb{Z}$ - the answer should be the same.
I know $\mathbb{Q}/\mathbb{Z}_p$ is an injective $\mathbb{Z}_p$-module, and $\mathbb{Z}_p$ is a nice local ring, so maybe something can be said about a flat resolution of $\mathbb{Q}/\mathbb{Z}_p$?
Question 2: What is known about the cokernel of the map $\mathbb{Z}_p \rightarrow \mathbb{\hat{Z}}_p$?
I mean the map that $p$-completes the $p$-local integers.  I think the cokernel is a rational vector space, but of finite or infinite dimension?  Does it have any nice description?

REPLY [7 votes]: I'm going to switch to a more standard notation, where the localization is $\mathbb{Z}_{(p)}$ and the completion is $\mathbb{Z}_p$.
For your first question, the general rule that concerns us is that the tensor product of a $p$-divisible group with a $p$-torsion group is zero.  The reason is that if $a$ is a $p^n$th power and $p^n b = 0$, then $a \otimes b = p^{-n}a \otimes p^n b = 0$.  Since $\mathbb{Q}/\mathbb{Z}_{(p)}$ is both $p$-divisible and $p$-torsion, its tensor square is zero.
The cokernel of completion is a $\mathbb{Q}$-vector space, because it admits a $\mathbb{Z}_{(p)}$-action by multiplication, and it is uniquely $p$-divisible (Proof: lift any element to $\mathbb{Z}_p$, subtract the constant term of its $p$-adic expansion, divide by $p$, and check that different lifts yield the same answer).  Its dimension over $\mathbb{Q}$ is the cardinality of the continuum, since that is its cardinality as a set.
I think most number theory texts have some discussion of $p$-adic numbers, and Gouvea even wrote a whole book about them.