I know this not, everybody else seems to. This is from page 215 of Cassels, Rational Quadratic Forms, formula 4.1, or SPLAG, page 389 formula (36). quote:

> If $f$ and $g$ are forms of
> determinant $d$ in the same genus,
> then they are rationally equivalent by
> some transformation whose denominator
> is prime to $2d.$ Hence we can find
> corresponding lattices $L,M$ for which
> $$ [ L : L \cap M ] = [ M : L \cap M]
> = r,    $$ say, for some number $r$ which is prime to $2d.$

We are talking about Siegel's definition of forms being in the same genus if they are **rationally equivalent without essential denominator.**

So, here is an example in matrix slang. Given quadratic forms with symmetric matrices
$$ F \; = \;  
 \left(  \begin{array}{cccc}
 2 & 1 & 0 & 1 \\\
 1 & 2  & 0 & 0 \\\
 0 & 0 & 2  & 1  \\\ 
 1 & 0 & 1  & 6  
\end{array} 
  \right)
  $$
and
$$ G \; = \;  
 \left(  \begin{array}{cccc}
 2 & 1 & 1 & 0 \\\
 1 & 2  & 0 & 1 \\\
 1 & 0 & 2  & 0  \\\ 
 0 & 1 & 0  & 8  
\end{array} 
  \right)
  $$
Next, I take $r=3,$ because the discriminant is $29,$ and find
$$ P \; = \;  
 \left(  \begin{array}{cccc}
 1 & 1 & 1 & 7 \\\
 1 & -2  & 1 & -5 \\\
 1 & 1 & -2  & 1  \\\ 
 1 & 1 & 1  & -2  
\end{array} 
  \right)
  $$
that satisfies
$$  P^T \; F \; P \; = \; 9 \; G  = r^2 \; G.  $$

Now, here is the trick. To get back from $G$ to $F,$ it appears that one needs to use $Q = \; \mbox{adj} \; P$ which has a much larger determinant, so things look asymmetric. Indeed,
$$ Q \; = \; \; \mbox{adj} \; P \; = \;  
 \left(  \begin{array}{cccc}
 -18 & -27 & -27 & -9 \\\
 9 & 27  & 0 & -36 \\\
 -9 & 0 & 27  & -18  \\\ 
 -9 & 0 & 0  & 9  
\end{array} 
  \right)
  $$
However, a miracle! The GCD of these entries is 9, and we get the improved
$$ Q_1 \; = \;   
 \left(  \begin{array}{cccc}
 -2 & -3 & -3 & -1 \\\
 1 & 3  & 0 & -4 \\\
 -1 & 0 & 3  & -2  \\\ 
 -1 & 0 & 0  & 1  
\end{array} 
  \right).
  $$
The we really do get what we wanted,
$$  P Q_1 = -9 I = \pm r^2 I $$
and
$$ Q_1^T \; G \; Q_1 \; = \; 9 \; F = \; r^2 F.    $$

Alright, so here is the **question,** with the dimension $n$ thrown in: Suppose $F,G$ are symmetric positive definite matrices of integers with the same determinant $d.$ Suppose we have an integer $r$ with $\gcd (r, 2 d) = 1.$ Suppose that we have a matrix $P$ of integers, with $\det P = \pm r^n,$ such that $  P^T \; F \; P \; = \; r^2 \; G.    $ Take $Q = \; \mbox{adj} \; P,$ so that $\det Q = \pm r^{n^2 - n}$ and $PQ = QP = (\det P) I = \pm r^n I.$ Is it always the case that
$$  \gcd Q = r^{n-2}  ?$$

I think this is progress. Since 1994, it is only 18 years that I have been completely confused on this point and unaware that I was confused. 


EDIT:
The matrix $P$ is not necessarily rank $1 \pmod r.$ Here are the two forms by Schiemann of discriminant 1729, not equivalent but in the same genus and, wait for it, the same theta series.

$$ F \; = \;  
 \left(  \begin{array}{cccc}
 4 & 1 & 0 & 1 \\\
 1 & 8  & 1 & 3 \\\
 0 & 1 & 8  & 4  \\\ 
 1 & 3 & 4  & 10  
\end{array} 
  \right)
  $$
and
$$ G \; = \;  
 \left(  \begin{array}{cccc}
 4 & 2 & 1 & 1 \\\
 2 & 8  & -2 & 1 \\\
 1 & -2 & 10  & 5  \\\ 
 1 & 1 & 5  & 10  
\end{array} 
  \right)
  $$
Next, I take $r=5,$ and find
$$ P \; = \;  
 \left(  \begin{array}{cccc}
 -1 & 6 & -4 & 0 \\\
 -2 & -3  & -3 & 0 \\\
 3 & 2 & -3  & 0  \\\
 -1 & -1 & 0  & -5  
\end{array} 
  \right)
  $$
that satisfies
$$  P^T \; F \; P \; = \; 25 \; G  = r^2 \; G.  $$