To discern whether two integral quadratic forms are equivalent over the $p$adic integers, one can compute a Jordan decomposition at $p$ and read off some invariants. Restricting to $p\ne2$ for convenience, Conway and Sloane give an algorithm for this procedure (`$p$adic diagonalisation'). But their algorithm in fact computes a diagonalisation over the localisation of $\mathbb{Z}$ at $p$, $\mathbb{Z}_{(p)}:=\{\frac{a}{b}\text{ : }a,b\in\mathbb{Z},p\nmid b\}$, rather than over the $p$adic integers $\mathbb{Z}_p$ in generality. My question is: does equivalence over $\mathbb{Z}_{(p)}$ differ from equivalence over $\mathbb{Z}_p$? And if so, when do such differences occur?
1 Answer
Since $\mathbb{Z}_{(p)}$ can be thought of as a subring of $\mathbb{Z}_{p}$, if two quadratic forms $Q_{1}$ and $Q_{2}$ are equivalent over $\mathbb{Z}_{(p)}$, then they must be equivalence over $\mathbb{Z}_{p}$. (And this is the reason that it suffices for Conway and Sloane to compute a diagonalization over $\mathbb{Z}_{(p)}$.)
However, the converse is false. Equivalence over $\mathbb{Z}_{p}$ does not imply equivalence over $\mathbb{Z}_{(p)}$ and maybe a good way of explaining this is that $\mathbb{Z}_{p}$ has a lot fewer square classes. In particular, if $p > 2$ and $x \in \mathbb{Z}_{p}$, then $x$ is a square if and only if $x = p^{2k} u$ for some integer $k \geq 0$ and $u \in \mathbb{Z}_{p}^{\times}$ whose reduction $\tilde{u} \in \mathbb{F}_{p}$ is a square.
In particular, the quadratic forms $Q_{1}(x,y) = x^{2}  y^{2}$ and $Q_{2}(x,y) = x^{2}  7y^{2}$ are equivalent in $\mathbb{Z}_{3}$, but are not equivalent in $\mathbb{Z}_{(3)}$. This follows from the observation that $\sqrt{7} \in \mathbb{Z}_{3}$, while $\sqrt{7} \not\in \mathbb{Z}_{(3)}$.

$\begingroup$ Thanks, great answer! Do you a know a reference for studying equivalence over the localisation? Do we have invariants that classify equivalence over $\mathbb{Z}_{(p)}$ in the same way we do for equivalence over $\mathbb{Z}_p$ (and genera of forms)? $\endgroup$– a196884Oct 27, 2022 at 8:20

$\begingroup$ Yes. Chapter 9 of O'Meara's book "Introduction to Quadratic Forms" is titled "Integral Theory of Quadratic Forms over Local Fields", and Theorem 92.2 of that book (page 247 in the second printing) gives a classification (in the nondyadic cases) in terms of the discriminants of the terms in the Jordan splitting. (Basically, a term in the Jordan splitting arises from diagonalising the quadratic form and then grouping together all terms where the $p$adic valuation of the coefficients are the same.) $\endgroup$ Oct 27, 2022 at 14:51