Ticket #12900: trac_12900_Demazure_roots.patch

File trac_12900_Demazure_roots.patch, 4.1 KB (added by Volker Braun, 9 years ago)

Rebased patch

  • sage/schemes/toric/variety.py

    # HG changeset patch
    # User Volker Braun <vbraun.name@gmail.com>
    # Date 1375466147 14400
    #      Fri Aug 02 13:55:47 2013 -0400
    # Node ID 2353d8dc644864e3c8204ecda168fe9e91a4232e
    # Parent  36eff924a70f684b32458b73cf4127e2f91ada66
    Trac #12900: Demazure roots of a toric variety
    
    diff --git a/sage/schemes/toric/variety.py b/sage/schemes/toric/variety.py
    a b  
    28132813        return sum(dk * (q-1)**(n-k) for k, dk in enumerate(d))
    28142814
    28152815
     2816    @cached_method
     2817    def Demazure_roots(self):
     2818        """
     2819        Return the Demazure roots.
     2820
     2821        OUTPUT:
     2822
     2823        The roots as points of the `M`-lattice.
     2824
     2825        REFERENCES:
     2826
     2827        ..  [Demazure]
     2828            M. Demazure
     2829            Sous-groupes algebriques de rang maximum du groupe de Cremona.
     2830            Ann. Sci. Ecole Norm. Sup. 1970, 3, 507–588.
     2831
     2832        ..  [Bazhov]
     2833            Ivan Bazhov:
     2834            On orbits of the automorphism group on a complete toric variety.
     2835            http://arxiv.org/abs/1110.4275,
     2836            http://dx.doi.org/10.1007/s13366-011-0084-0.
     2837
     2838        EXAMPLE::
     2839
     2840            sage: P2 = toric_varieties.P2()
     2841            sage: P2.Demazure_roots()
     2842            (M(-1, 0), M(-1, 1), M(0, -1), M(0, 1), M(1, -1), M(1, 0))
     2843
     2844        Here are the remaining three examples listed in [Bazhov]_, Example 2.1 and 2.3::
     2845           
     2846            sage: s = 3
     2847            sage: cones = [(0,1),(1,2),(2,3),(3,0)]
     2848            sage: Hs = ToricVariety(Fan(rays=[(1,0),(0,-1),(-1,s),(0,1)], cones=cones))
     2849            sage: Hs.Demazure_roots()
     2850            (M(-1, 0), M(1, 0), M(0, 1), M(1, 1), M(2, 1), M(3, 1))
     2851
     2852            sage: P11s = ToricVariety(Fan(rays=[(1,0),(0,-1),(-1,s)], cones=[(0,1),(1,2),(2,0)]))
     2853            sage: P11s.Demazure_roots()
     2854            (M(-1, 0), M(1, 0), M(0, 1), M(1, 1), M(2, 1), M(3, 1))
     2855            sage: P11s.Demazure_roots() == Hs.Demazure_roots()
     2856            True
     2857           
     2858            sage: Bs = ToricVariety(Fan(rays=[(s,1),(s,-1),(-s,-1),(-s,1)], cones=cones))
     2859            sage: Bs.Demazure_roots()
     2860            ()
     2861
     2862        TESTS::
     2863
     2864            sage: toric_varieties.A1().Demazure_roots()
     2865            Traceback (most recent call last):
     2866            ...
     2867            NotImplementedError: Demazure_roots() is only implemented for complete toric varieties.
     2868        """
     2869        if not self.is_complete():
     2870            raise NotImplementedError('Demazure_roots() is only implemented for complete toric varieties.')
     2871        antiK = -self.K()
     2872        fan_rays = self.fan().rays()
     2873        roots = [ m for m in antiK.sections()
     2874                  if [ ray*m for ray in fan_rays ].count(-1) == 1 ]
     2875        return tuple(roots)
     2876
     2877
     2878    def Aut_dimension(self):
     2879        r"""
     2880        Return the dimension of the automorphism group
     2881
     2882        There are three kinds of symmetries of toric varieties:
     2883       
     2884          * Toric automorphisms (rescaling of homogeneous coordinates)
     2885         
     2886          * Demazure roots. These are translations `x_i \to x_i +
     2887            \epsilon x^m` of a homogeneous coordinate `x_i` by a
     2888            monomial `x^m` of the same homogeneous degree.
     2889
     2890          * Symmetries of the fan. These yield discrete subgroups.
     2891
     2892        OUTPUT:
     2893
     2894        An integer. The dimension of the automorphism group. Equals
     2895        the dimension of the `M`-lattice plus the number of Demazure
     2896        roots.
     2897
     2898        EXAMPLES::
     2899
     2900            sage: P2 = toric_varieties.P2()
     2901            sage: P2.Aut_dimension()
     2902            8
     2903
     2904        TESTS::
     2905       
     2906            sage: toric_varieties.A1().Aut_dimension()
     2907            Traceback (most recent call last):
     2908            ...
     2909            NotImplementedError: Aut_dimension() is only implemented for complete toric varieties.
     2910        """
     2911        if not self.is_complete():
     2912            raise NotImplementedError('Aut_dimension() is only implemented for complete toric varieties.')
     2913        return self.fan().lattice_dim() + len(self.Demazure_roots())
     2914
     2915
    28162916def normalize_names(names=None, ngens=None, prefix=None, indices=None,
    28172917                    return_prefix=False):
    28182918    r"""