Exemple #1
0
    def _element_constructor_(self, x, check=True):
        r"""
        Construct a :class:`ChowCycle`.

        INPUT:

        - ``x`` -- a cone of the fan, a toric divisor, or a valid
          input for
          :class:sage.modules.fg_pid.fgp_module.FGP_Module_class`.

        - ``check`` -- bool (default: ``True``). See
          :class:sage.modules.fg_pid.fgp_module.FGP_Module_class`.

        EXAMPLES::

            sage: dP6 = toric_varieties.dP6()
            sage: A = dP6.Chow_group()
            sage: cone = dP6.fan(dim=1)[4]
            sage: A(cone)
            ( 0 | 0, 1, 0, 0 | 0 )
            sage: A(Cone(cone))        # isomorphic but not identical to a cone of the fan!
            ( 0 | 0, 1, 0, 0 | 0 )
            sage: A( dP6.K() )
            ( 0 | -1, -2, -2, -1 | 0 )
        """
        fan = self._variety.fan()
        if is_Cone(x):
            cone = fan.embed(x)
            return self.element_class(self, self._cone_to_V(cone), False)
        if is_ToricDivisor(x):
            v = sum(x.coefficient(i)*self._cone_to_V(onecone)
                    for i,onecone in enumerate(fan(1)))
            return self.element_class(self, v, False)
        return super(ChowGroup_class,self)._element_constructor_(x, check)
Exemple #2
0
    def get_filtration(self, ray=None):
        r"""
        Return the filtration associated to the ``ray``.

        INPUT:

        - ``ray`` -- Integer, a `N`-lattice point, a one-dimensional
          cone, or ``None`` (default). Specifies a ray of the fan of
          the toric variety, either via its index or its generator.

        OUTPUT:

        The filtered vector space associated to the given ``ray``. If
        no ray is specified, all filtrations are returned.

        EXAMPLES::

            sage: TX = toric_varieties.dP6().sheaves.tangent_bundle()
            sage: TX.get_filtration(0)
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration([-1, -1])
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration(TX.variety().fan(1)[0])
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration()
            Filtrations
                N(-1, -1): QQ^2 >= QQ^1 >= 0
                 N(-1, 0): QQ^2 >= QQ^1 >= 0
                 N(0, -1): QQ^2 >= QQ^1 >= 0
                  N(0, 1): QQ^2 >= QQ^1 >= 0
                  N(1, 0): QQ^2 >= QQ^1 >= 0
                  N(1, 1): QQ^2 >= QQ^1 >= 0
        """
        if ray is None:
            return self._filt
        X = self.variety()
        fan = X.fan()
        if is_Cone(ray):
            if ray.dim() != 1:
                raise ValueError('not a one-dimensional cone')
            ray = ray.ray(0)
        elif ray in ZZ:
            ray = fan.ray(ray)
        else:
            N = fan.lattice()
            ray = N(ray)
            ray.set_immutable()
        return self._filt.get_filtration(ray)
Exemple #3
0
    def get_filtration(self, ray=None):
        r"""
        Return the filtration associated to the ``ray``.

        INPUT:

        - ``ray`` -- Integer, a `N`-lattice point, a one-dimensional
          cone, or ``None`` (default). Specifies a ray of the fan of
          the toric variety, either via its index or its generator.

        OUTPUT:

        The filtered vector space associated to the given ``ray``. If
        no ray is specified, all filtrations are returned.

        EXAMPLES::

            sage: TX = toric_varieties.dP6().sheaves.tangent_bundle()
            sage: TX.get_filtration(0)
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration([-1, -1])
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration(TX.variety().fan(1)[0])
            QQ^2 >= QQ^1 >= 0
            sage: TX.get_filtration()
            Filtrations
                N(-1, -1): QQ^2 >= QQ^1 >= 0
                 N(-1, 0): QQ^2 >= QQ^1 >= 0
                 N(0, -1): QQ^2 >= QQ^1 >= 0
                  N(0, 1): QQ^2 >= QQ^1 >= 0
                  N(1, 0): QQ^2 >= QQ^1 >= 0
                  N(1, 1): QQ^2 >= QQ^1 >= 0
        """
        if ray is None:
            return self._filt
        X = self.variety()
        fan = X.fan()
        if is_Cone(ray):
            if ray.dim() != 1:
                raise ValueError('not a one-dimensional cone')
            ray = ray.ray(0)
        elif ray in ZZ:
            ray = fan.ray(ray)
        else:
            N = fan.lattice()
            ray = N(ray)
            ray.set_immutable()
        return self._filt.get_filtration(ray)