Thanks for your advice, Simon. Sounds like sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal would be a good class choice. I do have a trac account ('araichev') and have read about patches but have not actually submitted one yet. So i'll get on that by submitting my simple alg_dep method.
Alex On Jan 6, 9:09 pm, Simon King <simon.k...@uni-jena.de> wrote: > Hi Alex! > > On 6 Jan., 04:15, Alex Raichev <tortoise.s...@gmail.com> wrote: > > > As a newbie Sage contributor, i thought it would be good practice to > > submit small chunks of code (instead of big ones like what i recently > > submitted). > > First of all, thank you for contributing to Sage! And I think it is a > good thing to start with something small. > > > So i wrote a useful little function to check algebraic > > dependence for a given list of polynomials (documentation below). I'd > > like to get it incorporated into Sage, but where in the Sage library > > should i propose to put it? If it operated on a single polynomial, > > then i think i would add it as a method to the class > > MPolynomial_libsingular(sage.rings.polynomial.multi_polynomial.MPolynomial) > > . > > But it operates on a list of polynomials. Any advice? > > I agree that it should be a method, not a function. The doc string > that you provide gives some idea where it could be put. > > > INPUT: > > > - ``fs`` - A list of polynomials `f_1,\ldots,f_r` from a common > > polynomial ring. > > Since f_1,...,f_r all belong to the same polynomial ring R, why not > make it a method of a polynomial ring? There are different > implementations of polynomial rings, but I suppose that your code > relies on libsingular. So, why not > sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingu > lar? > If the code is generic, then of course it should better be put into > sage.rings.polynomial.multi_polynomial_ring_generic.MPolynomialRing_generic > > Alternatively, it could be a method of polynomial ideals, since ideals > in Sage have a fixed list of generators - like f_1,...,f_r. > > Do you already have a trac account and know how patches are submitted > and refereed? > > Best regards, > Simon -- 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