Thank you! After all this, I have finally submitted a patch which adds this functionality: http://sagetrac.org/sage_trac/ticket/1485 I changed the name as you suggested and slightly edited the example in the docstring. The patch now passed sage -t and implements the wrapper we worked on.
On Dec 11, 2007 12:12 PM, Simon King <[EMAIL PROTECTED]> wrote: > Dear David, dear Martin, > > I made the following modifications; see > http://sage.math.washington.edu/home/SimonKing/patches/matrix_group.py > > - Some typos in the doc-string. Reference added. > - In the bad characteristic case, the result is in general not a minimal > generating set. I emphasize this in the doc-string. But then, the name > "fundamental_invariants" is misleading (as far as i know, fundamental > means minimal). I didn't change it, but i think "generating_invariants" > fits better. > > - Definition of Lgens: It is simpler to use ','.join and list coercion. > - It is dangerous to refer to a singular variable name 'L', 'P' or 'S', > because it is not unlikely that some user will use the same name. > Therefore i introduce ReyName=singular._next_var_name(), similarly > PName and SName. > - The lines > Rey = singular('L[1]') > IR = Rey.invariant_algebra_reynolds() > L = [f for f in IR] > mean a lot of traffic through the interface. I tried to keep the things > as internal to Singular as possible. > > - You use variables x(1),x(2),... for the Singular sub-process, but > x1,x2,... for the result. I think it is simpler to use the same names. > > @Martin: Is there a more direct way to convert an ideal (or 1xn matrix) of > the name IRName existing in a Singular sub-process into a list of elements > of a PolynomialRing PR than the following? > return [PR(singular(IRName+'[1,%s]'%n))) for n in \\ > range(1,1+singular('ncols('+IRName+')'))] > > - In the 'bad characteristic', invariant_ring only has two return values, > not three. So, it must be > singular.eval('matrix P,S=invariant_ring(%s)'%Lgens) > or better > singular('matrix %s,%s=invariant_ring(%s)'%(PName,SName,Lgens)) > - IR = singular('P,S') is a list of two matrices, and this is not what we > want. I would return a list of polynomials (similar to the case of 'good > characteristic'), formed by all polynomials of P and all but the first > of S: The first of S always is 1, and i wouldn't count 1 as a > sub-algebra generator. > > Yours > Simon > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---