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

Element Constructions and Conversions

Local ring and field elements are implemented using a balanced mod representation. This allows negative elements to have infinite precision in an infinite precision ring and, if x is a small negative integer, allows it to be represented as x rather than p^m - - x where m is a (p-adic) precision.

Infinite precision elements are implemented using exact quotients. They are stored as numerator (may have valuation) and denominator (must have valuation zero). This means that two infinite precision elements can be divided and the result will still have infinite precision.

Subsections

Constructions

To simplify the creation of elements in a local ring, various coercions are provided. The most obvious is to regard the integer ring or rational field as embedded into the p-adic ring or field. But there is a range of coercions available, including that of elements from the residue class field.

To create an element of a local field not lying in the local ring, constructors are provided that create an element coercible into the ring and multiply this by the given power of the uniformizing element.

There are some constraints with regard to coercion. It is not possible to coerce between two infinite precision rings. It is also not possible to coerce between an infinite precision and a finite precision ring where the infinite precision ring has the larger ramification degree.

UniformizingElement(L) : RngLoc -> RngLocElt
L . 1 : RngLoc -> RngLocElt
UniformizingElement(L) : FldLoc -> FldLocElt
L . 1 : FldLoc -> FldLocElt
InertiaElement(L) : RngLoc -> RngLocElt
L . 2 : RngLoc -> RngLocElt
InertiaElement(L) : FldLoc -> FldLocElt
L . 2 : FldLoc -> FldLocElt
Zero(L) : RngLoc -> RngLocElt
Zero(L) : FldLoc -> FldLocElt
Create the additive identity of L. If L is a field then this will have infinite (absolute) precision always, else it will have the precision of the ring.
One(L) : RngLoc -> RngLocElt
One(L) : FldLoc -> FldLocElt
Create the multiplicative identity of L. This will always have the precision of the ring or field.
Random(L) : RngLoc -> RngLocElt
Return a random element of L. This is done by choosing e ⋅f random integers in the range [ - Floor((p^n - 1)/2) ... Ceiling((p^n - 1)/2) ] where n is the precision of the underlying p-adic ring, f the inertia degree and e the ramification degree of L.

If L is a local field or a floating ring this results in an error.

Representative(L) : RngLoc -> RngLocElt
Representative(L) : FldLoc -> FldLocElt
Returns an element of the local ring or field L.
elt<L | u> : RngLoc, RngElt -> RngLocElt
L ! u : RngLoc, RngElt -> RngLocElt
elt<L | u> : FldLoc, RngElt -> FldLocElt
L ! u : FldLoc, RngElt -> FldLocElt
Given an element u, coerce it into the local ring or field L. The resulting element will have as much precision as it can. The element u is allowed to be one of the following
elt<L | s> : RngLoc, [ RngElt ] -> RngLocElt
L ! s : RngLoc, [ RngElt ] -> RngLocElt
elt<L | s> : FldLoc, [ RngElt ] -> FldLocElt
L ! s : FldLoc, [ RngElt ] -> FldLocElt
Given a sequence s, construct an element of the ring or field L (with full precision) by the following rules. Let e be the ramification degree and f the inertia degree of L. For the first three cases let s be a sequence of elements in (or coercible into) the local ring. For the last case let s be a sequence of sequences of elements from (or coercible into) the local ring or field. If e = 1 s must have length one. The elt-constructor is the (left) inverse (for ring elements) to the sequence constructors Eltseq, LocseqInert, InertseqpAdic, Locseq described below.
elt<L | u, r> : RngLoc, RngElt, RngIntElt -> RngLocElt
elt<L | u, r> : RngLoc, [RngElt], RngIntElt -> RngLocElt
elt<L | u, r> : FldLoc, RngElt, RngIntElt -> FldLocElt
elt<L | u, r> : FldLoc, [RngElt], RngIntElt -> FldLocElt
Create an element of the local ring or field L by coercing u into L and returning with it precision r. The list of possibilities for u above apply here.
elt<L | v, u> : RngLoc, RngIntElt, RngElt -> RngLocElt
elt<L | v, u> : RngLoc, RngIntElt, [RngElt] -> RngLocElt
elt<L | v, u> : FldLoc, RngIntElt, RngElt -> FldLocElt
elt<L | v, u> : FldLoc, RngIntElt, [RngElt] -> FldLocElt
Create an element of the local ring or field L by coercing u into L and multiplying by the v-th power of the uniformizing element. This is equivalent to L.1^v * elt< L | u >. If u is an integer this will be taken to be the elt<L | u, r> constructor.
elt<L | v, u, r> : RngLoc, RngIntElt, RngElt, RngIntElt -> RngLocElt
elt<L | v, u, r> : RngLoc, RngIntElt, [RngElt], RngIntElt -> RngLocElt
elt<L | v, u, r> : FldLoc, RngIntElt, RngElt, RngIntElt -> FldLocElt
elt<L | v, u, r> : FldLoc, RngIntElt, [RngElt], RngIntElt -> FldLocElt
Create an element of the local ring or field L by coercing u into L, multiplying by the v-th power of the uniformizing element and returning it with precision r. This is equivalent to elt<L | elt<L | v, u>, r>.
BigO(x) : RngLocElt -> RngLocElt
O(x) : RngLocElt -> RngLocElt
For an element x of valuation v, create an element of valuation v and relative precision 0. For rings this is the zero element in the quotient L / (L.1^v).

