code
stringlengths
17
6.64M
def compute_sequence_of_maps(E1, E2, ell): "\n Return intermediate curves, isomorphisms and kernel polynomial.\n\n INPUT:\n\n - ``E1``, ``E2`` -- elliptic curves\n\n - ``ell`` -- a prime such that there is a degree-``ell`` separable\n normalized isogeny from ``E1`` to ``E2``\n\n OUTPUT:\n\n ...
def fill_isogeny_matrix(M): "\n Return a filled isogeny matrix giving all degrees from one giving only prime degrees.\n\n INPUT:\n\n - ``M`` -- a square symmetric matrix whose off-diagonal `i`, `j`\n entry is either a prime `l` if the `i`'th and `j`'th curves\n have an `l`-isogeny between them,...
def unfill_isogeny_matrix(M): '\n Reverses the action of ``fill_isogeny_matrix``.\n\n INPUT:\n\n - ``M`` -- a square symmetric matrix of integers\n\n OUTPUT:\n\n (matrix) A square symmetric matrix obtained from ``M`` by\n replacing non-prime entries with `0`.\n\n EXAMPLES::\n\n sage: M...
def is_possible_j(j, S=[]): '\n Tests if the rational `j` is a possible `j`-invariant of an\n elliptic curve with good reduction outside `S`.\n\n .. NOTE::\n\n The condition used is necessary but not sufficient unless S\n contains both 2 and 3.\n\n EXAMPLES::\n\n sage: from sage.s...
def curve_key(E1): '\n Comparison key for elliptic curves over `\\QQ`.\n\n The key is a tuple:\n\n - if the curve is in the database: (conductor, 0, label, number)\n\n - otherwise: (conductor, 1, a_invariants)\n\n EXAMPLES::\n\n sage: from sage.schemes.elliptic_curves.ell_egros import curve_...
def egros_from_j_1728(S=[]): "\n Given a list of primes S, returns a list of elliptic curves over `\\QQ`\n with j-invariant 1728 and good reduction outside S, by checking\n all relevant quartic twists.\n\n INPUT:\n\n - S -- list of primes (default: empty list).\n\n .. NOTE::\n\n Primality...
def egros_from_j_0(S=[]): "\n Given a list of primes S, returns a list of elliptic curves over `\\QQ`\n with j-invariant 0 and good reduction outside S, by checking all\n relevant sextic twists.\n\n INPUT:\n\n - S -- list of primes (default: empty list).\n\n .. NOTE::\n\n Primality of ele...
def egros_from_j(j, S=[]): "\n Given a rational j and a list of primes S, returns a list of\n elliptic curves over `\\QQ` with j-invariant j and good reduction\n outside S, by checking all relevant quadratic twists.\n\n INPUT:\n\n - j -- a rational number.\n\n - S -- list of primes (default: emp...
def egros_from_jlist(jlist, S=[]): "\n Given a list of rational j and a list of primes S, returns a list\n of elliptic curves over `\\QQ` with j-invariant in the list and good\n reduction outside S.\n\n INPUT:\n\n - j -- list of rational numbers.\n\n - S -- list of primes (default: empty list).\...
def egros_get_j(S=[], proof=None, verbose=False): '\n Returns a list of rational `j` such that all elliptic curves\n defined over `\\QQ` with good reduction outside `S` have\n `j`-invariant in the list, sorted by height.\n\n INPUT:\n\n - ``S`` -- list of primes (default: empty list).\n\n - ``pro...
class EllipticCurve_field(ell_generic.EllipticCurve_generic, ProjectivePlaneCurve_field): base_field = ell_generic.EllipticCurve_generic.base_ring _point = EllipticCurvePoint_field def genus(self): "\n Return 1 for elliptic curves.\n\n EXAMPLES::\n\n sage: E = EllipticCur...
def compute_model(E, name): '\n Return a model of an elliptic curve ``E`` of the type specified\n in the ``name`` parameter.\n\n Used as a helper function in\n :class:`~sage.schemes.elliptic_curves.ell_curve_isogeny.EllipticCurveIsogeny`.\n\n INPUT:\n\n - ``E`` (elliptic curve)\n\n - ``name``...
def point_of_order(E, n): '\n Given an elliptic curve `E` over a finite field or a number field\n and an integer `n \\geq 1`, construct a point of order `n` on `E`,\n possibly defined over an extension of the base field of `E`.\n\n Currently only prime powers `n` are supported.\n\n EXAMPLES::\n\n ...
class EllipticCurve_finite_field(EllipticCurve_field, HyperellipticCurve_finite_field): '\n Elliptic curve over a finite field.\n\n EXAMPLES::\n\n sage: EllipticCurve(GF(101),[2,3])\n Elliptic Curve defined by y^2 = x^3 + 2*x + 3 over Finite Field of size 101\n\n sage: # needs sage.rin...
def curves_with_j_0(K): '\n Return a complete list of pairwise nonisomorphic elliptic curves with `j`-invariant 0 over the finite field `K`.\n\n .. NOTE::\n\n In characteristics 2 and 3 this function simply calls ``curves_with_j_0_char2`` or\n ``curves_with_j_0_char3``. Otherwise ...
def curves_with_j_1728(K): '\n Return a complete list of pairwise nonisomorphic elliptic curves with `j`-invariant 1728 over the finite field `K`.\n\n .. NOTE::\n\n In characteristics 2 and 3 (so 0=1728) this function simply calls ``curves_with_j_0_char2`` or\n ``curves_with_j_0_ch...
def curves_with_j_0_char2(K): '\n Return a complete list of pairwise nonisomorphic elliptic curves with `j`-invariant 0 over the finite field `K` of characteristic 2.\n\n .. NOTE::\n\n The number of twists is either 3 or 7 depending on whether\n the field has odd or even degree ove...
def curves_with_j_0_char3(K): '\n Return a complete list of pairwise nonisomorphic elliptic curves with `j`-invariant 0 over the finite field `K` of characteristic 3.\n\n .. NOTE::\n\n The number of twists is either 4 or 6 depending on whether\n the field has odd or even degree ove...
def fill_ss_j_dict(): '\n Fill the global cache of supersingular j-_polynomials.\n\n This function does nothing except the first time it is called,\n when it fills ``supersingular_j_polynomials`` with precomputed\n values for `p<300`. Setting the values this way avoids start-up\n costs.\n ' ...
def supersingular_j_polynomial(p, use_cache=True): '\n Return a polynomial whose roots are the supersingular\n `j`-invariants in characteristic `p`, other than 0, 1728.\n\n INPUT:\n\n - `p` (integer) -- a prime number.\n\n - ``use_cache`` (boolean, default ``True``) -- use cached coefficients if th...
def is_j_supersingular(j, proof=True): "\n Return True if `j` is a supersingular `j`-invariant.\n\n INPUT:\n\n - ``j`` (finite field element) -- an element of a finite field\n\n - ``proof`` (boolean, default True) -- If True, returns a proved\n result. If False, then a return value of False is c...
def special_supersingular_curve(F, *, endomorphism=False): '\n Given a finite field ``F``, construct a "special" supersingular\n elliptic curve `E` defined over ``F``.\n\n Such a curve\n\n - has coefficients in `\\mathbb F_p`;\n\n - has group structure `E(\\mathbb F_p) \\cong \\ZZ/(p+1)` and\n ...
def is_EllipticCurve(x): '\n Utility function to test if ``x`` is an instance of an Elliptic Curve class.\n\n EXAMPLES::\n\n sage: from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve\n sage: E = EllipticCurve([1,2,3/4,7,19])\n sage: is_EllipticCurve(E)\n True\n ...
class EllipticCurve_generic(WithEqualityById, plane_curve.ProjectivePlaneCurve): '\n Elliptic curve over a generic base ring.\n\n EXAMPLES::\n\n sage: E = EllipticCurve([1,2,3/4,7,19]); E\n Elliptic Curve defined by y^2 + x*y + 3/4*y = x^3 + 2*x^2 + 7*x + 19 over Rational Field\n sage: ...
class EllipticCurveLocalData(SageObject): '\n The class for the local reduction data of an elliptic curve.\n\n Currently supported are elliptic curves defined over `\\QQ`, and\n elliptic curves defined over a number field, at an arbitrary prime\n or prime ideal.\n\n INPUT:\n\n - ``E`` -- an elli...
def check_prime(K, P): "\n Function to check that `P` determines a prime of `K`, and return that ideal.\n\n INPUT:\n\n - ``K`` -- a number field (including `\\QQ`).\n\n - ``P`` -- an element of ``K`` or a (fractional) ideal of ``K``.\n\n OUTPUT:\n\n - If ``K`` is `\\QQ`: the prime integer equal ...
def modular_symbol_space(E, sign, base_ring, bound=None): "\n Creates the space of modular symbols of a given sign over a give base_ring,\n attached to the isogeny class of the elliptic curve ``E``.\n\n INPUT:\n\n - ``E`` -- an elliptic curve over `\\QQ`\n - ``sign`` -- integer, -1, 0, or 1\n - ...
class ModularSymbol(SageObject): '\n A modular symbol attached to an elliptic curve, which is the map\n `\\QQ\\to \\QQ` obtained by sending `r` to the normalized\n symmetrized (or anti-symmetrized) integral `\\infty` to `r`.\n\n This is as defined in [MTT1986]_, but normalized to depend on the curve\n...
class ModularSymbolECLIB(ModularSymbol): def __init__(self, E, sign, nap=1000): 'Modular symbols attached to `E` using ``eclib``.\n\n Note that the normalization used within ``eclib`` differs from the\n normalization chosen here by a factor of 2 in the case of elliptic\n curves with ...
class ModularSymbolSage(ModularSymbol): def __init__(self, E, sign, normalize='L_ratio'): 'Modular symbols attached to `E` using ``sage``.\n\n INPUT:\n\n - ``E`` -- an elliptic curve\n - ``sign`` -- an integer, -1 or 1\n - ``normalize`` -- either \'L_ratio\' (default), \'perio...
class EllipticCurve_number_field(EllipticCurve_field): '\n Elliptic curve over a number field.\n\n EXAMPLES::\n\n sage: K.<i> = NumberField(x^2 + 1)\n sage: EllipticCurve([i, i - 1, i + 1, 24*i + 15, 14*i + 35])\n Elliptic Curve defined by\n y^2 + i*x*y + (i+1)*y = x^3 + (i-1)*x...
class EllipticCurve_padic_field(EllipticCurve_field, HyperellipticCurve_padic_field): '\n Elliptic curve over a padic field.\n\n EXAMPLES::\n\n sage: Qp = pAdicField(17)\n sage: E = EllipticCurve(Qp,[2,3]); E\n Elliptic Curve defined by y^2 = x^3 + (2+O(17^20))*x + (3+O(17^20))\n ...
class EllipticCurvePoint(SchemeMorphism_point_projective_ring): '\n A point on an elliptic curve.\n ' pass
class EllipticCurvePoint_field(SchemeMorphism_point_abelian_variety_field): "\n A point on an elliptic curve over a field. The point has coordinates\n in the base field.\n\n EXAMPLES::\n\n sage: E = EllipticCurve('37a')\n sage: E([0,0])\n (0 : 0 : 1)\n sage: E(0,0) ...
class EllipticCurvePoint_number_field(EllipticCurvePoint_field): "\n A point on an elliptic curve over a number field.\n\n Most of the functionality is derived from the parent class\n :class:`EllipticCurvePoint_field`. In addition we have support for\n orders, heights, reduction modulo primes, and el...
class EllipticCurvePoint_finite_field(EllipticCurvePoint_field): '\n Class for elliptic curve points over finite fields.\n ' def _magma_init_(self, magma): "\n Return a string representation of self that ``MAGMA`` can\n use for input.\n\n EXAMPLES::\n\n sage: E =...
class EllipticCurve_rational_field(EllipticCurve_number_field): "\n Elliptic curve over the Rational Field.\n\n INPUT:\n\n - ``ainvs`` -- a list or tuple `[a_1, a_2, a_3, a_4, a_6]` of\n Weierstrass coefficients\n\n .. NOTE::\n\n This class should not be called directly; use\n :clas...
def cremona_curves(conductors): "\n Return iterator over all known curves (in database) with conductor\n in the list of conductors.\n\n EXAMPLES::\n\n sage: [(E.label(), E.rank()) for E in cremona_curves(srange(35,40))]\n [('35a1', 0),\n ('35a2', 0),\n ('35a3', 0),\n ...
def cremona_optimal_curves(conductors): "\n Return iterator over all known optimal curves (in database) with\n conductor in the list of conductors.\n\n EXAMPLES::\n\n sage: [(E.label(), E.rank()) for E in cremona_optimal_curves(srange(35,40))]\n [('35a1', 0),\n ('36a1', 0),\n ...
def integral_points_with_bounded_mw_coeffs(E, mw_base, N, x_bound): '\n Return the set of integers `x` which are\n `x`-coordinates of points on the curve `E` which\n are linear combinations of the generators (basis and torsion\n points) with coefficients bounded by `N`.\n\n INPUT:\n\n - ``E`` --...
def elliptic_curve_congruence_graph(curves): '\n Return the congruence graph for this set of elliptic curves.\n\n INPUT:\n\n - ``curves`` -- a list of elliptic curves\n\n OUTPUT:\n\n The graph with each curve as a vertex (labelled by its Cremona\n label) and an edge from `E` to `F` labelled `p` ...
@richcmp_method class TateCurve(SageObject): "\n Tate's `p`-adic uniformisation of an elliptic curve with\n multiplicative reduction.\n\n .. NOTE::\n\n Some of the methods of this Tate curve only work when the\n reduction is split multiplicative over `\\QQ_p`.\n\n EXAMPLES::\n\n s...
@richcmp_method class EllipticCurveTorsionSubgroup(groups.AdditiveAbelianGroupWrapper): "\n The torsion subgroup of an elliptic curve over a number field.\n\n EXAMPLES:\n\n Examples over `\\QQ`::\n\n sage: E = EllipticCurve([-4, 0]); E\n Elliptic Curve defined by y^2 = x^3 - 4*x over Ration...
def torsion_bound(E, number_of_places=20): "\n Return an upper bound on the order of the torsion subgroup.\n\n INPUT:\n\n - ``E`` -- an elliptic curve over `\\QQ` or a number field\n\n - ``number_of_places`` (positive integer, default = 20) -- the\n number of places that will be used to find the ...
def weierstrass_p(E, prec=20, algorithm=None): '\n Compute the Weierstrass `\\wp`-function on an elliptic curve.\n\n INPUT:\n\n - ``E`` -- an elliptic curve\n\n - ``prec`` -- precision\n\n - ``algorithm`` -- string or ``None`` (default: ``None``):\n a choice of algorithm among ``"pari"``, ``"f...
def compute_wp_pari(E, prec): '\n Computes the Weierstrass `\\wp`-function with the ``ellwp`` function\n from PARI.\n\n EXAMPLES::\n\n sage: E = EllipticCurve([0,1])\n sage: from sage.schemes.elliptic_curves.ell_wp import compute_wp_pari\n sage: compute_wp_pari(E, prec=20)\n z...
def compute_wp_quadratic(k, A, B, prec): "\n Compute the truncated Weierstrass function of an elliptic curve\n defined by short Weierstrass model: `y^2 = x^3 + Ax + B`. Uses an\n algorithm that is of complexity `O(prec^2)`.\n\n Let p be the characteristic of the underlying field. Then we must\n hav...
def compute_wp_fast(k, A, B, m): '\n Computes the Weierstrass function of an elliptic curve defined by short Weierstrass model:\n `y^2 = x^3 + Ax + B`. It does this with as fast as polynomial of degree `m` can be multiplied\n together in the base ring, i.e. `O(M(n))` in the notation of [BMSS2006]_.\n\n ...
def solve_linear_differential_system(a, b, c, alpha): "\n Solves a system of linear differential equations: `af' + bf = c` and `f'(0) = \\alpha`\n where `a`, `b`, and `c` are power series in one variable and `\\alpha` is a constant in the coefficient ring.\n\n ALGORITHM:\n\n due to Brent and Kung '78....
class EllipticCurveFormalGroup(SageObject): '\n The formal group associated to an elliptic curve.\n ' def __init__(self, E): "\n EXAMPLES::\n\n sage: E = EllipticCurve('11a')\n sage: F = E.formal_group(); F\n Formal Group associated to the Elliptic Curve\...
def _ex_set(p): '\n Gives the set of the only values of trace^2/det\n that appear in a exceptional subgroup in PGL_2(F_p).\n\n EXAMPLES::\n\n sage: from sage.schemes.elliptic_curves.gal_reps import _ex_set\n sage: for p in prime_range(3,30): print("{} {}".format(p, _ex_set(p)))\n 3 [...
class GaloisRepresentation(SageObject): "\n The compatible family of Galois representation\n attached to an elliptic curve over the rational numbers.\n\n Given an elliptic curve `E` over `\\QQ` and a rational\n prime number `p`, the `p^n`-torsion `E[p^n]` points of\n `E` is a representation of the ...
class GaloisRepresentation(SageObject): "\n The compatible family of Galois representation\n attached to an elliptic curve over a number field.\n\n Given an elliptic curve `E` over a number field `K`\n and a rational prime number `p`, the `p^n`-torsion\n `E[p^n]` points of `E` is a representation o...
def _non_surjective(E, patience=100): "\n Return a list of primes `p` including all primes for which the mod-`p`\n representation might not be surjective.\n\n INPUT:\n\n - ``E`` -- EllipticCurve (over a number field).\n\n - ``A`` -- int (a bound on the number of traces of Frobenius to use\n ...
def Frobenius_filter(E, L, patience=100): "\n Determine which primes in L might have an image contained in a\n Borel subgroup, by checking of traces of Frobenius.\n\n .. NOTE::\n\n This function will sometimes return primes for which the image\n is not contained in a Borel subgroup. This i...
def _exceptionals(E, L, patience=1000): "\n Determine which primes in L are exceptional for E.\n\n This is done using Proposition 19 of Section 2.8 of Serre's\n *Propriétés Galoisiennes des Points d'Ordre Fini des Courbes Elliptiques*\n [Ser1972]_.\n\n INPUT:\n\n - ``E`` -- EllipticCurve over a ...
def _over_numberfield(E): '\n Return `E`, defined over an absolute ``NumberField``.\n\n This is necessary since if `E` is defined over `\\QQ`, then we\n cannot use Sage commands available for number fields, and if the\n base field is relative then other problems result.\n\n INPUT:\n\n - ``E`` --...
def deg_one_primes_iter(K, principal_only=False): '\n Return an iterator over degree 1 primes of ``K``.\n\n INPUT:\n\n - ``K`` -- a number field\n - ``principal_only`` -- bool; if ``True``, only yield principal primes\n\n OUTPUT:\n\n An iterator over degree 1 primes of `K` up to the given norm,\...
def _semistable_reducible_primes(E, verbose=False): "Find a list containing all semistable primes l unramified in K/QQ\n for which the Galois image for E could be reducible.\n\n INPUT:\n\n - ``E`` -- EllipticCurve over a number field.\n\n OUTPUT:\n\n A list of primes, which contains all primes `l` ...
def _possible_normalizers(E, SA): 'Find a list containing all primes `l` such that the Galois image at `l`\n is contained in the normalizer of a Cartan subgroup, such that the\n corresponding quadratic character is ramified only at the given primes.\n\n INPUT:\n\n - ``E`` -- EllipticCurve over a numbe...
def Billerey_P_l(E, l): "\n Return Billerey's `P_l^*` as defined in [Bil2011]_, equation (9).\n\n INPUT:\n\n - ``E`` -- an elliptic curve over a number field `K`, given by a\n global integral model.\n\n - ``l`` -- a rational prime\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n s...
def Billerey_B_l(E, l, B=0): "\n Return Billerey's `B_l`, adapted from the definition in [Bil2011]_, after (9).\n\n INPUT:\n\n - ``E`` -- an elliptic curve over a number field `K`, given by a\n global integral model.\n\n - ``l`` (int) -- a rational prime\n\n - ``B`` (int) -- 0 or LCM of previo...
def Billerey_R_q(E, q, B=0): "\n Return Billerey's `R_q`, adapted from the definition in [Bil2011]_, Theorem 2.8.\n\n INPUT:\n\n - ``E`` -- an elliptic curve over a number field `K`, given by a\n global integral model.\n\n - ``q`` -- a prime ideal of `K`\n\n - ``B`` (int) -- 0 or LCM of previo...
def Billerey_B_bound(E, max_l=200, num_l=8, small_prime_bound=0, debug=False): "\n Compute Billerey's bound `B`.\n\n We compute `B_l` for `l` up to ``max_l`` (at most) until ``num_l``\n nonzero values are found (at most). Return the list of primes\n dividing all `B_l` computed, excluding those dividi...
def Billerey_R_bound(E, max_l=200, num_l=8, small_prime_bound=None, debug=False): "\n Compute Billerey's bound `R`.\n\n We compute `R_q` for `q` dividing primes `\\ell` up to ``max_l``\n (at most) until ``num_l`` nonzero values are found (at most).\n Return the list of primes dividing all ``R_q`` comp...
def reducible_primes_Billerey(E, num_l=None, max_l=None, verbose=False): "\n Return a finite set of primes `\\ell` containing all those for which\n `E` has a `K`-rational ell-isogeny, where `K` is the base field of\n `E`: i.e., the mod-`\\ell` representation is irreducible for all\n `\\ell` outside th...
def reducible_primes_naive(E, max_l=None, num_P=None, verbose=False): "\n Return locally reducible primes `\\ell` up to ``max_l``.\n\n The list of primes `\\ell` returned consists of all those up to\n ``max_l`` such that `E` mod `P` has an `\\ell`-isogeny, where `K`\n is the base field of `E`, for ``n...
def init(): '\n Function to initialize the gp process\n ' global gp if (gp is None): import os from sage.env import DOT_SAGE logfile = os.path.join(DOT_SAGE, 'gp-simon.log') gp = Gp(script_subdirectory='simon', logfile=logfile) gp.read('ellQ.gp') gp.re...
def simon_two_descent(E, verbose=0, lim1=None, lim3=None, limtriv=None, maxprob=20, limbigprime=30, known_points=[]): "\n Interface to Simon's gp script for two-descent.\n\n .. NOTE::\n\n Users should instead run E.simon_two_descent()\n\n EXAMPLES::\n\n sage: import sage.schemes.elliptic_cu...
def heegner_points(N, D=None, c=None): '\n Return all Heegner points of given level `N`. Can also restrict\n to Heegner points with specified discriminant `D` and optionally\n conductor `c`.\n\n INPUT:\n\n - `N` -- level (positive integer)\n\n - `D` -- discriminant (negative integer)\n\n - `...
def heegner_point(N, D=None, c=1): '\n Return a specific Heegner point of level `N` with given\n discriminant and conductor. If `D` is not specified, then the\n first valid Heegner discriminant is used. If `c` is not given,\n then `c=1` is used.\n\n INPUT:\n\n - `N` -- level (positive integer)...
class RingClassField(SageObject): "\n A Ring class field of a quadratic imaginary field of given conductor.\n\n .. NOTE::\n\n This is a *ring* class field, not a ray class field. In\n general, the ring class field of given conductor is a subfield\n of the ray class field of the same con...
class GaloisGroup(SageObject): "\n A Galois group of a ring class field.\n\n EXAMPLES::\n\n sage: E = EllipticCurve('389a')\n sage: G = E.heegner_point(-7,5).ring_class_field().galois_group(); G\n Galois group of Ring class field extension of QQ[sqrt(-7)] of conductor 5\n sage: G...
class GaloisAutomorphism(SageObject): '\n An abstract automorphism of a ring class field.\n\n .. TODO::\n\n make :class:`GaloisAutomorphism` derive from GroupElement, so\n that one gets powers for free, etc.\n ' def __init__(self, parent): '\n INPUT:\n\n - ``paren...
class GaloisAutomorphismComplexConjugation(GaloisAutomorphism): "\n The complex conjugation automorphism of a ring class field.\n\n EXAMPLES::\n\n sage: G = heegner_point(37,-7,5).ring_class_field().galois_group()\n sage: conj = G.complex_conjugation()\n sage: conj\n Complex conj...
@richcmp_method class GaloisAutomorphismQuadraticForm(GaloisAutomorphism): "\n An automorphism of a ring class field defined by a quadratic form.\n\n EXAMPLES::\n\n sage: H = heegner_points(389,-20,3)\n sage: sigma = H.ring_class_field().galois_group(H.quadratic_field())[0]; sigma\n Cla...
@richcmp_method class HeegnerPoint(SageObject): "\n A Heegner point of level `N`, discriminant `D` and conductor `c`\n is any point on a modular curve or elliptic curve that is\n concocted in some way from a quadratic imaginary `\\tau` in the upper\n half plane with `\\Delta(\\tau) = D c = \\Delta(N \...
class HeegnerPoints(SageObject): "\n The set of Heegner points with given parameters.\n\n EXAMPLES::\n\n sage: H = heegner_points(389); H\n Set of all Heegner points on X_0(389)\n sage: type(H)\n <class 'sage.schemes.elliptic_curves.heegner.HeegnerPoints_level'>\n sage: is...
class HeegnerPoints_level(HeegnerPoints): "\n Return the infinite set of all Heegner points on `X_0(N)` for all\n quadratic imaginary fields.\n\n EXAMPLES::\n\n sage: H = heegner_points(11); H\n Set of all Heegner points on X_0(11)\n sage: type(H)\n <class 'sage.schemes.ellipt...
class HeegnerPoints_level_disc(HeegnerPoints): "\n Set of Heegner points of given level and all conductors associated\n to a quadratic imaginary field.\n\n EXAMPLES::\n\n sage: H = heegner_points(389,-7); H\n Set of all Heegner points on X_0(389) associated to QQ[sqrt(-7)]\n sage: ty...
def is_kolyvagin_conductor(N, E, D, r, n, c): "\n Return ``True`` if `c` is a Kolyvagin conductor for level `N`,\n discriminant `D`, mod `n`, etc., i.e., `c` is divisible by exactly\n `r` prime factors, is coprime to `ND`, each prime dividing `c` is\n inert, and if `E` is not ``None`` then `n | \\gcd(...
class HeegnerPoints_level_disc_cond(HeegnerPoints_level, HeegnerPoints_level_disc): "\n The set of Heegner points of given level, discriminant, and conductor.\n\n EXAMPLES::\n\n sage: H = heegner_points(389,-7,5); H\n All Heegner points of conductor 5 on X_0(389) associated to QQ[sqrt(-7)]\n ...
class HeegnerPointOnX0N(HeegnerPoint): "\n A Heegner point as a point on the modular curve `X_0(N)`, which we\n view as the upper half plane modulo the action of `\\Gamma_0(N)`.\n\n EXAMPLES::\n\n sage: x = heegner_point(37, -7, 5); x\n Heegner point 5/74*sqrt(-7) - 11/74 of discriminant -7...
class HeegnerPointOnEllipticCurve(HeegnerPoint): "\n A Heegner point on a curve associated to an order in a quadratic\n imaginary field.\n\n EXAMPLES::\n\n sage: E = EllipticCurve('37a'); P = E.heegner_point(-7,5); P\n Heegner point of discriminant -7 and conductor 5 on elliptic curve of co...
class KolyvaginPoint(HeegnerPoint): "\n A Kolyvagin point.\n\n EXAMPLES:\n\n We create a few Kolyvagin points::\n\n sage: EllipticCurve('11a1').kolyvagin_point(-7)\n Kolyvagin point of discriminant -7 on elliptic curve of conductor 11\n sage: EllipticCurve('37a1').kolyvagin_point(-7)...
class KolyvaginCohomologyClass(SageObject): "\n A Kolyvagin cohomology class in `H^1(K,E[n])` or `H^1(K,E)[n]`\n attached to a Heegner point.\n\n EXAMPLES::\n\n sage: y = EllipticCurve('37a').heegner_point(-7)\n sage: c = y.kolyvagin_cohomology_class(3); c\n Kolyvagin cohomology clas...
class KolyvaginCohomologyClassEn(KolyvaginCohomologyClass): '\n\n EXAMPLES:\n\n ' def _repr_(self): "\n\n EXAMPLES::\n\n sage: y = EllipticCurve('37a').heegner_point(-7, 5)\n sage: t = y.kolyvagin_cohomology_class()\n sage: t._repr_()\n 'Kolyva...
class HeegnerQuatAlg(SageObject): "\n Heegner points viewed as supersingular points on the modular curve\n `X_0(N)/\\mathbf{F}_{\\ell}`.\n\n EXAMPLES::\n\n sage: H = heegner_points(11).reduce_mod(13); H\n Heegner points on X_0(11) over F_13\n sage: type(H)\n <class 'sage.schem...
def kolyvagin_reduction_data(E, q, first_only=True): "\n Given an elliptic curve of positive rank and a prime `q`, this\n function returns data about how to use Kolyvagin's `q`-torsion\n Heegner point Euler system to do computations with this curve.\n See the precise description of the output below.\n...
class HeegnerQuatAlgEmbedding(SageObject): "\n The homomorphism `\\mathcal{O} \\to R`, where `\\mathcal{O}` is the\n order of conductor `c` in the quadratic field of discriminant `D`,\n and `R` is an Eichler order in a quaternion algebra.\n\n EXAMPLES::\n\n sage: H = heegner_points(11).reduce_m...
def quadratic_order(D, c, names='a'): "\n Return order of conductor `c` in quadratic field with fundamental\n discriminant `D`.\n\n INPUT:\n\n - `D` -- fundamental discriminant\n\n - `c` -- conductor\n\n - ``names`` -- string (default: 'a')\n\n OUTPUT:\n\n - order `R` of conductor `c` in a...
def class_number(D): '\n Return the class number of the quadratic field with fundamental\n discriminant `D`.\n\n INPUT:\n\n - `D` -- integer\n\n EXAMPLES::\n\n sage: sage.schemes.elliptic_curves.heegner.class_number(-20)\n 2\n sage: sage.schemes.elliptic_curves.heegner.class_nu...
def is_inert(D, p): '\n Return ``True`` if p is an inert prime in the field `\\QQ(\\sqrt{D})`.\n\n INPUT:\n\n - `D` -- fundamental discriminant\n\n - `p` -- prime integer\n\n EXAMPLES::\n\n sage: sage.schemes.elliptic_curves.heegner.is_inert(-7,3)\n True\n sage: sage.schemes.el...
def is_split(D, p): '\n Return ``True`` if p is a split prime in the field `\\QQ(\\sqrt{D})`.\n\n INPUT:\n\n - `D` -- fundamental discriminant\n\n - `p` -- prime integer\n\n EXAMPLES::\n\n sage: sage.schemes.elliptic_curves.heegner.is_split(-7,3)\n False\n sage: sage.schemes.el...
def is_ramified(D, p): '\n Return ``True`` if p is a ramified prime in the field `\\QQ(\\sqrt{D})`.\n\n INPUT:\n\n - `D` -- fundamental discriminant\n\n - `p` -- prime integer\n\n EXAMPLES::\n\n sage: sage.schemes.elliptic_curves.heegner.is_ramified(-7,2)\n False\n sage: sage.s...
def nearby_rational_poly(f, **kwds): '\n Return a polynomial whose coefficients are rational numbers close\n to the coefficients of `f`.\n\n INPUT:\n\n - `f` -- polynomial with real floating point entries\n\n - ``**kwds`` -- passed on to ``nearby_rational`` method\n\n EXAMPLES::\n\n sage:...
def simplest_rational_poly(f, prec): '\n Return a polynomial whose coefficients are as simple as possible\n rationals that are also close to the coefficients of f.\n\n INPUT:\n\n - `f` -- polynomial with real floating point entries\n\n - ``prec`` -- positive integer\n\n EXAMPLES::\n\n sag...
def satisfies_weak_heegner_hypothesis(N, D): "\n Check that `D` satisfies the weak Heegner hypothesis relative to `N`.\n This is all that is needed to define Heegner points.\n\n The condition is that `D<0` is a fundamental discriminant and that\n each unramified prime dividing `N` splits in `K=\\QQ(\\...
def make_monic(f): '\n Return a monic integral polynomial `g` and an integer `d` such\n that if `\\alpha` is a root of `g`, then `\\alpha/d` is a root of `f`.\n In other words, `c f(x) = g(d x)` for some scalar `c`.\n\n INPUT:\n\n - `f` -- polynomial over the rational numbers\n\n OUTPUT: A monic...
def ell_heegner_point(self, D, c=ZZ(1), f=None, check=True): "\n Returns the Heegner point on this curve associated to the\n quadratic imaginary field `K=\\QQ(\\sqrt{D})`.\n\n If the optional parameter `c` is given, returns the higher Heegner\n point associated to the order of conductor `c`.\n\n IN...