Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168738
Image: ubuntu2004
def ker(E, ell1, ell2): P, Q, R = E.gens() E1 = E.change_ring(GF(ell1)) E2 = E.change_ring(GF(ell2)) K = [] for a, b, c in GF(3)^3: S = ZZ(a)*P + ZZ(b)*Q + ZZ(c)*R S1 = E1(S) if len(S1.division_points(3)) > 0: S2 = E2(S) if len(S2.division_points(3)) > 0: K.append(S) return K
E = EllipticCurve('5077a')
ker(E,3, 23, 29)
[(0 : 1 : 0), (7/9 : -44/27 : 1), (1/4 : -21/8 : 1)]
P = ker(E,3, 23, 29)[-1]; P
(1/4 : -21/8 : 1)
E.change_ring(GF(11))(P).division_points(3)
[]
def red_l(E, p, l, li): set = ker(E,p, li[0], li[1]) if len(set) == p: P = set[-1] return E.change_ring(GF(l))(P).division_points(p)
red_l(E,3,11,[431,107])
[(3 : 3 : 1), (8 : 0 : 1), (10 : 7 : 1)]
K.<a> = QuadraticField(-163) L = [] for p in prime_range(12,500): if len(K.factor(p))==1: if gcd(E.ap(p),p+1)%3 == 0: L.append(p)
Lpairs = [] print L for i in range(len(L)): for j in range(i+1,len(L)): Lpairs.append([L[i],L[j]])
[23, 29, 107, 137, 149, 233, 239, 257, 293, 389, 401, 431]
Lpairs
[[23, 29], [23, 107], [23, 137], [23, 149], [23, 233], [23, 239], [23, 257], [23, 293], [23, 389], [23, 401], [23, 431], [29, 107], [29, 137], [29, 149], [29, 233], [29, 239], [29, 257], [29, 293], [29, 389], [29, 401], [29, 431], [107, 137], [107, 149], [107, 233], [107, 239], [107, 257], [107, 293], [107, 389], [107, 401], [107, 431], [137, 149], [137, 233], [137, 239], [137, 257], [137, 293], [137, 389], [137, 401], [137, 431], [149, 233], [149, 239], [149, 257], [149, 293], [149, 389], [149, 401], [149, 431], [233, 239], [233, 257], [233, 293], [233, 389], [233, 401], [233, 431], [239, 257], [239, 293], [239, 389], [239, 401], [239, 431], [257, 293], [257, 389], [257, 401], [257, 431], [293, 389], [293, 401], [293, 431], [389, 401], [389, 431], [401, 431]]
for ells in Lpairs: print ells, red_l(E,3,11,ells)
[23, 29] [] [23, 107] [] [23, 137] [] [23, 149] [] [23, 233] None [23, 239] [] [23, 257] None [23, 293] [] [23, 389] [] [23, 401] [] [23, 431] [] [29, 107] [] [29, 137] None [29, 149] [] [29, 233] [] [29, 239] [] [29, 257] [] [29, 293] [] [29, 389] None [29, 401] [] [29, 431] [] [107, 137] [] [107, 149] [] [107, 233] [] [107, 239] None [107, 257] [] [107, 293] [] [107, 389] [] [107, 401] None [107, 431] [(3 : 3 : 1), (8 : 0 : 1), (10 : 7 : 1)] [137, 149] [] [137, 233] [] [137, 239] [] [137, 257] [] [137, 293] [] [137, 389] None [137, 401] [] [137, 431] [] [149, 233] [] [149, 239] [] [149, 257] [] [149, 293] [(0 : 1 : 0), (9 : 3 : 1), (9 : 7 : 1)] [149, 389] [] [149, 401] [] [149, 431] [] [233, 239] [] [233, 257] None [233, 293] [] [233, 389] [] [233, 401] [] [233, 431] [] [239, 257] [] [239, 293] [] [239, 389] [] [239, 401] None [239, 431] [(3 : 3 : 1), (8 : 0 : 1), (10 : 7 : 1)] [257, 293] [] [257, 389] [] [257, 401] [] [257, 431] [] [293, 389] [] [293, 401] [] [293, 431] [] [389, 401] [] [389, 431] [] [401, 431] [(3 : 3 : 1), (8 : 0 : 1), (10 : 7 : 1)]
def ker(E,p, li): """ computes kernel of the reduction map for rank 3, checks if any are p-divisible """ P, Q, R = E.gens() E1 = E.change_ring(GF(li[0])) E2 = E.change_ring(GF(li[1])) K = [] for a, b, c in GF(p)**3: S = ZZ(a)*P + ZZ(b)*Q + ZZ(c)*R S1 = E1(S) if len(S1.division_points(p)) > 0: S2 = E2(S) if len(S2.division_points(p)) > 0: K.append(S) return K def red_l(E, p, l, li): set = ker(E,p, li) if len(set) == p: P = set[-1] return E.change_ring(GF(l))(P).division_points(p) else: return [] def ell_list(D, p, l, bound): """ computes list of ell_i given D, p, l, and a bound on the ell_i """ K.<a> = QuadraticField(D) L = [] for q in prime_range(l+1,bound): if len(K.factor(q))==1: if (gcd(E.ap(q),q+1))%(p) == 0: L.append(q) return L def ell_pairs(L): """ given list L, returns list of pairs (distinct elements) of L without repetition """ Lpairs = [] for i in range(len(L)): for j in range(i+1,len(L)): Lpairs.append([L[i],L[j]]) return Lpairs def tau(E,D, p, l, bound): """ return list of tau given E,D p, l, and a bound on the ell_i """ Lpairs = ell_pairs(ell_list(D,p,l,bound)) for ells in Lpairs: print ells, red_l(E,p,l,ells)
E = EllipticCurve('11642a') p = 3 l = 5 D = -7 tau(E,D,p,l,300)
[17, 47] [] [17, 59] [] [17, 101] [(0 : 1 : 0), (1 : 1 : 1), (1 : 3 : 1)] [17, 167] [(0 : 1 : 0), (1 : 1 : 1), (1 : 3 : 1)] [17, 227] [] [17, 251] [] [17, 269] [] [17, 293] [] [47, 59] [] [47, 101] [] [47, 167] [] [47, 227] [] [47, 251] [] [47, 269] [] [47, 293] [] [59, 101] [] [59, 167] [] [59, 227] [] [59, 251] [] [59, 269] [] [59, 293] [(2 : 0 : 1), (3 : 3 : 1), (4 : 2 : 1)] [101, 167] [(0 : 1 : 0), (1 : 1 : 1), (1 : 3 : 1)] [101, 227] [] [101, 251] [] [101, 269] [] [101, 293] [] [167, 227] [] [167, 251] [] [167, 269] [] [167, 293] [] [227, 251] [] [227, 269] [] [227, 293] [] [251, 269] [] [251, 293] [] [269, 293] [(2 : 0 : 1), (3 : 3 : 1), (4 : 2 : 1)]
E = EllipticCurve('11197a') p = 3 l = 29 D = -19 tau(E,D,p,l,290)
[89, 107] [] [89, 173] [] [89, 257] [] [89, 281] [] [107, 173] [] [107, 257] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [107, 281] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [173, 257] [] [173, 281] [] [257, 281] []
E = EllipticCurve('11197a') p = 3 l = 29 D = -43 tau(E,D,p,l,290)
[89, 137] [] [89, 257] [] [89, 263] [(0 : 28 : 1), (11 : 1 : 1), (28 : 2 : 1)] [137, 257] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [137, 263] [] [257, 263] []
E = EllipticCurve('11197a') p = 3 l = 29 D = -163 tau(E,D,p,l,290)
[89, 107] [] [89, 137] [] [89, 239] [] [89, 257] [] [107, 137] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [107, 239] [] [107, 257] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [137, 239] [] [137, 257] [(1 : 15 : 1), (2 : 9 : 1), (8 : 4 : 1)] [239, 257] []
E = EllipticCurve('11197a') p = 7 l = 13 D = -7 tau(E,D,p,l,400)
[139, 251] [] [139, 349] [] [251, 349] []