#8987: Add support for rational polyhedral fans
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  mhampton    
       Type:  enhancement         |      Status:  needs_review
   Priority:  major               |   Milestone:  sage-4.4.4  
  Component:  geometry            |    Keywords:              
     Author:  Andrey Novoseltsev  |    Upstream:  N/A         
   Reviewer:  Volker Braun        |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------

Comment(by novoselt):

 Replying to [comment:7 vbraun]:

 > Maybe I'm missing something, but is there a reason why comparison of
 cones depends on the ray ordering?
 {{{
 sage: Cone([(1,0), (0,1)]) == Cone([(1,0), (0,1)])
 True
 sage: Cone([(1,0), (0,1)]) == Cone([(0,1), (1,0)])
 False
 }}}
 > It seems more natural to compare `ray_set()` instead of `rays()`.

 This is done like this:

 {{{
 sage: Cone([(1,0), (0,1)]).is_equivalent(Cone([(0,1), (1,0)]))
 True
 }}}
 One reason for such behaviour of `==` is simplicity of comparison, which
 probably should be fast for sorting purposes (and I was implementing only
 `__cmp__` for all classes, not `__eq__`). In the case of not strictly
 convex cones equality of ray sets is not necessary for equality of cones
 as sets of points (see the code of `is_equivalent` for cones).

 Another reason is consistency with the implementation of fans. For fans
 checking mathematical equality is a bit more tedious (although still can
 be done quickly using sorted lists for rays and cones, see `is_equivalent`
 for fans), but the main reason is that I would prefer to be able to use
 plain integers to index divisors or charts. I was participating in the
 discussion how the equality of fans should be interpreted in Macaulay2,
 and in the documentation to one of the cohomology related functions there
 was a line about "canonical identification with `ZZ^n`". Well, such
 identifications can be canonical only if the order of things is fixed.

 Maybe these arguments are not very strong, but since there is a way to
 check equality in both senses, I think that it should be fine. The plan is
 also to have equivalence check relevant for toric varieties, i.e. up to
 `GL(ZZ^n)` action, but `is_isomorphic` functions throw
 `NotImplementedError` so far.

 Would you like me to add some comments on this behaviour to the "main"
 documentation of cone and fan modules? It is already described in
 `is_equivalent` and `is_isomorphic` docstrings, but perhaps deserves more
 visibility.

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