If I do, for example, ``` R.<x, y> = Integers(6)[] small_roots(x, (5, 5)) ``` I get an error: ``` TypeError: self must be an integral domain. ``` (I'm not sure why it does not happen when N is a product of two large primes.) Anyway, I think it's safer to modify the code as follows: ```diff - f /= f.coefficients().pop(0) + leading = 1 / f.coefficients().pop(0) + f = f.map_coefficients(lambda x: x * leading) ``` The code is functionally equivalent, and does not hit the aforementioned error.