CoCalc Public Fileswww / tables / magma_src / ModFrm / elliptic_curve.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: elliptic_curve.m
10
11
$Header: /home/was/magma/packages/ModFrm/code/RCS/elliptic_curve.m,v 1.2 2002/10/26 22:49:27 was Exp $
12
13
$Log: elliptic_curve.m,v $
14
Revision 1.2 2002/10/26 22:49:27 was
15
.
16
17
Revision 1.1 2001/05/30 18:51:59 was
18
Initial revision
19
20
21
***************************************************************************/
22
23
24
import "newforms.m" : GiveNewformItsParent;
25
26
intrinsic ModularForm(E::CrvEll) -> ModFrmElt
27
{The modular forms associated to E.}
28
require Type(BaseRing(E)) in {FldRat, RngInt} :
29
"Argument 1 must be defined over the rationals.";
30
f := HackobjCreateRaw(ModFrmElt);
31
M := ModularForms(Gamma0(Conductor(E)),2);
32
f`parent := M;
33
f`elliptic_curve := E;
34
f`degree := 1;
35
f`is_newform := true;
36
GiveNewformItsParent(f,0);
37
return f;
38
end intrinsic;
39
40
41
42
intrinsic EllipticCurve(f::ModFrmElt) -> CrvEll
43
{An elliptic curve with associated modular form f.}
44
require (not IsRingOfAllModularForms(Parent(f))) and
45
Type(BaseRing(Parent(f))) in {FldRat, RngInt} and
46
Weight(f) eq 2 and
47
IsGamma0(Parent(f)) and
48
(not IsEisensteinSeries(f)) and
49
Degree(f) eq 1 and
50
(IsNewform(f) or assigned f`elliptic_curve) :
51
"Argument 1 must be a newform in S_2(Gamma_0(N)).";
52
if not assigned f`elliptic_curve then
53
assert assigned f`mf_modular_symbols;
54
f`elliptic_curve := EllipticCurve(f`mf_modular_symbols);
55
end if;
56
return f`elliptic_curve;
57
end intrinsic;
58