Example RngLoc_eltcons (H59E6)

Here we illustrate the usage of element constructors for local fields and imprecise zeros.

> K<pi> := LocalField(InertiaField(FieldOfFractions(L)), x^2 + 5);
> K;
Local Field with Eisenstein polynomial x^2 + 5 over Inertia Field of degree 3 
over 5-adic Field mod 5^20
> elt<K | 64>;
64 + O(pi^40)
> P := PrimeField(K);
> P`SeriesPrinting := true;
> elt<K | -3, [64]>;
(-1 - 2*5 - 2*5^2 + 5^3)*pi^-3 + O(pi^37)
> elt<K | 2, 3/4, 6>;
(2 + 5 + 5^2)*pi^2 + O(pi^8)
> 4*$1;
3*pi^2 + O(pi^8)
> K!3/5;
(2 - 5)*pi^-2 + O(pi^36)
> O(K!40^200);
O(pi^400)
> Precision($1);
0
> O(K!0);
0
> O(K!1);
O(1)
> R<x> := PolynomialRing(Integers());
> K<pi> := LocalField(5, x^2 + 5);
> elt<K | 64>;
64
> Precision($1);
Infinity
> K!3/10;
-3*pi^-2/2

Sequence Conversions

Since local ring and field elements are represented internally either as integers or polynomials, the conversion of an element into a sequence by Eltseq depends on the invariants of the local ring or field. Magma therefore provides special additional sequence conversion functions, which return results of the same type regardless of the degrees of the parent of the input.

For an element of a local field, the valuation needs to be remembered to allow it to be reconstructed from the sequence with the elt-constructor described in the previous section. For all the sequence returning functions, except Coefficients, the denominator of the element needs to be remembered in order to reconstruct the element from the sequence. Coefficients is the only function to not discard the denominator.

LocseqInert(x) : RngLoc -> [ RngLocElt ]
LocseqInert(x) : FldLoc -> [ FldLocElt ]
For an element x in a local ring or field L with ramification degree e return a sequence s of length e with entries in the inertia ring or field of L which are the coefficients of the powers of the uniformizing element of L if it is different from the prime, i.e. x = sum_(i=1)^e s[i] * L.1^(i - 1 + v) where v is the valuation of a local field element or zero for a ring element.
InertseqpAdic(x) : RngLoc -> [ RngLocElt ]
InertseqpAdic(x) : FldLoc -> [ FldLocElt ]
For an element x in an unramified local ring or field L with inertia degree f return a sequence s of length f with entries in the p-adic ring or field underlying L which are the coefficients of the powers of the inertial element generating L, i.e. x = L.1^v * sum_(i=1)^f s[i] * L.2^(i - 1) where v is the valuation of a local field element and zero for a ring element.
Locseq(x) : RngLoc -> [ [ RngLocElt ] ]
Locseq(x) : FldLoc -> [ [ FldLocElt ] ]
For an element x in a local ring or field L with ramification degree e and inertia degree f return a sequence s of e sequences of length f with entries in the p-adic ring underlying L such that x = sum_(i=1)^e (sum_(j=1)^f s[i][j] * L.2^(j - 1)) * L.1^(i - 1 + v) where v is the valuation of a local field element and zero for a ring element.
ElementToSequence(x) : RngLocElt -> [ RngElt ]
ElementToSequence(x) : FldLocElt -> [ RngElt ]
Eltseq(x) : RngLocElt -> [ RngElt ]
Eltseq(x) : FldLocElt -> [ RngElt ]
The result of this function depends on the invariants of the local ring or field L which contains the element x. Let e be the ramification degree, f the inertia degree of L and v the valuation of a local field element or zero for a ring element. This is the (right) inverse (for ring elements) to the `!'-operator, i.e. L ! Eltseq(x) = x.
Coefficients(x) : RngLocElt -> [ RngLocElt ]
Coefficients(x) : FldLocElt -> [ FldLocElt ]
Returns a sequence of local elements x_i identical to their coercion into the residue class field such that x = sum_(i = 0) x_i * pi^(i - 1 + v) where v is the valuation of a local field element and zero for a ring element. These are the coefficients seen when SeriesPrinting is true for the parent of x. The sequence cannot be coerced back into p-adic or inertia structures. Trying to coerce it into a p-adic structure gives an error while coercing into a inertia structure will interpret the coefficients as being of the inertial element instead of the uniformizing element.
Coefficient(x, i) : RngLocElt, RngIntElt -> RngLocElt
Coefficient(x, i) : FldLocElt, RngIntElt -> FldLocElt
Returns the coefficient of the ith power of the uniformizing element. This coefficient will be the i + 1 - vth entry in the sequence returned by Coefficients where v is the valuation of the element.

