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

Remove PartialOrd and Ord from field elements #841

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

divergentdave
Copy link
Contributor

This closes #810. The existing derived implementations were not meaningful, since they compared the Montgomery representation of field elements. The implementations are removed instead of fixing them because orderings of a cyclic group are not always meaningful. In cases where users want to perform the "natural" comparison between field elements, they should first project the field elements to integers, and then compare the integers directly. (Note that this projection, via From<$int> for $elem, does correctly map from the Montgomery representation to a residue class representative)

@divergentdave divergentdave requested a review from a team as a code owner November 20, 2023 22:19
@divergentdave divergentdave merged commit f98e71b into main Nov 20, 2023
6 checks passed
@divergentdave divergentdave deleted the david/field-no-ord branch November 20, 2023 23:04
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

Successfully merging this pull request may close these issues.

Comparisons between field elements
2 participants