Operations on Forms
Arithmetic
- Conjugate(f): QuadBinElt -> QuadBinElt
Given a form \(f = ax^2 + bxy + cy^2\), returns the conjugate form \(ax^2 - bxy + cy^2\).
- f * g: QuadBinElt, QuadBinElt -> QuadBinElt
- Composition(f, g): QuadBinElt, QuadBinElt -> QuadBinElt
Al : MonStgElt Default: "Gauss" Reduction: BoolElt Default: false
Returns the composition of two binary quadratic forms \(f\) and \(g\). The operator
`*'returns a reduced form equivalent to the product using a fast composition algorithm of Shanks. In contrast, by defaultCompositionreturns the true composition in the group of forms, unless the parameterReduction := true. The functionCompositiontakes a further parameterAlwhich specifies whether the algorithm of Gauss or Shanks, set to"Gauss"by default. The algorithm of Shanks performs partial intermediate reductions, so it is not allowed to selectAl := "Shanks"andReduction := false.
- f ^ n: QuadBinElt, RngIntElt -> QuadBinElt
- Power(f, n): QuadBinElt, RngIntElt -> QuadBinElt
Al : MonStgElt Default: "Gauss" Reduction: BoolElt Default: false
Returns the \(n\)-th power of a form \(f\). The operator
`^'returns a reduced representative, using the fast composition algorithm of Shanks. In contrast, by defaultPowerreturns the true composition in the group of forms, unless the parameterReduction := true. The functionPowertakes the further parameterAlwhich specifies whether the algorithm of Gauss or Shanks is used, set to"Gauss"by default. The algorithm of Shanks performs partial intermediate reductions, so it is not allowed to selectAl := "Shanks"andReduction := false.
Matrix Action
The right action of \({\operatorname{SL}}(2,{\mathbb{Z}})\) on the set of quadratic forms of discriminant \(D\) is given by the rule
Reduction
- Reduction(f): QuadBinElt -> QuadBinElt, Mtrx
- ReducedForm(f): QuadBinElt -> QuadBinElt, Mtrx
Returns a reduced quadratic form equivalent to \(f\), and the transformation matrix.
- ReductionStep(f): QuadBinElt -> QuadBinElt
The result of applying one reduction step to the quadratic form \(f\).
- ReductionOrbit(f): QuadBinElt -> {@ QuadBinElt @}
For a binary quadratic form \(f\) of positive discriminant, this returns an indexed set containing all reduced forms equivalent to \(f\). These are obtained by iterating the
ReductionStepoperator, starting withReduction(f).
- Order(f): QuadBinElt -> RngIntElt
For a binary quadratic form \(f\) of discriminant \(D\), this returns the order of \(f\) in the class group for discriminant \(D\) (see
ClassGroup). Note that the class group is defined using the equivalence relationIsEquivalent(f1, f2 : Narrow := false).
Attribute Access
The coefficient sequence can be accessed as a sequence of integers, providing the inverse operation to the forms coercion constructor.
Boolean Operations
- f in Q: QuadBinElt, QuadBin -> BoolElt
Return
trueif and only if \(f\) is in \(Q\), that is \(f\) and \(Q\) have the same discriminant.
- f eq g: QuadBinElt, QuadBinElt -> BoolElt
Return
trueif the quadratic form \(f\) and \(g\) are equal andfalseotherwise.
- IsIdentity(f): QuadBinElt -> BoolElt
Return
trueif and only if \(f\) is the principal form in its parent structure.
- IsReduced(f): QuadBinElt -> BoolElt
Return
trueif the quadratic form \(f\) is reduced;falseotherwise.
- IsEquivalent(f, g): QuadBinElt, QuadBinElt -> BoolElt, AlgMatElt
Narrow: BoolElt Default: true
For binary quadratic forms \(f\) and \(g\) of the same discriminant, this returns whether the forms are equivalent; that is, whether they can be obtained from each other by a unimodular transformation. When the forms are equivalent, a transformation matrix is also returned.
If the parameter
Narrowisfalse, the function tests a different notion of equivalence in the case of positive discriminant, which may be weaker. This is defined by merging the equivalence classes of forms \(\langle a,b,c \rangle\) and \(\langle -a,b,-c \rangle\) into a single equivalence class. (Another way to describe it is as follows: Forms are equivalent iff their associated ideals are in the same ordinary ideal class. On the other hand, “narrow” equivalence of forms corresponds to narrow ideal classes.) In this case, the transformation matrix may produce the complementary form of \(g\).
Maps of Forms
- FundamentalQuotient(Q): QuadBin -> Map
The quotient homomorphism from the class group of \(Q\) to the class group of fundamental discriminant.