# Places of function fields#

The places of a function field correspond, one-to-one, to valuation rings of the function field, each of which defines a discrete valuation for the elements of the function field. “Finite” places are in one-to-one correspondence with the prime ideals of the finite maximal order while places “at infinity” are in one-to-one correspondence with the prime ideals of the infinite maximal order.

EXAMPLES:

All rational places of a function field can be computed:

```sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x + x^3*Y)                                          # needs sage.rings.function_field
sage: L.places()                                                                    # needs sage.rings.function_field
[Place (1/x, 1/x^3*y^2 + 1/x),
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1),
Place (x, y)]
```
```>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x + x**Integer(3)*Y, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.places()                                                                    # needs sage.rings.function_field
[Place (1/x, 1/x^3*y^2 + 1/x),
Place (1/x, 1/x^3*y^2 + 1/x^2*y + 1),
Place (x, y)]
```

The residue field associated with a place is given as an extension of the constant field:

```sage: F.<x> = FunctionField(GF(2))
sage: O = F.maximal_order()
sage: p = O.ideal(x^2 + x + 1).place()                                              # needs sage.libs.pari
sage: k, fr_k, to_k = p.residue_field()                                             # needs sage.libs.pari sage.rings.function_field
sage: k                                                                             # needs sage.libs.pari sage.rings.function_field
Finite Field in z2 of size 2^2
```
```>>> from sage.all import *
>>> F = FunctionField(GF(Integer(2)), names=('x',)); (x,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> p = O.ideal(x**Integer(2) + x + Integer(1)).place()                                              # needs sage.libs.pari
>>> k, fr_k, to_k = p.residue_field()                                             # needs sage.libs.pari sage.rings.function_field
>>> k                                                                             # needs sage.libs.pari sage.rings.function_field
Finite Field in z2 of size 2^2
```

The homomorphisms are between the valuation ring and the residue field:

```sage: fr_k                                                                          # needs sage.libs.pari sage.rings.function_field
Ring morphism:
From: Finite Field in z2 of size 2^2
To:   Valuation ring at Place (x^2 + x + 1)
sage: to_k                                                                          # needs sage.libs.pari sage.rings.function_field
Ring morphism:
From: Valuation ring at Place (x^2 + x + 1)
To:   Finite Field in z2 of size 2^2
```
```>>> from sage.all import *
>>> fr_k                                                                          # needs sage.libs.pari sage.rings.function_field
Ring morphism:
From: Finite Field in z2 of size 2^2
To:   Valuation ring at Place (x^2 + x + 1)
>>> to_k                                                                          # needs sage.libs.pari sage.rings.function_field
Ring morphism:
From: Valuation ring at Place (x^2 + x + 1)
To:   Finite Field in z2 of size 2^2
```

AUTHORS:

• Kwankyu Lee (2017-04-30): initial version

• Brent Baccala (2019-12-20): function fields of characteristic zero

class sage.rings.function_field.place.FunctionFieldPlace(parent, prime)[source]#

Bases: `Element`

Places of function fields.

INPUT:

• `parent` – place set of a function field

• `prime` – prime ideal associated with the place

EXAMPLES:

```sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x + x^3*Y)                                      # needs sage.rings.function_field
sage: L.places_finite()[0]                                                      # needs sage.rings.function_field
Place (x, y)
```
```>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x + x**Integer(3)*Y, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.places_finite()[Integer(0)]                                                      # needs sage.rings.function_field
Place (x, y)
```
divisor(multiplicity=1)[source]#

Return the prime divisor corresponding to the place.

EXAMPLES:

```sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(5)); R.<Y> = PolynomialRing(K)
sage: F.<y> = K.extension(Y^2 - x^3 - 1)
sage: O = F.maximal_order()
sage: I = O.ideal(x + 1, y)
sage: P = I.place()
sage: P.divisor()
Place (x + 1, y)
```
```>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(5)), names=('x',)); (x,) = K._first_ngens(1); R = PolynomialRing(K, names=('Y',)); (Y,) = R._first_ngens(1)
>>> F = K.extension(Y**Integer(2) - x**Integer(3) - Integer(1), names=('y',)); (y,) = F._first_ngens(1)
>>> O = F.maximal_order()
>>> I = O.ideal(x + Integer(1), y)
>>> P = I.place()
>>> P.divisor()
Place (x + 1, y)
```
function_field()[source]#

Return the function field to which the place belongs.

EXAMPLES:

```sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)                                  # needs sage.rings.function_field
sage: p = L.places()[0]                                                     # needs sage.rings.function_field
sage: p.function_field() == L                                               # needs sage.rings.function_field
True
```
```>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> p = L.places()[Integer(0)]                                                     # needs sage.rings.function_field
>>> p.function_field() == L                                               # needs sage.rings.function_field
True
```
prime_ideal()[source]#

Return the prime ideal associated with the place.

EXAMPLES:

```sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)                                  # needs sage.rings.function_field
sage: p = L.places()[0]                                                     # needs sage.rings.function_field
sage: p.prime_ideal()                                                       # needs sage.rings.function_field
Ideal (1/x^3*y^2 + 1/x) of Maximal infinite order of Function field
in y defined by y^3 + x^3*y + x
```
```>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> p = L.places()[Integer(0)]                                                     # needs sage.rings.function_field
>>> p.prime_ideal()                                                       # needs sage.rings.function_field
Ideal (1/x^3*y^2 + 1/x) of Maximal infinite order of Function field
in y defined by y^3 + x^3*y + x
```
class sage.rings.function_field.place.PlaceSet(field)[source]#

Sets of Places of function fields.

INPUT:

• `field` – function field

EXAMPLES:

```sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)                                      # needs sage.rings.function_field
sage: L.place_set()                                                             # needs sage.rings.function_field
Set of places of Function field in y defined by y^3 + x^3*y + x
```
```>>> from sage.all import *
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)# needs sage.rings.function_field
>>> L.place_set()                                                             # needs sage.rings.function_field
Set of places of Function field in y defined by y^3 + x^3*y + x
```
Element[source]#

alias of `FunctionFieldPlace`

function_field()[source]#

Return the function field to which this place set belongs.

EXAMPLES:

```sage: # needs sage.rings.function_field
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
sage: L.<y> = K.extension(Y^3 + x^3*Y + x)
sage: PS = L.place_set()
sage: PS.function_field() == L
True
```
```>>> from sage.all import *
>>> # needs sage.rings.function_field
>>> K = FunctionField(GF(Integer(2)), names=('x',)); (x,) = K._first_ngens(1); _ = K['Y']; (Y,) = _._first_ngens(1)
>>> L = K.extension(Y**Integer(3) + x**Integer(3)*Y + x, names=('y',)); (y,) = L._first_ngens(1)
>>> PS = L.place_set()
>>> PS.function_field() == L
True
```