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

Operations on Elements

Subsections

Arithmetic

For local ring elements the usual operations for ring elements are available. The quotient of two elements can be computed when the result lies in the ring (i.e. the valuation of the dividend is not smaller than that of the divisor). The precision of the result is reduced by the valuation of the divisor. The result of an operation with elements of reduced precision will have as much precision as possible. For addition and subtraction this is the minimum of the precisions of the two elements, for multiplication it is the minimum of v_1 + pr_2 and v_2 + pr_1, where v_i and pr_i are the valuations and precisions of the two elements, respectively.

For local field elements the operations are performed with the maximum precision possible. For multiplication and division this is the minimum of the (relative) precisions of the two elements. For addition and subtraction of elements x and y with valuations v_x and v_y and precisions pr_x and pr_y the precision of x +- y is min(v_x + pr_x, v_y + pr_y) - val(x +- y), which may even be 0.

The result of these operations on two infinite precision elements will be an element with infinite precision.

- x : RngLocElt -> RngLocElt
- x : FldLocElt -> FldLocElt
The negative of the element x.
x + y : RngLocElt, RngLocElt -> RngLocElt
x + y : FldLocElt, FldLocElt -> FldLocElt
The sum of the elements x and y.
x - y : RngLocElt, RngLocElt -> RngLocElt
x - y : FldLocElt, FldLocElt -> FldLocElt
The difference of the elements x and y.
x * y : RngLocElt, RngLocElt -> RngLocElt
x * y : FldLocElt, FldLocElt -> FldLocElt
The product of the elements x and y.
x ^ k : RngLocElt, RngIntElt -> RngLocElt
x ^ k : FldLocElt, RngIntElt -> FldLocElt
The k-th power of the element x. If k has valuation (when coerced) and x has precision less than that of its parent ring, the power x^k will have more precision than x.
x div y : RngLocElt, RngLocElt -> RngLocElt
x / y : RngLocElt, RngLocElt -> RngLocElt
x / y : FldLocElt, FldLocElt -> FldLocElt
The quotient of the elements x and y. For elements of a local ring, this results in an error if the valuation of x is smaller than that of y.

Example RngLoc_Division (H59E8)

Division of non-units is possible in the ring if the result lies in the ring. In that case the result has reduced precision.

> L<b, a> := LocalRing(2, 2, x^2 + 2*x + 2, 20);
> c := (a+b)^42;
> 1 / c;
-290*a - 379 + (-156*a - 38)*b

> 1 / (b*c); >> 1 / (b*c); ^ Runtime error in '/': Division is not exact > b / (b*c); -290*a - 379 + (-156*a - 38)*b + O(b^19)
In an infinite precision ring quotients appear a little differently.

> L<b, a> := LocalRing(3, x^3 + x^2 + x + 2, x^2 + 3);
> c := (a + b)^42;
> c;
-491263952755773394*a^2 + 11472289196033624282*a + 16424219141213946901 + 
    (-5784168275958280782*a^2 - 7146855759729814038*a + 920586219233256120)*b
> 1/c;
(573520839694079945824420499345018895617375003103995712362*a^2 + 
    713882916158032925641219314534011809216464946229288845134*a -
    84184814090064547226689542673857373585366572284393005355 + 
    (18756089659361818421750628686181138385386018029692040406*a^2 - 
    376212421365291561317445419060255136809952153270701661666*a - 
    543440121127646692506176016428577112699243722246585366600)*b)/
    61040881526285814362156628321386486455989674569


Equality and Membership

It is possible to test whether two local ring or field elements are equal and whether any element is in a local ring or field. The existence of elements with reduced precision may cause results which are not completely intuitive at first sight.

Two elements of a local ring or field are only regarded as equal, if their valuations, precisions and digits are identical. Thus, elements of reduced precision which coincide in all known digits can still be regarded as the same, even though the missing digits are unknown rather than 0.

x eq y : RngLocElt, RngLocElt -> BoolElt
x eq y : FldLocElt, FldLocElt -> BoolElt
True if and only if x and y are identical in digits, valuation and precision.
x ne y : RngLocElt, RngLocElt -> BoolElt
x ne y : FldLocElt, FldLocElt -> BoolElt
True if and only if x and y are different in digits, valuation or precision.
x in L : ., RngLoc -> BoolElt
x in L : ., FldLoc -> BoolElt
True if and only if x lies in the local ring or field L.
x notin L : ., RngLoc -> BoolElt
x notin L : ., FldLoc -> BoolElt
True if and only if x does not lie in the local ring or field L.

Example RngLoc_unram-ext (H59E9)

