code
stringlengths
17
6.64M
def padic_height_via_multiply(self, p, prec=20, E2=None, check_hypotheses=True): '\n Computes the cyclotomic `p`-adic height.\n\n The equation of the curve must be minimal at `p`.\n\n INPUT:\n\n - ``p`` -- prime >= 5 for which the curve has good\n ordinary reduction\n\n - ``prec`` -- integer >...
def padic_sigma(self, p, N=20, E2=None, check=False, check_hypotheses=True): '\n Computes the `p`-adic sigma function with respect to the standard\n invariant differential `dx/(2y + a_1 x + a_3)`, as\n defined by Mazur and Tate in [MT1991]_, as a power series in the usual\n uniformiser `t` at the orig...
def padic_sigma_truncated(self, p, N=20, lamb=0, E2=None, check_hypotheses=True): '\n Compute the p-adic sigma function with respect to the standard\n invariant differential `dx/(2y + a_1 x + a_3)`, as\n defined by Mazur and Tate in [MT1991]_, as a power series in the usual\n uniformiser `t` at the or...
def padic_E2(self, p, prec=20, check=False, check_hypotheses=True, algorithm='auto'): '\n Returns the value of the `p`-adic modular form `E2`\n for `(E, \\omega)` where `\\omega` is the usual\n invariant differential `dx/(2y + a_1 x + a_3)`.\n\n INPUT:\n\n - ``p`` -- prime (= 5) for which `E` is go...
def matrix_of_frobenius(self, p, prec=20, check=False, check_hypotheses=True, algorithm='auto'): '\n Returns the matrix of Frobenius on the Monsky Washnitzer cohomology of\n the short Weierstrass model of the minimal model of the elliptic curve.\n\n INPUT:\n\n - ``p`` -- prime (>= 3) for which `E` is ...
def _brent(F, p, N): '\n This is an internal function; it is used by padic_sigma().\n\n `F` is a assumed to be a power series over `R = \\ZZ/p^{N-1}\\ZZ`.\n\n It solves the differential equation `G\'(t)/G(t) = F(t)`\n using Brent\'s algorithm, with initial condition `G(0) = 1`.\n It is assumed that...
class PeriodLattice(FreeModule_generic_pid): '\n The class for the period lattice of an algebraic variety.\n ' pass
@richcmp_method class PeriodLattice_ell(PeriodLattice): '\n The class for the period lattice of an elliptic curve.\n\n Currently supported are elliptic curves defined over `\\QQ`, and\n elliptic curves defined over a number field with a real or complex\n embedding, where the lattice constructed depend...
def reduce_tau(tau): "\n Transform a point in the upper half plane to the fundamental region.\n\n INPUT:\n\n - ``tau`` (complex) -- a complex number with positive imaginary part\n\n OUTPUT:\n\n (tuple) `(\\tau',[a,b,c,d])` where `a,b,c,d` are integers such that\n\n - `ad-bc=1`;\n - `\\tau'=(a...
def normalise_periods(w1, w2): "\n Normalise the period basis `(w_1,w_2)` so that `w_1/w_2` is in the fundamental region.\n\n INPUT:\n\n - ``w1,w2`` (complex) -- two complex numbers with non-real ratio\n\n OUTPUT:\n\n (tuple) `((\\omega_1',\\omega_2'),[a,b,c,d])` where `a,b,c,d` are\n integers s...
def extended_agm_iteration(a, b, c): '\n Internal function for the extended AGM used in elliptic logarithm computation.\n\n INPUT:\n\n - ``a``, ``b``, ``c`` (real or complex) -- three real or complex numbers.\n\n OUTPUT:\n\n (3-tuple) `(a_0,b_0,c_0)`, the limit of the iteration `(a,b,c) \\mapsto ((...
def reduce_mod_q(x, amodq): 'The reduction of ``x`` modulo the prime ideal defined by ``amodq``.\n\n INPUT:\n\n - ``x`` -- an element of a number field `K`.\n\n - ``amodq`` -- an element of `GF(q)` which is a root mod `q` of\n the defining polynomial of `K`. This defines a degree 1 prime\n id...
class EllipticCurveSaturator(SageObject): '\n Class for saturating points on an elliptic curve over a number field.\n\n INPUT:\n\n - ``E`` -- an elliptic curve defined over a number field, or `\\QQ`.\n\n - ``verbose`` (boolean, default ``False``) -- verbosity flag.\n\n .. NOTE::\n\n This fun...
def p_projections(Eq, Plist, p, debug=False): '\n\n INPUT:\n\n - ``Eq`` -- An elliptic curve over a finite field.\n\n - ``Plist`` -- a list of points on `Eq`.\n\n - ``p`` -- a prime number.\n\n OUTPUT:\n\n A list of `r\\le2` vectors in `\\GF{p^n}`, the images of the points in\n `G \\otimes \\...
class Sha(SageObject): "\n The Tate-Shafarevich group associated to an elliptic curve.\n\n If `E` is an elliptic curve over a global field `K`, the Tate-Shafarevich\n group is the subgroup of elements in `H^1(K,E)` which map to zero under\n every global-to-local restriction map `H^1(K,E) \\to H^1(K_v,...
class baseWI(): "\n This class implements the basic arithmetic of isomorphisms between\n Weierstrass models of elliptic curves.\n\n These are specified by lists of the form `[u,r,s,t]` (with `u \\neq 0`)\n which specifies a transformation `(x,y) \\mapsto (x',y')` where\n\n `(x,y) = (u^2x'+r...
def _isomorphisms(E, F): "\n Enumerate all isomorphisms between two elliptic curves,\n as a generator object.\n\n INPUT:\n\n - ``E``, ``F`` (EllipticCurve) -- Two elliptic curves.\n\n OUTPUT:\n\n A generator object producing 4-tuples `(u,r,s,t)` representing an isomorphism.\n\n EXAMPLES::\n\n...
class WeierstrassIsomorphism(EllipticCurveHom, baseWI): "\n Class representing a Weierstrass isomorphism between two elliptic curves.\n\n INPUT:\n\n - ``E`` -- an ``EllipticCurve``, or ``None`` (see below).\n\n - ``urst`` -- a 4-tuple `(u,r,s,t)`, a :class:`baseWI` object,\n or ``None`` (see belo...
def identity_morphism(E): '\n Given an elliptic curve `E`, return the identity morphism\n on `E` as a :class:`WeierstrassIsomorphism`.\n\n EXAMPLES::\n\n sage: from sage.schemes.elliptic_curves.weierstrass_morphism import identity_morphism\n sage: E = EllipticCurve([5,6,7,8,9])\n sag...
def negation_morphism(E): '\n Given an elliptic curve `E`, return the negation endomorphism\n `[-1]` of `E` as a :class:`WeierstrassIsomorphism`.\n\n EXAMPLES::\n\n sage: from sage.schemes.elliptic_curves.weierstrass_morphism import negation_morphism\n sage: E = EllipticCurve([5,6,7,8,9])\n...
class WeierstrassTransformation(SchemeMorphism_polynomial): def __init__(self, domain, codomain, defining_polynomials, post_multiplication): '\n A morphism of a genus-one curve to/from the Weierstrass form.\n\n INPUT:\n\n - ``domain``, ``codomain`` -- two schemes, one of which is an\...
def WeierstrassTransformationWithInverse(domain, codomain, defining_polynomials, post_multiplication, inv_defining_polynomials, inv_post_multiplication): '\n Construct morphism of a genus-one curve to/from the Weierstrass\n form with its inverse.\n\n EXAMPLES::\n\n sage: R.<u,v,w> = QQ[]\n ...
class WeierstrassTransformationWithInverse_class(WeierstrassTransformation): def inverse(self): '\n Return the inverse.\n\n OUTPUT:\n\n A morphism in the opposite direction. This may be a rational\n inverse or an analytic inverse.\n\n EXAMPLES::\n\n sage: R.<...
def is_AlgebraicScheme(x): "\n Test whether ``x`` is an algebraic scheme.\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n Boolean. Whether ``x`` is an algebraic scheme, that is, a\n subscheme of an ambient space over a ring defined by polynomial\n equations.\n\n EXAMPLES::\n\n s...
class AlgebraicScheme(scheme.Scheme): '\n An algebraic scheme presented as a subscheme in an ambient space.\n\n This is the base class for all algebraic schemes, that is, schemes\n defined by equations in affine, projective, or toric ambient\n spaces.\n ' def __init__(self, A): '\n ...
class AlgebraicScheme_quasi(AlgebraicScheme): '\n The quasi-affine or quasi-projective scheme `X - Y`, where `X` and `Y`\n are both closed subschemes of a common ambient affine or projective\n space.\n\n .. WARNING::\n\n You should not create objects of this class directly. The\n preferr...
@richcmp_method class AlgebraicScheme_subscheme(AlgebraicScheme): '\n An algebraic scheme presented as a closed subscheme is defined by\n explicit polynomial equations. This is as opposed to a general\n scheme, which could, e.g., be the Neron model of some object, and\n for which we do not want to giv...
def is_AmbientSpace(x): '\n Return True if `x` is an ambient space.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.ambient_space import is_AmbientSpace\n sage: is_AmbientSpace(ProjectiveSpace(3, ZZ))\n True\n sage: is_AmbientSpace(AffineSpace(2, QQ))\n True\n sa...
class AmbientSpace(Scheme): '\n Base class for ambient spaces over a ring.\n\n INPUT:\n\n - ``n`` - dimension\n\n - ``R`` - ring\n ' def __init__(self, n, R=ZZ): '\n TESTS::\n\n sage: from sage.schemes.generic.ambient_space import AmbientSpace\n sage: A =...
def CurvePointToIdeal(C, P): "\n Return the vanishing ideal of a point on a curve.\n\n EXAMPLES::\n\n sage: x,y = AffineSpace(2, QQ, names='xy').gens()\n sage: C = Curve(y^2 - x^9 - x)\n sage: from sage.schemes.generic.divisor import CurvePointToIdeal\n sage: CurvePointToIdeal(C,...
def is_Divisor(x): '\n Test whether ``x`` is an instance of :class:`Divisor_generic`\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n ``True`` or ``False``.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.divisor import is_Divisor\n sage: x,y = AffineSpace(2, GF(5), names=\'x...
class Divisor_generic(FormalSum): '\n A Divisor.\n ' def __init__(self, v, parent, check=True, reduce=True): '\n Construct a :class:`Divisor_generic`.\n\n INPUT:\n\n INPUT:\n\n - ``v`` -- object. Usually a list of pairs\n ``(coefficient,divisor)``.\n\n ...
class Divisor_curve(Divisor_generic): "\n For any curve `C`, use ``C.divisor(v)`` to\n construct a divisor on `C`. Here `v` can be either\n\n\n - a rational point on `C`\n\n - a list of rational points\n\n - a list of 2-tuples `(c,P)`, where `c` is an\n integer and `P` is a rational point....
def DivisorGroup(scheme, base_ring=None): '\n Return the group of divisors on the scheme.\n\n INPUT:\n\n - ``scheme`` -- a scheme.\n\n - ``base_ring`` -- usually either `\\ZZ` (default) or `\\QQ`. The\n coefficient ring of the divisors. Not to be confused with the\n base ring of the scheme!\...
def is_DivisorGroup(x): "\n Return whether ``x`` is a :class:`DivisorGroup_generic`.\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n ``True`` or ``False``.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.divisor_group import is_DivisorGroup, DivisorGroup\n sage: Div = Diviso...
class DivisorGroup_generic(FormalSums): '\n The divisor group on a variety.\n ' @staticmethod def __classcall__(cls, scheme, base_ring=ZZ): '\n Set the default value for the base ring.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.divisor_group import DivisorGr...
class DivisorGroup_curve(DivisorGroup_generic): '\n Special case of the group of divisors on a curve.\n ' def _element_constructor_(self, x, check=True, reduce=True): '\n Construct an element of the divisor group.\n\n EXAMPLES::\n\n sage: # needs sage.rings.real_mpfr sa...
class GluedScheme(scheme.Scheme): '\n INPUT:\n\n\n - ``f`` - open immersion from a scheme U to a scheme\n X\n\n - ``g`` - open immersion from U to a scheme Y\n\n\n OUTPUT: The scheme obtained by gluing X and Y along the open set\n U.\n\n .. note::\n\n Checking that `f` and `g` are ...
def is_SchemeHomset(H): "\n Test whether ``H`` is a scheme Hom-set.\n\n EXAMPLES::\n\n sage: f = Spec(QQ).identity_morphism(); f\n Scheme endomorphism of Spectrum of Rational Field\n Defn: Identity map\n sage: from sage.schemes.generic.homset import is_SchemeHomset\n sa...
class SchemeHomsetFactory(UniqueFactory): '\n Factory for Hom-sets of schemes.\n\n EXAMPLES::\n\n sage: A2 = AffineSpace(QQ, 2)\n sage: A3 = AffineSpace(QQ, 3)\n sage: Hom = A3.Hom(A2)\n\n The Hom-sets are uniquely determined by domain and codomain::\n\n sage: Hom is copy(Hom)...
class SchemeHomset_generic(HomsetWithBase): '\n The base class for Hom-sets of schemes.\n\n INPUT:\n\n - ``X`` -- a scheme. The domain of the Hom-set.\n\n - ``Y`` -- a scheme. The codomain of the Hom-set.\n\n - ``category`` -- a category (optional). The category of the\n Hom-set.\n\n - ``ch...
class SchemeHomset_points(SchemeHomset_generic): '\n Set of rational points of the scheme.\n\n Recall that the `K`-rational points of a scheme `X` over `k` can\n be identified with the set of morphisms `Spec(K) \to X`. In Sage,\n the rational points are implemented by such scheme morphisms.\n\n If ...
def is_Hypersurface(self): '\n Return True if ``self`` is a hypersurface, i.e. an object of the type\n :class:`ProjectiveHypersurface` or :class:`AffineHypersurface`.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.hypersurface import is_Hypersurface\n sage: R.<x, y, z> = ZZ[]\n s...
class ProjectiveHypersurface(AlgebraicScheme_subscheme_projective): '\n The projective hypersurface defined by the given polynomial.\n\n EXAMPLES::\n\n sage: P.<x, y, z> = ProjectiveSpace(ZZ, 2)\n sage: ProjectiveHypersurface(x - y, P)\n Projective hypersurface defined by x - y\n ...
class AffineHypersurface(AlgebraicScheme_subscheme_affine): '\n The affine hypersurface defined by the given polynomial.\n\n EXAMPLES::\n\n sage: A.<x, y, z> = AffineSpace(ZZ, 3)\n sage: AffineHypersurface(x*y - z^3, A)\n Affine hypersurface defined by -z^3 + x*y\n in Affine Spa...
def is_SchemeMorphism(f): '\n Test whether ``f`` is a scheme morphism.\n\n INPUT:\n\n - ``f`` -- anything.\n\n OUTPUT:\n\n Boolean. Return ``True`` if ``f`` is a scheme morphism or a point\n on an elliptic curve.\n\n EXAMPLES::\n\n sage: A.<x,y> = AffineSpace(QQ, 2); H = A.Hom(A)\n ...
class SchemeMorphism(Element): "\n Base class for scheme morphisms\n\n INPUT:\n\n - ``parent`` -- the parent of the morphism.\n\n .. TODO::\n\n For historical reasons, :class:`SchemeMorphism` copies code from\n :class:`~sage.categories.map.Map` rather than inheriting from it.\n Pr...
class SchemeMorphism_id(SchemeMorphism): '\n Return the identity morphism from `X` to itself.\n\n INPUT:\n\n - ``X`` -- the scheme.\n\n EXAMPLES::\n\n sage: X = Spec(ZZ)\n sage: X.identity_morphism() # indirect doctest\n Scheme endomorphism of Spectrum of Integer Ring\n ...
class SchemeMorphism_structure_map(SchemeMorphism): '\n The structure morphism\n\n INPUT:\n\n - ``parent`` -- Hom-set with codomain equal to the base scheme of\n the domain.\n\n EXAMPLES::\n\n sage: Spec(ZZ).structure_morphism() # indirect doctest\n Scheme endomorphism of Spectru...
class SchemeMorphism_spec(SchemeMorphism): '\n Morphism of spectra of rings\n\n INPUT:\n\n - ``parent`` -- Hom-set whose domain and codomain are affine schemes.\n\n - ``phi`` -- a ring morphism with matching domain and codomain.\n\n - ``check`` -- boolean (optional, default:``True``). Whether to\n ...
class SchemeMorphism_polynomial(SchemeMorphism): '\n A morphism of schemes determined by polynomials that define what\n the morphism does on points in the ambient space.\n\n INPUT:\n\n - ``parent`` -- Hom-set whose domain and codomain are affine or\n projective schemes.\n\n - ``polys`` -- a li...
class SchemeMorphism_polynomial_id(SchemeMorphism_id, SchemeMorphism_polynomial): '\n Return the identity morphism from `X` to itself.\n\n INPUT:\n\n - ``X`` -- an affine or projective scheme\n\n EXAMPLES::\n\n sage: X = Spec(ZZ)\n sage: X.identity_morphism() # indirect doctest\n ...
class SchemeMorphism_point(SchemeMorphism): "\n Base class for rational points on schemes.\n\n Recall that the `K`-rational points of a scheme `X` over `k` can\n be identified with the set of morphisms `Spec(K) \to X`. In Sage,\n the rational points are implemented by such scheme morphisms.\n\n EXA...
class SchemePoint(Element): '\n Base class for points on a scheme, either topological or defined\n by a morphism.\n ' def __init__(self, S, parent=None): '\n INPUT:\n\n - ``S`` -- a scheme\n\n - ``parent`` -- the parent in which to construct this point\n\n TESTS::...
def is_SchemeTopologicalPoint(x): return isinstance(x, SchemeTopologicalPoint)
class SchemeTopologicalPoint(SchemePoint): '\n Base class for topological points on schemes.\n ' def __init__(self, S): '\n INPUT:\n\n - ``S`` -- a scheme\n\n TESTS:\n\n The parent of a topological point is the scheme on which it\n lies (see :trac:`7946`)::\n\...
class SchemeTopologicalPoint_affine_open(SchemeTopologicalPoint): def __init__(self, u, x): '\n INPUT:\n\n - ``u`` -- morphism with domain an affine scheme `U`\n\n - ``x`` -- topological point on `U`\n ' SchemeTopologicalPoint.__init__(self, u.codomain()) self....
class SchemeTopologicalPoint_prime_ideal(SchemeTopologicalPoint): def __init__(self, S, P, check=False): '\n INPUT:\n\n - ``S`` -- an affine scheme\n\n - ``P`` -- a prime ideal of the coordinate ring of `S`, or\n anything that can be converted into such an ideal\n\n T...
def is_SchemeRationalPoint(x): return isinstance(x, SchemeRationalPoint)
class SchemeRationalPoint(SchemePoint): def __init__(self, f): '\n INPUT:\n\n\n - ``f`` - a morphism of schemes\n ' SchemePoint.__init__(self, f.codomain(), parent=f.parent()) self.__f = f def _repr_(self): return ('Point on %s defined by the morphism %s...
def is_Scheme(x): '\n Test whether ``x`` is a scheme.\n\n INPUT:\n\n - ``x`` -- anything.\n\n OUTPUT:\n\n Boolean. Whether ``x`` derives from :class:`Scheme`.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.scheme import is_Scheme\n sage: is_Scheme(5)\n False\n sag...
class Scheme(Parent): '\n The base class for all schemes.\n\n INPUT:\n\n - ``X`` -- a scheme, scheme morphism, commutative ring,\n commutative ring morphism, or ``None`` (optional). Determines\n the base scheme. If a commutative ring is passed, the spectrum\n of the ring will be used as ba...
def is_AffineScheme(x): '\n Return True if `x` is an affine scheme.\n\n EXAMPLES::\n\n sage: from sage.schemes.generic.scheme import is_AffineScheme\n sage: is_AffineScheme(5)\n False\n sage: E = Spec(QQ)\n sage: is_AffineScheme(E)\n True\n ' return isinstanc...
class AffineScheme(UniqueRepresentation, Scheme): "\n Class for general affine schemes.\n\n TESTS::\n\n sage: from sage.schemes.generic.scheme import AffineScheme\n sage: A = QQ['t']\n sage: X_abs = AffineScheme(A); X_abs\n Spectrum of Univariate Polynomial Ring in t over Rationa...
def Spec(R, S=None): "\n Apply the Spec functor to `R`.\n\n INPUT:\n\n - ``R`` -- either a commutative ring or a ring homomorphism\n\n - ``S`` -- a commutative ring (optional), the base ring\n\n OUTPUT:\n\n - ``AffineScheme`` -- the affine scheme `\\mathrm{Spec}(R)`\n\n EXAMPLES::\n\n ...
class SpecFunctor(Functor, UniqueRepresentation): '\n The Spec functor.\n ' def __init__(self, base_ring=None): '\n EXAMPLES::\n\n sage: from sage.schemes.generic.spec import SpecFunctor\n sage: SpecFunctor()\n Spec functor from Category of commutative ri...
def HyperellipticCurve(f, h=0, names=None, PP=None, check_squarefree=True): '\n Returns the hyperelliptic curve `y^2 + h y = f`, for\n univariate polynomials `h` and `f`. If `h`\n is not given, then it defaults to 0.\n\n INPUT:\n\n - ``f`` - univariate polynomial\n\n - ``h`` - optional univari...
class HyperellipticCurve_finite_field(hyperelliptic_generic.HyperellipticCurve_generic, ProjectivePlaneCurve_finite_field): def _frobenius_coefficient_bound_charpoly(self): '\n Computes bound on number of `p`-adic digits needed to recover\n frobenius polynomial computing the characteristic ...
class HyperellipticCurve_g2(hyperelliptic_generic.HyperellipticCurve_generic): def is_odd_degree(self): '\n Return ``True`` if the curve is an odd degree model.\n\n EXAMPLES::\n\n sage: R.<x> = QQ[]\n sage: f = x^5 - x^4 + 3\n sage: HyperellipticCurve(f).is_...
def is_HyperellipticCurve(C): '\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.hyperelliptic_generic import is_HyperellipticCurve\n sage: R.<x> = QQ[]; C = HyperellipticCurve(x^3 + x - 1); C\n Hyperelliptic Curve over Rational Field defined by y^2 = x^3 + x - 1\n sage...
class HyperellipticCurve_generic(plane_curve.ProjectivePlaneCurve): '\n TESTS::\n\n sage: P.<x> = QQ[]\n sage: f0 = 4*x^5 - 30*x^3 + 45*x - 22\n sage: C0 = HyperellipticCurve(f0)\n sage: f1 = x^5 - x^3 + x - 22\n sage: C1 = HyperellipticCurve(f1)\n sage: C0 == C1\n ...
class HyperellipticCurve_padic_field(hyperelliptic_generic.HyperellipticCurve_generic, ProjectivePlaneCurve_field): def local_analytic_interpolation(self, P, Q): "\n For points `P`, `Q` in the same residue disc,\n this constructs an interpolation from `P` to `Q`\n (in homogeneous coo...
class HyperellipticCurve_rational_field(hyperelliptic_generic.HyperellipticCurve_generic, ProjectivePlaneCurve_field): def matrix_of_frobenius(self, p, prec=20): def my_chage_ring(self, R): from .constructor import HyperellipticCurve (f, h) = self._hyperelliptic_polynomials ...
def diffxy(f, x, xtimes, y, ytimes): '\n Differentiate a polynomial ``f``, ``xtimes`` with respect to ``x``, and\n ```ytimes`` with respect to ``y``.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import diffxy\n sage: R.<u, v> = QQ[]\n sage: diffxy(u^2*v^...
def differential_operator(f, g, k): '\n Return the differential operator `(f g)_k` symbolically in the polynomial ring in ``dfdx, dfdy, dgdx, dgdy``.\n\n This is defined by Mestre on p 315 [Mes1991]_:\n\n .. MATH::\n\n (f g)_k = \\frac{(m - k)! (n - k)!}{m! n!} \\left(\n \\frac{\\partial f}...
def diffsymb(U, f, g): '\n Given a differential operator ``U`` in ``dfdx, dfdy, dgdx, dgdy``,\n represented symbolically by ``U``, apply it to ``f, g``.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import diffsymb\n sage: R.<x, y> = QQ[]\n sage: S.<dfdx,...
def Ueberschiebung(f, g, k): '\n Return the differential operator `(f g)_k`.\n\n This is defined by Mestre on page 315 [Mes1991]_:\n\n .. MATH::\n\n (f g)_k = \\frac{(m - k)! (n - k)!}{m! n!} \\left(\n \\frac{\\partial f}{\\partial x} \\frac{\\partial g}{\\partial y} -\n \\frac{\\par...
def ubs(f): "\n Given a sextic form `f`, return a dictionary of the invariants of Mestre, p 317 [Mes1991]_.\n\n `f` may be homogeneous in two variables or inhomogeneous in one.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import ubs\n sage: x = QQ['x'].0\n ...
def clebsch_to_igusa(A, B, C, D): '\n Convert Clebsch invariants `A, B, C, D` to Igusa invariants `I_2, I_4, I_6, I_{10}`.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import clebsch_to_igusa, igusa_to_clebsch\n sage: clebsch_to_igusa(2, 3, 4, 5)\n (-240, 1...
def igusa_to_clebsch(I2, I4, I6, I10): '\n Convert Igusa invariants `I_2, I_4, I_6, I_{10}` to Clebsch invariants `A, B, C, D`.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import clebsch_to_igusa, igusa_to_clebsch\n sage: igusa_to_clebsch(-2400, 173700, 23112000,...
def clebsch_invariants(f): '\n Given a sextic form `f`, return the Clebsch invariants `(A, B, C, D)` of\n Mestre, p 317, [Mes1991]_.\n\n `f` may be homogeneous in two variables or inhomogeneous in one.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import clebsch_inv...
def igusa_clebsch_invariants(f): "\n Given a sextic form `f`, return the Igusa-Clebsch invariants `I_2, I_4,\n I_6, I_{10}` of Igusa and Clebsch [IJ1960]_.\n\n `f` may be homogeneous in two variables or inhomogeneous in one.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invari...
def absolute_igusa_invariants_wamelen(f): "\n Given a sextic form `f`, return the three absolute Igusa invariants used by van Wamelen [Wam1999]_.\n\n `f` may be homogeneous in two variables or inhomogeneous in one.\n\n REFERENCES:\n\n - [Wam1999]_\n\n EXAMPLES::\n\n sage: from sage.schemes.h...
def absolute_igusa_invariants_kohel(f): "\n Given a sextic form `f`, return the three absolute Igusa invariants used by Kohel [KohECHIDNA]_.\n\n `f` may be homogeneous in two variables or inhomogeneous in one.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.invariants import absolu...
def satisfies_coefficient_condition(g, p): "\n This is the coefficient condition in the definition of Omega_K'\n on page 912 of the published version of paper.\n\n EXAMPLES::\n\n sage: from sage.schemes.hyperelliptic_curves.jacobian_endomorphism_utils import satisfies_coefficient_condition\n ...
def get_is_geom_field(f, C, bad_primes, B=200): '\n Determine whether the geometric endomorphism algebra is a field.\n\n This is Algorithm 4.10 in [Lom2019]_. The computation done here\n may allow one to immediately conclude that the geometric endomorphism\n ring is trivial (i.e. the integer ring); th...
def is_geom_trivial_when_field(C, bad_primes, B=200): '\n Determine if the geometric endomorphism ring is trivial assuming the\n geometric endomorphism algebra is a field.\n\n This is Algorithm 4.15 in [Lom2019]_.\n\n INPUT:\n\n - ``C`` -- the hyperelliptic curve.\n\n - ``bad_primes`` -- the lis...
class HyperellipticJacobian_g2(jacobian_generic.HyperellipticJacobian_generic): def kummer_surface(self): try: return self._kummer_surface except AttributeError: return kummer_surface.KummerSurface(self)
class HyperellipticJacobian_generic(Jacobian_generic): '\n EXAMPLES::\n\n sage: # needs sage.rings.finite_rings\n sage: FF = FiniteField(2003)\n sage: R.<x> = PolynomialRing(FF)\n sage: f = x**5 + 1184*x**3 + 1846*x**2 + 956*x + 560\n sage: C = HyperellipticCurve(f)\n ...
class JacobianHomset_divisor_classes(SchemeHomset_points): def __init__(self, Y, X, **kwds): R = X.base_ring() S = Y.coordinate_ring() SchemeHomset_points.__init__(self, Y, X, **kwds) P2 = X.curve()._printing_ring if (S != R): y = str(P2.gen()) x = ...
def cantor_reduction_simple(a, b, f, genus): "\n Return the unique reduced divisor linearly equivalent to\n `(a, b)` on the curve `y^2 = f(x).`\n\n See the docstring of\n :mod:`sage.schemes.hyperelliptic_curves.jacobian_morphism` for\n information about divisors, linear equivalence, and reduction.\...
def cantor_reduction(a, b, f, h, genus): "\n Return the unique reduced divisor linearly equivalent to\n `(a, b)` on the curve `y^2 + y h(x) = f(x)`.\n\n See the docstring of\n :mod:`sage.schemes.hyperelliptic_curves.jacobian_morphism` for\n information about divisors, linear equivalence, and reduct...
def cantor_composition_simple(D1, D2, f, genus): "\n Given `D_1` and `D_2` two reduced Mumford\n divisors on the Jacobian of the curve `y^2 = f(x)`,\n computes a representative `D_1 + D_2`.\n\n .. warning::\n\n The representative computed is NOT reduced! Use\n :func:`cantor_reduction_simpl...
def cantor_composition(D1, D2, f, h, genus): "\n EXAMPLES::\n\n sage: # needs sage.rings.finite_rings\n sage: F.<a> = GF(7^2, 'a')\n sage: x = F['x'].gen()\n sage: f = x^7 + x^2 + a\n sage: H = HyperellipticCurve(f, 2*x); H\n Hyperelliptic Curve over Finite Field in a ...
class JacobianMorphism_divisor_class_field(AdditiveGroupElement, SchemeMorphism): '\n An element of a Jacobian defined over a field, i.e. in\n `J(K) = \\mathrm{Pic}^0_K(C)`.\n ' def __init__(self, parent, polys, check=True): "\n Create a new Jacobian element in Mumford representation....
class KummerSurface(AlgebraicScheme_subscheme_projective): def __init__(self, J): '\n EXAMPLES::\n\n sage: R.<x> = QQ[]\n sage: f = x^5 + x + 1\n sage: X = HyperellipticCurve(f)\n sage: J = Jacobian(X)\n sage: K = KummerSurface(J); K\n ...
def HyperellipticCurve_from_invariants(i, reduced=True, precision=None, algorithm='default'): "\n Returns a hyperelliptic curve with the given Igusa-Clebsch invariants up to\n scaling.\n\n The output is a curve over the field in which the Igusa-Clebsch invariants\n are given. The output curve is uniqu...
def Mestre_conic(i, xyz=False, names='u,v,w'): "\n Return the conic equation from Mestre's algorithm given the Igusa-Clebsch\n invariants.\n\n It has a rational point if and only if a hyperelliptic curve\n corresponding to the invariants exists.\n\n INPUT:\n\n - ``i`` - list or tuple of length 4...
class SpecialCubicQuotientRingElement(CommutativeAlgebraElement): '\n An element of a :class:`SpecialCubicQuotientRing`.\n ' def __init__(self, parent, p0, p1, p2, check=True): '\n Construct the element `p_0 + p_1*x + p_2*x^2`, where\n the `p_i` are polynomials in `T`.\n\n ...
class SpecialCubicQuotientRing(CommutativeAlgebra): "\n Specialised class for representing the quotient ring\n `R[x,T]/(T - x^3 - ax - b)`, where `R` is an\n arbitrary commutative base ring (in which 2 and 3 are invertible),\n `a` and `b` are elements of that ring.\n\n Polynomials are represented i...