#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 novoselt):

 Replying to [comment:16 vbraun]:
 > 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.

 Agreed, I think that parents should be more or less descriptive in their
 `_repr_`, since usually they are looked at by themselves, but elements
 should try to be compact since they are likely to be used in groups.

 > 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.

 I think that for most people who know what a divisor is it would be
 strange that `divisor_group` does not allow working with general divisors.
 As an alternative to having two groups, we can have
 `Divisor_of_toric_variety` class which behaves like `generic` but has a
 method `self.toric()` and when this is true, then certain other methods
 are accessible. On the other hand, in the context of general divisors it
 does not make much sense to talk about generators, while for T-divisors it
 is very useful and natural. So this is an argument for having a separate
 group. Names, perhaps, should be chosen as `divisor_group`,
 `divisor_group_toric`, maybe later even `divisor_group_Cartier` etc. This
 will group all these groups ;-) together in the documentation and TAB-
 completion, so it will be easy to see that these things exist and names
 should be clear enough for all people who can use them.

 Bottom line: I am against calling the group of T-divisors just
 `divisor_group` and I think that access to all divisor groups should be
 uniform (e.g. without explicit calls to `DivisorGroup` as in your example
 above) and they should always be more special than generic (e.g. there is
 already a way to check homogeneity of polynomials  in homogeneous
 coordinates, but as you have demonstrated, a generic divisor group was not
 able to use this functionality).

 > 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.

 I am VERY against interpreting `G(x+y)` as `G(x)+G(y)` because the latter
 one IS `G(x*y)`. If one wants additive behaviour, it is better to inject
 generators of the divisor group and write such sums explicitly in terms of
 divisors rather than coordinates. (I guess it is also a bit confusing here
 that divisors and coordinates have exactly the same names, but I guess the
 plan was to address these names later...) By the way - `x*y` is as easy to
 write as `x+y`, is mathematically correct, and allows things like
 `x^2*y^3` as well, so instead of removing your special treatment for
 linear polynomials it should be just switched to monomials!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9337#comment:17>
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