CoCalc Public Fileswww / tables / magma_src / ModFrm / relations.mOpen with one click!
Author: William A. Stein
1
freeze;
2
3
/****-*-magma-* EXPORT DATE: 2004-03-08 ************************************
4
5
MODFORM: Modular Forms in MAGMA
6
7
William A. Stein
8
9
FILE: relations.m
10
11
$Header: /home/was/magma/packages/modform/code/RCS/relations.m,v 1.2 2002/04/13 07:26:56 was Exp $
12
13
$Log: relations.m,v $
14
Revision 1.2 2002/04/13 07:26:56 was
15
*** empty log message ***
16
17
Revision 1.1 2001/05/30 18:57:16 was
18
Initial revision
19
20
21
***************************************************************************/
22
23
24
import "misc.m" : ToLowerCaseLetter;
25
26
forward RSpaceElement,
27
qRelationsOfDegree;
28
29
30
intrinsic Relations(M::ModFrm, d::RngIntElt, prec::RngIntElt) -> SeqEnum, SeqEnum
31
{All relations of degree d satisfied by the q-expansions of Basis(M),
32
computed to precision prec.}
33
require d ge 1 : "Argument 2 must be at least 1.";
34
require prec ge 1 : "Argument 3 must be at least 1.";
35
if Dimension(M) eq 0 then
36
return [];
37
end if;
38
return qRelationsOfDegree([PowerSeries(f,prec) : f in Basis(M)],d, prec);
39
end intrinsic;
40
41
42
function qRelationsOfDegree(B, d, prec)
43
// The algebraic relations of degree d satisfied by
44
// the sequence X of independent q-expansions
45
46
assert Type(B) eq SeqEnum;
47
assert Type(prec) eq RngIntElt;
48
assert Type(d) eq RngIntElt;
49
assert d ge 1;
50
assert prec ge 1;
51
52
S := Parent(B[1]);
53
K := BaseRing(S);
54
R := PolynomialRing(K,#B);
55
AssignNames(~R,[ToLowerCaseLetter(n) : n in [1..#B]]);
56
monoms := MonomialsOfDegree(R,d);
57
forms := [&*[B[i]^exp[i] : i in [1..#B]] where exp := Exponents(m) : m in monoms];
58
V := RSpace(K,prec);
59
vecs := [RSpaceElement(V,f) : f in forms];
60
A := RMatrixSpace(K,#forms,prec)!vecs;
61
relvecs := Basis(Kernel(A));
62
rels := [&+[v[i]*monoms[i] : i in [1..#monoms]] : v in relvecs];
63
64
return rels, relvecs;
65
end function;
66
67
68
function RSpaceElement(V, f)
69
R<q>:=Parent(f);
70
S := [0 : i in [1..Valuation(f)]] cat Eltseq(f+O(q^Degree(V)));
71
S := S cat [0 : i in [1..Degree(V)-#S]];
72
return V!S;
73
end function;
74