unlisted
ubuntu2004r"""1Moduli types2"""34from sage.rings.integer_ring import ZZ56# NOTE: due to the addition of MODULI_TL in admcycles/moduli.py, which is not7# present in Pixton code there is a mismatch between the values of MODULI_ST8# (3 here and 4 in admcycles/moduli.py).9# All functions calling DR.py with the option moduli_type should use the10# function get_moduli(m, DRpy=True) to correctly translate to the conventions11# of Pixton's DR code.12MODULI_SMALL = -1 # ??13MODULI_SM = 014MODULI_RT = 115MODULI_CT = 216MODULI_ST = 3171819def dim_form(g, n, moduli_type=MODULI_ST):20g = ZZ(g)21n = ZZ(n)22if moduli_type == MODULI_ST:23return 3 * g - 3 + n24if moduli_type == MODULI_CT:25return 2 * g - 3 + n26if moduli_type == MODULI_RT:27if g > 0:28return g - 2 + n29else:30return n - 331if moduli_type == MODULI_SM:32if n == 0:33return g - 234elif g >= 1:35return g - 136else:37return ZZ.zero()38if moduli_type == MODULI_SMALL:39return ZZ(1000)40return 3 * g - 3 + n414243