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).
Creation of the order Z[sqrt(d)] in the quadratic field F=Q(sqrt(d)), with d squarefree.
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.
Given a quadratic order, this returns the quadratic field of which it is an order.
Create the sub-order of conductor f in the maximal order O of a quadratic field.
Create the magma of binary quadratic forms of discriminant D, with coefficients in Z.
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.
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.
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.
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.
> 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
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
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.
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.
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.
Create the quadratic form pX^2 + bXY + cY^2, for prime p, in the magma B of binary quadratic forms if it exists.
Return the sequence of all reduced quadratic forms for the negative fundamental discriminant D.[Next] [Prev] [Right] [Left] [Up] [Index] [Root]