flint
flint copied to clipboard
Can fq_nmod_reduce be made more useful?
If the finite field is F = F_p[X]/(f(X)) and I have an element g in F_p[X] then I think the documentation claims that fq_nmod_reduce should give me the element g as an element of the finite field (that is, fq_nmod_reduce is just the projection F_p[X] -> F_p[X]/(f)). But this is true only as long as deg(g) <= 2*deg(f), an inexpensive check carefully hidden behind an assert and not mentioned in the documentation.
It would be great if the restriction on the degree of g could be lifted. Otherwise, there is nothing in the API to realize the projection (since the API does not contain functionality to retrieve f back from F).