예제 #1
0
def WeierstrassMap_P1xP1(polynomial, variables=None):
    r"""
    Map an anticanonical hypersurface in
    `\mathbb{P}^1 \times \mathbb{P}^1` into Weierstrass form.

    Input/output is the same as :func:`WeierstrassMap`, except that
    the input polynomial must be a standard anticanonical hypersurface
    in the toric surface `\mathbb{P}^1 \times \mathbb{P}^1`:

    EXAMPLES::

        sage: from sage.schemes.toric.weierstrass_covering import WeierstrassMap_P1xP1
        sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P1xP1
        sage: R.<x0,x1,y0,y1,a>= QQ[]
        sage: biquadric = ( x0^2*y0^2 + x1^2*y0^2 + x0^2*y1^2 + x1^2*y1^2 +
        ....:     a * x0*x1*y0*y1*5 )
        sage: f, g = WeierstrassForm_P1xP1(biquadric, [x0, x1, y0, y1]);  (f,g)
        (-625/48*a^4 + 25/3*a^2 - 16/3, 15625/864*a^6 - 625/36*a^4 - 100/9*a^2 + 128/27)
        sage: X, Y, Z = WeierstrassMap_P1xP1(biquadric, [x0, x1, y0, y1])
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(biquadric))
        0

        sage: R = PolynomialRing(QQ, 'x,y,s,t', order='lex')
        sage: R.inject_variables()
        Defining x, y, s, t
        sage: equation = ( s^2*(x^2+2*x*y+3*y^2) + s*t*(4*x^2+5*x*y+6*y^2)
        ....:              + t^2*(7*x^2+8*x*y+9*y^2) )
        sage: X, Y, Z = WeierstrassMap_P1xP1(equation, [x,y,s,t])
        sage: f, g = WeierstrassForm_P1xP1(equation, variables=[x,y,s,t])
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(equation))
        0

        sage: R = PolynomialRing(QQ, 'x,s', order='lex')
        sage: R.inject_variables()
        Defining x, s
        sage: equation = s^2*(x^2+2*x+3) + s*(4*x^2+5*x+6) + (7*x^2+8*x+9)
        sage: X, Y, Z = WeierstrassMap_P1xP1(equation)
        sage: f, g = WeierstrassForm_P1xP1(equation)
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(equation))
        0
    """
    x,y,s,t = _check_polynomial_P1xP1(polynomial, variables)
    a00 = polynomial.coefficient({s:2})
    V = polynomial.coefficient({s:1})
    U = - _partial_discriminant(polynomial, s, t) / 4
    Q = invariant_theory.binary_quartic(U, x, y)
    g = Q.g_covariant()
    h = Q.h_covariant()
    if t is None:
        t = 1
    return ( 4*g*t**2, 4*h*t**3, (a00*s+V/2) )
예제 #2
0
def WeierstrassMap_P1xP1(polynomial, variables=None):
    r"""
    Map an anticanonical hypersurface in
    `\mathbb{P}^1 \times \mathbb{P}^1` into Weierstrass form.

    Input/output is the same as :func:`WeierstrassMap`, except that
    the input polynomial must be a standard anticanonical hypersurface
    in the toric surface `\mathbb{P}^1 \times \mathbb{P}^1`:

    EXAMPLES::

        sage: from sage.schemes.toric.weierstrass_covering import WeierstrassMap_P1xP1
        sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P1xP1
        sage: R.<x0,x1,y0,y1,a>= QQ[]
        sage: biquadric = ( x0^2*y0^2 + x1^2*y0^2 + x0^2*y1^2 + x1^2*y1^2 +
        ....:     a * x0*x1*y0*y1*5 )
        sage: f, g = WeierstrassForm_P1xP1(biquadric, [x0, x1, y0, y1]);  (f,g)
        (-625/48*a^4 + 25/3*a^2 - 16/3, 15625/864*a^6 - 625/36*a^4 - 100/9*a^2 + 128/27)
        sage: X, Y, Z = WeierstrassMap_P1xP1(biquadric, [x0, x1, y0, y1])
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(biquadric))
        0

        sage: R = PolynomialRing(QQ, 'x,y,s,t', order='lex')
        sage: R.inject_variables()
        Defining x, y, s, t
        sage: equation = ( s^2*(x^2+2*x*y+3*y^2) + s*t*(4*x^2+5*x*y+6*y^2)
        ....:              + t^2*(7*x^2+8*x*y+9*y^2) )
        sage: X, Y, Z = WeierstrassMap_P1xP1(equation, [x,y,s,t])
        sage: f, g = WeierstrassForm_P1xP1(equation, variables=[x,y,s,t])
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(equation))
        0

        sage: R = PolynomialRing(QQ, 'x,s', order='lex')
        sage: R.inject_variables()
        Defining x, s
        sage: equation = s^2*(x^2+2*x+3) + s*(4*x^2+5*x+6) + (7*x^2+8*x+9)
        sage: X, Y, Z = WeierstrassMap_P1xP1(equation)
        sage: f, g = WeierstrassForm_P1xP1(equation)
        sage: (-Y^2 + X^3 + f*X*Z^4 + g*Z^6).reduce(R.ideal(equation))
        0
    """
    x, y, s, t = _check_polynomial_P1xP1(polynomial, variables)
    a00 = polynomial.coefficient({s: 2})
    V = polynomial.coefficient({s: 1})
    U = -_partial_discriminant(polynomial, s, t) / 4
    Q = invariant_theory.binary_quartic(U, x, y)
    g = Q.g_covariant()
    h = Q.h_covariant()
    if t is None:
        t = 1
    return (4 * g * t**2, 4 * h * t**3, (a00 * s + V / 2))