You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think what is needed is to have contexts for nmod so that there is somewhere to store whether or not the modulus is prime. Then operations that are not well defined for composite moduli could be rejected.
I can see potentially two different kinds of contexts. The low-level version is sort of what fmpz_mod_poly_ctx is except that it would be good to make it so that all objects have such a context and can quickly compare them in methods like __add__ or can quickly check for prime modulus.
A higher level version could be a user interface like:
Yeah, this would be really nice but reminds me more of the "level above" when you were talking about the goals and different ideas.
Here Zmod is more like a python (rather than cython?) interface which allows you to select and construct everything you want smartly from what python flint gives.
Whether we do:
K=Zmod(10)
f=K.poly([1,2,3])
or
K=Zmod(10)
R=PolynomialRing(K, 'x') # more like sage
Yeah, this would be really nice but reminds me more of the "level above"
Yeah, I'm getting sidetracked.
We can just add an nmod_ctx type. I just mentioned the other things because I think that more broadly it would be better to have consistent handling of contexts for each of the types.
Activity
oscarbenjamin commentedon Feb 13, 2024
I think what is needed is to have contexts for nmod so that there is somewhere to store whether or not the modulus is prime. Then operations that are not well defined for composite moduli could be rejected.
GiacomoPope commentedon Feb 13, 2024
Yeah I agree. I think this would also help users simply because then different polynomial objects would be used in the same way.
oscarbenjamin commentedon Feb 13, 2024
I can see potentially two different kinds of contexts. The low-level version is sort of what
fmpz_mod_poly_ctxis except that it would be good to make it so that all objects have such a context and can quickly compare them in methods like__add__or can quickly check for prime modulus.A higher level version could be a user interface like:
Here the user does not need to create an
fmpz_mod_poly_ctxexplicitly. PerhapsZmodshould choose automatically betweennmodandfmpz_mod.I'm not sure if it would be better to have polynomial rings with distinct symbol names like
Something like this would likely be needed for mpoly.
GiacomoPope commentedon Feb 13, 2024
Yeah, this would be really nice but reminds me more of the "level above" when you were talking about the goals and different ideas.
Here
Zmodis more like a python (rather than cython?) interface which allows you to select and construct everything you want smartly from what python flint gives.Whether we do:
or
Is another question I suppose.
oscarbenjamin commentedon Feb 13, 2024
Yeah, I'm getting sidetracked.
We can just add an
nmod_ctxtype. I just mentioned the other things because I think that more broadly it would be better to have consistent handling of contexts for each of the types.