Ejemplo n.º 1
0
    def differential_space(self):
        """
        Return the vector space of the differential space `\Omega(D)` of the divisor `D`.

        OUTPUT:

        - a vector space isomorphic to `\Omega(D)`

        - an isomorphism from the vector space to the differential space

        - the inverse of the isomorphism

        EXAMPLES::

            sage: K.<x> = FunctionField(GF(5)); R.<t> = K[]
            sage: F.<y> = K.extension(t^2 - x^3 - 1)
            sage: O = F.maximal_order()
            sage: I = O.ideal(x - 2)
            sage: P1 = I.divisor().support()[0]
            sage: Pinf = F.places_infinite()[0]
            sage: D = -3*Pinf + P1
            sage: V, from_V, to_V = D.differential_space()
            sage: all(to_V(from_V(e)) == e for e in V)
            True
        """
        F = self._field
        W = F.space_of_differentials()
        k = F.constant_base_field()

        fbasis, coordinates = self._differential_space()

        n = len(fbasis)
        V = k**n

        def from_V(v):
            f = sum(v[i] * fbasis[i] for i in range(n))
            return differential(F, f)

        def to_V(w):
            return vector(coordinates(w._f))

        from sage.rings.function_field.maps import (
            FunctionFieldLinearMap, FunctionFieldPartiallyDefinedLinearMap)

        mor_from_V = FunctionFieldLinearMap(Hom(V, W), from_V)
        mor_to_V = FunctionFieldPartiallyDefinedLinearMap(Hom(W, V), to_V)

        return V, mor_from_V, mor_to_V
Ejemplo n.º 2
0
    def function_space(self):
        """
        Return the vector space of the Riemann-Roch space of the divisor.

        OUTPUT:

        - a vector space, an isomorphism from the vector space
          to the Riemann-Roch space, and its inverse.

        EXAMPLES::

            sage: K.<x> = FunctionField(GF(5)); R.<t> = PolynomialRing(K)
            sage: F.<y> = K.extension(t^2-x^3-1)
            sage: O = F.maximal_order()
            sage: I = O.ideal(x-2)
            sage: D = I.divisor()
            sage: V, from_V, to_V = D.function_space()
            sage: all(to_V(from_V(e)) == e for e in V)
            True
        """
        F = self._field
        k = F.constant_base_field()

        basis, coordinates = self._function_space()

        n = len(basis)
        V = k**n

        def from_V(v):
            return sum(v[i] * basis[i] for i in range(n))

        def to_V(f):
            return vector(coordinates(f))

        from sage.rings.function_field.maps import (
            FunctionFieldLinearMap, FunctionFieldPartiallyDefinedLinearMap)

        mor_from_V = FunctionFieldLinearMap(Hom(V, F), from_V)
        mor_to_V = FunctionFieldPartiallyDefinedLinearMap(Hom(F, V), to_V)

        return V, mor_from_V, mor_to_V