Let $SM\_n(R)$ be the set of $n\times n$ symmetric matrices with entries in a ring $R$ and let $A\sim B$ for such matrices if $A=C^T\cdot B\cdot C$ for some $C\in SL(n,R).$ It is an equivalence relation (appearing for example in the theory of modular forms, at least in the context of positive matrices).


Each $M\in SM\_n(\mathbb Q)$ is equivalent to a diagonal matrix and that can be used to classify all equivalence classes in $SM\_n(\mathbb Q)$.


Is there a classification of $\sim$-equivalence classes in $SM\_n(\mathbb Z)$? Or, at least, an algorithm for determination if $A\sim B$ for $A,B\in SM\_n(\mathbb Z)$?



Symmetric Integral Matrices
Partial answer:


Let $M$ be an $n \times n$ symmetric matrix over a PID $R$. Then using an algorithm resembling the one for computing Smith Normal Forms, we get that $M \sim E\oplus\bigoplus\_{i=1}^{\lfloor n/2\rfloor} D\_{i}$, where $E$ is either $1 \times 1$ or $0 \times 0$, and each $D\_i$ is $2 \times 2$ and symmetric. The operation "$\oplus$" means direct sum of matrices.


The above reduces your problem to the case of symmetric matrices which are block-diagonal with $1 \times 1$ and $2 \times 2$ blocks.


