Creation Functions

Contents

Creation of Structures

For any nonsquare integer D congruent to 0 or 1 modulo 4, binary quadratic forms of discriminant D may be created. The parent object of forms of discriminant D can be created using the following commands.

BinaryQuadraticForms(D) : RngIntElt -> QuadBin
QuadraticForms(D) : RngIntElt -> QuadBin
Create the structure of integral binary quadratic forms of discriminant D.

Creation of Forms

Binary quadratic forms may be created by coercing a triple [a, b, c] of integer coefficients into the parent structure of forms of discriminant D = b2 - 4ac. Other constructors are provided for constructing the group identity, prime forms, or allowing the omission of third element c of the sequence.

Identity(Q) : QuadBin -> QuadBinElt
Q ! 1 : QuadBin, RngIntElt -> QuadBinElt
Create the principal form in the structure Q of binary quadratic forms of discriminant D. The principal form is a reduced form equivalent to X2 - D/4Y2 when D ≡ 0 mod 4, or X2 + XY - (D - 1)/4Y2 when D ≡ 1 mod 4.
Q ! [a, b, c] : QuadBin, RngIntElt, RngIntElt, RngIntElt -> QuadBinElt
elt< Q | a, b, c> : QuadBin, RngIntElt, RngIntElt, RngIntElt -> QuadBinElt
elt< Q | a, b> : QuadBin, RngIntElt, RngIntElt -> QuadBinElt
Returns the binary quadratic form aX2 + bXY + cY2 in the magma of forms Q of discriminant D. Here c is determined by the solution of the equality D = b2 - 4ac; if no integer c exists satisfying this, an error will occur.
PrimeForm(Q, p) : QuadBin, RngIntElt -> QuadBinElt
If p is a split prime or a ramified prime not dividing the conductor of the magma of quadratic forms Q, returns a quadratic form pX2 + bXY + cY2 in Q.
V2.28, 13 July 2023