[sage-devel] Re: genus() for Function Fields
Hi Maarten, I see this in Florian Hess's codes ### # Genus GffDifferentDeg := function(K) local of, oi, df, di; of := GffOrderMaxFinite(K); oi := GffOrderMaxInfty(K); df := GffOrderDisc(of); di := GffOrderDisc(oi); return (PolyDeg(df) + InftyVal(di))/GffDimExactConstField(K); end; #GffGenus := function(K) # local d, dim, n; # # n := GffDeg(K); # dim := 1; # d := GffDifferentDeg(K); # # return d/2 - n/dim + 1; #end; Which basically uses Riemann-Hurwitz to compute the Genus. But I don't think it's the fastest way to do it. I think analyzing the singularities is faster than analyzing the ramification. (It might be the reason that he commented GffGenus out) Anyway, I sent him an email and asked him about his opinion. First: I couldn't find the implementation for GffOrde... functions. On 17 דצמבר, 04:12, Maarten Derickx m.derickx.stud...@gmail.com wrote: It'shttp://trac.sagemath.org/sage_trac/ticket/12170. For Florian Hess ideas see my post inhttps://groups.google.com/forum/#!searchin/sage-devel/function$20fiel... of wich you are probably already aware. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: genus() for Function Fields
Which ticket? Thanks, William On Dec 16, 2011 7:56 PM, syd.lavas...@gmail.com syd.lavas...@gmail.com wrote: Hi William, Thank you for you advices. I wrote the wrapper and submitted it. I also checked the singular's code briefly. It seems that fundamentally the same as the one I cited in counting singularities. I'm going to contatct Florian Hess to ask him about the best algorithm. On Dec 14, 12:34 am, William Stein wst...@gmail.com wrote: On Tue, Dec 13, 2011 at 3:57 PM, syd.lavas...@gmail.com syd.lavas...@gmail.com wrote: AFAIK, currently the function field object can not compute itsgenus (see below). I'm thinking about adding this feature in following few days. Now, there are two different approaches I can take, and I would like to know which one is more desirable for Sage community: 1. Sage can use singular to compute thegenus, so we can write (essentially) a wrapper which compute thegenusand make it a member of the function field class. What function field object are you talking about?Do you mean the code at http://trac.sagemath.org/sage_trac/ticket/9054 which isn't included in any version of Sage yet, but has a positive review? 2. To implement the algorithm (for example the one in [1]) from scratch. Please, tell me which one is the more desirable approach. If anybody has any comment or has already the implementation please bring it up in the discussion. I think one should of course at a minimum do 1 (wrap singular), because it will be easy. Then do 2 as well, if you can -- and make it easy to compare 1 and 2 on many inputs, so you can find lots of bugs in both. Also do 3, which is to implement whatever algorithm Florian Hess suggests, which might be different than 1 or 2. -- William [1] Sendra, J. R. and Winkler, F. and Pérez-Díaz, S., Rational Algebraic Curves - A Computer Algebra Approach, Springer, 2007. sage: kx.x = FunctionField(QQ) sage: kxY.Y = PolynomialRing(kx, 'Y') sage: kxy.y = kx.extension(Y^2 - x^5 -1) sage: kxy Function field in y defined by Y^2 - x^5 - 1 sage: kxy.genus() --- AttributeErrorTraceback (most recent call last) /home/syd/Documents/RecherchePhD/Codes/sage/GrbBasis/ipython console in module() /home/syd/Programmes/sage-4.7.2/local/lib/python2.6/site-packages/sage/ structure/parent.so in sage.structure.parent.Parent.__getattr__ (sage/ structure/parent.c:6260)() /home/syd/Programmes/sage-4.7.2/local/lib/python2.6/site-packages/sage/ structure/parent.so in sage.structure.parent.getattr_from_other_class (sage/structure/parent.c:3110)() AttributeError: 'FunctionField_polymod_with_category' object has no attribute 'genus' sage: -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/sage-devel URL:http://www.sagemath.org -- William Stein Professor of Mathematics University of Washingtonhttp://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: genus() for Function Fields
It's http://trac.sagemath.org/sage_trac/ticket/12170 . For Florian Hess ideas see my post in https://groups.google.com/forum/#!searchin/sage-devel/function$20fields%7Csort:date/sage-devel/eO1q8jc0Ysk/1hNp0WoNocAJ of wich you are probably already aware. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: genus() for Function Fields
Hi William, Thank you for you advices. I wrote the wrapper and submitted it. I also checked the singular's code briefly. It seems that fundamentally the same as the one I cited in counting singularities. I'm going to contatct Florian Hess to ask him about the best algorithm. On Dec 14, 12:34 am, William Stein wst...@gmail.com wrote: On Tue, Dec 13, 2011 at 3:57 PM, syd.lavas...@gmail.com syd.lavas...@gmail.com wrote: AFAIK, currently the function field object can not compute itsgenus (see below). I'm thinking about adding this feature in following few days. Now, there are two different approaches I can take, and I would like to know which one is more desirable for Sage community: 1. Sage can use singular to compute thegenus, so we can write (essentially) a wrapper which compute thegenusand make it a member of the function field class. What function field object are you talking about? Do you mean the code at http://trac.sagemath.org/sage_trac/ticket/9054 which isn't included in any version of Sage yet, but has a positive review? 2. To implement the algorithm (for example the one in [1]) from scratch. Please, tell me which one is the more desirable approach. If anybody has any comment or has already the implementation please bring it up in the discussion. I think one should of course at a minimum do 1 (wrap singular), because it will be easy. Then do 2 as well, if you can -- and make it easy to compare 1 and 2 on many inputs, so you can find lots of bugs in both. Also do 3, which is to implement whatever algorithm Florian Hess suggests, which might be different than 1 or 2. -- William [1] Sendra, J. R. and Winkler, F. and Pérez-Díaz, S., Rational Algebraic Curves - A Computer Algebra Approach, Springer, 2007. sage: kx.x = FunctionField(QQ) sage: kxY.Y = PolynomialRing(kx, 'Y') sage: kxy.y = kx.extension(Y^2 - x^5 -1) sage: kxy Function field in y defined by Y^2 - x^5 - 1 sage: kxy.genus() --- AttributeError Traceback (most recent call last) /home/syd/Documents/RecherchePhD/Codes/sage/GrbBasis/ipython console in module() /home/syd/Programmes/sage-4.7.2/local/lib/python2.6/site-packages/sage/ structure/parent.so in sage.structure.parent.Parent.__getattr__ (sage/ structure/parent.c:6260)() /home/syd/Programmes/sage-4.7.2/local/lib/python2.6/site-packages/sage/ structure/parent.so in sage.structure.parent.getattr_from_other_class (sage/structure/parent.c:3110)() AttributeError: 'FunctionField_polymod_with_category' object has no attribute 'genus' sage: -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/sage-devel URL:http://www.sagemath.org -- William Stein Professor of Mathematics University of Washingtonhttp://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org