Ok, here is a revised version. I think i solved pretty much all of the previous problems, except for considering the orderings. I will work on that tomorrow. Again, i would like to hear what you think about it.
Just one comment in case you decide to include it in the sage code. I think the best optiom would be to include it in the .sage() function of the singular objects. def coerce_ring_from_singular(r): cha=str(r.charstr()) vars=str(r.varstr()).rsplit(',') ch=cha.partition(',')[0] if ch=='real': fiel=RR elif ch=='0': fiel=QQ elif ch=='complex': fiel=ComplexField() else: fiel=GF(sage_eval(ch)) if ',' in cha and ch<>'complex' and ch<>'real': generator=cha.partition(',')[2] fielx=PolynomialRing(fiel,generator) minpoly=r.ringlist()[1][4][1] minpoly=minpoly.sage_polystring() minpoly=sage_eval(minpoly,locals={generator:fielx.gen()}) if ch=='0': fiel=NumberField(minpoly,generator) else: fiel=fielx.quotient(fielx.ideal(minpoly)) R=PolynomialRing(fiel,vars) return R Best Miguel Marco --~--~---------~--~----~------------~-------~--~----~ 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://www.sagemath.org -~----------~----~----~----~------~----~------~--~---