Magma

MAGMA Computational Algebra System

Magma
 •  How to get it
 •  Download
 •  Online Demo
 
Resources
 •  Online Help
 •  Discovering Mathematics with Magma
 •  Citations
 •  How to cite Magma
 •  Links
 •  Contact us
 
[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Operations on Structures

The majority of functions for quadratic fields and orders apply identically to number fields and orders in general. The functions which exist only for quadratic fields and orders are listed here along with those which deserve a special mention.

Subsections
AssignNames(~F, [s]) : FldQuad, [ MonStgElt ]) ->
AssignNames(~O, [s]) : RngQuad, [ MonStgElt ]) ->
Procedure to change the name of the generator of a quadratic field F or an order O in a quadratic field to the string s. Elements of the quadratic field Q(Sqrt(d)) with m squarefree will be printed in the form 1/b*(x + y*s), where b, x, y are integers. Similarly, for an order O of conductor f in a quadratic field elements will be printed in the format x + y*s.

This procedure only changes the name used in printing the elements of F or O, it does not make an assignment to an identifier s. To do this, use an assignment statement, or angle brackets when creating the field or order: F<s> := QuadraticField(-3);.

Note that since this is a procedure that modifies F or O, it is necessary to have a reference ~ in the call to this function.

Name(F, 1) : FldQuad, RngIntElt -> FldQuadElt
Name(O, 1) : RngQuad, RngIntElt -> RngQuadElt
Given a quadratic field F or one of its orders O, return the element which has the name attached to it, that is, return Sqrt(d) in the field, or f εd in a suborder of the maximal order or f Sqrt(d) in a suborder of the equation order.
FundamentalUnit(K) : FldQuad -> FldQuadElt
FundamentalUnit(O) : RngQuad -> RngQuadElt
A generator for the unit group of the order O or the maximal order of the quadratic field K.
Discriminant(K) : FldQuad -> RngIntElt
The discriminant of the field K which is only defined up to squares. The discriminant will be the discriminant of the polynomial or better.
Conductor(K) : FldQuad -> RngIntElt, [RngIntElt]
The conductor of the field K which is the order of the smallest cyclotomic field containing K and a sequence containing the ramified real places of K.
Conductor(O) : RngQuad -> RngIntElt
The conductor of the order O, which equals the index of O in the maximal order.

Ideal Class Group

The function ClassGroup is available for number fields and orders in general but a different and faster algorithm is used for the quadratics. All of the algorithms are based on binary quadratic forms, see ClassGroup in Chapter BINARY QUADRATIC FORMS for details.

ClassGroup(K) : FldQuad -> GrpAb, Map
ClassGroup(O) : RngQuad -> GrpAb, Map
    FactorBasisBound: FldReElt          Default: 0.1
    ProofBound: FldReElt                Default: 6
    ExtraRelations: RngIntElt           Default: 1
The class group of a maximal order O or the maximal order of the quadratic field K, as an abelian group. The function also returns a map between the group and the power structure of ideals of O or the maximal order of K. For details on the parameters see ClassGroup in Chapter BINARY QUADRATIC FORMS.
ClassNumber(K) : FldQuad -> RngIntElt
ClassNumber(O) : RngQuad -> RngIntElt
    FactorBasisBound: FldReElt          Default: 0.1
    ProofBound: FldReElt                Default: 6
    ExtraRelations: RngIntElt           Default: 1
The class number of the maximal order O or the maximal order of the quadratic field K.
PicardGroup(O) : RngQuad -> GrpAb, Map
PicardNumber(O) : RngQuad -> RngIntElt
    FactorBasisBound: FldReElt          Default: 0.1
    ProofBound: FldReElt                Default: 6
    ExtraRelations: RngIntElt           Default: 1
