Semi-simple product of $p$-adic numbers Let $A$ be a $\mathbb{Z}_p$-algebra which as a $\mathbb{Z}_p$-module is free of finite rank. Let $x$ be in $A$. Suppose that $A \otimes_{\mathbb{Z}_p}\mathbb{Q}_p$ is semi-simple, i.e. it has no nilpotent element. Now my book says
“then it is a product of finite extension of $\mathbb{Q}_p$ and the image of $x$ in each simple factor is contained in the $p$-adic ring of integer of the factor” without explanation.
But why is this true?
 A: By the Artin-Wedderburn Theorem we have an isomorphism
$$
A \otimes_{\mathbb{Z}_p} \mathbb{Q}_{p} \cong \prod_{i=1}^{k}\operatorname{Mat}_{n_i}(D_i)
$$
for some division algebras $D_i$ over $\mathbb{Q}_p$ and for some $n_i \in \mathbb{N}$. Because you have assumed your algebra $A$ to be commutative, each division algebra $D_i$ can be taken to be a field extension $F_i$ of $\mathbb{Q}_p$ and each $n_i = 1$ so that you have an isomorphism
$$
A \cong \prod_{i=1}^{k} \operatorname{Mat}_{n_i}(D_i) \cong \prod_{i=1}^{k} F_i.
$$
Each field extension $F_i/\mathbb{Q}_p$ must be finite; this can be seen from the fact that $A \otimes_{\mathbb{Z}_p} \mathbb{Q}_p$ has finite dimension as a $\mathbb{Q}_p$-vector space (if even a single $F_i$ was an infinite field extension then $A \otimes_{\mathbb{Z}_p} \mathbb{Q}_p$ would have infinite dimension as a $\mathbb{Q}_p$-vector space).
To see the statement about the element $x \in A$, first write the isomorphism of $\mathbb{Z}_p$-modules
$$
A \cong \bigoplus_{j=1}^{\ell} \mathbb{Z}_p
$$
and chase $x$ through the isomorphism to associate $x \mapsto (x_j)_{j=1}^{\ell}$ for $x_i \in \mathbb{Z}_p$. For each $1 \leq i \leq k$ let $n_i = [F_i:\mathbb{Q}_p]$ and note that we have the identity
$$
\sum_{i=1}^{k} n_i = \ell.
$$
Rewrite the description of $A$ to be of the form
$$
A \cong \bigoplus_{j=1}^{\ell} \mathbb{Z}_p \cong \bigoplus_{i=1}^{k}\left( \bigoplus_{j=1}^{n_i}\mathbb{Z}_p\right)
$$
and note that as $\mathbb{Z}_p$-modules each free module
$$
\bigoplus_{i=1}^{n_i}\mathbb{Z}_p \cong \mathcal{O}_{F_i}
$$
where $\mathcal{O}_{F_i}$ is the ring of integers in $F_i$. Finally once you check that the induced map $A \to A \otimes_{\mathbb{Z}_p} \mathbb{Q}_p \cong \prod_{i=1}^{k} F_i$ factors as
$$
A \cong \bigoplus_{i = 1}^{k} \mathcal{O}_{F_i} \to \prod_{i=1}^{k} F_i \cong \mathbb{Q}_p \otimes_{\mathbb{Z}_p} \left(\bigoplus_{i=1}^{k}\mathcal{O}_{F_i}\right)
$$
checking that the image of $x$ in each component is an $F_i$-integer is routine.
