Commit afd85dde authored by Peter Bruin's avatar Peter Bruin

new make target "summary"

parent a0c6f4c4
......@@ -30,7 +30,7 @@ gp_eval_args_vec = $(call gp_eval_raw,"apply(x->print(x)," $(call gp_catch,$(1))
# the result (which must be a vector) to $(2), separated by newlines.
gp_eval_vec = $(call gp_eval_args_vec,$(1),@pkgdatadir@/functions.gp,$(2))
all: projective_field.gp dual_pair.gp reduced_dual_pair.gp info.txt
all: summary.txt
.DELETE_ON_ERROR:
......@@ -46,6 +46,9 @@ embedding_forms.gp: form.gp
info.txt: relative_equation.gp scalar_mul_absolute.gp
$(call gp_eval,"info()",$@)
summary.txt: reduced_dual_pair.gp
$(call gp_eval_raw,"summary();",@pkgdatadir@/functions.gp,$@)
projective_field.gp: projective_polynomial_reduced.gp | ramified_primes.gp
$(call gp_eval,"nfinit([readvec(\"$<\")[1],read(\"ramified_primes.gp\")])",$@)
......
......@@ -472,6 +472,28 @@ info() =
print("h(scalar_mul_absolute) = ", polheight(lift(read("scalar_mul_absolute.gp"))));
}
summary() =
{
my(D = readvec("reduced_dual_pair.gp"),
r = length(readvec("subgroups.gp")[2]) - 1);
if(#D == 3,
[f, basis_A, Phi] = D,
[f, basis_A, g, basis_B, Phi] = D);
print("h(f) = ", , vecmax(apply(polheight, f)));
if(#D == 5,
print("h(g) = ", , vecmax(apply(polheight, g))));
print("h(Phi) = ", matheight(Phi));
for(i = 0, r,
print("intermediate field ", i, ":");
K = readvec(concat(["intermediate_fields_", i, ".gp"]));
for(j = 1, #K,
disc = K[j].disc;
n = poldegree(K[j].pol);
print(" signature: ", K[j].sign);
print(" discriminant factorisation: ", factorint(disc));
print(" root discriminant: ", abs(disc)^(1/n))));
}
/*
Like bestappr(f), but try in addition to replace the
polynomial F(x) by the shifted polynomial F(x - a),
......
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