Example RngLoc_gal-desc (H59E7)

We want to perform a Galois descent for a polynomial, i.e. we interpret the product of the Galois conjugates of a polynomial in a subring.

> p := 3;
> L<t,a> := LocalRing(p, 4);
> R<x> := PolynomialRing(L);
> g := x^2 + (a+a^-2)*x + (a^-1+a^3+1);
> g;
x^2 + (-151999392*a^3 - 428033534*a^2 + 1509587217*a - 64512399)*x + 2*a^3 + 
    307453058*a^2 - 1732356354*a - 151999391
> aa := a^(p^2);
> gg := R ! [ &+[InertseqpAdic(c)[i]*aa^(i-1) : i in [1..4]] : c in Eltseq(g) ];
Here InertseqpAdic is being used to replace occurrences of a in the element by aa.

> h := g * gg;
> h;
x^4 + (774759822*a^3 - 1559939781*a^2 + 644136111*a + 143311364)*x^3 + 
    (73899384*a^3 - 333497478*a^2 + 1655979363*a + 158024680)*x^2 + 
    (989668189*a^3 - 661853000*a^2 - 1685887308*a + 122035547)*x - 
    1630826887*a^3 - 328410694*a^2 - 175290219*a + 1601599448
The polynomial gg is the image of g under the automorphism induced by the square of the Frobenius automorphism. The product h = g * gg has coefficients in the unramified extension of degree 2, which is the fixed field under the square of the Frobenius and is generated by a^(10).

> K<t,b> := LocalRing(p, 2);
> b eq a^10;
true
> S<y> := PolynomialRing(K);
> M := RMatrixSpace(PrimeRing(L), 2, 4) ! 0;
> V := RSpace(PrimeRing(L), 4);
> M[1] := V ! InertseqpAdic(a^0);
> M[2] := V ! InertseqpAdic(a^10);
> sol := [ Solution(M, V ! InertseqpAdic(c)) : c in Eltseq(h) ];
> hh := S ! [ K ! Eltseq(s) : s in sol ];
> hh;
y^4 + (-963948741*b + 1725089549)*y^3 + (270660711*b + 1139786455)*y^2 + 
    (-280210015*b - 1205051127)*y + 1213139407*b + 1602993886
The other sequence conversions are shown below.

> K<pi, a> := TotallyRamifiedExtension(L, x^4 + L.1);
> K;
Local Ring with Eisenstein polynomial x^4 + 3 over L
> Random(K) + O(pi^20);
112*a^3 + 47*a^2 - 79*a + 66 + (-71*a^3 + 116*a^2 - 71*a - 40)*pi + (-47*a^3 - 
    54*a^2 - 88*a + 87)*pi^2 + (-43*a^3 - 42*a^2 - 18*a + 9)*pi^3 + O(pi^20)
> Locseq($1);
[
    [ 66 + O(3^5), -79 + O(3^5), 47 + O(3^5), 112 + O(3^5) ],
    [ -40 + O(3^5), -71 + O(3^5), 116 + O(3^5), -71 + O(3^5) ],
    [ 87 + O(3^5), -88 + O(3^5), -54 + O(3^5), -47 + O(3^5) ],
    [ 9 + O(3^5), -18 + O(3^5), -42 + O(3^5), -43 + O(3^5) ]
]
> LocseqInert($2);
[
    112*a^3 + 47*a^2 - 79*a + 66 + O(t^5),
    -71*a^3 + 116*a^2 - 71*a - 40 + O(t^5),
    -47*a^3 - 54*a^2 - 88*a + 87 + O(t^5),
    -43*a^3 - 42*a^2 - 18*a + 9 + O(t^5)
]
> r := $3;        
> Coefficients(r);
[
    a^3 - a^2 - a,
    a^3 - a^2 + a - 1,
    a^3 - a,
    -a^3,
    -a^3 - a^2 - a - 1,
    1,
    a^3 - a + 1,
    -a^3 - a^2,
    -a^2 + 1,
    a^3 + a^2 + a - 1,
    a^3 - a + 1,
    a^3 + a^2 + a + 1,
    -a^3 + a^2 + 1,
    -a^2 + 1,
    -a^3 - a^2,
    -a^3 - a^2 + a,
    a^3 + a^2 - a + 1,
    -a^3 + a^2 - a,
    -a^3 - a^2 - a + 1,
    -a^3 - a^2
]
> Coefficient(r, Valuation(r) + 5);
1

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