Canonical Rings

mdsage.canonical_rings.kernel_matrix(M)

Computing the kernel of a matrix over ZZ can sometimes be slow in sage. Especially since sage by default return the basis of the kernel in hermite normal form.

This function can sometimes be faster in computing the kernel of an integer matrix. The returned matrix forms a basis of the kernel, however the output matrix is not put into hermite normal form.

EXAMPLES:

sage: from mdsage import *
sage: M = Matrix(6, 4, range(24))
sage: K = kernel_matrix(M); K
[-1  0  3 -2  0  0]
[ 0 -1  2 -1  0  0]
[ 0  0 -2  3  0 -1]
[ 0  0 -1  2 -1  0]
sage: V = M.kernel(); V
Free module of degree 6 and rank 4 over Integer Ring
Echelon basis matrix:
[ 1  0  0  0 -5  4]
[ 0  1  0  0 -4  3]
[ 0  0  1  0 -3  2]
[ 0  0  0  1 -2  1]
sage: K.row_module() == V
True
mdsage.canonical_rings.subhyperelliptic_primes(G, N=None)

INPUT:

  • G - A congruence subgroup of $SL_2(ZZ)$ or a list of q-expansions of one forms on a curve over $ZZ$

  • N (optional) - If G is a list of q-expansions then N should be a multiple of all primes of bad reduction.

OUTPUT:

  • [0,] if the curve X(G) is subhyperelliptic in characteristic 0 of the list of primes not dividing the level of G such that the X(G) has subhyperelliptic reduction.

EXAMPLES:

sage: from mdsage import *
sage: [subhyperelliptic_primes(Gamma0(N)) for N in [13, 34, 37, 48, 64, 72]]
[[0], [], [0], [0], [], []]

The following is the only nonhyperelliptic modular curve of shimura type that becomes hyperelliptic mod a prime:

sage: subhyperelliptic_primes(GammaH(37,[4]))
[2]
mdsage.canonical_rings.trigonal_or_plane_quintic_primes(G)

On input of a congruence subgroup G compute the primes p such that the reduction associated modular curve $X(G)_{F_p}$ geometrically has trigonal or plane quintic reduction. If the output is [0] then $X(G)_{Q}$ is trigonal or plane quintic

WARNING:

This function assumes that neither $X(G)_{Q}$ or $X(G)_{F_p}$ ore sub hyperelliptic. This should be checked beforehand using mdsage.canonical_rings.subhyperelliptic_primes().

EXAMPLES:

sage: from mdsage import *

A curve that is not trigonal in any characteristic:

sage: trigonal_or_plane_quintic_primes(Gamma0(42)) []

A trigonal curve over Q:

sage: trigonal_or_plane_quintic_primes(Gamma0(43)) [0]

The following is the only nontrigonal modular curve of shimura type that becomes trigonal mod a prime:

sage: trigonal_or_plane_quintic_primes(Gamma0(73))
[2]
mdsage.canonical_rings.vanishing_quadratic_forms(G, minimize_strategy: Optional[str] = None)

On input of a congruence subgroup G of genus g compute the space of all quadratic forms that vanish on the image of the canonical embedding $X(G) \to \P^{g-1}$.

INPUT:

- G - A congruence subgroup of $\SL_2(\ZZ)$
- minimize_strategy : str | None = None - Either None, "LLL" or "HNF".
  in the latter two cases it tries to minimize the coefficients of the
  vanishing quadric froms by changing the basis of the space of vanishing
  quadrics.

EXAMPLES:

sage: from mdsage import *
sage: vanishing_quadratic_forms(Gamma0(47))
[x2^2 - x1*x3 - 2*x2*x3 + 3*x3^2,
 x1*x2 - 2*x2^2 - x0*x3 + 3*x2*x3 - 4*x3^2,
 x1^2 - x0*x2 - 4*x2^2 + 8*x2*x3 - 9*x3^2]