Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
181 views
unlisted
ubuntu2004
1
r"""
2
Moduli types
3
"""
4
5
from sage.rings.integer_ring import ZZ
6
7
# NOTE: due to the addition of MODULI_TL in admcycles/moduli.py, which is not
8
# present in Pixton code there is a mismatch between the values of MODULI_ST
9
# (3 here and 4 in admcycles/moduli.py).
10
# All functions calling DR.py with the option moduli_type should use the
11
# function get_moduli(m, DRpy=True) to correctly translate to the conventions
12
# of Pixton's DR code.
13
MODULI_SMALL = -1 # ??
14
MODULI_SM = 0
15
MODULI_RT = 1
16
MODULI_CT = 2
17
MODULI_ST = 3
18
19
20
def dim_form(g, n, moduli_type=MODULI_ST):
21
g = ZZ(g)
22
n = ZZ(n)
23
if moduli_type == MODULI_ST:
24
return 3 * g - 3 + n
25
if moduli_type == MODULI_CT:
26
return 2 * g - 3 + n
27
if moduli_type == MODULI_RT:
28
if g > 0:
29
return g - 2 + n
30
else:
31
return n - 3
32
if moduli_type == MODULI_SM:
33
if n == 0:
34
return g - 2
35
elif g >= 1:
36
return g - 1
37
else:
38
return ZZ.zero()
39
if moduli_type == MODULI_SMALL:
40
return ZZ(1000)
41
return 3 * g - 3 + n
42
43