Thanks to everyone who commented. I am a fool. I got tangled up in some similar sort of situation a few months ago and David Loeffler emailed me to basically warn me off sage's x and to use anything else instead. I didn't follow his advice this time because I couldn't get an R.<t> constructor to work in a script because I was using execfile instead of %runfile. We live and learn.
Kevin On Sunday, 27 July 2014 22:50:45 UTC+1, Nils Bruin wrote: > > I don't think we'll ever get SR to operate properly in positive > characteristics; especially because it would allow completely arbitrary > characteristic combinations in the first place, but perhaps the cases below > help in tracking down if we can so something to improve the situation a bit: > > sage: ((1)*((1)*x+(1)/x)^3+(1)).expand() > x^3 + 3*x + 3/x + 1/x^3 + 1 > sage: ((k(1)*x+k(1)/x)^3+k(1)).expand() > x^3 + 3*x + 3/x + 1/x^3 + 1 > sage: (k(1)*(k(1)*x+k(1)/x)^3).expand() > x^3 + 1/x^3 > sage: (k(1)*(k(1)*x+k(1)/x)^3+k(1)).expand() > 0/x + 1/x^3 + 1 > sage: ((k(1)*x+k(1)/x)^3+k(1)).expand() > x^3 + 3*x + 3/x + 1/x^3 + 1 > > so it's the combination of multiplying the third power by k(1) and adding > k(1) to it that leads "expand" to producing an expression that is really > invalid. > > My guess is that it finds a nonzero factor 3 somewhere, which it assumes > is invertible, and ends up multiplying both numerator and denominator of > some fraction somewhere. The numerator ends up being combined in GF(3), so > that one gets 0 and SR takes it happily from there, removing the factor 3 > from the denominator again. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.