# Ring of integers in p-adic field

How do we compute the ring of integers in a finite extension of $\mathbb{Q}_p$? Say, for example, in $\mathbb{Q}_p(i)$. Over $\mathbb{Q}$ we would guess $\mathbb{Z}[i]$, compute the discriminant of this $\mathbb{Z}$ module and look for squares dividing it. But squares in $\mathbb{Z}_p$ are slightly more complicated than in $\mathbb{Z}$.

Is there some easy way to see the ramification degree / the degree of the residue field extension? If this were the case then it would be very easy to write down the valuation on the extension.

-
Squares in ${\mathbf Z}_p$ are simpler than in ${\mathbf Z}$, not more complicated! Anyway, just knowing the ram. index and res. field degree in general is insufficient. A general answer is in Lang's Algebraic Number Theory (2nd ed.), Prop. 23 on p. 26. Using any uniformizer $\pi$ (which you could check if you know the ram. index) and generator $\gamma$ of the res. field extension (which you could check if you know the res. field degree), the integers of the extension are ${\mathbf Z}_p[\pi,\gamma]$. If $e = 1$ use $\pi = p$, so the ring is ${\mathbf Z}_p[\gamma]$. If $f=1$ (contd.) – KCd May 25 '12 at 0:18
use $\gamma = 1$, so the ring is ${\mathbf Z}_p[\pi]$. As for the special case of ${\mathbf Q}_p(i)$, the ring of integers is in general ${\mathbf Z}_p[i]$, even for $p=2$, but notice ${\mathbf Z}_p[i] = {\mathbf Z}_p$ if $p \equiv 1 \bmod 4$ since $-1$ is a $p$-adic square in that case, so writing the ring of integers as ${\mathbf Z}_p[i]$ is kind of misleading as to what the ring looks like. – KCd May 25 '12 at 0:19
Another thing to be careful about is that you know the degree of your field over ${\mathbf Q}_p$! For instance, asking about the ring of integers of ${\mathbf Q}_5(\sqrt[3]{2})$ is ambiguous, because $X^3-2$ has one root in ${\mathbf Q}_5$ and the other roots are quadratic over ${\mathbf Q}_5$. – KCd May 25 '12 at 0:21
@KCd I would suggest maybe you could bundle your comments into an answer, so that this question loses its label "unanswered" – M Turgeon Aug 7 '12 at 16:36

"Squares in $\mathbb Z_p$ are simpler than in $\mathbb Z$, not more complicated! Anyway, just knowing the ramification index and residue field degree in general is insufficient. A general answer is in Lang's Algebraic Number Theory (2nd ed.), Prop. 23 on p. 26. Using any uniformizer $\pi$ (which you could check if you know the ramification index) and generator $\gamma$ of the residue field extension (which you could check if you know the residue field degree), the integers of the extension are $\mathbb Z_p[\pi,\gamma]$. If $e=1$ use $\pi=p$, so the ring is $\mathbb Z_p[\gamma]$. If $f=1$ use $\gamma=1$, so the ring is $\mathbb Z_p[\pi]$. As for the special case of $\mathbb Q_p(i)$, the ring of integers is in general $\mathbb Z_p[i]$, even for $p=2$, but notice $\mathbb Z_p[i]=Z_p$ if $p\equiv 1\pmod4$ since $−1$ is a $p$-adic square in that case, so writing the ring of integers as $\mathbb Z_p[i]$ is kind of misleading as to what the ring looks like.
Another thing to be careful about is that you know the degree of your field over $\mathbb Q_p$! For instance, asking about the ring of integers of $\mathbb Q_5(\sqrt[3]{2})$ is ambiguous, because $X^3−2$ has one root in $\mathbb Q_5$ and the other roots are quadratic over $\mathbb Q_5$."