The picard group (the group of the invertible ideals of O modulo the principal ones) of the order O or the size of this group. PicardGroup also returns a map from the group to the ideals of O.
QuadraticClassGroupTwoPart(K) : FldQuad -> GrpAb, Map
QuadraticClassGroupTwoPart(O) : RngQuad -> GrpAb, Map
QuadraticClassGroupTwoPart(d) : RngIntElt -> GrpAb, Map
    Factorization: RngIntEltFact        Default: []
Use the Bosma-Stevenhagen algorithm to compute the 2-part of the class group of a quadratic order. Returned are: an array of forms that generates the 2-part and an array that gives the orders of the respective elements. The Factorization of the given discriminant can be given as additional information.

Example FldQuad_qcgtp (H32E3)

> G, f := QuadraticClassGroupTwoPart(33923894057872); G;
Abelian Group isomorphic to Z/2 + Z/2 + Z/2 + Z/4 + Z/16 + Z/16
> Random(G);
11*G.1 + 2*G.2 + G.3 + G.4 + G.6
> f($1);
<-1212992,3947508,3780131>
> G, f := QuadraticClassGroupTwoPart(QuadraticField(33923894057872)); G;
Abelian Group isomorphic to Z/2 + Z/8 + Z/16

Norm Equations

For imaginary quadratic fields, (that is, for quadratic fields Q(sqrt m) with m < 0), the function NormEquation is provided specially for quadratics to find integral elements of a given norm. For real quadratic fields conics are used, see Section Finding Points for details.

NormEquation(F, m) : FldQuad, RngIntElt -> BoolElt, SeqEnum
NormEquation(F, m: parameters) : FldQuad, RngIntElt -> BoolElt, SeqEnum
NormEquation(O, m) : RngQuad, RngIntElt -> BoolElt, SeqEnum
NormEquation(O, m: parameters) : RngQuad, RngIntElt -> BoolElt, SeqEnum
    Factorization: [<RngIntElt, RngIntElt>] Default: 
    All: BoolElt                        Default: true
    Solutions: RngIntElt                Default: All
    Exact: BoolElt                      Default: false
    Ineq: BoolElt                       Default: false
    SetVerbose("NormEquation", n):      Maximum: 1
Given quadratic field F and a non-negative integer m, return true if there exists an element αin the ring of integers OF of F with norm m, and false otherwise. Instead of searching the maximal order OF it is possible to search any suborder O of OF for such element αby supplying O as a first argument.

For imaginary quadratic fields the method used is constructive (it uses Cornacchia's algorithm, see [Coh93] section 1.5.2), and if the value true is returned then a solution [x] is also returned as a second return value.

Note that if the discriminant F=Q(Sqrt(d)) with d equiv1bmod4 (and squarefree) this function searches for a solution in integers to x2 + y2d=4m (and the solution α=(x + ySqrt(d)/2) is returned), whereas for d = 2, 3bmod4 a solution α=x + ySqrt(d) with x2 + y2d=m in integers x, y is returned, if it exists. In an order of conductor f a search is conducted for a solution to the same equation with d replaced by f2d. Note that a version of NormEquation with integer arguments d and m also exists (see Section The Solution of Modular Equations).

Unless m is the square of an integer, the factorization of m is used by the algorithm; if it is known, it may be supplied as the value of the optional parameter Factorization to speed up the calculation.

A verbose flag can be set to obtain some information on progress with the computation (see SetVerbose).

For real quadratic fields the same algorithm is used as for the general number fields. The last 4 parameters refer to this algorithm. See Section Solving Norm Equations for a description.


Example FldQuad_norm-equation (H32E4)

> d := 302401481761723680;
> m := 76814814791186002463716;
> Q<z> := QuadraticField(-d);
> O<w> := sub< MaximalOrder(Q) | 6 >;
> f, s := NormEquation(O, m);
> s, Norm(s[1]);
406 + 1008*w 76814814791186002463716

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

Version: V2.16 of Mon Nov 16 15:04:45 EST 2009

Valid HTML 4.01! Valid CSS!