# FiniteDivisorCategory(F, UP, UPUP, R)¶

- F: Field
- UP: UnivariatePolynomialCategory F
- UPUP: UnivariatePolynomialCategory Fraction UP
- R: FunctionFieldCategory(F, UP, UPUP)

This category describes finite rational divisors on a curve, that is finite formal sums SUM(`n`

* `P`

) where the `n`

`'s`

are integers and the `P`

`'s`

are finite rational points on the curve.

- 0: %
- from AbelianMonoid
- *: (Integer, %) -> %
- from AbelianGroup
- *: (NonNegativeInteger, %) -> %
- from AbelianMonoid
- *: (PositiveInteger, %) -> %
- from AbelianSemiGroup
- +: (%, %) -> %
- from AbelianSemiGroup
- -: % -> %
- from AbelianGroup
- -: (%, %) -> %
- from AbelianGroup
- =: (%, %) -> Boolean
- from BasicType
- ~=: (%, %) -> Boolean
- from BasicType
- coerce: % -> OutputForm
- from CoercibleTo OutputForm

- decompose: % -> Record(id: FractionalIdeal(UP, Fraction UP, UPUP, R), principalPart: R)
`decompose(d)`

returns`[id, f]`

where`d = (id) + div(f)`

.

- divisor: (F, F) -> %
`divisor(a, b)`

makes the divisor`P:`

`(x = a, y = b)`

. Error: if`P`

is singular.

- divisor: (F, F, Integer) -> %
`divisor(a, b, n)`

makes the divisor`nP`

where`P:`

`(x = a, y = b)`

.`P`

is allowed to be singular if`n`

is a multiple of the rank.

- divisor: (R, UP, UP, UP, F) -> %
`divisor(h, d, d', g, r)`

returns the sum of all the finite points where`h/d`

has residue`r`

.`h`

must be integral.`d`

must be squarefree.`d'`

is some derivative of`d`

(not necessarily dd/dx).`g = gcd(d, discriminant)`

contains the ramified zeros of`d`

- divisor: FractionalIdeal(UP, Fraction UP, UPUP, R) -> %
`divisor(I)`

makes a divisor`D`

from an ideal`I`

.

- divisor: R -> %
`divisor(g)`

returns the divisor of the function`g`

.

- generator: % -> Union(R, failed)
`generator(d)`

returns`f`

if`(f) = d`

, “failed” if`d`

is not principal.- hash: % -> SingleInteger
- from SetCategory
- hashUpdate!: (HashState, %) -> HashState
- from SetCategory

- ideal: % -> FractionalIdeal(UP, Fraction UP, UPUP, R)
`ideal(D)`

returns the ideal corresponding to a divisor`D`

.- latex: % -> String
- from SetCategory
- opposite?: (%, %) -> Boolean
- from AbelianMonoid

- principal?: % -> Boolean
`principal?(D)`

tests if the argument is the divisor of a function.

- reduce: % -> %
`reduce(D)`

converts`D`

to some reduced form (the reduced forms can be differents in different implementations).- sample: %
- from AbelianMonoid
- subtractIfCan: (%, %) -> Union(%, failed)
- from CancellationAbelianMonoid
- zero?: % -> Boolean
- from AbelianMonoid