[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Operations on Forms

Subsections

Arithmetic

Conjugate(f) : QuadBinElt -> QuadBinElt
Given a form f = ax2 + bxy + cy2, returns the conjugate form ax2 - bxy + cy2.
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 representative of the product using a fast composition algorithm of Shanks. In contrast, the default for Composition is Reduction := false, so that one can work in the group of forms, rather in the set of class group representatives. The function Composition takes a further parameter Al which specifies whether the algorithm of Gauss or Shanks, set to "Gauss" by default. The algorithm of Shanks performs partial intermediate reductions, so the combination Reduction := false and Al := "Shanks" are incompatible and returns a runtime error.
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, the default for Power is Reduction := false, so that one can work in the group of forms rather than in the class group. The function Power takes the further parameter Al in order to specify whether the algorithm of Gauss or Shanks is used, set to "Gauss" by default. The algorithm of Shanks performs partial intermediate reductions, so the combination Reduction := false and Al := "Shanks" are incompatible and returns a runtime error.
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
Returns the result of applying one reduction step to the quadratic form f.
ReductionOrbit(f) : QuadBinElt -> SeqEnum[QuadBinElt]
The cycle of reduced forms equivalent to f (and each other) where f has positive discriminant.

Order(f) : QuadBinElt -> RngIntElt
For a binary quadratic form f, returns its order as an element of the class group Cl(Q) where Q is the parent of f.

Attribute Access

The coefficient sequence can be accessed as a sequence of integers, providing the inverse operation to the forms coercion constructor.

f[i] : QuadBinElt, RngIntElt -> RngIntElt
The i-th coefficient of f, where 1 ≤i ≤3.
Eltseq(f) : QuadBinElt -> SeqEnum[RngIntElt]
ElementToSequence(f) : QuadBinElt -> SeqEnum[RngIntElt]
The sequence [a, b, c] where f is the form ax2 + bxy + cy2.

Boolean Operations

Several boolean operators apply to quadratic forms.

f in Q : QuadBinElt, QuadBin -> BoolElt
Return true if and only if f is in Q, that is f and Q have the same discriminant.
f eq g : QuadBinElt, QuadBinElt -> BoolElt
Return true if the quadratic form f and g are equal and false otherwise.
IsIdentity(f) : QuadBinElt -> BoolElt
Return true if and only if f is the principal form in its parent structure.
IsReduced(f) : QuadBinElt -> BoolElt
Return true if the quadratic form f is reduced; false otherwise.
IsEquivalent(f, g) : QuadBinElt, QuadBinElt -> BoolElt, AlgMatElt
Return true if the quadratic forms f and g reduce to the same form and false otherwise. If true and the discriminant is negative, then the transformation matrix is also returned. An error is returned if the forms are not of the same discriminant.

Related Structures

In addition to the Parent and Category structures of binary quadratic forms of discriminant D, the quadratic forms map to the ideals of a fixed order or discriminant D in a quadratic number field.

Parent(f) : QuadBinElt -> QuadBin

Category(Q) : QuadBin -> Cat

QuadraticOrder(Q) : QuadBin -> RngQuad
Given a structure of quadratic forms of discriminant D, returns the associated order of discriminant D in a quadratic field.
Ideal(f) : QuadBinElt -> RngQuadIdl
Given a quadratic form f = ax2 + bxy + cy2, returns the ideal (a, ( - b + Sqrt(D))/2) in the quadratic order Z[(t + Sqrt(D))/2], where t equals 0 or 1.
 [Next][Prev] [Right] [Left] [Up] [Index] [Root]

Version: V2.19 of Mon Dec 17 14:40:36 EST 2012