Skip to content

Commit

Permalink
Added TraceForm Functionality to ConstructGeneratorsAndRelations
Browse files Browse the repository at this point in the history
  • Loading branch information
BenKBreen committed Dec 15, 2023
1 parent 107a3f3 commit 79021b1
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion ModFrmHilD/CanonicalRing/CanonicalRing.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ intrinsic ConstructGeneratorsAndRelations(
IdealClassesSupport:=false,
Symmetric:=false,
ComputeNewGenerators:=true,
NumberOfTraceForms := 0,
PrecomputedGens:=AssociativeArray()
) -> Any
{
Expand Down Expand Up @@ -216,6 +217,18 @@ intrinsic ConstructGeneratorsAndRelations(
have_dim_formula := IdealClassesSupport eq NarrowClassGroupReps(M) and not Symmetric;
KnownRelations := false;

// Computing Trace forms
F := BaseField(M);
bound := 500;
I := IdealsUpTo(bound, F);
while #I lt NumberOfTraceForms do
bound *:= 2;
I := IdealsUpTo(bound, F);
end while;
// Ideals
TraceFormIdeals := (NumberOfTraceForms eq 0) select [] else I[1..NumberOfTraceForms];
PrecomputeTraceForms(M, TraceFormIdeals);

/////////////////////
// Generators of lowest weight.

Expand All @@ -228,6 +241,15 @@ intrinsic ConstructGeneratorsAndRelations(
if IsDefined(PrecomputedGens, minimalGenWeight) then
basis := PrecomputedGens[minimalGenWeight];

elif NumberOfTraceForms ne 0 then
Mk := HMFSpace(M, N, [minimalGenWeight : i in [1..n]]);
B := [ TraceForm(Mk,aa) : aa in TraceFormIdeals ];
basis := EisensteinBasis(Mk) cat Basis(B);
if #basis lt CuspDimension(Mk) then
msg := "Not enough TraceForms";
error msg;
end if;

elif ComputeNewGenerators then
basis := Basis(HMFSpace(M, N, [minimalGenWeight : i in [1..n]]) : IdealClassesSupport := IdealClassesSupport, Symmetric:=Symmetric);
assert not IsNull(basis);
Expand Down Expand Up @@ -319,6 +341,7 @@ intrinsic ConstructGeneratorsAndRelations(
Alg := Alg,
KnownMkDimension := knownDim,
IdealClassesSupport := IdealClassesSupport,
TraceFormIdeals := TraceFormIdeals,
Symmetric := Symmetric);

newGens := basisWeightk[#weightedSymBasis + 1 .. #basisWeightk];
Expand Down Expand Up @@ -349,6 +372,7 @@ intrinsic ExtendBasis(forms::SeqEnum[ModFrmHilDElt], Mk :
Alg := "Standard",
KnownMkDimension := false,
IdealClassesSupport := false,
TraceFormIdeals := [],
Symmetric := false) -> SeqEnum
{Given a sequence Q of r linearly independent elements of a space M and a subspace V of M
containing the elements of Q, extend the elements of Q to a basis for U; the basis is
Expand All @@ -362,12 +386,16 @@ intrinsic ExtendBasis(forms::SeqEnum[ModFrmHilDElt], Mk :
// First try our luck with just Eisenstein series. If that fails, use the fallback.

eisensteinbasis := EisensteinBasis(Mk : IdealClassesSupport:=IdealClassesSupport, Symmetric:=Symmetric);
moreforms := Basis(forms cat eisensteinbasis);
traceforms := [ TraceForm(Mk,aa) : aa in TraceFormIdeals ];
moreforms := Basis(forms cat eisensteinbasis cat traceforms );
coeffs_matrix := CoefficientsMatrix(moreforms : IdealClasses:=IdealClassesSupport);

// TODO: This double complement call can surely be optimized away.
if Rank(coeffs_matrix) eq KnownMkDimension then
return forms cat ComplementBasis(forms, Basis(moreforms) : Alg := Alg);
elif (#TraceFormIdeals ne 0) then
msg := "Not enough TraceForms";
error msg;
end if;
end if;

Expand Down

0 comments on commit 79021b1

Please sign in to comment.