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

Element Operations

Subsections

Parent and Category

Parent(a) : FldQuadElt -> FldQuad
Parent(a) : FldQuadElt -> FldQuad
Category(a) : RngQuadElt -> Cat
Category(a) : RngQuadElt -> Cat

Arithmetic

In the list below, a and b are quadratic field elements; however, automatic coercion will ensure that +, *, -, /, eq, ne and in will also work if a or b is an integer or rational number.

+ a : FldQuadElt -> FldQuadElt
- a : FldQuadElt -> FldQuadElt
+ a : RngQuadElt -> RngQuadElt
- a : RngQuadElt -> RngQuadElt
a + b : FldQuadElt, FldQuadElt -> FldQuadElt
a - b : FldQuadElt, FldQuadElt -> FldQuadElt
a * b : FldQuadElt, FldQuadElt -> FldQuadElt
a / b : FldQuadElt, FldQuadElt -> FldQuadElt
a ^ k : FldQuadElt, RngIntElt -> FldQuadElt
a + b : RngQuadElt, RngQuadElt -> RngQuadElt
a - b : RngQuadElt, RngQuadElt -> RngQuadElt
a * b : RngQuadElt, RngQuadElt -> RngQuadElt
a / b : RngQuadElt, RngQuadElt -> RngQuadElt
a ^ k : RngQuadElt, RngIntElt -> RngQuadElt

Equality and Membership

a eq b : FldQuadElt, FldQuadElt -> BoolElt
a ne b : FldQuadElt, FldQuadElt -> BoolElt
a in K : FldQuadElt, FldQuad -> BoolElt
a notin K : FldQuadElt, FldQuad -> BoolElt
a eq b : RngQuadElt, RngQuadElt -> BoolElt
a ne b : RngQuadElt, RngQuadElt -> BoolElt
a in K : RngQuadElt, RngQuad -> BoolElt
a notin K : RngQuadElt, RngQuad -> BoolElt

Predicates on Elements

IsZero(a) : FldQuadElt -> BoolElt
IsOne(a) : FldQuadElt -> BoolElt
IsMinusOne(a) : FldQuadElt -> BoolElt
IsZero(a) : RngQuadElt -> BoolElt
IsOne(a) : RngQuadElt -> BoolElt
IsMinusOne(a) : RngQuadElt -> BoolElt
IsNilpotent(a) : FldQuadElt -> BoolElt
IsIdempotent(a) : FldQuadElt -> BoolElt
IsNilpotent(a) : RngQuadElt -> BoolElt
IsIdempotent(a) : RngQuadElt -> BoolElt
IsUnit(a) : FldQuadElt -> BoolElt
IsZeroDivisor(a) : FldQuadElt -> BoolElt
IsRegular(a) : FldQuadElt -> BoolElt
IsUnit(a) : RngQuadElt -> BoolElt
IsZeroDivisor(a) : RngQuadElt -> BoolElt
IsRegular(a) : RngQuadElt -> BoolElt
IsIrreducible(a) : FldQuadElt -> BoolElt
IsPrime(a) : FldQuadElt -> BoolElt
IsIrreducible(a) : RngQuadElt -> BoolElt
IsPrime(a) : RngQuadElt -> BoolElt

Conjugates, Minimal Polynomial

ComplexConjugate(a) : FldQuadElt -> FldQuadElt
ComplexConjugate(a) : RngQuadElt -> RngQuadElt
The complex conjugate of quadratic field element a; returns a in a real quadratic field and bar a=x - y sqrt(d) if a=x + y sqrt(d) in an imaginary quadratic field Q(sqrt(d)).
Conjugate(a) : FldQuadElt -> FldQuadElt
Conjugate(a) : RngQuadElt -> RngQuadElt
The conjugate x - y sqrt(d) of a=x + y sqrt(d) in the quadratic field Q(sqrt(d)).
MinimalPolynomial(a) : FldQuadElt -> AlgPolElt
MinimalPolynomial(a) : RngQuadElt -> AlgPolElt
The minimal polynomial of the quadratic field element a. The resulting (monic) polynomial will have coefficients in Q (which may all be integers).
Norm(a) : FldQuadElt -> FldRatElt
Norm(a) : RngQuadElt -> RngRatElt
The norm a bar a of a quadratic field element a (as an element of the rational field), where bar a is the conjugate of a.
Trace(a) : FldQuadElt -> FldRatElt
Trace(a) : RngQuadElt -> RngRatElt
The trace a + bar a of a quadratic field element a (as an element of the rational field), where bar a is the conjugate of a.

Norm Equations

For imaginary quadratic fields, (that is, for quadratic fields Q(sqrt m) with m < 0), the function NormEquation is provided to find integral elements of a given norm.

NormEquation(F, m) : FldQuad, RngIntElt -> BoolElt, FldQuadElt
NormEquation(F, m: parameters) : FldQuad, RngIntElt -> BoolElt, FldQuadElt
NormEquation(O, m) : RngQuad, RngIntElt -> BoolElt, RngQuadElt
NormEquation(O, m: parameters) : RngQuad, RngIntElt -> BoolElt, RngQuadElt
    Factorization: [RngIntElt]          Default: [ ]
Given a imaginary quadratic field F and a non-negative integer m, return true if there exists an element alpha in the ring of integers O_F of F with norm m, and false otherwise. Instead of searching the maximal order O_F it is possible to search any suborder O of O_F for such element alpha by supplying O as a first argument.

The method used is constructive (it uses Cornacchia's algorithm, see [H. Cohen, A course in computational algebraic number theory, Graduate Texts in Mathematics 138, Berlin: Springer 1993, 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 x^2 + y^2d=4m (and the solution alpha=(x + y sqrt(d)/2) is returned), whereas for d = 2, 3bmod4 a solution alpha=x + y sqrt(d) with x^2 + y^2d=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 f^2d. Note that a version of NormEquation with integer arguments d and m also exists.

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 the example below).


Example FldQuad_norm-equation (H34E3)

> SetVerbose("NormEquation", true);
> d := 302401481761723680;
> m := 76814814791186002463716;
> Q<z> := QuadraticField(-d);
> O<w> := sub< MaximalOrder(Q) | 6 >;
> f, s := NormEquation(O, m);
NormEquation(75600370440430920, 76814814791186002463716)
(d, m) = 28
Solution: x = 406, y = 1008
> s, Norm(s);
406 + 1008*w 76814814791186002463716

Other Element Functions

For the ring of integers of Q(i) the biquadratic residue symbol (generalizing the Legendre symbol) is available.

BiquadraticResidueSymbol(a, b) : FldQuadElt, FldQuadElt -> FldQuadElt
Given a Gaussian integer a and a primary, non-unit Gaussian integer b, where a and b are coprime, return the value of the biquadratic character ( (a/b))_4. The value of this character is equal to i^k, for some k in {0, 1, 2, 3}. If a and b have a factor in common, the function returns 0, if b is not primary or b is a unit then an error results.
Primary(a) : FldQuadElt -> FldQuadElt
Return the unique associate bar a of the Gaussian integer a that satisfies bar a = 1 mod (1 + i)^3, or 0 in case a is divisible by 1 + i.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]