Commit 9366b4c3 authored by Peter Bruin's avatar Peter Bruin

new function embedding_forms

parent 94cb1e09
......@@ -43,6 +43,9 @@ form.gp:
ramified_primes.gp: form.gp
$(call gp_eval_args,"ramified_primes(readvec(\"$<\"))",@pkgdatadir@/init.gp,$@)
embedding_forms.gp: form.gp
$(call gp_eval_args,"embedding_forms(modular_symbols_group(readvec(\"$<\")[1]),7)",@pkgdatadir@/init.gp,$@)
info.txt: relative_equation.gp scalar_mul_absolute.gp
$(call gp_eval,"info()",$@)
......
......@@ -77,3 +77,42 @@ init_weight_2(form) =
error("no corresponding form of weight 2"));
[M2, subspace2];
}
embedding_forms(Gamma, max_power) =
{
my(genus = modular_group_genus(Gamma),
weight = 2, degree,
delta = if(modular_group_contains_minus1(Gamma), 2, 1),
r, dim, prec, forms, M, V);
while((degree = modular_group_modular_forms_degree_coarse(Gamma, weight))
< 2*genus + 1,
weight += delta);
r = degree - (2*genus + 1);
/*
Compute the dimension of \Gamma(X,{\cal L}) using Riemann's
theorem (note that the degree is greater than 2g - 2).
*/
dim = 1 - genus + degree;
/*
We need to know \Gamma(X,{\cal L}^4) to find random points
on the curve.
*/
if(max_power < 4,
max_power = 4);
prec = max_power * degree + 1;
forms = modular_forms_q_expansion_basis(Gamma, weight, 0, prec);
if(matsize(forms)[2] != dim,
error("modular_curve: incorrect dimension of space of modular forms of weight ",
weight, " (dimension ", matsize(forms)[2], " instead of ", dim));
/* Compute the subspace of forms vanishing to order r. */
M = matrix(prec, prec - r, i, j, i == r + j);
V = matintersect(forms, M);
if(matsize(V)[2] != genus + 2,
error("unexpected dimension"));
V = V[(r + 1)..(r + 1 + max_power * (2*genus + 1)),];
V = matrixqz(V);
V = V * qflll(V);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment