#11599: Wrap fan moriphism in toric morphism
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |          Owner:  AlexGhitza
       Type:  enhancement         |         Status:  new       
   Priority:  major               |      Milestone:  sage-4.7.2
  Component:  algebraic geometry  |       Keywords:            
Work_issues:                      |       Upstream:  N/A       
   Reviewer:                      |         Author:            
     Merged:                      |   Dependencies:            
----------------------------------+-----------------------------------------

Comment(by novoselt):

 We should. I have been using the following code so far:
 {{{
 def toric_morphism_list(phi, X, Y):
     r"""
     Given a fan morphism phi from X.fan() -> Y.fan(), return the list
 representation of the corresponding toric morphism.
     """
     x = [SR.var(x_i, domain="positive") for x_i in
 X.coordinate_ring().variable_names()]
     result = [1] * Y.fan().nrays()
     for rho, x_rho in zip(X.fan(1), x):
         sigma_prime = phi.image_cone(rho)
         degrees = sigma_prime.ray_matrix() \ phi(rho.ray(0))
         for i, d in zip(sigma_prime.ambient_ray_indices(), degrees):
             result[i] *= x_rho^d
     return result

 def toric_morphism_dictionary(phi, X, Y):
     r"""
     Given a fan morphism phi from X.fan() -> Y.fan(), return the
 dictionary representation of the corresponding toric morphism.
     """
     x = [SR.var(x_i, domain="positive") for x_i in
 X.coordinate_ring().variable_names()]
     y = [SR.var(y_i, domain="positive") for y_i in
 Y.coordinate_ring().variable_names()]
     result = dict((y_i, 1) for y_i in y)
     for rho, x_rho in zip(X.fan(1), x):
         sigma_prime = phi.image_cone(rho)
         degrees = sigma_prime.ray_matrix() \ phi(rho.ray(0))
         for i, d in zip(sigma_prime.ambient_ray_indices(), degrees):
             result[y[i]] *= x_rho^d
     return result
 }}}
 Using the dictionary representation it is quite easy to compute pullbacks,
 the problem here is that the underlying map of total coordinate rings is
 not a ring homomorphism, since it is likely to involve roots. The
 following paper may be useful for "correct and general" implementation:
 http://arxiv.org/abs/1004.4924

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