Let and be two reduced definite integral binary quadratic forms such that there exists with . Then . Furthermore these cases being inclusive.

SinceHand are equivalent, they have the same discriminant and represent the same integers. To say thatHis reduced implies thatPis the minimum ofHon and thatRis the second minimum, hence and . Equality of discriminants implies , hence since they are both nonnegative.Let as usual and be the generators of the modular group , let be the usual compact fundamental domain for the modular group in the upper half plane .

Let be a definite binary quadratic form, and the roots of . Since

His reduced in the usual sense, we have .Now let be an automorphism of

H.If , then it fixes , hence by the usual theory, is either , (if ), or (if ).

If , then it swaps and , so that

Taking imaginary parts, we geta=-d. Taking real parts, then using and , we obtainbP=aQ+cR. Finally, the determinant condition gives . One easily checks that the three conditionsa=-d, andbP=aQ+cRare necessary and sufficient conditions forMto be an automorphism ofH.Now we clearly have and , and since

His reduced we have . Thus we obtain the following:If , then and

P=Q=R, sob=0hencec=-a,d=-aand .If

a=0, thenbc=1and soR=Pand , henceb=candd=0.If

c=0, then andbP=aQ. This implies that eitherb=0andQ=0, orb=aandP=Q.This finishes the proof of the lemma. Note that it follows from this result that the group

Gof automorphisms ofHis always isomorphic to a group of the form , withm=1,m=2(whenQ=0orP=RorP=Qare the only equalities),m=4(whenP=RandQ=0), orm=6(whenP=Q=R).