We demonstrate how an unramified extension is constructed from a degree given. The idea is to interpret the minimal polynomial of a primitive element in the residue class field as a polynomial over Z_p. The quotient of Z_p[x] by the ideal generated by this polynomial is isomorphic to the unramified extension and a := /line(x) is a first approximation for the (p^f - 1)st root of unity. This is improved by iterating a |-> a^(p^f) until this remains fixed.

> p := 2;
> f := 5;
> Zp := pAdicRing(p, 25);
> R<x> := PolynomialRing(Zp);
> g := R ! MinimalPolynomial( GF(p,f).1 );
> Q<r> := quo< R | g >;
> a := [ r, r^(p^f) ];
> while a[#a] ne a[#a-1] do
>     print a[#a];
>     Append( a, a[#a]^(p^f));
> end while;
34*r^4 - 44*r^3 + 58*r^2 - 23*r + 36
12522914*r^4 + 12522004*r^3 - 12174790*r^2 - 8200343*r - 10407260
8242594*r^4 + 12409364*r^3 + 5143098*r^2 + 15781737*r - 3636572
5490082*r^4 + 8804884*r^3 - 11109830*r^2 + 11456361*r + 11698852
-15481438*r^4 - 5875180*r^3 + 5667386*r^2 + 7262057*r - 884060
> [ Minimum([ Valuation(c) : c in Eltseq(a[i] - a[i-1]) ]) : i in [2..#a-1] ];
[ 1, 6, 11, 16, 21 ]
The last command demonstrates the convergence of the process. The polynomial defining the unramified extension could now easily be obtained as the minimal polynomial of the fixed element.

Properties

Local ring and field elements can be tested for certain properties. There is only one zero, one and minus one in each ring or field.

IsZero(x) : RngLocElt -> BoolElt
IsZero(x) : FldLocElt -> BoolElt
True if and only if x is the zero element of its parent ring or field.
IsOne(x) : RngLocElt -> BoolElt
IsOne(x) : FldLocElt -> BoolElt
True if and only if x - 1 is the zero element of its parent ring or field. If x is a field element then it must have the precision of the field so that x - 1 is zero to the precision of the field (an imprecise zero) and not the zero.
IsMinusOne(x) : RngLocElt -> BoolElt
IsMinusOne(x) : FldLocElt -> BoolElt
True if and only if x + 1 is the zero element of its parent ring or field. If x is a field element then it must have the precision of the field so that x - 1 is zero to the precision of the field (an imprecise zero) and not the zero.
IsUnit(x) : RngLocElt -> BoolElt
IsUnit(x) : FldLocElt -> BoolElt
For an element of a local ring true if and only if its valuation is 0. For an element of a local field true if and only if it is not a zero element. (Imprecise zeros, elements which are zero to their precision, are not units).
IsIntegral(x) : RngLocElt -> BoolElt
IsIntegral(x) : FldLocElt -> BoolElt
True if the valuation of x is non-negative.

Precision and Valuation

The parent of a local element can be retrieved, its precision accessed and changed, its valuation computed and its denominator returned.

Parent(x) : RngLocElt -> RngLoc
Parent(x) : FldLocElt -> FldLoc
Return the local ring or field x is contained in.
Precision(x) : RngLocElt -> RngIntElt
Precision(x) : FldLocElt -> RngIntElt
Return the precision to which the local element x is known, that is, the number of terms or digits of x which are known, starting from the term of valuation zero for ring elements and from the term of lowest valuation for field elements.
AbsolutePrecision(x) : RngLocElt -> RngIntElt
AbsolutePrecision(x) : FldLocElt -> RngIntElt
Returns the highest power of the uniformizing element to which the pi-adic expansion of the local element x is known.
RelativePrecision(x) : RngLocElt -> RngIntElt
RelativePrecision(x) : FldLocElt -> RngIntElt
Returns the difference between the absolute precision and the valuation of the local element x. This is a measure of how many terms of x are known in the local expansion which starts at the term whose valuation is that of x itself.
ChangePrecision(x, m) : RngLocElt, RngIntElt -> RngLocElt
ChangePrecision(~x, m) : RngLocElt, RngIntElt -> RngLocElt
ChangePrecision(x, m) : FldLocElt, RngIntElt -> FldLocElt
ChangePrecision(~x, m) : FldLocElt, RngIntElt -> FldLocElt
If m is smaller than the precision of x, disregard the digits of x after the m-th, otherwise append zeros. This will return an element of precision m. The p-adic coefficients will be reduced (if necessary) by the appropriate p-power. Note that the precision of an element cannot be changed to be greater than its parent. Any attempt to do so will result in the element gaining the precision of its parent.
Expand(x) : RngLocElt -> RngLocElt
Expand(x) : FldLocElt -> FldLocElt
Regard x as an element of full precision by replacing unknown digits with zeros in the pi-adic expansion of its coefficients.
Valuation(x) : RngLocElt -> RngIntElt
Valuation(x) : FldLocElt -> RngIntElt
Return the valuation of x. This is always bounded by the absolute precision of the element.
Denominator(x) : RngLocElt -> RngIntElt
Denominator(x) : FldLocElt -> RngIntElt
The denominator of x. This will be non-trivial only when x has infinite precision and will never have valuation when coerced.

Example RngLoc_ofe (H59E10)

The uses and properties of Relative and Absolute Precision for field elements are illustrated here as well as the results of Expand.

> R<x> := PolynomialRing(Integers());
> K<d> := LocalField(5, 2, x^2 + 5);
> x := d + d^7;
> x;
-124*d + O(d^41)
> AbsolutePrecision(x);
41
> RelativePrecision(x);
40
> RelativePrecision(x + O(d^10));
9
> AbsolutePrecision(x + O(d^10));
10
> RelativePrecision(ChangePrecision(x, 19));
19
> RelativePrecision(ChangePrecision(x, 10));
10
> AbsolutePrecision(ChangePrecision(x, 10));
11
> Expand(ChangePrecision(x, 10));
-124*d + O(d^41)
> Valuation(x);
1
> ChangePrecision(x, 20) eq (x + O(d^21)); 
true
The last two lines show that changing the precision of an element is equivalent to adding imprecision to the element effectively cancelling off all terms beyond that of (relative) valuation 20.

Logarithms and Exponentials

Logarithms and exponentials can also be calculated for certain elements.

Log(x) : RngLocElt -> RngLocElt
Log(x) : FldLocElt -> FldLocElt
The logarithm of the element x. Note that the power series of the logarithm function only converges if the valuation of x - 1 is positive. For ring elements x, the answer lies in the ring (and not its field of fractions) only if the valuation of x - 1 is greater than or equal to the ramification degree of the ring divided by the prime.

The rate of convergence of Log is dependent on the valuation of x - 1. The greater the valuation the faster the convergence, as is illustrated in the example below.

The result is returned to the precision of x and if this is infinite to the default precision of the parent ring or field.

Exp(x) : RngLocElt -> RngLocElt
Exp(x) : FldLocElt -> FldLocElt
The exponential of the local element x. Note that the power series of the exponential function only converges if the valuation of x is strictly larger than e/(p - 1), where e is the ramification degree of the parent ring of x.

The result is returned to the precision of x and if this is infinite to the default precision of the parent ring or field.


Example RngLoc_log (H59E11)

This example illustrates the relative timings of the Log function and the Exp function for rings and fields and for various valuations of x - 1 or x as appropriate.

> K<d> := LocalField(3, x^3 + x^2 + x + 2, x^3 + 3*x^2 + 3*x + 3);
> L<b> := IntegerRing(K);
> x := 1 + b;
> time Log(x); 
332 + O(b^20)
Time: 1.780
> x := 1 + b^5;
> time Log(x); 
144 + 45*b + 231*b^2 + O(b^20)
Time: 0.320
> x := 1 + d;
> time Log(x); 
332 + O(d^20)
Time: 1.189
> x := 1 + d^5;
> time Log(x); 
-152*d^5 + 115*3^2*d^6 + 83*3*d^7 + O(d^25)
Time: 0.200
> x := b^2;
> time Exp(x);
394 + 924*b + 154*b^2 + O(b^20)
Time: 0.569
> x := b^6;
> time Exp(x);
-287 - 792*b - 297*b^2 + O(b^20)
Time: 0.049
> x := d^2;
> time Exp(x);
394 + 308*3*d + 154*d^2 + O(d^20)
Time: 0.570
> x := d^6;
> time Exp(x);
-287 - 88*3^2*d - 11*3^3*d^2 + O(d^20)
Time: 0.060

Norm and Trace Functions

The norm, trace and minimal polynomial, (over the p-adic ring or field), of an element can be calculated. A function returning the image of an element under a power of the Frobenius automorphism has also been provided.

Norm(x) : RngLocElt -> RngLocElt
Norm(x) : FldLocElt -> FldLocElt
Return the norm of x over the p-adic subring of its parent.
Trace(x) : RngLocElt -> RngLocElt
Trace(x) : FldLocElt -> FldLocElt
Return the trace of x over the p-adic subring of its parent.
MinimalPolynomial(x) : RngLocElt -> RngUPolElt
MinimalPolynomial(x) : FldLocElt -> RngUPolElt
Return the minimal polynomial of x over the p-adic ring or field. This is not defined if x is an element of a p-adic ring or field.

GaloisImage(x, i) : RngLocElt, RngIntElt -> RngLocElt
GaloisImage(x, i) : FldLocElt, RngIntElt -> FldLocElt
The image of x under the Frobenius automorphism composed with itself i times, that is, a |-> a^((p^i)) where a is a p^f - 1st root of unity of the parent of x.

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