I am attempting to compute some sets of rational functions.  Unfortunately, 
it seems that elements of a fraction field are only reduced to unit 
multiples of numerator and denominator.  Multiplying the numerator and 
denominator by the same unit gives equal elements, but they hash to 
different things.


I can separate each rational function into numerator and denominator, 
rescale them and reconstruct the fraction, but is there a simpler way?



R.<w>=PolynomialRing(ZZ)

K=FractionField(R)

test = (K(-1)/K(-w))

test.reduce()

print(test)


-1/-w

print(test == K(1/w))

True

s = set([K(1/w), test])
print(s)

{1/w, -1/-w}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5854175c-27fa-47b7-9f73-aa50db880f7dn%40googlegroups.com.

Reply via email to