CoCalc Public Fileswww / tables / magma_src / ModFrm / input_output.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: creation.m
10
11
$Header: /home/was/magma/packages/modform/code/RCS/input_output.m,v 1.1 2001/05/30 18:52:38 was Exp $
12
13
$Log: input_output.m,v $
14
Revision 1.1 2001/05/30 18:52:38 was
15
Initial revision
16
17
18
***************************************************************************/
19
20
function PrintSideways(s)
21
assert Type(s) in {SeqEnum, List};
22
ans := "[";
23
for i in [1..#s] do
24
ans := ans*Sprintf("%o", s[i]);
25
if i lt #s then
26
ans := ans*", ";
27
end if;
28
end for;
29
ans := ans*"]";
30
return ans;
31
end function;
32
33
intrinsic HackobjPrintModFrm(M::ModFrm, level::MonStgElt)
34
{}
35
if IsRingOfAllModularForms(M) then
36
printf "All modular forms over %o", BaseRing(M);
37
return;
38
end if;
39
if IsGamma0(M) then
40
printf "Space of modular forms on Gamma_0(%o) of weight %o and dimension %o over %o.",
41
Level(M), Weight(M), Dimension(M), BaseRing(M);
42
elif IsGamma1(M) then
43
printf "Space of modular forms on Gamma_1(%o) of weight %o and dimension %o over %o.",
44
Level(M), Weight(M), Dimension(M), BaseRing(M);
45
else
46
chars := DirichletCharacters(M);
47
assert #chars gt 0;
48
printf "Space of modular forms on Gamma_1(%o) with character%o all conjugates of %o, weight %o, and dimension %o over %o.",
49
Level(M), #chars eq 1 select "" else "s", PrintSideways(chars),
50
Weight(M), Dimension(M), BaseRing(M);
51
end if;
52
end intrinsic;
53
54
intrinsic HackobjPrintModFrmElt(f::ModFrmElt, level::MonStgElt)
55
{}
56
printf "%o", PowerSeries(f);
57
end intrinsic;
58
59
intrinsic AssignNames(~M::ModFrm, s::[MonStgElt])
60
{}
61
require #s eq 1 : "Number of names must be 1.";
62
M`q_name := s[1];
63
end intrinsic;
64
65
intrinsic Name(M::ModFrm,i::RngIntElt) -> RngSerPowElt
66
{Name the ith generator.}
67
require i eq 1 : "Argument 2 must be 1";
68
return PowerSeriesRing(BaseRing(M)).1;
69
end intrinsic;
70
71
72
/*
73
intrinsic Write(M::ModFrm, file::File)
74
{Write the space M of modular forms to the file.}
75
error "Not written";
76
end intrinsic;
77
78
intrinsic ReadModFrm(file::File) -> ModFrm
79
{Read the next space of modular forms from the file.}
80
error "Not written";
81
end intrinsic;
82
83
intrinsic Write(f::ModFrmElt, file::File)
84
{Write the modular form f to the file.}
85
error "Not written";
86
end intrinsic;
87
88
intrinsic ReadModFrmElt(file::File) -> ModFrmElt
89
{Read the next modular form from the file.}
90
error "Not written";
91
end intrinsic;
92
93
*/
94