Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
241852 views
1
#################################################################################
2
#
3
# (c) Copyright 2011 William Stein
4
#
5
# This file is part of PSAGE
6
#
7
# PSAGE is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# PSAGE is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#
20
#################################################################################
21
22
def ellcurves_sqrt5(address='localhost:29000', username=None, password=None):
23
from sage.databases.cremona import cremona_letter_code
24
from psage.modform.hilbert.sqrt5.sqrt5 import F
25
from aplists import labeled_primes_of_bounded_norm
26
labels, primes = labeled_primes_of_bounded_norm(F, 100)
27
28
from pymongo import Connection
29
C = Connection(address).research
30
if username is None or password is None:
31
from psage.lmfdb.auth import userpass
32
username, password = userpass()
33
34
if not C.authenticate(username, password):
35
raise RuntimeError, "failed to authenticate"
36
37
return C.ellcurves_sqrt5
38
39
def find_isogeneous_curves(ellcurves_sqrt5, E):
40
"""
41
INPUT:
42
- ellcurves_sqrt5 -- MongoDB collection
43
- E -- an elliptic curve over Q(sqrt(5))
44
OUTPUT:
45
- cursor iterating over entries in the collection that have
46
the same good a_p, for p of norm up to 100.
47
"""
48
from aplists import aplist
49
w = aplist(E, 100)
50
v = dict([('ap.%s'%p, a) for p, a in w.items()])
51
from psage.modform.hilbert.sqrt5.tables import canonical_gen
52
v['level'] = str(canonical_gen(E.conductor())).replace(' ','')
53
return ellcurves_sqrt5.find(v)
54
55
56
57
58
59