{{{id=27| E = EllipticCurve(F,[1,2,3,4,5], allow_singular = True); ainvsE = [E.a1(),E.a2(),E.a3(),E.a4(),E.a6()]; singular_point(ainvsE) /// [(4 : 2 : 1)] }}} {{{id=43| preparse("P. = ProjectiveSpace(2,F) ") /// "P = ProjectiveSpace(Integer(2),F, names=('x', 'y', 'z',)); (x, y, z,) = P._first_ngens(3)" }}} {{{id=16| F=GF(11); a=F(1); b=F(2); c=F(3); d=F(4); e=F(5); ainvs=[a,b,c,d,e]; singular_point(ainvs) /// [(4 : 2 : 1)] }}} {{{id=44| preparse("x,y,z = var('x,y,z')") /// "x,y,z = var('x,y,z')" }}} {{{id=14| %python def singular_point(ainvs): x,y,z = var('x,y,z') L = [] a1 = ainvs[0] a2 = ainvs[1] a3 = ainvs[2] a4 = ainvs[3] a6 = ainvs[4] k =a1.base_ring() p = k.characteristic() Ex = a1*y*z - 3*x**2 - 2*a2*x*z - a4*z**2 Ey = 2*y*z + a1*x*z + a3*z**2 Ez = y**2 + a1*x*y + 2*a3*y*z - a2*x**2 - 2*a4*x*z - 3*a6*z**2 Eeqn = y**2*z + a1*x*y*z + a3*y*z**2 - x**3 - a2*x**2*z - a4*x*z**2 - a6*z**3 if p == 0: P = ProjectiveSpace(Integer(2),QQ, names=('x0', 'x1', 'x2',)) (x0, x1,x2,) = P._first_ngens(3) S1 = solve([Ex ==0, Ey==0, Ez==0, Eeqn == 0, z-1 == 0 ],x,y,z) S2 = solve([Ex==0, Ey==0, Ez==0, Eeqn == 0, z==0, y==1],x,y,z) if len(S1) != 0: x0 = S[0][0] x1 = S[0][1] x0 = x0.lhs() - x0.rhs() x0 = K(x0.coefficient(0)) x1 = x1.lhs()-x1.rhs() x1 = K(x1.coefficient(0)) pnt = P(x0,x1,1) L=L.append(P) if len(S2) != 0: pnt = P(0,1,0) L=L.append(L) if p != 0: P = ProjectiveSpace(Integer(2),F, names=('x', 'y', 'z',)) (x, y, z,) =P._first_ngens(3) A1=P.subscheme([a1*y*z - 3*x**2 - 2*a2*x*z - a4*z**2]) A2=P.subscheme([2*y*z + a1*x*z + a3*z**2]) A3=P.subscheme([y**2 + a1*x*y + 2*a3*y*z - a2*x**2 - 2*a4*x*z - 3*a6*z**2]) A4=P.subscheme([y**2*z + a1*x*y*z + a3*y*z**2 - x**3 - a2*x**2*z - a4*x*z**2 - a6*z**3]) A12 = A1.intersection(A2) A123 = A12.intersection(A3) A1234 = A123.intersection(A4) L=A1234.rational_points() return L /// }}} {{{id=45| E = EllipticCurve(GF(11),[1,2,3,4,5], allow_singular=True); ainvs=[E.a1(),E.a2(),E.a3(),E.a4(),E.a6()] singular_point(ainvs) /// [(4 : 2 : 1)] }}} {{{id=15| def linear_translate(self): E = self.curve() K = E.base_ring() a1 = K(E.a1()) a2 = E.a2() a3 = E.a3() a4 = E.a4() a6 = E.a6() a = K(self[0]) b = K(self[1]) ET = EllipticCurve(K,[a1,-3*a+a2,-2*b-a1*a+a3,a1*b+3*a-2*a*a2+a4,-b^2-a*b+a3*b-a^3+a*a2-a*a4+a6], allow_singular = True) return ET /// }}} {{{id=11| E=EllipticCurve([0,0,0,0,1], allow_singular = True); E; P=E(0,1); F=linear_translate(P); E.plot(); F.plot() /// Elliptic Curve defined by y^2 = x^3 + 1 over Rational Field }}} {{{id=7| def Tate(self): vpd = self.discriminant().valuation() K = self.base_ring() k = K.residue_field() #p = k.characteristic() if vpd == 0: return [vpd, 1, 0, 'I0', 1], self # change coordinates so that p|a3,a4,a6 else: ainvs = [k(self.a1()), k(self.a2()), k(self.a3()), k(self.a4()), k(self.a6())] S = singular_point(ainvs) P = self(S[0][0],S[0][1]) self = linear_translate(P) b2=E.b2() if b2.valuation() == 0: vpd = self.discriminant().valuation() R. = k[] f = T^2+ k(self.a1())*T-k(self.a2()) if not f.is_irreducible(): c=vpd #split multiplicative return [vpd, vpd, 1, "In where n=", c],"split multiplicative" if f.is_irreducible() and is_odd(vpd): c=1 return [vpd, vpd, 1, "In where n=", c], "non-split multiplicative" if f.is_irreducible() and is_even(vpd) or vpd == +Infinity: c=2 return [vpd, vpd, 1, "In where n=", c],"non-split multiplicative" #from now on additive reduction if b2.valuation() != 0 and self.a6().valuation() <2: return [vpd, 1, vpd, "Type II", 1] if self.a6().valuation >= 2 and self.b8().valuation() < 3: return [vpd, 2, vpd-1, "Type III", 2] if self.b8().valuation() >= 3 and self.b6().valuation() < 3: a31= k(1/p * self.a3()) a62= k(1/p^2 * self.a6()) R. = k[] f = T^2 + a31*T - a62 if f.is_irreducible(): c=1 return [vpd, 3, vpd-2,"Type IV", c] if not f.is_irreducible(): c=3 return [vpd,3,vpd-2,"Type IV", c] if self.b6().valuation >=3: #another change of coordinates.. we are in stp6 S. = k[] f = T^2+self.a1()*T-self.a2() alpha = f.roots()[0][0] a31= k(1/p * self.a3()) a62= k(1/p^2 * self.a6()) g = T^2 + a31*T-a62 beta = f.roots()[0][0] #just to check lets print f and g print f print g h = self.defining_polynomial() R. = K[] newy = y + alpha*x + beta * p #change of coordinates so that p|a1,a2, p^2|a3,a4, p^3|a6 newh = h(x,newy, z) a1 = newh.coefficient({x:1, y:1, z:1}) a2 = newh.coefficient({x:2, y:0, z:1}) a3 = newh.coefficient({x:0, y:1, z:2}) a4 = newh.coefficient({x:1, y:0, z:2}) a6 = newh.coefficient({x:0, y:0, z:3}) a21 = k(a2 * 1/p) a42 = k(a4 * 1/p^2) a63 = k(a6 * 1/p^3) P = T^3 + a21*T^2 + a42*T + a63 #this needs to be factored over the alg closure of k /// Traceback (most recent call last): return [vpd, 1, 0, 'I0', 1], self File "", line 1, in File "/tmp/tmpb6KSkZ/___code___.py", line 50 ^ IndentationError: expected an indented block }}} {{{id=47| E = EllipticCurve(pAdicField(5),[1,2,3,4,1]); S. = pAdicField(5)[] h = E.defining_polynomial() newh = h(5*x,y+25*x,z) a1 = newh.coefficient({x:1, y:1, z:1}) a2 = newh.coefficient({x:2, y:0, z:1}) a3 = newh.coefficient({x:0, y:1, z:2}) a4 = newh.coefficient({x:1, y:0, z:2}) a6 = newh.coefficient({x:0, y:0, z:3}) p=5 k = GF(5) a21 = k(a2 * 1/p) a42 = k(a4 * 1/p^2) a63 = k(a6 * 1/p^3) /// Traceback (most recent call last): a1 = newh.coefficient({x:1, y:1, z:1}) File "", line 1, in File "/tmp/tmpnGreK6/___code___.py", line 16, in a21 = k(a2 * _sage_const_1 /p) File "parent.pyx", line 915, in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6820) File "coerce_maps.pyx", line 82, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3254) File "coerce_maps.pyx", line 77, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3157) File "/sagenb/sage_install/sage-4.7/local/lib/python2.6/site-packages/sage/rings/finite_rings/integer_mod_ring.py", line 822, in _element_constructor_ return integer_mod.IntegerMod(self, x) File "integer_mod.pyx", line 169, in sage.rings.finite_rings.integer_mod.IntegerMod (sage/rings/finite_rings/integer_mod.c:3101) File "integer_mod.pyx", line 1971, in sage.rings.finite_rings.integer_mod.IntegerMod_int.__init__ (sage/rings/finite_rings/integer_mod.c:17335) File "parent.pyx", line 915, in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6820) File "coerce_maps.pyx", line 156, in sage.structure.coerce_maps.NamedConvertMap._call_ (sage/structure/coerce_maps.c:4221) File "multi_polynomial.pyx", line 150, in sage.rings.polynomial.multi_polynomial.MPolynomial._integer_ (sage/rings/polynomial/multi_polynomial.c:2979) File "integer.pyx", line 640, in sage.rings.integer.Integer.__init__ (sage/rings/integer.c:7212) TypeError: unable to convert x (=3*5 + 5^3 + O(5^21)) to an integer }}} {{{id=49| FF = GF(5).algebraic_closure() /// Traceback (most recent call last): File "", line 1, in File "_sage_input_19.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("RkYgPSBHRig1KS5hbGdlYnJhaWNfY2xvc3VyZSgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpQvCwkz/___code___.py", line 3, in exec compile(u'FF = GF(_sage_const_5 ).algebraic_closure()' + '\n', '', 'single') File "", line 1, in File "finite_field_base.pyx", line 733, in sage.rings.finite_rings.finite_field_base.FiniteField.algebraic_closure (sage/rings/finite_rings/finite_field_base.c:5373) NotImplementedError: Algebraic closures of finite fields not implemented. }}} {{{id=35| E = EllipticCurve(pAdicField(11), [0,0,0,1,0], allow_singular=True); E.b6() /// 0 }}} {{{id=36| Tate(E) /// ([0, 1, 0, 'I0', 1], Elliptic Curve defined by y^2 = x^3 + (1+O(11^20))*x over 11-adic Field with capped relative precision 20) }}} {{{id=37| E = EllipticCurve(QQ,[0,0,0,1,0]); E.local_data(11) /// Local data at Principal ideal (11) of Integer Ring: Reduction type: good Local minimal model: Elliptic Curve defined by y^2 = x^3 + x over Rational Field Minimal discriminant valuation: 0 Conductor exponent: 0 Kodaira Symbol: I0 Tamagawa Number: 1 }}} {{{id=42| /// }}}