I forgot:

'SageMath version 10.0.beta3, Release Date: 2023-03-02'


Compiled this morning on OSX 12.6.3

On Friday, March 10, 2023 at 11:37:44 AM UTC-5 dei...@gmail.com wrote:

> 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/eede56d5-9023-4999-b79d-ae75b9576419n%40googlegroups.com.

Reply via email to