#9337: Add toric divisors
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |       Owner:  AlexGhitza
       Type:  enhancement         |      Status:  needs_info
   Priority:  major               |   Milestone:  sage-4.6  
  Component:  algebraic geometry  |    Keywords:            
     Author:  Volker Braun        |    Upstream:  N/A       
   Reviewer:  Andrey Novoseltsev  |      Merged:            
Work_issues:                      |  
----------------------------------+-----------------------------------------

Comment(by vbraun):

 The `ToricDivisorGroup` is the group of T-Weil divisors. They are
 `FormalSums` of monomials, whereas a `Divisor_generic` is a formal sum of
 (homogeneous) polynomials. A `ToricDivisor_generic` is a valid element of
 its base class `Divisor_generic`, but not the other way round. If you want
 non-toric divisors then you can already do
 {{{
 sage: from sage.schemes.generic.divisor_group import DivisorGroup
 sage: dP6 = toric_varieties.dP6()
 sage: dP6.inject_variables()
 Defining x, u, y, v, z, w
 sage: Div = DivisorGroup(toric_varieties.dP6()); Div
 Group of ZZ-Divisors on 2-d CPR-Fano toric variety covered by 6 affine
 patches
 sage: Div(x^2+u)   # does not know how to check homogeneity
 x^2 + u
 sage: type(_)
 <class 'sage.schemes.generic.divisor.Divisor_generic'>
 }}}
 The `ToricDivisorGroup` should probably print `Group of toric ZZ-Weil
 divisors` to be more explicit. I was trying to not print "T-Weil divisor"
 all the time in the output to make things easier to read. I'll change the
 `ToricDivisorGroup` output but leave its elements as "Divisor x", if in
 doubt you can always use `parent()` or `type()` to find out what you are
 working with.

 I don't see much use to have separate `ToricVariety_field.divisor_group()`
 and `.toric_divisor_group()` methods, I think newcomers would only be
 tempted into constructing the generic divisor group and then be
 disappointed that there is no toric functionality there.

 In your last line, `G(x+y)` should have returned `G(x)+G(y)`, that is,
 linear polynomials get converted to the analogous sum of T-Weil divisors,
 but you found a bug. Although this is potentially dangerous it provides a
 useful shorthand to define the T-Weil divisors.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9337#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to