Changeset 12827:5e7aa739cec0
- Timestamp:
- 08/11/09 00:30:36 (4 years ago)
- Branch:
- default
- Location:
- sage/schemes
- Files:
-
- 30 edited
-
all.py (modified) (1 diff)
-
elliptic_curves/ell_curve_isogeny.py (modified) (23 diffs)
-
elliptic_curves/ell_egros.py (modified) (4 diffs)
-
elliptic_curves/ell_field.py (modified) (4 diffs)
-
elliptic_curves/ell_generic.py (modified) (2 diffs)
-
elliptic_curves/ell_modular_symbols.py (modified) (1 diff)
-
elliptic_curves/ell_rational_field.py (modified) (11 diffs)
-
elliptic_curves/ell_tate_curve.py (modified) (1 diff)
-
elliptic_curves/ell_torsion.py (modified) (1 diff)
-
elliptic_curves/gp_cremona.py (modified) (4 diffs)
-
elliptic_curves/gp_simon.py (modified) (1 diff)
-
elliptic_curves/lseries_ell.py (modified) (3 diffs)
-
elliptic_curves/mod5family.py (modified) (1 diff)
-
elliptic_curves/monsky_washnitzer.py (modified) (5 diffs)
-
elliptic_curves/padic_height.py (modified) (3 diffs)
-
elliptic_curves/padic_lseries.py (modified) (5 diffs)
-
elliptic_curves/padics.py (modified) (14 diffs)
-
elliptic_curves/period_lattice.py (modified) (3 diffs)
-
elliptic_curves/sea.py (modified) (1 diff)
-
elliptic_curves/sha_tate.py (modified) (3 diffs)
-
elliptic_curves/weierstrass_morphism.py (modified) (5 diffs)
-
generic/algebraic_scheme.py (modified) (1 diff)
-
generic/glue.py (modified) (1 diff)
-
generic/projective_space.py (modified) (1 diff)
-
hyperelliptic_curves/hypellfrob.pyx (modified) (2 diffs)
-
hyperelliptic_curves/hyperelliptic_finite_field.py (modified) (2 diffs)
-
hyperelliptic_curves/hyperelliptic_padic_field.py (modified) (2 diffs)
-
plane_curves/affine_curve.py (modified) (1 diff)
-
plane_curves/all.py (modified) (1 diff)
-
plane_curves/projective_curve.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/schemes/all.py
r4851 r12827 1 1 """nodoctest 2 all.py -- export of schemes to S AGE2 all.py -- export of schemes to Sage 3 3 """ 4 4 5 5 #***************************************************************************** 6 6 # 7 # S AGE: System for Algebra and Geometry Experimentation7 # Sage: System for Algebra and Geometry Experimentation 8 8 # 9 9 # Copyright (C) 2005 William Stein <wstein@gmail.com> -
sage/schemes/elliptic_curves/ell_curve_isogeny.py
r12448 r12827 95 95 OUTPUT: 96 96 97 (elliptic curve) the codomain of the sep erable normalized isogeny from this kernel97 (elliptic curve) the codomain of the separable normalized isogeny from this kernel 98 98 99 99 EXAMPLES:: … … 678 678 # 679 679 680 # we keep track of the 2 torsion and non2torsion sep erately680 # we keep track of the 2 torsion and non2torsion separately 681 681 __kernel_2tor = None 682 682 __kernel_non2tor = None … … 710 710 If initiating from a domain/codomain, this must be set to None. 711 711 - ``codomain`` - an elliptic curve (default:None). If ``kernel`` is None, 712 then this must be the codomain of a sep erable normalized isogeny,712 then this must be the codomain of a separable normalized isogeny, 713 713 furthermore, ``degree`` must be the degree of the isogeny from ``E`` to ``codomain``. 714 714 If ``kernel`` is not None, then this must be isomorphic to the codomain of the 715 normalized sep erable isogeny defined by ``kernel``,715 normalized separable isogeny defined by ``kernel``, 716 716 in this case, the isogeny is post composed with an isomorphism so that this parameter is the codomain. 717 717 - ``degree`` - an integer (default:None). 718 718 If ``kernel`` is None, then this is the degree of the isogeny from ``E`` to ``codomain``. 719 If ``kernel`` is not None, then this is used to determine w ether or not to skip a gcd719 If ``kernel`` is not None, then this is used to determine whether or not to skip a gcd 720 720 of the kernel polynomial with the two torsion polynomial of ``E``. 721 - ``model`` - a string (defaul :None). Only supported variable is "minimal", in which case if721 - ``model`` - a string (default:None). Only supported variable is "minimal", in which case if 722 722 ``E`` is a curve over the rationals, then the codomain is set to be the unique global minimum model. 723 723 - ``algorithm`` - a string (default:None). If this parameter is None, then the algorithm is determined from the input. … … 840 840 if (E1 != E_P): 841 841 if (E1.a_invariants() != E_P.a_invariants()) : 842 raise ValueError, "P must be on a curve with same weierstrass model as the domain curve of this isogeny."842 raise ValueError, "P must be on a curve with same Weierstrass model as the domain curve of this isogeny." 843 843 change_output_ring = True 844 844 … … 1314 1314 self.__pre_isomorphism = isomorphism 1315 1315 1316 # calcul uate the isomorphism as a rational map.1316 # calculate the isomorphism as a rational map. 1317 1317 1318 1318 (u, r, s, t) = isomorphism.tuple() … … 1362 1362 self.__post_isomorphism = isomorphism 1363 1363 1364 # calcul uate the isomorphism as a rational map.1364 # calculate the isomorphism as a rational map. 1365 1365 1366 1366 (u, r, s, t) = isomorphism.tuple() … … 1775 1775 1776 1776 ################################### 1777 # Kohel's Variant of Velu's For umla1777 # Kohel's Variant of Velu's Formula 1778 1778 ################################### 1779 1779 … … 1866 1866 EXAMPLES: 1867 1867 1868 These examples inherentl exercise this private function::1868 These examples inherently exercise this private function:: 1869 1869 1870 1870 sage: R.<x> = GF(7)[] … … 2221 2221 def __compute_via_kohel(self, xP, yP): 2222 2222 r""" 2223 Private function that applies Kohel's fo mulas.2223 Private function that applies Kohel's formulas. 2224 2224 2225 2225 EXAMPLES: … … 2571 2571 True 2572 2572 2573 Example over a number field::2573 Example over a number field:: 2574 2574 2575 2575 sage: R.<x> = QQ[] … … 2854 2854 # or if it is a just a translation. 2855 2855 # NOTE: This only works because we are using algorithms for calculating the isogenies that calculate 2856 # a sep erable normalized isogeny, if this changes, this check will no longer be correct.2856 # a separable normalized isogeny, if this changes, this check will no longer be correct. 2857 2857 # 2858 2858 if (check_prepost_isomorphism): … … 3115 3115 Traceback (most recent call last): 3116 3116 ... 3117 NotImplementedError: Numerical approximations do not make sense for Elliptic Curve Isoge ies3118 3119 """ 3120 raise NotImplementedError, "Numerical approximations do not make sense for Elliptic Curve Isoge ies"3117 NotImplementedError: Numerical approximations do not make sense for Elliptic Curve Isogenies 3118 3119 """ 3120 raise NotImplementedError, "Numerical approximations do not make sense for Elliptic Curve Isogenies" 3121 3121 3122 3122 … … 3461 3461 ALGORITHM: 3462 3462 3463 algorithm "fast" uses newton iteration and has complexity O(M(n)), algorithm "quadratic" has comp exity O(n*M(n))3463 algorithm "fast" uses newton iteration and has complexity O(M(n)), algorithm "quadratic" has complexity O(n*M(n)) 3464 3464 3465 3465 EXAMPLES:: … … 3479 3479 trunc_exp = truncated_exp_fast(f, n) 3480 3480 else: 3481 raise ValueError, "Unknown algorithm for computing truncated expo ential."3481 raise ValueError, "Unknown algorithm for computing truncated exponential." 3482 3482 3483 3483 return trunc_exp … … 3537 3537 3538 3538 - ``poly_ring`` - polynomial ring, to compute the `\wp` function in (assumes that the generator is `z^2` for efficiency of storage/operations.) 3539 - ``A`` - field element corresponding to the `x` coefficient in the weierstrass equa ation of an elliptic curve3540 - ``B`` - field element corresponding to the constant coefficient in the weierstrass equation of an elli tpic curve3539 - ``A`` - field element corresponding to the `x` coefficient in the weierstrass equation of an elliptic curve 3540 - ``B`` - field element corresponding to the constant coefficient in the weierstrass equation of an elliptic curve 3541 3541 - ``ell`` - degree of `z` to compute the truncated function to. If `p` is the characteristic of the underlying field. If `p > 0` then we must have `2\ell + 3 < p`. 3542 3542 … … 3595 3595 3596 3596 - ``poly_ring`` - polynomial ring, to compute the function in (assumes that the generator is `z^2` for efficiency of storage/operations.) 3597 - ``A`` - field element corresponding to the `x` coefficient in the weierstrass equa ation of an elliptic curve3598 - ``B`` - field element corresponding to the constant coefficient in the weierstrass equation of an elli tpic curve3597 - ``A`` - field element corresponding to the `x` coefficient in the weierstrass equation of an elliptic curve 3598 - ``B`` - field element corresponding to the constant coefficient in the weierstrass equation of an elliptic curve 3599 3599 - ``ell`` - degree of `z` to compute the truncated function to. If `p` is the characteristic of the underlying field and `p > 0`, then we must have `2\ell + 3 < p`. 3600 3600 … … 3808 3808 r""" 3809 3809 Computes the degree ``ell`` isogeny between ``E1`` and ``E2`` via 3810 Stark's algorithm. There must be a degree ``ell``, sep erable,3810 Stark's algorithm. There must be a degree ``ell``, separable, 3811 3811 normalized isogeny from ``E1`` to ``E2``. 3812 3812 … … 3953 3953 Given a full kernel polynomial (where two torsion `x`-coordinates 3954 3954 are roots of multiplicity 1, and all other roots have multiplicity 3955 2.) of degree `\ell-1`, returns the maximum sep erable divisor.3955 2.) of degree `\ell-1`, returns the maximum separable divisor. 3956 3956 (i.e. the kernel polynomial with roots of multiplicity at most 1). 3957 3957 … … 3991 3991 Computes the degree ``ell`` isogeny between ``E1`` and ``E2``. 3992 3992 3993 There must be a degree ``ell``, sep erable, normalized isogeny from3993 There must be a degree ``ell``, separable, normalized isogeny from 3994 3994 ``E1`` to ``E2``. If no algorithm is specified, this function 3995 3995 determines the best algorithm to use. … … 4004 4004 4005 4005 - ``algorithm`` - string (default:"starks") if None, this function automatically determines best algorithm to use. 4006 Otherwise uses the algorithm specified by the string. Valid valu seare "starks" or "fastElkies"4006 Otherwise uses the algorithm specified by the string. Valid values are "starks" or "fastElkies" 4007 4007 4008 4008 OUTPUT: … … 4047 4047 # 4048 4048 # Everything that follows here is how we get the kernel polynomial in the form we want 4049 # i.e. a sep erable polynomial (no repeated roots.)4049 # i.e. a separable polynomial (no repeated roots.) 4050 4050 # 4051 4051 ker_poly = split_kernel_polynomial(E1, ker_poly, ell) … … 4140 4140 intermediate_domain = pre_isom.codomain().codomain() 4141 4141 4142 # compute the r,s,t valu sethat clear the denominator of E24142 # compute the r,s,t values that clear the denominator of E2 4143 4143 a1pr = E2.a1() 4144 4144 a2pr = E2.a2() … … 4159 4159 def compute_sequence_of_maps(E1, E2, ell): 4160 4160 r""" 4161 Given domain ``E1`` and codomain ``E2`` such that there is a degree ``ell`` sep erable normalized isogeny from ``E1`` to ``E2``, returns pre/post isomorphism, as well as intermediate domain and codomain, and kernel polynomial.4161 Given domain ``E1`` and codomain ``E2`` such that there is a degree ``ell`` separable normalized isogeny from ``E1`` to ``E2``, returns pre/post isomorphism, as well as intermediate domain and codomain, and kernel polynomial. 4162 4162 4163 4163 EXAMPLES:: -
sage/schemes/elliptic_curves/ell_egros.py
r12728 r12827 30 30 Using the "proof=False" flag suppresses these warnings. 31 31 32 EXAMPLES: We find all elliptic c ruves with good reduction outside 2,32 EXAMPLES: We find all elliptic curves with good reduction outside 2, 33 33 listing the label of each: 34 34 … … 62 62 printed without proof=False (unless the optional database is 63 63 installed: two of the auxiliary curves whose Mordell-Weil bases are 64 required have conductors 13068 and 52272 so are in the datab se):64 required have conductors 13068 and 52272 so are in the database): 65 65 66 66 sage: [e.label() for e in EllipticCurves_with_good_reduction_outside_S([11], proof=False)] … … 307 307 is undefined if S is not a list or contains non-primes. 308 308 309 OU PUT:309 OUTPUT: 310 310 311 311 A sorted list of all elliptic curves defined over `Q` with … … 413 413 E = EllipticCurve([0,0,0,0,a6]) 414 414 # This curve may not be minimal at 2 or 3, but the 415 # S-integral_points function requires minimali lty at primes in415 # S-integral_points function requires minimality at primes in 416 416 # S, so we find a new model which is p-minimal at both 2 and 3 417 417 # if they are in S. Note that the isomorphism between models -
sage/schemes/elliptic_curves/ell_field.py
r12740 r12827 67 67 the curve returned is the unique curve (up to isomorphism) 68 68 defined over `F` isomorphic to the original curve over the 69 quadratic extension of `F` but not over `F` itself. Over infin te69 quadratic extension of `F` but not over `F` itself. Over infinite 70 70 fields, an error is raised if `D` is not given. 71 71 … … 555 555 If initiating from a domain/codomain, this must be set to None. 556 556 - ``codomain`` - an elliptic curve (default:None). If ``kernel`` is None, 557 then this must be the codomain of a sep erable normalized isogeny,557 then this must be the codomain of a separable normalized isogeny, 558 558 furthermore, ``degree`` must be the degree of the isogeny from self to ``codomain``. 559 559 If ``kernel`` is not None, then this must be isomorphic to the codomain of the 560 normalized sep erable isogeny defined by ``kernel``,560 normalized separable isogeny defined by ``kernel``, 561 561 in this case, the isogeny is post composed with an isomorphism so that this parameter is the codomain. 562 562 - ``degree`` - an integer (default:None). 563 563 If ``kernel`` is None, then this is the degree of the isogeny from self to ``codomain``. 564 If ``kernel`` is not None, then this is used to determine w ether or not to skip a gcd564 If ``kernel`` is not None, then this is used to determine whether or not to skip a GCD 565 565 of the kernel polynomial with the two torsion polynomial of self. 566 - ``model`` - a string (defaul :None). Only supported variable is "minimal", in which case if566 - ``model`` - a string (default:None). Only supported variable is "minimal", in which case if 567 567 self is a curve over the rationals, then the codomain is set to be the unique global minimum model. 568 568 - ``algorithm`` - a string (default:None). If this parameter is None, then the algorithm is determined from the input. … … 590 590 def isogeny_codomain(self, kernel, degree=None, algorithm=None): 591 591 r""" 592 Returns the codomain of the isogeny from self with giv ien kernel.592 Returns the codomain of the isogeny from self with given kernel. 593 593 This redirects to the isogeny_codomain_from_kernel function, 594 594 see that function for more information. … … 604 604 OUTPUT: 605 605 606 (elliptic curve) the codomain of the sep erable normalized isogeny from this kernel606 (elliptic curve) the codomain of the separable normalized isogeny from this kernel 607 607 608 608 -
sage/schemes/elliptic_curves/ell_generic.py
r12287 r12827 2120 2120 return (x, -y-a1*x-a3) 2121 2121 2122 # the x-coord onate does not depend on the sign of m. The work2122 # the x-coordinate does not depend on the sign of m. The work 2123 2123 # here is done by functions defined earlier: 2124 2124 … … 2261 2261 Via: (u,r,s,t) = (1, 0, 0, 0)] 2262 2262 2263 We can also find is tomorphisms defined over extension fields::2263 We can also find isomorphisms defined over extension fields:: 2264 2264 2265 2265 sage: E=EllipticCurve(GF(7),[0,0,0,1,1]) -
sage/schemes/elliptic_curves/ell_modular_symbols.py
r12287 r12827 202 202 it with respect to the approximation of the L-value. It is known that 203 203 the quotient is a rational number with small denominator. 204 Otherwise we try to scale using qua rdatic twists.204 Otherwise we try to scale using quadratic twists. 205 205 206 206 ``_scaling`` will be set to a rational non-zero multiple if we succeed and to 1 otherwise. -
sage/schemes/elliptic_curves/ell_rational_field.py
r12736 r12827 137 137 EXAMPLES: 138 138 139 Construction from Weierstrass coeffi ecients (`a`-invariants), long form::139 Construction from Weierstrass coefficients (`a`-invariants), long form:: 140 140 141 141 sage: E = EllipticCurve([1,2,3,4,5]); E 142 142 Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field 143 143 144 Construction from Weierstrass coeffi ecients (`a`-invariants),144 Construction from Weierstrass coefficients (`a`-invariants), 145 145 short form (sets `a_1=a_2=a_3=0`):: 146 146 … … 1003 1003 # 1004 1004 # E <--> [0, 1, 1, -2, 0] 389A 1005 # E = EllipticCurve([0, 1, 1, -2, 0]); // S AGEor MAGMA1005 # E = EllipticCurve([0, 1, 1, -2, 0]); // Sage or MAGMA 1006 1006 # e = E.pari_mincurve() 1007 1007 # f = ellinit([0,1,1,-2,0]); … … 1046 1046 OUTPUT: 1047 1047 1048 a power series (in th evariable 'q')1048 a power series (in the variable 'q') 1049 1049 1050 1050 .. note:: … … 3117 3117 so). Probably it could just round at some point. For rigour, you 3118 3118 would need to bound the tail by assuming (essentially) that all the 3119 `a_n` are as large as possible, but in practi se they3119 `a_n` are as large as possible, but in practice they 3120 3120 exhibit significant (square root) cancellation. One difficulty is 3121 3121 that it doesn't do the sum in 1-2-3-4 order; it uses … … 3958 3958 3959 3959 This plots helps you see that the above Manin constants are 3960 right. Note that the vertex labels are 0-based unli nke the3960 right. Note that the vertex labels are 0-based unlike the 3961 3961 Cremona isogeny labels:: 3962 3962 … … 5041 5041 5042 5042 We explicitly verify in the above example that indeed that 5043 index is divisibl yby 2 by writing down a generator of5043 index is divisible by 2 by writing down a generator of 5044 5044 E(QQ)/tor + E^D(QQ)/tor that is divisible by 2 in E(K):: 5045 5045 … … 5249 5249 5250 5250 # - The regulator. 5251 # First we compute the regu altor of the subgroup E(QQ) + E^D(QQ)5251 # First we compute the regulator of the subgroup E(QQ) + E^D(QQ) 5252 5252 # of E(K). The factor of 2 in the regulator 5253 5253 # accounts for the fact that the height over K is twice the … … 5334 5334 def _heegner_best_tau(self, D, prec=None): 5335 5335 """ 5336 Given a discrim anent `D`, find the Heegner point `\tau` in the5336 Given a discriminant `D`, find the Heegner point `\tau` in the 5337 5337 upper half plane with largest imaginary part (which is optimal 5338 5338 for evaluating the modular parametrization). If the optional … … 5361 5361 it is computed with ``prec`` bits of working precision, otherwise it 5362 5362 attempts to recognize it exactly over the Hilbert class field of `K`. 5363 In this latter case, the answer is *not* prov eably correct but a5364 strong consist ancy check is made.5363 In this latter case, the answer is *not* provably correct but a 5364 strong consistency check is made. 5365 5365 5366 5366 INPUT:: … … 5744 5744 [-3, -2, -1, 0, 1, 2, 3, 4, 8, 11, 14, 21, 37, 52, 93] 5745 5745 5746 TODO: re implement this using the much faster point searching5746 TODO: re-implement this using the much faster point searching 5747 5747 implemented in Stoll's ``ratpoints`` program. 5748 5748 … … 6552 6552 c4, c6 = E.c_invariants() 6553 6553 disc = E.discriminant() 6554 #internal function is doing only a comparis ion of E and E.short_weierstass_model() so the following is easier6554 #internal function is doing only a comparison of E and E.short_weierstass_model() so the following is easier 6555 6555 if a1 == a2 == a3 == 0: 6556 6556 is_short = True -
sage/schemes/elliptic_curves/ell_tate_curve.py
r12102 r12827 28 28 - William Stein (2007-05-29): added some examples; editing. 29 29 30 - chris wuthrich (04/09): reformat ed docstrings.30 - chris wuthrich (04/09): reformatted docstrings. 31 31 32 32 """ -
sage/schemes/elliptic_curves/ell_torsion.py
r12224 r12827 117 117 AUTHORS: 118 118 119 - Nick Alexa mder - initial implementation over `\QQ`.119 - Nick Alexander - initial implementation over `\QQ`. 120 120 - Chris Wuthrich - initial implementation over number fields. 121 121 - John Cremona - additional features and unification. -
sage/schemes/elliptic_curves/gp_cremona.py
r11376 r12827 2 2 Cremona PARI Scripts 3 3 4 Access to Cremona's PARI scripts via S AGE.4 Access to Cremona's PARI scripts via Sage. 5 5 """ 6 6 … … 46 46 47 47 INPUT: 48 e -- five-tuple of integers that define a minimal weierstrass equation48 e -- five-tuple of integers that define a minimal Weierstrass equation 49 49 OUTPUT: 50 50 integer -- the ("computed") analytic rank r of E … … 82 82 83 83 INPUT: 84 e -- five-tuple of integers that define a minimal weierstrass equation84 e -- five-tuple of integers that define a minimal Weierstrass equation 85 85 86 86 OUTPUT: … … 118 118 NOTE: This is an internal function used in the function 119 119 _abelian_group_data() for curves over finite (prime) field. Users 120 should instead use higher-level fun tions -- see examples.120 should instead use higher-level functions -- see examples. 121 121 122 122 WARNING: The algorithm uses random points, so the generators in -
sage/schemes/elliptic_curves/gp_simon.py
r11837 r12827 100 100 s = gp.eval('ans=%s;'%cmd) 101 101 if s.find("###") != -1: 102 raise RuntimeError, "%s\nAn error occur ed while running Simon's 2-descent program"%s102 raise RuntimeError, "%s\nAn error occurred while running Simon's 2-descent program"%s 103 103 if verbose > 0: 104 104 print s -
sage/schemes/elliptic_curves/lseries_ell.py
r12287 r12827 95 95 \note{If algorithm='magma', then the precision is in digits rather 96 96 than bits and the object returned is a Magma L-series, which has 97 different functionality from the S AGEL-series.}97 different functionality from the Sage L-series.} 98 98 99 99 EXAMPLES: … … 363 363 float -- L(E,1) 364 364 float -- a bound on the error in the approximation; this 365 is a prov eably correct upper bound on the sum365 is a provably correct upper bound on the sum 366 366 of the tail end of the series used to compute L(E,1). 367 367 … … 401 401 k = int(k) 402 402 if k == 0: k = int(ceil(sqrtN)) 403 an = self.__E.anlist(k) # list of S AGEints403 an = self.__E.anlist(k) # list of Sage ints 404 404 # Compute z = e^(-2pi/sqrt(N)) 405 405 pi = 3.14159265358979323846 -
sage/schemes/elliptic_curves/mod5family.py
r576 r12827 10 10 AUTHORS: 11 11 -- Alice Silverberg and Karl Rubin (original PARI/GP version) 12 -- William Stein -- S AGEversion.12 -- William Stein -- Sage version. 13 13 """ 14 14 J = 4*a**3 / (4*a**3+27*b**2) -
sage/schemes/elliptic_curves/monsky_washnitzer.py
r12365 r12827 271 271 272 272 273 - ``p0, p1, p2`` - coefficients; must be coerc able273 - ``p0, p1, p2`` - coefficients; must be coercible 274 274 into poly_ring() 275 275 … … 334 334 - ``parent`` - a SpecialCubicQuotientRing 335 335 336 - ``p0, p1, p2`` - coefficients; must be coerc able336 - ``p0, p1, p2`` - coefficients; must be coercible 337 337 into parent.poly_ring() 338 338 … … 616 616 # for certain base rings, e.g. when we compute b*c3 in the 617 617 # final line. They shouldn't be necessary. Need to fix this 618 # somewhere else in S AGE.618 # somewhere else in Sage. 619 619 a = parent._poly_ring(a) 620 620 b = parent._poly_ring(b) … … 1711 1711 # 1712 1712 # I tried to embed must stuff into the rings themselves rather than 1713 # just extract and manipulate lists of coeffic ents. Hence the implementations1713 # just extract and manipulate lists of coefficients. Hence the implementations 1714 1714 # below are much less optimized, so are much slower, but should hopefully be 1715 1715 # easier to follow. (E.g. one can print/make sense of intermediate results.) … … 1757 1757 # this is a hack until pAdics are fast 1758 1758 # (They are in the latest development bundle, but its not standard and I'd need to merge. 1759 # (it will periodically cast into this ring to reduce coeffic ent size)1759 # (it will periodically cast into this ring to reduce coefficient size) 1760 1760 rational_S._prec_cap = p**M 1761 1761 rational_S._p = p -
sage/schemes/elliptic_curves/padic_height.py
r4803 r12827 66 66 """ 67 67 INPUT: 68 E -- five-tuple of integers that define a weierstrass equation68 E -- five-tuple of integers that define a Weierstrass equation 69 69 p -- a prime number 70 70 point -- point on E … … 84 84 85 85 INPUT: 86 E -- five-tuple of integers that define a weierstrass equation86 E -- five-tuple of integers that define a Weierstrass equation 87 87 p -- a prime number 88 88 points -- list of points on E … … 99 99 """ 100 100 INPUT: 101 E -- five-tuple of integers that define a weierstrass equation101 E -- five-tuple of integers that define a Weierstrass equation 102 102 p -- a prime number 103 103 prec -- precision parameter -
sage/schemes/elliptic_curves/padic_lseries.py
r12287 r12827 258 258 - ``sign`` - +1 (default) or -1 (only implemented without twists) 259 259 260 - ``quadratic_twist`` - a fundamental discriminant of a qua rdratic field or +1 (default)260 - ``quadratic_twist`` - a fundamental discriminant of a quadratic field or +1 (default) 261 261 262 262 EXAMPLES:: … … 675 675 - ``n`` - (default: 2) a positive integer 676 676 - ``quadratic_twist`` - (default: +1) a fundamental discriminant 677 of a qu dratic field, coprime to the677 of a quadratic field, coprime to the 678 678 conductor of the curve 679 679 - ``prec`` - (default: 5) maximal number of terms of the series … … 896 896 - ``n`` - (default: 3) a positive integer 897 897 898 - ``prec`` - (default: 5) maxim anumber of terms of the series898 - ``prec`` - (default: 5) maximum number of terms of the series 899 899 to compute; to compute as many as possible just 900 900 give a very large number for prec; the result will … … 1287 1287 coordinates of the result are independent of the chosen Weierstrass equation. 1288 1288 1289 NOTE: The definition here is corrected with re pect to Perrin-Riou's article [PR]. See1289 NOTE: The definition here is corrected with respect to Perrin-Riou's article [PR]. See 1290 1290 [SW]. 1291 1291 … … 1352 1352 1353 1353 # note the correction here with respect to Perrin-Riou's definition. 1354 # only this way the result will be indep of the choice of v1 and v2.1354 # only this way the result will be independent of the choice of v1 and v2. 1355 1355 reg1 = regv(v1)/Dp_pairing(omega_vec,v1)**(rk-1) 1356 1356 -
sage/schemes/elliptic_curves/padics.py
r12089 r12827 176 176 177 177 TODO: - remove restriction that curve must be in minimal 178 weierstrass form. This is currently required for E.gens().178 Weierstrass form. This is currently required for E.gens(). 179 179 180 180 AUTHORS: … … 223 223 2*5^2 + 2*5^3 + 5^4 + 5^5 + 4*5^6 + 3*5^8 + 4*5^9 + O(5^10) 224 224 225 The result is not dependen don the model for the curve::225 The result is not dependent on the model for the curve:: 226 226 227 227 sage: E = EllipticCurve([0,0,0,0,2^12*17]) … … 282 282 283 283 TODO: - remove restriction that curve must be in minimal 284 weierstrass form. This is currently required for E.gens().284 Weierstrass form. This is currently required for E.gens(). 285 285 286 286 AUTHORS: … … 386 386 EXAMPLES: 387 387 388 37a has trivial tamagawa numbers so all points have nonsingular388 37a has trivial Tamagawa numbers so all points have nonsingular 389 389 reduction at all primes:: 390 390 … … 613 613 0 614 614 615 The result is not dependend on the model for the curve: 615 The result is not dependent on the model for the curve:: 616 616 617 sage: E = EllipticCurve([0,0,0,0,2^12*17]) 617 618 sage: Em = E.minimal_model() … … 969 970 # todo: implement the p == 3 case 970 971 # NOTE: If we ever implement p == 3, it's necessary to check over 971 # the precision loss estimates (below) ve y carefully; I think it972 # the precision loss estimates (below) very carefully; I think it 972 973 # may become necessary to compute E2 to an even higher precision. 973 974 if p < 5: … … 1017 1018 1018 1019 # Convert to a power series and remove the -1/x term. 1019 # Also we artific ally bump up the accuracy from N-2 to to N-1 digits;1020 # Also we artificially bump up the accuracy from N-2 to to N-1 digits; 1020 1021 # the constant term needs to be known to N-1 digits, so we compute 1021 1022 # it directly … … 1156 1157 # todo: implement the p == 3 case 1157 1158 # NOTE: If we ever implement p == 3, it's necessary to check over 1158 # the precision loss estimates (below) ve y carefully; I think it1159 # the precision loss estimates (below) very carefully; I think it 1159 1160 # may become necessary to compute E2 to an even higher precision. 1160 1161 if p < 5: … … 1207 1208 1208 1209 # Convert to a power series and remove the -1/x term. 1209 # Also we artific ally bump up the accuracy from N-2 to N-1+lamb digits;1210 # Also we artificially bump up the accuracy from N-2 to N-1+lamb digits; 1210 1211 # the constant term needs to be known to N-1+lamb digits, so we compute 1211 1212 # it directly … … 1415 1416 # todo: here I should be able to write: 1416 1417 # return E2_of_X / fudge_factor 1417 # However, there is a bug in S AGE(#51 on trac) which makes this1418 # However, there is a bug in Sage (#51 on trac) which makes this 1418 1419 # crash sometimes when prec == 1. For example, 1419 1420 # EllipticCurve([1, 1, 1, 1, 1]).padic_E2(5, 1) … … 1427 1428 See the parameters and documentation for padic_E2. 1428 1429 """ 1429 # TODO change the basis back to the original e uqation.1430 # TODO change the basis back to the original equation. 1430 1431 # TODO, add lots of comments like the above 1431 1432 if check_hypotheses: … … 1456 1457 # When we change coordinates like this, we might scale the invariant 1457 1458 # differential, so we need to account for this. We do this by 1458 # comparing discriminants: if the discrimi mants differ by u^12,1459 # comparing discriminants: if the discriminants differ by u^12, 1459 1460 # then the differentials differ by u. There's a sign ambiguity here, 1460 1461 # but it doesn't matter because E2 changes by u^2 :-) … … 1469 1470 1470 1471 assert X.discriminant().valuation(p) == 0, "Something's gone wrong. " \ 1471 "The discriminant of the weierstrass model should be a unit " \1472 "The discriminant of the Weierstrass model should be a unit " \ 1472 1473 " at p." 1473 1474 … … 1584 1585 for s in misc.newton_method_sizes(N): 1585 1586 # zero-extend to s terms 1586 # todo: there has to be a better way in S AGEto do this...1587 # todo: there has to be a better way in Sage to do this... 1587 1588 G = Rx(G.list(), s) 1588 1589 -
sage/schemes/elliptic_curves/period_lattice.py
r12632 r12827 349 349 350 350 - ``algorithm`` (string, default 'sage') -- choice of 351 implementation (for real ambeddings only) between 'sage'351 implementation (for real embeddings only) between 'sage' 352 352 (native Sage implementation) or 'pari' (use the pari 353 353 library: only available for real embeddings). … … 425 425 426 426 - ``algorithm`` (string, default 'sage') -- choice of 427 implementation (for real ambeddings only) between 'sage'427 implementation (for real embeddings only) between 'sage' 428 428 (native Sage implementation) or 'pari' (use the pari 429 429 library: only available for real embeddings). … … 661 661 662 662 - ``algorithm`` (string, default 'sage') -- choice of 663 implementation (for real ambeddings only) between 'sage'663 implementation (for real embeddings only) between 'sage' 664 664 (native Sage implementation) or 'pari' (use the pari 665 665 library: only available for real embeddings). -
sage/schemes/elliptic_curves/sea.py
r4718 r12827 30 30 E -- list of 5 integers that defines an elliptic curve 31 31 p -- prime number 32 early_abort -- bool (default: Fals t); if True an early abort32 early_abort -- bool (default: False); if True an early abort 33 33 technique is used and the computation is 34 34 interrupted as soon as a small divisor of the -
sage/schemes/elliptic_curves/sha_tate.py
r12611 r12827 161 161 r""" 162 162 Returns the Birch and Swinnerton-Dyer conjectural order of Sha 163 as a provably corre t integer, unless the analytic rank is > 1,163 as a provably correct integer, unless the analytic rank is > 1, 164 164 in which case this function returns a numerical value. 165 165 … … 487 487 shan0 = lstar[0]/bsdp[0] 488 488 else: 489 shan0 = 0 # this should actu lly never happen489 shan0 = 0 # this should actually never happen 490 490 if bsdp[1] != 0: 491 491 shan1 = lstar[1]/bsdp[1] … … 586 586 587 587 TO DO: This should be rewritten, to give the exact order 588 of Sha[2], or if we can not find suffic ently many points588 of Sha[2], or if we can not find sufficiently many points 589 589 it should give a lower bound. 590 590 -
sage/schemes/elliptic_curves/weierstrass_morphism.py
r12048 r12827 83 83 .. note:: 84 84 85 In a list of autom prhisms, there is no guarantee that the85 In a list of automorphisms, there is no guarantee that the 86 86 identity will be first! 87 87 … … 140 140 def __invert__(self): 141 141 r""" 142 Returns the inverse of this isom porphism.142 Returns the inverse of this isomorphism. 143 143 144 144 EXAMPLES:: … … 193 193 representing the `a`-invariants of an elliptic curve `E`, 194 194 returning the `a`-invariants of `w(E)`; or to `P=[x,y]` or 195 `P=[x,y,z]` represe ting a point in `\mathbb{A}^2` or195 `P=[x,y,z]` representing a point in `\mathbb{A}^2` or 196 196 `\mathbb{P}^2`, returning the transformed point. 197 197 … … 386 386 387 387 Given two Elliptic Curves ``E`` and ``F`` (represented by 388 Weierstrass models as u aual), and a transformation ``urst``388 Weierstrass models as usual), and a transformation ``urst`` 389 389 from ``E`` to ``F``, construct an isomorphism from ``E`` to 390 390 ``F``. An exception is raised if ``urst(E)!=F``. At most one … … 565 565 def __mul__(self,other): 566 566 r""" 567 Returns the comp sition of this WeierstrassIsomorphism and the other,567 Returns the composition of this WeierstrassIsomorphism and the other, 568 568 569 569 WeierstrassMorphisms can be composed using ``*`` if the -
sage/schemes/generic/algebraic_scheme.py
r12099 r12827 590 590 scheme. 591 591 592 EXAMPLES: First we construct the union of a doubled and tripl led592 EXAMPLES: First we construct the union of a doubled and tripled 593 593 line in the affine plane over `\QQ`. 594 594 -
sage/schemes/generic/glue.py
r11711 r12827 1 1 """ 2 Scheme obtained by glu eing two other schemes2 Scheme obtained by gluing two other schemes 3 3 """ 4 4 -
sage/schemes/generic/projective_space.py
r12099 r12827 148 148 149 149 Projective spaces are not cached, i.e., there can be several with 150 the same base ring and dimension (to facilitate glu eing150 the same base ring and dimension (to facilitate gluing 151 151 constructions). 152 152 """ -
sage/schemes/hyperelliptic_curves/hypellfrob.pyx
r10627 r12827 87 87 """ 88 88 89 # S AGEobjects that wrap the NTL objects89 # Sage objects that wrap the NTL objects 90 90 cdef ntl_ZZ pp 91 91 cdef ntl_ZZX QQ … … 114 114 115 115 # Note: the C++ code actually resets the size of the matrix, but this seems 116 # to confuse the S AGENTL wrapper. So to be safe I'm setting it ahead of116 # to confuse the Sage NTL wrapper. So to be safe I'm setting it ahead of 117 117 # time. 118 118 mm = ntl_mat_ZZ(2*g, 2*g) -
sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py
r11901 r12827 213 213 points.append(self.point([x, r*b+b, one], check=True)) 214 214 except KeyError: 215 # y^2 + by + c irreduc able, so yields no points215 # y^2 + by + c irreducible, so yields no points 216 216 pass 217 217 else: # b == 0 … … 246 246 quadratic for y. 247 247 248 Caches all square roots ahead of time by sq aring every element of248 Caches all square roots ahead of time by squaring every element of 249 249 the field. Elements must have an __index__ method. 250 250 -
sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py
r12365 r12827 97 97 98 98 Because this lift of frobenius acts as $x \mapsto x^p$, 99 take the Teichmul er lift of $x$ and then find a matching y99 take the Teichmuller lift of $x$ and then find a matching y 100 100 from that. 101 101 … … 251 251 252 252 """ 253 # TODO: implement jacobians and show the relationship directly253 # TODO: implement Jacobians and show the relationship directly 254 254 import sage.schemes.elliptic_curves.monsky_washnitzer as monsky_washnitzer 255 255 K = self.base_ring() -
sage/schemes/plane_curves/affine_curve.py
r11996 r12827 111 111 Return local coordinates to precision n at the given point. 112 112 113 Behaviour is flak ey - some choices of `n` are worst that113 Behaviour is flaky - some choices of `n` are worst that 114 114 others. 115 115 -
sage/schemes/plane_curves/all.py
r12103 r12827 5 5 #***************************************************************************** 6 6 # 7 # S AGE: System for Algebra and Geometry Experimentation7 # Sage: System for Algebra and Geometry Experimentation 8 8 # 9 9 # Copyright (C) 2005 William Stein <was@math.harvard.edu> -
sage/schemes/plane_curves/projective_curve.py
r12103 r12827 121 121 Return local coordinates to precision n at the given point. 122 122 123 Behaviour is flak ey - some choices of `n` are worst that123 Behaviour is flaky - some choices of `n` are worst that 124 124 others. 125 125 … … 298 298 299 299 - ``sort`` - bool (default: True), if True return the 300 point list sorted. If False, returns the point es in the order300 point list sorted. If False, returns the points in the order 301 301 computed by Singular. 302 302 … … 362 362 363 363 - ``sort`` - bool (default: True), if True return the 364 point list sorted. If False, returns the point es in the order364 point list sorted. If False, returns the points in the order 365 365 computed by Singular. 366 366
Note: See TracChangeset
for help on using the changeset viewer.
