Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure all nmod-type functions works with intended range of modulo #1951

Open
albinahlback opened this issue May 5, 2024 · 2 comments
Open

Comments

@albinahlback
Copy link
Collaborator

albinahlback commented May 5, 2024

For instance, nmod_mat_one does not work with modulo 1. I'm sure that this is the only modulus that is problematic.

Personally, I don't think we should allow modulo 1 since that only yield trivial results. Not sure how wide-spread this is.

Edit: nmod_mat_randfull is also problematic.

@albinahlback
Copy link
Collaborator Author

We should implement functions such as nmod_mat_is_canonical, just like fmpz_is_canonical.

@fredrik-johansson
Copy link
Collaborator

fredrik-johansson commented May 6, 2024

Personally, I don't think we should allow modulo 1 since that only yield trivial results.

It is useful, just like it is useful to allow the 0 x 0 matrix, empty set, etc. For example, a user who CRTs results mod m1, m2, m3, ... might start with 1 as an initial value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants