redlib: Reduction types of curves in Magma, Python and JavaScript

by Tim Dokchitser

redlib, redlib.py, redlib.js/.ts are Magma, Python and JavaScript packages (current version 3.1, 2024) with a collection of routines for working with

and computing reduction types for

The Magma package works with plane or hyperelliptic curves, occassionally converting between the two types, and is based on

Tim Dokchitser, Models of curves over DVRs (Δ-regular models)
Simone Muselli, Regular models of hyperelliptic curves (Muselli-Maclane clusters)
Tim Dokchitser, Classification of reduction types of curves, in preparation (Reduction types).

The Python and JavaScript libraries only implements the combinatorial aspects of reduction types, based on the third paper.

→  Download redlib as a zip archive  ←

Included files:

manual.pdf-Package documentation
redlib.spec-Magma library specification, loaded with AttachSpec("redlib.spec");
redtype.py-Python library
redtype.js-JavaScript library for web browsers
redtype.ts-Same JavaScript library with TypeScript exports for standalone use
ex-redlib.m-Magma example of using the library
ex-redlib.py-Python example of using the library
ex-redlib.js-JavaScript example of using the library
*.m-all other .m files are individual packages for the Magma library
redlib.sty-LaTeX style file for auto-typesetting of reduction types
ex-redlib.tex-example file showing a reduction type (uses pbox, tikz and redlib.sty)
ex-redlib.pdf-compiled to pdf
data/*.txt-data files for shapes of reduction types in small genus

Classification of reduction types

As an example, here are all possible reduction types in genus 1,2 and 3.

Genus 1

For elliptic curves, there are 10 possible (families of) reduction types, and they are referred to by their standard Kodaira type names. Two of them (In and In*) are infinite families, with n>0 arbitrary.

1g1
I1
I0
I1
IV
IV
III
III
II
II
Genus:    Label:    Tamagawa number:

General genus 1 curves (possibly without no rational point to make them into an elliptic curve) have reduction types [d]K where K is one of the Kodaira types above, and d = 1 any multiple. For example, [3]I2*, [5]g1, [7]II etc.

Genus 2

Reduction types of genus 2 curves come in 104 families, and they have been classified by Namikawa and Ueno. Here is how to construct all 104=55+10+8+6+16+9 types by labels:

1. K1-K2 (55 types)

There are 55 types of the form K1-K2 where K1, K2 are any of the 10 Kodaira types. These are degenerations of two elliptic curves meeting at a point. For example,

1g1 31g1
IV–IV
III–II
1g1–1g1
1g1–I1
1g1–I0
1g1–I1
1g1–IV
1g1–IV
1g1–III
1g1–III
1g1–II
1g1–II
I1–I1
I1–I0
I1–I1
I1–IV
I1–IV
I1–III
I1–III
I1–II
I1–II
I0–I0
I0–I1
I0–IV
I0–IV
I0–III
I0–III
I0–II
I0–II
I1–I1
I1–IV
I1–IV
I1–III
I1–III
I1–II
I1–II
IV–IV
IV–IV
IV–III
IV–III
IV–II
IV–II
IV–IV
IV–III
IV–III
IV–II
IV–II
III–III
III–III
III–II
III–II
III–III
III–II
III–II
II–II
II–II
II–II
Genus:    Label:    Tamagawa number:

2. [2]KD (10 types)

There are 10 types of the form [2]KD where K is one of the 10 Kodaira types. There is a unique way to attach a D-tail (like in In*) in a minimal way to [2]K in every case. For example, for K=IV*, 1g1, In:

[2]g1,D
[2]6,4D
[2]IVD
[2]g1,D
[2]1,D
[2]I0,D
[2]I1,D
[2]IVD
[2]IVD
[2]IIID
[2]IIID
[2]IID
[2]IID
Genus:    Label:    Tamagawa number:

3. Kn (8 types)

There are 8 types Kn obtained by adding a loop of gcd 1 to every Kodaira type except II, II*. For II, II* all the outgoing open chains have different initial multiplicities, so this is not possible, but it is possible for all the others, again in a unique minimal way. For example, 1g1,n, IVn, IV*n, etc.
Ig1,5
IV1
IV-1
Ig1,1
I1,1
I0,0
I1,0
IV0
IV-1
III0
III-1
Genus:    Label:    Tamagawa number:

4. KD (6 types)

There are 6 types KD obtained by adding a D-tail to a Kodaira type whose principal component has even multiplicity, namely I0*, I1*, III, III*, II, II*. For example,
I0,D
IIID
IID
I0,D
I1,D
IIID
IIID
IID
IID
Genus:    Label:    Tamagawa number:

5. Cores with χ=-2 (16 types)

There are 16 types from cores with χ = -2, consisting of one principal component of genus 0 and multiplicity m, and open chains with initial multiplicities d1,...,dk/m and ∑ di = 0.
21,1,1,1,1,1
62,4,3,3
103,2,5
21,1,1,1,1,1
31,1,2,2
41,3,2,2
51,1,3
51,2,2
52,4,4
53,3,4
61,1,4
65,5,2
62,4,3,3
81,3,4
85,7,4
101,4,5
103,2,5
107,8,5
109,6,5
Genus:    Label:    Tamagawa number:

6. Remaining ones from cores 1, D, T and 41,3 (9 types)

There are 9 remaining types derived from cores 1, D=21,1, T=31,2, 41,3 that have χ=2: 1g2 (good reduction), 1---1, [2]D,D,D (core(s) 1), Dg1, D{2-2}, D-=D (core(s) D), T=T, [2]T{6}D (core(s) T), and 41,3D (core 41,3).
1g2
Dg1
D{2-2}
[2]D,D,D
41,3D
[2]T{6}D
T=T
D– =D
1– – –1
1g2
Dg1
D{2-2}
[2]D,D,D
41,3D
[2]T{6}D
T=T
D– =D
1– – –1
Genus:    Label:    Tamagawa number:

Genus 3

Reduction types of genus 3 curves come in 1901 families, and this is how we can classify them. Recall, for example that there are 55 genus 2 families of type K1-K2, two Kodaira types with a chain between them of gcd 1. Equivalently, such a type is glued together from two principal types with χ=-1 and one loose chain of gcd 1. There are 10 choices for these principal types,

11(10):    1g1–   I1–   I0–   I1–   IV–   IV–   III–   III–   II–   II–.
and we write 11(10) for this collection. The superscript 1 stands for a sequence of gcds of loose chains, first '1' for -χ, and the subscript (10) for the number of such types. Now we say that the 55 types of the form K1-K2 have the following shape:
1 1 (10) 1 1 (10)
Shape is a graph whose components are collections of all principal types with given χ and gcd's of loose links (like 11(10) above), and edges merge loose links into edges.

Similarly, the 8 principal types with χ=-2 and two loose chains of gcd 1 form the set

21,1(8):    1g1– –   I1– –   I0– –   I1– –   IV– –   IV– –   III– –   III– –   II– –   II– –.
and in genus 3 one of the possible shape configuration is
1 1 (10) 2 1 , 1 (8) 1 1 (10)
representing all possible degenerations of 3 elliptic curves forming a chain 1g1-1g1-1g1. The two outside leaves are in 11(10) and the inside one in 21,1(8). For example, here are three such types:
1g1–1g1–1g1
I1 2IV–II
IV–I0–II
The total number of types of this shape is
Binomial(10,2)*8 = 55*8 = 420.

Another possible shape in genus 3 is

1 1 1 (10) 1 1 (10) 1 1 (10)
with total number of types
Binomial(10,3) = 10*11*12/5 = 220.

All in all, in genus 3 there are 35 possible shapes, and here they are with a breakdown of possible number of reduction type families in each shape:
1 1 (10) 1 1 (10) 2 1 , 1 (8) 3 1 (39) 1 1 (10) 1 1 (10) 1 1 (10) 1 1 (10) 1 2 2 (18) 1 1 (10) D 2 440types390types220types180types
2 2 (18) 2 2 (18) 2 4 ??? (150) 2 1 , 1 (8) 1 1 (10) 1 1 1 1 (10) 1 1 (10) 1 171types150types80types55types
D 1 1 (10) 1 1 (10) D 2 2 1 , 1 (8) 2 1 , 1 (8) 1 1 (10) T 2 1 , 3 (2) 3 3 3 (15) T 3 55types36types20types15types
1 1 1 (10) 1 1 1 1 (10) D D 2 1 1 (10) 1 1 D 1 1 (10) D 1 2 10types10types10types10types
2 1 , 1 (8) 1 1 2 1 , 1 (8) D D 2 3 1 , 2 (6) D 2 3 1 , 1 , 1 (5) 1 2 1 , 3 (2) 2 1 , 3 (2) 3 2 2 , 2 (2) 2 2 , 2 (2) 2 2 8types8types6types5types3types3types
2 4 (2) 2 4 (2) 4 2 2 , 2 (2) D D 2 2 D D 2 [2]T [2]T 6 1 1 [2] [2] 2 2 2 3types2types1type1type1type1type
D 1 D 2 1 1 1 [2]D [2]D 2 4 1 1 1 1 1 D D 1 2 1type1type1type1type1type
D D D D 2 2 1 1 1 1 1type1type

Here are the simplest reduction types of each shape (with components of largest possible genus):

1g1–1g1–1g1 (440 types)
1g2–1g1 (390 types)
1g1–1–1g1&1g1–c2 (220 types)
[2]g1–D–1g1 (180 types)
[2]g1–[2]g1 (171 types)
1g3 (150 types)
1g1– –1–1g1 (80 types)
1g1–1– –1–1g1 (55 types)
1g1–D=D–1g1 (55 types)
1g1– –1g1 (36 types)
1g11,2 T=T (20 types)
[3]g1–T (15 types)
1g1–1–1– –1–c2 (10 types)
1g1–D– =D (10 types)
1g1–1– – –1 (10 types)
1g1–1–D=D–c2 (10 types)
1g1–1– –1–c1 (8 types)
1g1–D=D–c1 (8 types)
I0– =D (6 types)
1g1– – –1 (5 types)
T2,2 =T (3 types)
D= =D (3 types)
41,3=41,3 (3 types)
D=D–D=c1 (2 types)
D– – =D
[2]T=[2]T
1– – – –1
[2]– – –[2]
D– –1–D=c1
1– –1–1– –c1
[2]D– =[2]D
1–1– –1–1– –c1
D–1– –1–D=c1
D–D=D–D=c1
1–1–1–1–c1–c3&c2–c4
The buttons below cycle through all the reduction types of a given shape:
1g1–1g1–1g1 (440 types)
1g2–1g1 (390)
1g1–1–1g1&1g1–c2 (220)
[2]g1–D–1g1 (180)
[2]g1–[2]g1 (171)
1g3 (150)
1g1– –1–1g1 (80)
1g1–1– –1–1g1 (55)
1g1–D=D–1g1 (55)
1g1– –1g1 (36)
1g11,2 T=T (20)
[3]g1–T (15)
1g1–1–1– –1–c2 (10)
1g1–D– =D (10)
1g1–1– – –1 (10)
1g1–1–D=D–c2 (10)
1g1–1– –1–c1 (8)
1g1–D=D–c1 (8)
I0– =D (6)
1g1– – –1 (5)
T2,2 =T (3)
D= =D (3)
41,3=41,3 (3)
D=D–D=c1 (2)
D– – =D
[2]T=[2]T
1– – – –1
[2]– – –[2]
D– –1–D=c1
1– –1–1– –c1
[2]D– =[2]D
1–1– –1–1– –c1
D–1– –1–D=c1
D–D=D–D=c1
1–1–1–1–c1–c3&c2–c4
Genus:    Label:    Tamagawa number:

Large genus examples

Finally, here are some examples in larger genus:

Depths
Loops
D-tails
K4
Genus:    Label:    Tamagawa number: