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

Creation Functions

Subsections

Creation of Structures

Squarefree integers determine quadratic fields. Associated with any quadratic field is its ring of integers (maximal order), and for every positive integer f there exists an order of conductor f inside the maximal order.

For any fixed discriminant the common parent of all binary quadratic forms of discriminant d can be created.

QuadraticField(m) : RngIntElt -> FldQuad
Given an integer m that is not a square, create the field Q(sqrt(d)), where d is the squarefree part of m. It is possible to assign a name to sqrt(d) using angle brackets: R<s> := QuadraticField(m).
EquationOrder(F) : FldQuad -> RngQuad
Creation of the order Z[sqrt(d)] in the quadratic field F=Q(sqrt(d)), with d squarefree.
MaximalOrder(F) : FldQuad -> RngQuad
IntegerRing(F) : FldQuad -> RngQuad
Given a quadratic field F=Q(sqrt(d)), with d squarefree, create its maximal order. This order is Z[sqrt(d)] if d = 2, 3 mod 4 and Z[(1 + sqrt(d)/2)] if d equiv1bmod4.
FieldOfFractions(O) : RngQuad -> FldQuad
FieldOfFractions(F) : FldQuad -> FldQuad
Given a quadratic order, this returns the quadratic field of which it is an order.
sub< O | f > : RngQuad, RngIntElt ->
Create the sub-order of conductor f in the maximal order O of a quadratic field.
QuadraticForms(D) : RngIntElt -> MagForm
Create the magma of binary quadratic forms of discriminant D, with coefficients in Z.

Creation of Elements

One(K) : FldQuad -> FldQuadElt
Identity(K) : FldQuad -> FldQuadElt
Zero(K) : FldQuad -> FldQuadElt
One(O) : RngQuad -> RngQuadElt
Identity(O) : RngQuad -> RngQuadElt
Zero(O) : RngQuad -> RngQuadElt
Representative(K) : FldQuad -> FldQuadElt
Representative(O) : RngQuad -> RngQuadElt
F ! [a_0, a_1] : FldQuad, [FldRatElt] -> FldQuadElt
elt< F | a_0, a_1> : FldQuad, FldRatElt , FldRatElt -> FldQuadElt
Given the quadratic field F=Q(sqrt(d)) and rational numbers a_0, a_(1), construct the element a_0 + a_1 sqrt(d) of F. Automatic coercion certifies that a_0 and a_1 are allowed to be integers.
O ! [a_0, a_1] : RngQuad, [RngIntElt] -> RngQuadElt
elt< O | a_0, a_1> : RngQuad, RngIntElt , RngIntElt -> RngQuadElt
Given an order O and integers a_0, a_1, construct the element a_0 + a_1 f epsilon_d of O, where f is the conductor of O.
F ! a : FldQuad, RngQuadElt -> FldQuadElt
O ! a : RngQuad, RngQuadElt -> RngQuadElt
Coerce a into the quadratic field F or the order O. For coercion into an order the element a must be an integer or an element of a suborder of O; for coercion into a quadratic field F a is allowed to be an integer, a rational number, or an element of F or one of its suborders.
Eltseq(a) : FldQuadElt -> [ FldRatElt ]
ElementToSequence(a) : FldQuadElt -> [ FldRatElt ]
ElementToSequence(a) : RngQuadElt -> [ RngIntElt ]
Eltseq(a) : RngQuadElt -> [ RngIntElt ]
For an element a of the quadratic field Q(sqrt(d)), this returns the sequence [x, y] of rational coefficients, so that a=x + y sqrt(d). For an element a of a quadratic order O, it returns the sequence [x, y] of integers such that a=x + f epsilon_d y, where f is the conductor of O.

Example FldQuad_creation (H34E2)

We create the quadratic field Q(sqrt(5)) and an order in it, and display some elements of the order in their representation as order element and as field element.

> Q<z> := QuadraticField(5);         
> Q eq QuadraticField(45);    
true
> O<w> := sub< MaximalOrder(Q) | 7 >;
> O;
Order of conductor 7 in Quadratic Field Q(sqrt5)
> w;
w
> Q ! w;                    
1/2*(7 + 7*z)
> Eltseq(w), Eltseq(Q ! w);
[ 0, 1 ]
[ 7/2, 7/2 ]
> ( (7/2)+(7/2)*z )^2;
1/2*(147 + 49*z)
>  Q ! w^2;
1/2*(147 + 49*z)
> w^2;
49 + 7*w

Creation of Forms

Binary quadratic forms may be created by coercing a triple of integer coefficient into the magma of forms with the right discriminant.

One(B) : MagForm -> MagFormElt
B ! 1 : MagForm, RngIntElt -> MagFormElt
MinusOne(B) : MagForm -> MagFormElt
B ! -1 : MagForm, RngIntElt -> MagFormElt
Create the principal form or its inverse, in the magma B of binary quadratic forms of discriminant D. Note that the principal form is either X^2 - D/4Y^2 or X^2 + XY + (D - 1)/4Y^2, depending on D being 0bmod4 or 1bmod4.
elt< B | a, b, c> : MagForm, RngIntElt, RngIntElt, RngIntElt -> MagFormElt
B ! <a, b, c> : MagForm, RngIntElt, RngIntElt, RngIntElt -> MagFormElt
Create the binary quadratic form aX^2 + bXY + cY^2 in the magma of forms B of discriminant D. An error occurs if b^2 - 4ac is not equal to D.
elt< B | a, b> : MagForm, RngIntElt, RngIntElt -> MagFormElt
Create the binary quadratic form aX^2 + bXY + cY^2 in the magma of forms B of discriminant D. Here c is determined by D=b^2 - 4ac; if no integer c exists satisfying this, an error will occur.
PrimeForm(B, p) : MagForm, RngIntElt -> MagFormElt
Create the quadratic form pX^2 + bXY + cY^2, for prime p, in the magma B of binary quadratic forms if it exists.
ReducedForms(D) : RngIntElt -> [ MagFormElt ]
Return the sequence of all reduced quadratic forms for the negative fundamental discriminant D.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]