#12170: Genus computation (using singular) and _singular_ object for function 
filed
----------------------------------+-----------------------------------------
   Reporter:  sydahmad            |          Owner:  AlexGhitza                 
    
       Type:  enhancement         |         Status:  needs_review               
    
   Priority:  minor               |      Milestone:  sage-5.0                   
    
  Component:  algebraic geometry  |       Keywords:  function field, genus, 
singular
Work_issues:                      |       Upstream:  N/A                        
    
   Reviewer:                      |         Author:  Syed Ahmad Lavasani        
    
     Merged:                      |   Dependencies:  9054                       
    
----------------------------------+-----------------------------------------

Comment(by mderickx):

 Replying to [comment:1 sydahmad]:
 > if we have:
 >
 > kx.<x> = FunctionField(QQ)
 > kxY.<Y> = PolynomialRing(QQ)
 >
 > kxY._singular_ should be k(x)[Y] (which is what this code generates)
 however, singular only computes the genus of an ideal of k[x][Y] ring. So,
 I have to generate a tmpR = k[x][Y] each time I need to compute the genus.
 Maybe it's worth it to add __singular_deg2_ private object to store this
 ring as well.
 >

 Well if we are going to cache the genus computation then this won't be
 needed.

 Replying to [comment:1 sydahmad]:
 > Also, it makes sense to store the genus in __genus. But I'm not sure how
 should I check it's validity. Can the defining polynomial of the function
 field change after its creation. If not then we can set __genus = -1 and
 if it's non-negative then it's valid.

 You should look at the documentation of cached_method on how to do this.
 It would be indeed some function ideal for caching since it's answer takes
 a while to compute while it takes only a small integer to store it.

 Note that you can change the defining polynomial (because you have to go
 trough a lot of trouble to make python objects immutable). But you are
 safe to assume that the defining polynomial doesn't change. In fact the
 current code already assumes that as shown below.

 {{{
 sage: K.<x>=FunctionField(QQ)
 sage: R.<y>=K[]
 sage: L=K.extension(y^3+y*x+x)
 sage: L
 Function field in y defined by y^3 + x*y + x
 sage: L.__init__(y^3+x,'y')
 sage: L
 Function field in y defined by y^3 + x
 sage: K.extension(y^3+y*x+x)
 Function field in y defined by y^3 + x
 }}}

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