Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
241818 views
1
def test_nonsurj(v=range(1,50)):
2
"""
3
For each non CM curve of conductor in the list v, compute the
4
primes where the representation isn't surjective using both galrep
5
and Sage, and make sure the answers agree.
6
"""
7
from sage.all import cremona_curves, Integer
8
from wrapper import GalRep
9
G = GalRep()
10
for E in cremona_curves(v):
11
if E.has_cm(): continue
12
a = E.galois_representation().non_surjective()
13
F = E.short_weierstrass_model()
14
b = G.non_surjective_primes(Integer(F.a4()), Integer(F.a6()))
15
if a != b:
16
raise RuntimeError, "Test failed for %s!"%E.cremona_label()
17
18
19