Hi all,
Cutting to the chase, I realized that the modulo operator "%" is un-naturally defined to be constant-zero in the fraction field of polynomials. This has caused the following issue.
See the following minimal code on the online Sage server:
Sage Cell ServerIn this example, we are doing 1 modulo x+1, which supposedly should give us 1 as output. However, since the datatype of x+1 is rational polynomial, it produces 0 as output.
I imagine there are two ways that may potentially solve this issue:
(1) Disgard the modulo operator % for fraction field! In the mathematical sense there is no interesting modulo (other than producing zero) for fraction field anyway, so such an operator seems more confusing than helpful. Removing % from fraction field should also cause the triggering of coersion from rational polynomial to a polynomial in the above example.
(2) Perform the modulo only on the integral ideal. Upon each time we compute f%g in a fraction field, we can derive its ring of integer O, and, return a representative in the co-set f + g*O. In the above example, this should also return the representative 1.
Best,
Yu-Hsuan (Taylor)