In the midst reviewing ticket 16986, my reviewer came up with the following 
example that fails:

R.<z>=PolynomialRing(QQ)
K.<w>=NumberField(z^3+2)
R.<t>=PolynomialRing(K)
L.<v>=K.extension(t^2+t+1)
P.<x,y>=ProjectiveSpace(L,1)
H=End(P)
f=H([x^3-2*y^3,v*y^3])
f.rational_preimages(P([0,1]))

However, when I run it on my machine, I get it to run with no problems, 
returning 

[(-w*v : 1), (-w : 1), (w*v + w : 1)]

BUT, when I run it a second time, making no changes, I get the following error:
Traceback (click to the left of this block for traceback)
...
TypeError: unable to convert 1/2*w^2*v to a rational

After restarting my notebook, I receive the first answer, and upon running it a 
second time, I get the second error.
I've tried running on other copies of Sage, and the same thing happens, it will 
work the first time, but fail the second time.

On further investigation, using the .dumps function, it seems that f is 
changing every time we compile. However, it seems that it only ever changes the 
very
first time. What I mean to say by that is that when I dump f after running it 
the first time it will be different than when I dump f after running it a 
second time.
>From the second time on, dumping f will always return the same string. 

This is weird, what is the underlying mechanics causing this, and how can we 
trace it more explicitly. 




-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to