Equivalence

This section describes functionality to test equivalence of quadratic forms. Currently only implemented over the rationals.

IsRationallyEquivalent(X, Y) : AlgMatElt, AlgMatElt -> BoolElt, AlgMatElt
Given two rational symmetric matrices X and Y, determine if they are rationally equivalent, and if so, return T with Y=TXTt.
IsRationallyEquivalent(f, g) : RngMPolElt, RngMPolElt -> BoolElt, AlgMatElt
Given two quadratic forms f and g over Q, determine whether they are rationally equivalent, and if so, return a transform.
IsRationallySimilar(X, Y) : AlgMatElt, AlgMatElt -> BoolElt, AlgMatElt, RngIntElt
Given two rational symmetric matrices X and Y, determine if they are rationally similar, and if so, return T and s with s Y=TXTt.
IsRationallySimilar(f, g) : RngMPolElt, RngMPolElt -> BoolElt, AlgMatElt, RngIntElt
Given two quadratic forms f and g over Q, determine whether they are rationally similar, and if so, return a transform and a similarity factor.
V2.29, 3 August 2026